chore(brain): de-surface brain_index from the model-facing MCP toolset (ADR-0012 rule 4) #78
Closed
opened 2026-07-07 07:45:17 +00:00 by mathias
·
2 comments
No Branch/Tag Specified
main
fix/pipeline-writes-158
fix/edit-path-io-192
fix/create-regular-188
fix/guard-special-179
fix/linkcheck-keeps-write-178
fix/write-dir-redirect-173
fix/tunnel-detect-174
fix/pipeline-root-157
w3/154-mcp-auth-wiring
fix/tunnel-traversal
test/in-brain-targets-171
fix/brain-scan-root-157
fix/graph-wiki-root-157
fix/vectorstore-root-157
fix/notes-root-157
fix/search-root-157
fix/brainwide-root-157
fix/raw-symlinks-153
feat/symlink-tripwire-157
fix/rest-auth-149
fix/123-brain-edit-envelope-check
feat/106-page-aware-extraction
fix/105-source-drift-on-main
fix/104-surface-merge-conflicts-on-main
agent/b1-compile-on-ingest
agent/104-surface-merge-conflicts
agent/105-source-drift
agent/107-loud-unconfigured-alerting
feat/brain-read-edit
fix/capture-i1-refusal-names-target
renovate/configure
feat/consolidate-single-harness
icebox/cmd-routing
feat/brain-pending-promote
fix/close-session-classification-refresh
fix/capture-summarywriter
v0.24.0
v0.23.1
v0.23.0
v0.22.0
v0.21.1
v0.21.0
v0.20.1
v0.20.0
v0.19.1
v0.19.0
v0.18.4
v0.18.3
v0.18.2
v0.18.1
v0.18.0
v0.17.0
v0.16.1
v0.16.0
v0.15.0
v0.14.0
v0.13.2
v0.13.1
v0.13.0
v0.12.1
v0.12.0
v0.11.2
icebox/cmd-routing-2026-07-01
v0.11.1
v0.11.0
v0.10.0
v0.9.0
v0.8.0
v0.7.0
v0.6.0
v0.5.0
v0.4.1
v0.4.0
v0.3.0
v0.2.0
v0.1.0
Labels
Clear labels
agent/ready
blocked/client
blocked/supplier
blocked/upstream
risk/high
risk/low
risk/medium
size/l
size/m
size/s
size/xs
status:dispatch
status:dispatched
status:review
status:reviewing
type/chore
type/decision
type/docs
type/feat
type/fix
type/ops
type/research
type/test
Meets the agent-ready contract; authorizes unattended execution
Waiting on the client
Waiting on a supplier
Waiting on an upstream project or vendor
Irreversible, security-relevant, or control plane
Reversible, local, test-covered
Touches shared state, deploys or data
Too big - split it
Under two days
Under half a day
Under an hour
Maintenance, no behaviour change
Human decision required; never agent/ready
Documentation only
New capability
Corrects broken behaviour
Infrastructure, deploy, runtime
Investigate; output is a finding, not code
Test coverage only
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: mathias/hyperguild#78
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Charter: ADR-0012 rule 4 (hide automated mechanism) · smallest/safest of the ADR-0012 cleanup items
Problem
brain_indexis exposed as a model-facing MCP verb, but its own description says it is auto-called afterbrain_write. An auto-called operation surfaced as a caller verb is pure cognitive load with no decision behind it — every model reading the toolset has to read it, determine it's not a thing it should call, and move on. That violates ADR-0012 rule 4.What to do
brain_index(Map-of-Content /_index.mdregeneration) from the model-facing MCP toolset.dma-cli) not the MCP tool list.brain_indexdirectly (grep the harnesses); if something does, that's a mis-use to fix, not a reason to keep it surfaced.Acceptance
brain_indexno longer appears in the model-facing MCP tool listbrain_write→ index refreshed)task checkgreenRelated
Done —
4e6fc7a.task checkgreen.brain_indexno longer intools/listinternal/brainstore.Storecallsbrain.BuildWingIndexdirectly on the write path, so the descriptor and the behaviour were already independent.tools/calldispatch case stays, so an admin caller can rebuild a Map of Content by handskills/,specs/,docs/, and the Go tree. Nothing referenced it outside the MCP package itself.task checkgreenOne test worth keeping
Removing the descriptor and removing the capability look identical from the tool list, and only one of those is what this issue asked for. So there are two assertions, not one:
tools/listmust not containbrain_index, andtools/callon it must still dispatch without an error. Otherwise a later cleanup that deletes the dispatch case as "dead code" would pass the visible test and quietly remove the admin path.Note on the acceptance criterion I could not check as written
"Verify with a
brain_write→ index refreshed" needs a live brain. What I verified instead is structural and stronger against this particular change: the auto-index call site is in the store, not in the MCP handler, so nothing this commit touched is on that path. The live check is still worth onebrain_writenext time you are in there.Closing.
Verified live, 2026-08-22 — closed correctly
Re-checked during the ADR-0009 sprint because this was closed on 2026-08-17 without a recorded live confirmation.
brain_indexis absent from the model-facing surface. The auto-index-after-write half still works — everybrain_writeand frontmatter-touchingbrain_editin this session reindexed its wing without a caller invoking anything.Worth noting what this issue established as precedent, since ADR-0009 and #80 both lean on it: de-surfaced ≠ removed. The capability stayed; only its model-facing verb went. That is the exact mechanism the #80 deprecation plan uses for every mechanism-named verb it retires, and the one
brain_edit_rootuses for a capability that must exist but must not be discoverable by a model readingtools/list. First application of ADR-0012 rule 4, and it held up.No action. Recording the verification so the next reader does not have to redo it.