Skip to content

Commit a5bba3d

Browse files
feat(skills): add document-review skill for brainstorm/plan refinement (#112)
Add optional review and refine step to workflows:brainstorm and workflows:plan that checks documents for clarity, completeness, user intent, and YAGNI. - New document-review skill with review questions and evaluation criteria - Brainstorm Phase 4 offers "Review and refine" option - Plan post-generation offers "Review and refine" after technical review - Includes YAGNI-based simplification guidance - Max 2 iteration rounds before suggesting to proceed Co-authored-by: Kieran Klaassen <kieranklaassen@users.noreply.github.com>
1 parent 1bdd103 commit a5bba3d

7 files changed

Lines changed: 119 additions & 22 deletions

File tree

plugins/compound-engineering/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Core workflow commands use `workflows:` prefix to avoid collisions with built-in
9494
| `/create-agent-skill` | Create or edit Claude Code skills |
9595
| `/generate_command` | Generate new slash commands |
9696
| `/heal-skill` | Fix skill documentation issues |
97-
| `/plan_review` | Multi-agent plan review in parallel |
97+
| `/technical_review` | Multi-agent technical/architecture review in parallel |
9898
| `/report-bug` | Report a bug in the plugin |
9999
| `/reproduce-bug` | Reproduce bugs using logs and console |
100100
| `/resolve_parallel` | Resolve TODO comments in parallel |
@@ -129,7 +129,8 @@ Core workflow commands use `workflows:` prefix to avoid collisions with built-in
129129

130130
| Skill | Description |
131131
|-------|-------------|
132-
| `brainstorming` | Guided ideation for exploring requirements and approaches |
132+
| `brainstorming` | Explore requirements and approaches through collaborative dialogue |
133+
| `document-review` | Improve documents through structured self-review |
133134
| `every-style-editor` | Review copy for Every's style guide compliance |
134135
| `file-todos` | File-based todo tracking system |
135136
| `git-worktree` | Manage Git worktrees for parallel development |

plugins/compound-engineering/commands/deepen-plan.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,14 +480,14 @@ After writing the enhanced plan, use the **AskUserQuestion tool** to present the
480480

481481
**Options:**
482482
1. **View diff** - Show what was added/changed
483-
2. **Run `/plan_review`** - Get feedback from reviewers on enhanced plan
483+
2. **Run `/technical_review`** - Get feedback from reviewers on enhanced plan
484484
3. **Start `/workflows:work`** - Begin implementing this enhanced plan
485485
4. **Deepen further** - Run another round of research on specific sections
486486
5. **Revert** - Restore original plan (if backup exists)
487487

488488
Based on selection:
489489
- **View diff** → Run `git diff [plan_path]` or show before/after
490-
- **`/plan_review`** → Call the /plan_review command with the plan file path
490+
- **`/technical_review`** → Call the /technical_review command with the plan file path
491491
- **`/workflows:work`** → Call the /workflows:work command with the plan file path
492492
- **Deepen further** → Ask which sections need more research, then re-run those agents
493493
- **Revert** → Restore from git or backup

plugins/compound-engineering/commands/plan_review.md

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
name: technical_review
3+
description: Have multiple specialized agents review the technical approach and architecture of a plan in parallel
4+
argument-hint: "[plan file path or plan content]"
5+
---
6+
7+
Have @agent-dhh-rails-reviewer @agent-kieran-rails-reviewer @agent-code-simplicity-reviewer review the technical approach in this plan in parallel.

plugins/compound-engineering/commands/workflows/brainstorm.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,19 @@ Use **AskUserQuestion tool** to present next steps:
8585
**Question:** "Brainstorm captured. What would you like to do next?"
8686

8787
**Options:**
88-
1. **Proceed to planning** - Run `/workflows:plan` (will auto-detect this brainstorm)
89-
2. **Refine design further** - Continue exploring
88+
1. **Review and refine** - Improve the document through structured self-review
89+
2. **Proceed to planning** - Run `/workflows:plan` (will auto-detect this brainstorm)
9090
3. **Done for now** - Return later
9191

92+
**If user selects "Review and refine":**
93+
94+
Load the `document-review` skill and apply it to the brainstorm document.
95+
96+
When document-review returns "Review complete", present next steps:
97+
98+
1. **Move to planning** - Continue to `/workflows:plan` with this document
99+
2. **Done for now** - Brainstorming complete. To start planning later: `/workflows:plan [document-path]`
100+
92101
## Output Summary
93102

94103
When complete, display:

plugins/compound-engineering/commands/workflows/plan.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -498,25 +498,25 @@ After writing the plan file, use the **AskUserQuestion tool** to present these o
498498
**Options:**
499499
1. **Open plan in editor** - Open the plan file for review
500500
2. **Run `/deepen-plan`** - Enhance each section with parallel research agents (best practices, performance, UI)
501-
3. **Run `/plan_review`** - Get feedback from reviewers (DHH, Kieran, Simplicity)
502-
4. **Start `/workflows:work`** - Begin implementing this plan locally
503-
5. **Start `/workflows:work` on remote** - Begin implementing in Claude Code on the web (use `&` to run in background)
504-
6. **Create Issue** - Create issue in project tracker (GitHub/Linear)
505-
7. **Simplify** - Reduce detail level
501+
3. **Run `/technical_review`** - Technical feedback from code-focused reviewers (DHH, Kieran, Simplicity)
502+
4. **Review and refine** - Improve the document through structured self-review
503+
5. **Start `/workflows:work`** - Begin implementing this plan locally
504+
6. **Start `/workflows:work` on remote** - Begin implementing in Claude Code on the web (use `&` to run in background)
505+
7. **Create Issue** - Create issue in project tracker (GitHub/Linear)
506506

507507
Based on selection:
508508
- **Open plan in editor** → Run `open docs/plans/<plan_filename>.md` to open the file in the user's default editor
509509
- **`/deepen-plan`** → Call the /deepen-plan command with the plan file path to enhance with research
510-
- **`/plan_review`** → Call the /plan_review command with the plan file path
510+
- **`/technical_review`** → Call the /technical_review command with the plan file path
511+
- **Review and refine** → Load `document-review` skill.
511512
- **`/workflows:work`** → Call the /workflows:work command with the plan file path
512513
- **`/workflows:work` on remote** → Run `/workflows:work docs/plans/<plan_filename>.md &` to start work in background for Claude Code web
513514
- **Create Issue** → See "Issue Creation" section below
514-
- **Simplify** → Ask "What should I simplify?" then regenerate simpler version
515515
- **Other** (automatically provided) → Accept free text for rework or specific changes
516516

517517
**Note:** If running `/workflows:plan` with ultrathink enabled, automatically run `/deepen-plan` after plan creation for maximum depth and grounding.
518518

519-
Loop back to options after Simplify or Other changes until user selects `/workflows:work` or `/plan_review`.
519+
Loop back to options after Simplify or Other changes until user selects `/workflows:work` or `/technical_review`.
520520

521521
## Issue Creation
522522

@@ -546,6 +546,6 @@ When user selects "Create Issue", detect their project tracker from CLAUDE.md:
546546

547547
5. **After creation:**
548548
- Display the issue URL
549-
- Ask if they want to proceed to `/workflows:work` or `/plan_review`
549+
- Ask if they want to proceed to `/workflows:work` or `/technical_review`
550550

551551
NEVER CODE! Just research and write the plan.
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
---
2+
name: document-review
3+
description: This skill should be used to refine brainstorm or plan documents before proceeding to the next workflow step. It applies when a brainstorm or plan document exists and the user wants to improve it.
4+
---
5+
6+
# Document Review
7+
8+
Improve brainstorm or plan documents through structured review.
9+
10+
## Step 1: Get the Document
11+
12+
**If a document path is provided:** Read it, then proceed to Step 2.
13+
14+
**If no document is specified:** Ask which document to review, or look for the most recent brainstorm/plan in `docs/brainstorms/` or `docs/plans/`.
15+
16+
## Step 2: Assess
17+
18+
Read through the document and ask:
19+
20+
- What is unclear?
21+
- What is unnecessary?
22+
- What decision is being avoided?
23+
- What assumptions are unstated?
24+
- Where could scope accidentally expand?
25+
26+
These questions surface issues. Don't fix yet—just note what you find.
27+
28+
## Step 3: Evaluate
29+
30+
Score the document against these criteria:
31+
32+
| Criterion | What to Check |
33+
|-----------|---------------|
34+
| **Clarity** | Problem statement is clear, no vague language ("probably," "consider," "try to") |
35+
| **Completeness** | Required sections present, constraints stated, open questions flagged |
36+
| **Specificity** | Concrete enough for next step (brainstorm → can plan, plan → can implement) |
37+
| **YAGNI** | No hypothetical features, simplest approach chosen |
38+
39+
If invoked within a workflow (after `/workflows:brainstorm` or `/workflows:plan`), also check:
40+
- **User intent fidelity** — Document reflects what was discussed, assumptions validated
41+
42+
## Step 4: Identify the Critical Improvement
43+
44+
Among everything found in Steps 2-3, does one issue stand out? If something would significantly improve the document's quality, this is the "must address" item. Highlight it prominently.
45+
46+
## Step 5: Make Changes
47+
48+
Present your findings, then:
49+
50+
1. **Auto-fix** minor issues (vague language, formatting) without asking
51+
2. **Ask approval** before substantive changes (restructuring, removing sections, changing meaning)
52+
3. **Update** the document inline—no separate files, no metadata sections
53+
54+
### Simplification Guidance
55+
56+
Simplification is purposeful removal of unnecessary complexity, not shortening for its own sake.
57+
58+
**Simplify when:**
59+
- Content serves hypothetical future needs, not current ones
60+
- Sections repeat information already covered elsewhere
61+
- Detail exceeds what's needed to take the next step
62+
- Abstractions or structure add overhead without clarity
63+
64+
**Don't simplify:**
65+
- Constraints or edge cases that affect implementation
66+
- Rationale that explains why alternatives were rejected
67+
- Open questions that need resolution
68+
69+
## Step 6: Offer Next Action
70+
71+
After changes are complete, ask:
72+
73+
1. **Refine again** - Another review pass
74+
2. **Review complete** - Document is ready
75+
76+
### Iteration Guidance
77+
78+
After 2 refinement passes, recommend completion—diminishing returns are likely. But if the user wants to continue, allow it.
79+
80+
Return control to the caller (workflow or user) after selection.
81+
82+
## What NOT to Do
83+
84+
- Do not rewrite the entire document
85+
- Do not add new sections or requirements the user didn't discuss
86+
- Do not over-engineer or add complexity
87+
- Do not create separate review files or add metadata sections

0 commit comments

Comments
 (0)