Turn a small, explicit set of durable team insights into local spool proposals. Search before capture, inspect imports before writing, and report proposals as ungoverned until the curator disposes them.
Overview
This self-contained operator workflow uses the full locally built Registrar MCP server. It does not
depend on repository subagents, and it does not work with the read-only intent-brain marketplace
runtime. Capture and import write candidate files to the local spool; deterministic governance and
promotion happen later in the curator.
Prerequisites
- Build and configure
apps/mcp-serverfrom the Registrar repository. - Set
TEAMKB_TENANT_ID,TEAMKB_BASE_PATH, andTEAMKB_ROLE=admin. - Keep
TEAMKB_API_URLunset when search and writes must target the same local brain. - Read the runtime contract for exact bounds and result semantics.
Modes
capture: distill up to five durable insights from the current session and explicitly supplied files, then propose only new content.import GLOB: inspect and explicitly approve 1–20 Markdown files beforeteamkb_importqueues them.review QUERY: search only; make no writes.status: callteamkb_status; make no writes.
Instructions
Capture a session
- Review the conversation and use
Read,Glob, orGreponly on files the user placed in scope. - Select at most five items that would help a teammate after 30 days. Classify each as
decision,pattern,convention,architecture,troubleshooting,onboarding, orreference. - Reject ephemeral steps, personal preferences, secrets, and facts already maintained in an authoritative README or project instruction file.
- For each candidate, call
teamkb_searchwith 1–4 keywords andscope: "all". Skip covered facts; surface contradictions instead of creating a competing memory. - Call
teamkb_proposeonce for each surviving item. The returned candidate UUID proves only that the local spool write succeeded.
Import Markdown files
- Require an explicit base directory and glob. Refuse a home directory, repository root, hidden credential directory, or an unresolved environment variable as the base.
- Use
Globto resolve the exact set. Accept 1–20.mdfiles; require the user to split larger batches. - Use
Grepfor common secret markers andReadany suspicious file. Exclude credentials, tokens, private keys, environment dumps, and empty files. - Show the final relative file list and use
AskUserQuestionfor explicit confirmation becauseteamkb_importwrites every match to the spool. - Call
teamkb_import({ glob, basePath })exactly once. Reportqueued,failed, and every failed file fromoutcomes; never claim promotion.
Review or status
- For
review, callteamkb_searchwithcuratedfirst and broaden toallonly if needed. Cite the exact returnedqmd://URIs. - For
status, callteamkb_statusand summarize local counts and recent feedback. Do not print the absolutedbPathunless explicitly requested.
Output
- Mode and local tenant context, without secrets or absolute storage paths.
- Proposed or imported candidate UUIDs, categories, and spool disposition.
- Skipped duplicates, conflicts, rejected files, and reasons.
- Clear statement that queued candidates are not governed memory until curator processing.
Examples
/teamkb capture
Reviewed the session, skipped one README-duplicated fact, and queued two local proposals:
- decision — 4f3a2e0e-0ee4-4f63-b63e-22306c45115a
- pattern — 83e1bc9a-0048-44e7-b70b-52bc7cf6e954
Neither proposal is promoted yet.
/teamkb import docs/runbooks/*.md
Resolved 6 Markdown files. After explicit approval, teamkb_import queued 5 and failed 1; the failed
file and error are reported without claiming a partial batch was fully successful.
/teamkb review deployment rollback
Searched curated memory first and returned two cited runbook results. No write tools were called.
/teamkb status
Reported local lifecycle/category/tenant counts and recent feedback without exposing the database path.
Error Handling
| Situation | Response |
|---|---|
| Write tools are absent | Use the built local server with TEAMKB_ROLE=admin; the shipped marketplace plugin is read-only. |
| Search is unexpectedly empty | Check the local qmd index and tenant before concluding no memory exists. |
| Import resolves 0 or more than 20 files | Stop; correct the glob or split the batch. |
| Secret-like content is found | Exclude the file or redact the candidate before any MCP write. |
| A spool write fails | Report exact failed outcomes; do not claim they were queued. |
Guardrails
- Local operating-system permissions are the write security boundary;
TEAMKB_ROLE=adminis a registration gate, not authentication. - Never broaden an import glob after confirmation.
- Never save secrets or rely solely on downstream policy detection.
- Provenance identifies capture origin, not truth.
Resources
- Bob's Big Brain Registrar — source, build instructions, and governance architecture.
apps/mcp-server— the full local operator runtime required by this skill.brain-save— one-item write workflow;brain— read-only cited-query workflow.