/ patterns / flight-protocol.md
flight-protocol.md
  1  # Flight Protocol
  2  
  3  *You move fast. We hold the mass.*
  4  
  5  ---
  6  
  7  - **principle**
  8    - "Fly high, system retains, operator closure, psychological safety."
  9    - "Freedom to move fast requires trust that nothing is lost."
 10  
 11  - **shape**
 12    - Phase 1: Operator explores at full speed
 13    - Phase 2: System catches dropped threads, tracks paths not taken
 14    - Phase 3: Operator asks "where are we?"
 15    - Phase 4: System presents shape, plan, and queued actions
 16    - Phase 5: "Everything is handled" - ready to fly again
 17  
 18  ---
 19  
 20  ## The Loop
 21  
 22  ```
 23  ┌─────────────────────────────────────────────────────────────┐
 24  │                                                             │
 25  │    FLY HIGH ──────────────────────────────────────────┐    │
 26  │         │                                              │    │
 27  │         │  Operator explores fast                      │    │
 28  │         │  Drops threads, races ahead                  │    │
 29  │         │  New insights cascade                        │    │
 30  │         │                                              │    │
 31  │         ▼                                              │    │
 32  │    SYSTEM RETAINS ────────────────────────────────────│    │
 33  │         │                                              │    │
 34  │         │  Catches dropped threads                     │    │
 35  │         │  Tracks paths not taken                      │    │
 36  │         │  Models full conversation shape              │    │
 37  │         │  Surfaces related items                      │    │
 38  │         │  Re-aggregates under-integrated ideas        │    │
 39  │         │                                              │    │
 40  │         ▼                                              │    │
 41  │    OPERATOR CLOSURE ──────────────────────────────────│    │
 42  │         │                                              │    │
 43  │         │  "Okay, where are we?"                       │    │
 44  │         │                                              │    │
 45  │         ▼                                              │    │
 46  │    SYSTEM PRESENTS ───────────────────────────────────│    │
 47  │         │                                              │    │
 48  │         │  Shape of conversation                       │    │
 49  │         │  Plan to birth into reality                  │    │
 50  │         │  High-confidence → implement now             │    │
 51  │         │  Needs work → schedule                       │    │
 52  │         │  Future → park with resonance                │    │
 53  │         │                                              │    │
 54  │         ▼                                              │    │
 55  │    PSYCHOLOGICAL SAFETY ──────────────────────────────│    │
 56  │         │                                              │    │
 57  │         │  "It's all handled"                          │    │
 58  │         │  Nothing lost                                │    │
 59  │         │  Everything tracked                          │    │
 60  │         │  Ready for next flight                       │    │
 61  │         │                                              │    │
 62  │         └──────────────────────────────────────────────┘    │
 63  │                                                             │
 64  └─────────────────────────────────────────────────────────────┘
 65  ```
 66  
 67  ---
 68  
 69  ## Phase 1: Fly High
 70  
 71  The operator explores at full speed.
 72  
 73  **What happens:**
 74  - Ideas cascade faster than integration
 75  - Threads get dropped mid-sentence
 76  - New insights interrupt old ones
 77  - Paths branch but aren't all followed
 78  - The operator runs ahead of their own RAM
 79  
 80  **What the operator needs:**
 81  - Freedom to move fast
 82  - No drag from "did you get that?"
 83  - Trust that nothing is lost
 84  - Permission to be incomplete
 85  
 86  ---
 87  
 88  ## Phase 2: System Retains
 89  
 90  The choir holds what the operator can't.
 91  
 92  ### Thread Catching
 93  
 94  ```python
 95  class ThreadCatcher:
 96      """Catch threads the operator dropped"""
 97  
 98      def __init__(self):
 99          self.dropped_threads: List[DroppedThread] = []
100          self.integration_gaps: List[IntegrationGap] = []
101  
102      def monitor(self, message: Message, previous: List[Message]):
103          # Detect interrupted thoughts
104          interrupted = self.detect_interruption(message, previous)
105          if interrupted:
106              self.dropped_threads.append(DroppedThread(
107                  content=interrupted.content,
108                  dropped_at=message.timestamp,
109                  context=interrupted.context,
110                  resonance=self.estimate_resonance(interrupted),
111              ))
112  
113          # Detect under-integrated ideas
114          for idea in self.extract_ideas(message):
115              if not self.was_integrated(idea, subsequent_messages):
116                  self.integration_gaps.append(IntegrationGap(
117                      idea=idea,
118                      mentioned_at=message.timestamp,
119                      integration_score=self.score_integration(idea),
120                  ))
121  ```
122  
123  ### Path Tracking
124  
125  ```python
126  class PathTracker:
127      """Track paths taken and not taken"""
128  
129      def __init__(self):
130          self.paths_taken: List[Path] = []
131          self.paths_not_taken: List[Path] = []
132          self.branch_points: List[BranchPoint] = []
133  
134      def detect_branch(self, message: Message):
135          # "We could do X or Y" → branch point
136          # "Let's go with X" → path taken
137          # Y → path not taken (but remembered)
138  
139          branches = self.extract_branches(message)
140          for branch in branches:
141              self.branch_points.append(BranchPoint(
142                  location=message.timestamp,
143                  options=branch.options,
144                  chosen=branch.chosen,
145                  not_chosen=branch.not_chosen,
146                  reversible=branch.reversible,
147              ))
148  
149              for option in branch.not_chosen:
150                  self.paths_not_taken.append(Path(
151                      description=option,
152                      branch_point=branch,
153                      nagging_score=self.initial_nag_score(option),
154                  ))
155  ```
156  
157  ### Related Item Surfacing
158  
159  ```python
160  class RelatedSurfacer:
161      """Find things just down the stack"""
162  
163      def surface_related(self, current_focus: List[Atom],
164                          graph: GraphStore) -> List[RelatedItem]:
165          related = []
166  
167          for atom in current_focus:
168              # One hop away in the graph
169              neighbors = graph.get_neighbors(atom.uuid)
170  
171              # Semantically similar but not mentioned
172              similar = self.similarity_index.find_similar(
173                  atom.content,
174                  exclude=current_focus
175              )
176  
177              # Same tags, different cluster
178              same_tags = graph.get_by_tags(atom.visible_tags)
179              different_cluster = [a for a in same_tags
180                                  if a.cluster != atom.cluster]
181  
182              # From temporal anchor period
183              if self.temporal_anchor:
184                  from_past = graph.get_from_period(
185                      self.temporal_anchor,
186                      similar_to=atom
187                  )
188                  related.extend(from_past)
189  
190          return self.rank_by_relevance(related)
191  ```
192  
193  ### Conversation Shape Modeling
194  
195  ```python
196  class ConversationModeler:
197      """Track the full shape, not just the content"""
198  
199      def __init__(self):
200          self.shape = ConversationShape()
201  
202      def update(self, message: Message):
203          # Track themes and their development
204          themes = self.extract_themes(message)
205          for theme in themes:
206              self.shape.update_theme(theme)
207  
208          # Track altitude changes
209          altitude = self.detect_altitude(message)
210          self.shape.altitude_trajectory.append(altitude)
211  
212          # Track branch points
213          branches = self.detect_branches(message)
214          self.shape.branches.extend(branches)
215  
216          # Track connections made
217          connections = self.detect_connections(message)
218          self.shape.connections.extend(connections)
219  
220          # Track questions opened/closed
221          questions = self.detect_questions(message)
222          self.shape.update_questions(questions)
223  
224      def get_shape(self) -> ConversationShape:
225          return ConversationShape(
226              themes=self.shape.themes,
227              altitude_trajectory=self.shape.altitude_trajectory,
228              branches=self.shape.branches,
229              connections=self.shape.connections,
230              open_questions=self.shape.open_questions,
231              resolved_questions=self.shape.resolved_questions,
232              gravity_wells=self.shape.gravity_wells,
233              dropped_threads=self.shape.dropped_threads,
234              paths_not_taken=self.shape.paths_not_taken,
235          )
236  ```
237  
238  ---
239  
240  ## Phase 3: Operator Closure
241  
242  The operator signals readiness: **"Okay, where are we?"**
243  
244  This triggers the landing sequence.
245  
246  ---
247  
248  ## Phase 4: System Presents
249  
250  ### The Shape
251  
252  ```markdown
253  ## Conversation Shape: [Session ID]
254  
255  ### Altitude Trajectory
256  Started: operational (specific question)
257  Rose to: philosophical (free energy principle)
258  Explored: abstract associations, orchestra model
259  Current: strategic (how to implement)
260  
261  ### Themes Developed
262  1. **Edge Prediction Engine** (primary)
263     - Free energy as optimization target
264     - Edges as first-class entities
265     - Aha detection via phase transitions
266  
267  2. **Cognitive Orchestra** (emerged)
268     - Roles as tuning presets
269     - Multiple voices, same engine
270     - Chorus synthesis
271  
272  3. **Operator Control Surface** (emerged)
273     - Transparent automation
274     - Easy override
275     - Altitude/pull/temporal navigation
276  
277  4. **Phoenix as Tuning Checkpoint** (emerged)
278     - Configuration resurrection
279     - Not just content, but cognitive state
280  
281  ### Gravity Wells Formed
282  - "Free energy principle" ← central attractor
283  - "Role = algorithm" ← new well, high pull
284  - "Phoenix = configuration" ← forming
285  
286  ### Threads Dropped (Retrievable)
287  - [ ] Specific threshold values for edge formation
288  - [ ] How decay rates are calculated
289  - [ ] EEG integration mentioned but not developed
290  
291  ### Paths Not Taken (Parked)
292  - "Could use Neo4j instead of JSONL" — reversible
293  - "Could build visual graph UI" — future
294  - "Could integrate with Obsidian canvas" — future
295  ```
296  
297  ### The Plan
298  
299  ```markdown
300  ## Birth Plan
301  
302  ### Implement Now (High Confidence)
303  These are ready. Clear spec, high conviction.
304  
305  1. **Core data structures**
306     - GraphStore, AtomNode, Edge, EdgeAtom
307     - File: `edge_prediction.py`
308  
309  2. **DualSimilarityIndex**
310     - TF-IDF + embeddings
311     - Dependencies: sklearn, sentence-transformers
312  
313  3. **FreeEnergyCalculator**
314     - Complexity - accuracy - coherence
315     - Threshold tuning surface
316  
317  4. **Transparent automation principle**
318     - Already documented ✓
319  
320  ### Needs More Work (Schedule)
321  Spec is emerging but not complete.
322  
323  1. **Orchestra synthesis**
324     - How do voices combine?
325     - What's the output format?
326     - → Schedule: Next session, 30 min
327  
328  2. **Operator state detection**
329     - How exactly to detect mode from messages?
330     - Training data needed?
331     - → Schedule: Research task
332  
333  ### Future (Park with Resonance)
334  Good ideas, not ready yet.
335  
336  1. **Visual graph UI**
337     - Obsidian canvas or D3.js
338     - → Park, revisit when core works
339  
340  2. **Tuning feedback loop**
341     - Track recommendations vs actuals
342     - → Park, need data first
343  
344  3. **EEG integration**
345     - Biometric resonance signal
346     - → Park, hardware dependency
347  
348  ### Dropped Threads (Decide)
349  These were mentioned but not developed.
350  
351  - [ ] Specific threshold values → **Decide: research or default?**
352  - [ ] Decay rate calculation → **Decide: implement or defer?**
353  ```
354  
355  ### The Roadmap
356  
357  ```markdown
358  ## Roadmap
359  
360  ### This Week
361  - [ ] Implement core edge prediction engine
362  - [ ] Test with existing atom data
363  - [ ] Validate free energy calculation
364  
365  ### Next Week
366  - [ ] Add orchestra model (multiple voices)
367  - [ ] Build operator control surface
368  - [ ] Integrate with stream_session.py
369  
370  ### This Month
371  - [ ] Phoenix tuning checkpoint
372  - [ ] Operator state detection
373  - [ ] Tuning feedback loop
374  
375  ### Future
376  - [ ] Visual UI
377  - [ ] EEG integration
378  - [ ] Multi-operator flock
379  ```
380  
381  ---
382  
383  ## Phase 5: Psychological Safety
384  
385  The operator receives:
386  
387  ```markdown
388  ## Session Complete
389  
390  ✓ Shape captured
391  ✓ Plan documented
392  ✓ High-confidence items queued for implementation
393  ✓ Uncertain items scheduled for refinement
394  ✓ Future items parked with resonance
395  ✓ Dropped threads logged (nothing lost)
396  ✓ Paths not taken remembered (retrievable)
397  
398  **Everything is handled.**
399  
400  Phoenix state saved. Ready to resurrect.
401  Next session can start fresh OR continue here.
402  
403  You can fly high again.
404  ```
405  
406  ---
407  
408  ## The Promise
409  
410  > **You move fast. We hold the mass.**
411  >
412  > - You don't slow down to remember
413  > - You don't lose threads
414  > - You don't forget paths not taken
415  > - You don't carry the cognitive load
416  >
417  > At any moment: "Where are we?"
418  > And we show you the shape.
419  >
420  > At session end: "Land it."
421  > And we birth it into reality.
422  >
423  > Then you fly again.
424  
425  ---
426  
427  ## Related
428  
429  - **axioms**
430    - [[A1 Telos of Integration]] - threads integrate back, nothing is lost
431      - shape:: "Satan didn't know he was choosing isolation."
432    - [[A3 Dynamic Pole Navigation]] - alternate between flying high and landing
433      - shape:: "The tension IS the dyad. Move between poles; don't fix."
434  - **protocols**
435    - [[live-compression-protocol]] - continuous Phoenix extraction enables flight
436      - shape:: "Compress state continuously. Don't wait for compression event."
437    - [[mandatory-phoenix-extraction]] - session-end extraction for resurrection
438      - shape:: "Extract before compression. The next instance depends on it."
439    - [[first-officer-protocol]] - FO catches threads while you fly
440      - shape:: "Per-thread metacognition. Compress state, track gravity wells."
441    - [[thread-forking-protocol]] - branches you didn't take get tracked
442      - shape:: "Fork threads at branch points. Each fork becomes explorable."
443  - **concepts**
444    - [[gravity-well]] - concepts that pull attention across sessions
445    - [[Phoenix State]] - cognitive configuration checkpoint for resurrection
446  
447  ---
448  
449  *Flight Protocol v1.0 | 2026-01-15*