build_decision_clusters
Recomputes L2 thematic clusters from decisions using an AI provider; stable IDs merge fresh clusters matching existing titles. Returns counts of created, updated, removed clusters.
Instructions
Recompute the L2 thematic cluster overlay over the decision store using the configured LLM. Stable cluster ids: a fresh cluster whose title matches an existing one (trigram Jaccard >=0.8) updates the existing row in place. Mutates the cluster store; idempotent. Requires an active AI provider — returns a structured error otherwise. Returns JSON: { created, updated, removed, total_after, clusters, strategy_used }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Drop existing clusters in scope before rebuilding (default: false). | |
| dry_run | No | Compute clusters but do not write to the DB (default: false). | |
| max_clusters | No | Hard cap on returned clusters (default: 8). | |
| project_root | No | Project root to cluster (default: current project). | |
| service_name | No | Filter input + scope of stored clusters to this subproject. |