@kennethsolomon/shipkit 3.0.7 → 3.1.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/README.md +30 -24
- package/commands/sk/security-check.md +14 -0
- package/package.json +1 -1
- package/skills/sk:e2e/SKILL.md +147 -0
- package/skills/sk:lint/SKILL.md +49 -4
- package/skills/sk:perf/SKILL.md +21 -0
- package/skills/sk:review/SKILL.md +33 -2
- package/skills/sk:setup-claude/templates/CLAUDE.md.template +149 -84
- package/skills/sk:setup-claude/templates/commands/brainstorm.md.template +4 -4
- package/skills/sk:setup-claude/templates/commands/execute-plan.md.template +2 -2
- package/skills/sk:setup-claude/templates/commands/finish-feature.md.template +8 -8
- package/skills/sk:setup-claude/templates/commands/security-check.md.template +3 -3
- package/skills/sk:setup-claude/templates/commands/write-plan.md.template +1 -1
- package/skills/sk:setup-claude/templates/tasks/workflow-status.md.template +25 -22
- package/skills/sk:setup-optimizer/SKILL.md +7 -5
- package/skills/sk:test/SKILL.md +17 -0
package/README.md
CHANGED
|
@@ -62,7 +62,7 @@ npm install -g @kennethsolomon/shipkit && shipkit
|
|
|
62
62
|
|
|
63
63
|
ShipKit installs slash commands and skills into `~/.claude/`. Each command is a focused instruction set that Claude follows — no magic, just structured prompts that enforce quality gates.
|
|
64
64
|
|
|
65
|
-
The workflow is linear: **
|
|
65
|
+
The workflow is linear: **Read → Explore → Design → Accessibility → Plan → Branch → Migrate → Write Tests → Implement → Lint → Verify Tests → Security → Performance → Review → E2E Tests → Finish → Sync Features**
|
|
66
66
|
|
|
67
67
|
Every gate must pass before the next step. If lint fails, fix it. If tests don't cover new code, write them. Security issues block the PR. This isn't optional — it's the whole point.
|
|
68
68
|
|
|
@@ -76,7 +76,7 @@ Every gate must pass before the next step. If lint fails, fix it. If tests don't
|
|
|
76
76
|
|
|
77
77
|
```
|
|
78
78
|
Brainstorm → Plan → Branch → [Schema] → Write Tests → Implement → Commit
|
|
79
|
-
→ Lint ✓ → Test ✓ → Security ✓ → Review ✓ → Update Task → Finish
|
|
79
|
+
→ Lint ✓ → Test ✓ → Security ✓ → Review ✓ → E2E ✓ → Update Task → Finish → Sync Features
|
|
80
80
|
```
|
|
81
81
|
|
|
82
82
|
| # | Command | Purpose |
|
|
@@ -84,26 +84,32 @@ Brainstorm → Plan → Branch → [Schema] → Write Tests → Implement → Co
|
|
|
84
84
|
| 1 | read `tasks/todo.md` | Pick the next task |
|
|
85
85
|
| 2 | read `tasks/lessons.md` | Review past corrections |
|
|
86
86
|
| 3 | `/sk:brainstorm` | Clarify requirements — no code |
|
|
87
|
-
| 4 | `/sk:frontend-design` |
|
|
88
|
-
| 5 | `/sk:
|
|
89
|
-
| 6 | `/sk:
|
|
90
|
-
| 7 | `/sk:
|
|
91
|
-
| 8 | `/sk:
|
|
92
|
-
| 9 | `/sk:
|
|
93
|
-
| 10 | `/sk:
|
|
94
|
-
| 11 | `/sk:
|
|
95
|
-
| 12 |
|
|
96
|
-
| 13 |
|
|
97
|
-
| 14 |
|
|
98
|
-
| 15 |
|
|
99
|
-
| 16 |
|
|
100
|
-
| 17 |
|
|
101
|
-
| 18 |
|
|
102
|
-
| 19 |
|
|
103
|
-
| 20 |
|
|
104
|
-
| 21 | `/sk:
|
|
105
|
-
| 22 |
|
|
106
|
-
| 23 | `/sk:
|
|
87
|
+
| 4 | `/sk:frontend-design` or `/sk:api-design` | Design spec *(skip if not needed)*. Frontend: add `--pencil` for Pencil visual mockup. API: REST/GraphQL contracts. |
|
|
88
|
+
| 5 | `/sk:accessibility` | WCAG 2.1 AA audit on design *(skip if no frontend)* |
|
|
89
|
+
| 6 | `/sk:write-plan` | Write plan to `tasks/todo.md` |
|
|
90
|
+
| 7 | `/sk:branch` | Create branch from current task |
|
|
91
|
+
| 8 | `/sk:schema-migrate` | Schema change analysis *(skip if no DB changes)* |
|
|
92
|
+
| 9 | `/sk:write-tests` | TDD red: write failing tests first |
|
|
93
|
+
| 10 | `/sk:execute-plan` | TDD green: make tests pass |
|
|
94
|
+
| 11 | `/sk:smart-commit` | Conventional commit |
|
|
95
|
+
| 12 | **`/sk:lint`** | **GATE** — Lint + Dep Audit — all linters must pass |
|
|
96
|
+
| 13 | `/sk:smart-commit` | Auto-skip if already clean |
|
|
97
|
+
| 14 | **`/sk:test`** | **GATE** — 100% coverage on new code |
|
|
98
|
+
| 15 | `/sk:smart-commit` | Auto-skip if already clean |
|
|
99
|
+
| 16 | **`/sk:security-check`** | **GATE** — 0 issues |
|
|
100
|
+
| 17 | `/sk:smart-commit` | Auto-skip if already clean |
|
|
101
|
+
| 18 | **`/sk:perf`** | **GATE** *(optional)* — critical/high findings = 0 |
|
|
102
|
+
| 19 | `/sk:smart-commit` | Auto-skip if already clean |
|
|
103
|
+
| 20 | **`/sk:review`** | **GATE** — Review + Simplify — 0 issues including nitpicks |
|
|
104
|
+
| 21 | `/sk:smart-commit` | Auto-skip if already clean |
|
|
105
|
+
| 22 | **`/sk:e2e`** | **GATE** — E2E Tests — all end-to-end tests must pass |
|
|
106
|
+
| 23 | `/sk:smart-commit` | Auto-skip if already clean |
|
|
107
|
+
| 24 | `/sk:update-task` | Mark done, log completion |
|
|
108
|
+
| 25 | `/sk:finish-feature` | Changelog + PR |
|
|
109
|
+
| 26 | `/sk:features` | Sync Features — update docs/features/ specs *(required)* |
|
|
110
|
+
| 27 | `/sk:release` | Version bump + tag *(optional)* |
|
|
111
|
+
|
|
112
|
+
> **Fix & Retest Protocol:** All code-producing gates (Lint, Test, Security, Performance, Review, E2E) apply the Fix & Retest Protocol: logic changes require updating unit tests before committing the fix. Fix immediately, then re-run — never ask the user to re-run.
|
|
107
113
|
|
|
108
114
|
### Bug Fix Flow
|
|
109
115
|
|
|
@@ -118,8 +124,8 @@ Debug → Plan → Branch → Write Tests → Implement → Lint ✓ → Test
|
|
|
118
124
|
| 3 | `/sk:branch` | Create branch |
|
|
119
125
|
| 4 | `/sk:write-tests` | Reproduce the bug in a test |
|
|
120
126
|
| 5 | `/sk:execute-plan` | Fix — make the test pass |
|
|
121
|
-
| 6–
|
|
122
|
-
|
|
|
127
|
+
| 6–10 | `/sk:lint` → `/sk:test` → `/sk:security-check` → `/sk:review` → `/sk:e2e` | Quality gates |
|
|
128
|
+
| 11 | `/sk:finish-feature` | Changelog + PR |
|
|
123
129
|
|
|
124
130
|
### Hotfix Flow
|
|
125
131
|
|
|
@@ -171,6 +171,20 @@ If there are Critical or High findings:
|
|
|
171
171
|
|
|
172
172
|
**Do not auto-fix.** The user decides what to address.
|
|
173
173
|
|
|
174
|
+
### Fix & Retest Protocol
|
|
175
|
+
|
|
176
|
+
When applying a fix, classify it before committing:
|
|
177
|
+
|
|
178
|
+
**a. Config/hardening change** (adding security header, fixing CORS config, adding rate limit, sanitizing output without changing logic) → commit and re-run `/sk:security-check`. No test update needed.
|
|
179
|
+
|
|
180
|
+
**b. Logic change** (new input validation branch, modified query parameterization, changed auth check, refactored data handling) → trigger protocol:
|
|
181
|
+
1. Update or add failing unit tests for the new secure behavior
|
|
182
|
+
2. Re-run `/sk:test` — must pass at 100% coverage
|
|
183
|
+
3. Commit (tests + fix together in one commit)
|
|
184
|
+
4. Re-run `/sk:security-check` from scratch
|
|
185
|
+
|
|
186
|
+
**Why:** Security fixes often change logic (e.g., adding parameterized queries, sanitizing inputs). Tests must cover the new secure behavior, not just the old vulnerable path.
|
|
187
|
+
|
|
174
188
|
---
|
|
175
189
|
|
|
176
190
|
## Model Routing
|
package/package.json
CHANGED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sk:e2e
|
|
3
|
+
description: "Run E2E behavioral verification using agent-browser as the final quality gate before finalize. Tests the complete, reviewed, secure implementation from a user's perspective."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /sk:e2e
|
|
7
|
+
|
|
8
|
+
E2E behavioral verification — the final quality gate before `/sk:finish-feature`. Runs after Review to verify the complete, reviewed, secure implementation works end-to-end from a user's perspective.
|
|
9
|
+
|
|
10
|
+
**Hard gate:** all scenarios must pass. Zero failures allowed.
|
|
11
|
+
|
|
12
|
+
## Allowed Tools
|
|
13
|
+
|
|
14
|
+
Bash, Read, Glob, Grep
|
|
15
|
+
|
|
16
|
+
## Steps
|
|
17
|
+
|
|
18
|
+
### 1. Read Context
|
|
19
|
+
|
|
20
|
+
Read these files to understand what to test:
|
|
21
|
+
- `tasks/todo.md` — planned features and acceptance criteria
|
|
22
|
+
- `tasks/findings.md` — design decisions and expected behaviors
|
|
23
|
+
- `tasks/progress.md` — implementation notes
|
|
24
|
+
|
|
25
|
+
### 2. Check agent-browser is Available
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
agent-browser --version
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
If not found, instruct the user:
|
|
32
|
+
```
|
|
33
|
+
agent-browser is required. Install it:
|
|
34
|
+
npm install -g agent-browser
|
|
35
|
+
agent-browser install # downloads Chrome (~100MB)
|
|
36
|
+
Then re-run /sk:e2e.
|
|
37
|
+
```
|
|
38
|
+
Stop if not available.
|
|
39
|
+
|
|
40
|
+
### 3. Detect Local Server
|
|
41
|
+
|
|
42
|
+
Determine what URL to test against:
|
|
43
|
+
- Check for a dev server command in `package.json` scripts (`dev`, `start`)
|
|
44
|
+
- Check for `artisan serve` in Laravel projects (`php artisan serve`)
|
|
45
|
+
- Check for `vite` or `next dev`
|
|
46
|
+
- If a server is already running (check common ports: 3000, 5173, 8000, 8080), use it
|
|
47
|
+
- If no server is running, start one in the background and note the URL
|
|
48
|
+
|
|
49
|
+
### 4. Locate E2E Test Files
|
|
50
|
+
|
|
51
|
+
Find E2E test scenarios written during the Write Tests step:
|
|
52
|
+
```bash
|
|
53
|
+
find . -name "*.e2e.*" -o -name "*.spec.*" | grep -v node_modules
|
|
54
|
+
ls tests/e2e/ 2>/dev/null
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
If no E2E test files exist, derive scenarios from `tasks/todo.md` acceptance criteria and `tasks/findings.md`.
|
|
58
|
+
|
|
59
|
+
### 5. Run E2E Scenarios
|
|
60
|
+
|
|
61
|
+
For each scenario, use agent-browser following this core pattern:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
# Navigate to the page
|
|
65
|
+
agent-browser open <url>
|
|
66
|
+
|
|
67
|
+
# Get interactive elements (token-efficient ref-based snapshot)
|
|
68
|
+
agent-browser snapshot -i
|
|
69
|
+
|
|
70
|
+
# Interact using @refs (never CSS selectors)
|
|
71
|
+
agent-browser click @e1
|
|
72
|
+
agent-browser fill @e2 "input value"
|
|
73
|
+
agent-browser press Enter
|
|
74
|
+
|
|
75
|
+
# Use semantic locators when @refs aren't stable
|
|
76
|
+
agent-browser find role button
|
|
77
|
+
agent-browser find text "Expected Text"
|
|
78
|
+
agent-browser find label "Email"
|
|
79
|
+
|
|
80
|
+
# Assert expected state
|
|
81
|
+
agent-browser snapshot # check content
|
|
82
|
+
agent-browser find text "Success Message"
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**Ref-based interaction is required.** Never use CSS selectors (`#id`, `.class`) — use semantic locators (`find role`, `find text`, `find label`, `find placeholder`) for stability.
|
|
86
|
+
|
|
87
|
+
For each scenario, record:
|
|
88
|
+
- Scenario name
|
|
89
|
+
- Steps executed
|
|
90
|
+
- Result: PASS or FAIL
|
|
91
|
+
- On FAIL: what was expected vs. what was found (include snapshot excerpt)
|
|
92
|
+
|
|
93
|
+
### 6. Report Results
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
E2E Results:
|
|
97
|
+
PASS [scenario name]
|
|
98
|
+
PASS [scenario name]
|
|
99
|
+
FAIL [scenario name] — expected "X" but found "Y"
|
|
100
|
+
|
|
101
|
+
Total: X passed, Y failed
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
If all pass → proceed to Fix & Retest Protocol section (no action needed).
|
|
105
|
+
If any fail → apply Fix & Retest Protocol.
|
|
106
|
+
|
|
107
|
+
## Fix & Retest Protocol
|
|
108
|
+
|
|
109
|
+
When this gate requires a fix, classify it before committing:
|
|
110
|
+
|
|
111
|
+
**a. Style/config/wording change** (CSS tweak, copy change, selector fix) → commit and re-run `/sk:e2e` (no unit test update needed)
|
|
112
|
+
|
|
113
|
+
**b. Logic change** (new branch, modified condition, new data path, query change, new function, API change) → trigger protocol:
|
|
114
|
+
1. Update or add failing unit tests for the new behavior
|
|
115
|
+
2. Re-run `/sk:test` — must pass at 100% coverage
|
|
116
|
+
3. Commit (tests + fix together in one commit)
|
|
117
|
+
4. Re-run `/sk:e2e` from scratch
|
|
118
|
+
|
|
119
|
+
**Exception:** Formatter auto-fixes are never logic changes — bypass protocol automatically.
|
|
120
|
+
|
|
121
|
+
**This gate cannot be skipped.** All scenarios must pass before proceeding to `/sk:update-task`.
|
|
122
|
+
|
|
123
|
+
## Next Steps
|
|
124
|
+
|
|
125
|
+
If all scenarios pass:
|
|
126
|
+
> "E2E gate clean. Run `/sk:update-task` to mark the task done."
|
|
127
|
+
|
|
128
|
+
If failures remain after fixes:
|
|
129
|
+
> "Re-running /sk:e2e — [N] scenarios still failing."
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Model Routing
|
|
134
|
+
|
|
135
|
+
Read `.shipkit/config.json` from the project root if it exists.
|
|
136
|
+
|
|
137
|
+
- If `model_overrides["sk:e2e"]` is set, use that model — it takes precedence.
|
|
138
|
+
- Otherwise use the `profile` field. Default: `balanced`.
|
|
139
|
+
|
|
140
|
+
| Profile | Model |
|
|
141
|
+
|---------|-------|
|
|
142
|
+
| `full-sail` | opus (inherit) |
|
|
143
|
+
| `quality` | sonnet |
|
|
144
|
+
| `balanced` | sonnet |
|
|
145
|
+
| `budget` | haiku |
|
|
146
|
+
|
|
147
|
+
> `opus` = inherit (uses the current session model). When spawning sub-agents via the Agent tool, pass `model: "<resolved-model>"`.
|
package/skills/sk:lint/SKILL.md
CHANGED
|
@@ -66,15 +66,38 @@ Agent 2: "Run vendor/bin/rector --dry-run. Report all suggested changes with fil
|
|
|
66
66
|
Agent 3: "Run npx eslint . Report all errors with file:line."
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
### 5.
|
|
69
|
+
### 5. Run Dependency Audit
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
Run dependency vulnerability checks for detected stacks:
|
|
72
|
+
|
|
73
|
+
| Stack | Command | Block on |
|
|
74
|
+
|-------|---------|----------|
|
|
75
|
+
| PHP (composer.json) | `composer audit` | any severity with fix available (`composer audit` has no severity filter) |
|
|
76
|
+
| Node (package.json) | `npm audit --audit-level=high` | high or critical |
|
|
77
|
+
| Node (yarn.lock) | `yarn audit --level high` | high or critical |
|
|
78
|
+
| Node (pnpm-lock.yaml) | `pnpm audit --audit-level high` | high or critical |
|
|
79
|
+
| Python (pyproject.toml / requirements.txt) | `pip-audit` | high or critical |
|
|
80
|
+
|
|
81
|
+
For each detected package manager, run the audit command and capture output.
|
|
82
|
+
|
|
83
|
+
**Block (fail this gate):**
|
|
84
|
+
- PHP: any vulnerability that has a fix available (`composer audit` exits non-zero for all severities — no filtering option exists)
|
|
85
|
+
- Node/Python: critical or high severity vulnerabilities that have a fix available
|
|
86
|
+
|
|
87
|
+
**Warn (pass with note):** medium/low severity for Node/Python, or any severity with no available fix — note in report but do not block.
|
|
88
|
+
|
|
89
|
+
Skip stacks not present in the project.
|
|
90
|
+
|
|
91
|
+
### 6. Fix and Re-run
|
|
92
|
+
|
|
93
|
+
If any analyzer reports errors or the dep audit blocks:
|
|
72
94
|
1. Fix all reported issues
|
|
73
95
|
2. Re-run formatters (fixes may need formatting)
|
|
74
96
|
3. Re-launch all analyzers in parallel
|
|
75
|
-
4.
|
|
97
|
+
4. Re-run dep audit if any dependency was fixed
|
|
98
|
+
5. Loop until every tool exits clean
|
|
76
99
|
|
|
77
|
-
###
|
|
100
|
+
### 7. Report Results
|
|
78
101
|
|
|
79
102
|
Print one line per tool:
|
|
80
103
|
|
|
@@ -90,12 +113,34 @@ ESLint: X errors fixed / clean
|
|
|
90
113
|
ruff check: X issues fixed / clean
|
|
91
114
|
golangci-lint: X issues fixed / clean
|
|
92
115
|
cargo clippy: X warnings fixed / clean
|
|
116
|
+
composer audit: clean / X vulns blocked
|
|
117
|
+
npm audit: clean / X vulns blocked
|
|
93
118
|
```
|
|
94
119
|
|
|
95
120
|
Only include lines for detected tools. All must show "clean" before this skill passes.
|
|
96
121
|
|
|
97
122
|
---
|
|
98
123
|
|
|
124
|
+
## Fix & Retest Protocol
|
|
125
|
+
|
|
126
|
+
When this gate requires a fix, classify it before committing:
|
|
127
|
+
|
|
128
|
+
**a. Formatter auto-fix** (Pint, Prettier, gofmt, cargo fmt changed whitespace/style) → commit and re-run `/sk:lint`. Never a logic change — bypass protocol.
|
|
129
|
+
|
|
130
|
+
**b. Analyzer fix** (PHPStan type error, Rector suggestion, ESLint error, ruff violation) → classify each fix:
|
|
131
|
+
- Type annotation, import order, unused var, style rule → **style fix** → commit and re-run
|
|
132
|
+
- New guard clause, changed condition, extracted function, modified data flow → **logic change** → trigger protocol:
|
|
133
|
+
1. Update or add failing unit tests for the new behavior
|
|
134
|
+
2. Re-run `/sk:test` — must pass at 100% coverage
|
|
135
|
+
3. Commit (tests + fix together in one commit)
|
|
136
|
+
4. Re-run `/sk:lint` from scratch
|
|
137
|
+
|
|
138
|
+
**c. Dependency vulnerability fix** (composer audit / npm audit finding) → classify:
|
|
139
|
+
- Version bump with no API change → **style fix** → commit and re-run
|
|
140
|
+
- Version bump with API/behavior change → **logic change** → trigger protocol
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
99
144
|
## Model Routing
|
|
100
145
|
|
|
101
146
|
Read `.shipkit/config.json` from the project root if it exists.
|
package/skills/sk:perf/SKILL.md
CHANGED
|
@@ -171,6 +171,27 @@ If there are no critical or high findings:
|
|
|
171
171
|
|
|
172
172
|
---
|
|
173
173
|
|
|
174
|
+
## Fix & Retest Protocol
|
|
175
|
+
|
|
176
|
+
When applying a performance fix, classify it before committing:
|
|
177
|
+
|
|
178
|
+
**a. Config/infrastructure change** (adding cache headers, enabling compression, changing CDN config, adjusting connection pool size) → commit and re-run `/sk:perf`. No test update needed.
|
|
179
|
+
|
|
180
|
+
**b. Logic change** (fixing N+1 query by changing data-fetching logic, refactoring algorithm, modifying data structure, changing pagination logic) → trigger protocol:
|
|
181
|
+
1. Update or add failing unit tests for the new optimized behavior
|
|
182
|
+
2. Re-run `/sk:test` — must pass at 100% coverage
|
|
183
|
+
3. Commit (tests + fix together in one commit)
|
|
184
|
+
4. Re-run `/sk:perf` to verify the fix resolved the finding
|
|
185
|
+
|
|
186
|
+
**Common logic-change performance fixes:**
|
|
187
|
+
- N+1 fix: changes how related data is fetched → update tests that assert on query count or data shape
|
|
188
|
+
- Algorithm change: O(n²) → O(n log n) → update tests that assert on output correctness
|
|
189
|
+
- Pagination: adding LIMIT/offset → update tests that assert on result set size
|
|
190
|
+
|
|
191
|
+
**Why:** Performance fixes often change how data is fetched or processed. Tests must verify the optimized path produces correct results.
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
174
195
|
## Model Routing
|
|
175
196
|
|
|
176
197
|
Read `.shipkit/config.json` from the project root if it exists.
|
|
@@ -15,14 +15,31 @@ This is a **report-only** step. If Critical or Warning issues are found, the use
|
|
|
15
15
|
|
|
16
16
|
## Allowed Tools
|
|
17
17
|
|
|
18
|
-
Bash, Read, Glob, Grep
|
|
18
|
+
Bash, Read, Glob, Grep, Skill
|
|
19
19
|
|
|
20
|
-
**
|
|
20
|
+
**Step 0 only:** the `simplify` skill is invoked via the Skill tool, which carries its own Write/Edit permissions. All other steps are read-only — no direct Write or Edit calls. If issues are found in the main review, the user decides what to fix.
|
|
21
21
|
|
|
22
22
|
## Steps
|
|
23
23
|
|
|
24
24
|
You MUST complete these steps in order:
|
|
25
25
|
|
|
26
|
+
### 0. Run Simplify First
|
|
27
|
+
|
|
28
|
+
Before reviewing, invoke the built-in `simplify` skill on the changed files to catch reuse, quality, and efficiency issues automatically:
|
|
29
|
+
|
|
30
|
+
> "Review the changed files on this branch for reuse, quality, and efficiency. Fix any issues found."
|
|
31
|
+
|
|
32
|
+
Use `git diff main..HEAD --name-only` to identify the changed files, then run simplify on them.
|
|
33
|
+
|
|
34
|
+
If simplify makes any changes:
|
|
35
|
+
1. Verify the changes are correct
|
|
36
|
+
2. Commit them with `/sk:smart-commit` before continuing the review
|
|
37
|
+
3. Note in the review report: "Simplify pre-pass: X files updated"
|
|
38
|
+
|
|
39
|
+
If simplify makes no changes, proceed directly to step 1.
|
|
40
|
+
|
|
41
|
+
**Note:** Simplify runs automatically as part of `/sk:review` — users do not need to run it separately.
|
|
42
|
+
|
|
26
43
|
### 1. Read Project Context
|
|
27
44
|
|
|
28
45
|
```
|
|
@@ -327,6 +344,20 @@ If the user wants to fix nitpicks, loop back to `/sk:debug` + `/sk:smart-commit`
|
|
|
327
344
|
If the review is **completely clean**:
|
|
328
345
|
> "Review complete — no issues found. Run `/sk:finish-feature` to finalize the branch and create a PR."
|
|
329
346
|
|
|
347
|
+
### Fix & Retest Protocol
|
|
348
|
+
|
|
349
|
+
When applying a fix from this review, classify it before committing:
|
|
350
|
+
|
|
351
|
+
**a. Style/naming/comment change** (rename variable, add doc comment, reorder imports, extract constant) → commit and re-run `/sk:review`. No test update needed.
|
|
352
|
+
|
|
353
|
+
**b. Logic change** (fix incorrect condition, add missing null check, change data flow, refactor algorithm, fix async bug) → trigger protocol:
|
|
354
|
+
1. Update or add failing unit tests for the corrected behavior
|
|
355
|
+
2. Re-run `/sk:test` — must pass at 100% coverage
|
|
356
|
+
3. Commit (tests + fix together in one commit)
|
|
357
|
+
4. Re-run `/sk:review` from scratch
|
|
358
|
+
|
|
359
|
+
**Why:** Review catches logic bugs. Fixing a logic bug without updating tests leaves the test suite asserting on the old (wrong) behavior.
|
|
360
|
+
|
|
330
361
|
---
|
|
331
362
|
|
|
332
363
|
## Model Routing
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
## Workflow — Follow This Order
|
|
35
35
|
<!-- LOCK -->
|
|
36
36
|
|
|
37
|
-
**Flow:** Read → Explore → Design → Accessibility → Plan → Branch → Migrate → Write Tests → Implement → Lint → Verify Tests → Security → Performance → Review → Finish
|
|
37
|
+
**Flow:** Read → Explore → Design → Accessibility → Plan → Branch → Migrate → Write Tests → Implement → Lint → Verify Tests → Security → Performance → Review → E2E Tests → Finish → Sync Features
|
|
38
38
|
|
|
39
39
|
Progress is tracked in `tasks/workflow-status.md`. This file persists across conversations.
|
|
40
40
|
|
|
@@ -42,55 +42,61 @@ Progress is tracked in `tasks/workflow-status.md`. This file persists across con
|
|
|
42
42
|
|---|------|---------|------|-------|
|
|
43
43
|
| 1 | Read Todo | read `tasks/todo.md` | required | no |
|
|
44
44
|
| 2 | Read Lessons | read `tasks/lessons.md` | required | no |
|
|
45
|
-
| 3 | Explore | `/brainstorm` | required | no |
|
|
46
|
-
| 4 | Design | `/frontend-design` or `/api-design` | optional (confirm to skip) | no |
|
|
47
|
-
| 5 | Accessibility | `/accessibility` | optional (confirm to skip) | no |
|
|
48
|
-
| 6 | Plan | `/write-plan` | required | no |
|
|
49
|
-
| 7 | Branch | `/branch` | required | no |
|
|
50
|
-
| 8 | Migrate | `/schema-migrate` | optional (confirm to skip) | no |
|
|
51
|
-
| 9 | Write Tests | `/write-tests` | required | no |
|
|
52
|
-
| 10 | Implement | `/execute-plan` | required | no |
|
|
53
|
-
| 11 | Commit | `/smart-commit` | required | no |
|
|
54
|
-
| 12 | Lint | `/lint` | required | yes — must be clean |
|
|
55
|
-
| 13 | Commit | `/smart-commit` | conditional (skip if lint was clean) | no |
|
|
56
|
-
| 14 | Verify Tests | `/test` | required | yes — 100% coverage required |
|
|
57
|
-
| 15 | Commit | `/smart-commit` | conditional (skip if tests passed clean) | no |
|
|
58
|
-
| 16 | Security | `/security-check` | required | yes — must reach 0 issues |
|
|
59
|
-
| 17 | Commit | `/smart-commit` | conditional (skip if security was clean) | no |
|
|
60
|
-
| 18 | Performance | `/perf` | optional (confirm to skip) | yes — loop until critical/high = 0 |
|
|
61
|
-
| 19 | Commit | `/smart-commit` | conditional (skip if perf was clean) | no |
|
|
62
|
-
| 20 | Review | `/review` | required | yes — must reach 0 issues |
|
|
63
|
-
| 21 | Commit | `/smart-commit` | conditional (skip if review was clean) | no |
|
|
64
|
-
| 22 |
|
|
65
|
-
| 23 |
|
|
66
|
-
| 24 |
|
|
45
|
+
| 3 | Explore | `/sk:brainstorm` | required | no |
|
|
46
|
+
| 4 | Design | `/sk:frontend-design` or `/sk:api-design` | optional (confirm to skip) | no |
|
|
47
|
+
| 5 | Accessibility | `/sk:accessibility` | optional (confirm to skip) | no |
|
|
48
|
+
| 6 | Plan | `/sk:write-plan` | required | no |
|
|
49
|
+
| 7 | Branch | `/sk:branch` | required | no |
|
|
50
|
+
| 8 | Migrate | `/sk:schema-migrate` | optional (confirm to skip) | no |
|
|
51
|
+
| 9 | Write Tests | `/sk:write-tests` | required | no |
|
|
52
|
+
| 10 | Implement | `/sk:execute-plan` | required | no |
|
|
53
|
+
| 11 | Commit | `/sk:smart-commit` | required | no |
|
|
54
|
+
| 12 | Lint + Dep Audit | `/sk:lint` | required | yes — must be clean |
|
|
55
|
+
| 13 | Commit | `/sk:smart-commit` | conditional (skip if lint was clean) | no |
|
|
56
|
+
| 14 | Verify Tests | `/sk:test` | required | yes — 100% coverage required |
|
|
57
|
+
| 15 | Commit | `/sk:smart-commit` | conditional (skip if tests passed clean) | no |
|
|
58
|
+
| 16 | Security | `/sk:security-check` | required | yes — must reach 0 issues |
|
|
59
|
+
| 17 | Commit | `/sk:smart-commit` | conditional (skip if security was clean) | no |
|
|
60
|
+
| 18 | Performance | `/sk:perf` | optional (confirm to skip) | yes — loop until critical/high = 0 |
|
|
61
|
+
| 19 | Commit | `/sk:smart-commit` | conditional (skip if perf was clean) | no |
|
|
62
|
+
| 20 | Review + Simplify | `/sk:review` | required | yes — must reach 0 issues |
|
|
63
|
+
| 21 | Commit | `/sk:smart-commit` | conditional (skip if review was clean) | no |
|
|
64
|
+
| 22 | E2E Tests | `/sk:e2e` | required | yes — all scenarios must pass |
|
|
65
|
+
| 23 | Commit | `/sk:smart-commit` | conditional (skip if E2E was clean) | no |
|
|
66
|
+
| 24 | Update | `/sk:update-task` | required | no |
|
|
67
|
+
| 25 | Finalize | `/sk:finish-feature` | required | no |
|
|
68
|
+
| 26 | Sync Features | `/sk:features` | required | no |
|
|
69
|
+
| 27 | Release | `/sk:release` | optional (confirm to skip) | no |
|
|
67
70
|
|
|
68
71
|
### Step Details
|
|
69
72
|
|
|
70
73
|
1. **Read** `tasks/todo.md` — pick the next incomplete task
|
|
71
74
|
2. **Read** `tasks/lessons.md` — review past corrections before writing code
|
|
72
|
-
3. **Explore** — run `/brainstorm` to clarify requirements, constraints, and approach. No code in this step.
|
|
73
|
-
4. **Design** — run `/frontend-design` for UI mockup or `/api-design` for API contracts. No code — design only. Skip if pure backend with no UI and no new API. After the design summary, the skill asks if you want a Pencil visual mockup — answer `y` only if you have the Pencil app open and Pencil MCP connected. Use `/frontend-design --pencil` to jump directly to the Pencil phase.
|
|
74
|
-
5. **Accessibility** — run `/accessibility` to audit the design spec for WCAG 2.1 AA compliance. Produces `tasks/accessibility-findings.md`. Skip if backend-only with no frontend.
|
|
75
|
-
6. **Plan** — run `/write-plan` to write a decision-complete plan into `tasks/todo.md` using brainstorm + design outputs. No code in this step.
|
|
76
|
-
7. **Branch** — run `/branch` to create a feature branch auto-named from the current task.
|
|
77
|
-
8. **Migrate** — run `/schema-migrate` for database changes. Skip if no schema changes needed.
|
|
78
|
-
9. **Write Tests** — run `/write-tests` (TDD red phase). Write failing tests for all planned code. If modifying existing behavior, update existing tests first. Tests SHOULD fail — no implementation yet.
|
|
79
|
-
10. **Implement** — run `/execute-plan` to execute `tasks/todo.md` checkboxes in small batches, making the failing tests pass (TDD green phase). Log progress to `tasks/progress.md`.
|
|
80
|
-
11. **Commit** — run `/smart-commit` to commit tests + implementation
|
|
81
|
-
12. **Lint** — run `/lint` — auto-detects and runs all project linters. Fix all issues immediately, then re-run until clean. Do not ask to re-run — fix and re-run automatically.
|
|
82
|
-
13. **Commit** — run `/smart-commit` if lint required fixes. Auto-skip if lint was clean.
|
|
83
|
-
14. **Verify Tests** — run `/test` — auto-detects and runs all project test suites. **100% test coverage required.** Fix failures immediately, then re-run. Do not ask to re-run — fix and re-run automatically.
|
|
84
|
-
15. **Commit** — run `/smart-commit` if test fixes were needed. Auto-skip if tests passed first try.
|
|
85
|
-
16. **Security** — run `/security-check`. Must reach 0 issues across all severities. Fix issues immediately, commit, then re-run. Loop until clean.
|
|
86
|
-
17. **Commit** — run `/smart-commit` if security required fixes. Auto-skip if clean.
|
|
87
|
-
18. **Performance** — run `/perf` to audit for performance issues. Produces `tasks/perf-findings.md`. Fix critical/high findings, commit, then re-run. Loop until critical/high = 0. Skip if confirmed with user.
|
|
88
|
-
19. **Commit** — run `/smart-commit` if perf required fixes. Auto-skip if clean.
|
|
89
|
-
20. **Review** — run `/review`. Must reach 0 issues including nitpicks. Fix issues immediately, commit, then re-run. Loop until clean.
|
|
90
|
-
21. **Commit** — run `/smart-commit` if review required fixes. Auto-skip if clean.
|
|
91
|
-
22. **
|
|
92
|
-
23. **
|
|
93
|
-
24. **
|
|
75
|
+
3. **Explore** — run `/sk:brainstorm` to clarify requirements, constraints, and approach. No code in this step.
|
|
76
|
+
4. **Design** — run `/sk:frontend-design` for UI mockup or `/sk:api-design` for API contracts. No code — design only. Skip if pure backend with no UI and no new API. After the design summary, the skill asks if you want a Pencil visual mockup — answer `y` only if you have the Pencil app open and Pencil MCP connected. Use `/sk:frontend-design --pencil` to jump directly to the Pencil phase.
|
|
77
|
+
5. **Accessibility** — run `/sk:accessibility` to audit the design spec for WCAG 2.1 AA compliance. Produces `tasks/accessibility-findings.md`. Skip if backend-only with no frontend.
|
|
78
|
+
6. **Plan** — run `/sk:write-plan` to write a decision-complete plan into `tasks/todo.md` using brainstorm + design outputs. No code in this step.
|
|
79
|
+
7. **Branch** — run `/sk:branch` to create a feature branch auto-named from the current task.
|
|
80
|
+
8. **Migrate** — run `/sk:schema-migrate` for database changes. Skip if no schema changes needed.
|
|
81
|
+
9. **Write Tests** — run `/sk:write-tests` (TDD red phase). Write failing tests for all planned code. If modifying existing behavior, update existing tests first. Tests SHOULD fail — no implementation yet.
|
|
82
|
+
10. **Implement** — run `/sk:execute-plan` to execute `tasks/todo.md` checkboxes in small batches, making the failing tests pass (TDD green phase). Log progress to `tasks/progress.md`.
|
|
83
|
+
11. **Commit** — run `/sk:smart-commit` to commit tests + implementation
|
|
84
|
+
12. **Lint + Dep Audit** — run `/sk:lint` — auto-detects and runs all project linters plus dependency vulnerability audits. Fix all issues immediately, then re-run until clean. Do not ask to re-run — fix and re-run automatically.
|
|
85
|
+
13. **Commit** — run `/sk:smart-commit` if lint required fixes. Auto-skip if lint was clean.
|
|
86
|
+
14. **Verify Tests** — run `/sk:test` — auto-detects and runs all project test suites. **100% test coverage required.** Fix failures immediately, then re-run. Do not ask to re-run — fix and re-run automatically.
|
|
87
|
+
15. **Commit** — run `/sk:smart-commit` if test fixes were needed. Auto-skip if tests passed first try.
|
|
88
|
+
16. **Security** — run `/sk:security-check`. Must reach 0 issues across all severities. Fix issues immediately, commit, then re-run. Loop until clean.
|
|
89
|
+
17. **Commit** — run `/sk:smart-commit` if security required fixes. Auto-skip if clean.
|
|
90
|
+
18. **Performance** — run `/sk:perf` to audit for performance issues. Produces `tasks/perf-findings.md`. Fix critical/high findings, commit, then re-run. Loop until critical/high = 0. Skip if confirmed with user.
|
|
91
|
+
19. **Commit** — run `/sk:smart-commit` if perf required fixes. Auto-skip if clean.
|
|
92
|
+
20. **Review + Simplify** — run `/sk:review`. First runs a simplify pre-pass on changed files, then performs full multi-dimensional review. Must reach 0 issues including nitpicks. Fix issues immediately, commit, then re-run. Loop until clean.
|
|
93
|
+
21. **Commit** — run `/sk:smart-commit` if review required fixes. Auto-skip if clean.
|
|
94
|
+
22. **E2E Tests** — run `/sk:e2e`. Verifies the complete, reviewed, secure implementation works end-to-end from a user's perspective using agent-browser. All scenarios must pass. Cannot be skipped.
|
|
95
|
+
23. **Commit** — run `/sk:smart-commit` if E2E required fixes. Auto-skip if E2E was clean.
|
|
96
|
+
24. **Update** — run `/sk:update-task` to mark the task done in `tasks/todo.md` and log completion to `tasks/progress.md`.
|
|
97
|
+
25. **Finalize** — run `/sk:finish-feature` for changelog + PR
|
|
98
|
+
26. **Sync Features** — run `/sk:features` to sync `docs/sk:features/` specs with what was actually shipped.
|
|
99
|
+
27. **Release** — run `/sk:release` if deploying. Skip if not ready.
|
|
94
100
|
|
|
95
101
|
### Workflow Tracker Rules
|
|
96
102
|
|
|
@@ -103,21 +109,22 @@ Progress is tracked in `tasks/workflow-status.md`. This file persists across con
|
|
|
103
109
|
- Add relevant Notes (e.g., "clean on attempt 2", "backend-only, no UI")
|
|
104
110
|
- Move `>> next <<` to the next pending step
|
|
105
111
|
|
|
106
|
-
3. **Optional steps** (4, 5,
|
|
112
|
+
3. **Optional steps** (4, 5, 8, 18, 27): Ask the user "Skip [step]?" and require explicit confirmation. Record the reason in Notes.
|
|
107
113
|
|
|
108
|
-
4. **Conditional commits** (13, 15, 17, 19, 21): Auto-skip if no changes were made. Record reason (e.g., "lint was clean", "tests passed first try").
|
|
114
|
+
4. **Conditional commits** (13, 15, 17, 19, 21, 23): Auto-skip if no changes were made. Record reason (e.g., "lint was clean", "tests passed first try").
|
|
109
115
|
|
|
110
|
-
5. **Loop steps are HARD GATES** (12, 14, 16, 20): These steps BLOCK all forward progress until they pass clean. Fix issues immediately and re-run. Do NOT ask the user to re-run — fix and re-run automatically. Track attempt number in Notes (e.g., "clean on attempt 3").
|
|
116
|
+
5. **Loop steps are HARD GATES** (12, 14, 16, 20, 22): These steps BLOCK all forward progress until they pass clean. Fix issues immediately and re-run. Do NOT ask the user to re-run — fix and re-run automatically. Track attempt number in Notes (e.g., "clean on attempt 3").
|
|
111
117
|
- **Step 12 (Lint)**: All detected linting tools must pass — every single one.
|
|
112
118
|
- **Step 14 (Verify Tests)**: All detected test suites (BE + FE) must pass with 100% coverage on new code.
|
|
113
119
|
- **Step 16 (Security)**: 0 issues across all severities.
|
|
114
120
|
- **Step 20 (Review)**: 0 issues including nitpicks.
|
|
121
|
+
- **Step 22 (E2E Tests)**: All scenarios must pass. 0 failures allowed.
|
|
115
122
|
- **Step 18 (Performance)**: Optional gate — if run, loop until critical/high findings = 0. Can be skipped with explicit confirmation.
|
|
116
123
|
- **DO NOT mark these steps as `done` until every check passes.** If even one tool fails, the step is NOT done. Never proceed to the next step with errors remaining.
|
|
117
124
|
|
|
118
|
-
6. **Never skip steps without confirmation.** Steps cannot run out of order. Hard gate steps (12, 14, 16, 20) can NEVER be skipped. Optional gate step (18) requires explicit confirmation to skip.
|
|
125
|
+
6. **Never skip steps without confirmation.** Steps cannot run out of order. Hard gate steps (12, 14, 16, 20, 22) can NEVER be skipped. Optional gate step (18) requires explicit confirmation to skip.
|
|
119
126
|
|
|
120
|
-
7. **Requirements change mid-workflow?** Stop the current step and run `/change` immediately. It will classify the scope (behavior tweak / new requirements / scope shift) and tell you exactly where to re-enter the workflow. Never continue implementing stale requirements.
|
|
127
|
+
7. **Requirements change mid-workflow?** Stop the current step and run `/sk:change` immediately. It will classify the scope (behavior tweak / new requirements / scope shift) and tell you exactly where to re-enter the workflow. Never continue implementing stale requirements.
|
|
121
128
|
|
|
122
129
|
7. **Never auto-advance.** When one step completes, stop and tell the user which step is next. Do not proceed automatically.
|
|
123
130
|
|
|
@@ -133,6 +140,22 @@ Next step: [#] [Name] — run `[command]`
|
|
|
133
140
|
|
|
134
141
|
This tells the user exactly what happened and what to do next. Never finish a step silently.
|
|
135
142
|
|
|
143
|
+
### Fix & Retest Protocol
|
|
144
|
+
|
|
145
|
+
**Applies to steps 12, 14, 16, 18, 20, 22 — any step that can produce code changes.**
|
|
146
|
+
|
|
147
|
+
When any of these steps require a fix, classify the fix before committing:
|
|
148
|
+
|
|
149
|
+
**a. Format/style/config/wording change** → commit and re-run the gate. No test update needed.
|
|
150
|
+
|
|
151
|
+
**b. Logic change** (new branch, modified condition, new data path, query change, new function, changed algorithm, API change) → trigger protocol:
|
|
152
|
+
1. Update or add failing unit tests for the new behavior
|
|
153
|
+
2. Re-run `/sk:test` — must pass at 100% coverage
|
|
154
|
+
3. Commit (tests + fix together in one commit)
|
|
155
|
+
4. Re-run the current gate from scratch
|
|
156
|
+
|
|
157
|
+
**Exception:** Lint formatter auto-fixes (Prettier, Pint, gofmt, cargo fmt) are never logic changes — bypass protocol automatically.
|
|
158
|
+
|
|
136
159
|
### Tracker Reset
|
|
137
160
|
|
|
138
161
|
- When starting a new task, check if `tasks/workflow-status.md` has any `done` or `skipped` steps. If yes, ask: "Existing workflow detected. Start fresh and reset tracker?"
|
|
@@ -140,52 +163,65 @@ This tells the user exactly what happened and what to do next. Never finish a st
|
|
|
140
163
|
|
|
141
164
|
### Bug Fix Flow
|
|
142
165
|
|
|
143
|
-
When fixing a bug (not building a feature), use `/debug` as the entry point. This sets up a shorter workflow:
|
|
166
|
+
When fixing a bug (not building a feature), use `/sk:debug` as the entry point. This sets up a shorter workflow:
|
|
144
167
|
|
|
145
168
|
| # | Step | Command |
|
|
146
169
|
|---|------|---------|
|
|
147
|
-
| 1 | Debug | `/debug` |
|
|
148
|
-
| 2 | Branch | `/branch` |
|
|
149
|
-
| 3 | Write Tests | `/write-tests` (regression test) |
|
|
170
|
+
| 1 | Debug | `/sk:debug` |
|
|
171
|
+
| 2 | Branch | `/sk:branch` |
|
|
172
|
+
| 3 | Write Tests | `/sk:write-tests` (regression test) |
|
|
150
173
|
| 4 | Fix | implement the fix |
|
|
151
|
-
| 5 | Commit | `/smart-commit` |
|
|
152
|
-
| 6 | Lint | `/lint` |
|
|
153
|
-
| 7 | Commit | `/smart-commit` (skip if clean) |
|
|
154
|
-
| 8 | Verify Tests | `/test` |
|
|
155
|
-
| 9 | Commit | `/smart-commit` (skip if clean) |
|
|
156
|
-
| 10 | Security | `/security-check` |
|
|
157
|
-
| 11 | Commit | `/smart-commit` (skip if clean) |
|
|
158
|
-
| 12 | Review | `/review` |
|
|
159
|
-
| 13 | Commit | `/smart-commit` (skip if clean) |
|
|
160
|
-
| 14 | Update | `/update-task` |
|
|
161
|
-
| 15 | Finalize | `/finish-feature` |
|
|
162
|
-
|
|
163
|
-
Start with `/debug` to investigate, then follow the abbreviated flow.
|
|
174
|
+
| 5 | Commit | `/sk:smart-commit` |
|
|
175
|
+
| 6 | Lint | `/sk:lint` |
|
|
176
|
+
| 7 | Commit | `/sk:smart-commit` (skip if clean) |
|
|
177
|
+
| 8 | Verify Tests | `/sk:test` |
|
|
178
|
+
| 9 | Commit | `/sk:smart-commit` (skip if clean) |
|
|
179
|
+
| 10 | Security | `/sk:security-check` |
|
|
180
|
+
| 11 | Commit | `/sk:smart-commit` (skip if clean) |
|
|
181
|
+
| 12 | Review | `/sk:review` |
|
|
182
|
+
| 13 | Commit | `/sk:smart-commit` (skip if clean) |
|
|
183
|
+
| 14 | Update | `/sk:update-task` |
|
|
184
|
+
| 15 | Finalize | `/sk:finish-feature` |
|
|
185
|
+
|
|
186
|
+
Start with `/sk:debug` to investigate, then follow the abbreviated flow.
|
|
164
187
|
|
|
165
188
|
### Hotfix Flow
|
|
166
189
|
|
|
167
|
-
For production emergencies that need to ship immediately, use `/hotfix`. Skips brainstorm, design, and write-tests. Quality gates still apply.
|
|
190
|
+
For production emergencies that need to ship immediately, use `/sk:hotfix`. Skips brainstorm, design, and write-tests. Quality gates still apply.
|
|
168
191
|
|
|
169
192
|
| # | Step | Command |
|
|
170
193
|
|---|------|---------|
|
|
171
|
-
| 1 | Investigate | `/debug` |
|
|
172
|
-
| 2 | Branch | `/branch` |
|
|
194
|
+
| 1 | Investigate | `/sk:debug` |
|
|
195
|
+
| 2 | Branch | `/sk:branch` |
|
|
173
196
|
| 3 | Fix | implement directly |
|
|
174
197
|
| 4 | Smoke Test | run existing tests |
|
|
175
|
-
| 5 | Commit | `/smart-commit` |
|
|
176
|
-
| 6 | Lint | `/lint` |
|
|
177
|
-
| 7 | Commit | `/smart-commit` (skip if clean) |
|
|
178
|
-
| 8 | Verify Tests | `/test` |
|
|
179
|
-
| 9 | Commit | `/smart-commit` (skip if clean) |
|
|
180
|
-
| 10 | Security | `/security-check` |
|
|
181
|
-
| 11 | Commit | `/smart-commit` (skip if clean) |
|
|
182
|
-
| 12 | Review | `/review` |
|
|
183
|
-
| 13 | Commit | `/smart-commit` (skip if clean) |
|
|
184
|
-
| 14 | Update | `/update-task` |
|
|
185
|
-
| 15 | Finalize | `/finish-feature` |
|
|
198
|
+
| 5 | Commit | `/sk:smart-commit` |
|
|
199
|
+
| 6 | Lint | `/sk:lint` |
|
|
200
|
+
| 7 | Commit | `/sk:smart-commit` (skip if clean) |
|
|
201
|
+
| 8 | Verify Tests | `/sk:test` |
|
|
202
|
+
| 9 | Commit | `/sk:smart-commit` (skip if clean) |
|
|
203
|
+
| 10 | Security | `/sk:security-check` |
|
|
204
|
+
| 11 | Commit | `/sk:smart-commit` (skip if clean) |
|
|
205
|
+
| 12 | Review | `/sk:review` |
|
|
206
|
+
| 13 | Commit | `/sk:smart-commit` (skip if clean) |
|
|
207
|
+
| 14 | Update | `/sk:update-task` |
|
|
208
|
+
| 15 | Finalize | `/sk:finish-feature` |
|
|
186
209
|
|
|
187
210
|
After merging: add a regression test and a lessons.md entry.
|
|
188
211
|
|
|
212
|
+
### Requirement Change Flow
|
|
213
|
+
|
|
214
|
+
When requirements change mid-workflow, run `/sk:change` to avoid implementing the wrong behavior:
|
|
215
|
+
|
|
216
|
+
| # | Step | Command |
|
|
217
|
+
|---|------|---------|
|
|
218
|
+
| 1 | Assess | `/sk:change` — classify scope (Tier 1/2/3) |
|
|
219
|
+
| 2 | Tier 1 (test update only) | update tests → re-enter at step 9 |
|
|
220
|
+
| 3 | Tier 2 (plan revision) | revise plan → re-enter at step 6 |
|
|
221
|
+
| 4 | Tier 3 (re-brainstorm) | re-enter at step 3 |
|
|
222
|
+
|
|
223
|
+
Never update tests or implementation based on a changed requirement without going through `/sk:change` first.
|
|
224
|
+
|
|
189
225
|
## Sub-Agent Patterns
|
|
190
226
|
<!-- BEGIN:sub-agent-patterns -->
|
|
191
227
|
|
|
@@ -281,9 +317,9 @@ Tests are written **before** implementation (step 9) and verified **after** (ste
|
|
|
281
317
|
|
|
282
318
|
### TDD Flow
|
|
283
319
|
|
|
284
|
-
1. `/write-tests` — write failing tests based on the plan (RED)
|
|
285
|
-
2. `/execute-plan` — implement code to make tests pass (GREEN)
|
|
286
|
-
3. `/test` — verify all tests pass with 100% coverage (VERIFY)
|
|
320
|
+
1. `/sk:write-tests` — write failing tests based on the plan (RED)
|
|
321
|
+
2. `/sk:execute-plan` — implement code to make tests pass (GREEN)
|
|
322
|
+
3. `/sk:test` — verify all tests pass with 100% coverage (VERIFY)
|
|
287
323
|
|
|
288
324
|
Every new function, endpoint, component, and module needs tests. No code proceeds past step 13 without 100% coverage on new code.
|
|
289
325
|
|
|
@@ -299,3 +335,32 @@ Never retry the same failing approach.
|
|
|
299
335
|
## Architectural Change Log
|
|
300
336
|
|
|
301
337
|
Create entries in: `[ARCH_CHANGELOG_DIR]`
|
|
338
|
+
|
|
339
|
+
## Commands
|
|
340
|
+
|
|
341
|
+
| Command | Purpose |
|
|
342
|
+
|---------|---------|
|
|
343
|
+
| `/sk:brainstorm` | Explore requirements and design |
|
|
344
|
+
| `/sk:frontend-design` | UI mockup before implementation. Prompts to create Pencil visual mockup |
|
|
345
|
+
| `/sk:api-design` | Design API contracts (endpoints, payloads, auth, errors) before implementation |
|
|
346
|
+
| `/sk:accessibility` | WCAG 2.1 AA audit — runs after design, before implementation |
|
|
347
|
+
| `/sk:write-plan` | Write decision-complete plan into `tasks/todo.md` |
|
|
348
|
+
| `/sk:branch` | Create feature branch auto-named from current task |
|
|
349
|
+
| `/sk:write-tests` | TDD: Write failing tests before implementation |
|
|
350
|
+
| `/sk:execute-plan` | Execute `tasks/todo.md` checkboxes in batches |
|
|
351
|
+
| `/sk:smart-commit` | Conventional commit with approval |
|
|
352
|
+
| `/sk:lint` | Auto-detect and run all project linters + dependency audits |
|
|
353
|
+
| `/sk:test` | Auto-detect and run all project test suites |
|
|
354
|
+
| `/sk:debug` | Investigate and debug issues (bug fix entry point) |
|
|
355
|
+
| `/sk:security-check` | OWASP security audit on changed files |
|
|
356
|
+
| `/sk:perf` | Performance audit — bundle, N+1, Core Web Vitals, memory |
|
|
357
|
+
| `/sk:review` | Self-review with simplify pre-pass + multi-dimensional review |
|
|
358
|
+
| `/sk:e2e` | E2E behavioral verification using agent-browser (final quality gate) |
|
|
359
|
+
| `/sk:hotfix` | Emergency fix workflow — skip design/TDD, quality gates enforced |
|
|
360
|
+
| `/sk:change` | Handle mid-workflow requirement changes — re-enter at correct step |
|
|
361
|
+
| `/sk:update-task` | Mark task done and log completion |
|
|
362
|
+
| `/sk:finish-feature` | Changelog + PR creation |
|
|
363
|
+
| `/sk:features` | Sync feature specs with shipped implementation |
|
|
364
|
+
| `/sk:release` | Version bump + changelog + tag |
|
|
365
|
+
| `/sk:status` | Show workflow + task status |
|
|
366
|
+
| `/sk:setup-optimizer` | Diagnose + update workflow + enrich CLAUDE.md |
|
|
@@ -6,14 +6,14 @@ description: "Start with design questions before writing code."
|
|
|
6
6
|
|
|
7
7
|
# /brainstorm
|
|
8
8
|
|
|
9
|
-
**Workflow:** Read → **Explore** → Design → Accessibility → Plan → Branch → Migrate → Write Tests → Implement → Lint → Verify Tests → Security → Performance → Review →
|
|
9
|
+
**Workflow:** Read → **Explore** → Design → Accessibility → Plan → Branch → Migrate → Write Tests → Implement → Lint → Verify Tests → Security → Performance → Review → E2E Tests → Finish → Sync Features
|
|
10
10
|
|
|
11
11
|
Explore design and clarify requirements **before** any code is written.
|
|
12
12
|
|
|
13
13
|
## Hard Rules
|
|
14
14
|
|
|
15
15
|
- **DO NOT write, edit, or generate any code.** No files, no snippets, no pseudo-implementations.
|
|
16
|
-
- **DO NOT create a plan.** That is `/write-plan`'s job.
|
|
16
|
+
- **DO NOT create a plan.** That is `/sk:write-plan`'s job.
|
|
17
17
|
- **DO NOT run build/test/lint commands.** You are in design mode only.
|
|
18
18
|
- You may **read** existing code to understand the current state, but nothing more.
|
|
19
19
|
|
|
@@ -65,10 +65,10 @@ Explore design and clarify requirements **before** any code is written.
|
|
|
65
65
|
|
|
66
66
|
## When Done
|
|
67
67
|
|
|
68
|
-
1. Update `tasks/workflow-status.md`: set step 1 (`/brainstorm`) to `done`, move `>> next <<` to the next pending step.
|
|
68
|
+
1. Update `tasks/workflow-status.md`: set step 1 (`/sk:brainstorm`) to `done`, move `>> next <<` to the next pending step.
|
|
69
69
|
2. Print the full workflow status dashboard table.
|
|
70
70
|
3. Tell the user:
|
|
71
71
|
> "Brainstorming complete. Findings saved to `tasks/findings.md`."
|
|
72
|
-
4. If step 2 (`/frontend-design`) is next, ask: "Step 2 is `/frontend-design` (optional). Run it or skip?"
|
|
72
|
+
4. If step 2 (`/sk:frontend-design`) is next, ask: "Step 2 is `/sk:frontend-design` (optional). Run it or skip?"
|
|
73
73
|
|
|
74
74
|
**Do not proceed to planning or implementation yourself.** The user must explicitly invoke the next step.
|
|
@@ -6,7 +6,7 @@ description: "Execute tasks/todo.md checkboxes in small batches; log to tasks/pr
|
|
|
6
6
|
|
|
7
7
|
# /execute-plan
|
|
8
8
|
|
|
9
|
-
**Workflow:** Read → Explore → Design → Accessibility → Plan → Branch → Migrate → Write Tests → **Implement** → Lint → Verify Tests → Security → Performance → Review →
|
|
9
|
+
**Workflow:** Read → Explore → Design → Accessibility → Plan → Branch → Migrate → Write Tests → **Implement** → Lint → Verify Tests → Security → Performance → Review → E2E Tests → Finish → Sync Features
|
|
10
10
|
|
|
11
11
|
Execute the plan in `tasks/todo.md` in small batches with clear checkpoints.
|
|
12
12
|
|
|
@@ -33,7 +33,7 @@ Execute the plan in `tasks/todo.md` in small batches with clear checkpoints.
|
|
|
33
33
|
- verification results
|
|
34
34
|
- what's next
|
|
35
35
|
- After all items in this batch pass verification, the code is ready to stage.
|
|
36
|
-
Run `/commit` after any passed batch, or accumulate and commit at plan completion.
|
|
36
|
+
Run `/sk:smart-commit` after any passed batch, or accumulate and commit at plan completion.
|
|
37
37
|
Never combine more than one logical unit of work in a single commit.
|
|
38
38
|
4. Stop and wait for user feedback before continuing.
|
|
39
39
|
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
# Finish Feature Command
|
|
4
4
|
|
|
5
|
-
**Workflow:** Read → Explore → Design → Accessibility → Plan → Branch → Migrate → Write Tests → Implement → Lint → Verify Tests → Security → Performance → Review → **
|
|
5
|
+
**Workflow:** Read → Explore → Design → Accessibility → Plan → Branch → Migrate → Write Tests → Implement → Lint → Verify Tests → Security → Performance → Review → E2E Tests → **Finish** → Sync Features
|
|
6
6
|
|
|
7
7
|
Finalize a feature/bug-fix branch: changelog, arch log, security gate, verification, and PR creation.
|
|
8
8
|
|
|
9
|
-
This is the **last step before `/release`**. It auto-commits documentation changes (changelog, arch log) so you don't need to loop back to `/commit` for docs-only work.
|
|
9
|
+
This is the **last step before `/sk:release`**. It auto-commits documentation changes (changelog, arch log) so you don't need to loop back to `/sk:smart-commit` for docs-only work.
|
|
10
10
|
|
|
11
11
|
## Before You Start
|
|
12
12
|
|
|
@@ -16,7 +16,7 @@ before marking the feature done. This is the last gate before merge — catch re
|
|
|
16
16
|
mistakes here rather than in review.
|
|
17
17
|
|
|
18
18
|
If `tasks/security-findings.md` exists, read it. Check that any Critical or High
|
|
19
|
-
severity findings from the most recent `/security-check` audit have been addressed.
|
|
19
|
+
severity findings from the most recent `/sk:security-check` audit have been addressed.
|
|
20
20
|
If unresolved Critical/High findings remain, warn the user before proceeding.
|
|
21
21
|
|
|
22
22
|
## Steps
|
|
@@ -69,7 +69,7 @@ If unresolved Critical/High findings remain, warn the user before proceeding.
|
|
|
69
69
|
- Migration/Compatibility: Any breaking changes?
|
|
70
70
|
- Verify the auto-filled sections (Summary, Type, What Changed, Impact)
|
|
71
71
|
|
|
72
|
-
c) **Auto-commit the arch log** (no need to go back to `/commit`):
|
|
72
|
+
c) **Auto-commit the arch log** (no need to go back to `/sk:smart-commit`):
|
|
73
73
|
```bash
|
|
74
74
|
git add .claude/docs/architectural_change_log/
|
|
75
75
|
git commit -m "docs: add architectural changelog entry"
|
|
@@ -79,7 +79,7 @@ If unresolved Critical/High findings remain, warn the user before proceeding.
|
|
|
79
79
|
|
|
80
80
|
5. **Verification** (with Test Checklist for Reviewers)
|
|
81
81
|
|
|
82
|
-
Tests should have been created during `/execute-plan`. Verify:
|
|
82
|
+
Tests should have been created during `/sk:execute-plan`. Verify:
|
|
83
83
|
|
|
84
84
|
a) **Automated Tests**
|
|
85
85
|
- Execute: `[TEST_COMMAND]`
|
|
@@ -108,7 +108,7 @@ If unresolved Critical/High findings remain, warn the user before proceeding.
|
|
|
108
108
|
- Follows [LANGUAGE] conventions and style guide (see `CLAUDE.md`)
|
|
109
109
|
|
|
110
110
|
6. **Security Gate**
|
|
111
|
-
- Read `tasks/security-findings.md`. If it doesn't exist or has no audit for this branch, recommend: "Run `/security-check` before creating a PR."
|
|
111
|
+
- Read `tasks/security-findings.md`. If it doesn't exist or has no audit for this branch, recommend: "Run `/sk:security-check` before creating a PR."
|
|
112
112
|
- If the most recent audit has unresolved Critical or High findings, list them and ask the user to confirm they've been addressed before proceeding.
|
|
113
113
|
|
|
114
114
|
7. **Create Pull Request**
|
|
@@ -126,7 +126,7 @@ If unresolved Critical/High findings remain, warn the user before proceeding.
|
|
|
126
126
|
|
|
127
127
|
c) **Generate PR title and body:**
|
|
128
128
|
- Title: Short, imperative, under 70 characters
|
|
129
|
-
- Body: Summary of changes, review findings (if any from `/review`), test status
|
|
129
|
+
- Body: Summary of changes, review findings (if any from `/sk:review`), test status
|
|
130
130
|
|
|
131
131
|
d) **Create PR:**
|
|
132
132
|
```bash
|
|
@@ -152,4 +152,4 @@ EOF
|
|
|
152
152
|
|
|
153
153
|
## When Done
|
|
154
154
|
|
|
155
|
-
> "Feature finalized and PR created! Run `/release` when ready to tag and publish."
|
|
155
|
+
> "Feature finalized and PR created! Run `/sk:release` when ready to tag and publish."
|
|
@@ -6,7 +6,7 @@ description: "Audit changed code for security best practices, production-grade q
|
|
|
6
6
|
|
|
7
7
|
# /security-check
|
|
8
8
|
|
|
9
|
-
**Workflow:** Read → Explore → Design → Accessibility → Plan → Branch → Migrate → Write Tests → Implement → Lint → Verify Tests → **Security** → Performance → Review →
|
|
9
|
+
**Workflow:** Read → Explore → Design → Accessibility → Plan → Branch → Migrate → Write Tests → Implement → Lint → Verify Tests → **Security** → Performance → Review → E2E Tests → Finish → Sync Features
|
|
10
10
|
|
|
11
11
|
Audit code for security vulnerabilities, production-grade quality, and industry gold-standard compliance.
|
|
12
12
|
|
|
@@ -164,9 +164,9 @@ Tell the user:
|
|
|
164
164
|
> "Security audit complete. Findings saved to `tasks/security-findings.md`.
|
|
165
165
|
> - **Critical:** N | **High:** N | **Medium:** N | **Low:** N
|
|
166
166
|
>
|
|
167
|
-
> Review the findings, then run `/finish-feature` when ready to finalize."
|
|
167
|
+
> Review the findings, then run `/sk:finish-feature` when ready to finalize."
|
|
168
168
|
|
|
169
169
|
If there are Critical or High findings:
|
|
170
|
-
> "There are critical/high findings that should be addressed before merging. Fix them, then re-run `/security-check` to verify."
|
|
170
|
+
> "There are critical/high findings that should be addressed before merging. Fix them, then re-run `/sk:security-check` to verify."
|
|
171
171
|
|
|
172
172
|
**Do not auto-fix.** The user decides what to address.
|
|
@@ -6,7 +6,7 @@ description: "Write a decision-complete plan into tasks/todo.md (no code yet)."
|
|
|
6
6
|
|
|
7
7
|
# /write-plan
|
|
8
8
|
|
|
9
|
-
**Workflow:** Read → Explore → Design → Accessibility → **Plan** → Branch → Migrate → Write Tests → Implement → Lint → Verify Tests → Security → Performance → Review →
|
|
9
|
+
**Workflow:** Read → Explore → Design → Accessibility → **Plan** → Branch → Migrate → Write Tests → Implement → Lint → Verify Tests → Security → Performance → Review → E2E Tests → Finish → Sync Features
|
|
10
10
|
|
|
11
11
|
Create a decision-complete plan **before** writing code.
|
|
12
12
|
|
|
@@ -7,25 +7,28 @@
|
|
|
7
7
|
|---|------|--------|-------|
|
|
8
8
|
| 1 | Read Todo | >> next << | |
|
|
9
9
|
| 2 | Read Lessons | not yet | |
|
|
10
|
-
| 3 | Explore (`/brainstorm`) | not yet | |
|
|
11
|
-
| 4 | Design (`/frontend-design` or `/api-design`) | not yet | optional |
|
|
12
|
-
| 5 | Accessibility (`/accessibility`) | not yet | optional |
|
|
13
|
-
| 6 | Plan (`/write-plan`) | not yet | |
|
|
14
|
-
| 7 | Branch (`/branch`) | not yet | |
|
|
15
|
-
| 8 | Migrate (`/schema-migrate`) | not yet | optional |
|
|
16
|
-
| 9 | Write Tests (`/write-tests`) | not yet | |
|
|
17
|
-
| 10 | Implement (`/execute-plan`) | not yet | |
|
|
18
|
-
| 11 | Commit (`/smart-commit`) | not yet | |
|
|
19
|
-
| 12 | **Lint** (`/lint`) | not yet | HARD GATE — loop until clean |
|
|
20
|
-
| 13 | Commit (`/smart-commit`) | not yet | conditional |
|
|
21
|
-
| 14 | **Verify Tests** (`/test`) | not yet | HARD GATE — 100% coverage |
|
|
22
|
-
| 15 | Commit (`/smart-commit`) | not yet | conditional |
|
|
23
|
-
| 16 | **Security** (`/security-check`) | not yet | HARD GATE — 0 issues |
|
|
24
|
-
| 17 | Commit (`/smart-commit`) | not yet | conditional |
|
|
25
|
-
| 18 | Performance (`/perf`) | not yet | optional gate |
|
|
26
|
-
| 19 | Commit (`/smart-commit`) | not yet | conditional |
|
|
27
|
-
| 20 | **Review** (`/review`) | not yet | HARD GATE — 0 issues |
|
|
28
|
-
| 21 | Commit (`/smart-commit`) | not yet | conditional |
|
|
29
|
-
| 22 |
|
|
30
|
-
| 23 |
|
|
31
|
-
| 24 |
|
|
10
|
+
| 3 | Explore (`/sk:brainstorm`) | not yet | |
|
|
11
|
+
| 4 | Design (`/sk:frontend-design` or `/sk:api-design`) | not yet | optional |
|
|
12
|
+
| 5 | Accessibility (`/sk:accessibility`) | not yet | optional |
|
|
13
|
+
| 6 | Plan (`/sk:write-plan`) | not yet | |
|
|
14
|
+
| 7 | Branch (`/sk:branch`) | not yet | |
|
|
15
|
+
| 8 | Migrate (`/sk:schema-migrate`) | not yet | optional |
|
|
16
|
+
| 9 | Write Tests (`/sk:write-tests`) | not yet | |
|
|
17
|
+
| 10 | Implement (`/sk:execute-plan`) | not yet | |
|
|
18
|
+
| 11 | Commit (`/sk:smart-commit`) | not yet | |
|
|
19
|
+
| 12 | **Lint + Dep Audit** (`/sk:lint`) | not yet | HARD GATE — loop until clean |
|
|
20
|
+
| 13 | Commit (`/sk:smart-commit`) | not yet | conditional |
|
|
21
|
+
| 14 | **Verify Tests** (`/sk:test`) | not yet | HARD GATE — 100% coverage |
|
|
22
|
+
| 15 | Commit (`/sk:smart-commit`) | not yet | conditional |
|
|
23
|
+
| 16 | **Security** (`/sk:security-check`) | not yet | HARD GATE — 0 issues |
|
|
24
|
+
| 17 | Commit (`/sk:smart-commit`) | not yet | conditional |
|
|
25
|
+
| 18 | Performance (`/sk:perf`) | not yet | optional gate |
|
|
26
|
+
| 19 | Commit (`/sk:smart-commit`) | not yet | conditional |
|
|
27
|
+
| 20 | **Review + Simplify** (`/sk:review`) | not yet | HARD GATE — 0 issues |
|
|
28
|
+
| 21 | Commit (`/sk:smart-commit`) | not yet | conditional |
|
|
29
|
+
| 22 | **E2E** (`/sk:e2e`) | not yet | HARD GATE — all E2E scenarios must pass |
|
|
30
|
+
| 23 | Commit (`/sk:smart-commit`) | not yet | conditional — skip if E2E was clean |
|
|
31
|
+
| 24 | Update (`/sk:update-task`) | not yet | |
|
|
32
|
+
| 25 | Finalize (`/sk:finish-feature`) | not yet | |
|
|
33
|
+
| 26 | Sync Features (`/sk:features`) | not yet | required — sync feature specs after ship |
|
|
34
|
+
| 27 | Release (`/sk:release`) | not yet | optional |
|
|
@@ -43,7 +43,7 @@ Before making any changes, runs a diagnostic pass on the existing CLAUDE.md:
|
|
|
43
43
|
- **Stale content** — detects outdated info (stale model/route counts, removed dependencies, old command names like `/laravel-lint` instead of `/sk:lint`)
|
|
44
44
|
- **Inconsistencies** — compares documented vs actual project state (directories, scripts, workflows)
|
|
45
45
|
- **Section completeness** — flags sections that exist but are empty or have only placeholder text
|
|
46
|
-
- **Outdated workflow** — checks if the workflow matches the current
|
|
46
|
+
- **Outdated workflow** — checks if the workflow matches the current 27-step TDD flow with hard gates
|
|
47
47
|
|
|
48
48
|
Reports findings before proceeding. If issues are found, they inform subsequent steps.
|
|
49
49
|
|
|
@@ -51,15 +51,15 @@ Reports findings before proceeding. If issues are found, they inform subsequent
|
|
|
51
51
|
|
|
52
52
|
If the workflow section is outdated or missing, replace it with the latest version:
|
|
53
53
|
|
|
54
|
-
**Current workflow (
|
|
54
|
+
**Current workflow (27 steps, TDD with hard gates):**
|
|
55
55
|
```
|
|
56
|
-
Read → Explore → Design → Accessibility → Plan → Branch → Migrate → Write Tests → Implement → Lint → Verify Tests → Security → Performance → Review → Finish
|
|
56
|
+
Read → Explore → Design → Accessibility → Plan → Branch → Migrate → Write Tests → Implement → Lint → Verify Tests → Security → Performance → Review → E2E Tests → Finish → Sync Features
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
**What gets updated:**
|
|
60
|
-
- Workflow table (
|
|
60
|
+
- Workflow table (27 steps with correct commands: `/sk:write-tests`, `/sk:lint`, `/sk:test`, `/sk:accessibility`, `/sk:perf`, `/sk:e2e`)
|
|
61
61
|
- Step details (TDD red/green/verify descriptions)
|
|
62
|
-
- Tracker rules (hard gates at 12, 14, 16, 20; optional steps 4, 5,
|
|
62
|
+
- Tracker rules (hard gates at 12, 14, 16, 20, 22; optional steps 4, 5, 8, 18, 27)
|
|
63
63
|
- Step completion summary rule (NON-NEGOTIABLE)
|
|
64
64
|
- Bug fix flow section
|
|
65
65
|
- Sub-Agent Patterns section (if missing)
|
|
@@ -67,6 +67,8 @@ Read → Explore → Design → Accessibility → Plan → Branch → Migrate
|
|
|
67
67
|
- Lessons Capture section (if missing)
|
|
68
68
|
- Testing TDD section (if missing)
|
|
69
69
|
- 3-Strike Protocol (if missing)
|
|
70
|
+
- Fix & Retest Protocol section (if missing)
|
|
71
|
+
- Requirement Change Flow section (if missing)
|
|
70
72
|
|
|
71
73
|
**What gets preserved:**
|
|
72
74
|
- Everything marked with `<!-- LOCK -->` is never touched
|
package/skills/sk:test/SKILL.md
CHANGED
|
@@ -154,6 +154,23 @@ All detected suites pass with 100% coverage on new code. Both lines of the repor
|
|
|
154
154
|
|
|
155
155
|
---
|
|
156
156
|
|
|
157
|
+
## Fix & Retest Protocol
|
|
158
|
+
|
|
159
|
+
When a test failure requires an implementation fix, classify the fix before committing:
|
|
160
|
+
|
|
161
|
+
**a. Bug fix — same behavior contract** (the code was wrong, the test expectation was right) → fix the implementation, re-run `/sk:test`. No test update needed.
|
|
162
|
+
|
|
163
|
+
**b. Logic change** (new behavior, changed data contract, modified function signature, new code path) → trigger protocol:
|
|
164
|
+
1. Update or add failing unit tests to reflect the new behavior (RED first)
|
|
165
|
+
2. Fix the implementation to make the updated tests pass (GREEN)
|
|
166
|
+
3. Re-run `/sk:test` — must pass at 100% coverage
|
|
167
|
+
4. Commit (tests + fix together in one commit)
|
|
168
|
+
5. Re-run the gate that triggered this fix (Security, Performance, Review, or E2E)
|
|
169
|
+
|
|
170
|
+
**Why this matters:** quality gates (Security, Performance, Review, E2E) run after tests pass. If those gates require logic fixes, tests can become stale. This protocol ensures tests always reflect the actual implementation.
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
157
174
|
## Model Routing
|
|
158
175
|
|
|
159
176
|
Read `.shipkit/config.json` from the project root if it exists.
|