@c0x12c/spartan-ai-toolkit 1.6.1 → 1.6.2

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.
@@ -10,7 +10,7 @@
10
10
  "name": "spartan-ai-toolkit",
11
11
  "description": "5 workflows, 56 commands, 12 rules, 22 skills, 7 agents — organized in 11 packs with dependencies",
12
12
  "source": "./toolkit",
13
- "version": "1.6.1"
13
+ "version": "1.6.2"
14
14
  }
15
15
  ]
16
16
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spartan-ai-toolkit",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "description": "Engineering discipline layer for Claude Code — 5 workflows, 56 commands, 12 rules, 22 skills, 7 agents organized in 11 packs",
5
5
  "author": {
6
6
  "name": "Khoa Tran",
package/VERSION CHANGED
@@ -1 +1 @@
1
- 1.6.1
1
+ 1.6.2
@@ -165,7 +165,7 @@ If user picks B → continue to Plan.
165
165
 
166
166
  If user picks C → read the Figma reference and use it as the design source.
167
167
 
168
- **Auto mode on?** → Skip for small UI changes (adding a column to a table, a toggle). Run for new screens/pages.
168
+ **Auto mode on?** → Still ask this question. Design skipping is the user's call, not yours. The only exception: if the ONLY UI change is a single field addition to an existing component (e.g., adding a column to a table), skip silently.
169
169
 
170
170
  ---
171
171
 
@@ -243,33 +243,63 @@ Write the first failing test for Task 1. Show it fails.
243
243
 
244
244
  ## Stage 3: Implement
245
245
 
246
- ### Agent Teams boost (if enabled)
246
+ ### Auto-parallelize with Agent Teams
247
247
 
248
248
  ```bash
249
249
  echo "${CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS:-not_set}"
250
250
  ```
251
251
 
252
- **If Agent Teams is enabled AND the plan has 4+ tasks AND the feature is full-stack:**
252
+ **If Agent Teams is enabled:** Look at the plan and auto-detect parallelism. If 2+ tasks in the plan can run at the same time (no dependency between them), use Agent Teams automatically. Don't ask — just do it.
253
253
 
254
- Offer to parallelize implementation with Agent Teams:
255
- > "This has [N] tasks across backend and frontend. Want me to spin up a build team?
256
- >
257
- > I'd go with **A** parallel tracks save time on full-stack work.
258
- >
259
- > - **A) Build team** — one backend agent + one frontend agent, working in parallel (uses more tokens)
260
- > - **B) Sequential** I'll do all tasks one by one (cheaper, simpler)"
261
-
262
- If user picks A:
263
- 1. Use `TeamCreate` with name `build-{feature-slug}`
264
- 2. Create tasks from the plan — backend tasks assigned to `backend-dev`, frontend tasks to `frontend-dev`
265
- 3. Set `addBlockedBy` for frontend tasks that need backend API first
266
- 4. Spawn two agents with `isolation: "worktree"`:
267
- - **backend-dev** gets backend tasks, relevant Kotlin/Micronaut rules
268
- - **frontend-dev** — gets frontend tasks, relevant React/Next.js rules
269
- 5. Monitor progress. When both finish, merge worktrees and run full test suite.
270
- 6. After completion, use `TeamDelete` to clean up.
271
-
272
- If user picks B (or Agent Teams not enabled), continue with sequential execution below.
254
+ **When to parallelize (auto-trigger):**
255
+ - Full-stack: backend + frontend tracks are always parallel (frontend blocked only by its API dependency, not all backend tasks)
256
+ - Backend-only with 4+ tasks: data-layer tasks vs API-layer tasks can often run in parallel
257
+ - Frontend-only with 4+ tasks: independent components/pages can run in parallel
258
+ - Any mode where the plan has 2+ tasks with no dependency on each other
259
+
260
+ **When NOT to parallelize:**
261
+ - Only 1-3 small sequential tasks — overhead isn't worth it
262
+ - All tasks depend on each other in a chain
263
+ - Agent Teams env var is not set
264
+
265
+ **How to run it:**
266
+
267
+ 1. Check for design doc:
268
+ ```bash
269
+ ls .planning/designs/*.md 2>/dev/null
270
+ ```
271
+
272
+ 2. Use `TeamCreate` with name `build-{feature-slug}`.
273
+
274
+ 3. Create tasks from the plan. Set `addBlockedBy` for real dependencies only.
275
+
276
+ 4. Spawn agents with `isolation: "worktree"`. Split by mode:
277
+
278
+ **Full-stack** — two agents:
279
+ - **backend-dev** — backend tasks, Kotlin/Micronaut rules
280
+ - **frontend-dev** — frontend tasks, React/Next.js rules, design doc
281
+
282
+ **Backend-only** — split by layer:
283
+ - **data-layer** — migration + entity + repository
284
+ - **api-layer** — service + controller (blocked by data-layer)
285
+
286
+ **Frontend-only** — split by concern:
287
+ - **components-dev** — types + components + API client
288
+ - **pages-dev** — pages + routing + integration (blocked by components-dev)
289
+
290
+ **Design doc handoff (MANDATORY for frontend/UI agents):**
291
+ If a design doc exists at `.planning/designs/`, EVERY frontend/UI agent MUST get this in its prompt:
292
+ ```
293
+ Design doc: .planning/designs/{feature}.md — read this FIRST.
294
+ Follow the screen designs, component specs, and visual details exactly.
295
+ Do NOT invent your own layout or design. The design was already reviewed and approved.
296
+ ```
297
+
298
+ 5. Monitor progress. When all agents finish, merge worktrees and run full test suite.
299
+
300
+ 6. `TeamDelete` to clean up.
301
+
302
+ **If Agent Teams is NOT enabled** (env var not set), continue with sequential execution below.
273
303
 
274
304
  ### Sequential execution (default)
275
305
 
@@ -61,29 +61,22 @@ If the user has multiple Claude Code tabs available, suggest:
61
61
 
62
62
  Running the planned tasks wave by wave.
63
63
 
64
- ### Agent Teams boost (if enabled)
64
+ ### Auto-parallelize with Agent Teams
65
65
 
66
66
  ```bash
67
67
  echo "${CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS:-not_set}"
68
68
  ```
69
69
 
70
- **If Agent Teams is enabled AND the wave plan has 2+ parallel work units in any wave:**
70
+ **If Agent Teams is enabled AND the current wave has 2+ parallel work units:** Use Agent Teams automatically. Don't ask — just do it. This replaces manual multi-tab work.
71
71
 
72
- Offer to use Agent Teams for wave execution:
73
- > "Wave 1 has [N] parallel work units. Want me to use Agent Teams?
74
- >
75
- > I'd go with **A** — it automates what you'd do manually across tabs.
76
- >
77
- > - **A) Agent Teams** — one agent per WU, worktree isolation, auto-advance between waves
78
- > - **B) Manual** — I'll execute sequentially, or you open multiple tabs yourself"
79
-
80
- If user picks A → run `/spartan:team wave` internally. This:
72
+ Run `/spartan:team wave` internally. This:
81
73
  1. Creates a team from the wave plan
82
74
  2. Spawns one agent per WU with worktree isolation
83
- 3. Verifies tests pass between waves
84
- 4. Auto-advances to the next wave
75
+ 3. Passes design docs to any UI-related WUs (check `.planning/designs/`)
76
+ 4. Verifies tests pass between waves
77
+ 5. Auto-advances to the next wave
85
78
 
86
- If user picks B (or Agent Teams not enabled) → continue with default execution:
79
+ **If Agent Teams is NOT enabled** (env var not set) → continue with default execution:
87
80
 
88
81
  **Run:** `/gsd:execute-phase {{ args[1] | default: "N" }}`
89
82
 
@@ -364,13 +364,16 @@ Spin up a parallel implementation team for a feature.
364
364
 
365
365
  ### Step 1: Understand the feature
366
366
 
367
- Check for existing spec/plan:
367
+ Check for existing artifacts:
368
368
  ```bash
369
369
  ls .planning/specs/ .planning/PLAN.md 2>/dev/null
370
+ ls .planning/designs/*.md 2>/dev/null
370
371
  ```
371
372
 
372
373
  If no spec exists, tell user: "No spec found. Run `/spartan:spec` first, or describe the feature and I'll split it into parallel work."
373
374
 
375
+ If a design doc exists, note its path — you'll pass it to frontend/UI agents in Step 5.
376
+
374
377
  ### Step 2: Detect stack and split work
375
378
 
376
379
  ```bash
@@ -402,6 +405,7 @@ Each builder agent gets:
402
405
  - Instructions to follow TDD
403
406
  - References to relevant rules from installed packs
404
407
  - `.memory/` context
408
+ - **Design doc path** (if `.planning/designs/*.md` exists) — frontend/UI agents MUST read the design doc before building. Include in prompt: "Read `.planning/designs/{feature}.md` FIRST. Follow screen designs and component specs exactly."
405
409
 
406
410
  ### Step 6: Integration
407
411
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c0x12c/spartan-ai-toolkit",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "description": "Engineering discipline layer for AI coding agents — commands, rules, skills, agents, and packs for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {