Files
flynn/docs/plans/implementation-sequence.md
T
2026-02-12 22:47:28 -08:00

3.7 KiB

Flynn Implementation Sequence (Phase 1 -> Phase 3)

Created: 2026-02-12 Owner: Flynn core

Objective

Provide a single execution order for all planned PRs, with dependencies, risk level, and rough delivery timeline.

Subagent Model Override

For implementation execution across these phases, use:

  • zai-coding-plan/glm-4.7

Replace prior Sonnet-default subagent execution assumptions with this model for planning/implementation/review passes unless a task explicitly requires a different model.

PR Order

  1. Phase 1 PR #1 - Context levels

    • File: docs/plans/phase1-pr1-context-level-checklist.md
    • Why first: lowest-risk foundation for prompt behavior control.
    • Dependencies: none.
  2. Phase 1 PR #2 - Fast-path command registry

    • File: docs/plans/phase1-pr2-command-registry-checklist.md
    • Why second: adds deterministic low-latency command handling.
    • Dependencies: none (independent of PR #1).
  3. Phase 1 PR #3 - Memory category structure

    • File: docs/plans/phase1-pr3-memory-structure-checklist.md
    • Why third: additive memory foundation for later adaptive behavior.
    • Dependencies: none.
  4. Phase 2 PR #1 - Component registry routing

    • File: docs/plans/phase2-pr1-component-registry-checklist.md
    • Why now: enables configurable intent-to-target mapping.
    • Dependencies: ideally after Phase 1 PR #2 (shared fast-path patterns), but can run independently.
  5. Phase 2 PR #2 - Confidence-based routing

    • File: docs/plans/phase2-pr2-confidence-routing-checklist.md
    • Why after PR #1: consumes intent match outputs from component registry.
    • Dependencies: Phase 2 PR #1.
  6. Phase 2 PR #3 - History index and topic search

    • File: docs/plans/phase2-pr3-history-index-checklist.md
    • Why here: augments routing/context with historical relevance.
    • Dependencies: none hard; optional integration with Phase 2 PR #2 for confidence boost.
  7. Phase 3 PR #1 - Adaptive memory + weighted compaction

    • File: docs/plans/phase3-pr1-adaptive-memory-compaction-checklist.md
    • Why after memory structure: relies on robust memory primitives and categories.
    • Dependencies: Phase 1 PR #3.
  8. Phase 3 PR #2 - Truthfulness/policy/autonomy hardening

    • File: docs/plans/phase3-pr2-policy-autonomy-hardening-checklist.md
    • Why last: cross-cutting policy changes should land after routing/memory stabilization.
    • Dependencies: none hard; recommended final to reduce churn.

Dependency Graph (Simple)

  • Phase 1 PR #1 -> none
  • Phase 1 PR #2 -> none
  • Phase 1 PR #3 -> none
  • Phase 2 PR #1 -> (recommended after Phase 1 PR #2)
  • Phase 2 PR #2 -> Phase 2 PR #1
  • Phase 2 PR #3 -> none (optional hook into Phase 2 PR #2)
  • Phase 3 PR #1 -> Phase 1 PR #3
  • Phase 3 PR #2 -> recommended after all previous PRs

Suggested Parallelization

Parallel lane A:

  • Phase 1 PR #1 -> Phase 1 PR #3 -> Phase 3 PR #1

Parallel lane B:

  • Phase 1 PR #2 -> Phase 2 PR #1 -> Phase 2 PR #2

Parallel lane C:

  • Phase 2 PR #3 (can start after session/store migration review)

Final convergence:

  • Phase 3 PR #2

Estimated Timeline (Engineering Time)

  • Phase 1 total: ~15-21 hours
  • Phase 2 total: ~18-24 hours
  • Phase 3 total: ~16-20 hours
  • Total execution: ~49-65 hours

With 2 active lanes and normal review cadence:

  • Best case: 2-3 working weeks
  • Conservative: 3-4 working weeks

Merge Policy

  • Merge one PR per checklist file.
  • Do not batch multiple checklist PRs into one branch.
  • Re-run full quality gates each merge:
    • docs/plans/remaining-phases-rollout-quality-gates.md

State Tracking

After each merged implementation PR:

  • Update docs/plans/state.json progress/test counts.
  • Keep feature status and gap scorecard in sync.
  • Reference merged checklist file in PR description for traceability.