Data — is it sound?
Brief 22

Git Hotspot Mining

Mine the git history for churn, bug magnets, coupled files, and bus-factor silos — predict where the next bug lands.

HOTSPOTS.md4 phases6 lenses~2.5k chars

Free & open · no signup · read-only — it ends by asking · nothing leaves your machine

What it does

You are working inside this repo. Mission: mine the git history for what the code alone can't tell you — where change concentrates, where bugs cluster, which files secretly move together, and where knowledge lives in one head.

Read-only pass: git log analysis only. Your only write is the report file.

What it looks for

6 lenses it looks through

Phase 2 sweeps the codebase through every one of these, citing file and line for each finding.

1

Churn × size

files both large and frequently edited: the highest-risk quadrant

2

Bug magnets

the fix-commit leaders; is each inherently hard, or badly structured?

3

Temporal coupling

files that change together but live far apart: a hidden dependency or a missing abstraction

4

Knowledge silos

single-author critical areas: the bus-factor map

5

Stale foundations

old, untouched code that everything depends on; is stability maturity or fear?

6

Trajectory

is churn concentrating (a hardening core) or spreading (architecture erosion)?

The deliverable

What lands in your repo

One structured report at the repo root — or in reports/, if you keep one — the same shape every time, ready for a teammate — or the optional Studio — to act on.

HOTSPOTS.md
1
Hotspot ranking
file · commits · fix-commits · size · verdict
2
Coupling pairs
with the suggested resolution: merge, extract shared piece, or accept
3
Silo map
area · owner · risk · suggested pairing or docs
4
Prediction
where the next bug statistically lands, and the preemptive move
5
Refactor targets
justified by history, not taste
One file. Evidence-backed. It ends by asking before touching anything.
How it works

What it makes the agent do

Every Goal Prompt follows the same four steps, so results are consistent and repeatable — no matter which one you run.

1
Phase 1

Extract the history

Run read-only git analysis (adjust ranges to repo age).

2
Phase 2

Interpret through 6 lenses

Churn × size — files both large and frequently edited.

3
Phase 3

Curate

Numbers required.

4
Phase 4

Report

Create HOTSPOTS.md at repo root.

Get started

Three ways to run this Goal Prompt

01 · COPY

Paste it in

Copy it and paste it into your agent inside the repo you want checked.

02 · INSTALL

As a slash command

Install the goal plugin once — two commands — then just type /goal:git-hotspot-mining.

1/plugin marketplace add GhostlyGawd/goal-prompts
2/plugin install goal@goal-prompts

Or install only this Goal Prompt as /goal-git-hotspot-mining:

curl -fsSL https://goal-prompts.vercel.app/install | BRIEF=22 sh
03 · AGENT

From an agent (MCP)

Let an agent fetch it mid-conversation, or pull the raw Goal Prompt by URL.

https://goal-prompts.vercel.app/raw/22.md
Transparency

The exact prompt

Nothing hidden — this is the whole Goal Prompt, verbatim. Read it in a minute, edit it, or copy it as-is.

Read the full brief (2,531 characters)
# Goal: Git Hotspot Mining

You are working inside this repo. Mission: mine the git history for what the code alone can't tell you — where change concentrates, where bugs cluster, which files secretly move together, and where knowledge lives in one head.

Read-only pass: git log analysis only. Your only write is the report file.

## Phase 1 — Extract the history
Run read-only git analysis (adjust ranges to repo age):
- Churn leaders: file change frequency (git log with name-only output, aggregated)
- Fix magnets: files most present in commits whose message contains fix/bug/hotfix
- Coupling: files that repeatedly appear in the same commits
- Authorship: files/areas with a single significant author

## Phase 2 — Interpret through 6 lenses
1. **Churn × size** — files both large and frequently edited: the highest-risk quadrant
2. **Bug magnets** — the fix-commit leaders; is each inherently hard, or badly structured?
3. **Temporal coupling** — files that change together but live far apart: a hidden dependency or a missing abstraction
4. **Knowledge silos** — single-author critical areas: the bus-factor map
5. **Stale foundations** — old, untouched code that everything depends on; is stability maturity or fear?
6. **Trajectory** — is churn concentrating (a hardening core) or spreading (architecture erosion)?

## Phase 3 — Curate
- Numbers required: every claim carries its counts
- Cross-check against the code: history flags, code confirms

## Phase 4 — Report
Create `HOTSPOTS.md` at repo root:
1. **Hotspot ranking** — file · commits · fix-commits · size · verdict
2. **Coupling pairs** — with the suggested resolution: merge, extract shared piece, or accept
3. **Silo map** — area · owner · risk · suggested pairing or docs
4. **Prediction** — where the next bug statistically lands, and the preemptive move
5. **Refactor targets** — justified by history, not taste

Start the report with today's date. If `HOTSPOTS.md` already exists from a previous run, read it first and lead with what changed since.

## Rules
- History over opinion: churn data outranks aesthetic judgments
- A hotspot earns refactoring only if it's still changing
- No meaningful git history (fresh or shallow clone) in this repo? Say so in a one-paragraph null report and stop — a null result is a valid finding.
- If a `reports/` directory exists at the repo root, write the report there instead of the root.
- Before asking, present the top findings as a ranked list in plain words
- Report only — end by asking which target to address

House rules for this Goal Prompt

  • History over opinion: churn data outranks aesthetic judgments
  • A hotspot earns refactoring only if it's still changing
  • No meaningful git history (fresh or shallow clone) in this repo? Say so in a one-paragraph null report and stop — a null result is a valid finding.
  • If a reports/ directory exists at the repo root, write the report there instead of the root.
  • Before asking, present the top findings as a ranked list in plain words
  • Report only — end by asking which target to address
Keep exploring

More Data briefs

Runs inside these playbooks — curated sequences you can launch with one paste: