consolidate_decisions
Deduplicate decision store entries by evaluating semantic similarity with LLM. Merges, replaces, or invalidates duplicates to reduce redundancy.
Instructions
LLM-driven semantic dedup of the decision store. For each decision in scope, finds top-K similar candidates (FTS + title-trigram) and asks the LLM to merge / replace / invalidate where appropriate. Mutating; respects dry_run (default true). Requires an active AI provider. Returns: { evaluated, verdicts: [{subject_id, verdict, affected_ids}], applied_count, dry_run }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | When true (default), compute verdicts without writing. Set false to apply merges / invalidations. | |
| project_root | No | Project root to consolidate (default: current project). | |
| service_name | No | Filter input + scope of consolidation to this subproject. | |
| max_decisions | No | Cost guard: max subject decisions evaluated per call (default: config.memory.consolidation.defaultMaxDecisions or 50). | |
| same_type_only | No | When true, only compare decisions of the same DecisionType (more conservative; default: config or false). | |
| purge_low_quality | No | Maintenance mode (no AI required). When true, invalidate active MINED/AUTO decisions that fail the quality gate — truncated mid-sentence titles, single-word or broken-encoding summaries, non-English fragments. Respects dry_run (default true → preview only). Manual decisions are never touched. Use this to clean legacy garbage produced before the extraction gate shipped. | |
| min_title_similarity | No | Minimum trigram-title similarity for candidate consideration (default: config.memory.consolidation.defaultMinTitleSimilarity or 0.4). |