Skip to content

docs(template): add concrete-anchor guidance for codegraph_context queries#522

Open
JirA44 wants to merge 1 commit into
colbymchenry:mainfrom
JirA44:fix/context-query-guidance
Open

docs(template): add concrete-anchor guidance for codegraph_context queries#522
JirA44 wants to merge 1 commit into
colbymchenry:mainfrom
JirA44:fix/context-query-guidance

Conversation

@JirA44
Copy link
Copy Markdown

@JirA44 JirA44 commented May 28, 2026

Agents querying codegraph_context with vague natural-language descriptions (e.g. "find async event publishing code") get unrelated results because the index matches on symbol names, annotations, and framework keywords — not prose. A concrete example from #503: a query like "Find async execution, message queue, Spring Cloud Stream event publishers" returned streamChat/stream instead of the intended publisher classes.

Change: one additional rule-of-thumb in the instructions template written to every agent's config file on install:

Write codegraph_context queries with concrete anchors, not vague natural language. Include class names, method names, annotations, or framework keywords: e.g. EventPublisher DomainEvent StreamBridge @Async instead of find async event publishing code.

No code changes — template-only. Existing installs pick it up on the next codegraph install run.

Fixes #503

…eries

Agents writing vague natural-language queries (e.g. 'find async event
publishing code') get unrelated results because the FTS index matches
on symbol names and annotations, not prose descriptions. A single
rule-of-thumb pointing at concrete anchors (class names, method names,
framework annotations) closes the gap without extra tooling.

Fixes colbymchenry#503
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add memory guidance for Code Context query usage

1 participant