@kennethsolomon/shipkit 3.19.0 → 3.21.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 +36 -4
- package/package.json +1 -1
- package/skills/sk:brainstorming/SKILL.md +19 -128
- package/skills/sk:debug/SKILL.md +44 -111
- package/skills/sk:e2e/SKILL.md +45 -97
- package/skills/sk:features/SKILL.md +44 -99
- package/skills/sk:frontend-design/SKILL.md +16 -32
- package/skills/sk:laravel-init/SKILL.md +8 -7
- package/skills/sk:laravel-new/SKILL.md +1 -0
- package/skills/sk:lint/SKILL.md +42 -62
- package/skills/sk:mvp/SKILL.md +81 -134
- package/skills/sk:perf/SKILL.md +24 -43
- package/skills/sk:review/SKILL.md +57 -93
- package/skills/sk:security-check/SKILL.md +37 -43
- package/skills/sk:seo-audit/SKILL.md +75 -96
- package/skills/sk:setup-claude/SKILL.md +154 -0
- package/skills/sk:setup-claude/references/skill-profiles.md +223 -0
- package/skills/sk:setup-claude/scripts/__pycache__/apply_setup_claude.cpython-314.pyc +0 -0
- package/skills/sk:setup-claude/scripts/apply_setup_claude.py +110 -10
- package/skills/sk:setup-claude/templates/.claude/rules/laravel.md.template +14 -0
- package/skills/sk:setup-claude/templates/CLAUDE.md.template +102 -247
- 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/tests/__pycache__/test_apply_setup_claude.cpython-314.pyc +0 -0
- package/skills/sk:setup-claude/tests/test_apply_setup_claude.py +267 -0
- package/skills/sk:setup-optimizer/SKILL.md +101 -17
- package/skills/sk:skill-creator/SKILL.md +115 -226
- package/skills/sk:website/SKILL.md +81 -149
- package/skills/sk:write-tests/SKILL.md +44 -110
package/skills/sk:e2e/SKILL.md
CHANGED
|
@@ -6,9 +6,7 @@ model: sonnet
|
|
|
6
6
|
|
|
7
7
|
# /sk:e2e
|
|
8
8
|
|
|
9
|
-
E2E behavioral verification — the final quality gate before `/sk:finish-feature`. Runs after Review
|
|
10
|
-
|
|
11
|
-
**Hard gate:** all scenarios must pass. Zero failures allowed.
|
|
9
|
+
E2E behavioral verification — the final quality gate before `/sk:finish-feature`. Runs after Review. **Hard gate:** all scenarios must pass. Zero failures allowed.
|
|
12
10
|
|
|
13
11
|
## Allowed Tools
|
|
14
12
|
|
|
@@ -18,31 +16,25 @@ Bash, Read, Glob, Grep
|
|
|
18
16
|
|
|
19
17
|
### 1. Read Context
|
|
20
18
|
|
|
21
|
-
Read
|
|
19
|
+
Read to understand what to test:
|
|
22
20
|
- `tasks/todo.md` — planned features and acceptance criteria
|
|
23
21
|
- `tasks/findings.md` — design decisions and expected behaviors
|
|
24
22
|
- `tasks/progress.md` — implementation notes
|
|
25
23
|
|
|
26
24
|
### 2. Detect E2E Runner
|
|
27
25
|
|
|
28
|
-
Check which runner is available, in priority order:
|
|
29
|
-
|
|
30
26
|
**Priority 1 — Playwright (preferred)**
|
|
31
27
|
|
|
32
28
|
```bash
|
|
33
29
|
ls playwright.config.ts 2>/dev/null || ls playwright.config.js 2>/dev/null
|
|
34
30
|
```
|
|
35
31
|
|
|
36
|
-
If
|
|
37
|
-
- Uses headless Chromium (no conflict with system Chrome)
|
|
38
|
-
- No additional global install required (`@playwright/test` in devDeps)
|
|
39
|
-
- Test files in `e2e/` or `tests/e2e/` are picked up automatically
|
|
40
|
-
- `webServer` in `playwright.config.ts` auto-starts the dev server
|
|
32
|
+
If config exists → use Playwright CLI (Step 3a). Advantages: headless Chromium, no system Chrome conflict, `@playwright/test` in devDeps, auto-picks `e2e/` or `tests/e2e/`, `webServer` auto-starts dev server.
|
|
41
33
|
|
|
42
|
-
**
|
|
43
|
-
- `headless: true`
|
|
44
|
-
- `channel: undefined` (
|
|
45
|
-
- `webServer.reuseExistingServer: true`
|
|
34
|
+
**Config requirements (verify before running):**
|
|
35
|
+
- `headless: true` under `use:`
|
|
36
|
+
- `channel: undefined` (omit) — NOT `'chrome'` or `'msedge'`
|
|
37
|
+
- `webServer.reuseExistingServer: true`
|
|
46
38
|
|
|
47
39
|
If config has `channel: 'chrome'` or `headless: false`, warn:
|
|
48
40
|
> "playwright.config.ts uses system Chrome or headed mode — this may conflict with a running browser. Consider setting `headless: true` and `channel: undefined`."
|
|
@@ -53,12 +45,11 @@ If config has `channel: 'chrome'` or `headless: false`, warn:
|
|
|
53
45
|
agent-browser --version
|
|
54
46
|
```
|
|
55
47
|
|
|
56
|
-
Only use
|
|
57
|
-
|
|
58
|
-
If `agent-browser` is also not found, AND no Playwright config exists:
|
|
48
|
+
Only use if NO Playwright config exists.
|
|
59
49
|
|
|
50
|
+
If neither is found:
|
|
60
51
|
```
|
|
61
|
-
Neither Playwright nor agent-browser is configured.
|
|
52
|
+
Neither Playwright nor agent-browser is configured.
|
|
62
53
|
|
|
63
54
|
Option A (recommended) — Playwright:
|
|
64
55
|
npm install -D @playwright/test
|
|
@@ -82,9 +73,9 @@ ls tests/e2e/ 2>/dev/null
|
|
|
82
73
|
find . -name "*.spec.ts" -not -path "*/node_modules/*"
|
|
83
74
|
```
|
|
84
75
|
|
|
85
|
-
If spec files exist
|
|
76
|
+
If spec files exist:
|
|
86
77
|
```bash
|
|
87
|
-
npx playwright test --reporter=list
|
|
78
|
+
npx playwright test --reporter=list 2>&1
|
|
88
79
|
```
|
|
89
80
|
|
|
90
81
|
To run a specific file:
|
|
@@ -92,148 +83,105 @@ To run a specific file:
|
|
|
92
83
|
npx playwright test e2e/my-feature.spec.ts --reporter=list
|
|
93
84
|
```
|
|
94
85
|
|
|
95
|
-
To run with visible output on failure:
|
|
96
|
-
```bash
|
|
97
|
-
npx playwright test --reporter=list 2>&1
|
|
98
|
-
```
|
|
99
|
-
|
|
100
86
|
**Interpreting results:**
|
|
101
|
-
- Exit
|
|
102
|
-
- Exit code 1 = one or more tests failed (output includes which tests and why)
|
|
103
|
-
- Each failing test shows: test name, expected vs. actual, screenshot path (if `trace: 'on-first-retry'` is set)
|
|
87
|
+
- Exit 0 = all passed; Exit 1 = failures (shows test name, expected vs. actual, screenshot path if `trace: 'on-first-retry'`)
|
|
104
88
|
|
|
105
|
-
If no spec files exist → derive scenarios from `tasks/todo.md` acceptance criteria
|
|
89
|
+
If no spec files exist → derive scenarios from `tasks/todo.md` acceptance criteria, write to `e2e/<feature>.spec.ts`, check `e2e/helpers/` for shared utilities, then run.
|
|
106
90
|
|
|
107
|
-
|
|
108
|
-
- Test name / suite
|
|
109
|
-
- Result: PASS or FAIL
|
|
110
|
-
- On FAIL: error message and relevant snapshot
|
|
91
|
+
Record per test: name/suite, PASS or FAIL, on FAIL: error + snapshot excerpt.
|
|
111
92
|
|
|
112
|
-
Skip to **Step 5
|
|
93
|
+
Skip to **Step 5**.
|
|
113
94
|
|
|
114
|
-
### 3b. Detect Local Server (agent-browser
|
|
95
|
+
### 3b. Detect Local Server (agent-browser only)
|
|
115
96
|
|
|
116
|
-
|
|
97
|
+
Playwright's `webServer` handles this automatically — only needed for agent-browser.
|
|
117
98
|
|
|
118
|
-
|
|
119
|
-
- Check
|
|
120
|
-
- Check for `artisan serve` in Laravel projects (`php artisan serve`)
|
|
121
|
-
- Check for `vite` or `next dev`
|
|
122
|
-
- If a server is already running (check common ports: 3000, 5173, 8000, 8080), use it
|
|
123
|
-
- If no server is running, start one in the background and note the URL
|
|
99
|
+
- Check `package.json` scripts (`dev`, `start`), `artisan serve`, `vite`, `next dev`
|
|
100
|
+
- Check common ports: 3000, 5173, 8000, 8080; use existing server or start one in background
|
|
124
101
|
|
|
125
|
-
### 4. Locate E2E Test Files (agent-browser
|
|
102
|
+
### 4. Locate E2E Test Files (agent-browser only)
|
|
126
103
|
|
|
127
|
-
Find E2E test scenarios written during the Write Tests step:
|
|
128
104
|
```bash
|
|
129
105
|
find . -name "*.e2e.*" -o -name "*.spec.*" | grep -v node_modules
|
|
130
106
|
ls tests/e2e/ 2>/dev/null
|
|
131
107
|
```
|
|
132
108
|
|
|
133
|
-
If
|
|
109
|
+
If none exist, derive scenarios from `tasks/todo.md` and `tasks/findings.md`.
|
|
134
110
|
|
|
135
111
|
### 4b. Run E2E Scenarios via agent-browser
|
|
136
112
|
|
|
137
|
-
For each scenario, use agent-browser following this core pattern:
|
|
138
|
-
|
|
139
113
|
```bash
|
|
140
|
-
# Navigate to the page
|
|
141
114
|
agent-browser open <url>
|
|
142
|
-
|
|
143
|
-
#
|
|
144
|
-
agent-browser snapshot -i
|
|
145
|
-
|
|
146
|
-
# Interact using @refs (never CSS selectors)
|
|
147
|
-
agent-browser click @e1
|
|
115
|
+
agent-browser snapshot -i # token-efficient ref-based snapshot
|
|
116
|
+
agent-browser click @e1 # use @refs — never CSS selectors
|
|
148
117
|
agent-browser fill @e2 "input value"
|
|
149
118
|
agent-browser press Enter
|
|
150
|
-
|
|
151
|
-
# Use semantic locators when @refs aren't stable
|
|
152
|
-
agent-browser find role button
|
|
119
|
+
agent-browser find role button # semantic locators when @refs unstable
|
|
153
120
|
agent-browser find text "Expected Text"
|
|
154
121
|
agent-browser find label "Email"
|
|
155
|
-
|
|
156
|
-
# Assert expected state
|
|
157
|
-
agent-browser snapshot # check content
|
|
122
|
+
agent-browser snapshot # assert state
|
|
158
123
|
agent-browser find text "Success Message"
|
|
159
124
|
```
|
|
160
125
|
|
|
161
|
-
**
|
|
126
|
+
**Use @refs or semantic locators (`find role`, `find text`, `find label`, `find placeholder`). Never CSS selectors.**
|
|
162
127
|
|
|
163
|
-
|
|
164
|
-
- Scenario name
|
|
165
|
-
- Steps executed
|
|
166
|
-
- Result: PASS or FAIL
|
|
167
|
-
- On FAIL: what was expected vs. what was found (include snapshot excerpt)
|
|
128
|
+
Record per scenario: name, steps, PASS/FAIL, on FAIL: expected vs. actual + snapshot excerpt.
|
|
168
129
|
|
|
169
130
|
### 5. Report Results
|
|
170
131
|
|
|
171
132
|
```
|
|
172
133
|
E2E Runner: Playwright CLI (or: agent-browser)
|
|
173
134
|
E2E Results:
|
|
174
|
-
PASS [scenario name]
|
|
175
135
|
PASS [scenario name]
|
|
176
136
|
FAIL [scenario name] — expected "X" but found "Y"
|
|
177
137
|
|
|
178
138
|
Total: X passed, Y failed
|
|
179
139
|
```
|
|
180
140
|
|
|
181
|
-
|
|
182
|
-
If any fail → apply Fix & Retest Protocol.
|
|
141
|
+
All pass → no action needed. Any fail → apply Fix & Retest Protocol.
|
|
183
142
|
|
|
184
143
|
## Fix & Retest Protocol
|
|
185
144
|
|
|
186
|
-
|
|
145
|
+
Classify before committing:
|
|
187
146
|
|
|
188
|
-
|
|
147
|
+
| Type | Action |
|
|
148
|
+
|------|--------|
|
|
149
|
+
| Style/config/wording (CSS, copy, selector) | Include in gate's squash commit, re-run `/sk:e2e`. No user prompt. |
|
|
150
|
+
| Logic change (branch, condition, data path, query, function, API) | 1) Update/add failing unit tests 2) `/sk:test` at 100% coverage 3) Commit tests + fix: `fix(e2e): [description]` 4) Re-run `/sk:e2e` from scratch |
|
|
151
|
+
| Formatter auto-fixes | Never logic changes — bypass protocol automatically. |
|
|
189
152
|
|
|
190
|
-
|
|
191
|
-
1. Update or add failing unit tests for the new behavior
|
|
192
|
-
2. Re-run `/sk:test` — must pass at 100% coverage
|
|
193
|
-
3. Commit tests + fix together with `fix(e2e): [description]`.
|
|
194
|
-
4. Re-run `/sk:e2e` from scratch
|
|
153
|
+
Squash gate commits: collect all fixes, then one commit: `fix(e2e): resolve failing E2E scenarios`.
|
|
195
154
|
|
|
196
|
-
**
|
|
197
|
-
|
|
198
|
-
> Squash gate commits — collect all fixes for the pass, then one commit: `fix(e2e): resolve failing E2E scenarios`. Do not commit after each individual fix.
|
|
199
|
-
|
|
200
|
-
**This gate cannot be skipped.** All scenarios must pass before proceeding to `/sk:update-task`.
|
|
155
|
+
**This gate cannot be skipped.** All scenarios must pass before `/sk:update-task`.
|
|
201
156
|
|
|
202
157
|
### Pre-existing Issues
|
|
203
158
|
|
|
204
|
-
If
|
|
159
|
+
If a bug is found outside the current feature, do NOT fix inline. Log to `tasks/tech-debt.md`:
|
|
205
160
|
|
|
206
161
|
```
|
|
207
162
|
### [YYYY-MM-DD] Found during: sk:e2e
|
|
208
163
|
File: path/to/file.ext:line
|
|
209
|
-
Issue: description
|
|
164
|
+
Issue: description
|
|
210
165
|
Severity: critical | high | medium | low
|
|
211
166
|
```
|
|
212
167
|
|
|
213
|
-
|
|
168
|
+
Pre-existing bugs don't block this gate unless they affect the current feature's scenarios.
|
|
214
169
|
|
|
215
170
|
## Next Steps
|
|
216
171
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
>
|
|
220
|
-
> No manual commit is needed — any fixes made during this gate were auto-committed.
|
|
221
|
-
|
|
222
|
-
If failures remain after fixes:
|
|
223
|
-
> "Re-running /sk:e2e — [N] scenarios still failing."
|
|
172
|
+
- All pass: "E2E gate clean. Run `/sk:update-task` to mark the task done." (fixes were auto-committed)
|
|
173
|
+
- Failures remain: "Re-running /sk:e2e — [N] scenarios still failing."
|
|
224
174
|
|
|
225
175
|
---
|
|
226
176
|
|
|
227
177
|
## Playwright Setup Reference
|
|
228
178
|
|
|
229
|
-
When setting up Playwright for the first time in a project:
|
|
230
|
-
|
|
231
179
|
```bash
|
|
232
180
|
npm install -D @playwright/test
|
|
233
181
|
npx playwright install chromium
|
|
234
182
|
```
|
|
235
183
|
|
|
236
|
-
Minimal `playwright.config.ts
|
|
184
|
+
Minimal `playwright.config.ts`:
|
|
237
185
|
|
|
238
186
|
```ts
|
|
239
187
|
import { defineConfig, devices } from '@playwright/test'
|
|
@@ -263,7 +211,7 @@ export default defineConfig({
|
|
|
263
211
|
})
|
|
264
212
|
```
|
|
265
213
|
|
|
266
|
-
E2E
|
|
214
|
+
E2E helpers go in `e2e/helpers/`. Auth helper pattern:
|
|
267
215
|
|
|
268
216
|
```ts
|
|
269
217
|
// e2e/helpers/auth.ts
|
|
@@ -289,7 +237,7 @@ export const TEST_USERS = {
|
|
|
289
237
|
}
|
|
290
238
|
```
|
|
291
239
|
|
|
292
|
-
Test credentials
|
|
240
|
+
Test credentials in `.env.local` (never hardcoded):
|
|
293
241
|
```
|
|
294
242
|
E2E_USER_EMAIL=...
|
|
295
243
|
E2E_USER_PASSWORD=...
|
|
@@ -7,16 +7,9 @@ description: "Sync docs/sk:features/ specs with the current codebase. Auto-detec
|
|
|
7
7
|
|
|
8
8
|
# /sk:features
|
|
9
9
|
|
|
10
|
-
Keep feature specifications in `docs/sk:features/` in sync with the actual codebase.
|
|
11
|
-
Works with **any project** — framework-agnostic, auto-discovers source structure.
|
|
10
|
+
Keep feature specifications in `docs/sk:features/` in sync with the actual codebase. Framework-agnostic, auto-discovers source structure.
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Maintains `docs/sk:features/` as a platform-agnostic feature specification system —
|
|
16
|
-
the single source of truth shared between web, mobile, and any other platform
|
|
17
|
-
that uses the same backend. Each spec covers: DB schema, business logic, API
|
|
18
|
-
contract, permissions, edge cases, error states, web/mobile UI behavior, and
|
|
19
|
-
platform divergences.
|
|
12
|
+
Maintains `docs/sk:features/` as a platform-agnostic feature specification system — single source of truth for web, mobile, and any other platform sharing the same backend. Each spec covers: DB schema, business logic, API contract, permissions, edge cases, error states, web/mobile UI behavior, and platform divergences.
|
|
20
13
|
|
|
21
14
|
---
|
|
22
15
|
|
|
@@ -24,34 +17,24 @@ platform divergences.
|
|
|
24
17
|
|
|
25
18
|
### Step 1: Detect Project State
|
|
26
19
|
|
|
27
|
-
Check what exists:
|
|
28
|
-
|
|
29
20
|
```bash
|
|
30
21
|
ls docs/sk:features/ 2>/dev/null && echo "EXISTS" || echo "MISSING"
|
|
31
22
|
ls docs/FEATURES.md 2>/dev/null && echo "INDEX_EXISTS" || echo "INDEX_MISSING"
|
|
32
23
|
```
|
|
33
24
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
- Yes → jump to **[Create From Scratch](#create-from-scratch)** below
|
|
37
|
-
- No → stop
|
|
38
|
-
|
|
39
|
-
**If `docs/sk:features/` exists:**
|
|
40
|
-
Continue to Step 2.
|
|
25
|
+
- `docs/sk:features/` **missing** → ask user: "No feature specification system found. Create one from scratch?" → Yes: jump to [Create From Scratch](#create-from-scratch) / No: stop
|
|
26
|
+
- `docs/sk:features/` **exists** → continue to Step 2
|
|
41
27
|
|
|
42
28
|
---
|
|
43
29
|
|
|
44
30
|
### Step 2: Determine Update Scope
|
|
45
31
|
|
|
46
|
-
Present three options:
|
|
32
|
+
Present three options and wait for choice:
|
|
47
33
|
|
|
48
|
-
> **What would you like to update?**
|
|
49
34
|
> **A. Auto-detect** *(recommended)* — scan recent git changes, update only affected specs
|
|
50
|
-
> **B. Select features** — pick which specs to update
|
|
35
|
+
> **B. Select features** — pick which specs to update
|
|
51
36
|
> **C. Refresh all** — update every spec from current source code
|
|
52
37
|
|
|
53
|
-
Wait for the user's choice.
|
|
54
|
-
|
|
55
38
|
---
|
|
56
39
|
|
|
57
40
|
### Step 3A: Auto-detect Changed Features
|
|
@@ -60,24 +43,15 @@ Wait for the user's choice.
|
|
|
60
43
|
git log --since="7 days ago" --name-only --pretty=format: | grep -v '^$' | sort -u
|
|
61
44
|
```
|
|
62
45
|
|
|
63
|
-
Map changed
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
- Match by **directory**: if the spec is `budgets.md`, match files under any `budgets/` or `budget/` directory.
|
|
69
|
-
- Match by **schema files**: if any migration file, `schema.sql`, `schema.prisma`, `database.ts`, or similar schema file changed → mark ALL specs as potentially affected (schema changes ripple everywhere).
|
|
70
|
-
3. Deduplicate the affected spec list.
|
|
71
|
-
4. Report which specs will be updated and ask for confirmation.
|
|
72
|
-
|
|
73
|
-
---
|
|
46
|
+
Map changed files to specs:
|
|
47
|
+
1. Read `docs/FEATURES.md` for the spec list.
|
|
48
|
+
2. For each changed file, match by feature name similarity (e.g., `expenses.md` ↔ paths containing `expense`) or by directory (`budgets.md` ↔ `budgets/` or `budget/`).
|
|
49
|
+
3. If any migration, `schema.sql`, `schema.prisma`, `database.ts`, or similar schema file changed → mark ALL specs as potentially affected.
|
|
50
|
+
4. Deduplicate and report; ask for confirmation.
|
|
74
51
|
|
|
75
52
|
### Step 3B: User Selects Features
|
|
76
53
|
|
|
77
|
-
List all `.md` files in `docs/sk:features/` (excluding `_template.md`).
|
|
78
|
-
Let the user pick which ones to update.
|
|
79
|
-
|
|
80
|
-
---
|
|
54
|
+
List all `.md` files in `docs/sk:features/` (excluding `_template.md`). Let user pick.
|
|
81
55
|
|
|
82
56
|
### Step 3C: Refresh All
|
|
83
57
|
|
|
@@ -87,93 +61,72 @@ Set update list = all `.md` files in `docs/sk:features/` (excluding `_template.m
|
|
|
87
61
|
|
|
88
62
|
### Step 4: Update Each Affected Spec
|
|
89
63
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
#### 4a. Read the existing spec
|
|
93
|
-
Understand its current content and section structure.
|
|
64
|
+
#### 4a. Read existing spec — understand current content and section structure.
|
|
94
65
|
|
|
95
|
-
#### 4b. Discover relevant source files
|
|
66
|
+
#### 4b. Discover relevant source files (three-step, no hardcoded paths):
|
|
96
67
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
1. **Name-based search**: the feature name from the spec filename (e.g., `expenses.md` → feature name `expenses`). Search the repo:
|
|
68
|
+
1. **Name-based search** — e.g., `expenses.md` → keyword `expenses`:
|
|
100
69
|
```bash
|
|
101
|
-
# Find files whose name contains the feature keyword
|
|
102
70
|
find . -type f \( -name "*expense*" -o -name "*expenses*" \) \
|
|
103
71
|
! -path "*/node_modules/*" ! -path "*/.git/*" ! -path "*/docs/*" \
|
|
104
72
|
2>/dev/null | head -30
|
|
105
73
|
```
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
2. **Related Docs in spec**: read the `## Related Docs` section of the existing spec — it lists previously referenced files. Read those files too.
|
|
74
|
+
2. **Related Docs section** — read previously referenced files listed in `## Related Docs`.
|
|
75
|
+
3. **DB schema hint** — read table names from `## Database Schema`; search migrations/schema files for those names.
|
|
109
76
|
|
|
110
|
-
|
|
77
|
+
#### 4c. Read all discovered source files.
|
|
111
78
|
|
|
112
|
-
####
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
#### 4d. Identify what changed
|
|
116
|
-
Compare the current source code against what the spec describes:
|
|
117
|
-
- New or removed DB columns / tables / constraints
|
|
118
|
-
- Changed business logic rules or state transitions
|
|
79
|
+
#### 4d. Identify what changed — compare source vs spec:
|
|
80
|
+
- New/removed DB columns, tables, constraints
|
|
81
|
+
- Changed business logic or state transitions
|
|
119
82
|
- New/changed API payloads or query patterns
|
|
120
83
|
- Updated permission keys or tier requirements
|
|
121
84
|
- New edge cases, error codes, or recovery paths
|
|
122
85
|
|
|
123
|
-
#### 4e.
|
|
124
|
-
Rewrite only the sections that are out of date. **Preserve all unchanged sections verbatim.**
|
|
125
|
-
Update the `> Status` block if the implementation status on either platform changed.
|
|
86
|
+
#### 4e. Rewrite only out-of-date sections. Preserve unchanged sections verbatim. Update `> Status` block if platform implementation status changed.
|
|
126
87
|
|
|
127
88
|
---
|
|
128
89
|
|
|
129
90
|
### Step 5: Handle New Features
|
|
130
91
|
|
|
131
|
-
If source
|
|
92
|
+
If source has a new feature (hook, route group, major component) with no spec:
|
|
132
93
|
|
|
133
|
-
1. Create `docs/sk:features/<feature-name>.md` using `
|
|
134
|
-
If `_template.md` doesn't exist, use this 11-section structure:
|
|
94
|
+
1. Create `docs/sk:features/<feature-name>.md` using `_template.md`, or this 11-section structure if template missing:
|
|
135
95
|
```
|
|
136
96
|
Status → Overview → Database Schema → Business Logic → API Contract
|
|
137
97
|
→ Permissions & Access Control → Edge Cases → Error States
|
|
138
98
|
→ UI/UX Behavior (### Web + ### Mobile) → Platform Notes → Related Docs
|
|
139
99
|
```
|
|
140
|
-
2. Fill all 11 sections from
|
|
141
|
-
3. Add
|
|
100
|
+
2. Fill all 11 sections from source code.
|
|
101
|
+
3. Add to `docs/FEATURES.md` under the appropriate section.
|
|
142
102
|
|
|
143
103
|
---
|
|
144
104
|
|
|
145
105
|
### Step 6: Update Master Index
|
|
146
106
|
|
|
147
|
-
Review `docs/FEATURES.md
|
|
148
|
-
- Add links for any new specs
|
|
149
|
-
- Update status columns (Web / Mobile) if implementation status changed
|
|
150
|
-
- Update any tier/feature tables if permissions changed
|
|
107
|
+
Review `docs/FEATURES.md` — add links for new specs, update status columns (Web/Mobile), update tier/feature tables if permissions changed.
|
|
151
108
|
|
|
152
109
|
---
|
|
153
110
|
|
|
154
111
|
### Step 7: Report and Commit
|
|
155
112
|
|
|
156
|
-
|
|
157
|
-
-
|
|
158
|
-
-
|
|
159
|
-
-
|
|
113
|
+
Summary format:
|
|
114
|
+
- Updated: `spec-name.md` — what changed (1 sentence)
|
|
115
|
+
- Added: new spec files
|
|
116
|
+
- Skipped: specs with no detected changes
|
|
160
117
|
|
|
161
118
|
Ask: **"Commit the updated specs?"**
|
|
162
|
-
- Yes → stage only
|
|
163
|
-
|
|
164
|
-
- No → leave changes unstaged for the user to review
|
|
119
|
+
- Yes → stage only `docs/` files and commit: `docs(features): update feature specs to reflect current implementation`
|
|
120
|
+
- No → leave unstaged for review
|
|
165
121
|
|
|
166
122
|
---
|
|
167
123
|
|
|
168
124
|
## Create From Scratch
|
|
169
125
|
|
|
170
|
-
When `docs/sk:features/` doesn't exist, discover and document all features:
|
|
171
|
-
|
|
172
126
|
### Discovery Phase
|
|
173
127
|
|
|
174
|
-
1. **Detect source structure
|
|
128
|
+
1. **Detect source structure:**
|
|
175
129
|
```bash
|
|
176
|
-
# Look for hooks, services, controllers, models, routes
|
|
177
130
|
ls src/ lib/ app/ 2>/dev/null
|
|
178
131
|
find . -maxdepth 4 -type f \
|
|
179
132
|
\( -name "use-*.ts" -o -name "use-*.js" \
|
|
@@ -182,7 +135,7 @@ When `docs/sk:features/` doesn't exist, discover and document all features:
|
|
|
182
135
|
! -path "*/node_modules/*" ! -path "*/.git/*" 2>/dev/null | head -50
|
|
183
136
|
```
|
|
184
137
|
|
|
185
|
-
2. **Detect schema files
|
|
138
|
+
2. **Detect schema files:**
|
|
186
139
|
```bash
|
|
187
140
|
find . -maxdepth 5 \
|
|
188
141
|
\( -name "schema.sql" -o -name "*.schema.prisma" \
|
|
@@ -192,21 +145,15 @@ When `docs/sk:features/` doesn't exist, discover and document all features:
|
|
|
192
145
|
ls prisma/ 2>/dev/null
|
|
193
146
|
```
|
|
194
147
|
|
|
195
|
-
3.
|
|
196
|
-
|
|
197
|
-
4. **Report discovered features** and ask the user to confirm/adjust the list before creating anything.
|
|
148
|
+
3. Group related files into named feature domains.
|
|
149
|
+
4. Report discovered features; ask user to confirm/adjust before creating anything.
|
|
198
150
|
|
|
199
151
|
### Creation Phase
|
|
200
152
|
|
|
201
|
-
For each confirmed feature:
|
|
202
|
-
1. Read all relevant source files.
|
|
203
|
-
2. Create `docs/sk:features/<feature-name>.md` with all 11 sections — based entirely on source code.
|
|
153
|
+
For each confirmed feature: read all relevant source files, create `docs/sk:features/<feature-name>.md` with all 11 sections from source code.
|
|
204
154
|
|
|
205
155
|
Also create:
|
|
206
|
-
- `docs/FEATURES.md` — master index
|
|
207
|
-
- How-to-use section (web path + mobile path via `../project-name/docs/`)
|
|
208
|
-
- Feature table grouped by domain
|
|
209
|
-
- Tier/subscription overview (if the project has tiers)
|
|
156
|
+
- `docs/FEATURES.md` — master index (how-to-use, feature table by domain, tier/subscription overview if applicable)
|
|
210
157
|
- `docs/sk:features/_template.md` — 11-section template for future specs
|
|
211
158
|
|
|
212
159
|
Commit: `docs: add feature specification system`
|
|
@@ -215,16 +162,14 @@ Commit: `docs: add feature specification system`
|
|
|
215
162
|
|
|
216
163
|
## Quality Rules (Always Apply)
|
|
217
164
|
|
|
218
|
-
- **Source-verified only** — every claim must be findable in source
|
|
165
|
+
- **Source-verified only** — every claim must be findable in source; never invent behavior
|
|
219
166
|
- **No placeholders** — no `// TODO`, no `false // will be computed`, no assumed values
|
|
220
|
-
- **Surgical updates** — only rewrite
|
|
221
|
-
- **Numeric JSX coercion** —
|
|
222
|
-
- **Local date, not UTC** —
|
|
167
|
+
- **Surgical updates** — only rewrite changed sections; preserve unchanged sections verbatim
|
|
168
|
+
- **Numeric JSX coercion** — note `!!value` (not `value &&`) for numerics to avoid rendering `0` as text in React/React Native
|
|
169
|
+
- **Local date, not UTC** — time-bounded queries must use local `new Date()`, not `toISOString()` (UTC causes off-by-one for non-UTC users)
|
|
223
170
|
- **All 11 sections required** — mark "N/A" only if genuinely not applicable
|
|
224
171
|
|
|
225
|
-
## Source Discovery Heuristics
|
|
226
|
-
|
|
227
|
-
When locating source files for a feature named `<name>`:
|
|
172
|
+
## Source Discovery Heuristics
|
|
228
173
|
|
|
229
174
|
| What to look for | Search pattern |
|
|
230
175
|
|---|---|
|
|
@@ -6,37 +6,26 @@ license: Complete terms in LICENSE.txt
|
|
|
6
6
|
|
|
7
7
|
## CRITICAL: Design Phase Only — NO CODE
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
This skill produces design artifacts only. Implementation happens in `/sk:execute-plan`.
|
|
10
10
|
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
- **DO produce** design direction, ASCII mockups, layout specs, component structure descriptions, color/typography decisions, and interaction notes
|
|
15
|
-
- Implementation happens in `/sk:execute-plan` — not here
|
|
16
|
-
|
|
17
|
-
This skill guides the design of distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. Output is a design artifact: a clear, decision-complete visual specification that `/sk:write-plan` and `/sk:execute-plan` can use to implement.
|
|
18
|
-
|
|
19
|
-
The user provides frontend requirements: a component, page, application, or interface to design. They may include context about the purpose, audience, or technical constraints.
|
|
11
|
+
- No code: no React, HTML/CSS/JS, file edits, or use of Edit/Write/Bash tools
|
|
12
|
+
- Pencil MCP tools ARE allowed — they create visual design artifacts, not code
|
|
13
|
+
- Produce: design direction, ASCII mockups, layout specs, component structure, color/typography decisions, interaction notes
|
|
20
14
|
|
|
21
15
|
## Before You Start
|
|
22
16
|
|
|
23
|
-
1. If `tasks/findings.md` exists and has content, read it in full
|
|
24
|
-
|
|
25
|
-
user to re-explain what was already decided in brainstorming.
|
|
26
|
-
|
|
27
|
-
2. If `tasks/lessons.md` exists, read it in full. Apply every active lesson as a
|
|
28
|
-
constraint during design — particularly any patterns flagged under **Bug** that
|
|
29
|
-
relate to frontend structure, component architecture, or styling conventions.
|
|
17
|
+
1. If `tasks/findings.md` exists and has content, read it in full — use the agreed approach as the design brief.
|
|
18
|
+
2. If `tasks/lessons.md` exists, read it in full — apply every active lesson as a constraint, especially Bug entries related to frontend structure, component architecture, or styling conventions.
|
|
30
19
|
|
|
31
20
|
## Design Thinking
|
|
32
21
|
|
|
33
|
-
Before
|
|
22
|
+
Before designing, commit to a BOLD aesthetic direction:
|
|
34
23
|
- **Purpose**: What problem does this interface solve? Who uses it?
|
|
35
|
-
- **Tone**: Pick an extreme: brutally minimal, maximalist chaos, retro-futuristic, organic/natural, luxury/refined, playful/toy-like, editorial/magazine, brutalist/raw, art deco/geometric, soft/pastel, industrial/utilitarian, etc.
|
|
24
|
+
- **Tone**: Pick an extreme: brutally minimal, maximalist chaos, retro-futuristic, organic/natural, luxury/refined, playful/toy-like, editorial/magazine, brutalist/raw, art deco/geometric, soft/pastel, industrial/utilitarian, etc.
|
|
36
25
|
- **Constraints**: Technical requirements (framework, performance, accessibility).
|
|
37
26
|
- **Differentiation**: What makes this UNFORGETTABLE? What's the one thing someone will remember?
|
|
38
27
|
|
|
39
|
-
**CRITICAL**: Choose a clear conceptual direction and execute it with precision. Bold maximalism and refined minimalism both work
|
|
28
|
+
**CRITICAL**: Choose a clear conceptual direction and execute it with precision. Bold maximalism and refined minimalism both work — the key is intentionality, not intensity.
|
|
40
29
|
|
|
41
30
|
Then produce a **design artifact** — not code — that includes:
|
|
42
31
|
- ASCII or text-based layout mockups for key screens/states
|
|
@@ -48,24 +37,19 @@ Then produce a **design artifact** — not code — that includes:
|
|
|
48
37
|
|
|
49
38
|
## Frontend Aesthetics Guidelines
|
|
50
39
|
|
|
51
|
-
|
|
52
|
-
- **Typography**: Choose fonts that are beautiful, unique, and interesting. Avoid generic fonts like Arial and Inter; opt instead for distinctive choices that elevate the frontend's aesthetics; unexpected, characterful font choices. Pair a distinctive display font with a refined body font.
|
|
40
|
+
- **Typography**: Choose beautiful, unique, unexpected fonts. Avoid generic families (Arial, Inter, Roboto, Space Grotesk). Pair a distinctive display font with a refined body font.
|
|
53
41
|
- **Color & Theme**: Commit to a cohesive aesthetic. Use CSS variables for consistency. Dominant colors with sharp accents outperform timid, evenly-distributed palettes.
|
|
54
|
-
- **Motion**:
|
|
42
|
+
- **Motion**: Animate for micro-interactions and effects. Prefer CSS-only for HTML; use Motion library for React. One well-orchestrated page load with staggered reveals creates more delight than scattered micro-interactions. Use scroll-triggering and hover states that surprise.
|
|
55
43
|
- **Spatial Composition**: Unexpected layouts. Asymmetry. Overlap. Diagonal flow. Grid-breaking elements. Generous negative space OR controlled density.
|
|
56
|
-
- **Backgrounds & Visual Details**: Create atmosphere and depth
|
|
57
|
-
|
|
58
|
-
NEVER use generic AI-generated aesthetics like overused font families (Inter, Roboto, Arial, system fonts), cliched color schemes (particularly purple gradients on white backgrounds), predictable layouts and component patterns, and cookie-cutter design that lacks context-specific character.
|
|
59
|
-
|
|
60
|
-
Interpret creatively and make unexpected choices that feel genuinely designed for the context. No design should be the same. Vary between light and dark themes, different fonts, different aesthetics. NEVER converge on common choices (Space Grotesk, for example) across generations.
|
|
44
|
+
- **Backgrounds & Visual Details**: Create atmosphere and depth. Add gradient meshes, noise textures, geometric patterns, layered transparencies, dramatic shadows, decorative borders, custom cursors, grain overlays — match the aesthetic.
|
|
61
45
|
|
|
62
|
-
|
|
46
|
+
NEVER use generic AI aesthetics: overused fonts (Inter, Roboto, Arial, system fonts, Space Grotesk), cliched purple-gradient-on-white color schemes, predictable layouts, or cookie-cutter patterns. Vary between light/dark themes, different fonts, and different aesthetics across generations.
|
|
63
47
|
|
|
64
|
-
|
|
48
|
+
**IMPORTANT**: Match design detail to the aesthetic vision. Maximalist designs need elaborate layout descriptions, rich animation notes, and dense component specs. Minimalist designs need precise spacing rules, restrained color notes, and careful typographic ratios. Commit to the vision fully.
|
|
65
49
|
|
|
66
50
|
## UX Quality Constraints
|
|
67
51
|
|
|
68
|
-
|
|
52
|
+
Hard constraints during design, ordered by priority. Skip categories irrelevant to the current design (e.g., Charts for a landing page).
|
|
69
53
|
|
|
70
54
|
| Priority | Category | Impact | Key Rule |
|
|
71
55
|
|---|---|---|---|
|
|
@@ -217,7 +201,7 @@ Apply these rules as hard constraints during design. They are organized by prior
|
|
|
217
201
|
|
|
218
202
|
## Professional UI Anti-Patterns
|
|
219
203
|
|
|
220
|
-
|
|
204
|
+
Frequently overlooked issues that make UI look unprofessional. Flag any of these in the design spec.
|
|
221
205
|
|
|
222
206
|
### Icons & Visual Elements
|
|
223
207
|
- **No emoji as icons** — use Heroicons, Lucide, or equivalent SVG sets
|