@kennethsolomon/shipkit 3.6.0 → 3.8.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 +14 -15
- package/commands/sk/security-check.md +10 -4
- package/commands/sk/update-task.md +9 -0
- package/commands/sk/write-plan.md +5 -0
- package/package.json +1 -1
- package/skills/sk:context/SKILL.md +4 -0
- package/skills/sk:e2e/SKILL.md +19 -2
- package/skills/sk:fast-track/SKILL.md +80 -0
- package/skills/sk:frontend-design/SKILL.md +12 -5
- package/skills/sk:gates/SKILL.md +97 -0
- package/skills/sk:lint/SKILL.md +27 -6
- package/skills/sk:perf/SKILL.md +15 -4
- package/skills/sk:retro/SKILL.md +124 -0
- package/skills/sk:reverse-doc/SKILL.md +116 -0
- package/skills/sk:review/SKILL.md +19 -11
- package/skills/sk:schema-migrate/SKILL.md +22 -0
- package/skills/sk:scope-check/SKILL.md +93 -0
- package/skills/sk:setup-claude/SKILL.md +53 -0
- package/skills/sk:setup-claude/scripts/apply_setup_claude.py +206 -6
- package/skills/sk:setup-claude/templates/.claude/agents/e2e-tester.md +46 -0
- package/skills/sk:setup-claude/templates/.claude/agents/linter.md +53 -0
- package/skills/sk:setup-claude/templates/.claude/agents/perf-auditor.md +43 -0
- package/skills/sk:setup-claude/templates/.claude/agents/security-auditor.md +47 -0
- package/skills/sk:setup-claude/templates/.claude/agents/test-runner.md +42 -0
- package/skills/sk:setup-claude/templates/.claude/rules/api.md.template +14 -0
- package/skills/sk:setup-claude/templates/.claude/rules/frontend.md.template +15 -0
- package/skills/sk:setup-claude/templates/.claude/rules/laravel.md.template +15 -0
- package/skills/sk:setup-claude/templates/.claude/rules/react.md.template +14 -0
- package/skills/sk:setup-claude/templates/.claude/rules/tests.md.template +16 -0
- package/skills/sk:setup-claude/templates/.claude/settings.json.template +76 -0
- package/skills/sk:setup-claude/templates/.claude/statusline.sh +50 -0
- package/skills/sk:setup-claude/templates/CLAUDE.md.template +31 -42
- package/skills/sk:setup-claude/templates/commands/brainstorm.md.template +1 -1
- package/skills/sk:setup-claude/templates/commands/execute-plan.md.template +1 -1
- package/skills/sk:setup-claude/templates/commands/finish-feature.md.template +1 -1
- package/skills/sk:setup-claude/templates/commands/security-check.md.template +1 -1
- package/skills/sk:setup-claude/templates/commands/write-plan.md.template +1 -1
- package/skills/sk:setup-claude/templates/hooks/log-agent.sh +24 -0
- package/skills/sk:setup-claude/templates/hooks/pre-compact.sh +44 -0
- package/skills/sk:setup-claude/templates/hooks/session-start.sh +53 -0
- package/skills/sk:setup-claude/templates/hooks/session-stop.sh +33 -0
- package/skills/sk:setup-claude/templates/hooks/validate-commit.sh +81 -0
- package/skills/sk:setup-claude/templates/hooks/validate-push.sh +43 -0
- package/skills/sk:setup-claude/templates/tasks/workflow-status.md.template +10 -16
- package/skills/sk:setup-optimizer/SKILL.md +4 -4
- package/skills/sk:test/SKILL.md +6 -2
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 |
|
|
97
|
-
| 14 | **`/sk:
|
|
98
|
-
| 15 |
|
|
99
|
-
| 16 | **`/sk:
|
|
100
|
-
| 17 |
|
|
101
|
-
| 18 |
|
|
102
|
-
| 19 | `/sk:
|
|
103
|
-
| 20 |
|
|
104
|
-
| 21 | `/sk:
|
|
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 Features — update 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
|
|
|
@@ -183,6 +177,7 @@ Requirement changes → /sk:change → re-enter at correct step
|
|
|
183
177
|
| `/sk:plan` | Create or refresh task planning files |
|
|
184
178
|
| `/sk:setup-claude` | Bootstrap project scaffolding (CLAUDE.md + tasks/) |
|
|
185
179
|
| `/sk:setup-optimizer` | Enrich CLAUDE.md by scanning the codebase |
|
|
180
|
+
| `/sk:reverse-doc` | Generate architecture/design docs from existing code |
|
|
186
181
|
|
|
187
182
|
### Development
|
|
188
183
|
|
|
@@ -195,6 +190,7 @@ Requirement changes → /sk:change → re-enter at correct step
|
|
|
195
190
|
| `/sk:change` | Handle a mid-workflow requirement change — assess scope and re-enter at the right step |
|
|
196
191
|
| `/sk:debug` | Structured bug investigation: reproduce → isolate → fix |
|
|
197
192
|
| `/sk:hotfix` | Emergency fix workflow — skips design and TDD |
|
|
193
|
+
| `/sk:fast-track` | Abbreviated workflow for small changes — skip planning, keep all gates |
|
|
198
194
|
|
|
199
195
|
### Prototyping
|
|
200
196
|
|
|
@@ -212,6 +208,8 @@ Requirement changes → /sk:change → re-enter at correct step
|
|
|
212
208
|
| `/sk:perf` | Performance audit: bundle size, N+1 queries, Core Web Vitals |
|
|
213
209
|
| `/sk:seo-audit` | SEO audit — dual-mode (source templates + dev server), ask-before-fix, checklist output to `tasks/seo-findings.md` |
|
|
214
210
|
| `/sk:review` | Blast-radius-aware self-review across 7 dimensions + cross-file impact analysis |
|
|
211
|
+
| `/sk:gates` | Run all quality gates in optimized parallel batches |
|
|
212
|
+
| `/sk:scope-check` | Compare implementation against plan, detect scope creep |
|
|
215
213
|
|
|
216
214
|
### Shipping
|
|
217
215
|
|
|
@@ -222,6 +220,7 @@ Requirement changes → /sk:change → re-enter at correct step
|
|
|
222
220
|
| `/sk:finish-feature` | Write changelog entry + create PR |
|
|
223
221
|
| `/sk:release` | Version bump + CHANGELOG + git tag + push |
|
|
224
222
|
| `/sk:features` | Sync docs/features/ specs with the codebase |
|
|
223
|
+
| `/sk:retro` | Post-ship retrospective: velocity, blockers, action items |
|
|
225
224
|
|
|
226
225
|
### Laravel
|
|
227
226
|
|
|
@@ -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
|
-
- **
|
|
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
|
-
>
|
|
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
|
@@ -32,6 +32,7 @@ Load all project context files into the conversation and output a formatted sess
|
|
|
32
32
|
| 5 | `tasks/lessons.md` | All active lessons — read in full, apply as constraints for this session |
|
|
33
33
|
| 6 | `docs/decisions.md` | If exists: last 3 ADR entries. If missing: note "no decisions log yet" |
|
|
34
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 |
|
|
35
36
|
|
|
36
37
|
### Reading Strategy
|
|
37
38
|
|
|
@@ -58,6 +59,7 @@ Last done: [last progress.md entry summary, 1 line]
|
|
|
58
59
|
Pending: [N] checkboxes remaining in todo.md
|
|
59
60
|
Lessons: [count] active — [most critical 1-liner from lessons.md]
|
|
60
61
|
Open Qs: [open questions from findings.md, or "none"]
|
|
62
|
+
Tech Debt: [N] unresolved — highest: [severity] ([file:line])
|
|
61
63
|
Product: [value prop from vision.md, or "no vision.md found"]
|
|
62
64
|
════════════════════════════════════════════
|
|
63
65
|
```
|
|
@@ -71,6 +73,7 @@ Product: [value prop from vision.md, or "no vision.md found"]
|
|
|
71
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).
|
|
72
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.
|
|
73
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`.
|
|
74
77
|
- **Product:** From `docs/vision.md`, extract the value proposition. If file doesn't exist, say "no vision.md found".
|
|
75
78
|
|
|
76
79
|
---
|
|
@@ -96,6 +99,7 @@ After outputting the session brief:
|
|
|
96
99
|
| No `tasks/lessons.md` | Show "0 active" for Lessons |
|
|
97
100
|
| No `docs/decisions.md` | Show "no decisions log yet" — do not error |
|
|
98
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 |
|
|
99
103
|
| All checkboxes done in todo.md | Show "Task complete — 0 pending" |
|
|
100
104
|
|
|
101
105
|
---
|
package/skills/sk:e2e/SKILL.md
CHANGED
|
@@ -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
|
|
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.
|
|
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."
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sk:fast-track
|
|
3
|
+
description: Abbreviated workflow for small, clear changes — skip planning ceremony, keep all quality gates
|
|
4
|
+
user_invocable: true
|
|
5
|
+
allowed_tools: Read, Write, Bash, Glob, Grep, Agent, Skill
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Fast-Track Flow
|
|
9
|
+
|
|
10
|
+
Abbreviated workflow for small, well-understood changes. Skips brainstorm, design, plan, and write-tests phases but still enforces all quality gates.
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
- Config changes, dependency bumps, copy/wording changes
|
|
15
|
+
- Small refactors with obvious scope
|
|
16
|
+
- Adding a missing test for existing code
|
|
17
|
+
- Fixing a typo or updating documentation
|
|
18
|
+
- Any change where the "what" is already clear and doesn't need design exploration
|
|
19
|
+
|
|
20
|
+
## When NOT to Use
|
|
21
|
+
|
|
22
|
+
- New features (use full workflow)
|
|
23
|
+
- Changes affecting multiple systems (use full workflow)
|
|
24
|
+
- Anything requiring design decisions (use `/sk:brainstorm` first)
|
|
25
|
+
- Bug fixes (use `/sk:debug` flow)
|
|
26
|
+
|
|
27
|
+
## Guard Rails
|
|
28
|
+
|
|
29
|
+
Before proceeding, check the scope of planned changes:
|
|
30
|
+
|
|
31
|
+
1. **Diff size check**: After implementation, run `git diff --stat HEAD`. If the diff exceeds **300 lines** changed:
|
|
32
|
+
> "This change is [N] lines — larger than the 300-line fast-track threshold. Consider the full workflow for better test coverage. Continue anyway? (y/n)"
|
|
33
|
+
|
|
34
|
+
2. **New file count**: If more than **5 new files** are created:
|
|
35
|
+
> "You've created [N] new files. Consider running `/sk:write-tests` first. Continue anyway? (y/n)"
|
|
36
|
+
|
|
37
|
+
3. **Migration check**: If any migration files are detected in changes, warn:
|
|
38
|
+
> "Migration files detected. Consider running `/sk:schema-migrate` for analysis."
|
|
39
|
+
|
|
40
|
+
## Steps
|
|
41
|
+
|
|
42
|
+
### 1. Context (quick)
|
|
43
|
+
- Read `tasks/todo.md` — pick the task or accept user's description
|
|
44
|
+
- Read `tasks/lessons.md` — apply active lessons as constraints
|
|
45
|
+
|
|
46
|
+
### 2. Branch
|
|
47
|
+
- Run `/sk:branch` to create a feature branch
|
|
48
|
+
|
|
49
|
+
### 3. Implement
|
|
50
|
+
- Write the code directly — no brainstorm, design, plan, or TDD phases
|
|
51
|
+
- Focus on the minimal change needed
|
|
52
|
+
|
|
53
|
+
### 4. Commit
|
|
54
|
+
- Run `/sk:smart-commit` to stage and commit with conventional commit message
|
|
55
|
+
|
|
56
|
+
### 5. Gates
|
|
57
|
+
- Run `/sk:gates` — all quality gates in optimized parallel batches
|
|
58
|
+
- This is the same gate process as the full workflow — no shortcuts on quality
|
|
59
|
+
- Lint, test, security, perf, review, E2E all run
|
|
60
|
+
|
|
61
|
+
### 6. Finalize
|
|
62
|
+
- Run `/sk:finish-feature` for changelog + PR
|
|
63
|
+
|
|
64
|
+
## Workflow Status
|
|
65
|
+
|
|
66
|
+
Fast-track updates `tasks/workflow-status.md` with abbreviated steps:
|
|
67
|
+
- Steps 1-2 (read): done
|
|
68
|
+
- Steps 3-6 (explore, design, accessibility, plan): skipped (fast-track)
|
|
69
|
+
- Steps 7-11 (branch, implement, commit): done
|
|
70
|
+
- Steps 12-17 (gates): handled by `/sk:gates`
|
|
71
|
+
- Steps 18-21 (update, finalize, sync, release): done as applicable
|
|
72
|
+
|
|
73
|
+
## Model Routing
|
|
74
|
+
|
|
75
|
+
| Profile | Model |
|
|
76
|
+
|---------|-------|
|
|
77
|
+
| `full-sail` | opus (inherit) |
|
|
78
|
+
| `quality` | sonnet |
|
|
79
|
+
| `balanced` | sonnet |
|
|
80
|
+
| `budget` | haiku |
|
|
@@ -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 —
|
|
114
|
+
### Step 1 — Derive the filename and open the .pen file
|
|
115
115
|
|
|
116
|
-
|
|
116
|
+
Before opening any Pencil document:
|
|
117
117
|
|
|
118
|
-
|
|
119
|
-
-
|
|
120
|
-
|
|
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
|
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sk:gates
|
|
3
|
+
description: Run all quality gates in optimized parallel batches — one command instead of six
|
|
4
|
+
user_invocable: true
|
|
5
|
+
allowed_tools: Agent, Read, Write, Bash, Glob, Grep
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Gates Orchestrator
|
|
9
|
+
|
|
10
|
+
Run all quality gates (lint, test, security, perf, review, e2e) in optimized batches. Replaces manually invoking 6 separate commands.
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
Run `/sk:gates` after committing implementation code (step 11). This single command handles steps 12-17 of the workflow.
|
|
15
|
+
|
|
16
|
+
## Execution Strategy
|
|
17
|
+
|
|
18
|
+
Gates are organized into 4 batches for maximum parallelism while respecting dependencies:
|
|
19
|
+
|
|
20
|
+
### Batch 1 — Parallel Agents (lint + security + perf)
|
|
21
|
+
|
|
22
|
+
Launch 3 agents simultaneously:
|
|
23
|
+
|
|
24
|
+
1. **Linter agent** — runs all formatters, analyzers, dep audits
|
|
25
|
+
2. **Security auditor agent** — OWASP audit on changed files
|
|
26
|
+
3. **Performance auditor agent** — bundle, N+1, Core Web Vitals, memory
|
|
27
|
+
|
|
28
|
+
These 3 have no dependencies on each other. Run them in parallel using the Agent tool.
|
|
29
|
+
|
|
30
|
+
Wait for all 3 to complete. Collect results.
|
|
31
|
+
|
|
32
|
+
### Batch 2 — Test Agent (sequential, needs lint fixes)
|
|
33
|
+
|
|
34
|
+
After Batch 1 completes (lint may have auto-formatted code):
|
|
35
|
+
|
|
36
|
+
4. **Test runner agent** — runs all test suites, ensures 100% coverage on new code
|
|
37
|
+
|
|
38
|
+
### Batch 3 — Review (main context, needs test confirmation)
|
|
39
|
+
|
|
40
|
+
After Batch 2 completes:
|
|
41
|
+
|
|
42
|
+
5. **Review** — runs `/sk:review` in the main context (NOT as an agent) because review needs deep code understanding and access to the full conversation history
|
|
43
|
+
|
|
44
|
+
### Batch 4 — E2E Agent (needs review fixes)
|
|
45
|
+
|
|
46
|
+
After Batch 3 completes:
|
|
47
|
+
|
|
48
|
+
6. **E2E tester agent** — runs full E2E verification
|
|
49
|
+
|
|
50
|
+
## Gate Results
|
|
51
|
+
|
|
52
|
+
After all 4 batches complete, output a summary:
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
=== Gate Results ===
|
|
56
|
+
Lint: clean (attempt N)
|
|
57
|
+
Security: 0 findings (attempt N)
|
|
58
|
+
Perf: 0 critical/high (attempt N)
|
|
59
|
+
Tests: X passed, 0 failed (attempt N)
|
|
60
|
+
Review: 0 issues (attempt N)
|
|
61
|
+
E2E: Y scenarios passed (attempt N)
|
|
62
|
+
|
|
63
|
+
All gates passed. Run /sk:update-task
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Failure Handling
|
|
67
|
+
|
|
68
|
+
- Each agent handles its own fix → auto-commit → re-run loop internally
|
|
69
|
+
- If any agent fails after 3 attempts → stop all gates and report to user
|
|
70
|
+
- Do NOT proceed to the next batch if the current batch has unresolved failures
|
|
71
|
+
- Update `tasks/workflow-status.md` for each gate as it completes:
|
|
72
|
+
- Steps 12-17 marked `done` with attempt count in Notes
|
|
73
|
+
|
|
74
|
+
## 3-Strike Protocol
|
|
75
|
+
|
|
76
|
+
If any single gate fails 3 times:
|
|
77
|
+
1. Stop the entire gates process
|
|
78
|
+
2. Log the failure to `tasks/progress.md`
|
|
79
|
+
3. Report to user with details of what failed and what was tried
|
|
80
|
+
4. Do NOT mark the step as done
|
|
81
|
+
|
|
82
|
+
## Model Routing
|
|
83
|
+
|
|
84
|
+
The orchestrator itself runs in the main context. Agents use their own model routing:
|
|
85
|
+
- Linter: haiku (mechanical)
|
|
86
|
+
- Test runner: sonnet
|
|
87
|
+
- Security auditor: sonnet
|
|
88
|
+
- Perf auditor: sonnet
|
|
89
|
+
- E2E tester: sonnet
|
|
90
|
+
- Review: main context model (opus or sonnet depending on profile)
|
|
91
|
+
|
|
92
|
+
| Profile | Orchestrator Model |
|
|
93
|
+
|---------|-------------------|
|
|
94
|
+
| `full-sail` | opus (inherit) |
|
|
95
|
+
| `quality` | opus (inherit) |
|
|
96
|
+
| `balanced` | sonnet |
|
|
97
|
+
| `budget` | sonnet |
|
package/skills/sk:lint/SKILL.md
CHANGED
|
@@ -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
|
-
|
|
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.
|
|
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.
|
|
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
|
package/skills/sk:perf/SKILL.md
CHANGED
|
@@ -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.
|
|
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
|
|
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
|
-
- **
|
|
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
|
-
>
|
|
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."
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sk:retro
|
|
3
|
+
description: Post-ship retrospective analyzing velocity, blockers, and patterns to generate actionable improvements
|
|
4
|
+
user_invocable: true
|
|
5
|
+
allowed_tools: Read, Glob, Grep, Bash, Write
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Retrospective
|
|
9
|
+
|
|
10
|
+
Analyze completed work after shipping a feature to generate actionable insights for the next iteration.
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
Run `/sk:retro` after `/sk:finish-feature` or `/sk:release` to reflect on what went well, what didn't, and what to improve. Best run while context is fresh.
|
|
15
|
+
|
|
16
|
+
## Steps
|
|
17
|
+
|
|
18
|
+
### 1. Gather Data
|
|
19
|
+
|
|
20
|
+
Read these files to build the retrospective:
|
|
21
|
+
|
|
22
|
+
| File | What to Extract |
|
|
23
|
+
|------|----------------|
|
|
24
|
+
| `tasks/todo.md` | Planned tasks — count total, completed, dropped |
|
|
25
|
+
| `tasks/progress.md` | Work log — errors, resolutions, session timestamps |
|
|
26
|
+
| `tasks/workflow-status.md` | Step-by-step status — attempt counts, skip reasons |
|
|
27
|
+
| `tasks/findings.md` | Design decisions — were they validated? |
|
|
28
|
+
| `tasks/lessons.md` | New lessons added during this task |
|
|
29
|
+
| `tasks/tech-debt.md` | Tech debt logged during gates |
|
|
30
|
+
|
|
31
|
+
### 2. Analyze Git History
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Commits on this branch
|
|
35
|
+
git log main..HEAD --oneline --format="%h %s"
|
|
36
|
+
|
|
37
|
+
# Time span
|
|
38
|
+
git log main..HEAD --format="%ai" | tail -1 # first commit
|
|
39
|
+
git log main..HEAD --format="%ai" | head -1 # last commit
|
|
40
|
+
|
|
41
|
+
# Files changed
|
|
42
|
+
git diff main..HEAD --stat
|
|
43
|
+
|
|
44
|
+
# Commit count
|
|
45
|
+
git rev-list main..HEAD --count
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### 3. Calculate Metrics
|
|
49
|
+
|
|
50
|
+
| Metric | How |
|
|
51
|
+
|--------|-----|
|
|
52
|
+
| **Completion rate** | Completed tasks / Planned tasks * 100 |
|
|
53
|
+
| **Velocity** | Commits per day, files changed per day |
|
|
54
|
+
| **Gate performance** | Extract attempt counts from workflow-status.md Notes (e.g., "clean on attempt 3") |
|
|
55
|
+
| **Blocker count** | Count "FAIL", "error", "blocked", "3-Strike" entries in tasks/progress.md |
|
|
56
|
+
| **Rework rate** | Count fix commits (fix(lint):, fix(test):, etc.) vs feature commits |
|
|
57
|
+
|
|
58
|
+
### 4. Identify Patterns
|
|
59
|
+
|
|
60
|
+
- **Recurring blocker**: Same type of issue across multiple gates?
|
|
61
|
+
- **Estimation accuracy**: Did planned scope match actual scope? (cross-ref with `/sk:scope-check` if available)
|
|
62
|
+
- **Gate friction**: Which gates required the most fix cycles?
|
|
63
|
+
- **Previous retro follow-up**: Read previous `tasks/retro-*.md` files — were action items addressed?
|
|
64
|
+
|
|
65
|
+
### 5. Generate Action Items
|
|
66
|
+
|
|
67
|
+
Produce 3-5 concrete, actionable improvements:
|
|
68
|
+
- Each action item must have: **what** to do, **why** it matters, **when** to apply it
|
|
69
|
+
- Prioritize systemic fixes over one-off patches
|
|
70
|
+
- Flag recurring unaddressed items from previous retros as process concerns
|
|
71
|
+
|
|
72
|
+
### 6. Write Report
|
|
73
|
+
|
|
74
|
+
Save to `tasks/retro-YYYY-MM-DD.md`:
|
|
75
|
+
|
|
76
|
+
```markdown
|
|
77
|
+
# Retrospective — [date] — [task name]
|
|
78
|
+
|
|
79
|
+
## Metrics
|
|
80
|
+
| Metric | Value |
|
|
81
|
+
|--------|-------|
|
|
82
|
+
| Planned tasks | N |
|
|
83
|
+
| Completed | X / N (Y%) |
|
|
84
|
+
| Commits | Z |
|
|
85
|
+
| Time span | A days |
|
|
86
|
+
| Files changed | B (+C/-D) |
|
|
87
|
+
| Gate attempts | lint: 1, test: 2, security: 1, ... |
|
|
88
|
+
| Blockers | K |
|
|
89
|
+
| Rework rate | R% |
|
|
90
|
+
|
|
91
|
+
## What Went Well
|
|
92
|
+
- [data-backed observation]
|
|
93
|
+
|
|
94
|
+
## What Didn't Go Well
|
|
95
|
+
- [data-backed observation, with blocker/error references]
|
|
96
|
+
|
|
97
|
+
## Patterns
|
|
98
|
+
- [recurring theme from this or previous retros]
|
|
99
|
+
|
|
100
|
+
## Action Items
|
|
101
|
+
1. **[What]** — [Why] — Apply during: [When]
|
|
102
|
+
2. ...
|
|
103
|
+
|
|
104
|
+
## Previous Action Item Follow-Up
|
|
105
|
+
- [Action from last retro] — [Addressed / Still open]
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### 7. Summary
|
|
109
|
+
|
|
110
|
+
Output to user:
|
|
111
|
+
```
|
|
112
|
+
Retrospective saved to tasks/retro-YYYY-MM-DD.md
|
|
113
|
+
Completion: X/N tasks (Y%) | Velocity: Z commits/day | Blockers: K
|
|
114
|
+
Top action: [most important action item]
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Model Routing
|
|
118
|
+
|
|
119
|
+
| Profile | Model |
|
|
120
|
+
|---------|-------|
|
|
121
|
+
| `full-sail` | opus (inherit) |
|
|
122
|
+
| `quality` | sonnet |
|
|
123
|
+
| `balanced` | sonnet |
|
|
124
|
+
| `budget` | haiku |
|