@kennethsolomon/shipkit 1.0.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 +321 -0
- package/bin/shipkit.js +146 -0
- package/commands/sk/brainstorm.md +63 -0
- package/commands/sk/branch.md +35 -0
- package/commands/sk/config.md +96 -0
- package/commands/sk/execute-plan.md +85 -0
- package/commands/sk/features.md +238 -0
- package/commands/sk/finish-feature.md +154 -0
- package/commands/sk/help.md +103 -0
- package/commands/sk/hotfix.md +61 -0
- package/commands/sk/plan.md +30 -0
- package/commands/sk/release.md +72 -0
- package/commands/sk/security-check.md +188 -0
- package/commands/sk/set-profile.md +71 -0
- package/commands/sk/status.md +25 -0
- package/commands/sk/update-task.md +35 -0
- package/commands/sk/write-plan.md +72 -0
- package/package.json +23 -0
- package/skills/sk:accessibility/LICENSE.txt +177 -0
- package/skills/sk:accessibility/SKILL.md +150 -0
- package/skills/sk:api-design/LICENSE.txt +177 -0
- package/skills/sk:api-design/SKILL.md +158 -0
- package/skills/sk:brainstorming/SKILL.md +124 -0
- package/skills/sk:debug/SKILL.md +252 -0
- package/skills/sk:debug/debug_conductor.py +177 -0
- package/skills/sk:debug/lib/__init__.py +1 -0
- package/skills/sk:debug/lib/bug_gatherer.py +55 -0
- package/skills/sk:debug/lib/context_reader.py +139 -0
- package/skills/sk:debug/lib/findings_writer.py +76 -0
- package/skills/sk:debug/lib/lessons_writer.py +165 -0
- package/skills/sk:debug/lib/step_runner.py +326 -0
- package/skills/sk:features/SKILL.md +238 -0
- package/skills/sk:frontend-design/LICENSE.txt +177 -0
- package/skills/sk:frontend-design/SKILL.md +191 -0
- package/skills/sk:laravel-init/SKILL.md +37 -0
- package/skills/sk:laravel-new/SKILL.md +68 -0
- package/skills/sk:lint/SKILL.md +113 -0
- package/skills/sk:perf/LICENSE.txt +177 -0
- package/skills/sk:perf/SKILL.md +188 -0
- package/skills/sk:release/SKILL.md +113 -0
- package/skills/sk:release/references/android-checklist.md +269 -0
- package/skills/sk:release/references/ios-checklist.md +339 -0
- package/skills/sk:release/release.sh +378 -0
- package/skills/sk:review/SKILL.md +346 -0
- package/skills/sk:review/references/security-checklist.md +223 -0
- package/skills/sk:schema-migrate/SKILL.md +125 -0
- package/skills/sk:schema-migrate/orms/drizzle.md +546 -0
- package/skills/sk:schema-migrate/orms/laravel.md +367 -0
- package/skills/sk:schema-migrate/orms/prisma.md +357 -0
- package/skills/sk:schema-migrate/orms/rails.md +351 -0
- package/skills/sk:schema-migrate/orms/sqlalchemy.md +385 -0
- package/skills/sk:schema-migrate/references/detection.md +110 -0
- package/skills/sk:setup-claude/SKILL.md +365 -0
- package/skills/sk:setup-claude/references/detection.md +6 -0
- package/skills/sk:setup-claude/references/templates.md +11 -0
- package/skills/sk:setup-claude/scripts/apply_setup_claude.py +443 -0
- package/skills/sk:setup-claude/scripts/detect_arch_changes.py +437 -0
- package/skills/sk:setup-claude/templates/.claude/docs/arch-changelog-guide.md.template +6 -0
- package/skills/sk:setup-claude/templates/.claude/docs/changelog-guide.md.template +12 -0
- package/skills/sk:setup-claude/templates/CHANGELOG.md.template +21 -0
- package/skills/sk:setup-claude/templates/CLAUDE.md.template +299 -0
- package/skills/sk:setup-claude/templates/arch-changelog-guide.md.template +3 -0
- package/skills/sk:setup-claude/templates/changelog-guide.md.template +3 -0
- package/skills/sk:setup-claude/templates/commands/brainstorm.md.template +74 -0
- package/skills/sk:setup-claude/templates/commands/execute-plan.md.template +57 -0
- package/skills/sk:setup-claude/templates/commands/features.md.template +238 -0
- package/skills/sk:setup-claude/templates/commands/finish-feature.md.template +155 -0
- package/skills/sk:setup-claude/templates/commands/plan.md.template +30 -0
- package/skills/sk:setup-claude/templates/commands/re-setup.md.template +38 -0
- package/skills/sk:setup-claude/templates/commands/release.md.template +74 -0
- package/skills/sk:setup-claude/templates/commands/security-check.md.template +172 -0
- package/skills/sk:setup-claude/templates/commands/status.md.template +17 -0
- package/skills/sk:setup-claude/templates/commands/write-plan.md.template +34 -0
- package/skills/sk:setup-claude/templates/finish-feature.md.template +3 -0
- package/skills/sk:setup-claude/templates/plan.md.template +3 -0
- package/skills/sk:setup-claude/templates/status.md.template +3 -0
- package/skills/sk:setup-claude/templates/tasks/findings.md.template +19 -0
- package/skills/sk:setup-claude/templates/tasks/lessons.md.template +26 -0
- package/skills/sk:setup-claude/templates/tasks/progress.md.template +20 -0
- package/skills/sk:setup-claude/templates/tasks/security-findings.md.template +5 -0
- package/skills/sk:setup-claude/templates/tasks/todo.md.template +26 -0
- package/skills/sk:setup-claude/templates/tasks/workflow-status.md.template +31 -0
- package/skills/sk:setup-claude/templates/tasks-findings.md.template +3 -0
- package/skills/sk:setup-claude/templates/tasks-lessons.md.template +3 -0
- package/skills/sk:setup-claude/templates/tasks-progress.md.template +3 -0
- package/skills/sk:setup-claude/templates/tasks-todo.md.template +3 -0
- package/skills/sk:setup-claude/tests/test_apply_setup_claude.py +193 -0
- package/skills/sk:setup-optimizer/SKILL.md +184 -0
- package/skills/sk:setup-optimizer/lib/__init__.py +24 -0
- package/skills/sk:setup-optimizer/lib/detect.py +205 -0
- package/skills/sk:setup-optimizer/lib/discover.py +221 -0
- package/skills/sk:setup-optimizer/lib/enrich.py +163 -0
- package/skills/sk:setup-optimizer/lib/merge.py +277 -0
- package/skills/sk:setup-optimizer/lib/sidecar.py +129 -0
- package/skills/sk:setup-optimizer/optimize_claude.py +174 -0
- package/skills/sk:setup-optimizer/templates/CLAUDE.md.template +105 -0
- package/skills/sk:skill-creator/LICENSE.txt +202 -0
- package/skills/sk:skill-creator/SKILL.md +479 -0
- package/skills/sk:skill-creator/agents/analyzer.md +274 -0
- package/skills/sk:skill-creator/agents/comparator.md +202 -0
- package/skills/sk:skill-creator/agents/grader.md +223 -0
- package/skills/sk:skill-creator/assets/eval_review.html +146 -0
- package/skills/sk:skill-creator/eval-viewer/generate_review.py +471 -0
- package/skills/sk:skill-creator/eval-viewer/viewer.html +1325 -0
- package/skills/sk:skill-creator/references/schemas.md +430 -0
- package/skills/sk:skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/skills/sk:skill-creator/scripts/generate_report.py +326 -0
- package/skills/sk:skill-creator/scripts/improve_description.py +248 -0
- package/skills/sk:skill-creator/scripts/package_skill.py +136 -0
- package/skills/sk:skill-creator/scripts/quick_validate.py +103 -0
- package/skills/sk:skill-creator/scripts/run_eval.py +310 -0
- package/skills/sk:skill-creator/scripts/run_loop.py +332 -0
- package/skills/sk:skill-creator/scripts/utils.py +47 -0
- package/skills/sk:smart-commit/SKILL.md +175 -0
- package/skills/sk:test/SKILL.md +171 -0
- package/skills/sk:write-tests/SKILL.md +195 -0
- package/skills/sk:write-tests/references/patterns.md +209 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Execute tasks/todo.md checkboxes in small batches; log to tasks/progress.md."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<!-- Generated by /sk:setup-claude -->
|
|
6
|
+
|
|
7
|
+
# /sk:execute-plan
|
|
8
|
+
|
|
9
|
+
Execute the plan in `tasks/todo.md` in small batches with clear checkpoints.
|
|
10
|
+
|
|
11
|
+
## Before You Start
|
|
12
|
+
|
|
13
|
+
1. If `tasks/lessons.md` exists, read it in full. Treat every active lesson as a
|
|
14
|
+
standing constraint for this entire session. Apply each prevention rule before
|
|
15
|
+
executing the first batch.
|
|
16
|
+
|
|
17
|
+
2. If `tasks/progress.md` exists and has Error Log entries, read the last 20 lines.
|
|
18
|
+
Do NOT repeat any action already recorded as a failed attempt — change approach.
|
|
19
|
+
|
|
20
|
+
## Steps
|
|
21
|
+
|
|
22
|
+
1. Read `tasks/todo.md` and identify the next unchecked items (up to ~6).
|
|
23
|
+
2. **Analyze dependencies and build waves.** For each unchecked item, determine
|
|
24
|
+
which other items it depends on. Group independent items into **waves**:
|
|
25
|
+
- Tasks within a wave have no dependency on each other — they run in parallel.
|
|
26
|
+
- A wave only starts after the previous wave completes.
|
|
27
|
+
- Example: Task A and B are independent → Wave 1. Task C depends on A → Wave 2.
|
|
28
|
+
3. **Execute each wave:**
|
|
29
|
+
- For waves with a single task, execute it directly.
|
|
30
|
+
- For waves with multiple tasks, dispatch each task to a **sub-agent** (Agent tool)
|
|
31
|
+
with fresh context. Each sub-agent receives:
|
|
32
|
+
- The specific task(s) to implement
|
|
33
|
+
- The full plan from `tasks/todo.md` for orientation
|
|
34
|
+
- Relevant file paths / codebase context needed for that task
|
|
35
|
+
- NOT the current conversation history (fresh context prevents context rot)
|
|
36
|
+
- Each task (whether direct or sub-agent):
|
|
37
|
+
- Make the smallest change that satisfies the step
|
|
38
|
+
- Run the verification specified (or add it if missing)
|
|
39
|
+
- Log what was done in `tasks/progress.md` (files touched + commands run + results)
|
|
40
|
+
- If something important was learned, append it to `tasks/findings.md`
|
|
41
|
+
4. After all waves in the batch complete, report:
|
|
42
|
+
- what changed
|
|
43
|
+
- verification results
|
|
44
|
+
- what's next
|
|
45
|
+
- After all items in this batch pass verification, the code is ready to stage.
|
|
46
|
+
Run `/sk:smart-commit` after any passed batch, or accumulate and commit at plan completion.
|
|
47
|
+
Never combine more than one logical unit of work in a single commit.
|
|
48
|
+
5. Stop and wait for user feedback before continuing.
|
|
49
|
+
|
|
50
|
+
## Failure handling
|
|
51
|
+
- Log every failure (error + attempt # + fix) in `tasks/progress.md`.
|
|
52
|
+
- Do not repeat the same failing action; change approach.
|
|
53
|
+
- After 3 failed attempts, stop and ask the user with details.
|
|
54
|
+
|
|
55
|
+
## On User Correction
|
|
56
|
+
|
|
57
|
+
If the user corrects your approach during execution, immediately append to
|
|
58
|
+
`tasks/lessons.md`:
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
### [YYYY-MM-DD] [Brief title]
|
|
62
|
+
**Bug:** What you did wrong
|
|
63
|
+
**Root cause:** Why the approach was wrong
|
|
64
|
+
**Prevention:** What to do instead next time
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Then continue with the corrected approach.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Model Routing
|
|
72
|
+
|
|
73
|
+
Read `.shipkit/sk:config.json` from the project root if it exists.
|
|
74
|
+
|
|
75
|
+
- If `model_overrides["sk:execute-plan"]` is set, use that model — it takes precedence.
|
|
76
|
+
- Otherwise use the `profile` field. Default: `balanced`.
|
|
77
|
+
|
|
78
|
+
| Profile | Model |
|
|
79
|
+
|---------|-------|
|
|
80
|
+
| `full-sail` | opus (inherit) |
|
|
81
|
+
| `quality` | opus (inherit) |
|
|
82
|
+
| `balanced` | sonnet |
|
|
83
|
+
| `budget` | sonnet |
|
|
84
|
+
|
|
85
|
+
> `opus` = inherit. When spawning sub-agents via the Agent tool, pass `model: "<resolved-model>"`.
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: features
|
|
3
|
+
description: "Sync docs/sk:features/ specs with the current codebase. Auto-detects changed areas and updates only affected specs. Creates the spec system from scratch if it doesn't exist."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- Generated by /sk:setup-claude -->
|
|
7
|
+
|
|
8
|
+
# /sk:features
|
|
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.
|
|
12
|
+
|
|
13
|
+
## What This Does
|
|
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.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Steps
|
|
24
|
+
|
|
25
|
+
### Step 1: Detect Project State
|
|
26
|
+
|
|
27
|
+
Check what exists:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
ls docs/sk:features/ 2>/dev/null && echo "EXISTS" || echo "MISSING"
|
|
31
|
+
ls docs/FEATURES.md 2>/dev/null && echo "INDEX_EXISTS" || echo "INDEX_MISSING"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**If `docs/sk:features/` does not exist:**
|
|
35
|
+
Ask the user: "No feature specification system found. Create one from scratch?"
|
|
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.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
### Step 2: Determine Update Scope
|
|
45
|
+
|
|
46
|
+
Present three options:
|
|
47
|
+
|
|
48
|
+
> **What would you like to update?**
|
|
49
|
+
> **A. Auto-detect** *(recommended)* — scan recent git changes, update only affected specs
|
|
50
|
+
> **B. Select features** — pick which specs to update from the list
|
|
51
|
+
> **C. Refresh all** — update every spec from current source code
|
|
52
|
+
|
|
53
|
+
Wait for the user's choice.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
### Step 3A: Auto-detect Changed Features
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
git log --since="7 days ago" --name-only --pretty=format: | grep -v '^$' | sort -u
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Map changed file paths to feature specs using these rules:
|
|
64
|
+
|
|
65
|
+
1. **Read `docs/FEATURES.md`** to get the list of all spec files and their names.
|
|
66
|
+
2. For each changed file, determine which spec it belongs to:
|
|
67
|
+
- Match by **feature name similarity**: if the spec is `expenses.md`, look for changed files containing `expense` in their path.
|
|
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
|
+
---
|
|
74
|
+
|
|
75
|
+
### Step 3B: User Selects Features
|
|
76
|
+
|
|
77
|
+
List all `.md` files in `docs/sk:features/` (excluding `_template.md`).
|
|
78
|
+
Let the user pick which ones to update.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
### Step 3C: Refresh All
|
|
83
|
+
|
|
84
|
+
Set update list = all `.md` files in `docs/sk:features/` (excluding `_template.md`).
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
### Step 4: Update Each Affected Spec
|
|
89
|
+
|
|
90
|
+
For each spec file to update, follow this sequence:
|
|
91
|
+
|
|
92
|
+
#### 4a. Read the existing spec
|
|
93
|
+
Understand its current content and section structure.
|
|
94
|
+
|
|
95
|
+
#### 4b. Discover relevant source files
|
|
96
|
+
|
|
97
|
+
Use a three-step lookup — no hardcoded paths:
|
|
98
|
+
|
|
99
|
+
1. **Name-based search**: the feature name from the spec filename (e.g., `expenses.md` → feature name `expenses`). Search the repo:
|
|
100
|
+
```bash
|
|
101
|
+
# Find files whose name contains the feature keyword
|
|
102
|
+
find . -type f \( -name "*expense*" -o -name "*expenses*" \) \
|
|
103
|
+
! -path "*/node_modules/*" ! -path "*/.git/*" ! -path "*/docs/*" \
|
|
104
|
+
2>/dev/null | head -30
|
|
105
|
+
```
|
|
106
|
+
Adjust the keyword to match the feature name.
|
|
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.
|
|
109
|
+
|
|
110
|
+
3. **DB schema hint**: read the `## Database Schema` section — it names tables. Search migrations and schema files for those table names.
|
|
111
|
+
|
|
112
|
+
#### 4c. Read the source files
|
|
113
|
+
Read all discovered source files to understand the current implementation.
|
|
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
|
|
119
|
+
- New/changed API payloads or query patterns
|
|
120
|
+
- Updated permission keys or tier requirements
|
|
121
|
+
- New edge cases, error codes, or recovery paths
|
|
122
|
+
|
|
123
|
+
#### 4e. Update only changed sections
|
|
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.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
### Step 5: Handle New Features
|
|
130
|
+
|
|
131
|
+
If source code has a clear new feature (new hook, new route group, new major component) with no corresponding spec:
|
|
132
|
+
|
|
133
|
+
1. Create `docs/sk:features/<feature-name>.md` using `docs/sk:features/_template.md` as base.
|
|
134
|
+
If `_template.md` doesn't exist, use this 11-section structure:
|
|
135
|
+
```
|
|
136
|
+
Status → Overview → Database Schema → Business Logic → API Contract
|
|
137
|
+
→ Permissions & Access Control → Edge Cases → Error States
|
|
138
|
+
→ UI/UX Behavior (### Web + ### Mobile) → Platform Notes → Related Docs
|
|
139
|
+
```
|
|
140
|
+
2. Fill all 11 sections from current source code.
|
|
141
|
+
3. Add the new spec to `docs/FEATURES.md` under the appropriate section.
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
### Step 6: Update Master Index
|
|
146
|
+
|
|
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
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
### Step 7: Report and Commit
|
|
155
|
+
|
|
156
|
+
Show a summary:
|
|
157
|
+
- ✅ **Updated**: `spec-name.md` — what changed (1 sentence each)
|
|
158
|
+
- ➕ **Added**: any new spec files
|
|
159
|
+
- ⏭️ **Skipped**: specs with no detected changes
|
|
160
|
+
|
|
161
|
+
Ask: **"Commit the updated specs?"**
|
|
162
|
+
- Yes → stage only files under `docs/` and commit:
|
|
163
|
+
`docs(features): update feature specs to reflect current implementation`
|
|
164
|
+
- No → leave changes unstaged for the user to review
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## Create From Scratch
|
|
169
|
+
|
|
170
|
+
When `docs/sk:features/` doesn't exist, discover and document all features:
|
|
171
|
+
|
|
172
|
+
### Discovery Phase
|
|
173
|
+
|
|
174
|
+
1. **Detect source structure** — find where feature logic lives:
|
|
175
|
+
```bash
|
|
176
|
+
# Look for hooks, services, controllers, models, routes
|
|
177
|
+
ls src/ lib/ app/ 2>/dev/null
|
|
178
|
+
find . -maxdepth 4 -type f \
|
|
179
|
+
\( -name "use-*.ts" -o -name "use-*.js" \
|
|
180
|
+
-o -name "*.service.ts" -o -name "*.controller.ts" \
|
|
181
|
+
-o -name "*.model.ts" -o -name "*.router.ts" \) \
|
|
182
|
+
! -path "*/node_modules/*" ! -path "*/.git/*" 2>/dev/null | head -50
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
2. **Detect schema files** — migrations, ORM schemas:
|
|
186
|
+
```bash
|
|
187
|
+
find . -maxdepth 5 \
|
|
188
|
+
\( -name "schema.sql" -o -name "*.schema.prisma" \
|
|
189
|
+
-o -name "database.ts" -o -name "*.migration.*" \) \
|
|
190
|
+
! -path "*/node_modules/*" ! -path "*/.git/*" 2>/dev/null
|
|
191
|
+
ls supabase/migrations/ 2>/dev/null | tail -10
|
|
192
|
+
ls prisma/ 2>/dev/null
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
3. **Identify feature domains** from the discovered files — group related files into named features.
|
|
196
|
+
|
|
197
|
+
4. **Report discovered features** and ask the user to confirm/adjust the list before creating anything.
|
|
198
|
+
|
|
199
|
+
### Creation Phase
|
|
200
|
+
|
|
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.
|
|
204
|
+
|
|
205
|
+
Also create:
|
|
206
|
+
- `docs/FEATURES.md` — master index with:
|
|
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)
|
|
210
|
+
- `docs/sk:features/_template.md` — 11-section template for future specs
|
|
211
|
+
|
|
212
|
+
Commit: `docs: add feature specification system`
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## Quality Rules (Always Apply)
|
|
217
|
+
|
|
218
|
+
- **Source-verified only** — every claim must be findable in source code; never invent behavior
|
|
219
|
+
- **No placeholders** — no `// TODO`, no `false // will be computed`, no assumed values
|
|
220
|
+
- **Surgical updates** — only rewrite what changed; preserve unchanged sections verbatim
|
|
221
|
+
- **Numeric JSX coercion** — when documenting frontend behavior, note `!!value` (not `value &&`) for numerics to avoid rendering `0` as text in React/React Native
|
|
222
|
+
- **Local date, not UTC** — for any time-bounded query (current month, today, etc.), document that implementations must use local `new Date()`, not `toISOString()` which returns UTC and causes off-by-one for users in non-UTC timezones
|
|
223
|
+
- **All 11 sections required** — mark "N/A" only if genuinely not applicable
|
|
224
|
+
|
|
225
|
+
## Source Discovery Heuristics (Reference)
|
|
226
|
+
|
|
227
|
+
When locating source files for a feature named `<name>`:
|
|
228
|
+
|
|
229
|
+
| What to look for | Search pattern |
|
|
230
|
+
|---|---|
|
|
231
|
+
| Hooks / composables | `use-<name>.*`, `use<Name>.*` |
|
|
232
|
+
| Components | directories or files matching `<name>/`, `*<name>*` |
|
|
233
|
+
| API routes / controllers | `<name>.route.*`, `<name>.controller.*`, `api/<name>/` |
|
|
234
|
+
| Services / repositories | `<name>.service.*`, `<name>.repo.*` |
|
|
235
|
+
| DB schema | `migrations/` containing table name, `schema.prisma`, `database.ts` |
|
|
236
|
+
| Tests | `<name>.test.*`, `<name>.spec.*` |
|
|
237
|
+
|
|
238
|
+
These are starting points — read broadly and verify before updating any section.
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
<!-- Generated by /sk:setup-claude -->
|
|
2
|
+
<!-- Template Hash: 7deba6efd53c -->
|
|
3
|
+
|
|
4
|
+
# Finish Feature Command
|
|
5
|
+
|
|
6
|
+
Finalize a feature/bug-fix branch: changelog, arch log, security gate, verification, and PR creation.
|
|
7
|
+
|
|
8
|
+
This is the **last step before `/sk:release`**. It auto-commits documentation changes (changelog, arch log) so you don't need to loop back to `/sk:smart-commit` for docs-only work.
|
|
9
|
+
|
|
10
|
+
## Before You Start
|
|
11
|
+
|
|
12
|
+
If `tasks/lessons.md` exists, read it in full. For each active lesson, scan the
|
|
13
|
+
final diff (`git diff main..HEAD`) for the **Bug** pattern described in that lesson
|
|
14
|
+
before marking the feature done. This is the last gate before merge — catch recurring
|
|
15
|
+
mistakes here rather than in review.
|
|
16
|
+
|
|
17
|
+
If `tasks/security-findings.md` exists, read it. Check that any Critical or High
|
|
18
|
+
severity findings from the most recent `/sk:security-check` audit have been addressed.
|
|
19
|
+
If unresolved Critical/High findings remain, warn the user before proceeding.
|
|
20
|
+
|
|
21
|
+
## Steps
|
|
22
|
+
|
|
23
|
+
1. **Check Git Branch**
|
|
24
|
+
- Verify you are not on `main`
|
|
25
|
+
- Create a branch if needed: `feature/<desc>`, `fix/<desc>`, or `chore/<desc>`
|
|
26
|
+
|
|
27
|
+
2. **Show Branch Summary**
|
|
28
|
+
- `git status --short`
|
|
29
|
+
- `git log main..HEAD --oneline`
|
|
30
|
+
|
|
31
|
+
3. **Verify `CHANGELOG.md` Updated**
|
|
32
|
+
- Ensure an entry exists under `[Unreleased]`
|
|
33
|
+
- Follow `.claude/docs/changelog-guide.md`
|
|
34
|
+
- If CHANGELOG.md needs updating, make the edit and auto-commit:
|
|
35
|
+
```bash
|
|
36
|
+
git add CHANGELOG.md
|
|
37
|
+
git commit -m "docs: update CHANGELOG.md for unreleased changes"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
4. **Check for Architectural Changes**
|
|
41
|
+
|
|
42
|
+
The auto-detector scans for architecture-relevant changes:
|
|
43
|
+
- Schema/database changes (migrations, models, databases)
|
|
44
|
+
- API/route structure changes (endpoints, controllers)
|
|
45
|
+
- Component/module organization changes
|
|
46
|
+
- Configuration changes affecting architecture
|
|
47
|
+
- New subsystems or major refactors
|
|
48
|
+
- Dependency changes
|
|
49
|
+
|
|
50
|
+
Run to see what would be detected:
|
|
51
|
+
```bash
|
|
52
|
+
python3 $HOME/.claude/skills/sk:setup-claude/scripts/detect_arch_changes.py --dry-run
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
If architectural changes detected:
|
|
56
|
+
a) **Auto-generate the draft:**
|
|
57
|
+
```bash
|
|
58
|
+
python3 $HOME/.claude/skills/sk:setup-claude/scripts/detect_arch_changes.py
|
|
59
|
+
```
|
|
60
|
+
This creates a markdown draft in `.claude/docs/architectural_change_log/`
|
|
61
|
+
|
|
62
|
+
b) **Review and edit the draft:**
|
|
63
|
+
- Open the generated file
|
|
64
|
+
- Fill in [TODO] sections:
|
|
65
|
+
- Detailed Changes: What specifically changed?
|
|
66
|
+
- Before & After: Show the comparison
|
|
67
|
+
- Affected Components: What parts of system are impacted?
|
|
68
|
+
- Migration/Compatibility: Any breaking changes?
|
|
69
|
+
- Verify the auto-filled sections (Summary, Type, What Changed, Impact)
|
|
70
|
+
|
|
71
|
+
c) **Auto-commit the arch log** (no need to go back to `/sk:smart-commit`):
|
|
72
|
+
```bash
|
|
73
|
+
git add .claude/docs/architectural_change_log/
|
|
74
|
+
git commit -m "docs: add architectural changelog entry"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
If no architectural changes detected: skip to step 5.
|
|
78
|
+
|
|
79
|
+
5. **Verification** (with Test Checklist for Reviewers)
|
|
80
|
+
|
|
81
|
+
Tests should have been created during `/sk:execute-plan`. Verify:
|
|
82
|
+
|
|
83
|
+
a) **Automated Tests**
|
|
84
|
+
- Execute: `npm test`
|
|
85
|
+
- Verify all tests pass with no failures
|
|
86
|
+
- Check test coverage (target: >80% for new code in `Unknown` projects)
|
|
87
|
+
- No skipped tests (`test.skip`, `it.skip`, `@skip`, etc.)
|
|
88
|
+
- Run other CI checks: lint (`npm run lint` or equivalent), build (`npm run build` or equivalent)
|
|
89
|
+
|
|
90
|
+
b) **Manual Testing - Unknown / Unknown**
|
|
91
|
+
- For frontend (Unknown): Render the component/page in browser, verify state updates work correctly, test all user interactions (clicks, form inputs, navigation), verify conditional rendering, check edge cases and error states
|
|
92
|
+
- For backend/API (Unknown): Test HTTP status codes and responses, verify request/response bodies match spec, test error cases and input validation, check database transactions/state, verify authentication/authorization if applicable
|
|
93
|
+
- For CLI/desktop (Unknown): Test command-line arguments and flags, verify output format and readability, test error messages and help text, check file I/O operations
|
|
94
|
+
- Using Unknown framework: Verify test structure matches project conventions, assertions are clear and specific, setup/teardown is properly handled
|
|
95
|
+
|
|
96
|
+
c) **Regression Testing**
|
|
97
|
+
- Test related existing functionality to ensure no breakage
|
|
98
|
+
- For Unknown projects: check related components/endpoints/commands work correctly
|
|
99
|
+
- Verify no new console errors, warnings, or debug statements
|
|
100
|
+
- Confirm existing tests still pass
|
|
101
|
+
|
|
102
|
+
d) **Code Quality Checks**
|
|
103
|
+
- No hardcoded test data, credentials, or environment-specific values in production code
|
|
104
|
+
- Proper error handling and validation
|
|
105
|
+
- No debugging code (`console.log`, `debugger`, `pdb`, `print` statements, etc.)
|
|
106
|
+
- Comments explain *why*, not *what*
|
|
107
|
+
- Follows Unknown conventions and style guide (see `CLAUDE.md`)
|
|
108
|
+
|
|
109
|
+
6. **Security Gate**
|
|
110
|
+
- If `/sk:security-check` has not been run on this branch, recommend: "Run `/sk:security-check` before creating a PR."
|
|
111
|
+
- If `tasks/security-findings.md` has unresolved Critical or High findings, list them and ask the user to confirm they've been addressed.
|
|
112
|
+
|
|
113
|
+
7. **Create Pull Request**
|
|
114
|
+
|
|
115
|
+
a) **Check remote status:**
|
|
116
|
+
```bash
|
|
117
|
+
git remote -v
|
|
118
|
+
git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null || echo "no upstream"
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
b) **Push branch if needed:**
|
|
122
|
+
```bash
|
|
123
|
+
git push -u origin HEAD
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
c) **Generate PR title and body:**
|
|
127
|
+
- Title: Short, imperative, under 70 characters
|
|
128
|
+
- Body: Summary of changes, review findings (if any from `/sk:review`), test status
|
|
129
|
+
|
|
130
|
+
d) **Create PR:**
|
|
131
|
+
```bash
|
|
132
|
+
gh pr create --title "title here" --body "$(cat <<'EOF'
|
|
133
|
+
## Summary
|
|
134
|
+
- bullet points of key changes
|
|
135
|
+
|
|
136
|
+
## Review Notes
|
|
137
|
+
- Any findings from /sk:review (or "Clean review — no issues found")
|
|
138
|
+
|
|
139
|
+
## Security
|
|
140
|
+
- Security check status (passed / N findings addressed)
|
|
141
|
+
|
|
142
|
+
## Test Plan
|
|
143
|
+
- How to verify the changes
|
|
144
|
+
|
|
145
|
+
Generated with [Claude Code](https://claude.com/claude-code)
|
|
146
|
+
EOF
|
|
147
|
+
)"
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
e) Report the PR URL to the user.
|
|
151
|
+
|
|
152
|
+
## When Done
|
|
153
|
+
|
|
154
|
+
> "Feature finalized and PR created! Run `/sk:release` when ready to tag and publish."
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Show all ShipKit commands and workflow overview."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /sk:help — ShipKit
|
|
6
|
+
|
|
7
|
+
A structured workflow toolkit for Claude Code.
|
|
8
|
+
Run these commands in order for a complete, quality-gated feature build.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Feature Workflow
|
|
13
|
+
|
|
14
|
+
| Command | Purpose |
|
|
15
|
+
|---------|---------|
|
|
16
|
+
| `/sk:brainstorm` | Explore requirements and design — **no code yet** |
|
|
17
|
+
| `/sk:write-plan` | Write a decision-complete plan to `tasks/todo.md` |
|
|
18
|
+
| `/sk:branch` | Create a feature branch from the current task |
|
|
19
|
+
| `/sk:schema-migrate` | Analyze schema changes *(skip if no DB changes)* |
|
|
20
|
+
| `/sk:write-tests` | TDD red: write failing tests first |
|
|
21
|
+
| `/sk:execute-plan` | TDD green: implement until tests pass |
|
|
22
|
+
| `/sk:smart-commit` | Conventional commit with approval |
|
|
23
|
+
| `/sk:lint` | **GATE** — all linters must pass |
|
|
24
|
+
| `/sk:test` | **GATE** — 100% coverage on new code |
|
|
25
|
+
| `/sk:security-check` | **GATE** — 0 security issues |
|
|
26
|
+
| `/sk:review` | **GATE** — self-review across 7 dimensions |
|
|
27
|
+
| `/sk:update-task` | Mark task done, log completion |
|
|
28
|
+
| `/sk:finish-feature` | Changelog + PR creation |
|
|
29
|
+
|
|
30
|
+
## Bug Fix Workflow
|
|
31
|
+
|
|
32
|
+
| Command | Purpose |
|
|
33
|
+
|---------|---------|
|
|
34
|
+
| `/sk:debug` | Root-cause analysis |
|
|
35
|
+
| `/sk:write-plan` | Fix plan |
|
|
36
|
+
| `/sk:branch` | Feature branch |
|
|
37
|
+
| `/sk:write-tests` | Reproduce the bug in a test |
|
|
38
|
+
| `/sk:execute-plan` | Fix the bug |
|
|
39
|
+
| `/sk:lint` → `/sk:test` → `/sk:security-check` → `/sk:review` | Quality gates |
|
|
40
|
+
| `/sk:finish-feature` | Changelog + PR |
|
|
41
|
+
|
|
42
|
+
## All Commands
|
|
43
|
+
|
|
44
|
+
| Command | Description |
|
|
45
|
+
|---------|-------------|
|
|
46
|
+
| `/sk:accessibility` | WCAG 2.1 AA audit on frontend code |
|
|
47
|
+
| `/sk:api-design` | Design REST/GraphQL contracts before implementation |
|
|
48
|
+
| `/sk:brainstorm` | Explore requirements, no code |
|
|
49
|
+
| `/sk:branch` | Create branch from current task |
|
|
50
|
+
| `/sk:debug` | Structured bug investigation |
|
|
51
|
+
| `/sk:execute-plan` | Implement plan in batches |
|
|
52
|
+
| `/sk:features` | Sync docs/sk:features/ specs with codebase |
|
|
53
|
+
| `/sk:finish-feature` | Changelog + PR creation |
|
|
54
|
+
| `/sk:frontend-design` | UI mockup + design spec before implementation |
|
|
55
|
+
| `/sk:hotfix` | Emergency fix workflow (skips design/TDD) |
|
|
56
|
+
| `/sk:laravel-init` | Configure existing Laravel project |
|
|
57
|
+
| `/sk:laravel-new` | Scaffold new Laravel project |
|
|
58
|
+
| `/sk:lint` | Auto-detect and run all linters |
|
|
59
|
+
| `/sk:perf` | Performance audit |
|
|
60
|
+
| `/sk:plan` | Create/refresh task planning files |
|
|
61
|
+
| `/sk:release` | Version bump + changelog + tag |
|
|
62
|
+
| `/sk:review` | Self-review of branch changes |
|
|
63
|
+
| `/sk:schema-migrate` | Multi-ORM schema change analysis |
|
|
64
|
+
| `/sk:security-check` | OWASP security audit |
|
|
65
|
+
| `/sk:setup-claude` | Bootstrap project scaffolding |
|
|
66
|
+
| `/sk:setup-optimizer` | Enrich CLAUDE.md by scanning codebase |
|
|
67
|
+
| `/sk:skill-creator` | Create or improve skills |
|
|
68
|
+
| `/sk:smart-commit` | Conventional commit with approval |
|
|
69
|
+
| `/sk:status` | Show workflow and task status |
|
|
70
|
+
| `/sk:test` | Auto-detect and verify all tests pass |
|
|
71
|
+
| `/sk:update-task` | Mark task done, log completion |
|
|
72
|
+
| `/sk:write-plan` | Write plan to `tasks/todo.md` |
|
|
73
|
+
| `/sk:write-tests` | TDD: write failing tests first |
|
|
74
|
+
| `/sk:config` | View and edit project config |
|
|
75
|
+
| `/sk:set-profile` | Switch model routing profile |
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Model Routing Profiles
|
|
80
|
+
|
|
81
|
+
ShipKit routes each skill to the right model automatically. Set once per project:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
/sk:set-profile balanced ← default
|
|
85
|
+
/sk:set-profile quality ← most projects
|
|
86
|
+
/sk:set-profile full-sail ← high-stakes / client work
|
|
87
|
+
/sk:set-profile budget ← side projects / exploration
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
| Skill group | full-sail | quality | balanced | budget |
|
|
91
|
+
|-------------|-----------|---------|----------|--------|
|
|
92
|
+
| brainstorm, write-plan, debug, execute-plan, review | opus | opus | sonnet | sonnet |
|
|
93
|
+
| write-tests, frontend-design, api-design, security-check | opus | sonnet | sonnet | sonnet |
|
|
94
|
+
| perf, schema-migrate, accessibility | opus | sonnet | sonnet | haiku |
|
|
95
|
+
| lint, test | sonnet | sonnet | haiku | haiku |
|
|
96
|
+
| smart-commit, branch, update-task | haiku | haiku | haiku | haiku |
|
|
97
|
+
|
|
98
|
+
`opus` = inherit (uses your current session model).
|
|
99
|
+
Config lives in `.shipkit/sk:config.json` — per project, gitignored by default.
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
**ShipKit** by Kenneth Solomon · `npx @kennethsolomon/shipkit` to install/update
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Emergency fix workflow for production issues. Skips brainstorm, design, and TDD setup. Goes straight to: investigate → branch → fix → gates → ship."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /sk:hotfix
|
|
6
|
+
|
|
7
|
+
Emergency workflow for production issues that need to ship fast. Skips brainstorm, design, and write-tests phases. Quality gates still apply — they cannot be skipped.
|
|
8
|
+
|
|
9
|
+
## When to Use
|
|
10
|
+
|
|
11
|
+
- A bug is causing production impact RIGHT NOW
|
|
12
|
+
- There is no time for full TDD workflow
|
|
13
|
+
- The fix is small and well-understood
|
|
14
|
+
|
|
15
|
+
**If the bug is complex or the fix is unclear, use the full Bug Fix Flow (`/sk:debug`) instead.**
|
|
16
|
+
|
|
17
|
+
## Before You Start
|
|
18
|
+
|
|
19
|
+
1. Read `tasks/lessons.md` — apply any relevant lessons immediately
|
|
20
|
+
2. Read `tasks/todo.md` — note the bug being fixed for tracking
|
|
21
|
+
|
|
22
|
+
## Hotfix Flow
|
|
23
|
+
|
|
24
|
+
| # | Step | Command | Notes |
|
|
25
|
+
|---|------|---------|-------|
|
|
26
|
+
| 1 | Investigate | `/sk:debug` | Root-cause analysis only — understand before touching code |
|
|
27
|
+
| 2 | Branch | `/sk:branch` | Auto-named from the bug description |
|
|
28
|
+
| 3 | Fix | implement directly | No write-tests phase — go straight to the fix |
|
|
29
|
+
| 4 | Smoke Test | run existing tests | Existing tests MUST still pass — no new failures allowed |
|
|
30
|
+
| 5 | Commit | `/sk:smart-commit` | Commit the fix |
|
|
31
|
+
| 6 | **Lint** | `/sk:lint` | **GATE** — all lint tools must pass |
|
|
32
|
+
| 7 | Commit | `/sk:smart-commit` | Skip if lint was clean |
|
|
33
|
+
| 8 | **Verify Tests** | `/sk:test` | **GATE** — all existing tests must pass |
|
|
34
|
+
| 9 | Commit | `/sk:smart-commit` | Skip if tests passed first try |
|
|
35
|
+
| 10 | **Security** | `/sk:security-check` | **GATE** — 0 issues across all severities |
|
|
36
|
+
| 11 | Commit | `/sk:smart-commit` | Skip if security was clean |
|
|
37
|
+
| 12 | **Review** | `/sk:review` | **GATE** — 0 issues including nitpicks |
|
|
38
|
+
| 13 | Commit | `/sk:smart-commit` | Skip if review was clean |
|
|
39
|
+
| 14 | Update | `/sk:update-task` | Mark done, log completion |
|
|
40
|
+
| 15 | Finalize | `/sk:finish-feature` | Changelog + PR — mark PR as hotfix |
|
|
41
|
+
|
|
42
|
+
## Quality Gates Are Non-Negotiable
|
|
43
|
+
|
|
44
|
+
Even in a hotfix, **gates 6, 8, 10, and 12 cannot be skipped.** Fix issues immediately and re-run. A broken hotfix is worse than no hotfix.
|
|
45
|
+
|
|
46
|
+
## After Merging
|
|
47
|
+
|
|
48
|
+
Consider creating a follow-up task to:
|
|
49
|
+
- Write a regression test for the bug that was just fixed
|
|
50
|
+
- Add a lesson to `tasks/lessons.md` if this bug reveals a recurring pattern
|
|
51
|
+
- Review whether the root cause points to a broader systemic issue
|
|
52
|
+
|
|
53
|
+
## Step Summary Format
|
|
54
|
+
|
|
55
|
+
After each step, output:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
--- Hotfix Step [#] [Name]: [done/skipped] ---
|
|
59
|
+
Summary: [what was done]
|
|
60
|
+
Next step: [#] [Name] — run `[command]`
|
|
61
|
+
```
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Create/refresh tasks planning files and start planning."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<!-- Generated by /sk:setup-claude -->
|
|
6
|
+
|
|
7
|
+
# /sk:plan
|
|
8
|
+
|
|
9
|
+
Initialize planning files in `tasks/` (create-if-missing) and start Phase 1 planning.
|
|
10
|
+
|
|
11
|
+
## Before You Start
|
|
12
|
+
|
|
13
|
+
If `tasks/lessons.md` exists, read it in full. Apply every active lesson as a
|
|
14
|
+
constraint when filling `tasks/todo.md` — lessons represent decisions already made
|
|
15
|
+
about what not to do on this project.
|
|
16
|
+
|
|
17
|
+
## Steps
|
|
18
|
+
|
|
19
|
+
1. Ensure `tasks/` exists.
|
|
20
|
+
2. If missing, create:
|
|
21
|
+
- `tasks/todo.md`
|
|
22
|
+
- `tasks/findings.md`
|
|
23
|
+
- `tasks/progress.md`
|
|
24
|
+
3. Read `tasks/todo.md` and ask the user:
|
|
25
|
+
- What’s the goal?
|
|
26
|
+
- What are the constraints?
|
|
27
|
+
- What does “done” look like?
|
|
28
|
+
4. Fill `tasks/todo.md` (Goal + Plan + Verification + Acceptance Criteria).
|
|
29
|
+
5. Continue with `/sk:write-plan` if you need a more detailed plan.
|
|
30
|
+
|