AI coding agents should use Code Context Engine as a context and impact layer, not as an editor.
- Call
pre_change_contextwith the user task. - Review metadata results and the budgeted
context_pack. - Include
repowhen the database contains more than one repository so project memories are scoped correctly. - Fetch exact source with
get_chunkonly for selected chunks. - Prefer symbol/path matches over weak semantic guesses.
- Use
search_code(vector=true)orvector_searchonly as an extra local signal, not as proof of semantic equivalence. - Inspect references or tests when the task touches shared code, and read each edge's
provider,confidence, andevidence.
- Generate or collect unified git diff text, preferably with zero context.
- Call
post_change_impactwith the diff text, or with manual changed files and symbols when diff text is unavailable. - Review the derived
changed_files,changed_symbols, andchanged_new_line_ranges. - Run recommended tests or explain why they were not run.
- Report unverified impact items in the final answer.
If task is non-trivial:
call pre_change_context
For source needed to edit:
call get_chunk on selected chunk IDs
If code is edited:
call post_change_impact with git diff text
If impact report includes tests:
run those tests before final response
Impact and reference edges from the built-in provider are heuristic. Agents should treat them as guidance for investigation and verification, not as proof of completeness.