RepoOps
Open the app
07 / Memory and the brain

Keep what you learned. Where the next agent reads it.

Lessons from each case, decisions with what replaced them, and a wiki whose claims are checked against the code. Agents read it through MCP and in their instruction files before they start.

A saved lesson is not proof of prevention. The store counts recurrences and guard catches, and a lesson earns its rank from them.

What it keeps

Six kinds of memory, all plain files you own.

Lessons

Each case proposes a lesson: what went wrong, the fix, and the defect it came from. A person approves it, and the review check warns when a diff repeats a known mistake. A guard blocks only after a person promotes it. Triage keeps memories too: a dismissal saved with its reason dismisses the next matching finding by rule, and the case names the memory.

Decisions

Why the team chose what it chose, with the date. A decision that a newer one replaces is labelled with the one that replaced it, so an agent never follows a retired rule.

A wiki that cites the code

A generated wiki whose claims cite their source files. A claim reads stale when its file changes after the page was checked, and red when the file is gone. Evidence is per file, not per line.

Written where agents read

The top-ranked lessons land in each repository's CLAUDE.md and AGENTS.md, ordered by recurrences prevented and held to a byte budget. The rest stay on the Lessons tab, and every agent can read the brain through MCP.

A team brain

Turn sharing on and members' lessons pool into one brain, each with the repository it came from. Sharing is off until each machine enables it, and a lesson that touches a watchlisted sensitive path stays local.

My Brain

A personal brain that connectors fill on a schedule from email, docs, the web and Slack. Everything a connector brings in is written as a proposal for review, so nothing external becomes memory unread.

Why you can trust it

Measured, gated, and yours.

100% synthetic benchmark recurrences prevented

On the synthetic accountability benchmark, RepoOps blocked all 12 recurrence attempts. The fixture and results file are committed, so the figure is auditable. It is not a customer rate.

0 external writes land silently

Everything a connector ingests is written as a proposal for review.

MCP read from any client

Your brain is plain files you own. Sync between machines is last push wins, so one machine can overwrite another.

Verified Memory

Our own brain, audited in public.

RepoOps runs its own citation checker against its own wiki and publishes the whole result here, failing rows included. No model call and no judgment: a cited file resolves at HEAD or it does not.

How receipts work

8 wiki pages

Every page of RepoOps's own Brain Wiki, from the committed snapshot.

275 claims checked

Each one a backticked source file the page cites.

0 failing, 174 stale

Failing means the cited file is gone. Stale means it changed after the page was checked, so 174 of 275 claims wait for a re-read and are not verified today.

The failing count stays at zero because the same check runs strict in a required CI job: a change that breaks a citation fails the build before it merges. A stale claim is not a failure, and it is not a verification either. It marks the page for someone to re-read, and npm run wiki-reverify records the new file versions once they have.

The full checker output, failing rows first

Snapshot at commit 83964c1a63, written by lib/wiki-verify.mjs and regenerated with npm run gen-verified-audit. This is RepoOps's own wiki, not a customer's. The desktop Wiki tab shows the same verdicts for yours.

PageCited fileLineStatus
architecture/brain-and-mcp.md.claude/brain/INDEX.mdL7stale
architecture/brain-and-mcp.md.claude/brain/decisions.mdL11stale
architecture/brain-and-mcp.md.claude/brain/errors.mdL12stale
architecture/brain-and-mcp.md.claude/brain/patterns.mdL13stale
architecture/brain-and-mcp.md.claude/brain/anti-patterns.mdL13stale
architecture/brain-and-mcp.md.claude/brain/lessons/lessons.jsonlL14stale
architecture/brain-and-mcp.md.claude/brain/open-questions.mdL17stale
architecture/brain-and-mcp.md.claude/brain/glossary.mdL17stale
architecture/brain-and-mcp.md.claude/brain/architecture-map.jsonL17stale
architecture/brain-and-mcp.md.claude/brain/taxonomy.jsonL17stale
architecture/brain-and-mcp.md.claude/brain/proposed/accepted/decisions-ids.jsonL19stale
architecture/brain-and-mcp.mdlib/routes/mirror-files.mjsL21stale
architecture/brain-and-mcp.md.claude/brain/architecture-map.htmlL21stale
architecture/brain-and-mcp.md.claude/brain/design-lessons-html-over-markdown.htmlL21stale
architecture/brain-and-mcp.mddocs/features/auto-memory.mdL23stale
architecture/brain-and-mcp.mddocs/features/brain-mcp.mdL27stale
architecture/brain-and-mcp.mddocs/features/brain-search.mdL27stale
architecture/brain-and-mcp.mdbin/mcp-brain.mjsL29stale
architecture/brain-and-mcp.mdbin/mcp-causal.mjsL40stale
architecture/brain-and-mcp.mdbin/mcp-causal.test.mjsL40stale
architecture/brain-and-mcp.mddocs/features/creator-controlled-packs.mdL50stale
architecture/brain-and-mcp.md.claude/brain/sessions/2026-05-23-main.mdL15verified
architecture/brain-and-mcp.md.claude/brain/taxonomy.schema.jsonL17verified
architecture/brain-and-mcp.mdscripts/prune-proposals.mjsL19verified
architecture/brain-and-mcp.mdbin/mcp-brain-codebase.mjsL33verified
architecture/brain-and-mcp.mdbin/mcp-brain-team.mjsL34verified
architecture/brain-and-mcp.mdbin/mcp-brain-prod.mjsL35verified
architecture/brain-and-mcp.mdbin/mcp-brain-business.mjsL36verified
architecture/brain-and-mcp.md.claude/brain/causal-links/2026-06.jsonlL40verified
architecture/brain-and-mcp.md.claude/brain/kernel-version.jsonL50verified
architecture/cli-and-daemon.mdbin/cli.mjsL7stale
architecture/cli-and-daemon.mdbin/commands/init.mjsL9stale
architecture/cli-and-daemon.mdbin/commands/doctor.mjsL11stale
architecture/cli-and-daemon.mdbin/commands/go-live.mjsL12stale
architecture/cli-and-daemon.mdbin/commands/add-repo.mjsL13stale
architecture/cli-and-daemon.mdbin/commands/verify.mjsL15stale
architecture/cli-and-daemon.mdbin/commands/conform.mjsL15stale
architecture/cli-and-daemon.mdbin/commands/bench.mjsL16stale
architecture/cli-and-daemon.mdbin/commands/blame.mjsL17stale
architecture/cli-and-daemon.mdbin/commands/connect.mjsL18stale
architecture/cli-and-daemon.mdbin/commands/enroll-secret.mjsL18stale
architecture/cli-and-daemon.mdbin/commands/sensor.mjsL19stale
architecture/cli-and-daemon.mdbin/commands/broker.mjsL20stale
architecture/cli-and-daemon.mdbin/commands/readiness.mjsL22stale
architecture/cli-and-daemon.mdbin/commands/egress-policy.mjsL23stale
architecture/cli-and-daemon.mdbin/commands/mcp-allow.mjsL24stale
architecture/cli-and-daemon.mdbin/commands/injection-eval.mjsL27stale
architecture/cli-and-daemon.mdbin/repoops-init.mjsL31stale
architecture/cli-and-daemon.mdbin/repoops-bootstrap.mjsL31stale
architecture/cli-and-daemon.mdpackages/repoops/bin/repoops-bootstrap.mjsL31stale
architecture/cli-and-daemon.md.claude/brain/features.d/daemon-runner-self-healing.mdL61stale
architecture/cli-and-daemon.md.claude/brain/features.d/daemon-self-update.mdL62stale
architecture/cli-and-daemon.md.claude/brain/features.d/daemon-control-log-rotation.mdL64stale
architecture/cli-and-daemon.md.claude/brain/features.d/daemon-raw-push-producer.mdL65stale
architecture/cli-and-daemon.md.claude/brain/decisions.mdL71stale
architecture/cli-and-daemon.md.claude/brain/features.d/daemon-service-installer.mdL75stale
architecture/cli-and-daemon.md.claude/brain/features.d/daemon-installer-surfaces.mdL75stale
architecture/cli-and-daemon.mdbin/commands/run.mjsL10verified
architecture/cli-and-daemon.mdbin/commands/remove.mjsL14verified
architecture/cli-and-daemon.mdbin/commands/secrets.mjsL21verified
architecture/cli-and-daemon.mdbin/commands/nhi.mjsL22verified
architecture/cli-and-daemon.mdbin/commands/mcp-scan.mjsL24verified
architecture/cli-and-daemon.mdbin/commands/redteam-mcp.mjsL24verified
architecture/cli-and-daemon.mdbin/commands/memory.mjsL25verified
architecture/cli-and-daemon.mdbin/commands/skills.mjsL26verified
architecture/cli-and-daemon.mdbin/commands/import-git-ai.mjsL28verified
architecture/cli-and-daemon.mdbin/commands/fde.mjsL29verified
architecture/cli-and-daemon.mdbin/repoops-install.test.mjsL31verified
architecture/cli-and-daemon.mdlib/accountability-live.mjsL51verified
architecture/cli-and-daemon.md.claude/brain/sessions/2026-06-29-daemon-concurrency-streaming.mdL59verified
architecture/cli-and-daemon.md.claude/brain/sessions/2026-06-29-daemon-push-resilience.mdL60verified
architecture/cli-and-daemon.md.claude/brain/sessions/2026-06-29-daemon-runner-self-healing.mdL61verified
architecture/cli-and-daemon.md.claude/brain/features.d/daemon-staleness-alerting.mdL63verified
architecture/cli-and-daemon.md.claude/brain/features.d/daemon-observability.mdL64verified
architecture/cli-and-daemon.md.claude/brain/sessions/2026-06-28-daemon-service-installer.mdL79verified
architecture/cli-and-daemon.md.claude/brain/sessions/2026-06-28-daemon-installer-surfaces.mdL79verified
architecture/data-and-schema.md.claude/brain/decisions.mdL3stale
architecture/data-and-schema.mdbin/db/schema.mjsL9stale
architecture/data-and-schema.md.claude/brain/schema.mdL10stale
architecture/data-and-schema.mdbin/db/migrations/meta/_journal.jsonL16stale
architecture/data-and-schema.mdlib/graph/graph-store.mjsL41stale
architecture/data-and-schema.md.claude/brain/errors.mdL49stale
architecture/data-and-schema.md.claude/brain/patterns.mdL55stale
architecture/data-and-schema.md.claude/brain/glossary.mdL55stale
architecture/data-and-schema.md.claude/brain/taxonomy.jsonL56stale
architecture/data-and-schema.md.claude/brain/lessons/lessons.jsonlL57stale
architecture/data-and-schema.mdlib/routes/mirror-files.mjsL60stale
architecture/data-and-schema.mddocs/features/cloud-raw-fidelity-store.mdL64stale
architecture/data-and-schema.mdbin/db/migrations/meta/0000_snapshot.jsonL16verified
architecture/data-and-schema.mdbin/db/migrations/0000_init.sqlL22verified
architecture/data-and-schema.mdbin/db/migrations/0001_keval_trace_model.sqlL23verified
architecture/data-and-schema.mdbin/db/migrations/0002_keval_eval_suites.sqlL24verified
architecture/data-and-schema.mdbin/db/migrations/0003_keval_source_tool.sqlL25verified
architecture/data-and-schema.mdbin/db/migrations/0004_perf_indexes.sqlL26verified
architecture/data-and-schema.mdbin/db/migrations/0005_telemetry_daily_rollup.sqlL27verified
architecture/data-and-schema.mdbin/db/migrations/0006_rate_limits.sqlL28verified
architecture/data-and-schema.mdbin/db/migrations/0007_daily_rollup.sqlL29verified
architecture/data-and-schema.mdbin/db/migrations/0008_provider_credentials.sqlL30verified
architecture/data-and-schema.mdbin/db/migrations/0009_graph_store.sqlL31verified
architecture/data-and-schema.mdbin/db/migrations/meta/0005_snapshot.jsonL33verified
architecture/data-and-schema.md.claude/brain/taxonomy.schema.jsonL56verified
architecture/data-and-schema.md.claude/brain/causal-links/2026-06.jsonlL57verified
architecture/overview.mdserver.mjsL7stale
architecture/overview.md.claude/brain/architecture-map.jsonL9stale
architecture/overview.mdCHANGELOG.mdL9stale
architecture/overview.md.claude/brain/runtime.mdL9stale
architecture/overview.md.claude/brain/errors.mdL13stale
architecture/overview.mddocs/features/neon-retention-cron.mdL13stale
architecture/overview.mdbin/db/schema.mjsL15stale
architecture/overview.mdbin/cli.mjsL19stale
architecture/overview.md.claude/brain/features.d/daemon-self-update.mdL19stale
architecture/overview.md.claude/brain/features.d/daemon-raw-push-producer.mdL19stale
architecture/overview.md.claude/brain/features.d/daemon-service-installer.mdL19stale
architecture/overview.mddocs/features/cloud-capture-daemon.mdL19stale
architecture/overview.mddocs/features/hosted-company-repo-rollup.mdL23stale
architecture/overview.mddocs/features/cloud-raw-fidelity-store.mdL23stale
architecture/overview.mddocs/deploy/hosted-mcp.mdL23stale
architecture/overview.md.claude/brain/decisions.mdL23stale
architecture/overview.mdbin/mcp-brain.mjsL27stale
architecture/overview.mdbin/mcp-causal.mjsL27stale
architecture/overview.mddocs/features/brain-mcp.mdL27stale
architecture/overview.mddocs/features/hosted-mcp.mdL27stale
architecture/overview.mddocs/audits/server-mjs-module-map.mdL7verified
architecture/overview.mddocs/architecture.mdL7verified
architecture/overview.md.claude/brain/features.d/daemon-concurrency-streaming.mdL19verified
architecture/overview.md.claude/brain/features.d/daemon-push-resilience.mdL19verified
architecture/overview.md.claude/brain/features.d/daemon-staleness-alerting.mdL19verified
architecture/overview.md.claude/brain/features.d/daemon-observability.mdL19verified
architecture/overview.mddocs/features/hosted-dashboard.mdL23verified
architecture/overview.mddocs/features/hosted-full-parity.mdL23verified
architecture/overview.mddocs/features/cloud-server-side-repo-content.mdL23verified
architecture/overview.mddocs/deploy/hosted-loop-runner.mdL23verified
architecture/overview.mdbin/mcp-brain-codebase.mjsL27verified
architecture/overview.mdbin/mcp-brain-team.mjsL27verified
architecture/overview.mdbin/mcp-brain-business.mjsL27verified
architecture/overview.mdbin/mcp-brain-prod.mjsL27verified
features/catalog.md.claude/brain/features.mdL5stale
features/catalog.mddocs/features/cna-agent-trust-score.mdL9stale
features/catalog.mddocs/features/cost-per-outcome.mdL13stale
features/catalog.mddocs/features/financial-model-feature.mdL17stale
features/catalog.mddocs/features/hosted-company-repo-rollup.mdL21stale
features/catalog.mddocs/features/company-rollup-alias-cost.mdL21stale
features/catalog.mddocs/features/company-rollup-cost-risk-columns.mdL21stale
features/catalog.md.claude/brain/features.d/mybrain-ask-pwa.mdL25stale
features/catalog.md.claude/brain/features.d/mybrain-capture.mdL25stale
features/catalog.md.claude/brain/features.d/mybrain-connectors.mdL25stale
features/catalog.md.claude/brain/features.d/mybrain-consumer-identity.mdL25stale
features/catalog.md.claude/brain/features.d/mybrain-hosted-ask.mdL25stale
features/catalog.mddocs/features/portable-personal-brain.mdL25stale
features/catalog.md.claude/brain/features.d/portable-personal-brain.mdL25stale
features/catalog.mddocs/features/creator-controlled-packs.mdL29stale
features/catalog.md.claude/brain/features.d/mybrain-creator-brain-packs.mdL29stale
features/catalog.mdCHANGELOG.mdL33stale
features/catalog.md.claude/brain/decisions.mdL43stale
features/catalog.md.claude/brain/errors.mdL43stale
features/catalog.mddocs/features/cloud-native-accountability.mdL9verified
features/catalog.mddocs/features/cna-agent-registry.mdL9verified
features/catalog.mddocs/features/cna-public-verification.mdL9verified
features/catalog.mddocs/features/cna-evidence-pack.mdL9verified
features/catalog.mddocs/features/cna-14-fleet-killswitch.mdL9verified
features/catalog.mddocs/features/cna-29-transparency-log.mdL9verified
features/catalog.mddocs/features/loop-economics-scorecard.mdL13verified
features/catalog.mddocs/features/cost-spec-gap.mdL13verified
features/catalog.mddocs/features/cc-undelegated-reads.mdL13verified
features/catalog.mddocs/features/financial-model-guard.mdL17verified
features/catalog.mddocs/features/company-rollup-control-learn.mdL21verified
features/catalog.mddocs/features/cross-repo-controls.mdL21verified
operations/agents-and-workflows.mdAGENTS.mdL3stale
operations/agents-and-workflows.md.claude/brain/decisions.mdL5stale
operations/agents-and-workflows.md.claude/brain/errors.mdL5stale
operations/agents-and-workflows.mdCLAUDE.mdL9stale
operations/agents-and-workflows.md.claude/agents/pr-shipper.mdL13stale
operations/agents-and-workflows.md.claude/agents/drift-auditor.mdL16stale
operations/agents-and-workflows.md.claude/agents/brand-cop.mdL17stale
operations/agents-and-workflows.md.claude/agents/cost-impact-auditor.mdL18stale
operations/agents-and-workflows.md.claude/agents/dedup-scout.mdL19stale
operations/agents-and-workflows.md.claude/agents/perf-profiler.mdL20stale
operations/agents-and-workflows.md.claude/agents/security-reviewer.mdL21stale
operations/agents-and-workflows.md.claude/agents/session-briefer.mdL22stale
operations/agents-and-workflows.md.claude/agents/twin-syncer.mdL23stale
operations/agents-and-workflows.md.claude/skills/ship-feature/SKILL.mdL29stale
operations/agents-and-workflows.md.claude/skills/autoresearch/SKILL.mdL32stale
operations/agents-and-workflows.md.claude/skills/design-system/SKILL.mdL32stale
operations/agents-and-workflows.md.claude/skills/documentation/SKILL.mdL32stale
operations/agents-and-workflows.md.claude/skills/karpathy-guidelines/SKILL.mdL32stale
operations/agents-and-workflows.md.claude/skills/loop-spec/SKILL.mdL32stale
operations/agents-and-workflows.md.claude/skills/preview-check/SKILL.mdL32stale
operations/agents-and-workflows.md.claude/skills/register-kind/SKILL.mdL32stale
operations/agents-and-workflows.md.claude/skills/remotion/SKILL.mdL32stale
operations/agents-and-workflows.md.claude/workflows/perf-audit.jsL43stale
operations/agents-and-workflows.md.claude/workflows/truth-audit.jsL44stale
operations/agents-and-workflows.md.claude/workflows/weekly-truth-audit.jsL45stale
operations/agents-and-workflows.md.claude/workflows/feature-completeness-audit.jsL47stale
operations/agents-and-workflows.md.claude/workflows/competitor-trend-scan.jsL49stale
operations/agents-and-workflows.md.claude/skills/stripe-best-practices/SKILL.mdL33verified
operations/agents-and-workflows.md.claude/skills/stripe-best-practices/references/billing.mdL33verified
operations/agents-and-workflows.md.claude/skills/stripe-projects/SKILL.mdL33verified
operations/agents-and-workflows.md.claude/skills/upgrade-stripe/SKILL.mdL33verified
operations/agents-and-workflows.md.claude/workflows/drift-sweep.jsL39verified
operations/agents-and-workflows.md.claude/workflows/brand-sweep.jsL42verified
operations/agents-and-workflows.md.claude/workflows/truth-audit-docs-tail.jsL46verified
operations/agents-and-workflows.md.claude/workflows/launch-audit.jsL48verified
operations/agents-and-workflows.md.claude/workflows/ship-program.jsL50verified
operations/agents-and-workflows.md.claude/workflows/tab-migrate.jsL51verified
operations/agents-and-workflows.md.claude/brain/sessions/2026-06-28-homepage-truth-audit.mdL53verified
operations/agents-and-workflows.mddocs/features/anti-drift-registries.mdL53verified
operations/ci-and-shipping.md.claude/brain/decisions.mdL3stale
operations/ci-and-shipping.md.claude/brain/errors.mdL3stale
operations/ci-and-shipping.md.github/workflows/ci.ymlL5stale
operations/ci-and-shipping.mdCHANGELOG.mdL7stale
operations/ci-and-shipping.md.github/workflows/eval-gate.ymlL11stale
operations/ci-and-shipping.md.github/workflows/loop-evals.ymlL11stale
operations/ci-and-shipping.md.github/workflows/cost-audit.ymlL12stale
operations/ci-and-shipping.md.github/workflows/brain-reflect.ymlL14stale
operations/ci-and-shipping.md.github/workflows/publish-npm.ymlL15stale
operations/ci-and-shipping.md.github/workflows/release.ymlL15stale
operations/ci-and-shipping.md.github/workflows/merge-queue.ymlL21stale
operations/ci-and-shipping.md.github/workflows/merge-gate.ymlL22stale
operations/ci-and-shipping.md.github/workflows/auto-queue-label.ymlL23stale
operations/ci-and-shipping.mdbin/ship-check.mjsL33stale
operations/ci-and-shipping.md.github/workflows/ship-check.ymlL35stale
operations/ci-and-shipping.md.claude/skills/ship-feature/SKILL.mdL37stale
operations/ci-and-shipping.mdbin/review-check.mjsL39stale
operations/ci-and-shipping.md.claude/brain/sessions/2026-06-25-ci-resilience-process-fixes.mdL7verified
operations/ci-and-shipping.md.github/workflows/tab-runtime.ymlL13verified
operations/ci-and-shipping.mdscripts/check-tab-runtime.mjsL13verified
operations/ci-and-shipping.mdCHANGELOG.d/README.mdL29verified
operations/ci-and-shipping.md.claude/brain/sessions/2026-06-25-changelog-assembler-hardening.mdL31verified
operations/ci-and-shipping.md.claude/brain/sessions/2026-07-02-changelog-fragment-hygiene.mdL31verified
operations/ci-and-shipping.md.claude/brain/sessions/2026-05-30-phase-7-t5-ship-check.mdL35verified
quickstart.mdbin/cli.mjsL7stale
quickstart.mdONBOARDING.mdL7stale
quickstart.mdREADME.mdL7stale
quickstart.mdpackage.jsonL7stale
quickstart.mdCLAUDE.mdL7stale
quickstart.mdbin/commands/init.mjsL15stale
quickstart.mdbin/commands/add-repo.mjsL15stale
quickstart.mdbin/commands/doctor.mjsL15stale
quickstart.mdbin/commands/verify.mjsL15stale
quickstart.mdbin/commands/conform.mjsL15stale
quickstart.mdbin/commands/go-live.mjsL15stale
quickstart.mdbin/repoops-init.mjsL15stale
quickstart.mdbin/db/schema.mjsL16stale
quickstart.mddocs/deploy/hosted-mcp.mdL18stale
quickstart.md.claude/brain/INDEX.mdL19stale
quickstart.md.claude/brain/decisions.mdL19stale
quickstart.mdbin/mcp-brain.mjsL19stale
quickstart.md.claude/brain/brain-search.mdL23stale
quickstart.md.claude/brain/brain-mcp.mdL23stale
quickstart.md.claude/brain/taxonomy.jsonL23stale
quickstart.md.claude/brain/immune-ladder.jsonL23stale
quickstart.md.claude/brain/errors.mdL25stale
quickstart.md.claude/agents/pr-shipper.mdL29stale
quickstart.md.claude/agents/security-reviewer.mdL29stale
quickstart.md.claude/agents/drift-auditor.mdL29stale
quickstart.md.claude/workflows/truth-audit.jsL29stale
quickstart.md.github/workflows/ci.ymlL29stale
quickstart.md.github/workflows/merge-queue.ymlL29stale
quickstart.md.github/workflows/ship-check.ymlL29stale
quickstart.md.github/workflows/publish-npm.ymlL29stale
quickstart.md.claude/brain/features.mdL43stale
quickstart.mdbin/commands/run.mjsL15verified
quickstart.mdbin/commands/remove.mjsL15verified
quickstart.mdbin/db/migrations/0000_init.sqlL16verified
quickstart.md.claude/brain/features.d/daemon-concurrency-streaming.mdL17verified
quickstart.md.claude/brain/features.d/daemon-observability.mdL17verified
quickstart.md.claude/brain/features.d/daemon-push-resilience.mdL17verified
quickstart.mddocs/features/hosted-dashboard.mdL18verified
quickstart.mddocs/features/hosted-full-parity.mdL18verified
quickstart.mddocs/deploy/hosted-loop-runner.mdL18verified
quickstart.mdbin/mcp-brain-codebase.mjsL19verified
quickstart.mdbin/mcp-brain-team.mjsL19verified
quickstart.mdbin/mcp-brain-prod.mjsL19verified
quickstart.mdbin/mcp-brain-business.mjsL19verified
quickstart.md.claude/workflows/ship-program.jsL29verified
One lesson, spelled out

From the mistake to the signed pack.

A real RepoOps lesson, stage by stage. Each stage names the file you can open to check it.

01 The mistake

On 2026-05-29 a session merged six pull requests from isolated worktrees, and the shared checkout the IDE had open never pulled. The operator opened TODO.md and saw every box still unticked: a day's work looked like it never happened.

What the operator saw
## Accountability Loop
- [ ] A0a ...
- [ ] A0b ...   <- all merged remotely,
- [ ] A0c ...      invisible locally

02 The mistake is written down

The failure went into .claude/brain/errors.md the same day: the symptom, the two-layer cause, the fix, and a rule with a test any session can run.

From .claude/brain/errors.md, condensed
Prevention rule: "Done" means the user can see it
in their IDE without doing anything.
Test: git -C <shared-checkout> rev-parse HEAD must equal
rev-parse origin/main.

03 The lesson is minted

The record became a lesson row in .claude/brain/lessons/lessons.jsonl: a trigger, the fix, a pointer back to the errors.md entry, and outcome counters that record what happened after it was written.

The lesson row, condensed
{
  "id": "lesson-36894f7c5ddc7f38",
  "trigger": "End of build-phase ritual without
    fast-forwarding the shared canonical checkout",
  "source_defect": { "file": ".claude/brain/errors.md" },
  "times_recurred": 0
}

04 Placed where sessions read it

The fix became step 10b of the completion ritual in CLAUDE.md, which every session reads before it works. lib/agent-md-blocks.mjs pins the top lessons below it; this one's counters read zero, so it stays in the store.

The block format lib/agent-md-blocks.mjs writes
Active lessons from RepoOps. Do not hand-edit;
managed by lib/agent-md-blocks.mjs.

### Lesson <id>: <trigger, first line>
**What went wrong.** ...
**Fix.** ...

05 The claim earns a receipt

The wiki page that documents the lessons store cites it, and the strict citation gate in CI resolves that citation on every commit. So the claim carries a receipt: the file, the line, its status and the commit it was checked at.

The receipt from the current audit
page:   architecture/brain-and-mcp.md
source: .claude/brain/lessons/lessons.jsonl
line:   L14
status: stale
commit: 83964c1a63

06 The signed pack

A brain pack passes each lesson through the transfer redaction profile, hashes every item, and is signed with ed25519. The installer verifies the signature or writes nothing, and a verified install lands held for review.

What an install verifies
signature:  VERIFIED ed25519
items:      each carries kind + sha256 content_hash
redaction:  transfer profile
landing:    HELD for review

Start with one question: what happened in this change?

Follow a sample case from the instruction to the lesson it left, then install RepoOps and let the first run seed your brain from what your repos already say.