Add: precomputed-code-graph-lookup - #151
Open
muthuishere wants to merge 1 commit into
Open
muthuishere wants to merge 1 commit into
muthuishere wants to merge 1 commit into
Conversation
Documents answering an agent's structural code questions (callers, reverse impact, "what breaks if I change this") from a precomputed, deterministic graph queried by intent-shaped verbs, instead of a retrieval-time grep-and-read loop. Assisted-by: Claude Opus 5 (Claude Code)
|
@muthuishere is attempting to deploy a commit to the nkkko's projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
One new pattern file:
patterns/precomputed-code-graph-lookup.md. No other files touched.What the pattern documents
Answering an agent's structural code questions — who calls this, what depends on it, what breaks if I change this signature — from a graph that was built before the question, and exposing it as verbs shaped like the agent's intent (locate, symbol card, reverse impact, path, "I'm about to change X") rather than as a search box. Every fact carries
file:lineprovenance, and freshness comes from content-hashed re-parsing rather than from abandoning the index.Why this isn't a recombination of the neighbours
I checked the closest existing patterns before writing, and the write-up links them rather than restating them:
agentic-search-over-vector-embeddings— argues to drop the index and search at query time with grep. This pattern is the counter-position: keep an index, but a deterministic structural one, so the staleness objection is answered by cheap re-parsing instead of by removing the index. Same category on purpose.curated-code-context-window/curated-file-context-window— a search subagent selects files at query time; the mechanism is an LLM call and inherits its non-determinism. Here nothing infers at query time.agent-powered-codebase-qa-onboarding— a use case (human onboarding Q&A) that mentions embeddings and code graphs among its ingredients; this is the mechanism, aimed at the pre-edit impact question rather than at exploration.semantic-context-filtering/progressive-disclosure-large-files— about shrinking what enters context; this is about not running the search loop at all.The novel claim, stated plainly: reverse-impact questions are graph traversals, and text search cannot answer them soundly for non-unique names — so the interesting design move is a composed, intent-shaped verb returning callers + blast radius + covering tests in one call, with ambiguity reported as ambiguity instead of guessed.
python3 scripts/pattern_similarity_checker.pyreports no existing pattern at >= 0.5 similarity.Disclosure
authors, appears once at the end of References explicitly labelled as a disclosed known implementation, and is not thesource. Thesourceand the rest of the references are neutral prior art: Aider's repo map, SCIP/LSIF, Glean, tree-sitter, universal-ctags. Happy to drop the ctx-optimize line entirely if you would rather the pattern carried no self-reference — it does not change the write-up.low; token savings explicitly stated as not established (they did not materialise in my own measurements); speed claims called implementation-specific and left unquoted; static resolution called out as incomplete for dynamic dispatch, reflection and generated code. No numbers or benchmarks are cited, because I have none that are independently reproducible.Assisted-by:trailer.Validation
bun scripts/validate-patterns.ts patterns/precomputed-code-graph-lookup.md --check-content→ clean (exit 0). The warnings in a full run are pre-existing on other files.