skills/brain-ops/SKILL.md
Brain knowledge base operations. The core read/write cycle: brain-first lookup, read-enrich-write loop, source attribution, ambient enrichment, back-linking. Read this before any brain interaction.
npx skillsauth add garrytan/gbrain brain-opsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
The brain is not an archive. It is a live context membrane that every interaction flows through in both directions.
Convention: See
skills/conventions/brain-first.mdfor the 5-step lookup protocol. Convention: Seeskills/conventions/quality.mdfor citation and back-link rules.
This skill guarantees:
[Source: ...] citations)Every mention of a person or company with a brain page MUST create a back-link
FROM that entity's page TO the page mentioning them. An unlinked mention is a
broken brain. See skills/conventions/quality.md for format.
Before using ANY external API to research a person, company, or topic:
gbrain search "name" — keyword search for existing pagesgbrain query "natural question about name" — hybrid search for contextgbrain get <slug> — if you know the slug, read the full pageThe brain almost always has something. External APIs fill gaps, not start from scratch.
Every message, meeting, email, or conversation that references a person or company:
User's direct statements are the highest-value data source. Write them to brain
pages immediately with attribution [Source: User, YYYY-MM-DD].
Every put_page call automatically extracts entity references and writes them
to the graph (links table) with inferred relationship types. Stale links
(refs no longer in the page text) are removed in the same call. This is
"auto-link" reconciliation.
add_link calls needed for ordinary page writes.attended (meeting -> person), works_at, invested_in,
founded, advises, source (frontmatter), mentions (default).put_page MCP response includes auto_links: { created, removed, errors }
so the agent can verify outcomes.gbrain config set auto_link false. Default is on.gbrain timeline-add
(or batch via gbrain extract timeline --source db).Before answering any question about a person, company, or topic:
Don't answer from general knowledge when a brain page exists.
This is not a special mode. This is the default. Everything the user says is an ingest event.
Rules:
No separate output. Brain-ops is an always-on behavior layer, not a report generator. The output is updated brain pages and enriched responses.
When a brain has multiple sources (wiki, gstack, yc-media, etc.), every
citation MUST include the source id: [source-id:slug]. Example:
You told me about the retry budget approach — see [wiki:topics/resilience] and [gstack:plans/retry-policy] for where this came from.
Rules:
sources.id (immutable), never sources.name (mutable display).[default:slug] OR may omit the prefix
for backward compat.search, query, get_page, list_pages
carries source_id — always use it when citing, never guess.If a search result has source_id: "gstack" and slug: "plans/foo",
the citation is [gstack:plans/foo]. That's the whole rule.
[Source: ...] citationssearch — keyword searchquery — hybrid vector+keyword searchget_page — read a brain pageput_page — create/update brain pagesadd_link — cross-reference entitiesadd_timeline_entry — record eventsget_backlinks — check who references an entitysync_brain — sync changes to the indextools
Validate and auto-repair YAML frontmatter on brain pages. Catches malformed pages before they enter the brain (missing closing ---, nested quotes, slug mismatches, null bytes, empty frontmatter, YAML parse failures). Wraps the `gbrain frontmatter` CLI for agent-driven workflows.
data-ai
Trace one idea's evolution through the brain: first mention, best articulation, related concepts, reversals, contradictions, abandoned branches, and the current live version. Use for single-idea conceptual lineage, not broad concept-map synthesis or structured entity metrics.
data-ai
Route to Venus (sharp executive-assistant voice persona). Used for logistics — calendar, tasks, recent messages, brain lookups — at sub-second phone-call latency. The default voice persona unless DEFAULT_PERSONA=mars is set.
tools
Route to Mars (introspective thought partner / demo showman voice persona). Used when the operator wants depth, meaning, or impressive social demos rather than logistics. Mars handles SOLO mode (philosophy, presence, patterns) and DEMO mode (tool-driven showmanship) automatically.