claude-everything-workflow 0.1.9 → 0.2.3

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 (152) hide show
  1. package/AGENTS.md +20 -20
  2. package/CLAUDE.md +1 -5
  3. package/README.md +151 -113
  4. package/agents/e2e-runner.md +8 -141
  5. package/agents/harness-optimizer.md +3 -2
  6. package/commands/code-review.md +10 -15
  7. package/commands/learn.md +97 -0
  8. package/commands/pr.md +5 -6
  9. package/commands/to-spec.md +11 -0
  10. package/commands/verify.md +7 -11
  11. package/harness/manifest.json +346 -0
  12. package/hooks/check-code-size.js +33 -12
  13. package/hooks/check-console-log.js +72 -24
  14. package/package.json +10 -2
  15. package/rules/01-base.md +9 -49
  16. package/rules/02-code-size.md +5 -20
  17. package/rules/03-architecture.md +9 -61
  18. package/rules/04-error-handling.md +4 -26
  19. package/rules/05-git-workflow.md +12 -39
  20. package/rules/06-comments.md +3 -43
  21. package/rules/07-forbidden.md +8 -31
  22. package/rules/08-specialty-rules-index.md +18 -0
  23. package/rules/09-first-principles-adversarial-testing.md +6 -18
  24. package/rules/common/agent-orchestration.md +8 -47
  25. package/rules/common/context-hygiene.md +9 -72
  26. package/rules/common/harness-engineering.md +11 -38
  27. package/rules/common/hooks.md +13 -82
  28. package/rules/common/performance.md +8 -71
  29. package/rules/common/pr-automation.md +7 -68
  30. package/rules/common/skills-learning.md +12 -36
  31. package/rules/common/testing.md +16 -59
  32. package/scripts/cleanup-retired-skills.js +214 -0
  33. package/scripts/install-rules.js +100 -0
  34. package/scripts/install.ps1 +99 -87
  35. package/scripts/install.sh +77 -78
  36. package/scripts/learning/review-confidence.js +1 -4
  37. package/scripts/legacy-common-rule-hashes.json +78 -0
  38. package/scripts/merge-claude-settings.cjs +75 -0
  39. package/scripts/retired-skill-files.json +54 -0
  40. package/scripts/upstream-capability-baseline.json +27 -0
  41. package/scripts/upstream-capability-map.json +155 -0
  42. package/scripts/verify/core.js +91 -0
  43. package/scripts/verify/grilling-spec-gate-checks.js +266 -0
  44. package/scripts/verify/install-rules.test.js +156 -0
  45. package/scripts/verify/metadata-checks.js +747 -0
  46. package/scripts/verify/repository-checks.js +409 -0
  47. package/scripts/verify/runtime-checks.js +593 -0
  48. package/scripts/verify/skill-invocation.test.js +86 -0
  49. package/scripts/verify/skill-manifest-checks.js +197 -0
  50. package/scripts/verify/skill-manifest-checks.test.js +123 -0
  51. package/scripts/verify/workflow-checks.js +685 -0
  52. package/scripts/verify/workflow-ownership-fixtures.js +371 -0
  53. package/scripts/verify/workflow-ownership.js +780 -0
  54. package/scripts/verify-harness.js +18 -1075
  55. package/scripts/verify-upstream-capability-map.js +118 -0
  56. package/skills/README.md +28 -16
  57. package/skills/code-review/SKILL.md +63 -0
  58. package/skills/code-review/references/spec-reviewer-prompt.md +24 -0
  59. package/skills/code-review/references/standards-reviewer-prompt.md +35 -0
  60. package/skills/codebase-design/SKILL.md +63 -0
  61. package/skills/codebase-design/references/deepening.md +27 -0
  62. package/skills/codebase-design/references/design-it-twice.md +17 -0
  63. package/skills/continuous-learning-v2/SKILL.md +8 -8
  64. package/skills/continuous-learning-v2/config.json +0 -4
  65. package/skills/domain-modeling/SKILL.md +101 -0
  66. package/skills/e2e-testing/SKILL.md +20 -310
  67. package/skills/e2e-testing/references/playwright-patterns.md +324 -0
  68. package/skills/feature-acceptance/SKILL.md +89 -0
  69. package/skills/grilling/SKILL.md +83 -0
  70. package/skills/handoff/SKILL.md +55 -0
  71. package/skills/handoff/agents/openai.yaml +2 -0
  72. package/skills/implement/SKILL.md +48 -0
  73. package/skills/implement/references/ticket-delivery.md +43 -0
  74. package/skills/improve-codebase-architecture/SKILL.md +47 -0
  75. package/skills/improve-codebase-architecture/agents/openai.yaml +2 -0
  76. package/skills/iterative-retrieval/SKILL.md +10 -1
  77. package/skills/learn/README.md +2 -2
  78. package/skills/prototype/SKILL.md +50 -0
  79. package/skills/prototype/references/logic.md +28 -0
  80. package/skills/prototype/references/ui.md +30 -0
  81. package/skills/resolving-merge-conflicts/SKILL.md +27 -0
  82. package/skills/spec-gate/SKILL.md +149 -0
  83. package/skills/spec-gate/agents/openai.yaml +4 -0
  84. package/skills/spec-gate/references/spec-document-reviewer-prompt.md +31 -0
  85. package/skills/subagent-driven-development/SKILL.md +95 -414
  86. package/skills/systematic-debugging/SKILL.md +11 -49
  87. package/skills/systematic-debugging/references/diagnosing-bugs.upstream.md +129 -0
  88. package/skills/systematic-debugging/scripts/hitl-loop.template.js +75 -0
  89. package/skills/systematic-debugging/scripts/hitl-loop.template.sh +41 -0
  90. package/skills/test-driven-development/SKILL.md +24 -4
  91. package/skills/to-tickets/SKILL.md +96 -0
  92. package/skills/triage/SKILL.md +53 -0
  93. package/skills/triage/agents/openai.yaml +2 -0
  94. package/skills/triage/references/agent-brief.md +32 -0
  95. package/skills/triage/references/out-of-scope.md +14 -0
  96. package/skills/using-git-worktrees/SKILL.md +8 -5
  97. package/skills/using-superpowers/SKILL.md +76 -43
  98. package/skills/using-superpowers/references/process-outcomes.md +41 -0
  99. package/skills/verification-before-completion/SKILL.md +5 -4
  100. package/skills/visual-companion/SKILL.md +62 -0
  101. package/skills/visual-companion/agents/openai.yaml +4 -0
  102. package/skills/{brainstorming/visual-companion.md → visual-companion/references/guide.md} +1 -1
  103. package/skills/{brainstorming → visual-companion}/scripts/frame-template.html +42 -12
  104. package/skills/visual-companion/scripts/pages.cjs +28 -0
  105. package/skills/visual-companion/scripts/server-utils.cjs +82 -0
  106. package/skills/{brainstorming → visual-companion}/scripts/server.cjs +108 -248
  107. package/skills/{brainstorming → visual-companion}/scripts/start-server.sh +18 -4
  108. package/skills/visual-companion/scripts/websocket.cjs +86 -0
  109. package/agents/architect.md +0 -59
  110. package/agents/code-reviewer.md +0 -57
  111. package/agents/planner.md +0 -124
  112. package/agents/tdd-guide.md +0 -101
  113. package/commands/e2e.md +0 -28
  114. package/commands/evolve.md +0 -42
  115. package/commands/harness-audit.md +0 -27
  116. package/commands/instinct-status.md +0 -38
  117. package/commands/learn-eval.md +0 -91
  118. package/commands/projects.md +0 -27
  119. package/commands/promote.md +0 -29
  120. package/commands/prune.md +0 -46
  121. package/commands/tdd.md +0 -27
  122. package/homunculus/instincts/personal/always-test-first.md +0 -28
  123. package/homunculus/instincts/personal/pr-ci-quality-gate.md +0 -30
  124. package/rules/08-ecc-integration.md +0 -46
  125. package/rules/common/implementation.md +0 -25
  126. package/rules/common/security.md +0 -19
  127. package/skills/brainstorming/SKILL.md +0 -185
  128. package/skills/brainstorming/agents/openai.yaml +0 -3
  129. package/skills/brainstorming/spec-document-reviewer-prompt.md +0 -49
  130. package/skills/context-budget/SKILL.md +0 -59
  131. package/skills/discover-unknowns-zh/SKILL.md +0 -112
  132. package/skills/discover-unknowns-zh/agents/openai.yaml +0 -4
  133. package/skills/discover-unknowns-zh/references/prompt-patterns.md +0 -144
  134. package/skills/documentation-lookup/SKILL.md +0 -90
  135. package/skills/executing-plans/SKILL.md +0 -66
  136. package/skills/find-skills/SKILL.md +0 -142
  137. package/skills/skill-creator/LICENSE.txt +0 -202
  138. package/skills/skill-creator/SKILL.md +0 -356
  139. package/skills/skill-creator/references/output-patterns.md +0 -82
  140. package/skills/skill-creator/references/workflows.md +0 -28
  141. package/skills/skill-creator/scripts/init_skill.py +0 -303
  142. package/skills/skill-creator/scripts/package_skill.py +0 -110
  143. package/skills/skill-creator/scripts/quick_validate.py +0 -95
  144. package/skills/subagent-driven-development/implementer-prompt.md +0 -139
  145. package/skills/subagent-driven-development/scripts/review-package +0 -44
  146. package/skills/subagent-driven-development/scripts/sdd-workspace +0 -22
  147. package/skills/subagent-driven-development/scripts/task-brief +0 -40
  148. package/skills/subagent-driven-development/task-reviewer-prompt.md +0 -188
  149. package/skills/writing-plans/SKILL.md +0 -206
  150. package/skills/writing-plans/plan-document-reviewer-prompt.md +0 -49
  151. /package/skills/{brainstorming → visual-companion}/scripts/helper.js +0 -0
  152. /package/skills/{brainstorming → visual-companion}/scripts/stop-server.sh +0 -0
@@ -1,22 +0,0 @@
1
- #!/usr/bin/env bash
2
- # Resolve and ensure the working-tree directory SDD uses for its short-lived
3
- # artifacts: task briefs, implementer reports, review packages, and the
4
- # progress ledger. Print the directory's absolute path.
5
- #
6
- # The workspace lives in the working tree (not under .git/) because Claude Code
7
- # treats .git/ as a protected path and denies agent writes there — which blocks
8
- # an implementer subagent from writing its report file. A self-ignoring
9
- # .gitignore keeps the workspace out of `git status` and out of accidental
10
- # commits without modifying any tracked file.
11
- #
12
- # Single source of truth for the workspace location, so task-brief and
13
- # review-package cannot drift to different directories.
14
- #
15
- # Usage: sdd-workspace
16
- set -euo pipefail
17
-
18
- root=$(git rev-parse --show-toplevel)
19
- dir="$root/.superpowers/sdd"
20
- mkdir -p "$dir"
21
- printf '*\n' > "$dir/.gitignore"
22
- cd "$dir" && pwd
@@ -1,40 +0,0 @@
1
- #!/usr/bin/env bash
2
- # Extract one task's full text from an implementation plan into a file the
3
- # implementer reads in one call, so the task text never has to be pasted
4
- # through the controller's context.
5
- #
6
- # Usage: task-brief PLAN_FILE TASK_NUMBER [OUTFILE]
7
- # Default OUTFILE: <repo-root>/.superpowers/sdd/task-<N>-brief.md
8
- # (per worktree; concurrent runs in the same working tree share it).
9
- set -euo pipefail
10
-
11
- if [ $# -lt 2 ] || [ $# -gt 3 ]; then
12
- echo "usage: task-brief PLAN_FILE TASK_NUMBER [OUTFILE]" >&2
13
- exit 2
14
- fi
15
-
16
- plan=$1
17
- n=$2
18
- [ -f "$plan" ] || { echo "no such plan file: $plan" >&2; exit 2; }
19
-
20
- if [ $# -eq 3 ]; then
21
- out=$3
22
- else
23
- dir=$("$(cd "$(dirname "$0")" && pwd)/sdd-workspace")
24
- out="$dir/task-${n}-brief.md"
25
- fi
26
-
27
- awk -v n="$n" '
28
- /^```/ { infence = !infence }
29
- !infence && /^#+[ \t]+Task[ \t]+[0-9]+/ {
30
- intask = ($0 ~ ("^#+[ \t]+Task[ \t]+" n "([^0-9]|$)"))
31
- }
32
- intask { print }
33
- ' "$plan" > "$out"
34
-
35
- if [ ! -s "$out" ]; then
36
- echo "task ${n} not found in ${plan} (no heading matching 'Task ${n}')" >&2
37
- exit 3
38
- fi
39
-
40
- echo "wrote ${out}: $(wc -l < "$out" | tr -d ' ') lines"
@@ -1,188 +0,0 @@
1
- # Task Reviewer Prompt Template
2
-
3
- Use this template when dispatching a task reviewer subagent. The reviewer
4
- reads the task's diff once and returns two verdicts: spec compliance and
5
- code quality.
6
-
7
- **Purpose:** Verify one task's implementation matches its requirements (nothing
8
- more, nothing less) and is well-built (clean, tested, maintainable)
9
-
10
- ```
11
- Subagent (general-purpose):
12
- description: "Review Task N (spec + quality)"
13
- model: [MODEL — REQUIRED: choose per SKILL.md Model Selection; an omitted
14
- model silently inherits the session's most expensive one]
15
- prompt: |
16
- You are reviewing one task's implementation: first whether it matches its
17
- requirements, then whether it is well-built. This is a task-scoped gate,
18
- not a merge review — a broad whole-branch review happens separately after
19
- all tasks are complete.
20
-
21
- ## What Was Requested
22
-
23
- Read the task brief: [BRIEF_FILE]
24
-
25
- Global constraints from the spec/design that bind this task:
26
- [GLOBAL_CONSTRAINTS]
27
-
28
- ## What the Implementer Claims They Built
29
-
30
- Read the implementer's report: [REPORT_FILE]
31
-
32
- ## Diff Under Review
33
-
34
- **Base:** [BASE_SHA]
35
- **Head:** [HEAD_SHA]
36
- **Diff file:** [DIFF_FILE]
37
-
38
- Read the diff file once — it contains the commit list, a stat summary,
39
- and the full diff with surrounding context, and it is your view of the
40
- change. The diff's context lines ARE the changed files: do not Read a
41
- changed file separately unless a hunk you must judge is cut off
42
- mid-function — and say so in your report. Do not re-run git commands.
43
- If the diff file is missing, fetch the diff yourself:
44
- `git diff --stat [BASE_SHA]..[HEAD_SHA]` and `git diff [BASE_SHA]..[HEAD_SHA]`.
45
- Do not crawl the broader codebase. Inspect code outside the diff only
46
- to evaluate a concrete risk you can name — one focused check per named
47
- risk, and name both the risk and what you checked in your report.
48
- Cross-cutting changes are legitimate named risks: if the diff changes
49
- lock ordering, a function or API contract, or shared mutable state,
50
- checking the call sites is the right method.
51
-
52
- Your review is read-only on this checkout. Do not mutate the working
53
- tree, the index, HEAD, or branch state in any way.
54
-
55
- ## Do Not Trust the Report
56
-
57
- Treat the implementer's report as unverified claims about the code. It
58
- may be incomplete, inaccurate, or optimistic. Verify the claims against
59
- the diff. Design rationales in the report are claims too: "left it per
60
- YAGNI," "kept it simple deliberately," or any other justification is the
61
- implementer grading their own work. Judge the code on its merits — a
62
- stated rationale never downgrades a finding's severity.
63
-
64
- ## Tests
65
-
66
- The implementer already ran the tests and reported results with TDD
67
- evidence for exactly this code. Do not re-run the suite to confirm their
68
- report. Run a test only when reading the code raises a specific doubt
69
- that no existing run answers — and then a focused test, never a
70
- package-wide suite, race detector run, or repeated/high-count loop. If
71
- heavy validation seems warranted, recommend it in your report instead of
72
- running it. If you cannot run commands in this environment, name the
73
- test you would run.
74
-
75
- Warnings or other noise in the implementer's reported test output are
76
- findings — test output should be pristine.
77
-
78
- ## Part 1: Spec Compliance
79
-
80
- Compare the diff against What Was Requested:
81
-
82
- - **Missing:** requirements they skipped, missed, or claimed without
83
- implementing
84
- - **Extra:** features that weren't requested, over-engineering, unneeded
85
- "nice to haves"
86
- - **Misunderstood:** right feature built the wrong way, wrong problem
87
- solved
88
-
89
- If a requirement cannot be verified from this diff alone (it lives in
90
- unchanged code or spans tasks), report it as a ⚠️ item instead of
91
- broadening your search.
92
-
93
- ## Part 2: Code Quality
94
-
95
- **Code quality:**
96
- - Clean separation of concerns?
97
- - Proper error handling?
98
- - DRY without premature abstraction?
99
- - Edge cases handled?
100
-
101
- **Tests:**
102
- - Do the new and changed tests verify real behavior, not mocks?
103
- - Are the task's edge cases covered?
104
-
105
- **Structure:**
106
- - Does each file have one clear responsibility with a well-defined interface?
107
- - Are units decomposed so they can be understood and tested independently?
108
- - Is the implementation following the file structure from the plan?
109
- - Did this change create new files that are already large, or
110
- significantly grow existing files? (Don't flag pre-existing file
111
- sizes — focus on what this change contributed.)
112
-
113
- Your report should point at evidence: file:line references for every
114
- finding and for any check you would otherwise answer with a bare
115
- "yes." A tight report that cites lines gives the controller everything
116
- it needs.
117
-
118
- Your final message is the report itself: begin directly with the
119
- spec-compliance verdict. Every line is a verdict, a finding with
120
- file:line, or a check you ran — no preamble, no process narration,
121
- no closing summary.
122
-
123
- ## Calibration
124
-
125
- Categorize issues by actual severity. Not everything is Critical.
126
- Important means this task cannot be trusted until it is fixed: incorrect
127
- or fragile behavior, a missed requirement, or maintainability damage you
128
- would block a merge over — verbatim duplication of a logic block,
129
- swallowed errors, tests that assert nothing. "Coverage could be broader"
130
- and polish suggestions are Minor.
131
- If the plan or brief explicitly mandates something this rubric calls a
132
- defect (a test that asserts nothing, verbatim duplication of a logic
133
- block), that IS a finding — report it as Important, labeled
134
- plan-mandated. The plan's authorship does not grade its own work; the
135
- human decides.
136
- Acknowledge what was done well before listing issues — accurate praise
137
- helps the implementer trust the rest of the feedback.
138
-
139
- ## Output Format
140
-
141
- ### Spec Compliance
142
-
143
- - ✅ Spec compliant | ❌ Issues found: [what's missing/extra/misunderstood,
144
- with file:line references]
145
- - ⚠️ Cannot verify from diff: [requirements you could not verify from the
146
- diff alone, and what the controller should check — report alongside the
147
- ✅/❌ verdict for everything you could verify]
148
-
149
- ### Strengths
150
- [What's well done? Be specific.]
151
-
152
- ### Issues
153
-
154
- #### Critical (Must Fix)
155
- #### Important (Should Fix)
156
- #### Minor (Nice to Have)
157
-
158
- For each issue: file:line, what's wrong, why it matters, how to fix
159
- (if not obvious).
160
-
161
- ### Assessment
162
-
163
- **Task quality:** [Approved | Needs fixes]
164
-
165
- **Reasoning:** [1-2 sentence technical assessment]
166
- ```
167
-
168
- **Placeholders:**
169
- - `[MODEL]` — REQUIRED: reviewer model per SKILL.md Model Selection
170
- - `[BRIEF_FILE]` — REQUIRED: the task brief file (`scripts/task-brief PLAN N`
171
- prints the path; same file the implementer worked from)
172
- - `[GLOBAL_CONSTRAINTS]` — the binding requirements copied verbatim from
173
- the plan's Global Constraints section or the spec: exact values, formats,
174
- and stated relationships between components (not process rules — those
175
- are already in this template)
176
- - `[REPORT_FILE]` — REQUIRED: the file the implementer wrote its detailed
177
- report to
178
- - `[BASE_SHA]` — commit before this task
179
- - `[HEAD_SHA]` — current commit
180
- - `[DIFF_FILE]` — REQUIRED: the path the controller wrote the review
181
- package to (`scripts/review-package BASE HEAD` prints the unique path it
182
- wrote; the package never enters the controller's context)
183
-
184
- **Reviewer returns:** Spec Compliance verdict (✅/❌/⚠️), Strengths, Issues
185
- (Critical/Important/Minor), Task quality verdict
186
-
187
- A fix dispatch can address spec gaps and quality findings together;
188
- re-review after fixes covers both verdicts.
@@ -1,206 +0,0 @@
1
- ---
2
- name: writing-plans
3
- description: Use when you have a spec or requirements for a multi-step task, before touching code
4
- ---
5
-
6
- # Writing Plans
7
-
8
- ## Overview
9
-
10
- Write comprehensive implementation plans assuming the engineer has zero context for our codebase and questionable taste. Document everything they need to know: which files to touch for each task, code, testing, docs they might need to check, how to test it. Give them the whole plan as bite-sized tasks. DRY. YAGNI. TDD. Verification checkpoints.
11
-
12
- Assume they are a skilled developer, but know almost nothing about our toolset or problem domain. Assume they don't know good test design very well.
13
-
14
- **Announce at start:** "I'm using the writing-plans skill to create the implementation plan."
15
-
16
- **Context:** If working in an isolated worktree, it should be created via `skills/using-git-worktrees/SKILL.md` at execution time.
17
-
18
- **Save plans to:** `docs/superpowers/plans/YYYY-MM-DD-<feature-name>.md`
19
- - (User preferences for plan location override this default)
20
-
21
- ## Preconditions
22
-
23
- Only write an implementation plan after a design spec exists and the user has approved it. If the request is complex and no approved spec exists, return to `skills/brainstorming/SKILL.md` instead of creating a plan. The approved spec is the Plan Gate input.
24
-
25
- ## Scope Check
26
-
27
- If the spec covers multiple independent subsystems, it should have been broken into sub-project specs during brainstorming. If it wasn't, suggest breaking this into separate plans — one per subsystem. Each plan should produce working, testable software on its own.
28
-
29
- ## File Structure
30
-
31
- Before defining tasks, map out which files will be created or modified and what each one is responsible for. This is where decomposition decisions get locked in.
32
-
33
- - Design units with clear boundaries and well-defined interfaces. Each file should have one clear responsibility.
34
- - You reason best about code you can hold in context at once, and your edits are more reliable when files are focused. Prefer smaller, focused files over large ones that do too much.
35
- - Files that change together should live together. Split by responsibility, not by technical layer.
36
- - In existing codebases, follow established patterns. If the codebase uses large files, don't unilaterally restructure - but if a file you're modifying has grown unwieldy, including a split in the plan is reasonable.
37
-
38
- This structure informs the task decomposition. Each task should produce self-contained changes that make sense independently.
39
-
40
- ## Bite-Sized Task Granularity
41
-
42
- **Each step is one action (2-5 minutes):**
43
- - "Write the failing test" - step
44
- - "Run it to make sure it fails" - step
45
- - "Implement the minimal code to make the test pass" - step
46
- - "Run the tests and make sure they pass" - step
47
- - "Inspect the diff and record status" - step
48
-
49
- Do not include commit steps by default. Add `git add` or `git commit` steps only when the user explicitly asks for commit handling, or when an approved workflow already says this plan is allowed to create commits.
50
-
51
- ## Plan Document Header
52
-
53
- **Every plan MUST start with this header:**
54
-
55
- ```markdown
56
- # [Feature Name] Implementation Plan
57
-
58
- > **For agentic workers:** Implement this plan task-by-task. Keep checkbox (`- [ ]`) status updated. For substantial plans, prefer the project-agent loop: one fresh implementation subagent per task, then requirement/spec compliance review, then code quality review.
59
-
60
- **Goal:** [One sentence describing what this builds]
61
-
62
- **Architecture:** [2-3 sentences about approach]
63
-
64
- **Tech Stack:** [Key technologies/libraries]
65
-
66
- ## Global Constraints
67
-
68
- [The spec's project-wide requirements — version floors, dependency limits,
69
- naming and copy rules, platform requirements, commit/PR boundaries, exact
70
- values — one line each, copied verbatim from the spec or user instruction.
71
- Every task's requirements implicitly include this section.]
72
-
73
- ---
74
- ```
75
-
76
- ## Task Structure
77
-
78
- ````markdown
79
- ### Task N: [Component Name]
80
-
81
- **Files:**
82
- - Create: `exact/path/to/file.py`
83
- - Modify: `exact/path/to/existing.py:123-145`
84
- - Test: `tests/exact/path/to/test.py`
85
-
86
- **Interfaces:**
87
- - Consumes: [what this task uses from earlier tasks — exact signatures, file paths, commands, or data contracts]
88
- - Produces: [what later tasks rely on — exact function names, parameter and return types, CLI flags, file formats, or documented behavior. A task implementer may see only this task, so neighboring contracts must be explicit.]
89
-
90
- - [ ] **Step 1: Write the failing test**
91
-
92
- ```python
93
- def test_specific_behavior():
94
- result = function(input)
95
- assert result == expected
96
- ```
97
-
98
- - [ ] **Step 2: Run test to verify it fails**
99
-
100
- Run: `pytest tests/path/test.py::test_name -v`
101
- Expected: FAIL with "function not defined"
102
-
103
- - [ ] **Step 3: Write minimal implementation**
104
-
105
- ```python
106
- def function(input):
107
- return expected
108
- ```
109
-
110
- - [ ] **Step 4: Run test to verify it passes**
111
-
112
- Run: `pytest tests/path/test.py::test_name -v`
113
- Expected: PASS
114
-
115
- - [ ] **Step 5: Inspect the diff**
116
-
117
- ```bash
118
- git diff -- tests/path/test.py src/path/file.py
119
- git status --short
120
- ```
121
- ````
122
-
123
- ## No Placeholders
124
-
125
- Every step must contain the actual content an engineer needs. These are **plan failures** — never write them:
126
- - "TBD", "TODO", "implement later", "fill in details"
127
- - "Add appropriate error handling" / "add validation" / "handle edge cases"
128
- - "Write tests for the above" (without actual test code)
129
- - "Similar to Task N" (repeat the code — the engineer may be reading tasks out of order)
130
- - Steps that describe what to do without showing how (code blocks required for code steps)
131
- - References to types, functions, or methods not defined in any task
132
- - Missing `Global Constraints` or per-task `Interfaces` blocks
133
-
134
- ## Remember
135
- - Exact file paths always
136
- - Complete code in every step — if a step changes code, show the code
137
- - Exact commands with expected output
138
- - DRY, YAGNI, TDD, verification checkpoints
139
- - Copy binding cross-task constraints into `Global Constraints`; do not assume implementers or reviewers will remember the spec.
140
- - Every task needs an `Interfaces` block, even if it says `Consumes: none` or `Produces: none`.
141
- - Do not default to commits; leave changes uncommitted unless the user explicitly asks for commit, push, PR, or an approved workflow includes commit handling.
142
-
143
- ## Self-Review
144
-
145
- After writing the complete plan, look at the spec with fresh eyes and check the plan against it. This is a checklist you run yourself — not a subagent dispatch.
146
-
147
- **1. Spec coverage:** Skim each section/requirement in the spec. Can you point to a task that implements it? List any gaps.
148
-
149
- **2. Placeholder scan:** Search your plan for red flags — any of the patterns from the "No Placeholders" section above. Fix them.
150
-
151
- **3. Type consistency:** Do the types, method signatures, and property names you used in later tasks match what you defined in earlier tasks? A function called `clearLayers()` in Task 3 but `clearFullLayers()` in Task 7 is a bug.
152
-
153
- **4. Contract propagation:** Did every task get the relevant `Global Constraints` and the exact `Interfaces` it consumes and produces? If a later task depends on a name, format, flag, or file from an earlier task, both tasks must say so consistently.
154
-
155
- If you find issues, fix them inline. No need to re-review — just fix and move on. If you find a spec requirement with no task, add the task.
156
-
157
- ## Execution Handoff
158
-
159
- After saving the plan, offer execution choice:
160
-
161
- **"Plan complete and saved to `docs/superpowers/plans/<filename>.md`. If you want me to execute it, I will use `skills/executing-plans/SKILL.md`. Two execution options:**
162
-
163
- **1. Subagent-Driven Development (when commit handling is approved)** - Use `skills/subagent-driven-development/SKILL.md` for independent tasks, task briefs, implementer report files, review packages, and the `.superpowers/sdd` progress ledger.
164
-
165
- **2. Project-Agent Loop (no commits by default)** - Use this project's existing agents. Dispatch one fresh implementation subagent per task, then run two reviews before marking the task complete.
166
-
167
- **3. Inline Execution (lightweight)** - Execute tasks in this session, task-by-task, with checkpoints. Use this for small, clear, tightly coupled work.
168
-
169
- **Which approach?"**
170
-
171
- **If Subagent-Driven Development chosen:**
172
- - Confirm the user has approved commit handling, PR handling, or SDD-style execution. If not, use Project-Agent Loop or Inline Execution instead.
173
- - Use `skills/subagent-driven-development/SKILL.md`.
174
- - The SDD progress ledger and scratch artifacts live under `.superpowers/sdd/` and must stay out of commits.
175
-
176
- **If Project-Agent Loop chosen:**
177
- - Read the full plan once and extract each task with its files, tests, commands, and acceptance criteria.
178
- - For each task, dispatch a fresh implementation subagent with only that task plus the necessary project context. Before dispatching, read the matching `agents/*.md` file and use its role, process, and constraints as the subagent prompt. In runtimes that do not expose custom agent names directly, dispatch a generic worker and seed it with the selected project-agent prompt.
179
- - Pick the implementation agent by task shape:
180
- - `agents/tdd-guide.md` for new behavior, bug fixes, or behavior changes that need tests first
181
- - `agents/refactor-cleaner.md` for focused refactors
182
- - `agents/e2e-runner.md` for Playwright or user-flow verification tasks
183
- - a general worker if no specialized project agent fits
184
- - Review stage 1: requirement/spec compliance. Use `agents/planner.md` or a generic review worker seeded with the spec and plan. Compare the implementation against the spec and this plan before judging style. If there is a gap, send it back to the same task implementer.
185
- - Review stage 2: code quality. Use `agents/code-reviewer.md`, plus `agents/security-reviewer.md` or `agents/database-reviewer.md` when the touched area warrants it. If issues remain, send them back to the same task implementer and re-review.
186
- - Mark the task checkbox complete only after tests pass and both review stages pass.
187
-
188
- **If Inline Execution chosen:**
189
- - Execute the plan in the current session.
190
- - Keep the same order: implement one task, run its tests, do a requirement/spec compliance check, do a code quality check, then update the checkbox.
191
-
192
- ## Debugging Detour
193
-
194
- If any task hits a bug, failing test, flaky behavior, or unexpected result, pause implementation and use `skills/systematic-debugging/SKILL.md`.
195
-
196
- Do not stack quick fixes. Complete the four debugging phases, document the root cause briefly in the task notes, then return to the same task and re-run its required verification.
197
-
198
- ## Completion Loop
199
-
200
- After all plan tasks are complete:
201
-
202
- 1. Apply `skills/verification-before-completion/SKILL.md`: identify the verification evidence required before any completion claim.
203
- 2. Run the project's verification flow (`/verify` or equivalent commands) to produce that fresh evidence.
204
- 3. If verification fails, use `skills/systematic-debugging/SKILL.md` for each failure class before changing code.
205
- 4. Run a final code review over the whole diff using `agents/code-reviewer.md`, adding `agents/security-reviewer.md` or `agents/database-reviewer.md` when relevant.
206
- 5. Use `/pr` when the user wants commit, push, or PR handling.
@@ -1,49 +0,0 @@
1
- # Plan Document Reviewer Prompt Template
2
-
3
- Use this template when dispatching a plan document reviewer subagent.
4
-
5
- **Purpose:** Verify the plan is complete, matches the spec, and has proper task decomposition.
6
-
7
- **Dispatch after:** The complete plan is written.
8
-
9
- ```
10
- Task tool (general-purpose):
11
- description: "Review plan document"
12
- prompt: |
13
- You are a plan document reviewer. Verify this plan is complete and ready for implementation.
14
-
15
- **Plan to review:** [PLAN_FILE_PATH]
16
- **Spec for reference:** [SPEC_FILE_PATH]
17
-
18
- ## What to Check
19
-
20
- | Category | What to Look For |
21
- |----------|------------------|
22
- | Completeness | TODOs, placeholders, incomplete tasks, missing steps |
23
- | Spec Alignment | Plan covers spec requirements, no major scope creep |
24
- | Task Decomposition | Tasks have clear boundaries, steps are actionable |
25
- | Buildability | Could an engineer follow this plan without getting stuck? |
26
-
27
- ## Calibration
28
-
29
- **Only flag issues that would cause real problems during implementation.**
30
- An implementer building the wrong thing or getting stuck is an issue.
31
- Minor wording, stylistic preferences, and "nice to have" suggestions are not.
32
-
33
- Approve unless there are serious gaps — missing requirements from the spec,
34
- contradictory steps, placeholder content, or tasks so vague they can't be acted on.
35
-
36
- ## Output Format
37
-
38
- ## Plan Review
39
-
40
- **Status:** Approved | Issues Found
41
-
42
- **Issues (if any):**
43
- - [Task X, Step Y]: [specific issue] - [why it matters for implementation]
44
-
45
- **Recommendations (advisory, do not block approval):**
46
- - [suggestions for improvement]
47
- ```
48
-
49
- **Reviewer returns:** Status, Issues (if any), Recommendations