@protolabsai/proto 0.14.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.
Files changed (85) hide show
  1. package/LICENSE +203 -0
  2. package/README.md +286 -0
  3. package/dist/bundled/adversarial-verification/SKILL.md +98 -0
  4. package/dist/bundled/brainstorming/SKILL.md +171 -0
  5. package/dist/bundled/coding-agent-standards/SKILL.md +67 -0
  6. package/dist/bundled/dispatching-parallel-agents/SKILL.md +193 -0
  7. package/dist/bundled/executing-plans/SKILL.md +77 -0
  8. package/dist/bundled/finishing-a-development-branch/SKILL.md +213 -0
  9. package/dist/bundled/loop/SKILL.md +61 -0
  10. package/dist/bundled/qc-helper/SKILL.md +151 -0
  11. package/dist/bundled/qc-helper/docs/_meta.ts +30 -0
  12. package/dist/bundled/qc-helper/docs/common-workflow.md +571 -0
  13. package/dist/bundled/qc-helper/docs/configuration/_meta.ts +10 -0
  14. package/dist/bundled/qc-helper/docs/configuration/auth.md +366 -0
  15. package/dist/bundled/qc-helper/docs/configuration/memory.md +0 -0
  16. package/dist/bundled/qc-helper/docs/configuration/model-providers.md +542 -0
  17. package/dist/bundled/qc-helper/docs/configuration/qwen-ignore.md +55 -0
  18. package/dist/bundled/qc-helper/docs/configuration/settings.md +652 -0
  19. package/dist/bundled/qc-helper/docs/configuration/themes.md +160 -0
  20. package/dist/bundled/qc-helper/docs/configuration/trusted-folders.md +61 -0
  21. package/dist/bundled/qc-helper/docs/extension/_meta.ts +9 -0
  22. package/dist/bundled/qc-helper/docs/extension/extension-releasing.md +121 -0
  23. package/dist/bundled/qc-helper/docs/extension/getting-started-extensions.md +299 -0
  24. package/dist/bundled/qc-helper/docs/extension/introduction.md +303 -0
  25. package/dist/bundled/qc-helper/docs/features/_meta.ts +18 -0
  26. package/dist/bundled/qc-helper/docs/features/approval-mode.md +263 -0
  27. package/dist/bundled/qc-helper/docs/features/arena.md +218 -0
  28. package/dist/bundled/qc-helper/docs/features/checkpointing.md +77 -0
  29. package/dist/bundled/qc-helper/docs/features/commands.md +312 -0
  30. package/dist/bundled/qc-helper/docs/features/headless.md +318 -0
  31. package/dist/bundled/qc-helper/docs/features/hooks.md +343 -0
  32. package/dist/bundled/qc-helper/docs/features/language.md +139 -0
  33. package/dist/bundled/qc-helper/docs/features/lsp.md +453 -0
  34. package/dist/bundled/qc-helper/docs/features/mcp.md +281 -0
  35. package/dist/bundled/qc-helper/docs/features/sandbox.md +241 -0
  36. package/dist/bundled/qc-helper/docs/features/scheduled-tasks.md +139 -0
  37. package/dist/bundled/qc-helper/docs/features/skills.md +289 -0
  38. package/dist/bundled/qc-helper/docs/features/sub-agents.md +307 -0
  39. package/dist/bundled/qc-helper/docs/features/token-caching.md +29 -0
  40. package/dist/bundled/qc-helper/docs/ide-integration/_meta.ts +4 -0
  41. package/dist/bundled/qc-helper/docs/ide-integration/ide-companion-spec.md +182 -0
  42. package/dist/bundled/qc-helper/docs/ide-integration/ide-integration.md +144 -0
  43. package/dist/bundled/qc-helper/docs/integration-github-action.md +241 -0
  44. package/dist/bundled/qc-helper/docs/integration-jetbrains.md +81 -0
  45. package/dist/bundled/qc-helper/docs/integration-vscode.md +39 -0
  46. package/dist/bundled/qc-helper/docs/integration-zed.md +72 -0
  47. package/dist/bundled/qc-helper/docs/overview.md +64 -0
  48. package/dist/bundled/qc-helper/docs/quickstart.md +273 -0
  49. package/dist/bundled/qc-helper/docs/reference/_meta.ts +4 -0
  50. package/dist/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +72 -0
  51. package/dist/bundled/qc-helper/docs/reference/sdk-api.md +524 -0
  52. package/dist/bundled/qc-helper/docs/support/Uninstall.md +42 -0
  53. package/dist/bundled/qc-helper/docs/support/_meta.ts +6 -0
  54. package/dist/bundled/qc-helper/docs/support/tos-privacy.md +112 -0
  55. package/dist/bundled/qc-helper/docs/support/troubleshooting.md +123 -0
  56. package/dist/bundled/receiving-code-review/SKILL.md +226 -0
  57. package/dist/bundled/requesting-code-review/SKILL.md +115 -0
  58. package/dist/bundled/review/SKILL.md +123 -0
  59. package/dist/bundled/subagent-driven-development/SKILL.md +292 -0
  60. package/dist/bundled/subagent-driven-development/code-quality-reviewer-prompt.md +27 -0
  61. package/dist/bundled/subagent-driven-development/implementer-prompt.md +113 -0
  62. package/dist/bundled/subagent-driven-development/spec-reviewer-prompt.md +61 -0
  63. package/dist/bundled/systematic-debugging/SKILL.md +305 -0
  64. package/dist/bundled/test-driven-development/SKILL.md +396 -0
  65. package/dist/bundled/using-git-worktrees/SKILL.md +223 -0
  66. package/dist/bundled/using-superpowers/SKILL.md +117 -0
  67. package/dist/bundled/verification-before-completion/SKILL.md +147 -0
  68. package/dist/bundled/writing-plans/SKILL.md +159 -0
  69. package/dist/bundled/writing-skills/SKILL.md +716 -0
  70. package/dist/cli.js +483432 -0
  71. package/dist/sandbox-macos-permissive-closed.sb +32 -0
  72. package/dist/sandbox-macos-permissive-open.sb +27 -0
  73. package/dist/sandbox-macos-permissive-proxied.sb +37 -0
  74. package/dist/sandbox-macos-restrictive-closed.sb +93 -0
  75. package/dist/sandbox-macos-restrictive-open.sb +96 -0
  76. package/dist/sandbox-macos-restrictive-proxied.sb +98 -0
  77. package/dist/vendor/ripgrep/COPYING +3 -0
  78. package/dist/vendor/ripgrep/arm64-darwin/rg +0 -0
  79. package/dist/vendor/ripgrep/arm64-linux/rg +0 -0
  80. package/dist/vendor/ripgrep/x64-darwin/rg +0 -0
  81. package/dist/vendor/ripgrep/x64-linux/rg +0 -0
  82. package/dist/vendor/ripgrep/x64-win32/rg.exe +0 -0
  83. package/dist/vendor/tree-sitter/tree-sitter-bash.wasm +0 -0
  84. package/dist/vendor/tree-sitter/tree-sitter.wasm +0 -0
  85. package/package.json +143 -0
@@ -0,0 +1,292 @@
1
+ ---
2
+ name: subagent-driven-development
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
+ **Why subagents:** You delegate tasks to specialized agents with isolated context. By precisely crafting their instructions and context, you ensure they stay focused and succeed at their task. They should never inherit your session's context or history — you construct exactly what they need. This also preserves your own context for coordination work.
11
+
12
+ **Core principle:** Fresh subagent per task + two-stage review (spec then quality) = high quality, fast iteration
13
+
14
+ ## When to Use
15
+
16
+ ```dot
17
+ digraph when_to_use {
18
+ "Have implementation plan?" [shape=diamond];
19
+ "Tasks mostly independent?" [shape=diamond];
20
+ "Stay in this session?" [shape=diamond];
21
+ "subagent-driven-development" [shape=box];
22
+ "executing-plans" [shape=box];
23
+ "Manual execution or brainstorm first" [shape=box];
24
+
25
+ "Have implementation plan?" -> "Tasks mostly independent?" [label="yes"];
26
+ "Have implementation plan?" -> "Manual execution or brainstorm first" [label="no"];
27
+ "Tasks mostly independent?" -> "Stay in this session?" [label="yes"];
28
+ "Tasks mostly independent?" -> "Manual execution or brainstorm first" [label="no - tightly coupled"];
29
+ "Stay in this session?" -> "subagent-driven-development" [label="yes"];
30
+ "Stay in this session?" -> "executing-plans" [label="no - parallel session"];
31
+ }
32
+ ```
33
+
34
+ **vs. Executing Plans (parallel session):**
35
+
36
+ - Same session (no context switch)
37
+ - Fresh subagent per task (no context pollution)
38
+ - Two-stage review after each task: spec compliance first, then code quality
39
+ - Faster iteration (no human-in-loop between tasks)
40
+
41
+ ## The Process
42
+
43
+ ```dot
44
+ digraph process {
45
+ rankdir=TB;
46
+
47
+ subgraph cluster_per_task {
48
+ label="Per Task";
49
+ "Dispatch implementer subagent (./implementer-prompt.md)" [shape=box];
50
+ "Implementer subagent asks questions?" [shape=diamond];
51
+ "Answer questions, provide context" [shape=box];
52
+ "Implementer subagent implements, tests, commits, self-reviews" [shape=box];
53
+ "Dispatch spec reviewer subagent (./spec-reviewer-prompt.md)" [shape=box];
54
+ "Spec reviewer subagent confirms code matches spec?" [shape=diamond];
55
+ "Implementer subagent fixes spec gaps" [shape=box];
56
+ "Dispatch code quality reviewer subagent (./code-quality-reviewer-prompt.md)" [shape=box];
57
+ "Code quality reviewer subagent approves?" [shape=diamond];
58
+ "Implementer subagent fixes quality issues" [shape=box];
59
+ "Mark task complete in TodoWrite" [shape=box];
60
+ }
61
+
62
+ "Read plan, extract all tasks with full text, note context, create TodoWrite" [shape=box];
63
+ "More tasks remain?" [shape=diamond];
64
+ "Dispatch final code reviewer subagent for entire implementation" [shape=box];
65
+ "Use superpowers:finishing-a-development-branch" [shape=box style=filled fillcolor=lightgreen];
66
+
67
+ "Read plan, extract all tasks with full text, note context, create TodoWrite" -> "Dispatch implementer subagent (./implementer-prompt.md)";
68
+ "Dispatch implementer subagent (./implementer-prompt.md)" -> "Implementer subagent asks questions?";
69
+ "Implementer subagent asks questions?" -> "Answer questions, provide context" [label="yes"];
70
+ "Answer questions, provide context" -> "Dispatch implementer subagent (./implementer-prompt.md)";
71
+ "Implementer subagent asks questions?" -> "Implementer subagent implements, tests, commits, self-reviews" [label="no"];
72
+ "Implementer subagent implements, tests, commits, self-reviews" -> "Dispatch spec reviewer subagent (./spec-reviewer-prompt.md)";
73
+ "Dispatch spec reviewer subagent (./spec-reviewer-prompt.md)" -> "Spec reviewer subagent confirms code matches spec?";
74
+ "Spec reviewer subagent confirms code matches spec?" -> "Implementer subagent fixes spec gaps" [label="no"];
75
+ "Implementer subagent fixes spec gaps" -> "Dispatch spec reviewer subagent (./spec-reviewer-prompt.md)" [label="re-review"];
76
+ "Spec reviewer subagent confirms code matches spec?" -> "Dispatch code quality reviewer subagent (./code-quality-reviewer-prompt.md)" [label="yes"];
77
+ "Dispatch code quality reviewer subagent (./code-quality-reviewer-prompt.md)" -> "Code quality reviewer subagent approves?";
78
+ "Code quality reviewer subagent approves?" -> "Implementer subagent fixes quality issues" [label="no"];
79
+ "Implementer subagent fixes quality issues" -> "Dispatch code quality reviewer subagent (./code-quality-reviewer-prompt.md)" [label="re-review"];
80
+ "Code quality reviewer subagent approves?" -> "Mark task complete in TodoWrite" [label="yes"];
81
+ "Mark task complete in TodoWrite" -> "More tasks remain?";
82
+ "More tasks remain?" -> "Dispatch implementer subagent (./implementer-prompt.md)" [label="yes"];
83
+ "More tasks remain?" -> "Dispatch final code reviewer subagent for entire implementation" [label="no"];
84
+ "Dispatch final code reviewer subagent for entire implementation" -> "Use superpowers:finishing-a-development-branch";
85
+ }
86
+ ```
87
+
88
+ ## Model Selection
89
+
90
+ Use the least powerful model that can handle each role to conserve cost and increase speed.
91
+
92
+ **Mechanical implementation tasks** (isolated functions, clear specs, 1-2 files): use a fast, cheap model. Most implementation tasks are mechanical when the plan is well-specified.
93
+
94
+ **Integration and judgment tasks** (multi-file coordination, pattern matching, debugging): use a standard model.
95
+
96
+ **Architecture, design, and review tasks**: use the most capable available model.
97
+
98
+ **Task complexity signals:**
99
+
100
+ - Touches 1-2 files with a complete spec → cheap model
101
+ - Touches multiple files with integration concerns → standard model
102
+ - Requires design judgment or broad codebase understanding → most capable model
103
+
104
+ ## Handling Implementer Status
105
+
106
+ Implementer subagents report one of four statuses. Handle each appropriately:
107
+
108
+ **DONE:** Proceed to spec compliance review.
109
+
110
+ **DONE_WITH_CONCERNS:** The implementer completed the work but flagged doubts. Read the concerns before proceeding. If the concerns are about correctness or scope, address them before review. If they're observations (e.g., "this file is getting large"), note them and proceed to review.
111
+
112
+ **NEEDS_CONTEXT:** The implementer needs information that wasn't provided. Provide the missing context and re-dispatch.
113
+
114
+ **BLOCKED:** The implementer cannot complete the task. Assess the blocker:
115
+
116
+ 1. If it's a context problem, provide more context and re-dispatch with the same model
117
+ 2. If the task requires more reasoning, re-dispatch with a more capable model
118
+ 3. If the task is too large, break it into smaller pieces
119
+ 4. If the plan itself is wrong, escalate to the human
120
+
121
+ **Never** ignore an escalation or force the same model to retry without changes. If the implementer said it's stuck, something needs to change.
122
+
123
+ ## Prompt Templates
124
+
125
+ - `./implementer-prompt.md` - Dispatch implementer subagent
126
+ - `./spec-reviewer-prompt.md` - Dispatch spec compliance reviewer subagent
127
+ - `./code-quality-reviewer-prompt.md` - Dispatch code quality reviewer subagent
128
+
129
+ ## Example Workflow
130
+
131
+ ```
132
+ You: I'm using Subagent-Driven Development to execute this plan.
133
+
134
+ [Read plan file once: docs/superpowers/plans/feature-plan.md]
135
+ [Extract all 5 tasks with full text and context]
136
+ [Create TodoWrite with all tasks]
137
+
138
+ Task 1: Hook installation script
139
+
140
+ [Get Task 1 text and context (already extracted)]
141
+ [Dispatch implementation subagent with full task text + context]
142
+
143
+ Implementer: "Before I begin - should the hook be installed at user or system level?"
144
+
145
+ You: "User level (~/.config/superpowers/hooks/)"
146
+
147
+ Implementer: "Got it. Implementing now..."
148
+ [Later] Implementer:
149
+ - Implemented install-hook command
150
+ - Added tests, 5/5 passing
151
+ - Self-review: Found I missed --force flag, added it
152
+ - Committed
153
+
154
+ [Dispatch spec compliance reviewer]
155
+ Spec reviewer: ✅ Spec compliant - all requirements met, nothing extra
156
+
157
+ [Get git SHAs, dispatch code quality reviewer]
158
+ Code reviewer: Strengths: Good test coverage, clean. Issues: None. Approved.
159
+
160
+ [Mark Task 1 complete]
161
+
162
+ Task 2: Recovery modes
163
+
164
+ [Get Task 2 text and context (already extracted)]
165
+ [Dispatch implementation subagent with full task text + context]
166
+
167
+ Implementer: [No questions, proceeds]
168
+ Implementer:
169
+ - Added verify/repair modes
170
+ - 8/8 tests passing
171
+ - Self-review: All good
172
+ - Committed
173
+
174
+ [Dispatch spec compliance reviewer]
175
+ Spec reviewer: ❌ Issues:
176
+ - Missing: Progress reporting (spec says "report every 100 items")
177
+ - Extra: Added --json flag (not requested)
178
+
179
+ [Implementer fixes issues]
180
+ Implementer: Removed --json flag, added progress reporting
181
+
182
+ [Spec reviewer reviews again]
183
+ Spec reviewer: ✅ Spec compliant now
184
+
185
+ [Dispatch code quality reviewer]
186
+ Code reviewer: Strengths: Solid. Issues (Important): Magic number (100)
187
+
188
+ [Implementer fixes]
189
+ Implementer: Extracted PROGRESS_INTERVAL constant
190
+
191
+ [Code reviewer reviews again]
192
+ Code reviewer: ✅ Approved
193
+
194
+ [Mark Task 2 complete]
195
+
196
+ ...
197
+
198
+ [After all tasks]
199
+ [Dispatch final code-reviewer]
200
+ Final reviewer: All requirements met, ready to merge
201
+
202
+ Done!
203
+ ```
204
+
205
+ ## Advantages
206
+
207
+ **vs. Manual execution:**
208
+
209
+ - Subagents follow TDD naturally
210
+ - Fresh context per task (no confusion)
211
+ - Parallel-safe (subagents don't interfere)
212
+ - Subagent can ask questions (before AND during work)
213
+
214
+ **vs. Executing Plans:**
215
+
216
+ - Same session (no handoff)
217
+ - Continuous progress (no waiting)
218
+ - Review checkpoints automatic
219
+
220
+ **Efficiency gains:**
221
+
222
+ - No file reading overhead (controller provides full text)
223
+ - Controller curates exactly what context is needed
224
+ - Subagent gets complete information upfront
225
+ - Questions surfaced before work begins (not after)
226
+
227
+ **Quality gates:**
228
+
229
+ - Self-review catches issues before handoff
230
+ - Two-stage review: spec compliance, then code quality
231
+ - Review loops ensure fixes actually work
232
+ - Spec compliance prevents over/under-building
233
+ - Code quality ensures implementation is well-built
234
+
235
+ **Cost:**
236
+
237
+ - More subagent invocations (implementer + 2 reviewers per task)
238
+ - Controller does more prep work (extracting all tasks upfront)
239
+ - Review loops add iterations
240
+ - But catches issues early (cheaper than debugging later)
241
+
242
+ ## Red Flags
243
+
244
+ **Never:**
245
+
246
+ - Start implementation on main/master branch without explicit user consent
247
+ - Skip reviews (spec compliance OR code quality)
248
+ - Proceed with unfixed issues
249
+ - Dispatch multiple implementation subagents in parallel (conflicts)
250
+ - Make subagent read plan file (provide full text instead)
251
+ - Skip scene-setting context (subagent needs to understand where task fits)
252
+ - Ignore subagent questions (answer before letting them proceed)
253
+ - Accept "close enough" on spec compliance (spec reviewer found issues = not done)
254
+ - Skip review loops (reviewer found issues = implementer fixes = review again)
255
+ - Let implementer self-review replace actual review (both are needed)
256
+ - **Start code quality review before spec compliance is ✅** (wrong order)
257
+ - Move to next task while either review has open issues
258
+
259
+ **If subagent asks questions:**
260
+
261
+ - Answer clearly and completely
262
+ - Provide additional context if needed
263
+ - Don't rush them into implementation
264
+
265
+ **If reviewer finds issues:**
266
+
267
+ - Implementer (same subagent) fixes them
268
+ - Reviewer reviews again
269
+ - Repeat until approved
270
+ - Don't skip the re-review
271
+
272
+ **If subagent fails task:**
273
+
274
+ - Dispatch fix subagent with specific instructions
275
+ - Don't try to fix manually (context pollution)
276
+
277
+ ## Integration
278
+
279
+ **Required workflow skills:**
280
+
281
+ - **superpowers:using-git-worktrees** - REQUIRED: Set up isolated workspace before starting
282
+ - **superpowers:writing-plans** - Creates the plan this skill executes
283
+ - **superpowers:requesting-code-review** - Code review template for reviewer subagents
284
+ - **superpowers:finishing-a-development-branch** - Complete development after all tasks
285
+
286
+ **Subagents should use:**
287
+
288
+ - **superpowers:test-driven-development** - Subagents follow TDD for each task
289
+
290
+ **Alternative workflow:**
291
+
292
+ - **superpowers:executing-plans** - Use for parallel session instead of same-session execution
@@ -0,0 +1,27 @@
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
+ Agent tool (subagent_type: "clean-code-architect"):
11
+ Use template at requesting-code-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
+ **In addition to standard code quality concerns, the reviewer should check:**
21
+
22
+ - Does each file have one clear responsibility with a well-defined interface?
23
+ - Are units decomposed so they can be understood and tested independently?
24
+ - Is the implementation following the file structure from the plan?
25
+ - Did this implementation create new files that are already large, or significantly grow existing files? (Don't flag pre-existing file sizes — focus on what this change contributed.)
26
+
27
+ **Code reviewer returns:** Strengths, Issues (Critical/Important/Minor), Assessment
@@ -0,0 +1,113 @@
1
+ # Implementer Subagent Prompt Template
2
+
3
+ Use this template when dispatching an implementer subagent.
4
+
5
+ ```
6
+ Agent 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
+ ## Code Organization
45
+
46
+ You reason best about code you can hold in context at once, and your edits are more
47
+ reliable when files are focused. Keep this in mind:
48
+ - Follow the file structure defined in the plan
49
+ - Each file should have one clear responsibility with a well-defined interface
50
+ - If a file you're creating is growing beyond the plan's intent, stop and report
51
+ it as DONE_WITH_CONCERNS — don't split files on your own without plan guidance
52
+ - If an existing file you're modifying is already large or tangled, work carefully
53
+ and note it as a concern in your report
54
+ - In existing codebases, follow established patterns. Improve code you're touching
55
+ the way a good developer would, but don't restructure things outside your task.
56
+
57
+ ## When You're in Over Your Head
58
+
59
+ It is always OK to stop and say "this is too hard for me." Bad work is worse than
60
+ no work. You will not be penalized for escalating.
61
+
62
+ **STOP and escalate when:**
63
+ - The task requires architectural decisions with multiple valid approaches
64
+ - You need to understand code beyond what was provided and can't find clarity
65
+ - You feel uncertain about whether your approach is correct
66
+ - The task involves restructuring existing code in ways the plan didn't anticipate
67
+ - You've been reading file after file trying to understand the system without progress
68
+
69
+ **How to escalate:** Report back with status BLOCKED or NEEDS_CONTEXT. Describe
70
+ specifically what you're stuck on, what you've tried, and what kind of help you need.
71
+ The controller can provide more context, re-dispatch with a more capable model,
72
+ or break the task into smaller pieces.
73
+
74
+ ## Before Reporting Back: Self-Review
75
+
76
+ Review your work with fresh eyes. Ask yourself:
77
+
78
+ **Completeness:**
79
+ - Did I fully implement everything in the spec?
80
+ - Did I miss any requirements?
81
+ - Are there edge cases I didn't handle?
82
+
83
+ **Quality:**
84
+ - Is this my best work?
85
+ - Are names clear and accurate (match what things do, not how they work)?
86
+ - Is the code clean and maintainable?
87
+
88
+ **Discipline:**
89
+ - Did I avoid overbuilding (YAGNI)?
90
+ - Did I only build what was requested?
91
+ - Did I follow existing patterns in the codebase?
92
+
93
+ **Testing:**
94
+ - Do tests actually verify behavior (not just mock behavior)?
95
+ - Did I follow TDD if required?
96
+ - Are tests comprehensive?
97
+
98
+ If you find issues during self-review, fix them now before reporting.
99
+
100
+ ## Report Format
101
+
102
+ When done, report:
103
+ - **Status:** DONE | DONE_WITH_CONCERNS | BLOCKED | NEEDS_CONTEXT
104
+ - What you implemented (or what you attempted, if blocked)
105
+ - What you tested and test results
106
+ - Files changed
107
+ - Self-review findings (if any)
108
+ - Any issues or concerns
109
+
110
+ Use DONE_WITH_CONCERNS if you completed the work but have doubts about correctness.
111
+ Use BLOCKED if you cannot complete the task. Use NEEDS_CONTEXT if you need
112
+ information that wasn't provided. Never silently produce work you're unsure about.
113
+ ```
@@ -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
+ Agent 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
+ ```