{
  "version": "act 2.0.0",
  "slug": "where-bugs-live",
  "name": "where-bugs-live",
  "description": "Use when you need to find the riskiest code in a repository \u2014 where bugs are most likely to live \u2014 by combining git churn, complexity, co-change coupling, and ownership concentration into one ranked, explained list.",
  "url": "https://act101.ai/docs/skills/where-bugs-live",
  "body_md": "# Where Bugs Live\n\nRank the code most likely to harbor defects by composing four signals. Bugs cluster where code changes often, is complex, is entangled with other code, and is owned by few people.\n\n## When to use\n\n- Prioritizing a code-review, test-writing, or refactoring effort on a large codebase.\n- Onboarding to an unfamiliar repo and wanting to know where the landmines are.\n- Triaging technical debt with evidence, not vibes.\n\n## Inputs\n\nThe git-overlay ops require a git repository with history. All are MCP tools (Architecture tier).\n\n## Protocol\n\n1. **Churn** \u2014 call `churn_hotspots` (workspace mode, no `file`) to rank symbols by recency-weighted change frequency. High churn = actively-changing, defect-prone code.\n2. **Complexity** \u2014 call `analyze_hotspots` to rank files by composite complexity (cyclomatic, statements, nesting). Complex code hides bugs.\n3. **Coupling** \u2014 call `co_change_clusters` to find symbols that change together. Hidden coupling means a fix in one place needs a fix in another \u2014 a classic bug source.\n4. **Ownership** \u2014 call `ownership_map` to find low-bus-factor symbols. Code owned by one departed author is risky to touch.\n5. **Synthesize** \u2014 intersect and rank: a symbol that is *high-churn AND complex AND in a co-change cluster AND low-bus-factor* is a top risk. Present a ranked list; for each entry, name which signals fired and why it matters. Cite the symbol id and file.\n\n## Output\n\nA ranked, explained risk list. Each item: symbol/file, the firing signals (churn score, complexity, co-change members, bus factor), and a one-line \"why this is risky.\" Lead with the highest-confidence intersections (multiple signals agree).\n\n## Honesty\n\nRespect `modeled_kinds`: for grammars without symbol extraction, churn/co-change/ownership degrade to file-level \u2014 say so rather than implying symbol precision. Churn and ownership are git facts; complexity is a syntactic estimate."
}