@kennethsolomon/shipkit 3.0.6 → 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 +31 -25
- package/commands/sk/help.md +1 -1
- package/commands/sk/security-check.md +14 -0
- package/package.json +1 -1
- package/skills/sk:e2e/SKILL.md +147 -0
- package/skills/sk:frontend-design/SKILL.md +10 -4
- 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/SKILL.md +0 -1
- 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/commands/sk/features.md +0 -238
- package/commands/sk/release.md +0 -72
- package/skills/sk:setup-claude/templates/commands/features.md.template +0 -238
- package/skills/sk:setup-claude/templates/commands/release.md.template +0 -74
|
@@ -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
|
|
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.
|