@kennethsolomon/shipkit 3.5.0 → 3.7.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 CHANGED
@@ -93,21 +93,15 @@ Brainstorm → Plan → Branch → [Schema] → Write Tests → Implement → Co
93
93
  | 10 | `/sk:execute-plan` | TDD green: make tests pass |
94
94
  | 11 | `/sk:smart-commit` | Conventional commit |
95
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 + Blast Radius 0 issues including nitpicks |
104
- | 21 | `/sk:smart-commit` | Auto-skip if already clean |
105
- | 22 | **`/sk:e2e`** | **GATE** — E2E Tests — prefers Playwright CLI when config detected, falls back to agent-browser; all scenarios 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)* |
96
+ | 13 | **`/sk:test`** | **GATE** 100% coverage on new code |
97
+ | 14 | **`/sk:security-check`** | **GATE** — 0 issues |
98
+ | 15 | **`/sk:perf`** | **GATE** *(optional)* critical/high findings = 0 |
99
+ | 16 | **`/sk:review`** | **GATE** — Review + Simplify + Blast Radius — 0 issues including nitpicks |
100
+ | 17 | **`/sk:e2e`** | **GATE** — E2E Tests — prefers Playwright CLI when config detected, falls back to agent-browser; all scenarios must pass |
101
+ | 18 | `/sk:update-task` | Mark done, log completion |
102
+ | 19 | `/sk:finish-feature` | Changelog + PR |
103
+ | 20 | `/sk:features` | Sync Featuresupdate docs/features/ specs *(required)* |
104
+ | 21 | `/sk:release` | Version bump + tag *(optional)* |
111
105
 
112
106
  > **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.
113
107
 
@@ -244,6 +238,7 @@ Requirement changes → /sk:change → re-enter at correct step
244
238
  | `/sk:help` | Show all commands and workflow overview |
245
239
  | `/sk:status` | Show workflow and task status at a glance |
246
240
  | `/sk:dashboard` | Read-only workflow Kanban board — localhost server, multi-worktree |
241
+ | `/sk:context` | Load all context files + output session brief for fast session start |
247
242
  | `/sk:skill-creator` | Create or improve ShipKit skills |
248
243
 
249
244
  ---
@@ -12,7 +12,15 @@ By default, this checks only files changed on the current branch. Use `--all` to
12
12
 
13
13
  ## Hard Rules
14
14
 
15
- - **DO NOT fix code.** This is an audit report only. The user decides what to fix.
15
+ - **Fix all in-scope findings** (files in `git diff main..HEAD --name-only`) immediately after the audit. auto-commit with `fix(security): resolve [severity] security findings`. Re-run the audit until 0 findings remain.
16
+ - **Pre-existing findings** (files outside the current branch diff): log to `tasks/tech-debt.md` using this format — do NOT fix inline:
17
+ ```
18
+ ### [YYYY-MM-DD] Found during: sk:security-check
19
+ File: path/to/file.ext:line
20
+ Issue: description of the vulnerability
21
+ Severity: critical | high | medium | low
22
+ ```
23
+ - **Gates own their commits** — the fix-commit-rerun loop is fully internal. No manual commit step needed after this gate.
16
24
  - **DO NOT skip checks** because the project is small or simple. Production is production.
17
25
  - **Every finding must cite a specific file and line number.**
18
26
  - **Every finding must reference the standard it violates** (OWASP, CWE, NIST, etc.).
@@ -165,13 +173,11 @@ Tell the user:
165
173
  > "Security audit complete. Findings saved to `tasks/security-findings.md`.
166
174
  > - **Critical:** N open (N resolved) | **High:** N open (N resolved) | **Medium:** N open | **Low:** N open
167
175
  >
168
- > Review the findings, then run `/sk:finish-feature` when ready to finalize."
176
+ > All in-scope findings have been fixed and committed. Pre-existing issues logged to `tasks/tech-debt.md`."
169
177
 
170
178
  If there are Critical or High findings:
171
179
  > "There are critical/high findings that MUST be fixed before merging. These are HARD GATE items — `- [ ]` findings block all forward progress. Fix them, then re-run `/sk:security-check` to verify."
172
180
 
173
- **Do not auto-fix.** The user decides what to address.
174
-
175
181
  ### Fix & Retest Protocol
176
182
 
177
183
  When applying a fix, classify it before committing:
@@ -16,6 +16,15 @@ Mark the current task as complete and log progress.
16
16
  - In `tasks/todo.md`, change the task's checkbox from `[ ]` to `[x]`
17
17
  - If the task has subtasks, verify all subtasks are also checked
18
18
 
19
+ ### 2.5. Mark Resolved Tech Debt
20
+
21
+ - Read `tasks/tech-debt.md` if it exists
22
+ - Find any unresolved entries (entries with no `Resolved:` line) whose `File:` or `Issue:` description relates to files or features changed in the current task (cross-reference with `tasks/todo.md` plan and current branch diff via `git diff main..HEAD --name-only`)
23
+ - For each matched entry, append this line directly after the entry's `Severity:` line:
24
+ `Resolved: [YYYY-MM-DD] — [current branch name]`
25
+ - Never delete entries — only append the `Resolved:` line
26
+ - If `tasks/tech-debt.md` doesn't exist or no matches found: skip silently
27
+
19
28
  ### 3. Log Completion
20
29
  - Append a completion entry to `tasks/progress.md`:
21
30
 
@@ -19,6 +19,11 @@ Create a decision-complete plan **before** writing code.
19
19
  constraints, and open questions explicitly into the plan
20
20
  - `tasks/lessons.md` — if it exists, apply all active lessons as constraints
21
21
  before writing any plan steps
22
+ - `tasks/tech-debt.md` — if it exists, filter to entries with no `Resolved:` line (unresolved only).
23
+ If any unresolved items exist, after presenting the draft plan ask:
24
+ > "There are N unresolved tech debt items in `tasks/tech-debt.md`. Should any be included in this task?"
25
+ List the unresolved items (file, issue, severity). If the user says yes, add them as tasks in the plan before final approval.
26
+ If the file doesn't exist or has 0 unresolved entries, skip silently.
22
27
  3. Update `tasks/todo.md` with:
23
28
  - **Goal** (1–2 lines)
24
29
  - **Milestones** — group tasks under milestone headers for multi-phase projects
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kennethsolomon/shipkit",
3
- "version": "3.5.0",
3
+ "version": "3.7.0",
4
4
  "description": "A structured workflow toolkit for Claude Code.",
5
5
  "keywords": [
6
6
  "claude",
@@ -32,6 +32,7 @@ You MUST create a task for each of these items and complete them in order:
32
32
  - Key decisions made
33
33
  - Chosen approach + rationale
34
34
  - Open questions (if any remain)
35
+ Additionally, **append** an ADR entry to `docs/decisions.md` (see "Decisions Log" section below).
35
36
  (Optionally also write a full design doc to docs/plans/YYYY-MM-DD-<topic>-design.md)
36
37
  6. **Transition to implementation** — invoke writing-plans skill to create implementation plan
37
38
 
@@ -89,13 +90,49 @@ digraph brainstorming {
89
90
 
90
91
  **Documentation:**
91
92
  - Write the findings to `tasks/findings.md` (required — captures problem, decisions, approach, rationale)
93
+ - Append an ADR entry to `docs/decisions.md` (required — see "Decisions Log" section below)
92
94
  - Optionally: Create a full design doc at `docs/plans/YYYY-MM-DD-<topic>-design.md` for complex projects
93
- - Commit the findings and any design document to git
95
+ - Commit the findings, decisions log entry, and any design document to git
94
96
 
95
97
  **Implementation:**
96
98
  - Invoke the writing-plans skill to create a detailed implementation plan
97
99
  - Do NOT invoke any other skill. writing-plans is the next step.
98
100
 
101
+ ## Decisions Log
102
+
103
+ After writing findings to `tasks/findings.md`, also **append** an Architecture Decision Record (ADR) entry to `docs/decisions.md`. This file is **cumulative and append-only** — never overwrite or remove existing entries.
104
+
105
+ ### If `docs/decisions.md` does not exist
106
+
107
+ Create it with this header before the first entry:
108
+
109
+ ```markdown
110
+ # Architecture Decision Records
111
+
112
+ A cumulative log of key design decisions made across features. Append-only — never overwrite.
113
+ ```
114
+
115
+ ### ADR Entry Format
116
+
117
+ Append this template for each brainstorm decision:
118
+
119
+ ```markdown
120
+ ## [YYYY-MM-DD] [Feature/Task Name]
121
+
122
+ **Context:** [problem being solved — 1-2 sentences]
123
+ **Decision:** [chosen approach — 1 sentence]
124
+ **Rationale:** [why this approach over alternatives]
125
+ **Consequences:** [trade-offs accepted]
126
+ **Status:** accepted
127
+ ```
128
+
129
+ ### Rules
130
+
131
+ - **Append-only** — never edit or delete existing entries in `docs/decisions.md`
132
+ - **One entry per brainstorm** — each completed brainstorm adds exactly one ADR entry
133
+ - **Use absolute dates** — always `YYYY-MM-DD`, never relative dates
134
+ - Entries accumulate across features — this is a project-level historical record
135
+
99
136
  ## Key Principles
100
137
 
101
138
  - **One question at a time** - Don't overwhelm with multiple questions
@@ -0,0 +1,121 @@
1
+ ---
2
+ name: sk:context
3
+ description: "Session initializer — loads all project context files and outputs a formatted session brief. Run this at the start of every conversation to orient the AI and yourself."
4
+ ---
5
+
6
+ # /sk:context — Session Brief + Context Loader
7
+
8
+ Load all project context files into the conversation and output a formatted session brief. Designed to be run at the **start of every session** for instant orientation.
9
+
10
+ ## What It Does
11
+
12
+ 1. **Reads** all context files (listed below) to load project state into the conversation
13
+ 2. **Outputs** a formatted SESSION BRIEF the user can read at a glance
14
+ 3. **Applies** all active lessons from `tasks/lessons.md` as standing constraints for the session
15
+
16
+ ## Hard Rules
17
+
18
+ - **Read-only.** This skill does not modify any files.
19
+ - **Graceful fallback.** Missing files are noted in the brief, not treated as errors.
20
+ - **No questions.** This skill runs silently — it does not ask the user anything.
21
+
22
+ ---
23
+
24
+ ## Files to Read (in order)
25
+
26
+ | # | File | What to Extract |
27
+ |---|------|-----------------|
28
+ | 1 | `tasks/todo.md` | Task name (from `# TODO —` heading), milestone progress, count of `- [x]` (done) vs `- [ ]` (pending) checkboxes |
29
+ | 2 | `tasks/workflow-status.md` | Current step (row with `>> next <<`), step name, command to run |
30
+ | 3 | `tasks/progress.md` | Last 5 entries only (most recent work). If file is large, read only the last 50 lines. |
31
+ | 4 | `tasks/findings.md` | Current decisions, chosen approach, open questions |
32
+ | 5 | `tasks/lessons.md` | All active lessons — read in full, apply as constraints for this session |
33
+ | 6 | `docs/decisions.md` | If exists: last 3 ADR entries. If missing: note "no decisions log yet" |
34
+ | 7 | `docs/vision.md` | If exists: product name + value proposition. If missing: note "no vision.md found" |
35
+ | 8 | `tasks/tech-debt.md` | If exists: count entries with no `Resolved:` line (unresolved), highest severity among unresolved |
36
+
37
+ ### Reading Strategy
38
+
39
+ - Read files 1-5 first (these are the core context).
40
+ - Files 6-7 are optional — check if they exist before reading.
41
+ - For `tasks/progress.md`: only read the last 50 lines to avoid loading a huge file.
42
+ - If `tasks/todo.md` is missing: the project has no active task.
43
+ - If `tasks/workflow-status.md` is missing: the workflow hasn't started.
44
+
45
+ ---
46
+
47
+ ## Output Format
48
+
49
+ After reading all files, output this session brief:
50
+
51
+ ```
52
+ ╔══════════════════════════════════════════╗
53
+ ║ SESSION BRIEF ║
54
+ ╚══════════════════════════════════════════╝
55
+ Branch: [current git branch]
56
+ Task: [task name from todo.md, or "No active task"]
57
+ Step: [step #] [step name] → run `/sk:[command]`
58
+ Last done: [last progress.md entry summary, 1 line]
59
+ Pending: [N] checkboxes remaining in todo.md
60
+ Lessons: [count] active — [most critical 1-liner from lessons.md]
61
+ Open Qs: [open questions from findings.md, or "none"]
62
+ Tech Debt: [N] unresolved — highest: [severity] ([file:line])
63
+ Product: [value prop from vision.md, or "no vision.md found"]
64
+ ════════════════════════════════════════════
65
+ ```
66
+
67
+ ### Field Rules
68
+
69
+ - **Branch:** Run `git branch --show-current` to get the current branch name.
70
+ - **Task:** Extract from the first `# TODO —` line in `tasks/todo.md`. If the file doesn't exist or all checkboxes are done, show "No active task — ready to start fresh".
71
+ - **Step:** Find the row containing `>> next <<` in `tasks/workflow-status.md`. Extract step number, name, and command. If no `>> next <<` found, show "Workflow complete" or "Not started".
72
+ - **Last done:** The most recent entry from `tasks/progress.md`. Summarize in one line.
73
+ - **Pending:** Count `- [ ]` lines in `tasks/todo.md`. Stop counting at the first `## Verification`, `## Acceptance Criteria`, or `## Risks` heading (these are meta-sections, not tasks).
74
+ - **Lessons:** Count `### [` headings in `tasks/lessons.md` (each lesson starts with `### [YYYY-MM-DD]`). Show the count + the **Prevention:** line from the most recent lesson.
75
+ - **Open Qs:** Check for an "## Open Questions" section in `tasks/findings.md`. List them or say "none".
76
+ - **Tech Debt:** Read `tasks/tech-debt.md` if it exists. Count entries that have no `Resolved:` line — each entry starts with `### [`. For unresolved entries, find the highest severity. Show `N unresolved — highest: [severity] ([file])`. If file missing or 0 unresolved, show `none`.
77
+ - **Product:** From `docs/vision.md`, extract the value proposition. If file doesn't exist, say "no vision.md found".
78
+
79
+ ---
80
+
81
+ ## After the Brief
82
+
83
+ After outputting the session brief:
84
+
85
+ 1. **State the active lessons** that apply as constraints. List each prevention rule as a bullet.
86
+ 2. **State what's next** — tell the user the next step and the command to run.
87
+ 3. If the user has a specific request, proceed with it (the context is now loaded).
88
+
89
+ ---
90
+
91
+ ## Edge Cases
92
+
93
+ | Scenario | Behavior |
94
+ |----------|----------|
95
+ | No `tasks/todo.md` | Show "No active task — ready to start fresh" |
96
+ | No `tasks/workflow-status.md` | Show "Workflow not started" for Step field |
97
+ | No `tasks/progress.md` | Show "No progress logged yet" for Last done |
98
+ | No `tasks/findings.md` | Show "none" for Open Qs |
99
+ | No `tasks/lessons.md` | Show "0 active" for Lessons |
100
+ | No `docs/decisions.md` | Show "no decisions log yet" — do not error |
101
+ | No `docs/vision.md` | Show "no vision.md found" — do not error |
102
+ | No `tasks/tech-debt.md` | Show "none" for Tech Debt field — do not error |
103
+ | All checkboxes done in todo.md | Show "Task complete — 0 pending" |
104
+
105
+ ---
106
+
107
+ ## Model Routing
108
+
109
+ Read `.shipkit/config.json` from the project root if it exists.
110
+
111
+ - If `model_overrides["sk:context"]` is set, use that model — it takes precedence.
112
+ - Otherwise use the `profile` field. Default: `balanced`.
113
+
114
+ | Profile | Model |
115
+ |---------|-------|
116
+ | `full-sail` | sonnet |
117
+ | `quality` | sonnet |
118
+ | `balanced` | sonnet |
119
+ | `budget` | haiku |
120
+
121
+ > This skill is lightweight (read-only file operations + brief output). Sonnet is sufficient for all quality profiles. Haiku for budget.
@@ -184,22 +184,39 @@ If any fail → apply Fix & Retest Protocol.
184
184
 
185
185
  When this gate requires a fix, classify it before committing:
186
186
 
187
- **a. Style/config/wording change** (CSS tweak, copy change, selector fix) → commit and re-run `/sk:e2e` (no unit test update needed)
187
+ **a. Style/config/wording change** (CSS tweak, copy change, selector fix) → auto-commit with `fix(e2e): resolve failing E2E scenarios` and re-run `/sk:e2e`. Do not ask the user.
188
188
 
189
189
  **b. Logic change** (new branch, modified condition, new data path, query change, new function, API change) → trigger protocol:
190
190
  1. Update or add failing unit tests for the new behavior
191
191
  2. Re-run `/sk:test` — must pass at 100% coverage
192
- 3. Commit (tests + fix together in one commit)
192
+ 3. Auto-commit tests + fix together with `fix(e2e): [description]`.
193
193
  4. Re-run `/sk:e2e` from scratch
194
194
 
195
195
  **Exception:** Formatter auto-fixes are never logic changes — bypass protocol automatically.
196
196
 
197
+ Gates own their commits — the fix-commit-rerun loop is fully internal. No manual commit step needed after this gate.
198
+
197
199
  **This gate cannot be skipped.** All scenarios must pass before proceeding to `/sk:update-task`.
198
200
 
201
+ ### Pre-existing Issues
202
+
203
+ If during E2E testing a bug is found in functionality **outside** the current feature being tested (pre-existing issue unrelated to this branch), do NOT fix it inline. Log it to `tasks/tech-debt.md`:
204
+
205
+ ```
206
+ ### [YYYY-MM-DD] Found during: sk:e2e
207
+ File: path/to/file.ext:line
208
+ Issue: description of the pre-existing bug
209
+ Severity: critical | high | medium | low
210
+ ```
211
+
212
+ Continue testing the current feature. Pre-existing bugs do not block this gate unless they affect the current feature's scenarios.
213
+
199
214
  ## Next Steps
200
215
 
201
216
  If all scenarios pass:
202
217
  > "E2E gate clean. Run `/sk:update-task` to mark the task done."
218
+ >
219
+ > No manual commit is needed — any fixes made during this gate were auto-committed.
203
220
 
204
221
  If failures remain after fixes:
205
222
  > "Re-running /sk:e2e — [N] scenarios still failing."
@@ -111,13 +111,20 @@ Only run this phase if:
111
111
  - The user answers **y** or **yes** to the prompt above, OR
112
112
  - The user invoked the skill with `--pencil`
113
113
 
114
- ### Step 1 — Find or create the .pen file
114
+ ### Step 1 — Derive the filename and open the .pen file
115
115
 
116
- Check `docs/design/` for an existing `.pen` file that matches this design (by name or topic).
116
+ Before opening any Pencil document:
117
117
 
118
- - **Existing file found**: call `open_document(filePath)` to open it, then skip to Step 3.
119
- - **No file found**: call `open_document('new')` to create a fresh canvas.
120
- - The file will be saved to `docs/design/{design-name}.pen` use a slug derived from the design subject (e.g., `docs/design/dashboard-analytics.pen`).
118
+ 1. Read `tasks/todo.md` and extract the task name from the first `# TODO` heading:
119
+ - Pattern: `# TODO YYYY-MM-DD <task-name>`
120
+ - Convert to kebab-case (e.g., `"Gate Auto-Commit + Tech Debt"` `gate-auto-commit-tech-debt`)
121
+ - If no `# TODO` heading exists, derive a slug from the design subject instead (e.g., `dashboard-analytics`)
122
+
123
+ 2. Target path: `docs/design/[task-name].pen`
124
+
125
+ 3. Call `open_document('docs/design/[task-name].pen')` — use the full path whether the file exists or not. The tool auto-detects existence: opens the file if it's already there, creates it on disk if not.
126
+
127
+ The `.pen` file is created at `docs/design/[task-name].pen` before any design work begins, ensuring the design is saved to disk and committable.
121
128
 
122
129
  ### Step 2 — Load design context
123
130
 
@@ -91,11 +91,30 @@ Skip stacks not present in the project.
91
91
  ### 6. Fix and Re-run
92
92
 
93
93
  If any analyzer reports errors or the dep audit blocks:
94
- 1. Fix all reported issues
94
+
95
+ **Before fixing, classify each issue by scope:**
96
+
97
+ - Run `git diff main..HEAD --name-only` to get the current branch diff.
98
+ - If the issue is in a file **not** in that list (pre-existing issue outside the current branch), do **not** fix it inline. Log it to `tasks/tech-debt.md` in this format and move on:
99
+
100
+ ```
101
+ ### [YYYY-MM-DD] Found during: sk:lint
102
+ File: path/to/file.ext:line
103
+ Issue: description of the problem
104
+ Severity: high | medium | low
105
+ ```
106
+
107
+ - If the issue is in a file **in** the branch diff (in-scope), fix it.
108
+
109
+ **Fix loop (in-scope issues only):**
110
+ 1. Fix all in-scope issues
95
111
  2. Re-run formatters (fixes may need formatting)
96
112
  3. Re-launch all analyzers in parallel
97
113
  4. Re-run dep audit if any dependency was fixed
98
- 5. Loop until every tool exits clean
114
+ 5. Auto-commit with message `fix(lint): resolve lint and dep audit issues` — do NOT ask the user
115
+ 6. Re-run from step 3 until every tool exits clean
116
+
117
+ > Gates own their commits — the fix-commit-rerun loop is fully internal. No manual commit step needed after this gate.
99
118
 
100
119
  ### 7. Report Results
101
120
 
@@ -125,20 +144,22 @@ Only include lines for detected tools. All must show "clean" before this skill p
125
144
 
126
145
  When this gate requires a fix, classify it before committing:
127
146
 
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.
147
+ **a. Formatter auto-fix** (Pint, Prettier, gofmt, cargo fmt changed whitespace/style) → auto-commit and re-run `/sk:lint`. Never a logic change — bypass protocol.
129
148
 
130
149
  **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
150
+ - Type annotation, import order, unused var, style rule → **style fix** → auto-commit and re-run
132
151
  - New guard clause, changed condition, extracted function, modified data flow → **logic change** → trigger protocol:
133
152
  1. Update or add failing unit tests for the new behavior
134
153
  2. Re-run `/sk:test` — must pass at 100% coverage
135
- 3. Commit (tests + fix together in one commit)
154
+ 3. Auto-commit (tests + fix together in one commit)
136
155
  4. Re-run `/sk:lint` from scratch
137
156
 
138
157
  **c. Dependency vulnerability fix** (composer audit / npm audit finding) → classify:
139
- - Version bump with no API change → **style fix** → commit and re-run
158
+ - Version bump with no API change → **style fix** → auto-commit and re-run
140
159
  - Version bump with API/behavior change → **logic change** → trigger protocol
141
160
 
161
+ All commits in this protocol are automatic — do not prompt the user for commit approval.
162
+
142
163
  ---
143
164
 
144
165
  ## Model Routing
@@ -215,7 +215,84 @@ Maximum 3 loop iterations. If issues persist after 3 loops, present remaining is
215
215
 
216
216
  ---
217
217
 
218
- ## Step 9 — Present the Output
218
+ ## Step 9 — Generate Project Context Docs
219
+
220
+ Generate 3 lightweight documentation files in `docs/` from information already gathered in Steps 1-2. No new questions — use the product name, value prop, audience, features, and tech stack already captured.
221
+
222
+ ### Files to Generate
223
+
224
+ **`docs/vision.md`**
225
+ ```markdown
226
+ # [Product Name]
227
+
228
+ ## Value Proposition
229
+ [One-line value prop from Step 1]
230
+
231
+ ## Target Audience
232
+ [Target audience from Step 1]
233
+
234
+ ## Key Features
235
+ [Bullet list of 3-5 features from Step 1]
236
+
237
+ ## North Star Metric
238
+ [Suggest one metric that measures core value — e.g., "weekly active waitlist signups" or "daily feature usage"]
239
+ ```
240
+
241
+ **`docs/prd.md`**
242
+ ```markdown
243
+ # PRD — [Product Name]
244
+
245
+ ## Overview
246
+ [1-2 sentence product description]
247
+
248
+ ## User Stories
249
+ [For each key feature from Step 1, write a user story: "As a [audience], I want to [feature] so that [benefit]"]
250
+
251
+ ## Feature Acceptance Criteria
252
+ [For each feature, list 2-3 concrete acceptance criteria]
253
+
254
+ ## Out of Scope (MVP)
255
+ - Real authentication
256
+ - Real database
257
+ - Third-party integrations
258
+ - Deployment
259
+ ```
260
+
261
+ **`docs/tech-design.md`**
262
+ ```markdown
263
+ # Tech Design — [Product Name]
264
+
265
+ ## Stack
266
+ - **Framework:** [chosen stack from Step 2]
267
+ - **Styling:** Tailwind CSS
268
+ - **Fonts:** [chosen fonts]
269
+
270
+ ## Project Structure
271
+ [List the key directories and files generated during scaffolding]
272
+
273
+ ## Component Map
274
+ ### Landing Page
275
+ [List all 9 sections and their components]
276
+
277
+ ### App Pages
278
+ [List each page and its key components]
279
+
280
+ ## Data Model
281
+ ### Waitlist
282
+ - email: string (validated)
283
+ - timestamp: ISO 8601 string
284
+
285
+ ### Fake Data Entities
286
+ [List the fake data structures used in the app]
287
+ ```
288
+
289
+ After generating the docs, output:
290
+ > **Context docs generated:** `docs/vision.md`, `docs/prd.md`, `docs/tech-design.md`
291
+ > These persist context for future sessions. Run `/sk:context` to load `docs/vision.md` into the session brief, or read the others directly.
292
+
293
+ ---
294
+
295
+ ## Step 10 — Present the Output
219
296
 
220
297
  Summarize what was generated:
221
298
 
@@ -1,18 +1,27 @@
1
1
  ---
2
2
  name: sk:perf
3
- description: Performance audit. Use before /sk:review to catch performance issues: bundle size, N+1 queries, slow DB queries, Core Web Vitals, memory leaks, caching opportunities. Auto-detects stack. Reports findings does NOT fix code.
3
+ description: Performance audit. Use before /sk:review to catch performance issues: bundle size, N+1 queries, slow DB queries, Core Web Vitals, memory leaks, caching opportunities. Auto-detects stack. Fixes critical/high in-scope findings and auto-commits. Logs pre-existing issues to tech-debt.
4
4
  license: Complete terms in LICENSE.txt
5
5
  ---
6
6
 
7
7
  ## Purpose
8
8
 
9
- Audit the implementation for performance issues before the final review. This is an audit skill — it identifies issues and produces a findings report. It does NOT fix code.
9
+ Audit the implementation for performance issues before the final review. This skill identifies issues, produces a findings report, fixes in-scope critical/high findings immediately, and auto-commits. Pre-existing findings outside the branch diff are logged to `tasks/tech-debt.md`.
10
10
 
11
11
  Run this skill after implementing and passing lint/tests, but before `/sk:review`.
12
12
 
13
13
  ## Hard Rules
14
14
 
15
- - **DO NOT fix code.** Report only. The user decides what to fix.
15
+ - **Fix all critical and high in-scope findings** (files in `git diff main..HEAD --name-only`) immediately after the audit. Auto-commit with `fix(perf): resolve [severity] performance findings`. Re-run the audit until critical/high = 0.
16
+ - **Medium/low in-scope findings:** fix them in the same commit if straightforward, otherwise log to `tasks/tech-debt.md`.
17
+ - **Pre-existing findings** (files outside the current branch diff): log to `tasks/tech-debt.md` using this format — do NOT fix inline:
18
+ ```
19
+ ### [YYYY-MM-DD] Found during: sk:perf
20
+ File: path/to/file.ext:line
21
+ Issue: description of the performance issue
22
+ Severity: critical | high | medium | low
23
+ ```
24
+ - **Gates own their commits** — the fix-commit-rerun loop is fully internal. No manual commit step needed after this gate.
16
25
  - **Every finding must cite a specific file and line number.**
17
26
  - **Every finding must include an estimated impact** (high/medium/low) and a recommendation.
18
27
  - **Auto-detect the stack** — only run checks relevant to what's present.
@@ -158,6 +167,8 @@ Write findings to `tasks/perf-findings.md`:
158
167
 
159
168
  **Never overwrite** `tasks/perf-findings.md` — append new audits with a date header.
160
169
 
170
+ The report is written first, then fixes are applied to in-scope critical/high findings.
171
+
161
172
  ## When Done
162
173
 
163
174
  Tell the user:
@@ -165,7 +176,7 @@ Tell the user:
165
176
  > "Performance audit complete. Findings saved to `tasks/perf-findings.md`.
166
177
  > - **Critical:** N | **High:** N | **Medium:** N | **Low:** N
167
178
  >
168
- > Address critical and high findings, then run `/sk:review` to proceed."
179
+ > All critical/high in-scope findings have been fixed and committed. Pre-existing issues logged to `tasks/tech-debt.md`. Run `/sk:review` to proceed."
169
180
 
170
181
  If there are no critical or high findings:
171
182
  > "No critical or high performance issues found. N medium/low findings noted in `tasks/perf-findings.md`. Run `/sk:review` to proceed."
@@ -33,7 +33,7 @@ Use `git diff main..HEAD --name-only` to identify the changed files, then run si
33
33
 
34
34
  If simplify makes any changes:
35
35
  1. Verify the changes are correct
36
- 2. Commit them with `/sk:smart-commit` before continuing the review
36
+ 2. Auto-commit them with message `fix(review): simplify pre-pass` before continuing the review. Do not ask the user.
37
37
  3. Note in the review report: "Simplify pre-pass: X files updated"
38
38
 
39
39
  If simplify makes no changes, proceed directly to step 1.
@@ -436,20 +436,28 @@ Format findings with severity levels and review dimensions:
436
436
  - Include a brief "What Looks Good" section (2-3 items) — acknowledge strong patterns so they're reinforced. This isn't cheerleading — it's calibrating signal.
437
437
  - If you genuinely find nothing wrong after all 7 dimensions, say so — but that's rare
438
438
 
439
- ### 11. Next Steps
439
+ ### 11. Fix and Re-run
440
440
 
441
- After presenting the review:
441
+ After presenting the review report, fix **all** findings regardless of severity (Critical, Warning, and Nitpick). Do not ask the user whether to fix nitpicks — fix everything.
442
442
 
443
- If there are **Critical** or **Warning** items:
444
- > "Review found issues that should be addressed. Fix them with `/sk:debug`, commit with `/sk:smart-commit`, then re-run `/sk:review` to verify."
443
+ **For each finding:**
444
+ - If the issue is in a file **within** the current branch diff (`git diff $BASE..HEAD --name-only`): fix it inline, include in the auto-commit
445
+ - If the issue is in a file **outside** the current branch diff (pre-existing issue found via blast-radius): log it to `tasks/tech-debt.md` — do NOT fix it inline:
446
+ ```
447
+ ### [YYYY-MM-DD] Found during: sk:review
448
+ File: path/to/file.ext:line
449
+ Issue: description of the problem
450
+ Severity: critical | high | medium | low
451
+ ```
445
452
 
446
- If there are only **Nitpick** items (no Critical/Warning):
447
- > "Review complete — no critical issues found, but there are some nitpicks. Would you like to fix them now, or proceed to `/sk:finish-feature`?"
453
+ After all in-scope fixes are applied: auto-commit with `fix(review): address review findings`. Do not ask the user. Re-run `/sk:review` from scratch.
448
454
 
449
- If the user wants to fix nitpicks, loop back to `/sk:debug` + `/sk:smart-commit` → `/sk:review`.
455
+ Loop until the review is completely clean (0 findings across all severities for in-scope code).
450
456
 
451
- If the review is **completely clean**:
452
- > "Review complete — no issues found. Run `/sk:finish-feature` to finalize the branch and create a PR."
457
+ When clean:
458
+ > "Review complete — 0 findings. Run `/sk:finish-feature` to finalize the branch and create a PR."
459
+
460
+ **Note:** Gates own their commits — the fix-commit-rerun loop is fully internal. No manual commit step needed after this gate.
453
461
 
454
462
  ### Fix & Retest Protocol
455
463
 
@@ -460,7 +468,7 @@ When applying a fix from this review, classify it before committing:
460
468
  **b. Logic change** (fix incorrect condition, add missing null check, change data flow, refactor algorithm, fix async bug) → trigger protocol:
461
469
  1. Update or add failing unit tests for the corrected behavior
462
470
  2. Re-run `/sk:test` — must pass at 100% coverage
463
- 3. Commit (tests + fix together in one commit)
471
+ 3. Auto-commit tests + fix together with `fix(review): [description]`.
464
472
  4. Re-run `/sk:review` from scratch
465
473
 
466
474
  **Why:** Review catches logic bugs. Fixing a logic bug without updating tests leaves the test suite asserting on the old (wrong) behavior.
@@ -24,6 +24,28 @@ guidance. Auto-detects the ORM from project files — no configuration needed.
24
24
 
25
25
  ---
26
26
 
27
+ ## Phase 0: Auto-Detect Migration Changes
28
+
29
+ Before doing anything else, check whether the current branch has any migration-related changes:
30
+
31
+ ```bash
32
+ git diff main..HEAD --name-only
33
+ ```
34
+
35
+ Scan the output for migration-related files:
36
+ - Files under `migrations/`, `database/migrations/`, `prisma/migrations/`, `alembic/versions/`, `db/migrate/`
37
+ - Schema definition files: `prisma/schema.prisma`, `drizzle.config.ts`, `drizzle.config.js`, `alembic.ini`
38
+ - Any `*.sql` files in migration-related directories
39
+
40
+ **If NO migration-related files are found in the diff:**
41
+ > auto-skip: No migration changes detected in this branch — skipping `/sk:schema-migrate`.
42
+
43
+ Exit cleanly. Do not ask the user. Do not proceed to Phase 1.
44
+
45
+ **If migration-related files ARE found:** proceed to Phase 1 (ORM Detection) below.
46
+
47
+ ---
48
+
27
49
  ## Phase 1: ORM Detection
28
50
 
29
51
  ### Step 1 — Read in Parallel
@@ -52,21 +52,15 @@ Progress is tracked in `tasks/workflow-status.md`. This file persists across con
52
52
  | 10 | Implement | `/sk:execute-plan` | required | no |
53
53
  | 11 | Commit | `/sk:smart-commit` | required | no |
54
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 |
55
+ | 13 | Verify Tests | `/sk:test` | required | yes 100% coverage required |
56
+ | 14 | Security | `/sk:security-check` | required | yes — must reach 0 issues |
57
+ | 15 | Performance | `/sk:perf` | optional (confirm to skip) | yes loop until critical/high = 0 |
58
+ | 16 | Review + Simplify | `/sk:review` | required | yes — must reach 0 issues |
59
+ | 17 | E2E Tests | `/sk:e2e` | required | yes all scenarios must pass |
60
+ | 18 | Update | `/sk:update-task` | required | no |
61
+ | 19 | Finalize | `/sk:finish-feature` | required | no |
62
+ | 20 | Sync Features | `/sk:features` | required | no |
63
+ | 21 | Release | `/sk:release` | optional (confirm to skip) | no |
70
64
 
71
65
  ### Step Details
72
66
 
@@ -81,22 +75,16 @@ Progress is tracked in `tasks/workflow-status.md`. This file persists across con
81
75
  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
76
  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
77
  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-runfix 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.
78
+ 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. Gates own their commits — commit any fixes before moving on.
79
+ 13. **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. Gates own their commits — commit any fixes before moving on.
80
+ 14. **Security** — run `/sk:security-check`. Must reach 0 issues across all severities. Fix issues immediately, commit, then re-run. Loop until clean. Gates own their commits commit any fixes before moving on.
81
+ 15. **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. Gates own their commits — commit any fixes before moving on.
82
+ 16. **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. Gates own their commits — commit any fixes before moving on.
83
+ 17. **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. Gates own their commits — commit any fixes before moving on.
84
+ 18. **Update** — run `/sk:update-task` to mark the task done in `tasks/todo.md` and log completion to `tasks/progress.md`.
85
+ 19. **Finalize** — run `/sk:finish-feature` for changelog + PR
86
+ 20. **Sync Features** — run `/sk:features` to sync `docs/sk:features/` specs with what was actually shipped.
87
+ 21. **Release** — run `/sk:release` if deploying. Skip if not ready.
100
88
 
101
89
  ### Workflow Tracker Rules
102
90
 
@@ -109,20 +97,20 @@ Progress is tracked in `tasks/workflow-status.md`. This file persists across con
109
97
  - Add relevant Notes (e.g., "clean on attempt 2", "backend-only, no UI")
110
98
  - Move `>> next <<` to the next pending step
111
99
 
112
- 3. **Optional steps** (4, 5, 8, 18, 27): Ask the user "Skip [step]?" and require explicit confirmation. Record the reason in Notes.
100
+ 3. **Optional steps** (4, 5, 8, 15, 21): Ask the user "Skip [step]?" and require explicit confirmation. Record the reason in Notes.
113
101
 
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").
102
+ 4. **Gates own their commits.** Each hard gate (steps 12–17) is responsible for committing any fixes it produces before passing control to the next step. There are no separate conditional commit steps.
115
103
 
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").
104
+ 5. **Loop steps are HARD GATES** (12, 13, 14, 16, 17): 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").
117
105
  - **Step 12 (Lint)**: All detected linting tools must pass — every single one.
118
- - **Step 14 (Verify Tests)**: All detected test suites (BE + FE) must pass with 100% coverage on new code.
119
- - **Step 16 (Security)**: 0 issues across all severities.
120
- - **Step 20 (Review)**: 0 issues including nitpicks.
121
- - **Step 22 (E2E Tests)**: All scenarios must pass. 0 failures allowed.
122
- - **Step 18 (Performance)**: Optional gate — if run, loop until critical/high findings = 0. Can be skipped with explicit confirmation.
106
+ - **Step 13 (Verify Tests)**: All detected test suites (BE + FE) must pass with 100% coverage on new code.
107
+ - **Step 14 (Security)**: 0 issues across all severities.
108
+ - **Step 16 (Review)**: 0 issues including nitpicks.
109
+ - **Step 17 (E2E Tests)**: All scenarios must pass. 0 failures allowed.
110
+ - **Step 15 (Performance)**: Optional gate — if run, loop until critical/high findings = 0. Can be skipped with explicit confirmation.
123
111
  - **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.
124
112
 
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.
113
+ 6. **Never skip steps without confirmation.** Steps cannot run out of order. Hard gate steps (12, 13, 14, 16, 17) can NEVER be skipped. Optional gate step (15) requires explicit confirmation to skip.
126
114
 
127
115
  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.
128
116
 
@@ -142,7 +130,7 @@ This tells the user exactly what happened and what to do next. Never finish a st
142
130
 
143
131
  ### Fix & Retest Protocol
144
132
 
145
- **Applies to steps 12, 14, 16, 18, 20, 22 — any step that can produce code changes.**
133
+ **Applies to steps 12, 13, 14, 15, 16, 17 — any step that can produce code changes.**
146
134
 
147
135
  When any of these steps require a fix, classify the fix before committing:
148
136
 
@@ -290,6 +278,7 @@ Read these files at the start of every task:
290
278
  - `tasks/findings.md` — key decisions and project constraints
291
279
  - `tasks/lessons.md` — past mistakes and how to avoid them
292
280
  - `tasks/todo.md` — current plan
281
+ - `tasks/tech-debt.md` — known shortcuts, deferred work, and areas to revisit
293
282
 
294
283
  Write to these files continuously:
295
284
  - `tasks/progress.md` — every attempt, error, and resolution
@@ -321,7 +310,7 @@ Tests are written **before** implementation (step 9) and verified **after** (ste
321
310
  2. `/sk:execute-plan` — implement code to make tests pass (GREEN)
322
311
  3. `/sk:test` — verify all tests pass with 100% coverage (VERIFY)
323
312
 
324
- Every new function, endpoint, component, and module needs tests. No code proceeds past step 13 without 100% coverage on new code.
313
+ Every new function, endpoint, component, and module needs tests. No code proceeds past step 12 without 100% coverage on new code.
325
314
 
326
315
  ## 3-Strike Protocol
327
316
 
@@ -363,4 +352,5 @@ Create entries in: `[ARCH_CHANGELOG_DIR]`
363
352
  | `/sk:features` | Sync feature specs with shipped implementation |
364
353
  | `/sk:release` | Version bump + changelog + tag |
365
354
  | `/sk:status` | Show workflow + task status |
355
+ | `/sk:context` | Load all context files + output session brief for fast session start |
366
356
  | `/sk:setup-optimizer` | Diagnose + update workflow + enrich CLAUDE.md |
@@ -6,7 +6,7 @@ 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 → E2E Tests → Finish → Sync Features
9
+ **Workflow:** Read → **Explore** → Design → Accessibility → Plan → Branch → Migrate → Write Tests → Implement → Lint → Tests → Security → Perf → Review → E2E Tests → Update → Finish → Sync → Release
10
10
 
11
11
  Explore design and clarify requirements **before** any code is written.
12
12
 
@@ -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 → E2E Tests → Finish → Sync Features
9
+ **Workflow:** Read → Explore → Design → Accessibility → Plan → Branch → Migrate → Write Tests → **Implement** → Lint → Tests → Security → Perf → Review → E2E Tests → Update → Finish → Sync → Release
10
10
 
11
11
  Execute the plan in `tasks/todo.md` in small batches with clear checkpoints.
12
12
 
@@ -2,7 +2,7 @@
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 → E2E Tests → **Finish** → Sync Features
5
+ **Workflow:** Read → Explore → Design → Accessibility → Plan → Branch → Migrate → Write Tests → Implement → Lint → Tests → Security → Perf → Review → E2E Tests → Update → **Finish** → Sync → Release
6
6
 
7
7
  Finalize a feature/bug-fix branch: changelog, arch log, security gate, verification, and PR creation.
8
8
 
@@ -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 → E2E Tests → Finish → Sync Features
9
+ **Workflow:** Read → Explore → Design → Accessibility → Plan → Branch → Migrate → Write Tests → Implement → Lint → Tests → **Security** → Perf → Review → E2E Tests → Update → Finish → Sync → Release
10
10
 
11
11
  Audit code for security vulnerabilities, production-grade quality, and industry gold-standard compliance.
12
12
 
@@ -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 → E2E Tests → Finish → Sync Features
9
+ **Workflow:** Read → Explore → Design → Accessibility → **Plan** → Branch → Migrate → Write Tests → Implement → Lint → Tests → Security → Perf → Review → E2E Tests → Update → Finish → Sync → Release
10
10
 
11
11
  Create a decision-complete plan **before** writing code.
12
12
 
@@ -16,19 +16,13 @@
16
16
  | 9 | Write Tests (`/sk:write-tests`) | not yet | |
17
17
  | 10 | Implement (`/sk:execute-plan`) | not yet | |
18
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 |
19
+ | 12 | **Lint + Dep Audit** (`/sk:lint`) | not yet | HARD GATE — loop until clean, gates own their commits |
20
+ | 13 | **Verify Tests** (`/sk:test`) | not yet | HARD GATE — 100% coverage, gates own their commits |
21
+ | 14 | **Security** (`/sk:security-check`) | not yet | HARD GATE — 0 issues, gates own their commits |
22
+ | 15 | Performance (`/sk:perf`) | not yet | optional gate, gates own their commits |
23
+ | 16 | **Review + Simplify** (`/sk:review`) | not yet | HARD GATE — 0 issues, gates own their commits |
24
+ | 17 | **E2E** (`/sk:e2e`) | not yet | HARD GATE — all E2E scenarios must pass, gates own their commits |
25
+ | 18 | Update (`/sk:update-task`) | not yet | |
26
+ | 19 | Finalize (`/sk:finish-feature`) | not yet | |
27
+ | 20 | Sync Features (`/sk:features`) | not yet | requiredsync feature specs after ship |
28
+ | 21 | 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 27-step TDD flow with hard gates
46
+ - **Outdated workflow** — checks if the workflow matches the current 21-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 (27 steps, TDD with hard gates):**
54
+ **Current workflow (21 steps, TDD with hard gates):**
55
55
  ```
56
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 (27 steps with correct commands: `/sk:write-tests`, `/sk:lint`, `/sk:test`, `/sk:accessibility`, `/sk:perf`, `/sk:e2e`)
60
+ - Workflow table (21 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, 22; optional steps 4, 5, 8, 18, 27)
62
+ - Tracker rules (hard gates at 12, 14, 16, 20, 17; optional steps 4, 5, 8, 18, 21)
63
63
  - Step completion summary rule (NON-NEGOTIABLE)
64
64
  - Bug fix flow section
65
65
  - Sub-Agent Patterns section (if missing)
@@ -126,8 +126,12 @@ Sub-agent 3: [FE command]
126
126
  - Read the failure output carefully — identify the root cause
127
127
  - Fix the failing **implementation code** or test setup, not the test assertions (tests define expected behavior)
128
128
  - Do NOT skip, mark incomplete, or delete failing tests
129
- - Re-run the failing suite until all tests pass
130
- - If a fix changes behavior, confirm with the user before applying
129
+ - Auto-commit with message `fix(test): resolve failing tests` — do NOT ask the user
130
+ - Re-run the failing suite
131
+ - Loop until all pass
132
+ - Fix the implementation and auto-commit. If the fix is a logic change (new behavior, changed contract), update the relevant tests to reflect the new behavior before committing.
133
+
134
+ > Gates own their commits — the fix-commit-rerun loop is fully internal. No manual commit step needed after this gate.
131
135
 
132
136
  ### 5. Verify Coverage
133
137