@every-env/compound-plugin 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/commands/triage-prs.md +193 -0
- package/.claude-plugin/marketplace.json +4 -4
- package/.github/workflows/ci.yml +25 -0
- package/README.md +25 -4
- package/docs/index.html +14 -14
- package/docs/pages/changelog.html +1 -1
- package/docs/pages/getting-started.html +1 -1
- package/docs/plans/2026-02-08-feat-pr-triage-and-merge-plan.md +128 -0
- package/package.json +1 -1
- package/plans/grow-your-own-garden-plugin-architecture.md +1 -1
- package/plugins/compound-engineering/.claude-plugin/plugin.json +3 -3
- package/plugins/compound-engineering/CHANGELOG.md +32 -0
- package/plugins/compound-engineering/CLAUDE.md +3 -4
- package/plugins/compound-engineering/README.md +20 -7
- package/plugins/compound-engineering/agents/research/best-practices-researcher.md +14 -3
- package/plugins/compound-engineering/agents/research/framework-docs-researcher.md +11 -3
- package/plugins/compound-engineering/agents/research/git-history-analyzer.md +2 -0
- package/plugins/compound-engineering/agents/research/learnings-researcher.md +243 -0
- package/plugins/compound-engineering/agents/research/repo-research-analyst.md +5 -4
- package/plugins/compound-engineering/agents/review/code-simplicity-reviewer.md +1 -0
- package/plugins/compound-engineering/agents/review/pattern-recognition-specialist.md +1 -1
- package/plugins/compound-engineering/agents/review/schema-drift-detector.md +139 -0
- package/plugins/compound-engineering/commands/deepen-plan.md +5 -5
- package/plugins/compound-engineering/commands/report-bug.md +3 -3
- package/plugins/compound-engineering/commands/resolve_todo_parallel.md +2 -0
- package/plugins/compound-engineering/commands/slfg.md +31 -0
- package/plugins/compound-engineering/commands/technical_review.md +7 -0
- package/plugins/compound-engineering/commands/workflows/brainstorm.md +124 -0
- package/plugins/compound-engineering/commands/workflows/compound.md +64 -27
- package/plugins/compound-engineering/commands/workflows/plan.md +127 -42
- package/plugins/compound-engineering/commands/workflows/review.md +12 -0
- package/plugins/compound-engineering/commands/workflows/work.md +72 -2
- package/plugins/compound-engineering/skills/brainstorming/SKILL.md +190 -0
- package/plugins/compound-engineering/skills/compound-docs/SKILL.md +9 -9
- package/plugins/compound-engineering/skills/compound-docs/assets/critical-pattern-template.md +1 -1
- package/plugins/compound-engineering/skills/compound-docs/assets/resolution-template.md +3 -3
- package/plugins/compound-engineering/skills/compound-docs/references/yaml-schema.md +1 -1
- package/plugins/compound-engineering/skills/create-agent-skills/SKILL.md +168 -192
- package/plugins/compound-engineering/skills/create-agent-skills/references/official-spec.md +74 -125
- package/plugins/compound-engineering/skills/create-agent-skills/references/skill-structure.md +109 -329
- package/plugins/compound-engineering/skills/document-review/SKILL.md +87 -0
- package/plugins/compound-engineering/skills/git-worktree/scripts/worktree-manager.sh +2 -10
- package/plugins/compound-engineering/skills/orchestrating-swarms/SKILL.md +1717 -0
- package/plugins/compound-engineering/skills/resolve-pr-parallel/SKILL.md +89 -0
- package/plugins/compound-engineering/skills/resolve-pr-parallel/scripts/get-pr-comments +68 -0
- package/plugins/compound-engineering/skills/resolve-pr-parallel/scripts/resolve-pr-thread +23 -0
- package/src/commands/install.ts +3 -1
- package/src/commands/sync.ts +84 -0
- package/src/converters/claude-to-codex.ts +59 -2
- package/src/converters/claude-to-opencode.ts +7 -5
- package/src/index.ts +2 -0
- package/src/parsers/claude-home.ts +65 -0
- package/src/sync/codex.ts +92 -0
- package/src/sync/opencode.ts +75 -0
- package/src/targets/codex.ts +7 -2
- package/src/targets/opencode.ts +11 -2
- package/src/types/claude.ts +1 -1
- package/src/utils/files.ts +13 -0
- package/src/utils/symlink.ts +43 -0
- package/tests/cli.test.ts +7 -5
- package/tests/codex-converter.test.ts +83 -0
- package/tests/codex-writer.test.ts +32 -0
- package/tests/opencode-writer.test.ts +57 -0
- package/plugins/compound-engineering/commands/plan_review.md +0 -7
- package/plugins/compound-engineering/commands/resolve_pr_parallel.md +0 -49
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: slfg
|
|
3
|
+
description: Full autonomous engineering workflow using swarm mode for parallel execution
|
|
4
|
+
argument-hint: "[feature description]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Swarm-enabled LFG. Run these steps in order, parallelizing where indicated.
|
|
8
|
+
|
|
9
|
+
## Sequential Phase
|
|
10
|
+
|
|
11
|
+
1. `/ralph-wiggum:ralph-loop "finish all slash commands" --completion-promise "DONE"`
|
|
12
|
+
2. `/workflows:plan $ARGUMENTS`
|
|
13
|
+
3. `/compound-engineering:deepen-plan`
|
|
14
|
+
4. `/workflows:work` — **Use swarm mode**: Make a Task list and launch an army of agent swarm subagents to build the plan
|
|
15
|
+
|
|
16
|
+
## Parallel Phase
|
|
17
|
+
|
|
18
|
+
After work completes, launch steps 5 and 6 as **parallel swarm agents** (both only need code to be written):
|
|
19
|
+
|
|
20
|
+
5. `/workflows:review` — spawn as background Task agent
|
|
21
|
+
6. `/compound-engineering:test-browser` — spawn as background Task agent
|
|
22
|
+
|
|
23
|
+
Wait for both to complete before continuing.
|
|
24
|
+
|
|
25
|
+
## Finalize Phase
|
|
26
|
+
|
|
27
|
+
7. `/compound-engineering:resolve_todo_parallel` — resolve any findings from the review
|
|
28
|
+
8. `/compound-engineering:feature-video` — record the final walkthrough and add to PR
|
|
29
|
+
9. Output `<promise>DONE</promise>` when video is in PR
|
|
30
|
+
|
|
31
|
+
Start with step 1 now.
|
|
@@ -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.
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: workflows:brainstorm
|
|
3
|
+
description: Explore requirements and approaches through collaborative dialogue before planning implementation
|
|
4
|
+
argument-hint: "[feature idea or problem to explore]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Brainstorm a Feature or Improvement
|
|
8
|
+
|
|
9
|
+
**Note: The current year is 2026.** Use this when dating brainstorm documents.
|
|
10
|
+
|
|
11
|
+
Brainstorming helps answer **WHAT** to build through collaborative dialogue. It precedes `/workflows:plan`, which answers **HOW** to build it.
|
|
12
|
+
|
|
13
|
+
**Process knowledge:** Load the `brainstorming` skill for detailed question techniques, approach exploration patterns, and YAGNI principles.
|
|
14
|
+
|
|
15
|
+
## Feature Description
|
|
16
|
+
|
|
17
|
+
<feature_description> #$ARGUMENTS </feature_description>
|
|
18
|
+
|
|
19
|
+
**If the feature description above is empty, ask the user:** "What would you like to explore? Please describe the feature, problem, or improvement you're thinking about."
|
|
20
|
+
|
|
21
|
+
Do not proceed until you have a feature description from the user.
|
|
22
|
+
|
|
23
|
+
## Execution Flow
|
|
24
|
+
|
|
25
|
+
### Phase 0: Assess Requirements Clarity
|
|
26
|
+
|
|
27
|
+
Evaluate whether brainstorming is needed based on the feature description.
|
|
28
|
+
|
|
29
|
+
**Clear requirements indicators:**
|
|
30
|
+
- Specific acceptance criteria provided
|
|
31
|
+
- Referenced existing patterns to follow
|
|
32
|
+
- Described exact expected behavior
|
|
33
|
+
- Constrained, well-defined scope
|
|
34
|
+
|
|
35
|
+
**If requirements are already clear:**
|
|
36
|
+
Use **AskUserQuestion tool** to suggest: "Your requirements seem detailed enough to proceed directly to planning. Should I run `/workflows:plan` instead, or would you like to explore the idea further?"
|
|
37
|
+
|
|
38
|
+
### Phase 1: Understand the Idea
|
|
39
|
+
|
|
40
|
+
#### 1.1 Repository Research (Lightweight)
|
|
41
|
+
|
|
42
|
+
Run a quick repo scan to understand existing patterns:
|
|
43
|
+
|
|
44
|
+
- Task repo-research-analyst("Understand existing patterns related to: <feature_description>")
|
|
45
|
+
|
|
46
|
+
Focus on: similar features, established patterns, CLAUDE.md guidance.
|
|
47
|
+
|
|
48
|
+
#### 1.2 Collaborative Dialogue
|
|
49
|
+
|
|
50
|
+
Use the **AskUserQuestion tool** to ask questions **one at a time**.
|
|
51
|
+
|
|
52
|
+
**Guidelines (see `brainstorming` skill for detailed techniques):**
|
|
53
|
+
- Prefer multiple choice when natural options exist
|
|
54
|
+
- Start broad (purpose, users) then narrow (constraints, edge cases)
|
|
55
|
+
- Validate assumptions explicitly
|
|
56
|
+
- Ask about success criteria
|
|
57
|
+
|
|
58
|
+
**Exit condition:** Continue until the idea is clear OR user says "proceed"
|
|
59
|
+
|
|
60
|
+
### Phase 2: Explore Approaches
|
|
61
|
+
|
|
62
|
+
Propose **2-3 concrete approaches** based on research and conversation.
|
|
63
|
+
|
|
64
|
+
For each approach, provide:
|
|
65
|
+
- Brief description (2-3 sentences)
|
|
66
|
+
- Pros and cons
|
|
67
|
+
- When it's best suited
|
|
68
|
+
|
|
69
|
+
Lead with your recommendation and explain why. Apply YAGNI—prefer simpler solutions.
|
|
70
|
+
|
|
71
|
+
Use **AskUserQuestion tool** to ask which approach the user prefers.
|
|
72
|
+
|
|
73
|
+
### Phase 3: Capture the Design
|
|
74
|
+
|
|
75
|
+
Write a brainstorm document to `docs/brainstorms/YYYY-MM-DD-<topic>-brainstorm.md`.
|
|
76
|
+
|
|
77
|
+
**Document structure:** See the `brainstorming` skill for the template format. Key sections: What We're Building, Why This Approach, Key Decisions, Open Questions.
|
|
78
|
+
|
|
79
|
+
Ensure `docs/brainstorms/` directory exists before writing.
|
|
80
|
+
|
|
81
|
+
### Phase 4: Handoff
|
|
82
|
+
|
|
83
|
+
Use **AskUserQuestion tool** to present next steps:
|
|
84
|
+
|
|
85
|
+
**Question:** "Brainstorm captured. What would you like to do next?"
|
|
86
|
+
|
|
87
|
+
**Options:**
|
|
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)
|
|
90
|
+
3. **Done for now** - Return later
|
|
91
|
+
|
|
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
|
+
|
|
101
|
+
## Output Summary
|
|
102
|
+
|
|
103
|
+
When complete, display:
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
Brainstorm complete!
|
|
107
|
+
|
|
108
|
+
Document: docs/brainstorms/YYYY-MM-DD-<topic>-brainstorm.md
|
|
109
|
+
|
|
110
|
+
Key decisions:
|
|
111
|
+
- [Decision 1]
|
|
112
|
+
- [Decision 2]
|
|
113
|
+
|
|
114
|
+
Next: Run `/workflows:plan` when ready to implement.
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Important Guidelines
|
|
118
|
+
|
|
119
|
+
- **Stay focused on WHAT, not HOW** - Implementation details belong in the plan
|
|
120
|
+
- **Ask one question at a time** - Don't overwhelm
|
|
121
|
+
- **Apply YAGNI** - Prefer simpler approaches
|
|
122
|
+
- **Keep outputs concise** - 200-300 words per section max
|
|
123
|
+
|
|
124
|
+
NEVER CODE! Just explore and document decisions.
|
|
@@ -21,53 +21,83 @@ Captures problem solutions while context is fresh, creating structured documenta
|
|
|
21
21
|
/workflows:compound [brief context] # Provide additional context hint
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
## Execution Strategy:
|
|
24
|
+
## Execution Strategy: Two-Phase Orchestration
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
<critical_requirement>
|
|
27
|
+
**Only ONE file gets written - the final documentation.**
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
Phase 1 subagents return TEXT DATA to the orchestrator. They must NOT use Write, Edit, or create any files. Only the orchestrator (Phase 2) writes the final documentation file.
|
|
30
|
+
</critical_requirement>
|
|
31
|
+
|
|
32
|
+
### Phase 1: Parallel Research
|
|
33
|
+
|
|
34
|
+
<parallel_tasks>
|
|
35
|
+
|
|
36
|
+
Launch these subagents IN PARALLEL. Each returns text data to the orchestrator.
|
|
37
|
+
|
|
38
|
+
#### 1. **Context Analyzer**
|
|
29
39
|
- Extracts conversation history
|
|
30
40
|
- Identifies problem type, component, symptoms
|
|
31
|
-
- Validates against
|
|
41
|
+
- Validates against schema
|
|
32
42
|
- Returns: YAML frontmatter skeleton
|
|
33
43
|
|
|
34
|
-
|
|
44
|
+
#### 2. **Solution Extractor**
|
|
35
45
|
- Analyzes all investigation steps
|
|
36
46
|
- Identifies root cause
|
|
37
47
|
- Extracts working solution with code examples
|
|
38
48
|
- Returns: Solution content block
|
|
39
49
|
|
|
40
|
-
|
|
50
|
+
#### 3. **Related Docs Finder**
|
|
41
51
|
- Searches `docs/solutions/` for related documentation
|
|
42
52
|
- Identifies cross-references and links
|
|
43
53
|
- Finds related GitHub issues
|
|
44
54
|
- Returns: Links and relationships
|
|
45
55
|
|
|
46
|
-
|
|
56
|
+
#### 4. **Prevention Strategist**
|
|
47
57
|
- Develops prevention strategies
|
|
48
58
|
- Creates best practices guidance
|
|
49
59
|
- Generates test cases if applicable
|
|
50
60
|
- Returns: Prevention/testing content
|
|
51
61
|
|
|
52
|
-
|
|
62
|
+
#### 5. **Category Classifier**
|
|
53
63
|
- Determines optimal `docs/solutions/` category
|
|
54
64
|
- Validates category against schema
|
|
55
65
|
- Suggests filename based on slug
|
|
56
66
|
- Returns: Final path and filename
|
|
57
67
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
68
|
+
</parallel_tasks>
|
|
69
|
+
|
|
70
|
+
### Phase 2: Assembly & Write
|
|
71
|
+
|
|
72
|
+
<sequential_tasks>
|
|
73
|
+
|
|
74
|
+
**WAIT for all Phase 1 subagents to complete before proceeding.**
|
|
75
|
+
|
|
76
|
+
The orchestrating agent (main conversation) performs these steps:
|
|
77
|
+
|
|
78
|
+
1. Collect all text results from Phase 1 subagents
|
|
79
|
+
2. Assemble complete markdown file from the collected pieces
|
|
80
|
+
3. Validate YAML frontmatter against schema
|
|
81
|
+
4. Create directory if needed: `mkdir -p docs/solutions/[category]/`
|
|
82
|
+
5. Write the SINGLE final file: `docs/solutions/[category]/[filename].md`
|
|
63
83
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
84
|
+
</sequential_tasks>
|
|
85
|
+
|
|
86
|
+
### Phase 3: Optional Enhancement
|
|
87
|
+
|
|
88
|
+
**WAIT for Phase 2 to complete before proceeding.**
|
|
89
|
+
|
|
90
|
+
<parallel_tasks>
|
|
91
|
+
|
|
92
|
+
Based on problem type, optionally invoke specialized agents to review the documentation:
|
|
93
|
+
|
|
94
|
+
- **performance_issue** → `performance-oracle`
|
|
95
|
+
- **security_issue** → `security-sentinel`
|
|
96
|
+
- **database_issue** → `data-integrity-guardian`
|
|
97
|
+
- **test_failure** → `cora-test-reviewer`
|
|
98
|
+
- Any code-heavy issue → `kieran-rails-reviewer` + `code-simplicity-reviewer`
|
|
99
|
+
|
|
100
|
+
</parallel_tasks>
|
|
71
101
|
|
|
72
102
|
## What It Captures
|
|
73
103
|
|
|
@@ -110,18 +140,25 @@ This command launches multiple specialized subagents IN PARALLEL to maximize eff
|
|
|
110
140
|
- integration-issues/
|
|
111
141
|
- logic-errors/
|
|
112
142
|
|
|
143
|
+
## Common Mistakes to Avoid
|
|
144
|
+
|
|
145
|
+
| ❌ Wrong | ✅ Correct |
|
|
146
|
+
|----------|-----------|
|
|
147
|
+
| Subagents write files like `context-analysis.md`, `solution-draft.md` | Subagents return text data; orchestrator writes one final file |
|
|
148
|
+
| Research and assembly run in parallel | Research completes → then assembly runs |
|
|
149
|
+
| Multiple files created during workflow | Single file: `docs/solutions/[category]/[filename].md` |
|
|
150
|
+
|
|
113
151
|
## Success Output
|
|
114
152
|
|
|
115
153
|
```
|
|
116
|
-
✓
|
|
154
|
+
✓ Documentation complete
|
|
117
155
|
|
|
118
|
-
|
|
156
|
+
Subagent Results:
|
|
119
157
|
✓ Context Analyzer: Identified performance_issue in brief_system
|
|
120
|
-
✓ Solution Extractor:
|
|
121
|
-
✓ Related Docs Finder:
|
|
122
|
-
✓ Prevention Strategist:
|
|
123
|
-
✓ Category Classifier:
|
|
124
|
-
✓ Documentation Writer: Created complete markdown
|
|
158
|
+
✓ Solution Extractor: 3 code fixes
|
|
159
|
+
✓ Related Docs Finder: 2 related issues
|
|
160
|
+
✓ Prevention Strategist: Prevention strategies, test suggestions
|
|
161
|
+
✓ Category Classifier: `performance-issues`
|
|
125
162
|
|
|
126
163
|
Specialized Agent Reviews (Auto-Triggered):
|
|
127
164
|
✓ performance-oracle: Validated query optimization approach
|
|
@@ -22,44 +22,103 @@ Do not proceed until you have a clear feature description from the user.
|
|
|
22
22
|
|
|
23
23
|
### 0. Idea Refinement
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
**Check for brainstorm output first:**
|
|
26
|
+
|
|
27
|
+
Before asking questions, look for recent brainstorm documents in `docs/brainstorms/` that match this feature:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
ls -la docs/brainstorms/*.md 2>/dev/null | head -10
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**Relevance criteria:** A brainstorm is relevant if:
|
|
34
|
+
- The topic (from filename or YAML frontmatter) semantically matches the feature description
|
|
35
|
+
- Created within the last 14 days
|
|
36
|
+
- If multiple candidates match, use the most recent one
|
|
37
|
+
|
|
38
|
+
**If a relevant brainstorm exists:**
|
|
39
|
+
1. Read the brainstorm document
|
|
40
|
+
2. Announce: "Found brainstorm from [date]: [topic]. Using as context for planning."
|
|
41
|
+
3. Extract key decisions, chosen approach, and open questions
|
|
42
|
+
4. **Skip the idea refinement questions below** - the brainstorm already answered WHAT to build
|
|
43
|
+
5. Use brainstorm decisions as input to the research phase
|
|
44
|
+
|
|
45
|
+
**If multiple brainstorms could match:**
|
|
46
|
+
Use **AskUserQuestion tool** to ask which brainstorm to use, or whether to proceed without one.
|
|
47
|
+
|
|
48
|
+
**If no brainstorm found (or not relevant), run idea refinement:**
|
|
49
|
+
|
|
50
|
+
Refine the idea through collaborative dialogue using the **AskUserQuestion tool**:
|
|
26
51
|
|
|
27
52
|
- Ask questions one at a time to understand the idea fully
|
|
28
53
|
- Prefer multiple choice questions when natural options exist
|
|
29
54
|
- Focus on understanding: purpose, constraints and success criteria
|
|
30
55
|
- Continue until the idea is clear OR user says "proceed"
|
|
31
56
|
|
|
57
|
+
**Gather signals for research decision.** During refinement, note:
|
|
58
|
+
|
|
59
|
+
- **User's familiarity**: Do they know the codebase patterns? Are they pointing to examples?
|
|
60
|
+
- **User's intent**: Speed vs thoroughness? Exploration vs execution?
|
|
61
|
+
- **Topic risk**: Security, payments, external APIs warrant more caution
|
|
62
|
+
- **Uncertainty level**: Is the approach clear or open-ended?
|
|
63
|
+
|
|
32
64
|
**Skip option:** If the feature description is already detailed, offer:
|
|
33
65
|
"Your description is clear. Should I proceed with research, or would you like to refine it further?"
|
|
34
66
|
|
|
35
67
|
## Main Tasks
|
|
36
68
|
|
|
37
|
-
### 1.
|
|
69
|
+
### 1. Local Research (Always Runs - Parallel)
|
|
38
70
|
|
|
39
71
|
<thinking>
|
|
40
|
-
First, I need to understand the project's conventions
|
|
72
|
+
First, I need to understand the project's conventions, existing patterns, and any documented learnings. This is fast and local - it informs whether external research is needed.
|
|
41
73
|
</thinking>
|
|
42
74
|
|
|
43
|
-
|
|
75
|
+
Run these agents **in parallel** to gather local context:
|
|
44
76
|
|
|
45
77
|
- Task repo-research-analyst(feature_description)
|
|
78
|
+
- Task learnings-researcher(feature_description)
|
|
79
|
+
|
|
80
|
+
**What to look for:**
|
|
81
|
+
- **Repo research:** existing patterns, CLAUDE.md guidance, technology familiarity, pattern consistency
|
|
82
|
+
- **Learnings:** documented solutions in `docs/solutions/` that might apply (gotchas, patterns, lessons learned)
|
|
83
|
+
|
|
84
|
+
These findings inform the next step.
|
|
85
|
+
|
|
86
|
+
### 1.5. Research Decision
|
|
87
|
+
|
|
88
|
+
Based on signals from Step 0 and findings from Step 1, decide on external research.
|
|
89
|
+
|
|
90
|
+
**High-risk topics → always research.** Security, payments, external APIs, data privacy. The cost of missing something is too high. This takes precedence over speed signals.
|
|
91
|
+
|
|
92
|
+
**Strong local context → skip external research.** Codebase has good patterns, CLAUDE.md has guidance, user knows what they want. External research adds little value.
|
|
93
|
+
|
|
94
|
+
**Uncertainty or unfamiliar territory → research.** User is exploring, codebase has no examples, new technology. External perspective is valuable.
|
|
95
|
+
|
|
96
|
+
**Announce the decision and proceed.** Brief explanation, then continue. User can redirect if needed.
|
|
97
|
+
|
|
98
|
+
Examples:
|
|
99
|
+
- "Your codebase has solid patterns for this. Proceeding without external research."
|
|
100
|
+
- "This involves payment processing, so I'll research current best practices first."
|
|
101
|
+
|
|
102
|
+
### 1.5b. External Research (Conditional)
|
|
103
|
+
|
|
104
|
+
**Only run if Step 1.5 indicates external research is valuable.**
|
|
105
|
+
|
|
106
|
+
Run these agents in parallel:
|
|
107
|
+
|
|
46
108
|
- Task best-practices-researcher(feature_description)
|
|
47
109
|
- Task framework-docs-researcher(feature_description)
|
|
48
110
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
- [ ] Document all research findings with specific file paths (e.g., `app/services/example_service.rb:42`)
|
|
52
|
-
- [ ] Include URLs to external documentation and best practices guides
|
|
53
|
-
- [ ] Create a reference list of similar issues or PRs (e.g., `#123`, `#456`)
|
|
54
|
-
- [ ] Note any team conventions discovered in `CLAUDE.md` or team documentation
|
|
111
|
+
### 1.6. Consolidate Research
|
|
55
112
|
|
|
56
|
-
|
|
113
|
+
After all research steps complete, consolidate findings:
|
|
57
114
|
|
|
58
|
-
|
|
115
|
+
- Document relevant file paths from repo research (e.g., `app/services/example_service.rb:42`)
|
|
116
|
+
- **Include relevant institutional learnings** from `docs/solutions/` (key insights, gotchas to avoid)
|
|
117
|
+
- Note external documentation URLs and best practices (if external research was done)
|
|
118
|
+
- List related issues or PRs discovered
|
|
119
|
+
- Capture CLAUDE.md conventions
|
|
59
120
|
|
|
60
|
-
|
|
61
|
-
- Ask if anything looks off or is missing
|
|
62
|
-
- User can confirm or request additional research on specific topics
|
|
121
|
+
**Optional validation:** Briefly summarize findings and ask if anything looks off or missing before proceeding to planning.
|
|
63
122
|
|
|
64
123
|
### 2. Issue Planning & Structure
|
|
65
124
|
|
|
@@ -71,8 +130,8 @@ Think like a product manager - what would make this issue clear and actionable?
|
|
|
71
130
|
|
|
72
131
|
- [ ] Draft clear, searchable issue title using conventional format (e.g., `feat: Add user authentication`, `fix: Cart total calculation`)
|
|
73
132
|
- [ ] Determine issue type: enhancement, bug, refactor
|
|
74
|
-
- [ ] Convert title to
|
|
75
|
-
- Example: `feat: Add User Authentication` → `feat-add-user-authentication.md`
|
|
133
|
+
- [ ] Convert title to filename: add today's date prefix, strip prefix colon, kebab-case, add `-plan` suffix
|
|
134
|
+
- Example: `feat: Add User Authentication` → `2026-01-21-feat-add-user-authentication-plan.md`
|
|
76
135
|
- Keep it descriptive (3-5 words after prefix) so plans are findable by context
|
|
77
136
|
|
|
78
137
|
**Stakeholder Analysis:**
|
|
@@ -116,6 +175,14 @@ Select how comprehensive you want the issue to be, simpler is mostly better.
|
|
|
116
175
|
**Structure:**
|
|
117
176
|
|
|
118
177
|
````markdown
|
|
178
|
+
---
|
|
179
|
+
title: [Issue Title]
|
|
180
|
+
type: [feat|fix|refactor]
|
|
181
|
+
date: YYYY-MM-DD
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
# [Issue Title]
|
|
185
|
+
|
|
119
186
|
[Brief problem/feature description]
|
|
120
187
|
|
|
121
188
|
## Acceptance Criteria
|
|
@@ -160,6 +227,14 @@ end
|
|
|
160
227
|
**Structure:**
|
|
161
228
|
|
|
162
229
|
```markdown
|
|
230
|
+
---
|
|
231
|
+
title: [Issue Title]
|
|
232
|
+
type: [feat|fix|refactor]
|
|
233
|
+
date: YYYY-MM-DD
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
# [Issue Title]
|
|
237
|
+
|
|
163
238
|
## Overview
|
|
164
239
|
|
|
165
240
|
[Comprehensive description]
|
|
@@ -216,6 +291,14 @@ end
|
|
|
216
291
|
**Structure:**
|
|
217
292
|
|
|
218
293
|
```markdown
|
|
294
|
+
---
|
|
295
|
+
title: [Issue Title]
|
|
296
|
+
type: [feat|fix|refactor]
|
|
297
|
+
date: YYYY-MM-DD
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
# [Issue Title]
|
|
301
|
+
|
|
219
302
|
## Overview
|
|
220
303
|
|
|
221
304
|
[Executive summary]
|
|
@@ -391,48 +474,49 @@ end
|
|
|
391
474
|
|
|
392
475
|
## Output Format
|
|
393
476
|
|
|
394
|
-
**Filename:** Use the kebab-case filename from Step 2 Title & Categorization.
|
|
477
|
+
**Filename:** Use the date and kebab-case filename from Step 2 Title & Categorization.
|
|
395
478
|
|
|
396
479
|
```
|
|
397
|
-
plans
|
|
480
|
+
docs/plans/YYYY-MM-DD-<type>-<descriptive-name>-plan.md
|
|
398
481
|
```
|
|
399
482
|
|
|
400
483
|
Examples:
|
|
401
|
-
- ✅ `plans/feat-user-authentication-flow.md`
|
|
402
|
-
- ✅ `plans/fix-checkout-race-condition.md`
|
|
403
|
-
- ✅ `plans/refactor-api-client-extraction.md`
|
|
404
|
-
- ❌ `plans/plan
|
|
405
|
-
- ❌ `plans/new-feature.md` (too vague)
|
|
406
|
-
- ❌ `plans/feat: user auth.md` (invalid characters)
|
|
484
|
+
- ✅ `docs/plans/2026-01-15-feat-user-authentication-flow-plan.md`
|
|
485
|
+
- ✅ `docs/plans/2026-02-03-fix-checkout-race-condition-plan.md`
|
|
486
|
+
- ✅ `docs/plans/2026-03-10-refactor-api-client-extraction-plan.md`
|
|
487
|
+
- ❌ `docs/plans/2026-01-15-feat-thing-plan.md` (not descriptive - what "thing"?)
|
|
488
|
+
- ❌ `docs/plans/2026-01-15-feat-new-feature-plan.md` (too vague - what feature?)
|
|
489
|
+
- ❌ `docs/plans/2026-01-15-feat: user auth-plan.md` (invalid characters - colon and space)
|
|
490
|
+
- ❌ `docs/plans/feat-user-auth-plan.md` (missing date prefix)
|
|
407
491
|
|
|
408
492
|
## Post-Generation Options
|
|
409
493
|
|
|
410
494
|
After writing the plan file, use the **AskUserQuestion tool** to present these options:
|
|
411
495
|
|
|
412
|
-
**Question:** "Plan ready at `plans
|
|
496
|
+
**Question:** "Plan ready at `docs/plans/YYYY-MM-DD-<type>-<name>-plan.md`. What would you like to do next?"
|
|
413
497
|
|
|
414
498
|
**Options:**
|
|
415
499
|
1. **Open plan in editor** - Open the plan file for review
|
|
416
500
|
2. **Run `/deepen-plan`** - Enhance each section with parallel research agents (best practices, performance, UI)
|
|
417
|
-
3. **Run `/
|
|
418
|
-
4. **
|
|
419
|
-
5. **Start `/workflows:work
|
|
420
|
-
6. **
|
|
421
|
-
7. **
|
|
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)
|
|
422
506
|
|
|
423
507
|
Based on selection:
|
|
424
|
-
- **Open plan in editor** → Run `open plans/<
|
|
508
|
+
- **Open plan in editor** → Run `open docs/plans/<plan_filename>.md` to open the file in the user's default editor
|
|
425
509
|
- **`/deepen-plan`** → Call the /deepen-plan command with the plan file path to enhance with research
|
|
426
|
-
- **`/
|
|
510
|
+
- **`/technical_review`** → Call the /technical_review command with the plan file path
|
|
511
|
+
- **Review and refine** → Load `document-review` skill.
|
|
427
512
|
- **`/workflows:work`** → Call the /workflows:work command with the plan file path
|
|
428
|
-
- **`/workflows:work` on remote** → Run `/workflows:work plans/<
|
|
513
|
+
- **`/workflows:work` on remote** → Run `/workflows:work docs/plans/<plan_filename>.md &` to start work in background for Claude Code web
|
|
429
514
|
- **Create Issue** → See "Issue Creation" section below
|
|
430
|
-
- **Simplify** → Ask "What should I simplify?" then regenerate simpler version
|
|
431
515
|
- **Other** (automatically provided) → Accept free text for rework or specific changes
|
|
432
516
|
|
|
433
517
|
**Note:** If running `/workflows:plan` with ultrathink enabled, automatically run `/deepen-plan` after plan creation for maximum depth and grounding.
|
|
434
518
|
|
|
435
|
-
Loop back to options after Simplify or Other changes until user selects `/workflows:work` or `/
|
|
519
|
+
Loop back to options after Simplify or Other changes until user selects `/workflows:work` or `/technical_review`.
|
|
436
520
|
|
|
437
521
|
## Issue Creation
|
|
438
522
|
|
|
@@ -443,16 +527,17 @@ When user selects "Create Issue", detect their project tracker from CLAUDE.md:
|
|
|
443
527
|
- Or look for mentions of "GitHub Issues" or "Linear" in their workflow section
|
|
444
528
|
|
|
445
529
|
2. **If GitHub:**
|
|
530
|
+
|
|
531
|
+
Use the title and type from Step 2 (already in context - no need to re-read the file):
|
|
532
|
+
|
|
446
533
|
```bash
|
|
447
|
-
|
|
448
|
-
# Read plan content for body
|
|
449
|
-
gh issue create --title "feat: [Plan Title]" --body-file plans/<issue_title>.md
|
|
534
|
+
gh issue create --title "<type>: <title>" --body-file <plan_path>
|
|
450
535
|
```
|
|
451
536
|
|
|
452
537
|
3. **If Linear:**
|
|
538
|
+
|
|
453
539
|
```bash
|
|
454
|
-
|
|
455
|
-
# linear issue create --title "[Plan Title]" --description "$(cat plans/<issue_title>.md)"
|
|
540
|
+
linear issue create --title "<title>" --description "$(cat <plan_path>)"
|
|
456
541
|
```
|
|
457
542
|
|
|
458
543
|
4. **If no tracker configured:**
|
|
@@ -461,6 +546,6 @@ When user selects "Create Issue", detect their project tracker from CLAUDE.md:
|
|
|
461
546
|
|
|
462
547
|
5. **After creation:**
|
|
463
548
|
- Display the issue URL
|
|
464
|
-
- Ask if they want to proceed to `/workflows:work` or `/
|
|
549
|
+
- Ask if they want to proceed to `/workflows:work` or `/technical_review`
|
|
465
550
|
|
|
466
551
|
NEVER CODE! Just research and write the plan.
|
|
@@ -48,6 +48,17 @@ Ensure that the code is ready for analysis (either in worktree or on current bra
|
|
|
48
48
|
|
|
49
49
|
</task_list>
|
|
50
50
|
|
|
51
|
+
#### Protected Artifacts
|
|
52
|
+
|
|
53
|
+
<protected_artifacts>
|
|
54
|
+
The following paths are compound-engineering pipeline artifacts and must never be flagged for deletion, removal, or gitignore by any review agent:
|
|
55
|
+
|
|
56
|
+
- `docs/plans/*.md` — Plan files created by `/workflows:plan`. These are living documents that track implementation progress (checkboxes are checked off by `/workflows:work`).
|
|
57
|
+
- `docs/solutions/*.md` — Solution documents created during the pipeline.
|
|
58
|
+
|
|
59
|
+
If a review agent flags any file in these directories for cleanup or removal, discard that finding during synthesis. Do not create a todo for it.
|
|
60
|
+
</protected_artifacts>
|
|
61
|
+
|
|
51
62
|
#### Parallel Agents to review the PR:
|
|
52
63
|
|
|
53
64
|
<parallel_tasks>
|
|
@@ -207,6 +218,7 @@ Remove duplicates, prioritize by severity and impact.
|
|
|
207
218
|
<synthesis_tasks>
|
|
208
219
|
|
|
209
220
|
- [ ] Collect findings from all parallel agents
|
|
221
|
+
- [ ] Discard any findings that recommend deleting or gitignoring files in `docs/plans/` or `docs/solutions/` (see Protected Artifacts above)
|
|
210
222
|
- [ ] Categorize by type: security, performance, architecture, quality, etc.
|
|
211
223
|
- [ ] Assign severity levels: 🔴 CRITICAL (P1), 🟡 IMPORTANT (P2), 🔵 NICE-TO-HAVE (P3)
|
|
212
224
|
- [ ] Remove duplicate or overlapping findings
|