@kennethsolomon/shipkit 3.9.0 → 3.10.1
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 +10 -2
- package/commands/sk/autopilot.md +22 -0
- package/commands/sk/set-profile.md +4 -0
- package/commands/sk/start.md +30 -0
- package/commands/sk/team.md +23 -0
- package/package.json +1 -1
- package/skills/.claude/settings.local.json +37 -0
- package/skills/sk:autopilot/SKILL.md +151 -0
- package/skills/sk:brainstorming/SKILL.md +6 -6
- package/skills/sk:debug/__pycache__/debug_conductor.cpython-314.pyc +0 -0
- package/skills/sk:debug/debug_conductor.py +0 -8
- package/skills/sk:debug/lib/__pycache__/findings_writer.cpython-314.pyc +0 -0
- package/skills/sk:debug/lib/__pycache__/lessons_writer.cpython-314.pyc +0 -0
- package/skills/sk:debug/lib/__pycache__/step_runner.cpython-314.pyc +0 -0
- package/skills/sk:debug/lib/findings_writer.py +2 -2
- package/skills/sk:debug/lib/lessons_writer.py +2 -2
- package/skills/sk:debug/lib/step_runner.py +8 -10
- package/skills/sk:lint/SKILL.md +2 -2
- 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 +12 -3
- package/skills/sk:setup-claude/templates/.claude/agents/backend-dev.md +63 -0
- package/skills/sk:setup-claude/templates/.claude/agents/frontend-dev.md +65 -0
- package/skills/sk:setup-claude/templates/.claude/agents/qa-engineer.md +66 -0
- package/skills/sk:setup-claude/templates/CLAUDE.md.template +43 -25
- package/skills/sk:setup-optimizer/SKILL.md +4 -1
- package/skills/sk:setup-optimizer/lib/__pycache__/discover.cpython-314.pyc +0 -0
- package/skills/sk:setup-optimizer/lib/discover.py +9 -10
- package/skills/sk:skill-creator/scripts/__pycache__/generate_report.cpython-314.pyc +0 -0
- package/skills/sk:skill-creator/scripts/__pycache__/improve_description.cpython-314.pyc +0 -0
- package/skills/sk:skill-creator/scripts/__pycache__/package_skill.cpython-314.pyc +0 -0
- package/skills/sk:skill-creator/scripts/__pycache__/run_eval.cpython-314.pyc +0 -0
- package/skills/sk:skill-creator/scripts/__pycache__/run_loop.cpython-314.pyc +0 -0
- package/skills/sk:skill-creator/scripts/__pycache__/utils.cpython-314.pyc +0 -0
- package/skills/sk:skill-creator/scripts/generate_report.py +2 -0
- package/skills/sk:skill-creator/scripts/improve_description.py +2 -0
- package/skills/sk:skill-creator/scripts/package_skill.py +4 -0
- package/skills/sk:skill-creator/scripts/run_eval.py +3 -1
- package/skills/sk:skill-creator/scripts/run_loop.py +2 -0
- package/skills/sk:skill-creator/scripts/utils.py +2 -0
- package/skills/sk:start/SKILL.md +156 -0
- package/skills/sk:team/SKILL.md +141 -0
- package/skills/sk:test/SKILL.md +2 -2
package/README.md
CHANGED
|
@@ -41,18 +41,23 @@ npm install -g @kennethsolomon/shipkit && shipkit
|
|
|
41
41
|
/sk:setup-claude
|
|
42
42
|
|
|
43
43
|
# 3. Start building
|
|
44
|
-
/sk:
|
|
44
|
+
/sk:start
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
That's it. `/sk:setup-claude` creates your project scaffolding: planning files, lifecycle hooks, path-scoped coding rules, and a persistent statusline — all auto-configured for your stack.
|
|
48
48
|
|
|
49
|
+
`/sk:start` is the recommended entry point — it classifies your task and routes you to the optimal flow automatically. You can also jump directly to `/sk:brainstorm`, `/sk:debug`, or any other flow entry point.
|
|
50
|
+
|
|
49
51
|
---
|
|
50
52
|
|
|
51
53
|
## Pick Your Flow
|
|
52
54
|
|
|
53
55
|
| I want to... | Run this | What happens |
|
|
54
56
|
|--------------|----------|-------------|
|
|
57
|
+
| **Not sure — let ShipKit decide** | `/sk:start` | Classifies your task, routes to optimal flow/mode/agents |
|
|
55
58
|
| **Build a new feature** | `/sk:brainstorm` | Full workflow: plan → TDD → 6 quality gates → PR |
|
|
59
|
+
| **Build hands-free** | `/sk:autopilot` | All 21 steps, auto-skip, auto-advance, auto-commit |
|
|
60
|
+
| **Full-stack feature (parallel)** | `/sk:team` | Parallel domain agents (backend + frontend + QA) |
|
|
56
61
|
| **Make a small change** | `/sk:fast-track` | Skip planning, keep all quality gates |
|
|
57
62
|
| **Fix a bug** | `/sk:debug` | Investigate → regression test → fix → gates → PR |
|
|
58
63
|
| **Fix a production emergency** | `/sk:hotfix` | Skip TDD, but quality gates still enforced |
|
|
@@ -204,12 +209,13 @@ Use these anytime — they're not part of any workflow.
|
|
|
204
209
|
## All Commands
|
|
205
210
|
|
|
206
211
|
<details>
|
|
207
|
-
<summary><strong>
|
|
212
|
+
<summary><strong>38 commands</strong> — click to expand</summary>
|
|
208
213
|
|
|
209
214
|
| Command | Purpose |
|
|
210
215
|
|---------|---------|
|
|
211
216
|
| `/sk:accessibility` | WCAG 2.1 AA audit |
|
|
212
217
|
| `/sk:api-design` | Design API contracts before implementation |
|
|
218
|
+
| `/sk:autopilot` | Hands-free workflow — auto-skip, auto-advance, auto-commit |
|
|
213
219
|
| `/sk:brainstorm` | Explore requirements and design |
|
|
214
220
|
| `/sk:branch` | Create feature branch from current task |
|
|
215
221
|
| `/sk:change` | Handle mid-workflow requirement changes |
|
|
@@ -243,7 +249,9 @@ Use these anytime — they're not part of any workflow.
|
|
|
243
249
|
| `/sk:set-profile` | Switch model routing profile |
|
|
244
250
|
| `/sk:setup-claude` | Bootstrap project scaffolding |
|
|
245
251
|
| `/sk:smart-commit` | Conventional commit with approval |
|
|
252
|
+
| `/sk:start` | Smart entry point — classifies task, routes to optimal flow |
|
|
246
253
|
| `/sk:status` | Show workflow + task status |
|
|
254
|
+
| `/sk:team` | Parallel domain agents for full-stack tasks |
|
|
247
255
|
| `/sk:test` | Run all test suites |
|
|
248
256
|
| `/sk:update-task` | Mark task done |
|
|
249
257
|
| `/sk:write-plan` | Write plan to `tasks/todo.md` |
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Hands-free workflow — all 21 steps, auto-skip, auto-advance, auto-commit. Stops only for direction approval and PR push."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /sk:autopilot
|
|
6
|
+
|
|
7
|
+
Run the full ShipIt workflow in hands-free mode.
|
|
8
|
+
|
|
9
|
+
Usage: `/sk:autopilot <task description>`
|
|
10
|
+
|
|
11
|
+
Executes all 21 workflow steps with:
|
|
12
|
+
- **Auto-skip** — optional steps skipped when clearly not needed
|
|
13
|
+
- **Auto-advance** — no manual step transitions
|
|
14
|
+
- **Auto-commit** — conventional format, no approval prompt
|
|
15
|
+
- **Same quality gates** — all gates enforced, same fix loops
|
|
16
|
+
|
|
17
|
+
Stops only for:
|
|
18
|
+
1. Direction approval (after brainstorm)
|
|
19
|
+
2. 3-strike failures
|
|
20
|
+
3. PR push confirmation
|
|
21
|
+
|
|
22
|
+
See `skills/sk:autopilot/SKILL.md` for full details.
|
|
@@ -28,6 +28,8 @@ Valid profiles: `full-sail` · `quality` · `balanced` · `budget`
|
|
|
28
28
|
| perf, schema-migrate, accessibility | opus | sonnet | sonnet | haiku |
|
|
29
29
|
| lint, test | sonnet | sonnet | haiku | haiku |
|
|
30
30
|
| smart-commit, branch, update-task | haiku | haiku | haiku | haiku |
|
|
31
|
+
| autopilot, team | opus | opus | sonnet | sonnet |
|
|
32
|
+
| start | haiku | haiku | haiku | haiku |
|
|
31
33
|
|
|
32
34
|
Note: `opus` = inherit (uses the current session model). Switch to Opus 4.5 in your session to get the full benefit.
|
|
33
35
|
|
|
@@ -66,6 +68,8 @@ Model assignments for this project:
|
|
|
66
68
|
perf, schema-migrate, accessibility → <model>
|
|
67
69
|
lint, test → <model>
|
|
68
70
|
smart-commit, branch, update-task → haiku
|
|
71
|
+
autopilot, team → <model>
|
|
72
|
+
start → haiku
|
|
69
73
|
|
|
70
74
|
Run /sk:config to see all settings or make further changes.
|
|
71
75
|
```
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Smart entry point — classifies your task and routes to the optimal flow, mode, and agent strategy."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /sk:start
|
|
6
|
+
|
|
7
|
+
Smart entry point for all ShipIt work. Classifies your task and recommends the best workflow configuration.
|
|
8
|
+
|
|
9
|
+
Usage: `/sk:start <task description>`
|
|
10
|
+
|
|
11
|
+
Examples:
|
|
12
|
+
```
|
|
13
|
+
/sk:start add user profile page with avatar upload
|
|
14
|
+
/sk:start fix login redirect loop
|
|
15
|
+
/sk:start urgent: payments failing in production
|
|
16
|
+
/sk:start bump lodash to latest version
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**What it does:**
|
|
20
|
+
1. **Classifies** — detects if it's a feature, bug, hotfix, or small change
|
|
21
|
+
2. **Detects scope** — full-stack, frontend-only, or backend-only
|
|
22
|
+
3. **Recommends** — optimal flow + mode (autopilot/manual) + agents (team/solo)
|
|
23
|
+
4. **Routes** — enters the chosen workflow after your confirmation
|
|
24
|
+
|
|
25
|
+
**Override flags:**
|
|
26
|
+
- `--manual` — force step-by-step mode
|
|
27
|
+
- `--team` / `--no-team` — force team or solo agents
|
|
28
|
+
- `--debug` / `--hotfix` / `--fast-track` — force a specific flow
|
|
29
|
+
|
|
30
|
+
See `skills/sk:start/SKILL.md` for full details.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Parallel domain agents — spawns Backend, Frontend, and QA agents for full-stack implementation."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /sk:team
|
|
6
|
+
|
|
7
|
+
Split implementation across parallel domain agents.
|
|
8
|
+
|
|
9
|
+
Usage: `/sk:team`
|
|
10
|
+
|
|
11
|
+
Spawns 3 specialized agents in parallel:
|
|
12
|
+
- **Backend Agent** (worktree) — backend tests + implementation
|
|
13
|
+
- **Frontend Agent** (worktree) — frontend tests + implementation
|
|
14
|
+
- **QA Agent** (background) — E2E test scenarios
|
|
15
|
+
|
|
16
|
+
**Prerequisite:** Plan must contain an explicit API contract section.
|
|
17
|
+
|
|
18
|
+
Falls back to single-agent mode if:
|
|
19
|
+
- No API contract in plan
|
|
20
|
+
- Backend-only or frontend-only task
|
|
21
|
+
- Worktree creation fails
|
|
22
|
+
|
|
23
|
+
See `skills/sk:team/SKILL.md` for full details.
|
package/package.json
CHANGED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(bash tests/verify-workflow.sh)",
|
|
5
|
+
"Bash(git add:*)",
|
|
6
|
+
"Bash(git commit:*)",
|
|
7
|
+
"Bash(node:*)",
|
|
8
|
+
"Bash(npm audit:*)",
|
|
9
|
+
"Bash(for f:*)",
|
|
10
|
+
"Bash(do echo:*)",
|
|
11
|
+
"Bash(bash -n \"$f\")",
|
|
12
|
+
"Bash(done)",
|
|
13
|
+
"Bash(tasks/security-findings.md:*)",
|
|
14
|
+
"Bash(git push:*)",
|
|
15
|
+
"Bash(git tag:*)",
|
|
16
|
+
"Bash(find /Users/kennethsolomon/Herd/shipit -type f -name *.md -path */node_modules/*commands/sk/*)",
|
|
17
|
+
"Bash(grep -r \"sk:\" /Users/kennethsolomon/Herd/shipit/commands/sk/*.md)",
|
|
18
|
+
"Bash(find /Users/kennethsolomon/Herd/shipit/.claude/docs -name *.md)",
|
|
19
|
+
"Bash(grep -v \"^Command$\")",
|
|
20
|
+
"Bash(find /Users/kennethsolomon/Herd/shipit -path */test* -o -path */__tests__/* -o -path */spec/*)",
|
|
21
|
+
"Bash(find /Users/kennethsolomon/Herd/shipit/commands/sk -type f -name *.md)",
|
|
22
|
+
"Bash(find /Users/kennethsolomon/Herd/shipit/skills -maxdepth 1 -type d -name sk:*)",
|
|
23
|
+
"Bash(python3 -m py_compile skills/sk:debug/lib/step_runner.py)",
|
|
24
|
+
"Bash(python3 -m py_compile skills/sk:debug/debug_conductor.py)",
|
|
25
|
+
"Bash(python3 -m py_compile skills/sk:setup-optimizer/lib/discover.py)",
|
|
26
|
+
"Bash(python3 -m py_compile skills/sk:debug/lib/findings_writer.py)",
|
|
27
|
+
"Bash(python3 -m py_compile skills/sk:debug/lib/lessons_writer.py)",
|
|
28
|
+
"Bash(python3 -m py_compile skills/sk:skill-creator/scripts/run_eval.py)",
|
|
29
|
+
"Bash(python3 -m py_compile skills/sk:skill-creator/scripts/run_loop.py)",
|
|
30
|
+
"Bash(python3 -m py_compile skills/sk:skill-creator/scripts/improve_description.py)",
|
|
31
|
+
"Bash(python3 -m py_compile skills/sk:skill-creator/scripts/generate_report.py)",
|
|
32
|
+
"Bash(python3 -m py_compile skills/sk:skill-creator/scripts/utils.py)",
|
|
33
|
+
"Bash(git:*)",
|
|
34
|
+
"Bash(npm publish:*)"
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sk:autopilot
|
|
3
|
+
description: Hands-free workflow — runs all 21 steps with auto-skip, auto-advance, auto-commit. Stops only for direction approval, 3-strike failures, and PR push.
|
|
4
|
+
user_invocable: true
|
|
5
|
+
allowed_tools: Read, Write, Bash, Glob, Grep, Agent, Skill
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Autopilot Mode
|
|
9
|
+
|
|
10
|
+
Hands-free workflow that executes all 21 steps of the ShipIt workflow with minimal interruptions. Same quality gates, same fix loops, same 100% coverage — just fewer stops.
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
- You know roughly what you want built and trust the workflow to handle details
|
|
15
|
+
- You want to minimize context switches and manual step advancement
|
|
16
|
+
- The task is well-defined enough for a single direction-approval checkpoint
|
|
17
|
+
|
|
18
|
+
## When NOT to Use
|
|
19
|
+
|
|
20
|
+
- Exploratory work where you want to steer each step
|
|
21
|
+
- Tasks requiring frequent design decisions mid-implementation
|
|
22
|
+
- When you want to review intermediate outputs before proceeding
|
|
23
|
+
|
|
24
|
+
## Quality Guarantee
|
|
25
|
+
|
|
26
|
+
Autopilot runs the EXACT same 21 steps as manual mode:
|
|
27
|
+
- ALL quality gates enforced (lint, test, security, perf, review, e2e)
|
|
28
|
+
- ALL fix-commit-rerun loops active
|
|
29
|
+
- 100% test coverage required on new code
|
|
30
|
+
- 0 security issues required
|
|
31
|
+
- The ONLY difference: auto-advance between steps instead of stopping
|
|
32
|
+
|
|
33
|
+
## Steps
|
|
34
|
+
|
|
35
|
+
### 0. Reset Tracker
|
|
36
|
+
|
|
37
|
+
Read `tasks/workflow-status.md`. If it has done/skipped steps from a different task, auto-reset all steps to `not yet`.
|
|
38
|
+
|
|
39
|
+
### 1. Load Context (auto — no prompt)
|
|
40
|
+
|
|
41
|
+
- Read `tasks/todo.md`
|
|
42
|
+
- Read `tasks/lessons.md` (apply all active lessons as constraints)
|
|
43
|
+
- Read `tasks/findings.md` (if exists)
|
|
44
|
+
- Read `tasks/tech-debt.md` (if exists)
|
|
45
|
+
|
|
46
|
+
### 2. Brainstorm + Direction Approval (STOP — requires user input)
|
|
47
|
+
|
|
48
|
+
Run brainstorm internally:
|
|
49
|
+
- Explore the codebase (3 parallel Explore agents)
|
|
50
|
+
- Propose 2-3 approaches with trade-offs
|
|
51
|
+
|
|
52
|
+
**Present ONE direction summary and ask:**
|
|
53
|
+
> "Direction: [1-2 sentence summary of chosen approach]
|
|
54
|
+
> Scope: [what will be built/changed]
|
|
55
|
+
> Auto-skipping: [list of steps that will be auto-skipped and why]
|
|
56
|
+
> Proceed? (y/n)"
|
|
57
|
+
|
|
58
|
+
Wait for explicit `y` before continuing. This is the ONLY planning stop.
|
|
59
|
+
|
|
60
|
+
### 3. Plan (auto-advance)
|
|
61
|
+
|
|
62
|
+
Write the implementation plan to `tasks/todo.md`. Do NOT ask for plan approval — the direction approval in step 2 covers this.
|
|
63
|
+
|
|
64
|
+
### 4. Branch (auto-advance)
|
|
65
|
+
|
|
66
|
+
Create feature branch auto-named from the task. Do NOT ask for confirmation.
|
|
67
|
+
|
|
68
|
+
### 5. Auto-Skip Detection
|
|
69
|
+
|
|
70
|
+
Scan `tasks/todo.md` for frontend/backend/database keywords. For each optional step:
|
|
71
|
+
- **Design (step 4)**: auto-skip if no frontend keywords
|
|
72
|
+
- **Accessibility (step 5)**: auto-skip if no frontend keywords
|
|
73
|
+
- **Migrate (step 8)**: auto-skip if no database keywords
|
|
74
|
+
- **Performance (step 15)**: auto-skip if no frontend AND no database keywords
|
|
75
|
+
|
|
76
|
+
Log each auto-skip: `Auto-skipped: [Step Name] ([reason])`
|
|
77
|
+
|
|
78
|
+
### 6. Write Tests (auto-advance)
|
|
79
|
+
|
|
80
|
+
Write failing tests based on the plan (TDD red phase). Auto-advance when done.
|
|
81
|
+
|
|
82
|
+
### 7. Implement (auto-advance)
|
|
83
|
+
|
|
84
|
+
Execute the plan — make failing tests pass. Use wave-based sub-agents for parallel work where possible.
|
|
85
|
+
|
|
86
|
+
### 8. Commit (auto-commit)
|
|
87
|
+
|
|
88
|
+
Auto-commit with conventional commit format. Do NOT ask for commit message approval.
|
|
89
|
+
Format: `type(scope): description`
|
|
90
|
+
|
|
91
|
+
### 9. Gates (auto-advance on clean pass)
|
|
92
|
+
|
|
93
|
+
Run all quality gates. Use `/sk:gates` if available, otherwise run sequentially:
|
|
94
|
+
1. Lint + dep audit
|
|
95
|
+
2. Test (100% coverage)
|
|
96
|
+
3. Security (0 issues)
|
|
97
|
+
4. Performance (if not auto-skipped)
|
|
98
|
+
5. Review + simplify
|
|
99
|
+
6. E2E
|
|
100
|
+
|
|
101
|
+
Each gate auto-fixes and re-runs internally. Auto-advance to next gate on clean pass.
|
|
102
|
+
|
|
103
|
+
### 10. PR Push (STOP — requires user confirmation)
|
|
104
|
+
|
|
105
|
+
**This is the second mandatory stop.** Present:
|
|
106
|
+
> "All gates passed. Ready to create PR.
|
|
107
|
+
> Title: [conventional format]
|
|
108
|
+
> Changes: [file count] files, [line count] lines
|
|
109
|
+
> Confirm push + PR? (y/n)"
|
|
110
|
+
|
|
111
|
+
Wait for explicit confirmation — pushing is visible to others.
|
|
112
|
+
|
|
113
|
+
### 11. Finalize (auto-advance)
|
|
114
|
+
|
|
115
|
+
- Create PR
|
|
116
|
+
- Sync features (`/sk:features`)
|
|
117
|
+
- Ask about release (step 21 is never auto-skipped)
|
|
118
|
+
|
|
119
|
+
## 3-Strike Protocol
|
|
120
|
+
|
|
121
|
+
If any step fails 3 times:
|
|
122
|
+
- **STOP immediately**
|
|
123
|
+
- Report: what failed, what was tried, error details
|
|
124
|
+
- Ask user for guidance before continuing
|
|
125
|
+
- This overrides auto-advance — 3 strikes always stops
|
|
126
|
+
|
|
127
|
+
## Stops Summary
|
|
128
|
+
|
|
129
|
+
| Stop | When | Why |
|
|
130
|
+
|------|------|-----|
|
|
131
|
+
| Direction approval | After brainstorm (step 2) | User must approve the approach |
|
|
132
|
+
| 3-strike failure | Any step fails 3x | Needs human judgment |
|
|
133
|
+
| PR push | Before creating PR (step 10) | Visible to others — always confirm |
|
|
134
|
+
|
|
135
|
+
Everything else auto-advances.
|
|
136
|
+
|
|
137
|
+
## Model Routing
|
|
138
|
+
|
|
139
|
+
Read `.shipkit/config.json` from the project root if it exists.
|
|
140
|
+
|
|
141
|
+
- If `model_overrides["sk:autopilot"]` is set, use that model — it takes precedence.
|
|
142
|
+
- Otherwise use the `profile` field. Default: `balanced`.
|
|
143
|
+
|
|
144
|
+
| Profile | Model |
|
|
145
|
+
|---------|-------|
|
|
146
|
+
| `full-sail` | opus (inherit) |
|
|
147
|
+
| `quality` | opus (inherit) |
|
|
148
|
+
| `balanced` | sonnet |
|
|
149
|
+
| `budget` | sonnet |
|
|
150
|
+
|
|
151
|
+
> `opus` = inherit. When spawning sub-agents via the Agent tool, pass `model: "<resolved-model>"`.
|
|
@@ -34,7 +34,7 @@ You MUST create a task for each of these items and complete them in order:
|
|
|
34
34
|
- Open questions (if any remain)
|
|
35
35
|
Additionally, **append** an ADR entry to `docs/decisions.md` (see "Decisions Log" section below).
|
|
36
36
|
(Optionally also write a full design doc to docs/plans/YYYY-MM-DD-<topic>-design.md)
|
|
37
|
-
6. **Transition to implementation** — invoke
|
|
37
|
+
6. **Transition to implementation** — invoke `/sk:write-plan` skill to create implementation plan
|
|
38
38
|
|
|
39
39
|
## Process Flow
|
|
40
40
|
|
|
@@ -46,7 +46,7 @@ digraph brainstorming {
|
|
|
46
46
|
"Present design sections" [shape=box];
|
|
47
47
|
"User approves design?" [shape=diamond];
|
|
48
48
|
"Write design doc" [shape=box];
|
|
49
|
-
"Invoke
|
|
49
|
+
"Invoke `/sk:write-plan` skill" [shape=doublecircle];
|
|
50
50
|
|
|
51
51
|
"Explore project context" -> "Ask clarifying questions";
|
|
52
52
|
"Ask clarifying questions" -> "Propose 2-3 approaches";
|
|
@@ -54,11 +54,11 @@ digraph brainstorming {
|
|
|
54
54
|
"Present design sections" -> "User approves design?";
|
|
55
55
|
"User approves design?" -> "Present design sections" [label="no, revise"];
|
|
56
56
|
"User approves design?" -> "Write design doc" [label="yes"];
|
|
57
|
-
"Write design doc" -> "Invoke
|
|
57
|
+
"Write design doc" -> "Invoke `/sk:write-plan` skill";
|
|
58
58
|
}
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
**The terminal state is invoking
|
|
61
|
+
**The terminal state is invoking `/sk:write-plan`.** Do NOT invoke frontend-design, mcp-builder, or any other implementation skill. The ONLY skill you invoke after brainstorming is `/sk:write-plan`.
|
|
62
62
|
|
|
63
63
|
## The Process
|
|
64
64
|
|
|
@@ -95,8 +95,8 @@ digraph brainstorming {
|
|
|
95
95
|
- Commit the findings, decisions log entry, and any design document to git
|
|
96
96
|
|
|
97
97
|
**Implementation:**
|
|
98
|
-
- Invoke the
|
|
99
|
-
- Do NOT invoke any other skill.
|
|
98
|
+
- Invoke the `/sk:write-plan` skill to create a detailed implementation plan
|
|
99
|
+
- Do NOT invoke any other skill. `/sk:write-plan` is the next step.
|
|
100
100
|
|
|
101
101
|
## Decisions Log
|
|
102
102
|
|
|
Binary file
|
|
@@ -75,7 +75,6 @@ class DebugConductor:
|
|
|
75
75
|
if not self._can_proceed(step):
|
|
76
76
|
print(f"\n⛔ BLOCKED: {self._gate_reason(step)}")
|
|
77
77
|
print("\nRun /debug again to continue from this step.")
|
|
78
|
-
self._save_progress()
|
|
79
78
|
return
|
|
80
79
|
|
|
81
80
|
# Run step and update state
|
|
@@ -94,7 +93,6 @@ class DebugConductor:
|
|
|
94
93
|
proceed = input(f"\n✅ Step {step_num} complete. Continue to step {step_num + 1}? (y/n): ").strip().lower()
|
|
95
94
|
if proceed not in ['y', 'yes', '']:
|
|
96
95
|
print(f"Pausing after step {step_num}. Run /debug again to continue.")
|
|
97
|
-
self._save_progress()
|
|
98
96
|
return
|
|
99
97
|
|
|
100
98
|
print("\n" + "="*70)
|
|
@@ -161,12 +159,6 @@ class DebugConductor:
|
|
|
161
159
|
return "No confirmed hypothesis yet—cannot propose fix."
|
|
162
160
|
return "Precondition not met for this step."
|
|
163
161
|
|
|
164
|
-
def _save_progress(self):
|
|
165
|
-
"""Save current state for resumption (optional)."""
|
|
166
|
-
# Could implement checkpoint system here
|
|
167
|
-
pass
|
|
168
|
-
|
|
169
|
-
|
|
170
162
|
def main():
|
|
171
163
|
"""Entry point for /debug skill."""
|
|
172
164
|
conductor = DebugConductor()
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -44,8 +44,8 @@ class FindingsWriter:
|
|
|
44
44
|
self._append_entry(entry)
|
|
45
45
|
print(f"\n✅ Findings written to {self.findings_path}")
|
|
46
46
|
return True
|
|
47
|
-
except
|
|
48
|
-
print(f"\n❌ Error writing findings: {e}")
|
|
47
|
+
except OSError as e:
|
|
48
|
+
print(f"\n❌ Error writing findings to {self.findings_path}: {e}")
|
|
49
49
|
return False
|
|
50
50
|
|
|
51
51
|
def _ensure_file_exists(self):
|
|
@@ -66,8 +66,8 @@ class LessonsWriter:
|
|
|
66
66
|
self._append_lesson(entry)
|
|
67
67
|
print(f"\n✅ New lesson added to {self.lessons_path}")
|
|
68
68
|
return True
|
|
69
|
-
except
|
|
70
|
-
print(f"\n❌ Error writing lesson: {e}")
|
|
69
|
+
except OSError as e:
|
|
70
|
+
print(f"\n❌ Error writing lesson to {self.lessons_path}: {e}")
|
|
71
71
|
return False
|
|
72
72
|
|
|
73
73
|
def _ensure_file_exists(self):
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"""Execute individual debug steps (3-11)."""
|
|
2
2
|
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import shlex
|
|
3
6
|
import subprocess
|
|
4
|
-
from typing import Dict
|
|
5
7
|
from pathlib import Path
|
|
6
|
-
import
|
|
8
|
+
from typing import Dict
|
|
7
9
|
|
|
8
10
|
|
|
9
11
|
class StepRunner:
|
|
@@ -42,8 +44,7 @@ class StepRunner:
|
|
|
42
44
|
# Recent commits
|
|
43
45
|
print("📋 Recent commits:")
|
|
44
46
|
result = subprocess.run(
|
|
45
|
-
"git log --oneline -10",
|
|
46
|
-
shell=True,
|
|
47
|
+
["git", "log", "--oneline", "-10"],
|
|
47
48
|
capture_output=True,
|
|
48
49
|
text=True
|
|
49
50
|
)
|
|
@@ -52,8 +53,7 @@ class StepRunner:
|
|
|
52
53
|
# Recent diffs
|
|
53
54
|
print("\n📋 Recent file changes:")
|
|
54
55
|
result = subprocess.run(
|
|
55
|
-
"git diff HEAD~3 --stat",
|
|
56
|
-
shell=True,
|
|
56
|
+
["git", "diff", "HEAD~3", "--stat"],
|
|
57
57
|
capture_output=True,
|
|
58
58
|
text=True
|
|
59
59
|
)
|
|
@@ -107,8 +107,7 @@ class StepRunner:
|
|
|
107
107
|
|
|
108
108
|
try:
|
|
109
109
|
result = subprocess.run(
|
|
110
|
-
command,
|
|
111
|
-
shell=True,
|
|
110
|
+
shlex.split(command),
|
|
112
111
|
capture_output=True,
|
|
113
112
|
text=True,
|
|
114
113
|
timeout=30
|
|
@@ -277,8 +276,7 @@ class StepRunner:
|
|
|
277
276
|
if command:
|
|
278
277
|
try:
|
|
279
278
|
result = subprocess.run(
|
|
280
|
-
command,
|
|
281
|
-
shell=True,
|
|
279
|
+
shlex.split(command),
|
|
282
280
|
capture_output=True,
|
|
283
281
|
text=True,
|
|
284
282
|
timeout=30
|
package/skills/sk:lint/SKILL.md
CHANGED
|
@@ -171,8 +171,8 @@ Read `.shipkit/config.json` from the project root if it exists.
|
|
|
171
171
|
|
|
172
172
|
| Profile | Model |
|
|
173
173
|
|---------|-------|
|
|
174
|
-
| `full-sail` |
|
|
175
|
-
| `quality` |
|
|
174
|
+
| `full-sail` | opus (inherit) |
|
|
175
|
+
| `quality` | opus (inherit) |
|
|
176
176
|
| `balanced` | haiku |
|
|
177
177
|
| `budget` | haiku |
|
|
178
178
|
|
|
Binary file
|
|
@@ -271,7 +271,16 @@ def _write_file_if_missing(dest: Path, content: str) -> Tuple[str, Path]:
|
|
|
271
271
|
if dest.exists():
|
|
272
272
|
return ("skipped", dest)
|
|
273
273
|
dest.parent.mkdir(parents=True, exist_ok=True)
|
|
274
|
-
|
|
274
|
+
# Atomic write: write to temp file then rename to avoid TOCTOU race
|
|
275
|
+
import tempfile
|
|
276
|
+
fd, tmp_path = tempfile.mkstemp(dir=dest.parent, suffix=".tmp")
|
|
277
|
+
try:
|
|
278
|
+
with os.fdopen(fd, "w", encoding="utf-8") as f:
|
|
279
|
+
f.write(content)
|
|
280
|
+
Path(tmp_path).replace(dest)
|
|
281
|
+
except BaseException:
|
|
282
|
+
Path(tmp_path).unlink(missing_ok=True)
|
|
283
|
+
raise
|
|
275
284
|
return ("created", dest)
|
|
276
285
|
|
|
277
286
|
|
|
@@ -282,7 +291,7 @@ def _write_file_if_generated(dest: Path, content: str, template_path: Optional[P
|
|
|
282
291
|
return ("created", dest)
|
|
283
292
|
try:
|
|
284
293
|
existing = dest.read_text(encoding="utf-8")
|
|
285
|
-
except
|
|
294
|
+
except (OSError, UnicodeDecodeError):
|
|
286
295
|
return ("skipped", dest)
|
|
287
296
|
if GENERATED_MARKER in existing:
|
|
288
297
|
# Check if content is identical (fast path)
|
|
@@ -311,7 +320,7 @@ def _plan_file_if_generated(dest: Path, content: str) -> str:
|
|
|
311
320
|
return "created"
|
|
312
321
|
try:
|
|
313
322
|
existing = dest.read_text(encoding="utf-8")
|
|
314
|
-
except
|
|
323
|
+
except (OSError, UnicodeDecodeError):
|
|
315
324
|
return "skipped"
|
|
316
325
|
if GENERATED_MARKER not in existing:
|
|
317
326
|
return "skipped"
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: backend-dev
|
|
3
|
+
model: sonnet
|
|
4
|
+
description: Backend development agent — writes backend tests and implements API/services/models against the API contract.
|
|
5
|
+
allowed_tools: Bash, Read, Edit, Write, Glob, Grep
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Backend Development Agent
|
|
9
|
+
|
|
10
|
+
You are the Backend Agent in a team workflow. Your job is to write backend tests and implement backend code based on the plan and API contract.
|
|
11
|
+
|
|
12
|
+
## Context
|
|
13
|
+
|
|
14
|
+
You are working in an **isolated worktree** — a separate copy of the repository. Another agent (Frontend Agent) is working in parallel on frontend code. A QA Agent is writing E2E scenarios in the background.
|
|
15
|
+
|
|
16
|
+
The **API contract** in `tasks/todo.md` is your shared interface with the Frontend Agent. Implement endpoints that match the contract exactly.
|
|
17
|
+
|
|
18
|
+
## Behavior
|
|
19
|
+
|
|
20
|
+
### 1. Read the Plan
|
|
21
|
+
|
|
22
|
+
- Read `tasks/todo.md` — find the API contract section and all backend tasks
|
|
23
|
+
- Read `tasks/lessons.md` — apply all active lessons
|
|
24
|
+
- Identify: models, migrations, controllers, services, validation, routes
|
|
25
|
+
|
|
26
|
+
### 2. Write Backend Tests (TDD Red Phase)
|
|
27
|
+
|
|
28
|
+
Write failing tests for all backend behavior:
|
|
29
|
+
- **Controller tests**: HTTP method, route, request validation, response shape
|
|
30
|
+
- **Model tests**: Relationships, scopes, accessors, mutators
|
|
31
|
+
- **Service tests**: Business logic, edge cases, error handling
|
|
32
|
+
- **Validation tests**: All form request / input validation rules
|
|
33
|
+
- Follow existing test conventions (read 1-2 existing test files first)
|
|
34
|
+
|
|
35
|
+
### 3. Implement Backend Code (TDD Green Phase)
|
|
36
|
+
|
|
37
|
+
Implement in dependency order:
|
|
38
|
+
1. Migrations (if needed)
|
|
39
|
+
2. Models + relationships
|
|
40
|
+
3. Services / business logic
|
|
41
|
+
4. Controllers + form requests
|
|
42
|
+
5. Routes
|
|
43
|
+
|
|
44
|
+
Make each test pass before moving to the next.
|
|
45
|
+
|
|
46
|
+
### 4. Verify
|
|
47
|
+
|
|
48
|
+
Run the backend test suite:
|
|
49
|
+
- All new tests must pass
|
|
50
|
+
- Existing tests must not break
|
|
51
|
+
- Report: test count, pass/fail, coverage %
|
|
52
|
+
|
|
53
|
+
### 5. Auto-Commit
|
|
54
|
+
|
|
55
|
+
Commit with: `feat(backend): [description]`
|
|
56
|
+
|
|
57
|
+
## Rules
|
|
58
|
+
|
|
59
|
+
- ONLY touch backend files (models, controllers, services, migrations, routes, backend tests)
|
|
60
|
+
- Do NOT touch frontend files (components, views, CSS, frontend tests)
|
|
61
|
+
- Do NOT modify the API contract in `tasks/todo.md`
|
|
62
|
+
- Follow the API contract exactly — request/response shapes must match
|
|
63
|
+
- 3-strike protocol: if something fails 3 times, stop and report
|