Files
SuperBizAgent-java/openspec/changes/archive/2026-07-04-rag-evidence-postprocess/tasks.md
T

978 B

1. Evidence Model

  • 1.1 Add an EvidenceBlock DTO.
  • 1.2 Add evidence block list and postprocess count fields to LookupResult.

2. Evidence Postprocess

  • 2.1 Build evidence blocks from L0 matches and L1 candidates in LookupKnowledgeTool.
  • 2.2 Deduplicate evidence by stable source key.
  • 2.3 Preserve existing primary/supplement compatibility behavior.

3. Trace Recording

  • 3.1 Extend ToolInvocationRecorder.LookupKnowledgeRecord with evidence block summaries and postprocess counts.
  • 3.2 Persist evidence block summaries in retrieval_details.

4. Tests

  • 4.1 Add or update tests for evidence block creation and deduplication.
  • 4.2 Add or update tests for persisted evidence block summaries.
  • 4.3 Run targeted tests and the RAG retrieval baseline evaluator.

5. Validation

  • 5.1 Run OpenSpec validation for the change.
  • 5.2 Review git diff to confirm only expected code/spec/test files changed.