pi-brain
Makes agents read your decisions before they edit, and keeps a person in charge of what they learn.
- Role
- Author and maintainer
- What
- A pi package, installed once; each project or client gets a clone that holds only its knowledge
- Runs on
- pi, checked against pi 1.4
- Releases
- 10 on npm, July to October 2026; 0.5.2 is the latest
- License
- MIT
$ git log --follow -- wiki/muhamed.github.io/adrs/project-profile-pages.md
a831a16 projects: profile pages for enola, enola-guides and Usput.ba
41eceaa wiki: project profile ADR draft takes the owner's answers on repositories
d1293af wiki: revise project profile ADR draft (projects URLs, video, brain, enola-guides)
01b5101 wiki: draft ADR for project profile pages
Agents implement first. For some decisions, that is wrong.
Ask a coding agent to change the layout of a repository and it starts moving files. Nobody wrote down why, nobody agreed to it, and the next agent cannot tell a decision from an accident.
pi-brain keeps a project’s decisions, architecture and product reasoning next to the code, as a clone of its own, and makes the agent ask before the changes that matter. Raw drafts never become truth without human approval.
What it does.
-
Stop and shape.
A structural change waits for an approved decision record. The agent drafts it, says “this looks structural”, and stops. Only after a person approves it does the agent move the record to the approved shelf, build, and write a record of what shipped.
wiki/muhamed.github.io/constraints/adr-before-structural-changes.md
--- kind: constraint status: active severity: must --- # Constraint — ADR before structural changes Any structural change to this pi-brain home or the maintained project repository MUST have an approved ADR before implementation begins. -
Install once, a clone per project.
pi-brain installs once, as a global pi package: the extension, its commands and tools, skills, prompts, themes and personas. Each project or client then gets a clone that holds only its content and config: the rulebook, the wiki, the sources and the log. The clone inherits everything else from the install, so every pi session is brain-aware wherever a clone is present, and upgrading the package upgrades them all.
README · getting started
pi install @misabegovic/pi-brain # a content-only brain for a project bash tools/clone-pi-brain.sh ~/projects/my-project-brain "My Org" cd ~/projects/my-project-brain pi /brain:setup -
Checked, every commit.
brain_syncvalidates every page and rebuilds the index, before each commit. Links are graphed for orphans and dead ends. Nothing runs a model on a schedule.$ node tools/brain-sync.mjs && node tools/brain-links.mjs (pi-brain 0.5.2, on a copy of this site)
Regenerated wiki/index.md with 72 pages across 16 kinds. Link graph: 72 nodes, 395 edges Orphans: 0, Hubs: 63, Dead links: 3, Suggestions: 22
-
Agents draft. People promote.
Knowledge moves from the inbox to a suggestion, a draft, an accepted decision, its implementation and a record. Agents may only write suggestions. What an agent writes starts at
confidence: lowand cannot promote itself tohighin the same change. -
Forty-four commands, enola built in.
/brain:shape,/brain:continue,/brain:investigate,/brain:tendand forty more, plus nineteen tools for the agent. With enola switched on, thirteen/brain:enola-*commands check changes, keep receipts, and record verdicts on findings; since 0.5.0 the first write into a repository is held once to show the decisions that govern it. -
This site runs on it.
muhamed.at is a pi-brain clone: thirteen decision records, records of what shipped, a must-constraint on structural changes, and a log line for every change. The wiki is public, so you can read how every page on this site was decided.
What it shows about how I work.
I let agents do the work and keep people in charge of what is true. pi-brain is that rule made into a tool: it slows the agent down exactly where a decision is being made, and nowhere else.
How I work with knowledge bases
- Source on GitHubmisabegovic/pi-brain, MIT
- npmpi install @misabegovic/pi-brain
- This site's wikia pi-brain clone, in the open
- How I work with knowledge basesthe practice it belongs to