Repository navigation
Context system: records, lint, event triggers, staged routines, factories (0.4.0) - #7
Merged
Merged
Conversation
…ries (0.4.0)
- Records: shared/{projects,people,teams,customers,meetings,documents}/,
one file per thing linked with [[type/id]]; record_save merges fields,
record_get follows links one hop and lists backlinks.
- Lint (brainium lint, brain_lint, weekly brain-health routine in every
new brain): unsigned notes, missing record fields, broken links, stale
records, misfiled records, factories without one production prompt or
evals. Writes shared/health.md.
- Routines: on: globs run a routine when brain files change (debounced,
changed paths passed in); stage: shadow|limited|full with limit; new
prompt/shell routines start in shadow.
- Factories: agent cards carry kind/team/maintainers; prompts/ and evals/
templates.
- Every note names its agent, also in the agent's own folder.
- .brainium.json lets a repo send auto writes to a named brain.
- A brain created inside another repo uses that repo instead of git init.
- docs/CONTEXT-SYSTEM.md; skills and MCP instructions teach the new tools.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
This makes a brain work as the one governed context system that people and agents share. The shape follows Notion's essay A new shape for work, and it happens automatically: it's built into new brains, the tools, and the agent instructions.
What
Records. A small ontology:
shared/{projects,people,teams,customers,meetings,documents}/, one file per thing, linked with[[type/id]].record_savemerges fields.record_getreturns the record, the title and status of everything it links to, and what links back.Lint. Run it with
brainium lintorbrain_lint. Every new brain also gets a weeklybrain-healthroutine (an upkeep job, so no approval is needed). It reports:review_by)The report goes to
shared/health.md.Routines.
on:globs run a routine when brain files change. Changes are debounced, and the changed paths are passed in.stage: shadow|limited|fullwithlimit.shadow.Factories. Agent cards carry
kind,teamandmaintainers. Newprompts/(testing, production or retired) andevals/templates.Signing. Every note names its agent, including notes in the agent's own folder.
Repo → brain. A repo's
.brainium.json({ "brain": "NAME" }) sends "auto" writes to that brain.Fix.
init-braininside an existing repo uses that repo instead of runninggit init.Docs and instructions. New
docs/CONTEXT-SYSTEM.md. The skills, Cursor rule and MCP instructions now teach records, signing, lint and staged routines.Testing
cli/test/context.test.mjs(8 tests): records and links, lint (each check),.brainium.json, file triggers with debounce, stage prefaces, a triggered shell routine end to end, factory cards, and nested brains.npm test: 51/51 pass.🤖 Generated with Claude Code