Compound: durable project knowledge
compound writes exactly two surfaces:
docs/solutions/<category>/<slug>.md: one learning per solved problem.CONCEPTS.mdat the repo root: one definition per project-specific term.
It does not write memory files. User/preference facts are handed to memory-update.
Auto-invoke
Fire automatically after a verified non-trivial outcome:
- "that worked"
- "it's fixed"
- "ship it"
- "merged"
- "resolved"
- "verified"
- "done"
Auto-fire is permission to evaluate, not permission to fabricate. The reject-by-default gate below still decides whether a doc is warranted.
Reject-by-default gate
A doc is earned, not assumed. All three filters must clear:
- Would I forget this? Skip baseline knowledge anyone in this codebase already carries.
- Already covered? Update an existing doc rather than duplicate it.
- Scope-qualified? A repo-specific quirk qualifies; a general programming truth does not.
If nothing clears the gate, say so in one line and exit. Never fabricate a doc.
Mode routing
Strip mode: tokens from $ARGUMENTS.
| Mode | Trigger | What it does |
|---|---|---|
| Solution (default) | none | Document one solved problem → docs/solutions/ |
| Vocabulary | when a durable, reusable project term surfaces | Reconcile CONCEPTS.md: read references/concepts.md |
| Headless | mode:headless | Non-interactive overlay on whichever mode is active |
Writing a solution doc
- Read
references/schema.yamlandassets/solution-template.md. - Classify the problem: bug or knowledge track.
- Check
docs/solutions/for duplicates by grepping frontmatter (title:,tags:,module:,component:). - Write one file:
docs/solutions/<category>/<slug>.md. - Run
python3 scripts/validate-frontmatter.py <path>until it exits 0. - Read the file back to confirm.
Writing a concept entry
- Read
references/concepts.md. - Check
CONCEPTS.mdfor an existing definition of the term. - If absent and the term clears the gate, add one entry: a one-sentence local definition and a second paragraph only for non-obvious behavioral rules.
- One definition per concept. Refresh on drift, never duplicate.
Commits
One learning per commit. Body carries an ODIN Op: trailer:
Stage only the surfaces compound wrote or edited.
Disambiguation
- vs
autolearn:autolearnextracts session learnings into memory;compounddocuments durable project knowledge into repo docs. - vs
memory-update:memory-updatewrites auto-memory about users and cross-project context.compoundnever writes memory.