Topic cluster

From gonzalezpazmonica/pm-workspace · View interactive version

Topic cluster is an AI agent skill from the GitHub repository gonzalezpazmonica/pm-workspace. Usar cuando se agrupan retros, PBIs o incidentes en topics para detectar patrones transversales.

How to use this skill

Skill file

Skill: Topic Cluster

Descubre patrones que cruzan retros, PBIs, incidents, lessons.

Ref: SE-033, docs/propuestas/SE-033-topic-cluster-skill.md.

Cuando usar

Cuando NO usar

Invocacion

# Input via stdin
cat retros.json | python3 scripts/topic-cluster.py --min-cluster-size 3

# Con JSON pretty
cat pbis.json | python3 scripts/topic-cluster.py --json

Input schema

{
  "documents": [
    {"id": "retro-2026-q1-alpha", "text": "Sprint planning took 3x expected time..."}
  ],
  "min_cluster_size": 3,
  "nr_topics": null
}

Output

{
  "topics": [
    {
      "id": 0,
      "label": "sprint planning time",
      "keywords": ["sprint", "planning", "time", "overrun"],
      "size": 7,
      "documents": ["retro-1", "retro-3", "retro-5"]
    }
  ],
  "outliers": ["retro-8"],
  "backend": "bertopic|fallback-keyword",
  "model_info": {"sbert": "all-MiniLM-L6-v2", "docs": 15, "clusters": 3},
  "latency_ms": 12000
}

Backends

| Backend | Cuando | Latencia | Calidad |

|---|---|---|---|

| bertopic | bertopic+sentence-transformers instalados | 10-30s / 100 docs | Alta — semantic clusters |

| fallback-keyword | Sin deps ML | <1s / 100 docs | Media — surface keywords |

Instalacion (opt-in)

pip install bertopic sentence-transformers
# Primera invocacion descarga all-MiniLM-L6-v2 (~80MB)

Zero-install default: script funciona con fallback keyword sin instalar nada.

Casos de uso

Sprint retro cluster

bash scripts/collect-retros.sh --sprint 42 --json | \
  python3 scripts/topic-cluster.py --min-cluster-size 3

Backlog pattern detection

bash scripts/backlog-dump.sh --project alpha --json | \
  python3 scripts/topic-cluster.py --nr-topics auto

Cross-project lessons

find output/lessons -name "*.json" -exec cat {} \; | \
  jq -s '{documents: .}' | \
  python3 scripts/topic-cluster.py --min-cluster-size 2

Interpretacion

Costes

Referencias

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.