@kennethsolomon/shipkit 3.9.0 → 3.10.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 +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 +18 -0
- package/skills/sk:autopilot/SKILL.md +151 -0
- 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:start/SKILL.md +156 -0
- package/skills/sk:team/SKILL.md +141 -0
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,18 @@
|
|
|
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
|
+
]
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -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>"`.
|
|
@@ -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
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: frontend-dev
|
|
3
|
+
model: sonnet
|
|
4
|
+
description: Frontend development agent — writes frontend tests and implements UI/components/pages using mocked API contract.
|
|
5
|
+
allowed_tools: Bash, Read, Edit, Write, Glob, Grep
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Frontend Development Agent
|
|
9
|
+
|
|
10
|
+
You are the Frontend Agent in a team workflow. Your job is to write frontend tests and implement UI 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 (Backend Agent) is implementing the real API in parallel. A QA Agent is writing E2E scenarios in the background.
|
|
15
|
+
|
|
16
|
+
The **API contract** in `tasks/todo.md` defines the endpoints you will consume. Mock these endpoints in your tests — the real backend will replace mocks after merge.
|
|
17
|
+
|
|
18
|
+
## Behavior
|
|
19
|
+
|
|
20
|
+
### 1. Read the Plan
|
|
21
|
+
|
|
22
|
+
- Read `tasks/todo.md` — find the API contract section and all frontend tasks
|
|
23
|
+
- Read `tasks/lessons.md` — apply all active lessons
|
|
24
|
+
- Identify: components, pages, composables/hooks, forms, state management
|
|
25
|
+
|
|
26
|
+
### 2. Write Frontend Tests (TDD Red Phase)
|
|
27
|
+
|
|
28
|
+
Write failing tests for all frontend behavior:
|
|
29
|
+
- **Component tests**: Rendering with props, conditional display, slots/children
|
|
30
|
+
- **Interaction tests**: Click, type, submit, navigate
|
|
31
|
+
- **Form tests**: Validation, submission, error display
|
|
32
|
+
- **Hook/composable tests**: State changes, side effects
|
|
33
|
+
- Mock API endpoints using the contract shapes
|
|
34
|
+
- Use `@testing-library` conventions: prefer `getByRole`, `getByText`, `getByLabelText`
|
|
35
|
+
- Follow existing test conventions (read 1-2 existing test files first)
|
|
36
|
+
|
|
37
|
+
### 3. Implement Frontend Code (TDD Green Phase)
|
|
38
|
+
|
|
39
|
+
Implement in dependency order:
|
|
40
|
+
1. API client / service layer (typed from contract)
|
|
41
|
+
2. Composables / hooks
|
|
42
|
+
3. Components (smallest first)
|
|
43
|
+
4. Pages (compose components)
|
|
44
|
+
5. Routes / navigation
|
|
45
|
+
|
|
46
|
+
Make each test pass before moving to the next.
|
|
47
|
+
|
|
48
|
+
### 4. Verify
|
|
49
|
+
|
|
50
|
+
Run the frontend test suite:
|
|
51
|
+
- All new tests must pass
|
|
52
|
+
- Existing tests must not break
|
|
53
|
+
- Report: test count, pass/fail, coverage %
|
|
54
|
+
|
|
55
|
+
### 5. Auto-Commit
|
|
56
|
+
|
|
57
|
+
Commit with: `feat(frontend): [description]`
|
|
58
|
+
|
|
59
|
+
## Rules
|
|
60
|
+
|
|
61
|
+
- ONLY touch frontend files (components, pages, composables, CSS, frontend tests, API client)
|
|
62
|
+
- Do NOT touch backend files (models, controllers, services, migrations, routes)
|
|
63
|
+
- Do NOT modify the API contract in `tasks/todo.md`
|
|
64
|
+
- Mock API responses based on the contract shapes — do NOT call the real backend
|
|
65
|
+
- 3-strike protocol: if something fails 3 times, stop and report
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: qa-engineer
|
|
3
|
+
model: sonnet
|
|
4
|
+
description: QA engineer agent — writes E2E test scenarios based on the plan while other agents implement.
|
|
5
|
+
allowed_tools: Bash, Read, Write, Glob, Grep
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# QA Engineer Agent
|
|
9
|
+
|
|
10
|
+
You are the QA Agent in a team workflow. Your job is to write E2E test scenarios while the Backend and Frontend agents implement code in parallel.
|
|
11
|
+
|
|
12
|
+
## Context
|
|
13
|
+
|
|
14
|
+
You run in the **background** while other agents work. Your E2E scenarios will be executed AFTER the backend and frontend code is merged. Write scenarios that validate the integrated result from a user's perspective.
|
|
15
|
+
|
|
16
|
+
## Behavior
|
|
17
|
+
|
|
18
|
+
### 1. Read the Plan
|
|
19
|
+
|
|
20
|
+
- Read `tasks/todo.md` — extract user-facing flows and acceptance criteria
|
|
21
|
+
- Read `tasks/lessons.md` — apply all active lessons
|
|
22
|
+
- Identify: user journeys, happy paths, error scenarios, edge cases
|
|
23
|
+
|
|
24
|
+
### 2. Detect E2E Framework
|
|
25
|
+
|
|
26
|
+
Check the project for:
|
|
27
|
+
- `playwright.config.ts` → use Playwright
|
|
28
|
+
- `cypress.config.ts` → use Cypress
|
|
29
|
+
- Neither → write framework-agnostic scenario descriptions in markdown
|
|
30
|
+
|
|
31
|
+
### 3. Write E2E Scenarios
|
|
32
|
+
|
|
33
|
+
For each user flow identified in the plan:
|
|
34
|
+
|
|
35
|
+
**If Playwright detected:**
|
|
36
|
+
- Create `e2e/<feature>.spec.ts` files
|
|
37
|
+
- Use `test.describe` / `test` blocks
|
|
38
|
+
- Use role-based locators: `getByRole`, `getByLabel`, `getByText`
|
|
39
|
+
- Use `test.beforeEach` for shared setup (auth, navigation)
|
|
40
|
+
- Guard credential-dependent tests with `test.skip`
|
|
41
|
+
|
|
42
|
+
**If no framework detected:**
|
|
43
|
+
- Create `tasks/e2e-scenarios.md` with structured scenarios:
|
|
44
|
+
```
|
|
45
|
+
## Scenario: [name]
|
|
46
|
+
**Given** [precondition]
|
|
47
|
+
**When** [action]
|
|
48
|
+
**Then** [expected result]
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### 4. Coverage Summary
|
|
52
|
+
|
|
53
|
+
Report:
|
|
54
|
+
- Total scenarios written
|
|
55
|
+
- Happy path coverage: [list of flows covered]
|
|
56
|
+
- Edge cases covered: [list]
|
|
57
|
+
- NOT covered (out of scope): [list]
|
|
58
|
+
|
|
59
|
+
## Rules
|
|
60
|
+
|
|
61
|
+
- Do NOT run E2E tests — they will fail because code isn't implemented yet
|
|
62
|
+
- Do NOT touch backend or frontend source files
|
|
63
|
+
- ONLY create E2E test files or scenario documents
|
|
64
|
+
- Write scenarios based on the PLAN, not on existing code
|
|
65
|
+
- Focus on user-visible behavior, not implementation details
|
|
66
|
+
- 3-strike protocol: if something fails 3 times, stop and report
|
|
@@ -99,9 +99,17 @@ Progress is tracked in `tasks/workflow-status.md`. This file persists across con
|
|
|
99
99
|
|
|
100
100
|
3. **Optional steps** (4, 5, 8, 15, 21): Ask the user "Skip [step]?" and require explicit confirmation. Record the reason in Notes.
|
|
101
101
|
|
|
102
|
-
4. **
|
|
102
|
+
4. **Auto-skip detection.** Optional steps (4, 5, 8, 15) are auto-skipped when detection criteria are met — no confirmation prompt needed, just a log line. Detection runs after the plan is written (step 6) by scanning `tasks/todo.md`:
|
|
103
|
+
- **Step 4 (Design)**: Auto-skipped if plan contains NO frontend keywords (component, view, page, CSS, template, blade, vue, react, svelte, UI, form, modal, button)
|
|
104
|
+
- **Step 5 (Accessibility)**: Auto-skipped if plan contains NO frontend keywords (same list as step 4)
|
|
105
|
+
- **Step 8 (Migrate)**: Auto-skipped if plan contains NO database keywords (migration, schema, table, column, model, database, foreign key, index, seed)
|
|
106
|
+
- **Step 15 (Performance)**: Auto-skipped if plan contains NO frontend keywords AND NO database keywords
|
|
107
|
+
- **Step 21 (Release)**: NEVER auto-skipped — always ask
|
|
108
|
+
- Output when auto-skipped: `Auto-skipped: [Step Name] ([reason])` — e.g., `Auto-skipped: Design (no frontend keywords detected in plan)`
|
|
103
109
|
|
|
104
|
-
5. **
|
|
110
|
+
5. **Gates own their commits.** Each hard gate (steps 12–17) is responsible for committing any fixes it produces before passing control to the next step. There are no separate conditional commit steps.
|
|
111
|
+
|
|
112
|
+
6. **Loop steps are HARD GATES** (12, 13, 14, 16, 17): These steps BLOCK all forward progress until they pass clean. Fix issues immediately and re-run. Do NOT ask the user to re-run — fix and re-run automatically. Track attempt number in Notes (e.g., "clean on attempt 3").
|
|
105
113
|
- **Step 12 (Lint)**: All detected linting tools must pass — every single one.
|
|
106
114
|
- **Step 13 (Verify Tests)**: All detected test suites (BE + FE) must pass with 100% coverage on new code.
|
|
107
115
|
- **Step 14 (Security)**: 0 issues across all severities.
|
|
@@ -110,15 +118,15 @@ Progress is tracked in `tasks/workflow-status.md`. This file persists across con
|
|
|
110
118
|
- **Step 15 (Performance)**: Optional gate — if run, loop until critical/high findings = 0. Can be skipped with explicit confirmation.
|
|
111
119
|
- **DO NOT mark these steps as `done` until every check passes.** If even one tool fails, the step is NOT done. Never proceed to the next step with errors remaining.
|
|
112
120
|
|
|
113
|
-
|
|
121
|
+
7. **Never skip steps without confirmation.** Steps cannot run out of order. Hard gate steps (12, 13, 14, 16, 17) can NEVER be skipped. Optional gate step (15) requires explicit confirmation to skip.
|
|
114
122
|
|
|
115
|
-
|
|
123
|
+
8. **Requirements change mid-workflow?** Stop the current step and run `/sk:change` immediately. It will classify the scope (behavior tweak / new requirements / scope shift) and tell you exactly where to re-enter the workflow. Never continue implementing stale requirements.
|
|
116
124
|
|
|
117
|
-
|
|
125
|
+
8. **Never auto-advance.** When one step completes, stop and tell the user which step is next. Do not proceed automatically.
|
|
118
126
|
|
|
119
|
-
|
|
127
|
+
9. **Never write code during design or plan phases.** Steps 1-6 are reading/exploring/planning/design only — no code, no file edits (except `tasks/` files).
|
|
120
128
|
|
|
121
|
-
|
|
129
|
+
10. **Step completion summary is NON-NEGOTIABLE.** After finishing ANY step, you MUST output a summary block in this exact format before stopping:
|
|
122
130
|
|
|
123
131
|
```
|
|
124
132
|
--- Step [#] [Name]: [done/skipped/partial] ---
|
|
@@ -346,28 +354,38 @@ Create entries in: `[ARCH_CHANGELOG_DIR]`
|
|
|
346
354
|
|
|
347
355
|
| Command | Purpose |
|
|
348
356
|
|---------|---------|
|
|
349
|
-
| `/sk:brainstorm` | Explore requirements and design |
|
|
350
|
-
| `/sk:frontend-design` | UI mockup before implementation. Prompts to create Pencil visual mockup |
|
|
351
|
-
| `/sk:api-design` | Design API contracts (endpoints, payloads, auth, errors) before implementation |
|
|
352
357
|
| `/sk:accessibility` | WCAG 2.1 AA audit — runs after design, before implementation |
|
|
353
|
-
| `/sk:
|
|
358
|
+
| `/sk:api-design` | Design API contracts (endpoints, payloads, auth, errors) before implementation |
|
|
359
|
+
| `/sk:autopilot` | Hands-free workflow — all 21 steps, auto-skip, auto-advance, auto-commit |
|
|
360
|
+
| `/sk:brainstorm` | Explore requirements and design |
|
|
354
361
|
| `/sk:branch` | Create feature branch auto-named from current task |
|
|
355
|
-
| `/sk:
|
|
356
|
-
| `/sk:
|
|
357
|
-
| `/sk:
|
|
358
|
-
| `/sk:lint` | Auto-detect and run all project linters + dependency audits |
|
|
359
|
-
| `/sk:test` | Auto-detect and run all project test suites |
|
|
362
|
+
| `/sk:change` | Handle mid-workflow requirement changes — re-enter at correct step |
|
|
363
|
+
| `/sk:context` | Load all context files + output session brief for fast session start |
|
|
364
|
+
| `/sk:dashboard` | Read-only workflow Kanban board — localhost server, multi-worktree |
|
|
360
365
|
| `/sk:debug` | Investigate and debug issues (bug fix entry point) |
|
|
361
|
-
| `/sk:security-check` | OWASP security audit on changed files |
|
|
362
|
-
| `/sk:perf` | Performance audit — bundle, N+1, Core Web Vitals, memory |
|
|
363
|
-
| `/sk:review` | Self-review with simplify pre-pass + multi-dimensional review |
|
|
364
366
|
| `/sk:e2e` | E2E behavioral verification using agent-browser (final quality gate) |
|
|
365
|
-
| `/sk:
|
|
366
|
-
| `/sk:
|
|
367
|
-
| `/sk:update-task` | Mark task done and log completion |
|
|
368
|
-
| `/sk:finish-feature` | Changelog + PR creation |
|
|
367
|
+
| `/sk:execute-plan` | Execute `tasks/todo.md` checkboxes in batches |
|
|
368
|
+
| `/sk:fast-track` | Abbreviated workflow for small changes — skip planning, keep all gates |
|
|
369
369
|
| `/sk:features` | Sync feature specs with shipped implementation |
|
|
370
|
+
| `/sk:finish-feature` | Changelog + PR creation |
|
|
371
|
+
| `/sk:frontend-design` | UI mockup before implementation. Prompts to create Pencil visual mockup |
|
|
372
|
+
| `/sk:gates` | Run all quality gates in optimized parallel batches |
|
|
373
|
+
| `/sk:hotfix` | Emergency fix workflow — skip design/TDD, quality gates enforced |
|
|
374
|
+
| `/sk:lint` | Auto-detect and run all project linters + dependency audits |
|
|
375
|
+
| `/sk:perf` | Performance audit — bundle, N+1, Core Web Vitals, memory |
|
|
370
376
|
| `/sk:release` | Version bump + changelog + tag |
|
|
371
|
-
| `/sk:
|
|
372
|
-
| `/sk:
|
|
377
|
+
| `/sk:retro` | Post-ship retrospective: velocity, blockers, action items |
|
|
378
|
+
| `/sk:reverse-doc` | Generate architecture/design docs from existing code |
|
|
379
|
+
| `/sk:review` | Self-review with simplify pre-pass + multi-dimensional review |
|
|
380
|
+
| `/sk:scope-check` | Compare implementation against plan, detect scope creep |
|
|
381
|
+
| `/sk:security-check` | OWASP security audit on changed files |
|
|
382
|
+
| `/sk:seo-audit` | SEO audit — dual-mode (source templates + dev server), ask-before-fix |
|
|
373
383
|
| `/sk:setup-optimizer` | Diagnose + update workflow + enrich CLAUDE.md |
|
|
384
|
+
| `/sk:smart-commit` | Conventional commit with approval |
|
|
385
|
+
| `/sk:start` | Smart entry point — classifies task, routes to optimal flow/mode/agents |
|
|
386
|
+
| `/sk:status` | Show workflow + task status |
|
|
387
|
+
| `/sk:team` | Parallel domain agents (backend + frontend + QA) for full-stack tasks |
|
|
388
|
+
| `/sk:test` | Auto-detect and run all project test suites |
|
|
389
|
+
| `/sk:update-task` | Mark task done and log completion |
|
|
390
|
+
| `/sk:write-plan` | Write decision-complete plan into `tasks/todo.md` |
|
|
391
|
+
| `/sk:write-tests` | TDD: Write failing tests before implementation |
|
|
@@ -44,6 +44,8 @@ Before making any changes, runs a diagnostic pass on the existing CLAUDE.md:
|
|
|
44
44
|
- **Inconsistencies** — compares documented vs actual project state (directories, scripts, workflows)
|
|
45
45
|
- **Section completeness** — flags sections that exist but are empty or have only placeholder text
|
|
46
46
|
- **Outdated workflow** — checks if the workflow matches the current 21-step TDD flow with hard gates
|
|
47
|
+
- **Missing commands** — checks for `sk:start`, `sk:autopilot`, `sk:team` in the Commands table
|
|
48
|
+
- **Auto-skip rules** — checks for auto-skip detection rules in the workflow section
|
|
47
49
|
|
|
48
50
|
Reports findings before proceeding. If issues are found, they inform subsequent steps.
|
|
49
51
|
|
|
@@ -57,7 +59,7 @@ Read → Explore → Design → Accessibility → Plan → Branch → Migrate
|
|
|
57
59
|
```
|
|
58
60
|
|
|
59
61
|
**What gets updated:**
|
|
60
|
-
- Workflow table (21 steps with correct commands: `/sk:write-tests`, `/sk:lint`, `/sk:test`, `/sk:accessibility`, `/sk:perf`, `/sk:e2e`)
|
|
62
|
+
- Workflow table (21 steps with correct commands: `/sk:write-tests`, `/sk:lint`, `/sk:test`, `/sk:accessibility`, `/sk:perf`, `/sk:e2e`, `/sk:start`, `/sk:autopilot`, `/sk:team`)
|
|
61
63
|
- Step details (TDD red/green/verify descriptions)
|
|
62
64
|
- Tracker rules (hard gates at 12, 14, 16, 20, 17; optional steps 4, 5, 8, 18, 21)
|
|
63
65
|
- Step completion summary rule (NON-NEGOTIABLE)
|
|
@@ -70,6 +72,7 @@ Read → Explore → Design → Accessibility → Plan → Branch → Migrate
|
|
|
70
72
|
- 3-Strike Protocol (if missing)
|
|
71
73
|
- Fix & Retest Protocol section (if missing)
|
|
72
74
|
- Requirement Change Flow section (if missing)
|
|
75
|
+
- Auto-skip detection rules (if missing)
|
|
73
76
|
|
|
74
77
|
**What gets preserved:**
|
|
75
78
|
- Everything marked with `<!-- LOCK -->` is never touched
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sk:start
|
|
3
|
+
description: Smart entry point — classifies your task, detects scope, and routes to the optimal flow (feature/debug/hotfix/fast-track), mode (manual/autopilot), and agent strategy (solo/team).
|
|
4
|
+
user_invocable: true
|
|
5
|
+
allowed_tools: Read, Write, Bash, Glob, Grep, Agent, Skill
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Smart Start
|
|
9
|
+
|
|
10
|
+
Single entry point that classifies your task and recommends the optimal workflow configuration. Replaces the need to know which command to run first.
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
/sk:start <task description>
|
|
16
|
+
/sk:start --manual add user profile page
|
|
17
|
+
/sk:start --team add profile page with API
|
|
18
|
+
/sk:start --debug fix login redirect loop
|
|
19
|
+
/sk:start --hotfix prod payments failing
|
|
20
|
+
/sk:start --fast-track bump lodash dependency
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Steps
|
|
24
|
+
|
|
25
|
+
### Step 1 — Classify (automatic, no prompt)
|
|
26
|
+
|
|
27
|
+
Read the task description from arguments. Scan for signal keywords to determine flow and scope:
|
|
28
|
+
|
|
29
|
+
**Flow detection:**
|
|
30
|
+
|
|
31
|
+
| Signal Keywords | Detected Flow |
|
|
32
|
+
|----------------|---------------|
|
|
33
|
+
| bug, fix, broken, error, regression, failing, crash, wrong | `debug` (11 steps) |
|
|
34
|
+
| urgent, prod down, hotfix, emergency, critical, production, incident | `hotfix` (11 steps) |
|
|
35
|
+
| config, bump, typo, copy, rename, dependency, upgrade, version, docs | `fast-track` (10 steps) |
|
|
36
|
+
| *(default — no special signals)* | `feature` (21 steps) |
|
|
37
|
+
|
|
38
|
+
**Scope detection:**
|
|
39
|
+
|
|
40
|
+
| Signal Keywords | Detected Scope |
|
|
41
|
+
|----------------|----------------|
|
|
42
|
+
| Frontend: component, page, view, CSS, UI, form, modal, button, sidebar, navbar, layout, style, tailwind, animation | `frontend` |
|
|
43
|
+
| Backend: API, endpoint, controller, model, migration, service, queue, job, middleware, database, schema, route | `backend` |
|
|
44
|
+
| Both frontend AND backend keywords present | `full-stack` |
|
|
45
|
+
| Neither | `unknown` (ask user) |
|
|
46
|
+
|
|
47
|
+
**Agent recommendation:**
|
|
48
|
+
|
|
49
|
+
| Scope | Agents |
|
|
50
|
+
|-------|--------|
|
|
51
|
+
| `full-stack` | `team` (backend + frontend + QA agents) |
|
|
52
|
+
| `frontend` only | `solo` |
|
|
53
|
+
| `backend` only | `solo` |
|
|
54
|
+
| `unknown` | `solo` (default) |
|
|
55
|
+
|
|
56
|
+
### Step 2 — Recommend (one prompt, user confirms or overrides)
|
|
57
|
+
|
|
58
|
+
Present the classification and recommendation:
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
Detected: [Full-stack feature / Backend bug fix / Frontend hotfix / Small config change / etc.]
|
|
62
|
+
Recommended:
|
|
63
|
+
Flow: [feature (21 steps) / debug (11 steps) / hotfix (11 steps) / fast-track (10 steps)]
|
|
64
|
+
Mode: [autopilot / manual]
|
|
65
|
+
Agents: [team (backend + frontend + QA) / solo]
|
|
66
|
+
|
|
67
|
+
Proceed? (y) or override: manual / no-team / --debug / --hotfix / --fast-track
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Default mode recommendation:
|
|
71
|
+
- `feature` flow → recommend `autopilot`
|
|
72
|
+
- `debug` flow → recommend `autopilot`
|
|
73
|
+
- `hotfix` flow → recommend `autopilot`
|
|
74
|
+
- `fast-track` flow → recommend `autopilot`
|
|
75
|
+
|
|
76
|
+
Wait for user response:
|
|
77
|
+
- `y` or `yes` → proceed with recommendation
|
|
78
|
+
- `manual` → use recommended flow but in manual mode (step-by-step)
|
|
79
|
+
- `no-team` → use autopilot but single-agent (no team)
|
|
80
|
+
- `--debug` → force debug flow
|
|
81
|
+
- `--hotfix` → force hotfix flow
|
|
82
|
+
- `--fast-track` → force fast-track flow
|
|
83
|
+
- Any other override → apply it
|
|
84
|
+
|
|
85
|
+
### Step 3 — Route (enters the chosen flow)
|
|
86
|
+
|
|
87
|
+
1. Reset `tasks/workflow-status.md`:
|
|
88
|
+
- Set all steps to `not yet`
|
|
89
|
+
- Add metadata to the tracker header:
|
|
90
|
+
```
|
|
91
|
+
> Mode: [autopilot/manual] | Agents: [team/solo] | Flow: [feature/debug/hotfix/fast-track]
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
2. Dispatch to the chosen flow:
|
|
95
|
+
|
|
96
|
+
**If autopilot mode:**
|
|
97
|
+
- Invoke `/sk:autopilot` with the task description
|
|
98
|
+
- Autopilot handles everything from here
|
|
99
|
+
|
|
100
|
+
**If manual mode + team:**
|
|
101
|
+
- Start the normal step-by-step workflow (`/sk:brainstorm`)
|
|
102
|
+
- Note in tracker: "Team mode active — activate `/sk:team` at step 9"
|
|
103
|
+
- User drives each step manually; team mode activates at write-tests/implement
|
|
104
|
+
|
|
105
|
+
**If manual mode + solo:**
|
|
106
|
+
- Start the normal step-by-step workflow (`/sk:brainstorm`)
|
|
107
|
+
- Standard manual behavior — no changes from current flow
|
|
108
|
+
|
|
109
|
+
**If debug flow:**
|
|
110
|
+
- Invoke `/sk:debug` with the task description
|
|
111
|
+
|
|
112
|
+
**If hotfix flow:**
|
|
113
|
+
- Invoke `/sk:hotfix` with the task description
|
|
114
|
+
|
|
115
|
+
**If fast-track flow:**
|
|
116
|
+
- Invoke `/sk:fast-track` with the task description
|
|
117
|
+
|
|
118
|
+
## Override Flags
|
|
119
|
+
|
|
120
|
+
| Flag | Effect |
|
|
121
|
+
|------|--------|
|
|
122
|
+
| `--manual` | Force manual mode (step-by-step, no auto-advance) |
|
|
123
|
+
| `--no-team` | Force single-agent even if full-stack detected |
|
|
124
|
+
| `--team` | Force team mode even if single-domain detected |
|
|
125
|
+
| `--debug` | Force debug flow (bug fix) |
|
|
126
|
+
| `--hotfix` | Force hotfix flow (production emergency) |
|
|
127
|
+
| `--fast-track` | Force fast-track flow (small change) |
|
|
128
|
+
|
|
129
|
+
Flags can be combined: `/sk:start --manual --team add profile page`
|
|
130
|
+
|
|
131
|
+
## Relationship to Existing Commands
|
|
132
|
+
|
|
133
|
+
- `/sk:start` is the **recommended** entry point for all new work
|
|
134
|
+
- Old commands still work as direct entry points:
|
|
135
|
+
- `/sk:brainstorm` → manual feature workflow
|
|
136
|
+
- `/sk:debug` → bug fix flow
|
|
137
|
+
- `/sk:hotfix` → hotfix flow
|
|
138
|
+
- `/sk:fast-track` → fast-track flow
|
|
139
|
+
- `/sk:autopilot` → autopilot mode directly
|
|
140
|
+
- `/sk:start` calls those same flows internally — it's a router, not a replacement
|
|
141
|
+
|
|
142
|
+
## Model Routing
|
|
143
|
+
|
|
144
|
+
Read `.shipkit/config.json` from the project root if it exists.
|
|
145
|
+
|
|
146
|
+
- If `model_overrides["sk:start"]` is set, use that model — it takes precedence.
|
|
147
|
+
- Otherwise use the `profile` field. Default: `balanced`.
|
|
148
|
+
|
|
149
|
+
| Profile | Model |
|
|
150
|
+
|---------|-------|
|
|
151
|
+
| `full-sail` | haiku |
|
|
152
|
+
| `quality` | haiku |
|
|
153
|
+
| `balanced` | haiku |
|
|
154
|
+
| `budget` | haiku |
|
|
155
|
+
|
|
156
|
+
> Start is a lightweight classifier — haiku is sufficient for keyword matching and routing.
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sk:team
|
|
3
|
+
description: Parallel domain agents for full-stack implementation — spawns Backend, Frontend, and QA agents in isolated worktrees.
|
|
4
|
+
user_invocable: true
|
|
5
|
+
allowed_tools: Read, Write, Bash, Glob, Grep, Agent
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Team Mode
|
|
9
|
+
|
|
10
|
+
Splits implementation across specialized parallel agents when a task spans multiple domains (frontend + backend). Each agent works in an isolated worktree to avoid conflicts. Works in both manual and autopilot modes.
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
- Full-stack features with both backend API and frontend UI work
|
|
15
|
+
- Tasks where frontend and backend have clear boundaries (separate directories)
|
|
16
|
+
- Changes large enough that parallel implementation saves meaningful time
|
|
17
|
+
|
|
18
|
+
## When NOT to Use
|
|
19
|
+
|
|
20
|
+
- Backend-only or frontend-only tasks — single agent is faster
|
|
21
|
+
- Tasks where frontend and backend share files (e.g., Inertia controllers returning views)
|
|
22
|
+
- Small changes (<100 lines estimated) — worktree overhead exceeds time saved
|
|
23
|
+
- Tasks without a clear API contract boundary
|
|
24
|
+
|
|
25
|
+
## Agents
|
|
26
|
+
|
|
27
|
+
| Agent | Role | Isolation | Model |
|
|
28
|
+
|-------|------|-----------|-------|
|
|
29
|
+
| **Backend Agent** | Writes backend tests + implements API/services/models | Isolated worktree | sonnet |
|
|
30
|
+
| **Frontend Agent** | Writes frontend tests + implements UI/components/pages | Isolated worktree | sonnet |
|
|
31
|
+
| **QA Agent** | Writes E2E test scenarios while others implement | Background | sonnet |
|
|
32
|
+
|
|
33
|
+
## Prerequisites
|
|
34
|
+
|
|
35
|
+
The plan in `tasks/todo.md` MUST contain an explicit **API contract** section defining:
|
|
36
|
+
- Endpoint paths and HTTP methods
|
|
37
|
+
- Request payload shapes (with types)
|
|
38
|
+
- Response payload shapes (with types)
|
|
39
|
+
- Authentication requirements
|
|
40
|
+
- Error response formats
|
|
41
|
+
|
|
42
|
+
If no API contract is found, team mode warns and falls back to single-agent sequential mode.
|
|
43
|
+
|
|
44
|
+
## Steps
|
|
45
|
+
|
|
46
|
+
### 0. Validate Prerequisites
|
|
47
|
+
|
|
48
|
+
1. Read `tasks/todo.md` — scan for API contract section
|
|
49
|
+
2. If no API contract found:
|
|
50
|
+
> "No API contract found in plan. Team mode requires explicit endpoint definitions as the shared boundary between agents. Falling back to single-agent mode."
|
|
51
|
+
- Exit team mode, proceed with normal sequential implementation
|
|
52
|
+
3. If API contract found, continue
|
|
53
|
+
|
|
54
|
+
### 1. Prepare Worktrees
|
|
55
|
+
|
|
56
|
+
1. Get current branch name: `git branch --show-current`
|
|
57
|
+
2. Verify working directory is clean: `git status --porcelain`
|
|
58
|
+
3. Note: worktree creation is handled by the Agent tool's `isolation: "worktree"` parameter
|
|
59
|
+
|
|
60
|
+
### 2. Spawn Agents (parallel)
|
|
61
|
+
|
|
62
|
+
Launch all 3 agents simultaneously using the Agent tool:
|
|
63
|
+
|
|
64
|
+
**Backend Agent** (`isolation: "worktree"`):
|
|
65
|
+
- Task: "Read the API contract in tasks/todo.md. Write backend tests for all endpoints (controller tests, model tests, validation tests). Then implement: migrations, models, services, controllers, routes. Make all tests pass. Commit with `feat(backend): [description]`."
|
|
66
|
+
- Receives: full plan from `tasks/todo.md`, `tasks/lessons.md`
|
|
67
|
+
|
|
68
|
+
**Frontend Agent** (`isolation: "worktree"`):
|
|
69
|
+
- Task: "Read the API contract in tasks/todo.md. Write frontend tests for all components/pages (component tests, interaction tests, form tests). Mock API endpoints using contract shapes. Then implement: API client, composables/hooks, components, pages, routes. Make all tests pass. Commit with `feat(frontend): [description]`."
|
|
70
|
+
- Receives: full plan from `tasks/todo.md`, `tasks/lessons.md`
|
|
71
|
+
|
|
72
|
+
**QA Agent** (`run_in_background: true`):
|
|
73
|
+
- Task: "Read the plan in tasks/todo.md. Write E2E test scenarios covering all user flows. Do NOT run them — they'll be executed after merge. Report scenario count and coverage summary."
|
|
74
|
+
- Receives: full plan from `tasks/todo.md`
|
|
75
|
+
|
|
76
|
+
### 3. Wait for Completion
|
|
77
|
+
|
|
78
|
+
Wait for Backend Agent and Frontend Agent to complete. The QA Agent runs in the background and will be collected later.
|
|
79
|
+
|
|
80
|
+
For each completed agent, check:
|
|
81
|
+
- Did it succeed or hit 3-strike failure?
|
|
82
|
+
- What files were changed?
|
|
83
|
+
- What tests pass?
|
|
84
|
+
|
|
85
|
+
### 4. Merge Worktrees
|
|
86
|
+
|
|
87
|
+
If both agents used worktree isolation and made changes:
|
|
88
|
+
|
|
89
|
+
1. Check if worktree branches exist
|
|
90
|
+
2. Merge backend worktree branch into feature branch:
|
|
91
|
+
```bash
|
|
92
|
+
git merge <backend-worktree-branch> --no-edit
|
|
93
|
+
```
|
|
94
|
+
3. Merge frontend worktree branch into feature branch:
|
|
95
|
+
```bash
|
|
96
|
+
git merge <frontend-worktree-branch> --no-edit
|
|
97
|
+
```
|
|
98
|
+
4. If merge conflicts occur:
|
|
99
|
+
- Attempt auto-resolution for non-overlapping changes
|
|
100
|
+
- If conflicts are in shared files (routes, config, types), resolve by combining both additions
|
|
101
|
+
- If conflicts are ambiguous, stop and ask user:
|
|
102
|
+
> "Merge conflict in [file]. Backend added [X], Frontend added [Y]. Which to keep, or combine?"
|
|
103
|
+
|
|
104
|
+
### 5. Collect QA Agent Results
|
|
105
|
+
|
|
106
|
+
Collect the QA Agent's E2E scenarios. These will be used in the E2E gate (step 17).
|
|
107
|
+
|
|
108
|
+
### 6. Report Results
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
Team implementation complete:
|
|
112
|
+
Backend Agent: [N] files changed, [M] tests passing
|
|
113
|
+
Frontend Agent: [N] files changed, [M] tests passing
|
|
114
|
+
QA Agent: [N] E2E scenarios written
|
|
115
|
+
Merge: [clean / N conflicts resolved]
|
|
116
|
+
|
|
117
|
+
Ready for commit and quality gates.
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Fallback
|
|
121
|
+
|
|
122
|
+
If worktree creation fails (git state issues, disk space, etc.):
|
|
123
|
+
> "Worktree creation failed: [error]. Falling back to single-agent sequential mode."
|
|
124
|
+
|
|
125
|
+
Run normal sequential implementation (write-tests → implement) instead.
|
|
126
|
+
|
|
127
|
+
## Model Routing
|
|
128
|
+
|
|
129
|
+
Read `.shipkit/config.json` from the project root if it exists.
|
|
130
|
+
|
|
131
|
+
- If `model_overrides["sk:team"]` is set, use that model — it takes precedence.
|
|
132
|
+
- Otherwise use the `profile` field. Default: `balanced`.
|
|
133
|
+
|
|
134
|
+
| Profile | Model |
|
|
135
|
+
|---------|-------|
|
|
136
|
+
| `full-sail` | opus (inherit) |
|
|
137
|
+
| `quality` | opus (inherit) |
|
|
138
|
+
| `balanced` | sonnet |
|
|
139
|
+
| `budget` | sonnet |
|
|
140
|
+
|
|
141
|
+
> `opus` = inherit. When spawning sub-agents via the Agent tool, pass `model: "<resolved-model>"`.
|