Brains and blueprints
This is the brains section of the usage guide. Call getDocs with { "section": "brains" } to read it on an instance.
A brain is everything Sasha knows about one thing: the business, a website, a
course. It is a folder inside a project that holds a brain.md card, plus
ordinary documents. Two files, two jobs:
- A blueprint (
blueprint.md, shipped with Sasha) is the plan for a KIND of brain, with a version such assite@1and the full list of documents that kind should have. Thebusinessblueprint is the Context Spine: twenty documents in five named rings. Thesiteblueprint describes one website and sits under a business brain. - A brain's
brain.mdis the record for ONE brain. Its frontmatter has abrainblock (title,blueprintsuch assite@1, and optionally aparentbrain id) and only its differences:add(extra documents, each with a reason) anddrop(documents it does not need, each with a reason). Its body says what this brain is about.readDocon the card works without the brain tools. - A document's state (checked, declined, summary) lives in that document's own frontmatter, never in either file.
The loop: listBrains to see the brains, getBrain for one brain's contents
page, readDoc with a path it returned. searchBrain searches one brain
(and, with includeParents, its readable parents). getBlueprint returns
the blueprints and what each document should hold.
- A brain id is
<project>/<folder>. A card at a project's root is not a brain. - A brain's documents are the blueprint's, minus
drop, plusadd. Each has a state: missing, filled, checked, declined or out of date. Depth counts these per ring, for example how many Public Context documents are filled and checked. A missing document in a site brain may be covered by the parent business brain:getBrainnames the parent document. blueprint: sitewith no version means the latest. When a brain names an older version,getBrainsays a newer blueprint is available and what it would add or remove. That is information, not an error.- A brain is visible exactly when its folder is readable. A member sees the
brains in their own home (level
tenant) and in projects they hold a grant on (levelsasha). Admin and staff see brains in ordinary projects only. A parent this connection cannot read is reported as no parent. - A brain this connection cannot see, and one that does not exist, give the same "Not found".
listBrainsreturns at most 50 brains and looks at most 4 folders deep;searchBrainfollows the same limits assearchKnowledge.- The brain tools only read. A brain changes when its documents change.