docs(process): open Understand at the code graph for structural questions (ub-gwe) - #440
Merged
Conversation
added 3 commits
August 7, 2026 16:10
…ions The session-start protocol already told every session to reach for the code-graph MCP tools first, and the preceding task ignored it for its whole duration without ever saying so — answering with grep sweeps the structural questions a graph answers directly, on a repository that turned out to have nothing indexed anyway. The hard rules carried only the NEGATIVE half of the rule (semantic search is discovery, not authority); the positive half — that a structural question OPENS at the graph, and what a session owes when it cannot — existed nowhere. Extend the existing hard-rules bullet in place rather than mint a competing rule in a second document: a structural question (who calls this, is this reachable, which paths do X, what does this symbol depend on) goes to the code-graph tools before any grep sweep, text questions stay grep's, and an unavailable, unindexed or differently-committed graph is fixed or reported — never silently fallen back from. The authority cap survives word for word, with its subject widened from semantic search alone to the graph and semantic search together. The mechanics land in the process guide instead of the contract: which server, which tool verbs index it and report its state, that the index is machine-local and commit-stamped so it is the MAIN checkout that gets indexed, that branch work is therefore the normal case in which the graph legitimately answers for main's commit, and the one-line field the Understand comment now carries. The Explore sentence is narrowed to broad TEXT search — unamended it was the only other statement about how an Understand team searches, and it licensed exactly the habit this change exists to stop. The enumeration of structural questions stays in exactly one place, the contract bullet; the process guide repeats no list. Refs: ub-gwe
The rule landed in the preceding commit points at a server the repository never declared. Commit the entry so the wiring is versioned with the rule that depends on it rather than living only in an untracked working tree, as it had been. Miguel decided this explicitly, with the trade-off stated: the binary this entry starts lives outside this public repository, so a fresh clone gets a server that fails to start, and no installation note is added here. Two consequences are tracked rather than hidden — the entry is project-scoped and therefore inert until a user approves it, and no spawned agent team can reach the tools at all (ub-4ne); the repository still describes no MCP server other than unblock, and the generated AGENTS.md block has no place to put one (ub-amw). Refs: ub-gwe
The Track step's two artifacts, on top of the gated work commits so they ride the same pull request. The re-export carries five findings this run split out rather than absorbed — ub-4ne (no spawned agent team can reach the graph tools, and the committed server entry is project-scoped and inert until approved), ub-wvh (landing-verify.sh has been red since it landed and runs in no workflow), ub-lg7 (no executable check anchors the contract's hard rules — deleting the whole rewritten bullet leaves every gate green), ub-tge (the decision-range check enforces only presence while its rationale rests on there being exactly one occurrence), ub-amw (no MCP server other than unblock is described anywhere) — plus the ub-gwe thread itself: the design Review verdict and Implement summary, both recovered and restated after a session ended before writing them, and the Verify verdict. It also corrects the predecessor task's record, which the previous pull request exported a minute before closing it. The run-report records what the issue thread cannot hold: the two gates and their lens shapes, the three hardenings Verify proposed and Miguel accepted, the delta re-verification run because the gate said its verdict did not cover them, and the gotchas — including that a phase outcome not written to the tracker at the moment it is produced can be lost with its session. Refs: ub-gwe
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the tracker task
ub-gwe— make the code graph a stated first move for structural questions.Why
A session-start protocol tells every session to reach for the code-graph MCP tools first when navigating code. Across the whole preceding task (
ub-og3, the D48 stdout-channel work) that never happened once and was never disclosed: structural questions — who calls this, what does this reach — were answered with grep sweeps, and one of those answers, that a function had exactly one caller, turned out load-bearing enough that a gate script now rests on it. A check afterwards showed the graph server had zero projects indexed, so the protocol could not have been followed as written even by a session that tried.The hard rules already carried the negative half of the rule — semantic search is discovery, not authority. What was missing was the positive half: that a structural question opens at the graph, and what a session owes when it cannot.
What changed
CLAUDE.md— the existing hard-rules bullet is replaced in place, not supplemented. A second rule about the same subject in a second document is how these decay. The rewritten bullet routes structural questions to the code-graph tools before any grep sweep, leaves text questions to grep, and forbids silently falling back when the graph is unavailable, unindexed or indexed at another commit. The authority cap survives word for word, its subject widened from semantic search alone to the graph and semantic search together. The list stays at five bullets.docs/PROCESS.md§4 — theExploresentence is narrowed to broad text search (unamended it was the only other statement about how an Understand team searches, and it licensed exactly the habit this change exists to stop), and a new paragraph carries the mechanics: which server, which verbs index it and report its state, that the index is machine-local and commit-stamped so it is the main checkout that gets indexed, that branch work is therefore the normal case in which the graph legitimately answers for main's commit, and the one-line field the Understand comment now carries..mcp.json— thecodebase-memoryserver entry, committed as it stands by an explicit decision, with the trade-off stated in its commit message rather than hidden.Tracker + run-report — the record re-export and
.knowledge/wiki/runs/2026-08-07-code-graph-first-move.md, written by the Track step on top of the gated commits.Gates
Design Review — PASS WITH CHANGES. Three adversarial lenses (architecture, evidence, operability) plus a coordinator. Its consolidated output superseded the design brief's wording in full and became a byte-exact implementation spec, so the implementer made no judgement calls.
Verify — PASS WITH NOTES, zero must-fixes. Three adversarial lenses (claim audit, executable gates, coupling-and-mutation), each in its own private checkout, plus a read-only coordinator. It proposed three one-clause hardenings; all three were applied, all inside the process-guide paragraph, leaving
CLAUDE.mdbyte-identical to the gated version (proven by md5 of the diff hunk). Each closed a real hole: the rule prescribed a remedy it never named and would have collapsed into its escape hatch; the expected steady state during branch work was unstated though it is the common case; and the stale-value placeholder invited a token the run-report gate's session-local-id predicate matches, which would have silently flipped a trivial record re-export to substantive.Delta re-verification (run because the gate said explicitly that its verdict did not cover the hardenings): six check scripts exit 0, doc-lint OK across 19 documents, knowledge-lint OK across 63 pages, layering OK, run-report gate passes, plus the mechanical property set the design spec fixed.
Findings filed rather than absorbed
ub-4neub-wvhscripts/knowledge/tests/landing-verify.shhas been red since it landed, with four failures byte-identical on pristinemain, and is wired into no workflow.ub-lg7CLAUDE.mdhard rules: deleting the entire rewritten bullet leaves all six check scripts and the doc-lint green — proven non-vacuous by a positive control.ub-tgeub-amwAGENTS.mdis a fully generated single-server block with no place to put one.Note for the reviewer
The rule is inert for spawned teams today — by the tooling's design, not the text's. That is what
ub-4neexists to fix, and it is deliberately not in this pull request: its fix lives under.claude, an always-substantive path, which would drag a second run-report obligation into a change that is two prose edits.