You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Written by Minimax-M2.7 in Claude Code Harness.
Shifts the reasoning boundary: Python handles mechanical filing
(cluster, extract, stage, heuristic prefilter, decay, archive).
The host agent (Claude Code, Codex, Cursor, Windsurf) handles
validation via CLI tools using the LLM it already has. The brain
is no longer coupled to a specific provider SDK.
Key modules
- memory/auto_dream.py: staging-only dream cycle. No validation,
no graduation, no git commit. Safe on Stop hooks or cron.
- memory/validate.py: heuristic prefilter (length + exact
duplicate against accepted lessons). Deterministic, no LLM.
- memory/review_state.py: candidate lifecycle (staged/provisional/
accepted/rejected/superseded) + append-only decision log.
Stamps evidence + lessons hash at decision time so re-stage
only fires on real change, not churn.
- memory/render_lessons.py: lessons.jsonl as source of truth;
LESSONS.md rendered from it with sentinel-preserved user
content. Auto-migrates legacy bullets on first run; dedupes
by lesson id (handles provisional -> accepted transitions).
- memory/cluster.py: proper single-linkage Jaccard clustering
with bridge-merge; claim+conditions-stable pattern ids.
- memory/promote.py: re-stage gate keyed on NEW evidence and
specific-blocker presence, not reviewer identity or whole-file
hashes. Decay-only evidence shrinkage doesn't churn. Full
lifecycle respects all three subdirs (staged/rejected/graduated).
- harness/context_budget.py: query-aware retrieval filtered to
status=accepted only; loads AGENTS.md, DECISIONS.md,
REVIEW_QUEUE.md per the stated read order.
- harness/llm.py: used only by standalone conductor path; the
memory layer does not import it.
- harness/text.py: shared word_set + jaccard.
- harness/hooks/_provenance.py: source metadata on every
episodic entry (confidence, source{skill, run_id, commit_sha},
evidence_ids).
- tools/{list_candidates,graduate,reject,reopen}.py: host-agent
CLI. graduate.py requires --rationale and is atomic: lessons
write first, candidate move last. --supersedes exempts the
target lesson from the duplicate check.
Workflow notes
- Same pattern across cluster membership changes keeps the same
id and lifecycle history.
- Accepted lessons are terminal. Provisional acceptances re-enter
review when new evidence arrives.
- Rejected candidates re-enter review only when evidence grows
OR the specific blocking lesson disappears.
- Provisional supersessions do not strike the active lesson
until the superseder is itself accepted.
- Retrieval filters to accepted lessons only; empty filter
returns empty rather than leaking raw markdown.
Not tracked (stays per-user)
- memory/personal/PREFERENCES.md
- memory/working/* (WORKSPACE.md, REVIEW_QUEUE.md)
- memory/episodic/AGENT_LEARNINGS.jsonl
- memory/candidates/ (transient)
- memory/semantic/lessons.jsonl (grows from graduations)
0 commit comments