This guide describes the practical team path for keeping .brain/ changes reviewable and useful instead of turning them into another source of noisy repo churn.
- Fix a real issue or complete a meaningful task.
- Capture the durable lesson with
brain extract,brain extract-commit, or hook-driven candidate extraction. - Review
.brain/changes the same way you review code changes. - Approve only the memories that are still correct, specific, and worth reusing.
- Commit the
.brain/change with the related code change whenever the knowledge belongs with that code.
- Keep
injectautomatic or easy to run because it is read-only. - Keep
extractreviewable because it writes durable repo knowledge. - Prefer specific lessons over generic advice.
- Reject temporary debugging notes unless they will matter again later.
- Treat
.brain/as shared project knowledge, not as personal scratch space.
- Run
brain review. - Approve the candidates that still look durable.
- Inspect the generated markdown under
.brain/. - Run
brain share <memory-id>orbrain share --all-active. - Copy the suggested
git addandgit commitcommands. - Open the PR with both code and
.brain/changes when they belong together.
Good examples:
- architecture decisions with rationale
- repo-specific gotchas that are easy to repeat
- conventions that future agents should follow
- reusable implementation or workflow patterns
Bad examples:
- one-off debugging transcripts
- local environment noise that will not matter later
- generic advice that already exists in common tooling docs
- broad notes that do not point to a clear repo-specific lesson
Before approving a memory, ask:
- Is it specific to this repo or this team's workflow?
- Will it still help in a later session?
- Is the scope narrow enough to avoid noisy injection?
- Does it duplicate or conflict with an existing memory?
- Would I be comfortable seeing this injected into the next coding session?
Run these before a release or before sharing a large memory batch:
brain audit-memory
brain sweep --dry-run
brain scoreUse the release checklist in release-checklist.md when preparing a public package or first release.