# Evidence Compaction

Use evidence compaction when a task has enough evidence artifacts to make
workflow context noisy.

```sh
orchestra evidence compact --task GH-471 --threshold 20
```

The command writes Markdown and JSON summaries under
`.agent-workflow/evidence-summaries/`. Raw evidence files are not modified or
deleted; summary artifacts keep links to every raw evidence artifact.

Compaction groups evidence by task, role, type, and result. It preserves failed
evidence, unresolved or residual risk lines, and acceptance criteria references
found through exact criterion text or `AC-<number>` mentions.

Task context rendering uses an in-memory evidence summary when the evidence
count reaches the configured threshold. Override the default threshold with:

```sh
orchestra context --task GH-471 --evidence-summary-threshold 10
```

For process-wide defaults, set `ORCHESTRA_EVIDENCE_SUMMARY_THRESHOLD`.
