Sasha MCP reference

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 as site@1 and the full list of documents that kind should have. The business blueprint is the Context Spine: twenty documents in five named rings. The site blueprint describes one website and sits under a business brain.
  • A brain's brain.md is the record for ONE brain. Its frontmatter has a brain block (title, blueprint such as site@1, and optionally a parent brain id) and only its differences: add (extra documents, each with a reason) and drop (documents it does not need, each with a reason). Its body says what this brain is about. readDoc on 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, plus add. 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: getBrain names the parent document.
  • blueprint: site with no version means the latest. When a brain names an older version, getBrain says 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 (level sasha). 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".
  • listBrains returns at most 50 brains and looks at most 4 folders deep; searchBrain follows the same limits as searchKnowledge.
  • The brain tools only read. A brain changes when its documents change.
Built with BernardCookie settings