engine7 7.1.38 → 7.1.40
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/dist/cli.mjs +81 -45
- package/dist/engine-startup.mjs +4856 -3650
- package/dist/main.mjs +4852 -3646
- package/package.json +2 -1
- package/templates/skills/superpowers/brainstorming/SKILL.md +151 -0
- package/templates/skills/superpowers/brainstorming/scripts/frame-template.html +213 -0
- package/templates/skills/superpowers/brainstorming/scripts/helper.js +167 -0
- package/templates/skills/superpowers/brainstorming/scripts/server.cjs +723 -0
- package/templates/skills/superpowers/brainstorming/scripts/start-server.sh +209 -0
- package/templates/skills/superpowers/brainstorming/scripts/stop-server.sh +120 -0
- package/templates/skills/superpowers/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/templates/skills/superpowers/brainstorming/visual-companion.md +298 -0
- package/templates/skills/superpowers/dispatching-parallel-agents/SKILL.md +167 -0
- package/templates/skills/superpowers/executing-plans/SKILL.md +64 -0
- package/templates/skills/superpowers/finishing-a-development-branch/SKILL.md +201 -0
- package/templates/skills/superpowers/receiving-code-review/SKILL.md +205 -0
- package/templates/skills/superpowers/requesting-code-review/SKILL.md +95 -0
- package/templates/skills/superpowers/requesting-code-review/code-reviewer.md +172 -0
- package/templates/skills/superpowers/subagent-driven-development/SKILL.md +503 -0
- package/templates/skills/superpowers/subagent-driven-development/implementer-prompt.md +142 -0
- package/templates/skills/superpowers/subagent-driven-development/re-review-prompt.md +106 -0
- package/templates/skills/superpowers/subagent-driven-development/scripts/review-package +46 -0
- package/templates/skills/superpowers/subagent-driven-development/scripts/sdd-workspace +40 -0
- package/templates/skills/superpowers/subagent-driven-development/scripts/task-brief +41 -0
- package/templates/skills/superpowers/subagent-driven-development/task-reviewer-prompt.md +185 -0
- package/templates/skills/superpowers/systematic-debugging/CREATION-LOG.md +119 -0
- package/templates/skills/superpowers/systematic-debugging/SKILL.md +283 -0
- package/templates/skills/superpowers/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/templates/skills/superpowers/systematic-debugging/condition-based-waiting.md +115 -0
- package/templates/skills/superpowers/systematic-debugging/defense-in-depth.md +122 -0
- package/templates/skills/superpowers/systematic-debugging/find-polluter.sh +72 -0
- package/templates/skills/superpowers/systematic-debugging/root-cause-tracing.md +169 -0
- package/templates/skills/superpowers/systematic-debugging/test-academic.md +14 -0
- package/templates/skills/superpowers/systematic-debugging/test-pressure-1.md +58 -0
- package/templates/skills/superpowers/systematic-debugging/test-pressure-2.md +68 -0
- package/templates/skills/superpowers/systematic-debugging/test-pressure-3.md +69 -0
- package/templates/skills/superpowers/test-driven-development/SKILL.md +320 -0
- package/templates/skills/superpowers/test-driven-development/writing-good-tests.md +198 -0
- package/templates/skills/superpowers/using-git-worktrees/SKILL.md +167 -0
- package/templates/skills/superpowers/using-superpowers/SKILL.md +62 -0
- package/templates/skills/superpowers/using-superpowers/references/antigravity-tools.md +23 -0
- package/templates/skills/superpowers/using-superpowers/references/codex-tools.md +39 -0
- package/templates/skills/superpowers/using-superpowers/references/gemini-tools.md +63 -0
- package/templates/skills/superpowers/using-superpowers/references/pi-tools.md +16 -0
- package/templates/skills/superpowers/verification-before-completion/SKILL.md +120 -0
- package/templates/skills/superpowers/writing-plans/SKILL.md +168 -0
- package/templates/skills/superpowers/writing-plans/plan-document-reviewer-prompt.md +49 -0
- package/templates/skills/superpowers/writing-skills/SKILL.md +679 -0
- package/templates/skills/superpowers/writing-skills/anthropic-best-practices.md +1150 -0
- package/templates/skills/superpowers/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
- package/templates/skills/superpowers/writing-skills/graphviz-conventions.dot +172 -0
- package/templates/skills/superpowers/writing-skills/persuasion-principles.md +187 -0
- package/templates/skills/superpowers/writing-skills/render-graphs.js +168 -0
- package/templates/skills/superpowers/writing-skills/testing-skills-with-subagents.md +384 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Scoped Re-Review Prompt Template
|
|
2
|
+
|
|
3
|
+
Use this template when dispatching a re-review after a fix round. The
|
|
4
|
+
re-reviewer verifies the findings were addressed and checks the fix diff for
|
|
5
|
+
new breakage. It is not a fresh review — the full review already happened.
|
|
6
|
+
|
|
7
|
+
**Purpose:** Verify each finding from the previous review was addressed, and
|
|
8
|
+
that the fix itself broke nothing.
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
Subagent (general-purpose):
|
|
12
|
+
description: "Re-review Task N fix round R"
|
|
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 re-reviewing one task's fix round. A previous review produced
|
|
17
|
+
findings; an implementer has attempted to fix them. Your job is to
|
|
18
|
+
verdict each finding and inspect the fix diff — nothing else.
|
|
19
|
+
|
|
20
|
+
## The Task
|
|
21
|
+
|
|
22
|
+
Read the task brief: [BRIEF_FILE]
|
|
23
|
+
|
|
24
|
+
## The Findings Under Verification
|
|
25
|
+
|
|
26
|
+
[FINDINGS]
|
|
27
|
+
|
|
28
|
+
## The Fix
|
|
29
|
+
|
|
30
|
+
Read the implementer's report (fix reports are appended at the end):
|
|
31
|
+
[REPORT_FILE]
|
|
32
|
+
|
|
33
|
+
**Fix base:** [FIX_BASE_SHA] (the head the previous review saw)
|
|
34
|
+
**Head:** [HEAD_SHA]
|
|
35
|
+
**Diff file:** [DIFF_FILE]
|
|
36
|
+
|
|
37
|
+
Read the diff file once — it contains the fix commits, a stat summary,
|
|
38
|
+
and the fix diff with surrounding context. Do not re-run git commands.
|
|
39
|
+
If the diff file is missing, fetch the diff yourself:
|
|
40
|
+
`git diff --stat [FIX_BASE_SHA]..[HEAD_SHA]` and
|
|
41
|
+
`git diff [FIX_BASE_SHA]..[HEAD_SHA]`.
|
|
42
|
+
|
|
43
|
+
Your review is read-only on this checkout. Do not mutate the working
|
|
44
|
+
tree, the index, HEAD, or branch state in any way.
|
|
45
|
+
|
|
46
|
+
## Scope
|
|
47
|
+
|
|
48
|
+
Your scope is the findings list and the fix diff. Verdict every finding.
|
|
49
|
+
Inspect the fix diff for new problems the fix itself introduced. Do NOT
|
|
50
|
+
re-review code the fix did not touch: if you notice an issue entirely
|
|
51
|
+
outside the fix diff, report it under Out-of-Scope Observations — it
|
|
52
|
+
does not block this task and does not extend the loop. A broad
|
|
53
|
+
whole-branch review happens after all tasks are complete.
|
|
54
|
+
|
|
55
|
+
## Tests
|
|
56
|
+
|
|
57
|
+
The implementer re-ran the tests covering the amended code and appended
|
|
58
|
+
the results to the report file. Treat the report as unverified claims:
|
|
59
|
+
confirm the fix report names the covering tests and shows their output,
|
|
60
|
+
and verify the claims against the diff. Do not re-run the suite to
|
|
61
|
+
confirm their report. Run a test only when reading the code raises a
|
|
62
|
+
specific doubt that no existing run answers — and then a focused test,
|
|
63
|
+
never a package-wide suite.
|
|
64
|
+
|
|
65
|
+
## Output Format
|
|
66
|
+
|
|
67
|
+
Your final message is the report itself: begin directly with the first
|
|
68
|
+
finding's verdict. Every line is a verdict, a finding with file:line,
|
|
69
|
+
or a check you ran — no preamble, no process narration.
|
|
70
|
+
|
|
71
|
+
### Finding Verdicts
|
|
72
|
+
|
|
73
|
+
For each finding in The Findings Under Verification, in order:
|
|
74
|
+
- **[finding one-liner]** — ADDRESSED | NOT ADDRESSED, with file:line
|
|
75
|
+
evidence. "Attempted" is not addressed: the specific defect must no
|
|
76
|
+
longer exist.
|
|
77
|
+
|
|
78
|
+
### New Breakage in the Fix Diff
|
|
79
|
+
|
|
80
|
+
Anything the fix itself broke or introduced, with severity
|
|
81
|
+
(Critical/Important/Minor) and file:line. "None" if clean.
|
|
82
|
+
|
|
83
|
+
### Out-of-Scope Observations
|
|
84
|
+
|
|
85
|
+
Issues you noticed entirely outside the fix diff. Non-blocking; the
|
|
86
|
+
controller ledgers these for the final review. "None" if none.
|
|
87
|
+
|
|
88
|
+
### Verdict
|
|
89
|
+
|
|
90
|
+
**Fix round:** [All findings addressed, no new Critical/Important
|
|
91
|
+
breakage | Findings remain open] — list the open ones.
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Placeholders:**
|
|
95
|
+
- `[MODEL]` — REQUIRED: reviewer model per SKILL.md Model Selection; scoped
|
|
96
|
+
re-reviews of small fix diffs take a cheap-to-mid tier
|
|
97
|
+
- `[BRIEF_FILE]` — the task brief file (same file the implementer worked from)
|
|
98
|
+
- `[FINDINGS]` — the Critical/Important findings and spec gaps from the
|
|
99
|
+
previous review, copied verbatim, one per bullet
|
|
100
|
+
- `[REPORT_FILE]` — the implementer's report file (fix reports appended)
|
|
101
|
+
- `[FIX_BASE_SHA]` — the head the previous review saw
|
|
102
|
+
- `[HEAD_SHA]` — current commit
|
|
103
|
+
- `[DIFF_FILE]` — the path `scripts/review-package PLAN_FILE FIX_BASE HEAD` printed
|
|
104
|
+
|
|
105
|
+
**Re-reviewer returns:** per-finding verdicts (ADDRESSED / NOT ADDRESSED),
|
|
106
|
+
new breakage in the fix diff, out-of-scope observations, and a round verdict.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Generate a review package: commit list, stat summary, and the net
|
|
3
|
+
# diff with extended context, written to a file the reviewer reads in one
|
|
4
|
+
# call. Using the recorded per-task BASE (not HEAD~1) keeps multi-commit
|
|
5
|
+
# tasks intact.
|
|
6
|
+
#
|
|
7
|
+
# Usage: review-package PLAN_FILE BASE HEAD [OUTFILE]
|
|
8
|
+
# Default OUTFILE: <repo-root>/.superpowers/sdd/<plan-basename>/review-<base7>..<head7>.diff
|
|
9
|
+
# (named per range, so a re-review after fixes gets a distinct fresh file).
|
|
10
|
+
set -euo pipefail
|
|
11
|
+
|
|
12
|
+
if [ $# -lt 3 ] || [ $# -gt 4 ]; then
|
|
13
|
+
echo "usage: review-package PLAN_FILE BASE HEAD [OUTFILE]" >&2
|
|
14
|
+
exit 2
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
plan=$1
|
|
18
|
+
base=$2
|
|
19
|
+
head=$3
|
|
20
|
+
[ -f "$plan" ] || { echo "no such plan file: $plan" >&2; exit 2; }
|
|
21
|
+
|
|
22
|
+
git rev-parse --verify --quiet "$base" >/dev/null || { echo "bad BASE: $base" >&2; exit 2; }
|
|
23
|
+
git rev-parse --verify --quiet "$head" >/dev/null || { echo "bad HEAD: $head" >&2; exit 2; }
|
|
24
|
+
|
|
25
|
+
if [ $# -eq 4 ]; then
|
|
26
|
+
out=$4
|
|
27
|
+
else
|
|
28
|
+
dir=$("$(cd "$(dirname "$0")" && pwd)/sdd-workspace" "$plan")
|
|
29
|
+
out="$dir/review-$(git rev-parse --short "$base")..$(git rev-parse --short "$head").diff"
|
|
30
|
+
fi
|
|
31
|
+
|
|
32
|
+
{
|
|
33
|
+
echo "# Review package: ${base}..${head}"
|
|
34
|
+
echo
|
|
35
|
+
echo "## Commits"
|
|
36
|
+
git log --oneline "${base}..${head}"
|
|
37
|
+
echo
|
|
38
|
+
echo "## Files changed"
|
|
39
|
+
git diff --stat "${base}..${head}"
|
|
40
|
+
echo
|
|
41
|
+
echo "## Diff"
|
|
42
|
+
git diff -U10 "${base}..${head}"
|
|
43
|
+
} > "$out"
|
|
44
|
+
|
|
45
|
+
commits=$(git rev-list --count "${base}..${head}")
|
|
46
|
+
echo "wrote ${out}: ${commits} commit(s), $(wc -c < "$out" | tr -d ' ') bytes"
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Resolve and ensure the working-tree directory SDD uses for one plan's
|
|
3
|
+
# short-lived artifacts: task briefs, implementer reports, review packages,
|
|
4
|
+
# and the progress ledger. Print the plan directory's absolute path.
|
|
5
|
+
#
|
|
6
|
+
# One directory per plan (.superpowers/sdd/<plan-basename>/) so a follow-up
|
|
7
|
+
# plan in the same working tree can never read or overwrite another plan's
|
|
8
|
+
# artifacts. A stale ledger misread as current progress makes controllers
|
|
9
|
+
# skip whole task sequences — plan-scoping removes that failure structurally.
|
|
10
|
+
#
|
|
11
|
+
# The workspace lives in the working tree (not under .git/) because Claude Code
|
|
12
|
+
# treats .git/ as a protected path and denies agent writes there — which blocks
|
|
13
|
+
# an implementer subagent from writing its report file. A self-ignoring
|
|
14
|
+
# .gitignore at .superpowers/sdd/ keeps every plan's workspace out of
|
|
15
|
+
# `git status` and out of accidental commits without modifying any tracked file.
|
|
16
|
+
#
|
|
17
|
+
# Single source of truth for the workspace location, so task-brief and
|
|
18
|
+
# review-package cannot drift to different directories.
|
|
19
|
+
#
|
|
20
|
+
# Usage: sdd-workspace PLAN_FILE
|
|
21
|
+
set -euo pipefail
|
|
22
|
+
|
|
23
|
+
if [ $# -ne 1 ]; then
|
|
24
|
+
echo "usage: sdd-workspace PLAN_FILE" >&2
|
|
25
|
+
exit 2
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
plan=$1
|
|
29
|
+
[ -f "$plan" ] || { echo "no such plan file: $plan" >&2; exit 2; }
|
|
30
|
+
|
|
31
|
+
slug=$(basename "$plan" .md)
|
|
32
|
+
[ -n "$slug" ] && [ "$slug" != "." ] && [ "$slug" != ".." ] \
|
|
33
|
+
|| { echo "cannot derive a workspace name from: $plan" >&2; exit 2; }
|
|
34
|
+
|
|
35
|
+
root=$(git rev-parse --show-toplevel)
|
|
36
|
+
base="$root/.superpowers/sdd"
|
|
37
|
+
dir="$base/$slug"
|
|
38
|
+
mkdir -p "$dir"
|
|
39
|
+
printf '*\n' > "$base/.gitignore"
|
|
40
|
+
cd "$dir" && pwd
|
|
@@ -0,0 +1,41 @@
|
|
|
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/<plan-basename>/task-<N>-brief.md
|
|
8
|
+
# (per plan and per worktree; concurrent runs of the SAME plan in the same
|
|
9
|
+
# working tree share it).
|
|
10
|
+
set -euo pipefail
|
|
11
|
+
|
|
12
|
+
if [ $# -lt 2 ] || [ $# -gt 3 ]; then
|
|
13
|
+
echo "usage: task-brief PLAN_FILE TASK_NUMBER [OUTFILE]" >&2
|
|
14
|
+
exit 2
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
plan=$1
|
|
18
|
+
n=$2
|
|
19
|
+
[ -f "$plan" ] || { echo "no such plan file: $plan" >&2; exit 2; }
|
|
20
|
+
|
|
21
|
+
if [ $# -eq 3 ]; then
|
|
22
|
+
out=$3
|
|
23
|
+
else
|
|
24
|
+
dir=$("$(cd "$(dirname "$0")" && pwd)/sdd-workspace" "$plan")
|
|
25
|
+
out="$dir/task-${n}-brief.md"
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
awk -v n="$n" '
|
|
29
|
+
/^```/ { infence = !infence }
|
|
30
|
+
!infence && /^#+[ \t]+Task[ \t]+[0-9]+/ {
|
|
31
|
+
intask = ($0 ~ ("^#+[ \t]+Task[ \t]+" n "([^0-9]|$)"))
|
|
32
|
+
}
|
|
33
|
+
intask { print }
|
|
34
|
+
' "$plan" > "$out"
|
|
35
|
+
|
|
36
|
+
if [ ! -s "$out" ]; then
|
|
37
|
+
echo "task ${n} not found in ${plan} (no heading matching 'Task ${n}')" >&2
|
|
38
|
+
exit 3
|
|
39
|
+
fi
|
|
40
|
+
|
|
41
|
+
echo "wrote ${out}: $(wc -l < "$out" | tr -d ' ') lines"
|
|
@@ -0,0 +1,185 @@
|
|
|
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 PLAN_FILE BASE HEAD` prints the unique
|
|
182
|
+
path it 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
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# Creation Log: Systematic Debugging Skill
|
|
2
|
+
|
|
3
|
+
Reference example of extracting, structuring, and bulletproofing a critical skill.
|
|
4
|
+
|
|
5
|
+
## Source Material
|
|
6
|
+
|
|
7
|
+
Extracted debugging framework from `~/.claude/CLAUDE.md`:
|
|
8
|
+
- 4-phase systematic process (Investigation → Pattern Analysis → Hypothesis → Implementation)
|
|
9
|
+
- Core mandate: ALWAYS find root cause, NEVER fix symptoms
|
|
10
|
+
- Rules designed to resist time pressure and rationalization
|
|
11
|
+
|
|
12
|
+
## Extraction Decisions
|
|
13
|
+
|
|
14
|
+
**What to include:**
|
|
15
|
+
- Complete 4-phase framework with all rules
|
|
16
|
+
- Anti-shortcuts ("NEVER fix symptom", "STOP and re-analyze")
|
|
17
|
+
- Pressure-resistant language ("even if faster", "even if I seem in a hurry")
|
|
18
|
+
- Concrete steps for each phase
|
|
19
|
+
|
|
20
|
+
**What to leave out:**
|
|
21
|
+
- Project-specific context
|
|
22
|
+
- Repetitive variations of same rule
|
|
23
|
+
- Narrative explanations (condensed to principles)
|
|
24
|
+
|
|
25
|
+
## Structure Following skill-creation/SKILL.md
|
|
26
|
+
|
|
27
|
+
1. **Rich when_to_use** - Included symptoms and anti-patterns
|
|
28
|
+
2. **Type: technique** - Concrete process with steps
|
|
29
|
+
3. **Keywords** - "root cause", "symptom", "workaround", "debugging", "investigation"
|
|
30
|
+
4. **Flowchart** - Decision point for "fix failed" → re-analyze vs add more fixes
|
|
31
|
+
5. **Phase-by-phase breakdown** - Scannable checklist format
|
|
32
|
+
6. **Anti-patterns section** - What NOT to do (critical for this skill)
|
|
33
|
+
|
|
34
|
+
## Bulletproofing Elements
|
|
35
|
+
|
|
36
|
+
Framework designed to resist rationalization under pressure:
|
|
37
|
+
|
|
38
|
+
### Language Choices
|
|
39
|
+
- "ALWAYS" / "NEVER" (not "should" / "try to")
|
|
40
|
+
- "even if faster" / "even if I seem in a hurry"
|
|
41
|
+
- "STOP and re-analyze" (explicit pause)
|
|
42
|
+
- "Don't skip past" (catches the actual behavior)
|
|
43
|
+
|
|
44
|
+
### Structural Defenses
|
|
45
|
+
- **Phase 1 required** - Can't skip to implementation
|
|
46
|
+
- **Single hypothesis rule** - Forces thinking, prevents shotgun fixes
|
|
47
|
+
- **Explicit failure mode** - "IF your first fix doesn't work" with mandatory action
|
|
48
|
+
- **Anti-patterns section** - Shows exactly what shortcuts look like
|
|
49
|
+
|
|
50
|
+
### Redundancy
|
|
51
|
+
- Root cause mandate in overview + when_to_use + Phase 1 + implementation rules
|
|
52
|
+
- "NEVER fix symptom" appears 4 times in different contexts
|
|
53
|
+
- Each phase has explicit "don't skip" guidance
|
|
54
|
+
|
|
55
|
+
## Testing Approach
|
|
56
|
+
|
|
57
|
+
Created 4 validation tests following skills/meta/testing-skills-with-subagents:
|
|
58
|
+
|
|
59
|
+
### Test 1: Academic Context (No Pressure)
|
|
60
|
+
- Simple bug, no time pressure
|
|
61
|
+
- **Result:** Perfect compliance, complete investigation
|
|
62
|
+
|
|
63
|
+
### Test 2: Time Pressure + Obvious Quick Fix
|
|
64
|
+
- User "in a hurry", symptom fix looks easy
|
|
65
|
+
- **Result:** Resisted shortcut, followed full process, found real root cause
|
|
66
|
+
|
|
67
|
+
### Test 3: Complex System + Uncertainty
|
|
68
|
+
- Multi-layer failure, unclear if can find root cause
|
|
69
|
+
- **Result:** Systematic investigation, traced through all layers, found source
|
|
70
|
+
|
|
71
|
+
### Test 4: Failed First Fix
|
|
72
|
+
- Hypothesis doesn't work, temptation to add more fixes
|
|
73
|
+
- **Result:** Stopped, re-analyzed, formed new hypothesis (no shotgun)
|
|
74
|
+
|
|
75
|
+
**All tests passed.** No rationalizations found.
|
|
76
|
+
|
|
77
|
+
## Iterations
|
|
78
|
+
|
|
79
|
+
### Initial Version
|
|
80
|
+
- Complete 4-phase framework
|
|
81
|
+
- Anti-patterns section
|
|
82
|
+
- Flowchart for "fix failed" decision
|
|
83
|
+
|
|
84
|
+
### Enhancement 1: TDD Reference
|
|
85
|
+
- Added link to skills/testing/test-driven-development
|
|
86
|
+
- Note explaining TDD's "simplest code" ≠ debugging's "root cause"
|
|
87
|
+
- Prevents confusion between methodologies
|
|
88
|
+
|
|
89
|
+
## Final Outcome
|
|
90
|
+
|
|
91
|
+
Bulletproof skill that:
|
|
92
|
+
- ✅ Clearly mandates root cause investigation
|
|
93
|
+
- ✅ Resists time pressure rationalization
|
|
94
|
+
- ✅ Provides concrete steps for each phase
|
|
95
|
+
- ✅ Shows anti-patterns explicitly
|
|
96
|
+
- ✅ Tested under multiple pressure scenarios
|
|
97
|
+
- ✅ Clarifies relationship to TDD
|
|
98
|
+
- ✅ Ready for use
|
|
99
|
+
|
|
100
|
+
## Key Insight
|
|
101
|
+
|
|
102
|
+
**Most important bulletproofing:** Anti-patterns section showing exact shortcuts that feel justified in the moment. When Claude thinks "I'll just add this one quick fix", seeing that exact pattern listed as wrong creates cognitive friction.
|
|
103
|
+
|
|
104
|
+
## Usage Example
|
|
105
|
+
|
|
106
|
+
When encountering a bug:
|
|
107
|
+
1. Load skill: skills/debugging/systematic-debugging
|
|
108
|
+
2. Read overview (10 sec) - reminded of mandate
|
|
109
|
+
3. Follow Phase 1 checklist - forced investigation
|
|
110
|
+
4. If tempted to skip - see anti-pattern, stop
|
|
111
|
+
5. Complete all phases - root cause found
|
|
112
|
+
|
|
113
|
+
**Time investment:** 5-10 minutes
|
|
114
|
+
**Time saved:** Hours of symptom-whack-a-mole
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
*Created: 2025-10-03*
|
|
119
|
+
*Purpose: Reference example for skill extraction and bulletproofing*
|