Using ana-learn
Findings accumulate. Learn tends them — closing what’s resolved, promoting recurring patterns into skill rules, and routing what needs engineering work back to Think. Run it between pipeline cycles.
Starting a session
Learn reads the proof chain, checks staleness, and presents the orientation — the severity/action cross-tab that tells you the shape of work, recent proofs, and how many findings are stale. When a previous session exists, --new filters to findings since the last session so you can focus on what changed. Then it recommends a direction:
- Cleanup — 12 stale findings to triage. Quick verifications, highest closure rate.
- Highest-impact — 3 risk/scope findings to review. These may need engineering work.
- Recent findings — 9 new findings from the last 3 proofs.
Learn recommends based on the data: high stale count suggests cleanup first, risk findings suggest highest-impact. You pick the focus or redirect. Nothing executes without your sign-off. (For monorepos, proof health --surface cli and proof audit --surface cli scope triage to a single surface.)
The "anything you've noticed?" prompt isn't rhetorical. If you say "auth calls are slow" or "why does this pattern keep appearing," Learn traces it: missing skill rule? Curation gap where Plan doesn't load the skill? A bug that needs its own scope? Observations can surface at any point, not just at session start.
Triage: close and keep
For each finding, Learn extracts the claim, verifies it against current code, and recommends an action. A real example from the chain:
findProjectRoot checks for .ana/ directory existence, not .ana/ana.json. A stale directory causes false root detection.Learn verified the code changed, confirmed the finding no longer applies, and recommended closure with a specific reason. Every close reason describes what was checked — not "resolved" but exactly what changed and where.
Findings that are still real get a keep with an exit condition: "Keep until test coverage for work.ts exceeds threshold" or "Keep for 3 more pipeline runs, then re-evaluate." When Learn can't determine resolution — code changed but the effect is ambiguous — it says so and asks you to verify manually.
Staleness detection
The fastest part of triage. ana proof stale pre-identifies findings whose referenced files were modified by later pipeline runs — likely resolved without anyone explicitly closing them.
Staleness is a signal, not proof. Learn reads the code before recommending closure — a file being modified doesn't mean the specific issue was fixed.
Promote and strengthen
When a pattern recurs across multiple proofs, it belongs in a skill rule. Three conditions:
- The finding describes a pattern, not a one-off bug
- The pattern would have been caught earlier if the skill had the right rule
- The rule can be stated in one sentence
Two operations:
Both commands handle the full workflow: stage the skill file and proof chain, commit, push. The finding transitions from active to promoted. The rule reaches Build through Plan's Build Brief on the next pipeline run.
On the next pipeline run touching the same code, Plan includes the promoted rule in the Build Brief. Build follows it. Verify doesn't re-find the same issue. That's the loop.
One other terminal state: ana proof close for resolved findings.
The session delta
After executing approved actions, Learn re-reads the chain and reports the impact:
At wrap-up, Learn runs ana learn end to set the session boundary. The next session will know what's new since this point.
If actionable work remains — scope-action findings, real debt, recurring patterns that need code fixes before they can become rules — Learn drafts a prompt for Think that synthesizes the remaining work.