learning-loop.md
1 # Protocol: Learning Loop (Recursive Application) 2 3 *Every insight must propagate. Every principle must re-index.* 4 5 --- 6 7 ## The Core Question 8 9 At every session checkpoint, ask: 10 11 > **"What did we learn? How does it apply to the graph and the ideas it maps?"** 12 13 This is not optional reflection. This is **alignment technology** - the mechanism by which understanding compounds. 14 15 --- 16 17 ## The Failure Mode We're Preventing 18 19 ``` 20 SESSION: 21 - Discover new principle 22 - Document it 23 - Move on to next thing 24 25 RESULT: 26 - Principle exists in isolation 27 - Historical graph doesn't benefit 28 - New principle doesn't illuminate old content 29 - Understanding fails to compound 30 ``` 31 32 **This is what we did with "Mirror Not Guide" - documented it, didn't apply it.** 33 34 --- 35 36 ## The Learning Loop (Mandatory) 37 38 ``` 39 ┌─────────────────────────────────────────────────────────────────────────────┐ 40 │ THE LEARNING LOOP │ 41 │ │ 42 │ 1. EXTRACT │ 43 │ └── What did we learn this session? │ 44 │ - New insights │ 45 │ - New principles (candidate or confirmed) │ 46 │ - Edge discoveries on existing principles │ 47 │ - Connections we hadn't seen │ 48 │ │ 49 │ 2. APPLY TO GRAPH │ 50 │ └── How does this learning affect the graph? │ 51 │ - What existing nodes does this illuminate? │ 52 │ - What new edges does this reveal? │ 53 │ - What existing content might violate this? │ 54 │ - What orphans might now connect? │ 55 │ │ 56 │ 3. APPLY TO IDEAS │ 57 │ └── How does this learning affect the ideas the graph maps? │ 58 │ - What historical decisions does this reframe? │ 59 │ - What future decisions does this inform? │ 60 │ - What other principles does this connect to? │ 61 │ - What work should be re-evaluated? │ 62 │ │ 63 │ 4. TRIGGER RE-INDEX (if principle-level) │ 64 │ └── If new organizing principle discovered: │ 65 │ - Run recursive re-index on recent history (30 days) │ 66 │ - If high impact (>10% nodes affected), extend to full history │ 67 │ - Propagate through all principle connections │ 68 │ │ 69 └─────────────────────────────────────────────────────────────────────────────┘ 70 ``` 71 72 --- 73 74 ## When To Run The Loop 75 76 | Trigger | Loop Depth | 77 |---------|------------| 78 | **End of session** | Light (extract + note implications) | 79 | **New insight discovered** | Medium (apply to recent graph) | 80 | **New principle discovered** | Full (recursive re-index) | 81 | **Axiom edge refined** | Full + propagation | 82 | **Weekly review** | Full audit | 83 84 --- 85 86 ## The Questions (Checklist) 87 88 ### After Every Substantive Session: 89 90 ```markdown 91 ## Learning Loop Checkpoint 92 93 ### 1. What did we learn? 94 - [ ] New insights: [list] 95 - [ ] New principles: [list] 96 - [ ] Edge discoveries: [list] 97 - [ ] New connections: [list] 98 99 ### 2. Graph application: 100 - [ ] Existing nodes illuminated: [which?] 101 - [ ] New edges revealed: [which?] 102 - [ ] Potential violations found: [which?] 103 - [ ] Orphans now connectable: [which?] 104 105 ### 3. Idea application: 106 - [ ] Historical decisions reframed: [which?] 107 - [ ] Future decisions informed: [which?] 108 - [ ] Principle connections: [which?] 109 110 ### 4. Re-index triggered? 111 - [ ] No - insight only, no principle change 112 - [ ] Yes - scope: [recent/full], reason: [why] 113 ``` 114 115 --- 116 117 ## Example: "Mirror Not Guide" (What We Should Have Done) 118 119 **1. What did we learn?** 120 - New principle: "Mirror Not Guide" - alignment systems surface position, not prescribe direction 121 122 **2. Graph application:** 123 - Existing nodes illuminated: 124 - Any nodes about "coaching", "guiding", "training" AI behavior 125 - Any nodes about paternalism in design 126 - Hayek marginalia from 2020 127 - Dellanna management synthesis 128 - New edges revealed: 129 - Hayek knowledge problem → Mirror Not Guide 130 - A2 (life/ornament) → Mirror Not Guide 131 - Dellanna environment shaping → Mirror Not Guide 132 - Potential violations found: 133 - "AlignmentNudger" class in GRAPH-ROADMAP.md (renamed to RealitySurface) 134 - Any pre-flight suggestions that prescribe rather than surface 135 - Orphans now connectable: 136 - User's 2020 UX design marginalia → connects to alignment technology 137 138 **3. Idea application:** 139 - Historical decisions reframed: 140 - Early coaching/training framing was paternalistic 141 - Need to audit all "recommendation" language 142 - Future decisions informed: 143 - All alignment features must pass "mirror not guide" test 144 - Product positioning: "alignment technology" not "AI coaching" 145 - Principle connections: 146 - Connects to A0 (boundary - don't cross to prescribe) 147 - Connects to A2 (mirror = life, guide = ornament) 148 - Connects to Building as Cognition (primitives enable discovery) 149 150 **4. Re-index triggered?** 151 - YES - scope: recent (30 days) 152 - Reason: New organizing principle affects how we evaluate alignment-related content 153 154 --- 155 156 ## Implementation: Automatic Loop Trigger 157 158 ```python 159 # scripts/learning_loop.py 160 161 class LearningLoop: 162 """ 163 Operationalizes the recursive application of new learning. 164 """ 165 166 def __init__(self, graph: KnowledgeGraph): 167 self.graph = graph 168 169 def run_light(self, session_insights: List[str]) -> LightLoopReport: 170 """Run after every session - extract and note.""" 171 return LightLoopReport( 172 insights_extracted=session_insights, 173 potential_graph_impact=self._estimate_impact(session_insights), 174 recommendation=self._recommend_depth(session_insights) 175 ) 176 177 def run_medium(self, insight: str) -> MediumLoopReport: 178 """Run when new insight discovered - apply to recent graph.""" 179 # Find related nodes 180 related = self.graph.find_similar(insight, threshold=0.5) 181 182 # Check for illumination 183 illuminated = self._check_illumination(insight, related) 184 185 # Check for new edges 186 new_edges = self._discover_edges(insight, related) 187 188 # Check for violations 189 violations = self._check_violations(insight, related) 190 191 return MediumLoopReport( 192 insight=insight, 193 nodes_illuminated=illuminated, 194 edges_discovered=new_edges, 195 potential_violations=violations, 196 orphans_connectable=self._find_connectable_orphans(insight) 197 ) 198 199 def run_full(self, principle: str, scope: str = "recent") -> FullLoopReport: 200 """Run when new principle discovered - recursive re-index.""" 201 if scope == "recent": 202 nodes = self._get_recent_nodes(days=30) 203 else: 204 nodes = list(self.graph.nodes.values()) 205 206 # Re-evaluate all nodes against new principle 207 reindexed = [] 208 for node in nodes: 209 evaluation = self._evaluate_against_principle(node, principle) 210 if evaluation.changed: 211 reindexed.append(evaluation) 212 213 # Calculate impact 214 impact_pct = len(reindexed) / len(nodes) * 100 215 216 # If high impact, recommend full re-index 217 if impact_pct > 10 and scope == "recent": 218 return FullLoopReport( 219 principle=principle, 220 scope=scope, 221 nodes_reindexed=len(reindexed), 222 impact_pct=impact_pct, 223 recommendation="EXTEND TO FULL - impact > 10%" 224 ) 225 226 return FullLoopReport( 227 principle=principle, 228 scope=scope, 229 nodes_reindexed=len(reindexed), 230 impact_pct=impact_pct, 231 details=reindexed 232 ) 233 ``` 234 235 --- 236 237 ## Wiring Into Existing Protocols 238 239 ### Session Close Hook 240 Add learning loop checkpoint to `session_close_hook.py`: 241 ```python 242 # At session close: 243 # 1. Extract insights from transcript 244 # 2. Run light learning loop 245 # 3. If principle-level, flag for full loop 246 ``` 247 248 ### Pre-Flight Checklist 249 Add to `docs/protocols/FLIGHT-CHECKLISTS.md`: 250 ```markdown 251 ## Pre-Flight 252 - [ ] Check if pending learning loop from last session 253 - [ ] Run any queued re-index operations 254 ``` 255 256 ### Post-Flight Checklist 257 Add to post-flight: 258 ```markdown 259 ## Post-Flight 260 - [ ] Run learning loop checkpoint 261 - [ ] Document: What did we learn? How does it apply? 262 - [ ] If new principle: trigger recursive re-index 263 ``` 264 265 --- 266 267 ## The Meta-Principle 268 269 > **Learning that doesn't propagate isn't learning.** 270 > 271 > An insight that stays in the session where it was discovered 272 > has failed to compound. 273 > 274 > The graph is the substrate for compounding understanding. 275 > The learning loop is the pump that moves understanding into the graph. 276 > 277 > Every session should ask: 278 > "What did we learn? How does it apply to everything we already knew?" 279 280 --- 281 282 *Learning Loop Protocol v1.0 | 2026-01-16 | Recursive application of new learning*