Skip to content

How it compounds

Flow-Next gets better as you use it. Memory, glossary, decision records, strategy, and the feature map compound as side-effects of the workflow you already run. There is no manual “compound” / “refresh” / “reindex” ceremony, by design: improvement that depends on remembering an extra command doesn’t happen.

Every self-improving surface has the same lifecycle - seeded once, grown by the skills where new knowledge actually surfaces, read back where it pays, and pruned by the audit sweep:

SurfaceSeeded byGrows throughRead byPruned by
Memory (.flow/memory/)flowctl memory init (opt-in)Worker auto-capture on NEEDS_WORK → SHIP; Ralph writes the same entries autonomouslymemory-scout during planning; worker re-anchor before each task/flow-next:audit - Keep / Update / Consolidate / Replace / Delete / Harden per entry
Glossary (GLOSSARY.md)/flow-next:prime - repo scan, read-back gated/flow-next:interview + /flow-next:capture term addsPlan scouts, worker re-anchor, review prompts (task-relevant terms only)/flow-next:audit - staleness + alias creep
Decision records (.flow/memory/knowledge/decisions/)- (accrete from work)/flow-next:capture strategy-override prompts; interview + review cyclesmemory-scout during planning/flow-next:audit - supersede-not-delete
Strategy (STRATEGY.md)/flow-next:strategyDrift surfaced read-only by plan / capture / sync - updates stay human-confirmed/flow-next:prospect, plan (## Strategy Alignment), interview, capture/flow-next:strategy (the only writer)
Feature map (.flow/features/)/flow-next:features - seeds when the directory is absentThe maintain pass on the same command: source readers plus one live drive of every feature/flow-next:qa and Drive - navigation, preconditions, gotchas/flow-next:features maintain - clean / changed / blocked

An opt-in, categorized store (bug and knowledge tracks) that survives context compaction. The write moment is the review loop: when an implementation review goes NEEDS_WORK → SHIP, the worker captures the problem, root cause, fix, and prevention as a structured bug-track entry - in Ralph mode this happens with nobody watching. Overlap detection merges duplicates at write time, so capture carries no dedup burden.

Reads happen where they pay: memory-scout feeds planning, and the worker re-anchor pulls module-relevant entries before touching code. /flow-next:audit is the garbage collector - it walks entries against the current codebase and keeps, updates, consolidates, replaces, or deletes each one. It is also the graduation path: a lesson that keeps recurring and is mechanizable can be hardened into an enforced gate, so it stops being context the agent re-reads and starts being a check that fires on its own. A recurring lesson no gate can check gets the other repair: the audit fixes the entry’s title, tags, module, and filing so the search that should have surfaced it does. Migrating an older flat-file store: /flow-next:memory-migrate.

Wrong-meaning-of-a-normal-word errors get built into plans and code - an agent that quietly conflates two project terms produces a correct-looking implementation of the wrong concept. The glossary loop closes that:

  • Seed - /flow-next:prime bootstraps GLOSSARY.md from the repo’s load-bearing nouns, with file-reference evidence and a read-back before anything is written. On an already-populated glossary it reports coverage and never rewrites.
  • Add - /flow-next:interview and /flow-next:capture offer term adds when genuinely new vocabulary surfaces in conversation, consent-gated at read-back.
  • Read - plan scouts, the work worker’s re-anchor, and review prompts pull task-relevant terms (budget-capped - never the whole file).
  • Prune - /flow-next:audit checks every term against the current code as part of its normal sweep.

Load-bearing architectural choices land in .flow/memory/knowledge/decisions/ at the moment they’re made - for example, /flow-next:capture proposes a decision record when a spec deliberately overrides an active strategy track. Audit treats decisions specially: Replace is supersede-not-delete, so the historical trail of why stays intact.

STRATEGY.md is read by the skills that need direction - /flow-next:prospect’s candidate filter, /flow-next:plan’s ## Strategy Alignment section, interview and capture conflict surfacing - and the same reads keep it honest: drift between the doc and what’s actually being built is flagged read-only, never auto-superseded. The human stays the editor via /flow-next:strategy.

A committed user-POV drive directory (.flow/features/, beside .flow/memory/) recording how a user reaches each user-facing feature, how an agent drives it, and which traps waste a verification run. It is the layer that stops live verification re-deriving navigation every time: the spec still supplies this run’s acceptance criteria, and live captured evidence remains the only basis for a ship verdict.

  • Seed - /flow-next:features when .flow/features/ is absent: interview the repo, prove every route with one live drive, write the index plus one four-H2 file per proven feature. Nothing undriven lands.
  • Grow - the audit-shaped maintain pass on the same command once the map exists: index hygiene, one read-only source reader per feature, reconcile, one live pass over every feature even when source looks clean, then triage into doc drift (fix the map), harness gap (fix the owned harness and re-drive), or product bug (report it, keep it out of the PR).
  • Read - /flow-next:qa and Drive consume it by existence check, with no config key. An absent map leaves both exactly as they are today.
  • Prune - that same maintain pass, ending clean (no branch, no PR), changed (one chore PR of proven map and owned-harness corrections), or blocked (naming what blocked).

Unlike /flow-next:map’s local .clawpatch/ code index, this map is committed: its whole value is surviving the session and the machine. Full behavior on the Features skill page.

Each loop’s write moment is embedded in a step that already happens. Prime runs once per repo. Interviews and captures happen when specs are born. Reviews happen before merge. Audits run when memory is consulted and found wanting.

The feature map is the deliberate exception, and it is scoped: its consumption is ambient - QA and drive read it, and QA files drift memos, during work that already happens - while its maintenance is human-cadenced, invoked by you or your host loop and never by a pipeline stage. Those drift memos are what keep the exception honest: a forgotten cadence degrades loudly, because the next maintain pass opens on a queue of them.

Contrast with workflows that require a manual “compound” or “refresh” pass: those degrade silently the day the operator forgets. Flow-Next’s surfaces degrade toward pruning - audit and the feature-map maintain pass remove what’s stale - rather than toward staleness, where nothing has been added since the last ceremony.