Skip to content

karch4162/brain

v0.18.0

Shared Git-backed knowledge, session continuity, graph context, and wiki maintenance for coding agents.

consolidate

Turn ONE named wiki-graph community into a synthesis DRAFT (a claim with sources, not a membership list), proposing an amendment when the community already holds a bridges/ or meta/ note, and queueing contradictions between its members for review. Keyless, in-session; writes only wiki/_drafts/ + logs/. Trigger: /brain:consolidate <community> (or --all), or 'consolidate this community' / 'synthesize this cluster'.

doctor

Diagnose and repair brain health — graphify install/launcher/version drift, the vault binding (BRAIN_ROOT), the registry, and stale interpreter caches. Trigger: /brain:doctor, or 'the graph/graphify is broken', 'check brain health', 'fix graphify'.

freshness

Run the brain wiki health check (POC §8 freshness agent): orphans, dead [[links]], stale last_verified, broken source anchors. Produces a review queue, never auto-deletes. Trigger: /brain:freshness, or 'lint the wiki' / 'check the brain for rot'.

init

Set up the brain for a project: ensure graphify is installed, pick (or register) the target vault from the brain registry, scaffold a new vault if needed, and wire this project to it. Trigger: /brain:init, or 'set up the brain here' / 'connect this repo to a brain'.

label

Name a graph mirror's communities vault-side — no repo checkout, no resync. Reads graphify/<repo>/graph.json, names clusters in-session (keyless), rewrites <repo>-GRAPH_REPORT.md preserving existing names, regenerates stubs. Trigger: /brain:label [repo ...], or 'label the communities' / 'fix the unlabeled mirrors'.

promote

Guided draft→trusted promotion: triage wiki/_drafts/ (keep / merge / drop), validate frontmatter, file into the right wiki area + index, and stage the batch as a PR. Never auto-promotes — the human is the gate; the PR is the promotion. Trigger: /brain:promote [draft-name|all], or 'promote the drafts' / 'graduate the drafts'.

resume

Load prior brain session context before starting work. Reads the most recent logs/ entries, the hot.md cache, and relevant wiki notes so the agent picks up where the last session left off. Trigger: /brain:resume (when working in a brain vault).

revise

Turn /brain:verify's saved could-not-tell evidence into approved body edits on trusted notes: rewrite drifted file:line references, fix one wrong side claim, re-verify, bump last_verified, one PR. No edit without approval; never touches status, never raises confidence to high. Trigger: /brain:revise [wiki/note.md], or 'fix the line drift' / 'revise the notes verify could not confirm'.

save

Persist the current brain working session: write a dated session log, refresh the hot.md cache, append to the operation log, and sync any changed graph mirrors. Trigger: /brain:save (when working in a brain vault).

tidy

Apply the mechanical tier of a freshness report as one reviewed batch: re-anchor moved source: paths, index orphans via hub notes, fold singleton tags. Never deletes notes or edits facts — judgment findings stay in the queue. Trigger: /brain:tidy, or 'fix the freshness findings' / 'clean up the wiki'.

verify

Work the judgment tier of the freshness queue with agents: re-check stale last_verified and low-confidence notes against their source: code, and repair dead [[wikilinks]] whose target exists under another name. One subagent per finding, one PR per batch. Never rewrites a fact, never invents an anchor, never raises confidence to high. Trigger: /brain:verify [--max N], or 'verify the stale notes' / 'work the freshness queue'.

wiki-ingest

Distill harvested Claude Code session digests (chats/) into DRAFT wiki notes for review. The LLM half of the harvest pipeline; honors the POC governance rule that auto-ingested knowledge stays in staging until PR-promoted. Trigger: /brain:wiki-ingest, or 'ingest the harvested chats'.