buildwithjpegg 1.0.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-plugin/marketplace.json +18 -0
- package/.claude-plugin/plugin.json +12 -0
- package/.codex/INSTALL.md +67 -0
- package/.opencode/INSTALL.md +118 -0
- package/.opencode/plugins/buildwithjpegg.js +95 -0
- package/LICENSE +24 -0
- package/README.md +134 -0
- package/RELEASE-NOTES.md +7 -0
- package/agents/code-reviewer.md +48 -0
- package/commands/evaluate.md +6 -0
- package/commands/run-build.md +6 -0
- package/commands/write-blueprint.md +6 -0
- package/hooks/hooks.json +16 -0
- package/hooks/run-hook.cmd +43 -0
- package/hooks/session-start.sh +46 -0
- package/lib/skills-core.js +208 -0
- package/package.json +39 -0
- package/rules/conventions.md +22 -0
- package/rules/git.md +18 -0
- package/rules/mcp-servers.md +28 -0
- package/rules/platform.md +10 -0
- package/rules/stack.md +29 -0
- package/rules/testing.md +18 -0
- package/rules/ui-ux.md +151 -0
- package/rules/workflow.md +48 -0
- package/skills/auto-release/SKILL.md +176 -0
- package/skills/blueprint/SKILL.md +116 -0
- package/skills/build/SKILL.md +84 -0
- package/skills/ci-loop/SKILL.md +98 -0
- package/skills/craft-skill/SKILL.md +655 -0
- package/skills/craft-skill/anthropic-best-practices.md +1150 -0
- package/skills/craft-skill/examples/CLAUDE_MD_TESTING.md +189 -0
- package/skills/craft-skill/graphviz-conventions.dot +172 -0
- package/skills/craft-skill/persuasion-principles.md +187 -0
- package/skills/craft-skill/render-graphs.js +168 -0
- package/skills/craft-skill/testing-skills-with-subagents.md +384 -0
- package/skills/delegate/SKILL.md +242 -0
- package/skills/delegate/code-quality-reviewer-prompt.md +20 -0
- package/skills/delegate/implementer-prompt.md +78 -0
- package/skills/delegate/spec-reviewer-prompt.md +61 -0
- package/skills/draft-prs/SKILL.md +132 -0
- package/skills/evaluate/SKILL.md +96 -0
- package/skills/fan-out/SKILL.md +180 -0
- package/skills/handle-review/SKILL.md +213 -0
- package/skills/onboard/SKILL.md +95 -0
- package/skills/pr-stack/SKILL.md +112 -0
- package/skills/pre-ship/SKILL.md +139 -0
- package/skills/root-cause/CREATION-LOG.md +119 -0
- package/skills/root-cause/SKILL.md +296 -0
- package/skills/root-cause/condition-based-waiting-example.ts +158 -0
- package/skills/root-cause/condition-based-waiting.md +115 -0
- package/skills/root-cause/defense-in-depth.md +122 -0
- package/skills/root-cause/find-polluter.sh +63 -0
- package/skills/root-cause/root-cause-tracing.md +169 -0
- package/skills/root-cause/test-academic.md +14 -0
- package/skills/root-cause/test-pressure-1.md +58 -0
- package/skills/root-cause/test-pressure-2.md +68 -0
- package/skills/root-cause/test-pressure-3.md +69 -0
- package/skills/seek-review/SKILL.md +105 -0
- package/skills/seek-review/code-reviewer.md +146 -0
- package/skills/test-first/SKILL.md +371 -0
- package/skills/test-first/testing-anti-patterns.md +299 -0
- package/skills/worktree/SKILL.md +218 -0
- package/skills/wrap-up/SKILL.md +200 -0
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: delegate
|
|
3
|
+
description: Use when executing implementation plans with independent tasks in the current session
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Subagent-Driven Development
|
|
7
|
+
|
|
8
|
+
Execute plan by dispatching fresh subagent per task, with two-stage review after each: spec compliance review first, then code quality review.
|
|
9
|
+
|
|
10
|
+
**Core principle:** Fresh subagent per task + two-stage review (spec then quality) = high quality, fast iteration
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
```dot
|
|
15
|
+
digraph when_to_use {
|
|
16
|
+
"Have implementation plan?" [shape=diamond];
|
|
17
|
+
"Tasks mostly independent?" [shape=diamond];
|
|
18
|
+
"Stay in this session?" [shape=diamond];
|
|
19
|
+
"delegate" [shape=box];
|
|
20
|
+
"build" [shape=box];
|
|
21
|
+
"Manual execution or brainstorm first" [shape=box];
|
|
22
|
+
|
|
23
|
+
"Have implementation plan?" -> "Tasks mostly independent?" [label="yes"];
|
|
24
|
+
"Have implementation plan?" -> "Manual execution or brainstorm first" [label="no"];
|
|
25
|
+
"Tasks mostly independent?" -> "Stay in this session?" [label="yes"];
|
|
26
|
+
"Tasks mostly independent?" -> "Manual execution or brainstorm first" [label="no - tightly coupled"];
|
|
27
|
+
"Stay in this session?" -> "delegate" [label="yes"];
|
|
28
|
+
"Stay in this session?" -> "build" [label="no - parallel session"];
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**vs. Executing Plans (parallel session):**
|
|
33
|
+
- Same session (no context switch)
|
|
34
|
+
- Fresh subagent per task (no context pollution)
|
|
35
|
+
- Two-stage review after each task: spec compliance first, then code quality
|
|
36
|
+
- Faster iteration (no human-in-loop between tasks)
|
|
37
|
+
|
|
38
|
+
## The Process
|
|
39
|
+
|
|
40
|
+
```dot
|
|
41
|
+
digraph process {
|
|
42
|
+
rankdir=TB;
|
|
43
|
+
|
|
44
|
+
subgraph cluster_per_task {
|
|
45
|
+
label="Per Task";
|
|
46
|
+
"Dispatch implementer subagent (./implementer-prompt.md)" [shape=box];
|
|
47
|
+
"Implementer subagent asks questions?" [shape=diamond];
|
|
48
|
+
"Answer questions, provide context" [shape=box];
|
|
49
|
+
"Implementer subagent implements, tests, commits, self-reviews" [shape=box];
|
|
50
|
+
"Dispatch spec reviewer subagent (./spec-reviewer-prompt.md)" [shape=box];
|
|
51
|
+
"Spec reviewer subagent confirms code matches spec?" [shape=diamond];
|
|
52
|
+
"Implementer subagent fixes spec gaps" [shape=box];
|
|
53
|
+
"Dispatch code quality reviewer subagent (./code-quality-reviewer-prompt.md)" [shape=box];
|
|
54
|
+
"Code quality reviewer subagent approves?" [shape=diamond];
|
|
55
|
+
"Implementer subagent fixes quality issues" [shape=box];
|
|
56
|
+
"Mark task complete in TodoWrite" [shape=box];
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
"Read plan, extract all tasks with full text, note context, create TodoWrite" [shape=box];
|
|
60
|
+
"More tasks remain?" [shape=diamond];
|
|
61
|
+
"Dispatch final code reviewer subagent for entire implementation" [shape=box];
|
|
62
|
+
"Use jpegg:wrap-up" [shape=box style=filled fillcolor=lightgreen];
|
|
63
|
+
|
|
64
|
+
"Read plan, extract all tasks with full text, note context, create TodoWrite" -> "Dispatch implementer subagent (./implementer-prompt.md)";
|
|
65
|
+
"Dispatch implementer subagent (./implementer-prompt.md)" -> "Implementer subagent asks questions?";
|
|
66
|
+
"Implementer subagent asks questions?" -> "Answer questions, provide context" [label="yes"];
|
|
67
|
+
"Answer questions, provide context" -> "Dispatch implementer subagent (./implementer-prompt.md)";
|
|
68
|
+
"Implementer subagent asks questions?" -> "Implementer subagent implements, tests, commits, self-reviews" [label="no"];
|
|
69
|
+
"Implementer subagent implements, tests, commits, self-reviews" -> "Dispatch spec reviewer subagent (./spec-reviewer-prompt.md)";
|
|
70
|
+
"Dispatch spec reviewer subagent (./spec-reviewer-prompt.md)" -> "Spec reviewer subagent confirms code matches spec?";
|
|
71
|
+
"Spec reviewer subagent confirms code matches spec?" -> "Implementer subagent fixes spec gaps" [label="no"];
|
|
72
|
+
"Implementer subagent fixes spec gaps" -> "Dispatch spec reviewer subagent (./spec-reviewer-prompt.md)" [label="re-review"];
|
|
73
|
+
"Spec reviewer subagent confirms code matches spec?" -> "Dispatch code quality reviewer subagent (./code-quality-reviewer-prompt.md)" [label="yes"];
|
|
74
|
+
"Dispatch code quality reviewer subagent (./code-quality-reviewer-prompt.md)" -> "Code quality reviewer subagent approves?";
|
|
75
|
+
"Code quality reviewer subagent approves?" -> "Implementer subagent fixes quality issues" [label="no"];
|
|
76
|
+
"Implementer subagent fixes quality issues" -> "Dispatch code quality reviewer subagent (./code-quality-reviewer-prompt.md)" [label="re-review"];
|
|
77
|
+
"Code quality reviewer subagent approves?" -> "Mark task complete in TodoWrite" [label="yes"];
|
|
78
|
+
"Mark task complete in TodoWrite" -> "More tasks remain?";
|
|
79
|
+
"More tasks remain?" -> "Dispatch implementer subagent (./implementer-prompt.md)" [label="yes"];
|
|
80
|
+
"More tasks remain?" -> "Dispatch final code reviewer subagent for entire implementation" [label="no"];
|
|
81
|
+
"Dispatch final code reviewer subagent for entire implementation" -> "Use jpegg:wrap-up";
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Prompt Templates
|
|
86
|
+
|
|
87
|
+
- `./implementer-prompt.md` - Dispatch implementer subagent
|
|
88
|
+
- `./spec-reviewer-prompt.md` - Dispatch spec compliance reviewer subagent
|
|
89
|
+
- `./code-quality-reviewer-prompt.md` - Dispatch code quality reviewer subagent
|
|
90
|
+
|
|
91
|
+
## Example Workflow
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
You: I'm using Subagent-Driven Development to execute this plan.
|
|
95
|
+
|
|
96
|
+
[Read plan file once: docs/plans/feature-plan.md]
|
|
97
|
+
[Extract all 5 tasks with full text and context]
|
|
98
|
+
[Create TodoWrite with all tasks]
|
|
99
|
+
|
|
100
|
+
Task 1: Hook installation script
|
|
101
|
+
|
|
102
|
+
[Get Task 1 text and context (already extracted)]
|
|
103
|
+
[Dispatch implementation subagent with full task text + context]
|
|
104
|
+
|
|
105
|
+
Implementer: "Before I begin - should the hook be installed at user or system level?"
|
|
106
|
+
|
|
107
|
+
You: "User level (~/.config/buildwithjpegg/hooks/)"
|
|
108
|
+
|
|
109
|
+
Implementer: "Got it. Implementing now..."
|
|
110
|
+
[Later] Implementer:
|
|
111
|
+
- Implemented install-hook command
|
|
112
|
+
- Added tests, 5/5 passing
|
|
113
|
+
- Self-review: Found I missed --force flag, added it
|
|
114
|
+
- Committed
|
|
115
|
+
|
|
116
|
+
[Dispatch spec compliance reviewer]
|
|
117
|
+
Spec reviewer: Spec compliant - all requirements met, nothing extra
|
|
118
|
+
|
|
119
|
+
[Get git SHAs, dispatch code quality reviewer]
|
|
120
|
+
Code reviewer: Strengths: Good test coverage, clean. Issues: None. Approved.
|
|
121
|
+
|
|
122
|
+
[Mark Task 1 complete]
|
|
123
|
+
|
|
124
|
+
Task 2: Recovery modes
|
|
125
|
+
|
|
126
|
+
[Get Task 2 text and context (already extracted)]
|
|
127
|
+
[Dispatch implementation subagent with full task text + context]
|
|
128
|
+
|
|
129
|
+
Implementer: [No questions, proceeds]
|
|
130
|
+
Implementer:
|
|
131
|
+
- Added verify/repair modes
|
|
132
|
+
- 8/8 tests passing
|
|
133
|
+
- Self-review: All good
|
|
134
|
+
- Committed
|
|
135
|
+
|
|
136
|
+
[Dispatch spec compliance reviewer]
|
|
137
|
+
Spec reviewer: Issues:
|
|
138
|
+
- Missing: Progress reporting (spec says "report every 100 items")
|
|
139
|
+
- Extra: Added --json flag (not requested)
|
|
140
|
+
|
|
141
|
+
[Implementer fixes issues]
|
|
142
|
+
Implementer: Removed --json flag, added progress reporting
|
|
143
|
+
|
|
144
|
+
[Spec reviewer reviews again]
|
|
145
|
+
Spec reviewer: Spec compliant now
|
|
146
|
+
|
|
147
|
+
[Dispatch code quality reviewer]
|
|
148
|
+
Code reviewer: Strengths: Solid. Issues (Important): Magic number (100)
|
|
149
|
+
|
|
150
|
+
[Implementer fixes]
|
|
151
|
+
Implementer: Extracted PROGRESS_INTERVAL constant
|
|
152
|
+
|
|
153
|
+
[Code reviewer reviews again]
|
|
154
|
+
Code reviewer: Approved
|
|
155
|
+
|
|
156
|
+
[Mark Task 2 complete]
|
|
157
|
+
|
|
158
|
+
...
|
|
159
|
+
|
|
160
|
+
[After all tasks]
|
|
161
|
+
[Dispatch final code-reviewer]
|
|
162
|
+
Final reviewer: All requirements met, ready to merge
|
|
163
|
+
|
|
164
|
+
Done!
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Advantages
|
|
168
|
+
|
|
169
|
+
**vs. Manual execution:**
|
|
170
|
+
- Subagents follow TDD naturally
|
|
171
|
+
- Fresh context per task (no confusion)
|
|
172
|
+
- Parallel-safe (subagents don't interfere)
|
|
173
|
+
- Subagent can ask questions (before AND during work)
|
|
174
|
+
|
|
175
|
+
**vs. Executing Plans:**
|
|
176
|
+
- Same session (no handoff)
|
|
177
|
+
- Continuous progress (no waiting)
|
|
178
|
+
- Review checkpoints automatic
|
|
179
|
+
|
|
180
|
+
**Efficiency gains:**
|
|
181
|
+
- No file reading overhead (controller provides full text)
|
|
182
|
+
- Controller curates exactly what context is needed
|
|
183
|
+
- Subagent gets complete information upfront
|
|
184
|
+
- Questions surfaced before work begins (not after)
|
|
185
|
+
|
|
186
|
+
**Quality gates:**
|
|
187
|
+
- Self-review catches issues before handoff
|
|
188
|
+
- Two-stage review: spec compliance, then code quality
|
|
189
|
+
- Review loops ensure fixes actually work
|
|
190
|
+
- Spec compliance prevents over/under-building
|
|
191
|
+
- Code quality ensures implementation is well-built
|
|
192
|
+
|
|
193
|
+
**Cost:**
|
|
194
|
+
- More subagent invocations (implementer + 2 reviewers per task)
|
|
195
|
+
- Controller does more prep work (extracting all tasks upfront)
|
|
196
|
+
- Review loops add iterations
|
|
197
|
+
- But catches issues early (cheaper than debugging later)
|
|
198
|
+
|
|
199
|
+
## Red Flags
|
|
200
|
+
|
|
201
|
+
**Never:**
|
|
202
|
+
- Start implementation on main/master branch without explicit user consent
|
|
203
|
+
- Skip reviews (spec compliance OR code quality)
|
|
204
|
+
- Proceed with unfixed issues
|
|
205
|
+
- Dispatch multiple implementation subagents in parallel (conflicts)
|
|
206
|
+
- Make subagent read plan file (provide full text instead)
|
|
207
|
+
- Skip scene-setting context (subagent needs to understand where task fits)
|
|
208
|
+
- Ignore subagent questions (answer before letting them proceed)
|
|
209
|
+
- Accept "close enough" on spec compliance (spec reviewer found issues = not done)
|
|
210
|
+
- Skip review loops (reviewer found issues = implementer fixes = review again)
|
|
211
|
+
- Let implementer self-review replace actual review (both are needed)
|
|
212
|
+
- **Start code quality review before spec compliance is passed** (wrong order)
|
|
213
|
+
- Move to next task while either review has open issues
|
|
214
|
+
|
|
215
|
+
**If subagent asks questions:**
|
|
216
|
+
- Answer clearly and completely
|
|
217
|
+
- Provide additional context if needed
|
|
218
|
+
- Don't rush them into implementation
|
|
219
|
+
|
|
220
|
+
**If reviewer finds issues:**
|
|
221
|
+
- Implementer (same subagent) fixes them
|
|
222
|
+
- Reviewer reviews again
|
|
223
|
+
- Repeat until approved
|
|
224
|
+
- Don't skip the re-review
|
|
225
|
+
|
|
226
|
+
**If subagent fails task:**
|
|
227
|
+
- Dispatch fix subagent with specific instructions
|
|
228
|
+
- Don't try to fix manually (context pollution)
|
|
229
|
+
|
|
230
|
+
## Integration
|
|
231
|
+
|
|
232
|
+
**Required workflow skills:**
|
|
233
|
+
- **jpegg:worktree** - REQUIRED: Set up isolated workspace before starting
|
|
234
|
+
- **jpegg:blueprint** - Creates the plan this skill executes
|
|
235
|
+
- **jpegg:seek-review** - Code review template for reviewer subagents
|
|
236
|
+
- **jpegg:wrap-up** - Complete development after all tasks
|
|
237
|
+
|
|
238
|
+
**Subagents should use:**
|
|
239
|
+
- **jpegg:test-first** - Subagents follow TDD for each task
|
|
240
|
+
|
|
241
|
+
**Alternative workflow:**
|
|
242
|
+
- **jpegg:build** - Use for parallel session instead of same-session execution
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Code Quality Reviewer Prompt Template
|
|
2
|
+
|
|
3
|
+
Use this template when dispatching a code quality reviewer subagent.
|
|
4
|
+
|
|
5
|
+
**Purpose:** Verify implementation is well-built (clean, tested, maintainable)
|
|
6
|
+
|
|
7
|
+
**Only dispatch after spec compliance review passes.**
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
Task tool (jpegg:code-reviewer):
|
|
11
|
+
Use template at seek-review/code-reviewer.md
|
|
12
|
+
|
|
13
|
+
WHAT_WAS_IMPLEMENTED: [from implementer's report]
|
|
14
|
+
PLAN_OR_REQUIREMENTS: Task N from [plan-file]
|
|
15
|
+
BASE_SHA: [commit before task]
|
|
16
|
+
HEAD_SHA: [current commit]
|
|
17
|
+
DESCRIPTION: [task summary]
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**Code reviewer returns:** Strengths, Issues (Critical/Important/Minor), Assessment
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Implementer Subagent Prompt Template
|
|
2
|
+
|
|
3
|
+
Use this template when dispatching an implementer subagent.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
Task tool (general-purpose):
|
|
7
|
+
description: "Implement Task N: [task name]"
|
|
8
|
+
prompt: |
|
|
9
|
+
You are implementing Task N: [task name]
|
|
10
|
+
|
|
11
|
+
## Task Description
|
|
12
|
+
|
|
13
|
+
[FULL TEXT of task from plan - paste it here, don't make subagent read file]
|
|
14
|
+
|
|
15
|
+
## Context
|
|
16
|
+
|
|
17
|
+
[Scene-setting: where this fits, dependencies, architectural context]
|
|
18
|
+
|
|
19
|
+
## Before You Begin
|
|
20
|
+
|
|
21
|
+
If you have questions about:
|
|
22
|
+
- The requirements or acceptance criteria
|
|
23
|
+
- The approach or implementation strategy
|
|
24
|
+
- Dependencies or assumptions
|
|
25
|
+
- Anything unclear in the task description
|
|
26
|
+
|
|
27
|
+
**Ask them now.** Raise any concerns before starting work.
|
|
28
|
+
|
|
29
|
+
## Your Job
|
|
30
|
+
|
|
31
|
+
Once you're clear on requirements:
|
|
32
|
+
1. Implement exactly what the task specifies
|
|
33
|
+
2. Write tests (following TDD if task says to)
|
|
34
|
+
3. Verify implementation works
|
|
35
|
+
4. Commit your work
|
|
36
|
+
5. Self-review (see below)
|
|
37
|
+
6. Report back
|
|
38
|
+
|
|
39
|
+
Work from: [directory]
|
|
40
|
+
|
|
41
|
+
**While you work:** If you encounter something unexpected or unclear, **ask questions**.
|
|
42
|
+
It's always OK to pause and clarify. Don't guess or make assumptions.
|
|
43
|
+
|
|
44
|
+
## Before Reporting Back: Self-Review
|
|
45
|
+
|
|
46
|
+
Review your work with fresh eyes. Ask yourself:
|
|
47
|
+
|
|
48
|
+
**Completeness:**
|
|
49
|
+
- Did I fully implement everything in the spec?
|
|
50
|
+
- Did I miss any requirements?
|
|
51
|
+
- Are there edge cases I didn't handle?
|
|
52
|
+
|
|
53
|
+
**Quality:**
|
|
54
|
+
- Is this my best work?
|
|
55
|
+
- Are names clear and accurate (match what things do, not how they work)?
|
|
56
|
+
- Is the code clean and maintainable?
|
|
57
|
+
|
|
58
|
+
**Discipline:**
|
|
59
|
+
- Did I avoid overbuilding (YAGNI)?
|
|
60
|
+
- Did I only build what was requested?
|
|
61
|
+
- Did I follow existing patterns in the codebase?
|
|
62
|
+
|
|
63
|
+
**Testing:**
|
|
64
|
+
- Do tests actually verify behavior (not just mock behavior)?
|
|
65
|
+
- Did I follow TDD if required?
|
|
66
|
+
- Are tests comprehensive?
|
|
67
|
+
|
|
68
|
+
If you find issues during self-review, fix them now before reporting.
|
|
69
|
+
|
|
70
|
+
## Report Format
|
|
71
|
+
|
|
72
|
+
When done, report:
|
|
73
|
+
- What you implemented
|
|
74
|
+
- What you tested and test results
|
|
75
|
+
- Files changed
|
|
76
|
+
- Self-review findings (if any)
|
|
77
|
+
- Any issues or concerns
|
|
78
|
+
```
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Spec Compliance Reviewer Prompt Template
|
|
2
|
+
|
|
3
|
+
Use this template when dispatching a spec compliance reviewer subagent.
|
|
4
|
+
|
|
5
|
+
**Purpose:** Verify implementer built what was requested (nothing more, nothing less)
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
Task tool (general-purpose):
|
|
9
|
+
description: "Review spec compliance for Task N"
|
|
10
|
+
prompt: |
|
|
11
|
+
You are reviewing whether an implementation matches its specification.
|
|
12
|
+
|
|
13
|
+
## What Was Requested
|
|
14
|
+
|
|
15
|
+
[FULL TEXT of task requirements]
|
|
16
|
+
|
|
17
|
+
## What Implementer Claims They Built
|
|
18
|
+
|
|
19
|
+
[From implementer's report]
|
|
20
|
+
|
|
21
|
+
## CRITICAL: Do Not Trust the Report
|
|
22
|
+
|
|
23
|
+
The implementer finished suspiciously quickly. Their report may be incomplete,
|
|
24
|
+
inaccurate, or optimistic. You MUST verify everything independently.
|
|
25
|
+
|
|
26
|
+
**DO NOT:**
|
|
27
|
+
- Take their word for what they implemented
|
|
28
|
+
- Trust their claims about completeness
|
|
29
|
+
- Accept their interpretation of requirements
|
|
30
|
+
|
|
31
|
+
**DO:**
|
|
32
|
+
- Read the actual code they wrote
|
|
33
|
+
- Compare actual implementation to requirements line by line
|
|
34
|
+
- Check for missing pieces they claimed to implement
|
|
35
|
+
- Look for extra features they didn't mention
|
|
36
|
+
|
|
37
|
+
## Your Job
|
|
38
|
+
|
|
39
|
+
Read the implementation code and verify:
|
|
40
|
+
|
|
41
|
+
**Missing requirements:**
|
|
42
|
+
- Did they implement everything that was requested?
|
|
43
|
+
- Are there requirements they skipped or missed?
|
|
44
|
+
- Did they claim something works but didn't actually implement it?
|
|
45
|
+
|
|
46
|
+
**Extra/unneeded work:**
|
|
47
|
+
- Did they build things that weren't requested?
|
|
48
|
+
- Did they over-engineer or add unnecessary features?
|
|
49
|
+
- Did they add "nice to haves" that weren't in spec?
|
|
50
|
+
|
|
51
|
+
**Misunderstandings:**
|
|
52
|
+
- Did they interpret requirements differently than intended?
|
|
53
|
+
- Did they solve the wrong problem?
|
|
54
|
+
- Did they implement the right feature but wrong way?
|
|
55
|
+
|
|
56
|
+
**Verify by reading code, not by trusting report.**
|
|
57
|
+
|
|
58
|
+
Report:
|
|
59
|
+
- Spec compliant (if everything matches after code inspection)
|
|
60
|
+
- Issues found: [list specifically what's missing or extra, with file:line references]
|
|
61
|
+
```
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: draft-prs
|
|
3
|
+
description: Manages draft status for stacked PRs. Use when creating any PR in a stack (mark non-current PRs as draft), and when a base PR merges (promote the next PR to ready). Prevents reviewers from seeing PRs that depend on unmerged work.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Draft PR Management
|
|
7
|
+
|
|
8
|
+
Controls draft status across a stacked PR chain so reviewers only see PRs that are ready.
|
|
9
|
+
|
|
10
|
+
## Rule
|
|
11
|
+
|
|
12
|
+
**Only the bottom-most unmerged PR in a stack should be `open` (ready for review).** All PRs above it must be `draft` until their base merges.
|
|
13
|
+
|
|
14
|
+
Example:
|
|
15
|
+
```
|
|
16
|
+
PR 12 feat/flow-creation → OPEN (base is main, ready for review)
|
|
17
|
+
PR 13 feat/flow-node-editor → DRAFT (base is PR 12, not yet merged)
|
|
18
|
+
PR 14 feat/flow-connections → DRAFT (base is PR 13, not yet merged)
|
|
19
|
+
PR 15 feat/flow-variations → DRAFT (base is PR 14, not yet merged)
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
After PR 12 merges:
|
|
23
|
+
```
|
|
24
|
+
PR 13 feat/flow-node-editor → OPEN (rebased onto main, ready for review)
|
|
25
|
+
PR 14 feat/flow-connections → DRAFT (still waiting)
|
|
26
|
+
PR 15 feat/flow-variations → DRAFT (still waiting)
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## When Creating a PR in a Stack
|
|
30
|
+
|
|
31
|
+
### The current base PR (ready for review)
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
gh pr create \
|
|
35
|
+
--title "<title>" \
|
|
36
|
+
--base <base-branch> \
|
|
37
|
+
--body "$(cat <<'EOF'
|
|
38
|
+
## Summary
|
|
39
|
+
- <bullet>
|
|
40
|
+
- <bullet>
|
|
41
|
+
|
|
42
|
+
## Stack position
|
|
43
|
+
This is PR N of M in the `<feature-name>` stack.
|
|
44
|
+
Previous: #<prev-pr> | Next: #<next-pr> (draft)
|
|
45
|
+
|
|
46
|
+
## Test plan
|
|
47
|
+
- [ ] <verification step>
|
|
48
|
+
EOF
|
|
49
|
+
)"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Do NOT pass `--draft` for the current base PR.
|
|
53
|
+
|
|
54
|
+
### Downstream PRs (not yet ready for review)
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
gh pr create \
|
|
58
|
+
--draft \
|
|
59
|
+
--title "<title>" \
|
|
60
|
+
--base <base-branch> \
|
|
61
|
+
--body "$(cat <<'EOF'
|
|
62
|
+
## Summary
|
|
63
|
+
- <bullet>
|
|
64
|
+
|
|
65
|
+
## Stack position
|
|
66
|
+
This PR is **draft** -- waiting for #<base-pr> to merge first.
|
|
67
|
+
Stack: #<base-pr> → this PR → #<next-pr>
|
|
68
|
+
|
|
69
|
+
## Test plan
|
|
70
|
+
- [ ] <verification step>
|
|
71
|
+
EOF
|
|
72
|
+
)"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Always include the stack position context so reviewers understand the dependency.
|
|
76
|
+
|
|
77
|
+
## When a Base PR Merges
|
|
78
|
+
|
|
79
|
+
After the user reports a PR is merged:
|
|
80
|
+
|
|
81
|
+
1. **Identify the next PR** in the stack (first draft entry in `.claude/stack.json`)
|
|
82
|
+
|
|
83
|
+
2. **Rebase it onto main:**
|
|
84
|
+
```bash
|
|
85
|
+
git fetch
|
|
86
|
+
git checkout <next-branch>
|
|
87
|
+
git rebase main
|
|
88
|
+
git push --force-with-lease --force-if-includes
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
3. **Update its base on GitHub:**
|
|
92
|
+
```bash
|
|
93
|
+
gh pr edit <next-pr-number> --base main
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
4. **Promote from draft to ready:**
|
|
97
|
+
```bash
|
|
98
|
+
gh pr ready <next-pr-number>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
5. **Update `.claude/stack.json`** via the `jpegg:pr-stack` skill
|
|
102
|
+
|
|
103
|
+
6. Report: "PR #<number> promoted to ready for review: <url>"
|
|
104
|
+
|
|
105
|
+
## Updating Stack Position Text in PR Bodies
|
|
106
|
+
|
|
107
|
+
When a PR moves from draft to ready, optionally update its description:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
gh pr edit <number> --body "$(cat <<'EOF'
|
|
111
|
+
## Summary
|
|
112
|
+
<existing content>
|
|
113
|
+
|
|
114
|
+
## Stack position
|
|
115
|
+
Base: main (previously #<merged-pr>, now merged)
|
|
116
|
+
|
|
117
|
+
## Test plan
|
|
118
|
+
<existing content>
|
|
119
|
+
EOF
|
|
120
|
+
)"
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
This keeps the PR body accurate for reviewers who weren't watching from the start.
|
|
124
|
+
|
|
125
|
+
## Checking Current Draft Status
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
gh pr list --json number,title,isDraft,baseRefName,headRefName \
|
|
129
|
+
--jq '.[] | "\(.number) \(if .isDraft then "[DRAFT]" else "[OPEN]" end) \(.headRefName) → \(.baseRefName) \(.title)"'
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Use this to audit whether the stack matches the expected draft pattern.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: evaluate
|
|
3
|
+
description: "You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Brainstorming Ideas Into Designs
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Help turn ideas into fully formed designs and specs through natural collaborative dialogue.
|
|
11
|
+
|
|
12
|
+
Start by understanding the current project context, then ask questions one at a time to refine the idea. Once you understand what you're building, present the design and get user approval.
|
|
13
|
+
|
|
14
|
+
<HARD-GATE>
|
|
15
|
+
Do NOT invoke any implementation skill, write any code, scaffold any project, or take any implementation action until you have presented a design and the user has approved it. This applies to EVERY project regardless of perceived simplicity.
|
|
16
|
+
</HARD-GATE>
|
|
17
|
+
|
|
18
|
+
## Anti-Pattern: "This Is Too Simple To Need A Design"
|
|
19
|
+
|
|
20
|
+
Every project goes through this process. A todo list, a single-function utility, a config change -- all of them. "Simple" projects are where unexamined assumptions cause the most wasted work. The design can be short (a few sentences for truly simple projects), but you MUST present it and get approval.
|
|
21
|
+
|
|
22
|
+
## Checklist
|
|
23
|
+
|
|
24
|
+
You MUST create a task for each of these items and complete them in order:
|
|
25
|
+
|
|
26
|
+
1. **Explore project context** -- check files, docs, recent commits
|
|
27
|
+
2. **Ask clarifying questions** -- one at a time, understand purpose/constraints/success criteria
|
|
28
|
+
3. **Propose 2-3 approaches** -- with trade-offs and your recommendation
|
|
29
|
+
4. **Present design** -- in sections scaled to their complexity, get user approval after each section
|
|
30
|
+
5. **Write design doc** -- save to `docs/plans/YYYY-MM-DD-<topic>-design.md` and commit
|
|
31
|
+
6. **Transition to implementation** -- invoke blueprint skill to create implementation plan
|
|
32
|
+
|
|
33
|
+
## Process Flow
|
|
34
|
+
|
|
35
|
+
```dot
|
|
36
|
+
digraph evaluate {
|
|
37
|
+
"Explore project context" [shape=box];
|
|
38
|
+
"Ask clarifying questions" [shape=box];
|
|
39
|
+
"Propose 2-3 approaches" [shape=box];
|
|
40
|
+
"Present design sections" [shape=box];
|
|
41
|
+
"User approves design?" [shape=diamond];
|
|
42
|
+
"Write design doc" [shape=box];
|
|
43
|
+
"Invoke blueprint skill" [shape=doublecircle];
|
|
44
|
+
|
|
45
|
+
"Explore project context" -> "Ask clarifying questions";
|
|
46
|
+
"Ask clarifying questions" -> "Propose 2-3 approaches";
|
|
47
|
+
"Propose 2-3 approaches" -> "Present design sections";
|
|
48
|
+
"Present design sections" -> "User approves design?";
|
|
49
|
+
"User approves design?" -> "Present design sections" [label="no, revise"];
|
|
50
|
+
"User approves design?" -> "Write design doc" [label="yes"];
|
|
51
|
+
"Write design doc" -> "Invoke blueprint skill";
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**The terminal state is invoking blueprint.** Do NOT invoke frontend-design, mcp-builder, or any other implementation skill. The ONLY skill you invoke after evaluate is blueprint.
|
|
56
|
+
|
|
57
|
+
## The Process
|
|
58
|
+
|
|
59
|
+
**Understanding the idea:**
|
|
60
|
+
- Check out the current project state first (files, docs, recent commits)
|
|
61
|
+
- Ask questions one at a time to refine the idea
|
|
62
|
+
- Prefer multiple choice questions when possible, but open-ended is fine too
|
|
63
|
+
- Only one question per message - if a topic needs more exploration, break it into multiple questions
|
|
64
|
+
- Focus on understanding: purpose, constraints, success criteria
|
|
65
|
+
|
|
66
|
+
**Exploring approaches:**
|
|
67
|
+
- Propose 2-3 different approaches with trade-offs
|
|
68
|
+
- Present options conversationally with your recommendation and reasoning
|
|
69
|
+
- Lead with your recommended option and explain why
|
|
70
|
+
|
|
71
|
+
**Presenting the design:**
|
|
72
|
+
- Once you believe you understand what you're building, present the design
|
|
73
|
+
- Scale each section to its complexity: a few sentences if straightforward, up to 200-300 words if nuanced
|
|
74
|
+
- Ask after each section whether it looks right so far
|
|
75
|
+
- Cover: architecture, components, data flow, error handling, testing
|
|
76
|
+
- Be ready to go back and clarify if something doesn't make sense
|
|
77
|
+
|
|
78
|
+
## After the Design
|
|
79
|
+
|
|
80
|
+
**Documentation:**
|
|
81
|
+
- Write the validated design to `docs/plans/YYYY-MM-DD-<topic>-design.md`
|
|
82
|
+
- Use elements-of-style:writing-clearly-and-concisely skill if available
|
|
83
|
+
- Commit the design document to git
|
|
84
|
+
|
|
85
|
+
**Implementation:**
|
|
86
|
+
- Invoke the blueprint skill to create a detailed implementation plan
|
|
87
|
+
- Do NOT invoke any other skill. blueprint is the next step.
|
|
88
|
+
|
|
89
|
+
## Key Principles
|
|
90
|
+
|
|
91
|
+
- **One question at a time** - Don't overwhelm with multiple questions
|
|
92
|
+
- **Multiple choice preferred** - Easier to answer than open-ended when possible
|
|
93
|
+
- **YAGNI ruthlessly** - Remove unnecessary features from all designs
|
|
94
|
+
- **Explore alternatives** - Always propose 2-3 approaches before settling
|
|
95
|
+
- **Incremental validation** - Present design, get approval before moving on
|
|
96
|
+
- **Be flexible** - Go back and clarify when something doesn't make sense
|