Build a codebase map with Prism that goes in an agent's prompt #931
Labels
No labels
P0
P1
P2
P3
bug
category/code-change
category/cross-repo
category/eval-run
category/investigation
category/no-test-target
category/owner-ruling
category/prose-artifact
category/recurring-chore
category/structure
category/umbrella
crc-refactor
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
rule-proposal
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#931
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
A senior engineer does not query the codebase to learn its shape; the shape is already in their head. So the map must be in the prompt, and the query tools are the second step. (Jared, 2026-10-04: "Should be the ethos for this tool.")
The agents in the ticket-takedown harness (researcher, designers, critic, reviser) see only the small part of the codebase that the first research step reported. They design the smallest patch at that spot. In round A4 (2026-10-04, 5 ruled cases, 10 complete runs) no run produced the approved approach.
Query tools do not correct this. An agent does not ask about code that it does not know exists.
The purpose of the tool: give each agent that reads code a view of the whole codebase as a long-time senior engineer holds it. That view gives more entry points, shows behavior that already exists (DRY), and shows the conventions. Each thing that goes into the map must serve that purpose.
Observed (optional)
In the round 4 smoke run of #906 the critic had
graphify query,graphify explain, andgraphify path. It finished in 4 turns and 11 seconds.Measurements on a scratch copy, 2026-10-04:
graphify update .on the whole repository: 11 s, 14,161 nodes, report 300 KB. A query about the #907 defect returned mostlydocs/crc/nodes and did not returnRepo#stage.graphify update libinplugins/os-sdlc: 2.6 s, 3,645 nodes. The same query returnedCommit,commit!,ListedPaths, andRepo#stage. The report names its communities "Community 0" to "Community 359".plugins/os-sdlc/lib: under 1 s, 3,499 lines, about 25,000 tokens.Reproduce (optional)
n/a: this is a new tool, not a defect.
Approach
Jared chose the custom Prism route on 2026-10-04. The design is open; he wants to define how to build the map for this purpose before it is built. This conversation gives the entry point and the requirements.
Requirements:
lsp-probe) are the second step, not a replacement.lib/andbin/;eval/is excluded for now). No documents.Starting point: the Prism visitor from the session. Example output for
adapter/git/repo.rb:class Repowithstage(paths),changed_paths(glob: nil, base: nil),staged_paths,commit(message, paths).Open design questions (what the outline alone cannot show):
method_option, Sequel associations), superclass lines, andincludelines.runner/implementation/commit.rbinaffected-paths, and the file is nowcommand/implementation/commit.rb. Candidates: a link byaffected-components, or by the constant names in the ADR text.Measures when it is built:
Required work: none beyond the acceptance criteria.
Rejected: graphify on the whole repository — the queries return document noise, and the report is too large for a prompt.
Rejected: query tools only — the agent must know what to ask; the #906 smoke run shows that it does not ask.
Non-goals (optional)
Runtime facts (for example git index behavior, or a Zeitwerk load error inside a test). No static tool shows them.
Off-the-shelf tools with a similar aim were named and not tested: the aider repo map, repomix
--compress, universal-ctags.Origin
results/runs/906-20261004-122012), then Jared's direct request for this ticket on 2026-10-04.docs/handoffs/2026-10-04-takedown-round-4.md, sections "Round A4 results" and "Smoke run")plugins/os-sdlc/eval/ticket-takedown/(first consumer); the tool itself has no home yet