brain-bootstrap
Seed a freshly-scaffolded brain with real project knowledge — on an existing (brownfield) project read the code, docs, and git log to draft the six root pages…
Operating manual for reading and writing a project's brain — every read and write goes through the bundled zero-dependency `brain` CLI; never hand-edit brain files. Read it before creating or modifying any page or root page.
$ npx -y skills add mindmuxai/brain.md --skill brain-page --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/brain-pageContext preview
The summary Claude sees to decide when to auto-load this skill.
Operating manual for reading and writing a project's brain — every read and write goes through the bundled zero-dependency `brain` CLI; never hand-edit brain files. Read it before creating or modifying any page or root page.
name: brain-page description: Operating manual for reading and writing a project's brain — every read and write goes through the bundled zero-dependency `brain` CLI; never hand-edit brain files. Read it before creating or modifying any page or root page.
This skill is the operating manual for working with a project's brain under the **Open Project Brain Standard**. The protocol overview lives in the project's root `BRAIN.md`; here we expand the category taxonomy and the exact command for every operation.
The model is simple: **everything goes through the `brain` CLI.**
> **NEVER hand-edit any file under the brain directory. All reads and writes MUST go through the `brain` CLI. Manual edits are unsupported and illegitimate.** Correctness is guaranteed by construction inside the CLI — there is no validator, and nothing at the file layer can catch or undo a bad manual edit, so a hand edit silently breaks the brain's invariants. Always reach for a `brain` subcommand instead of an editor.
The CLI ships inside this skill bundle at `bin/brain.mjs`. It is zero-dependency Node (ESM) — run it directly:
node <this-skill-bundle>/bin/brain.mjs <subcommand> [flags]
Resolve `<this-skill-bundle>` to the directory this `SKILL.md` lives in. In the brain.md source repository itself that path is `skills/brain-page/bin/brain.mjs`; when the skill is installed globally it is wherever `setup` linked it (e.g. `~/.claude/skills/brain-page/bin/brain.mjs`). Run all commands from the **project root**.
The CLI resolves the brain directory itself: it reads `brainRoot` from `./.mindmux/preferences.json` when present (absolute or relative to the project root), otherwise falls back to `./brain`. A missing file, broken JSON, or absent field all fall back silently. Run `brain brain-dir` to see the resolved directory and its source.
Run `node <bundle>/bin/brain.mjs help` for the full flag reference.
Define a shell function (do **not** use `BRAIN="node <bundle>/bin/brain.mjs"; $BRAIN …` — `VAR="node x"; $VAR` only word-splits in bash; zsh, macOS's default shell, treats `node /…/brain.mjs` as a single command name and fails with `exit 127`. A function is portable across bash and zsh, so keep this form):
brain() { node <bundle>/bin/brain.mjs "$@"; }
brain init # ensure BRAIN.md, scaffold empty brain, default-wire CLAUDE.md + AGENTS.md
brain wire # default wire both agent config files (optional --agent subset / all)
brain install-hooks # opt-in Claude Code SessionStart snapshot (project-local .claude/settings.json)
brain uninstall-hooks # remove that SessionStart hook
brain install-hooks --agent codex # Codex project-local hooks.json; startup/resume/compact
brain uninstall-hooks --agent codex # remove only the Codex hook
brain brain-dir # print the resolved brain directory + its source (brainRoot / default)
brain list-pages # list every page: id / title / category / status
brain read-page <id> # print brain/pages/<id>.md
brain read-root <slug> # print a root page brain/<slug>.mdEach page's `category` must be one of:
| category | boundary (what to write) | typical compiled_truth structure | |---|---|---| | `project` | The state and intent of a self-contained piece of work / sub-project / module — the part that can't be read straight from the code | goal, scope, current status, key constraints | | `concept` | A concept / term / mechanism that needs a shared, lasting understanding | definition, why it's this way, boundaries and counter-examples | | `decision` | An established judgment and its reasoning (the most common) | what was decided, alternatives, rationale, blast radius | | `person` | A relevant person / role, their preferences and responsibilities | who they are, what they care about, collaboration conventions | | `reference` | An external resource / object of analysis worth keeping | what it is, key takeaways, links, implications for this project |
When in doubt, most knowledge lands in `decision` or `concept`.
Assume the `brain` shell function defined above (`brain() { node <bundle>/bin/brain.mjs "$@"; }`) and that you are in the project root.
brain create-page --id <kebab-id> --category <category> --title "<one-line title>" \ [--tags a,b] [--status active] [--source "<where this came from>"]
Generates `brain/pages/<id>.md` from the template (frontmatter + `<!-- compiled_truth -->` + a visible `## Timeline` seeded with one `kind: decision` creation entry), then reindexes. Fill in the real compiled_truth afterwards via `update-truth`.
A persistent, file-based memory layer for coding agents — give Claude Code, Codex & others a project brain (durable decisions, requirements, constraints) via a zero-dependency CLI.
Repo: mindmuxai/brain.md
Seed a freshly-scaffolded brain with real project knowledge — on an existing (brownfield) project read the code, docs, and git log to draft the six root pages…
The process for digesting a conversation, document, or research result, classifying it, and writing it down as brain content (a root-page update or a…
Bootstrap the Open Project Brain Standard into the current project — prefer `brain init` (ensure BRAIN.md, scaffold empty brain brainRoot-aware, default-wire…