@kennethsolomon/shipkit 3.8.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.
@@ -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>"`.