brain
Skill19 starsChanged 3 months agoMITView on GitHub
Front door to the roster brain — the workspace's shared, append-only Postgres + object-storage memory. Use when the user asks to remember/record/look up team knowledge (competitors, posts, metrics, accounts, people) or to set up the brain. Routes to `roster brain <verb>` (init/doctor/ingest/save/get/event/link/merge/fs/record) and follows the brain-first protocol. Triggers on /brain or when a request is about persistent team knowledge in a roster workspace.
- Reads credentials
10 other projects use a version of this.
Adopted by
Most recently taken up by
- tyler-berggren/tb-claude-kittheir own version, first seen Sep 29, 2026
- zitdevs/vault-skillstheir own version, first seen Aug 19, 2026
- Anantys-oss/koantheir own version, first seen Jul 18, 2026
- IvandoNascimento/skillstheir own version, first seen Jun 7, 2026
- tiagovficagna/Hbraintheir own version, first seen May 13, 2026
- riggyz/skillstheir own version, first seen May 6, 2026
Other versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 10
- H-mmer/pentest-agents★ 984same name
- Anantys-oss/koan★ 47same name
- sarthakgoel31/claude-skills★ 3same name
- riggyz/skills★ 2same name
- tiagovficagna/Hbrain★ 2same name
- tyler-berggren/tb-claude-kit★ 2same name
- IvandoNascimento/skills★ 1same name
- jonesrussell/skills★ 1same name
- salparadi-labs/brain★ 0same name
- zitdevs/vault-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- chief-of-staffSkill
- dreamerSkill
- inboxSkill
- roster-orchestratorSkill
- second-opinionSkill
- tasksSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.
0
Common
Most of the 9 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 38
Write back what you learn: When you discover a durable fact, record it (save/event/link) so the next session benefits.
- Distinctive: line 41
Correct immediately: If you find the brain is wrong, write the correction now — a new write supersedes.
- Very specific: line 112
Add --json to any verb for machine-readable output.
- Very specific: line 121
When ROSTER_BRAIN_URL is absent, init reports only the expected derived runtime role and tracked Infisical path, then stops before database …
- Very specific: line 155
Never put secrets (API keys, tokens) into the brain.
“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
brain
The chat-native front door to the roster brain — a shared, append-only Postgres store the whole agent team reads and writes instead of scattering knowledge across files. Works identically in Claude Code and Codex. Stateless: every invocation re-checks the brain's state.
Is there a brain here?
A brain is configured when roster.yaml contains its tracked brain block. The
read/write verbs additionally require ROSTER_BRAIN_URL from the configured Infisical
path. If the block is absent, explain that no brain is configured. If the block exists
but the environment variable is missing, explain that runtime credentials are not
injected and follow Setup below; do not invent a local substitute. (roster brain
doctor is an admin-side diagnostic and needs ROSTER_BRAIN_ADMIN_URL, so don't rely on
it to detect a runtime brain.)
Brain-first protocol
The brain is the team's source of truth. When a request is about persistent knowledge:
- Consult before answering. For questions about competitors, posts, metrics,
accounts, people, or strategy, read the entity first —
roster brain get --kind <k> --slug <s>— before answering from memory or the open web. Cited retrieval across the whole brain isroster context <function>/<agent> --query "…";roster brain queryfails closed until #352 ships. Cite what came from the brain. - Write back what you learn. When you discover a durable fact, record it
(
save/event/link) so the next session benefits. Readbrain/RESOLVER.mdto decide where it goes. - Correct immediately. If you find the brain is wrong, write the correction now — a new write supersedes; nothing is deleted.
- Entities and facts, never new tables. The custom-table broker is disabled;
brain/RESOLVER.mdmaps every shape onto entities, facts, events, and edges.
Organize, don't just dump
Knowledge written carelessly fragments into duplicates and orphaned facts. Whenever you
write, organize around the write — the pipeline is extract → dedup-before-create → link →
tag. brain/RESOLVER.md is the authoritative guideline (kind taxonomy, corpus-tag
taxonomy, tags-as-edges convention, dedup discipline, when-to-link branch); follow it.
Inline (a fact or two learned mid-session):
- Extract the noun and map it to a
kindfromRESOLVER.md. - Dedup before create —
roster brain get --kind <k> --slug <s>first. Whensavewarns "possible duplicate of: …", evaluate it androster brain merge <from> <into> --source-version "$SOURCE_VERSION"if it is the same thing. Never leave a near-duplicate. Save with a citation and provenance — every semantic write is a two-step. Mint the citation once per piece of material, then cite it on every write derived from it:
# --bytes-file is required for every origin except workspace-file, and the path # is workspace-relative. printf '%s' "$RECORD_JSON" > ingest/<name>.record.json SOURCE_VERSION=$(roster brain ingest --manifest-file ingest/<name>.json \ --bytes-file ingest/<name>.record.json --json \ | jq -r '.ingest.source_version_id') roster brain save --kind <k> --slug <s> --field key=value \ --source "<where it came from>" --source-version "$SOURCE_VERSION"--source-versionis required onsave,event, andmerge— a command without it fails to parse. Every fact also carries a--source.- Link asserted relationships, kind-qualified (bare slugs are ambiguous):
roster brain link <src> <rel> <dst> --kind-src <kind> --kind-dst <kind>. - Tag for retrieval — a
tagis atagentity-kind + ataggededge (no schema change):roster brain save --kind tag --slug <kebab-tag> --source-version "$SOURCE_VERSION", thenroster brain link <entity> tagged <kebab-tag> --kind-src <entity-kind> --kind-dst tag.
On-demand corpus pass (a notes dump, transcript, or page worth a dedicated pass):
delegate to the brain-organizer subagent via the host tool's native subagent primitive
(see roster-orchestrator for the per-tool idiom). It runs the same extract → dedup → link
→ tag pipeline over the whole corpus, append-only, and returns a summary of what it wrote.
Everything stays on the host subscription and the roster brain verbs.
Verb cheatsheet
| Goal | Command |
| Provision / inspect | roster brain init · roster brain doctor |
| Mint an immutable source version | roster brain ingest --manifest-file <ws path> --bytes-file <ws path> (--bytes-file may be omitted only when source.kind is workspace-file) |
| Save an entity + facts | roster brain save --kind <k> --slug <s> --field key=value --source-version sha256:<64 hex> |
| Read an entity (truth + timeline) | roster brain get --kind <k> --slug <s> |
| Record something that happened | roster brain event --kind <event-kind> [--slug <entity-slug>] --data '{…}' --source-version sha256:<64 hex> |
| Link two entities (uncited — #397) | roster brain link <src> <rel> <dst> |
| Merge a duplicate | roster brain merge <from> <into> --source-version sha256:<64 hex> |
| Cited retrieval | roster context <function>/<agent> --query "<text>" |
| Record portable work evidence | roster brain record run|artifact|feedback|decision --payload '{…}' |
| Store a file | roster brain fs put --kind <k> --slug <s> <file> |
| Fetch a stored file | roster brain fs get --kind <k> --slug <s> <filename> [--out <path>] |
| List stored files | roster brain fs ls [--kind <k> [--slug <s>]] |
| Remove a stored file (tombstone) | roster brain fs rm --kind <k> --slug <s> <filename> |
| Rotate the runtime credential | roster brain init --rotate-runtime-credential |
save, event, and merge refuse without --source-version; link refuses the flag
entirely, because brain.edges carries no citation column yet and every link output is
labelled "cited": false, "citation_owner": "397".
Add --json to any verb for machine-readable output. The legacy mount, table,
sql, config, reindex, gc, export, and import spellings are recognized but
refuse with BRAIN_LEGACY_COMMAND_DISABLED; query refuses with
BRAIN_RETRIEVAL_NOT_READY. Never route a user to them.
Setup
The brain is bring-your-own Neon (or any Postgres): connection strings live in
Infisical, never in .env. First run roster brain init with the admin URL injected.
When ROSTER_BRAIN_URL is absent, init reports only the expected derived runtime role
and tracked Infisical path, then stops before database access. The host must generate a
43-128 character unpadded base64url password (at least 32 random bytes), build the full
workspace-specific URL with that reported role, and store it at that Infisical path as
ROSTER_BRAIN_URL. Rerun init under ambient injection to provision the database.
Roster never mints, prints, returns, or stores the runtime password or URL.
To rotate that credential later, stage the new URL ambiently in
ROSTER_BRAIN_URL_NEXT and run roster brain init --rotate-runtime-credential (the flag
makes init do only the rotation — no migrations, no role creation, no re-grants). Two
recovery modes exist for a lost credential: --recovery-provider-reset after the provider
console resets the role (it accepts the provider-issued interim password once and replaces
it with the staged one), and --recovery-admin where the admin still holds authority over
the role. Rotation prints rotated/verified and never a credential fragment; promote the
staged value in your secret store afterwards.
The brain
is indivisible: roster.yaml must declare both brain.secrets_path and
brain.storage (bucket + region), or every Brain verb fails closed with
BRAIN_CONFIGURATION_INCOMPLETE without contacting either store. Full walkthrough:
the Set up the brain section of the Roster HOWTO.
Safety
- Append-only: you can never UPDATE or DELETE through the runtime role — corrections
supersede. Don't try to work around it. Files are append-only too: the ledger never
erases history, so
roster brain fs rmwrites a tombstone row and retains the object bytes ("bytes_retained": true) rather than rewriting the past. Tombstoning therefore needs no object-storage credential at all. File bytes are written only through theroster brain fsverbs. - Semantic writes are broker-only: the runtime role holds no INSERT on
brain.entities/facts/events/entity_mergesand reaches them exclusively through the cited brokers. A bad citation fails withBRAIN_CITATION_INVALIDand areasonofmissing,unknown-version, ornot-structured-record. - Never put secrets (API keys, tokens) into the brain. The object-storage namespace is
tracked non-secret configuration in
roster.yamlunderbrain.storage; the credentials (AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY) are ambient-only and never stored in the brain. Roster never prints a bucket, endpoint, object key, ors3://URI.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

