Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 1.6 KB

File metadata and controls

41 lines (29 loc) · 1.6 KB

Agent Workflow

AI coding agents should use Code Context Engine as a context and impact layer, not as an editor.

Before Editing

  1. Call pre_change_context with the user task.
  2. Review metadata results and the budgeted context_pack.
  3. Include repo when the database contains more than one repository so project memories are scoped correctly.
  4. Fetch exact source with get_chunk only for selected chunks.
  5. Prefer symbol/path matches over weak semantic guesses.
  6. Use search_code(vector=true) or vector_search only as an extra local signal, not as proof of semantic equivalence.
  7. Inspect references or tests when the task touches shared code, and read each edge's provider, confidence, and evidence.

After Editing

  1. Generate or collect unified git diff text, preferably with zero context.
  2. Call post_change_impact with the diff text, or with manual changed files and symbols when diff text is unavailable.
  3. Review the derived changed_files, changed_symbols, and changed_new_line_ranges.
  4. Run recommended tests or explain why they were not run.
  5. Report unverified impact items in the final answer.

Recommended Agent Policy

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

Current Limitation

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.