build_decision_clusters
Recomputes thematic L2 clusters over a decision store using an LLM, updating existing clusters by trigram similarity. Returns change statistics.
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 |
|---|---|---|---|
| project_root | No | Project root to cluster (default: current project). | |
| service_name | No | Filter input + scope of stored clusters to this subproject. | |
| max_clusters | No | Hard cap on returned clusters (default: 8). | |
| 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). |