/groom
Strategic backlog management. Parallel investigation, synthesis, themed recommendations.
Modes
| Mode |
Intent |
| explore (default) |
Parallel investigation → synthesized themes → prioritized backlog items |
| rethink |
Deep architectural exploration of a target system → one clear recommendation |
| moonshot |
Explore variant — Strategist thinks from first principles, ignoring current backlog |
| scaffold |
Project bootstrapping — quality gates, test infrastructure, CI, linting |
| tidy |
Prune, reorder, archive completed items |
Backlog Format: backlog.d/
backlog.d/
├── 001-fix-auth-rotation.md
├── 002-add-webhook-retry.md
└── _done/
└── 000-initial-scaffold.md
Each file:
# Fix auth token rotation
Priority: high
Status: ready | blocked | in-progress | done
Estimate: S | M | L | XL
## Goal
<1 sentence — what outcome, not what mechanism>
## Non-Goals
- <what NOT to do>
## Oracle
- [ ] <mechanically verifiable criterion — prefer executable commands over prose>
- [ ] <"How will we know this is done?" — even rough oracles make items buildable>
## Notes
<context, constraints, prior art>
Context Loading (all modes except tidy)
Before investigation, the orchestrator gathers baseline context:
- Read
project.md if it exists — store as project context for investigator prompts
- Read
backlog.d/ — note existing items, their status, and any gaps
- Read
.groom/retro/ if it exists — extract effort calibration and blocker patterns
- Cap check: if >30 backlog items open, declare a reduction session (no new items until under cap)
- Ask the user: "Anything on your mind? Bugs, friction, missing features?"
This takes <2 minutes. Do not block on missing artifacts — note their absence and proceed.
Investigation Bench
Three named investigators per mode, all launched in parallel via the Agent tool
in a single message. See references/investigation-bench.md for full prompt templates.
MANDATORY PARALLEL FANOUT. All three investigators must launch simultaneously.
A grooming session that only runs one investigator has failed the investigation goal.
Explore Investigators
| Investigator |
Lens |
Mandate |
Agent Type |
| Archaeologist |
Codebase health |
Complexity hotspots, test gaps, coupling smells, dead code. "What's fragile?" |
Explore |
| Strategist |
Product opportunity |
User journey friction, missing capabilities, competitive gaps. "What would users pay more for?" |
Explore |
| Velocity |
Effort patterns |
Fix-to-feature ratio, churn hotspots, stalled work. "Where is effort not producing value?" |
Explore |
For moonshot mode: the Strategist gets a modified prompt — "Forget the current backlog.
What's the single highest-leverage thing we're not building?"
Rethink Investigators
| Investigator |
Lens |
Mandate |
Agent Type |
| Mapper |
System topology |
Deep dependency trace, data flows, coupling points. "What breaks if you pull any thread?" |
Explore |
| Simplifier |
Radical simplicity |
From-scratch rebuild perspective. "What layers can be deleted?" |
Plan |
| Scout |
External perspectives |
Invokes /research thinktank. "What has the industry learned that this codebase hasn't?" |
general-purpose |
Investigator Output Format (shared)
Every investigator returns this exact shape:
## [Name] Report
### Top 3 Findings
1. [finding] — Evidence: [file:line / commit / metric]. Impact: high/med/low.
2. ...
3. ...
### Strategic Theme
[One sentence: the overarching theme these findings point to]
### Single Recommendation
[One concrete action. Not a list. Not "consider." A specific thing to do.]
Synthesis Protocol
After all investigators return, the orchestrator (you) synthesizes. Do NOT present
raw findings. Do NOT delegate synthesis to a sub-agent — this requires product judgment.
- Cross-reference — Which findings appear across 2+ investigators? (highest signal)
- Theme extraction — Group findings into 2-4 strategic themes. A theme is a cluster
of findings that share a root cause or a shared solution. Not individual items — themes.
- Dependency map — Do any themes depend on others? (e.g., "test infrastructure" enables
"safe refactoring")
- Rank — Order by: (impact on product vision) × (feasibility) / (effort)
- Present — One theme at a time. For each: evidence from investigators, recommended
action, rough effort (S/M/L). Ask the user: explore deeper, write backlog item, or skip?
Output format:
## Grooming Synthesis
### Investigator Convergence
[Findings that appeared from 2+ investigators — these are highest signal]
### Theme 1: [Name]
**Evidence:** Archaeologist found X, Strategist found Y, Velocity confirms Z.
**Recommendation:** [one concrete action]
**Effort:** S/M/L
**Impact:** [why this matters for the product vision]
### Theme 2: ...
### Dependency Order
Theme A enables Theme B. Recommend executing A first.
Workflow: Explore
Phase-gated. Each phase must complete before the next begins.
1. CONTEXT — Load baseline (see Context Loading above)
2. INVESTIGATE — Launch all three explore investigators in parallel
Gate: all three returned structured reports.
3. SYNTHESIZE — Cross-reference, theme, rank (see Synthesis Protocol)
Gate: themes extracted with evidence and recommendations. Not raw findings.
4. DISCUSS — Present one theme at a time. Recommend, don't list.
Gate: user decides per theme (explore deeper / write item / skip).
5. WRITE — Create backlog.d/ files for approved themes
Gate: every item has Goal + Non-Goals + Oracle.
Use references/agent-issue-writing.md for issue quality standards.
6. PRIORITIZE — Reorder backlog.d/ by value/effort ratio
Workflow: Rethink
1. CONTEXT — Load baseline + user specifies the target system
2. INVESTIGATE — Launch all three rethink investigators in parallel
Gate: all three returned structured reports.
3. SYNTHESIZE — Distill into 2-3 architectural options with honest tradeoffs
Always include "do nothing" as a viable option.
4. RECOMMEND — Pick one option. Argue for it. Be opinionated.
Gate: one clear recommendation with reasoning.
5. DISCUSS — User approves, modifies, or rejects
6. WRITE — One backlog.d/ item for the recommended change
Workflow: Scaffold
Bootstrap a new project with quality gates:
- Test infrastructure (framework, coverage gates)
- Linting (ESLint/Biome/clippy with strict rules)
- Type checking
- Pre-commit hooks
- CI pipeline
- CLAUDE.md with project-specific instructions
Workflow: Tidy
- Backlog audit — count open items, check against 30-item cap
- Archive completed items to
backlog.d/_done/
- Delete stale items (>30 days untouched, no longer relevant)
- Verify each remaining item has Goal + Oracle
- Reorder remaining by priority
- If BACKLOG.md / icebox exists, review it — promote, archive, or leave
Gotchas
- Investigators returning "everything is fine" — Red flag. Push harder. Every codebase has findings; an investigator that found none didn't look.
- Synthesis that lists findings without theming — That's a report, not synthesis. Group into themes before presenting.
- Themes without recommendations — That's a menu, not grooming. Pick one action per theme and argue for it.
- Running one investigator and calling it done — Mandatory parallel fanout. All three, every time.
- Items without oracles — If you can't write a "definition of done" with checkable criteria, the item isn't scoped. Go back and scope it.
- Over-decomposing — An agent-hour of work is one item, not three. Compression ratios make most splits unnecessary.
- Backlog as graveyard — Items >30 days old with no progress are dead. Archive or delete during tidy.
Principles
- Investigate before opining — parallel investigation first, opinions after evidence
- Theme, don't itemize — strategic themes, not feature laundry lists
- Recommend, don't list — always have an opinion, argue for it
- One theme at a time — don't overwhelm during discussion
- Product vision is the ranking function — rank by impact on the user, not technical elegance
- Every item needs an oracle — if you can't verify done, the item isn't ready
- File-driven — backlog.d/ is the source of truth
1---2name: groom3description: Backlog management, brainstorming, architectural exploration, project bootstrapping. File-driven backlog via backlog.d/. Parallel investigation bench, synthesis protocol, themed recommendations. Product vision + technical excellence. Use when: backlog session, "groom", "what should we build", "rethink this", "biggest opportunity", "backlog", "prioritize", "tidy", "scaffold". Trigger: /groom, /backlog, /rethink, /moonshot, /scaffold, /tidy.4---56# /groom78Strategic backlog management. Parallel investigation, synthesis, themed recommendations.910## Modes1112| Mode | Intent |13|------|--------|14| **explore** (default) | Parallel investigation → synthesized themes → prioritized backlog items |15| **rethink** | Deep architectural exploration of a target system → one clear recommendation |16| **moonshot** | Explore variant — Strategist thinks from first principles, ignoring current backlog |17| **scaffold** | Project bootstrapping — quality gates, test infrastructure, CI, linting |18| **tidy** | Prune, reorder, archive completed items |1920## Backlog Format: backlog.d/2122```23backlog.d/24├── 001-fix-auth-rotation.md25├── 002-add-webhook-retry.md26└── _done/27 └── 000-initial-scaffold.md28```2930Each file:31```markdown32# Fix auth token rotation3334Priority: high35Status: ready | blocked | in-progress | done36Estimate: S | M | L | XL3738## Goal39<1 sentence — what outcome, not what mechanism>4041## Non-Goals42- <what NOT to do>4344## Oracle45- [ ] <mechanically verifiable criterion — prefer executable commands over prose>46- [ ] <"How will we know this is done?" — even rough oracles make items buildable>4748## Notes49<context, constraints, prior art>50```5152## Context Loading (all modes except tidy)5354Before investigation, the orchestrator gathers baseline context:55561. Read `project.md` if it exists — store as project context for investigator prompts572. Read `backlog.d/` — note existing items, their status, and any gaps583. Read `.groom/retro/` if it exists — extract effort calibration and blocker patterns594. **Cap check:** if >30 backlog items open, declare a reduction session (no new items until under cap)605. Ask the user: "Anything on your mind? Bugs, friction, missing features?"6162This takes <2 minutes. Do not block on missing artifacts — note their absence and proceed.6364## Investigation Bench6566Three named investigators per mode, all launched **in parallel** via the Agent tool67in a single message. See `references/investigation-bench.md` for full prompt templates.6869**MANDATORY PARALLEL FANOUT.** All three investigators must launch simultaneously.70A grooming session that only runs one investigator has failed the investigation goal.7172### Explore Investigators7374| Investigator | Lens | Mandate | Agent Type |75|---|---|---|---|76| **Archaeologist** | Codebase health | Complexity hotspots, test gaps, coupling smells, dead code. "What's fragile?" | Explore |77| **Strategist** | Product opportunity | User journey friction, missing capabilities, competitive gaps. "What would users pay more for?" | Explore |78| **Velocity** | Effort patterns | Fix-to-feature ratio, churn hotspots, stalled work. "Where is effort not producing value?" | Explore |7980For **moonshot** mode: the Strategist gets a modified prompt — "Forget the current backlog.81What's the single highest-leverage thing we're not building?"8283### Rethink Investigators8485| Investigator | Lens | Mandate | Agent Type |86|---|---|---|---|87| **Mapper** | System topology | Deep dependency trace, data flows, coupling points. "What breaks if you pull any thread?" | Explore |88| **Simplifier** | Radical simplicity | From-scratch rebuild perspective. "What layers can be deleted?" | Plan |89| **Scout** | External perspectives | Invokes `/research thinktank`. "What has the industry learned that this codebase hasn't?" | general-purpose |9091### Investigator Output Format (shared)9293Every investigator returns this exact shape:9495```markdown96## [Name] Report97### Top 3 Findings981. [finding] — Evidence: [file:line / commit / metric]. Impact: high/med/low.992. ...1003. ...101### Strategic Theme102[One sentence: the overarching theme these findings point to]103### Single Recommendation104[One concrete action. Not a list. Not "consider." A specific thing to do.]105```106107## Synthesis Protocol108109After all investigators return, the **orchestrator** (you) synthesizes. Do NOT present110raw findings. Do NOT delegate synthesis to a sub-agent — this requires product judgment.1111121. **Cross-reference** — Which findings appear across 2+ investigators? (highest signal)1132. **Theme extraction** — Group findings into 2-4 strategic themes. A theme is a cluster114 of findings that share a root cause or a shared solution. Not individual items — themes.1153. **Dependency map** — Do any themes depend on others? (e.g., "test infrastructure" enables116 "safe refactoring")1174. **Rank** — Order by: (impact on product vision) × (feasibility) / (effort)1185. **Present** — One theme at a time. For each: evidence from investigators, recommended119 action, rough effort (S/M/L). Ask the user: explore deeper, write backlog item, or skip?120121Output format:122123```markdown124## Grooming Synthesis125126### Investigator Convergence127[Findings that appeared from 2+ investigators — these are highest signal]128129### Theme 1: [Name]130**Evidence:** Archaeologist found X, Strategist found Y, Velocity confirms Z.131**Recommendation:** [one concrete action]132**Effort:** S/M/L133**Impact:** [why this matters for the product vision]134135### Theme 2: ...136137### Dependency Order138Theme A enables Theme B. Recommend executing A first.139```140141## Workflow: Explore142143Phase-gated. Each phase must complete before the next begins.144145### 1. CONTEXT — Load baseline (see Context Loading above)146### 2. INVESTIGATE — Launch all three explore investigators in parallel147Gate: all three returned structured reports.148### 3. SYNTHESIZE — Cross-reference, theme, rank (see Synthesis Protocol)149Gate: themes extracted with evidence and recommendations. Not raw findings.150### 4. DISCUSS — Present one theme at a time. Recommend, don't list.151Gate: user decides per theme (explore deeper / write item / skip).152### 5. WRITE — Create backlog.d/ files for approved themes153Gate: every item has Goal + Non-Goals + Oracle.154Use `references/agent-issue-writing.md` for issue quality standards.155### 6. PRIORITIZE — Reorder backlog.d/ by value/effort ratio156157## Workflow: Rethink158159### 1. CONTEXT — Load baseline + user specifies the target system160### 2. INVESTIGATE — Launch all three rethink investigators in parallel161Gate: all three returned structured reports.162### 3. SYNTHESIZE — Distill into 2-3 architectural options with honest tradeoffs163Always include "do nothing" as a viable option.164### 4. RECOMMEND — Pick one option. Argue for it. Be opinionated.165Gate: one clear recommendation with reasoning.166### 5. DISCUSS — User approves, modifies, or rejects167### 6. WRITE — One backlog.d/ item for the recommended change168169## Workflow: Scaffold170171Bootstrap a new project with quality gates:1721. Test infrastructure (framework, coverage gates)1732. Linting (ESLint/Biome/clippy with strict rules)1743. Type checking1754. Pre-commit hooks1765. CI pipeline1776. CLAUDE.md with project-specific instructions178179## Workflow: Tidy1801811. **Backlog audit** — count open items, check against 30-item cap1822. Archive completed items to `backlog.d/_done/`1833. Delete stale items (>30 days untouched, no longer relevant)1844. Verify each remaining item has Goal + Oracle1855. Reorder remaining by priority1866. If BACKLOG.md / icebox exists, review it — promote, archive, or leave187188## Gotchas189190- **Investigators returning "everything is fine"** — Red flag. Push harder. Every codebase has findings; an investigator that found none didn't look.191- **Synthesis that lists findings without theming** — That's a report, not synthesis. Group into themes before presenting.192- **Themes without recommendations** — That's a menu, not grooming. Pick one action per theme and argue for it.193- **Running one investigator and calling it done** — Mandatory parallel fanout. All three, every time.194- **Items without oracles** — If you can't write a "definition of done" with checkable criteria, the item isn't scoped. Go back and scope it.195- **Over-decomposing** — An agent-hour of work is one item, not three. Compression ratios make most splits unnecessary.196- **Backlog as graveyard** — Items >30 days old with no progress are dead. Archive or delete during tidy.197198## Principles199200- **Investigate before opining** — parallel investigation first, opinions after evidence201- **Theme, don't itemize** — strategic themes, not feature laundry lists202- **Recommend, don't list** — always have an opinion, argue for it203- **One theme at a time** — don't overwhelm during discussion204- **Product vision is the ranking function** — rank by impact on the user, not technical elegance205- **Every item needs an oracle** — if you can't verify done, the item isn't ready206- **File-driven** — backlog.d/ is the source of truth