@c0x12c/spartan-ai-toolkit 1.8.0 → 1.8.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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +3 -3
- package/VERSION +1 -1
- package/agents/design-critic.md +1 -1
- package/claude-md/01-core.md +4 -4
- package/claude-md/20-frontend-react.md +3 -8
- package/claude-md/25-ux-design.md +1 -1
- package/commands/spartan/build.md +167 -57
- package/commands/spartan/epic.md +1 -1
- package/commands/spartan/gate-review.md +38 -5
- package/commands/spartan/map-codebase.md +45 -12
- package/commands/spartan/onboard.md +34 -7
- package/commands/spartan/research.md +38 -10
- package/commands/spartan/spec.md +1 -1
- package/commands/spartan/startup.md +33 -8
- package/commands/spartan/team.md +81 -20
- package/commands/spartan/ux.md +1 -1
- package/commands/spartan.md +2 -1
- package/package.json +1 -1
- package/rules/backend-micronaut/API_DESIGN.md +25 -0
- package/rules/backend-micronaut/CONTROLLERS.md +2 -0
- package/skills/api-endpoint-creator/SKILL.md +4 -4
- package/templates/quality-gates.md +1 -1
- package/commands/spartan/design.md +0 -23
package/README.md
CHANGED
|
@@ -58,9 +58,9 @@ After install, open any project, run `claude`, then type `/spartan`.
|
|
|
58
58
|
Every feature follows the same pipeline. Skip steps that don't apply.
|
|
59
59
|
|
|
60
60
|
```
|
|
61
|
-
/spartan:spec → /spartan:
|
|
62
|
-
↑
|
|
63
|
-
Gate 1
|
|
61
|
+
/spartan:spec → /spartan:ux → /spartan:plan → /spartan:build → /spartan:pr-ready
|
|
62
|
+
↑ ↑ ↑ ↑ + 3.5 ↑
|
|
63
|
+
Gate 1 Design Gate Gate 2 Gate 3 Gate 4
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
| Step | What happens |
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.8.
|
|
1
|
+
1.8.1
|
package/agents/design-critic.md
CHANGED
|
@@ -10,7 +10,7 @@ description: |
|
|
|
10
10
|
</example>
|
|
11
11
|
|
|
12
12
|
<example>
|
|
13
|
-
Context: /spartan:
|
|
13
|
+
Context: /spartan:ux prototype command needs a second opinion on the UI.
|
|
14
14
|
user: "Run the design critic on this feature"
|
|
15
15
|
assistant: "I'll spawn the design-critic to review the design doc and give a verdict."
|
|
16
16
|
</example>
|
package/claude-md/01-core.md
CHANGED
|
@@ -63,15 +63,15 @@ Auto mode is ideal for experienced users who trust the workflow and want maximum
|
|
|
63
63
|
|
|
64
64
|
### Feature Workflow
|
|
65
65
|
```
|
|
66
|
-
/spartan:epic → /spartan:spec → [/spartan:
|
|
67
|
-
↑
|
|
68
|
-
Gate 1
|
|
66
|
+
/spartan:epic → /spartan:spec → [/spartan:ux] → /spartan:plan → /spartan:build → /spartan:pr-ready
|
|
67
|
+
↑ ↑ ↑ ↑ + 3.5 ↑
|
|
68
|
+
Gate 1 Design Gate Gate 2 Gate 3 Gate 4
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
| Size | Path |
|
|
72
72
|
|---|---|
|
|
73
73
|
| Single feature (backend) | `/spartan:spec` → `/spartan:plan` → `/spartan:build` |
|
|
74
|
-
| Single feature (with UI) | `/spartan:spec` → `/spartan:
|
|
74
|
+
| Single feature (with UI) | `/spartan:spec` → `/spartan:ux prototype` → `/spartan:plan` → `/spartan:build` |
|
|
75
75
|
| Batch of features (1-2 weeks) | `/spartan:epic` → then spec/plan/build each feature |
|
|
76
76
|
| Multi-week project | `/spartan:project new` → milestones + phases |
|
|
77
77
|
|
|
@@ -22,25 +22,20 @@ Epic → Spec → Design → Plan → Build → Review
|
|
|
22
22
|
|
|
23
23
|
Design is NOT optional for frontend — always create a design doc for new screens.
|
|
24
24
|
|
|
25
|
-
**Design workflow:** `/spartan:spec` → `/spartan:
|
|
25
|
+
**Design workflow:** `/spartan:spec` → `/spartan:ux prototype` → `/spartan:plan` → `/spartan:build`
|
|
26
26
|
|
|
27
|
-
The `/spartan:design` command creates a design doc with dual-agent review (designer + `design-critic`). It reads your project's `.planning/design-config.md` for brand colors, fonts, and personality. If no config exists, it helps you create one.
|
|
27
|
+
The `/spartan:ux` command handles the full design pipeline — from user research to design QA. The `prototype` sub-command creates a design doc with dual-agent review (designer + `design-critic`). It reads your project's `.planning/design-config.md` for brand colors, fonts, and personality. If no config exists, it helps you create one.
|
|
28
28
|
|
|
29
29
|
See `templates/workflow-frontend-react.md` for the full workflow with:
|
|
30
30
|
- Stack-specific quality gates (TypeScript, React patterns, accessibility, responsive)
|
|
31
31
|
- File location guide (App Router conventions)
|
|
32
32
|
- Parallel vs sequential task planning
|
|
33
33
|
|
|
34
|
-
### Frontend Skills
|
|
35
|
-
|
|
36
|
-
- `/ui-ux-pro-max` — Design system with 67 styles, 96 palettes, 13 stacks
|
|
37
|
-
- `/design-workflow` — Anti-AI-generic design guidelines
|
|
38
|
-
|
|
39
34
|
### Frontend Commands
|
|
40
35
|
|
|
41
36
|
| Command | Purpose |
|
|
42
37
|
|---|---|
|
|
43
|
-
| `/spartan:
|
|
38
|
+
| `/spartan:ux [phase]` | UX design workflow — research, define, ideate, system, prototype, test, handoff, qa |
|
|
44
39
|
| `/spartan:next-app [name]` | Scaffold Next.js app (App Router, Vitest, Docker, CI) |
|
|
45
40
|
| `/spartan:next-feature [name]` | Add feature to existing Next.js app |
|
|
46
41
|
| `/spartan:fe-review` | PR review with Next.js App Router conventions |
|
|
@@ -53,4 +53,4 @@ Once design tokens exist, ALL downstream commands enforce them:
|
|
|
53
53
|
| `/spartan:build frontend` | Checks for design tokens, nudges if missing |
|
|
54
54
|
| `/spartan:spec` (UI feature) | Checks for user research, suggests if missing |
|
|
55
55
|
| `/spartan:fe-review` | Checks code against design tokens |
|
|
56
|
-
| `/spartan:
|
|
56
|
+
| `/spartan:figma-to-code` | Merges with existing design tokens if they exist |
|
|
@@ -28,7 +28,7 @@ EPIC (multi-feature — auto-detected):
|
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
**Fast path:** For small work (< 1 day, ≤ 4 tasks), you do spec + plan inline. No separate commands needed.
|
|
31
|
-
**Full path:** For bigger work, you call `/spartan:spec`, `/spartan:
|
|
31
|
+
**Full path:** For bigger work, you call `/spartan:spec`, `/spartan:ux prototype`, `/spartan:plan` as sub-steps.
|
|
32
32
|
**Epic path:** If the feature name matches an epic with 2+ specs ready, build all features together — one branch, one PR.
|
|
33
33
|
|
|
34
34
|
### Stages That MUST NOT Be Skipped
|
|
@@ -205,7 +205,7 @@ If no design exists and UI work is needed:
|
|
|
205
205
|
> - **B) Skip** — I'll design as I build (fine for simple UI changes)
|
|
206
206
|
> - **C) I have Figma designs** — point me to them
|
|
207
207
|
|
|
208
|
-
If user picks A → use the approach from `/spartan:
|
|
208
|
+
If user picks A → use the approach from `/spartan:ux prototype` internally. Run the full design workflow including the design-critic agent review.
|
|
209
209
|
|
|
210
210
|
If user picks B → continue to Plan.
|
|
211
211
|
|
|
@@ -308,60 +308,104 @@ echo "${CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS:-not_set}"
|
|
|
308
308
|
- All tasks depend on each other in a chain
|
|
309
309
|
- Agent Teams env var is not set
|
|
310
310
|
|
|
311
|
-
**How to run it:**
|
|
311
|
+
**How to run it (follow this exact sequence):**
|
|
312
312
|
|
|
313
|
-
|
|
313
|
+
> **Sub-agents vs Agent Teams — know the difference:**
|
|
314
|
+
> - `Agent(run_in_background: true)` = sub-agent. Same session, 1 node. **NOT a team.**
|
|
315
|
+
> - `Agent(team_name: "...", name: "...")` = teammate. Separate session, own node, can message others. **This is what you want.**
|
|
316
|
+
> - Without `team_name` param, agents ALWAYS spawn as sub-agents. The `team_name` param is what makes them teammates.
|
|
317
|
+
|
|
318
|
+
1. Check for design doc and tokens:
|
|
314
319
|
```bash
|
|
315
|
-
ls .planning/designs/*.md 2>/dev/null
|
|
320
|
+
ls .planning/designs/*.md .planning/design/screens/*.md 2>/dev/null
|
|
321
|
+
ls .planning/design/system/tokens.md .planning/design-config.md 2>/dev/null
|
|
316
322
|
```
|
|
317
323
|
|
|
318
|
-
2.
|
|
324
|
+
2. Create the team with `TeamCreate`:
|
|
325
|
+
```
|
|
326
|
+
TeamCreate(team_name: "build-{feature-slug}", description: "Building: {feature name}")
|
|
327
|
+
```
|
|
319
328
|
|
|
320
|
-
3. Create tasks from the plan. Set
|
|
329
|
+
3. Create tasks with `TaskCreate` — one per work item from the plan. Set dependencies:
|
|
330
|
+
```
|
|
331
|
+
TaskCreate(subject: "Implement user repository", description: "...")
|
|
332
|
+
TaskCreate(subject: "Implement user controller", description: "...")
|
|
333
|
+
TaskUpdate(taskId: "2", addBlockedBy: ["1"]) // controller depends on repository
|
|
334
|
+
```
|
|
321
335
|
|
|
322
|
-
4. Spawn
|
|
336
|
+
4. Spawn teammates with `Agent` — **MUST include `team_name` and `name` params:**
|
|
323
337
|
|
|
324
|
-
**Full-stack** — two
|
|
325
|
-
|
|
326
|
-
|
|
338
|
+
**Full-stack** — two teammates:
|
|
339
|
+
```
|
|
340
|
+
Agent(
|
|
341
|
+
team_name: "build-{feature-slug}",
|
|
342
|
+
name: "backend-dev",
|
|
343
|
+
subagent_type: "general-purpose",
|
|
344
|
+
isolation: "worktree",
|
|
345
|
+
prompt: "You are the backend developer for {feature}.
|
|
346
|
+
Check TaskList, claim backend tasks with TaskUpdate(owner: 'backend-dev').
|
|
347
|
+
Follow TDD. Read .memory/index.md for project context.
|
|
348
|
+
Rules: ~/.claude/rules/backend-micronaut/ and ~/.claude/rules/database/
|
|
349
|
+
When done with a task, mark it completed and check TaskList for next work."
|
|
350
|
+
)
|
|
351
|
+
|
|
352
|
+
Agent(
|
|
353
|
+
team_name: "build-{feature-slug}",
|
|
354
|
+
name: "frontend-dev",
|
|
355
|
+
subagent_type: "general-purpose",
|
|
356
|
+
isolation: "worktree",
|
|
357
|
+
prompt: "You are the frontend developer for {feature}.
|
|
358
|
+
Read design doc at .planning/designs/{feature}.md FIRST — follow it exactly.
|
|
359
|
+
{if design tokens exist: Read .planning/design/system/tokens.md — use these exact values, not Tailwind defaults.}
|
|
360
|
+
Check TaskList, claim frontend tasks with TaskUpdate(owner: 'frontend-dev').
|
|
361
|
+
Follow TDD. Rules: ~/.claude/rules/frontend-react/"
|
|
362
|
+
)
|
|
363
|
+
```
|
|
327
364
|
|
|
328
365
|
**Backend-only** — split by layer:
|
|
329
|
-
|
|
330
|
-
|
|
366
|
+
```
|
|
367
|
+
Agent(team_name: "build-{slug}", name: "data-layer", ...,
|
|
368
|
+
prompt: "Migration + entity + repository + repo tests. ...")
|
|
369
|
+
|
|
370
|
+
Agent(team_name: "build-{slug}", name: "api-layer", ...,
|
|
371
|
+
prompt: "Service + controller + integration tests. ...")
|
|
372
|
+
```
|
|
373
|
+
Set `TaskUpdate(addBlockedBy)` so api-layer tasks wait for data-layer.
|
|
331
374
|
|
|
332
375
|
**Frontend-only** — split by concern:
|
|
333
|
-
|
|
334
|
-
|
|
376
|
+
```
|
|
377
|
+
Agent(team_name: "build-{slug}", name: "components-dev", ...,
|
|
378
|
+
prompt: "Types + components + API client. Read design doc FIRST. ...")
|
|
335
379
|
|
|
336
|
-
|
|
337
|
-
|
|
380
|
+
Agent(team_name: "build-{slug}", name: "pages-dev", ...,
|
|
381
|
+
prompt: "Pages + routing + integration. Read design doc FIRST. ...")
|
|
338
382
|
```
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
383
|
+
Set `TaskUpdate(addBlockedBy)` so pages-dev tasks wait for components-dev.
|
|
384
|
+
|
|
385
|
+
**Design doc handoff (MANDATORY for frontend/UI teammates):**
|
|
386
|
+
Every frontend/UI teammate MUST get the design doc path in its prompt:
|
|
387
|
+
```
|
|
388
|
+
Read design doc at .planning/designs/{feature}.md FIRST.
|
|
389
|
+
Follow screen designs, component specs, and visual details exactly.
|
|
390
|
+
Do NOT invent your own layout. The design was already reviewed and approved.
|
|
342
391
|
```
|
|
343
392
|
|
|
344
393
|
**Design token enforcement (MANDATORY for frontend/UI work):**
|
|
345
|
-
|
|
346
|
-
ls .planning/design/system/tokens.md .planning/design-config.md 2>/dev/null
|
|
347
|
-
```
|
|
348
|
-
If design tokens exist, read them and inject into EVERY frontend/UI agent prompt:
|
|
394
|
+
If design tokens exist, inject into EVERY frontend/UI teammate prompt:
|
|
349
395
|
```
|
|
350
396
|
DESIGN TOKENS — BINDING CONSTRAINTS:
|
|
351
397
|
Read .planning/design/system/tokens.md (or .planning/design-config.md).
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
- Use the project font, not Inter/Arial/system-ui
|
|
355
|
-
- Use the spacing scale, not arbitrary padding/margin
|
|
356
|
-
- Use the project border radius, not rounded-lg
|
|
357
|
-
Every color, font, and spacing value in your code must come from the token list.
|
|
398
|
+
Use these exact values. Not Tailwind defaults, not generic colors.
|
|
399
|
+
Every color, font, and spacing value must come from the token list.
|
|
358
400
|
```
|
|
359
401
|
|
|
360
|
-
5. Monitor
|
|
402
|
+
5. Monitor — messages from teammates arrive automatically. Use `TaskList` to check progress. Use `SendMessage` to redirect if needed.
|
|
403
|
+
|
|
404
|
+
6. When all teammates finish, merge worktrees and run full test suite.
|
|
361
405
|
|
|
362
|
-
|
|
406
|
+
7. `TeamDelete()` to clean up.
|
|
363
407
|
|
|
364
|
-
|
|
408
|
+
8. **MANDATORY: Continue to Stage 5 (Review) NOW.** Do NOT stop here. Do NOT ask "Want me to commit?" or "Should I create a PR?" — implementation is done but review hasn't happened yet. Go straight to Gate 3 → Stage 5.
|
|
365
409
|
|
|
366
410
|
**If Agent Teams is NOT enabled** (env var not set), continue with sequential execution below.
|
|
367
411
|
|
|
@@ -639,26 +683,47 @@ After the reviewer says PASS, check its output for:
|
|
|
639
683
|
echo "${CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS:-not_set}"
|
|
640
684
|
```
|
|
641
685
|
|
|
642
|
-
**If Agent Teams is enabled**,
|
|
686
|
+
**If Agent Teams is enabled**, create a review team for parallel coverage:
|
|
643
687
|
|
|
644
688
|
```
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
689
|
+
TeamCreate(team_name: "review-{feature-slug}", description: "Code review for {feature}")
|
|
690
|
+
|
|
691
|
+
TaskCreate(subject: "Quality review", description: "Stages 1-2, 4: correctness, conventions, architecture")
|
|
692
|
+
TaskCreate(subject: "Test review", description: "Stage 3: coverage, edge cases, test quality")
|
|
693
|
+
TaskCreate(subject: "Security review", description: "Stage 6: auth, injection, data exposure")
|
|
694
|
+
|
|
695
|
+
Agent(
|
|
696
|
+
team_name: "review-{feature-slug}",
|
|
697
|
+
name: "quality-reviewer",
|
|
698
|
+
subagent_type: "phase-reviewer",
|
|
699
|
+
prompt: "Review for correctness, stack conventions, architecture.
|
|
700
|
+
Changed files: {list}. Rules: {rule paths from config}.
|
|
701
|
+
Check against spec at {spec path} and plan at {plan path}.
|
|
702
|
+
Output: PASS or NEEDS CHANGES with file:line, rule broken, severity, fix."
|
|
703
|
+
)
|
|
704
|
+
|
|
705
|
+
Agent(
|
|
706
|
+
team_name: "review-{feature-slug}",
|
|
707
|
+
name: "test-reviewer",
|
|
708
|
+
subagent_type: "general-purpose",
|
|
709
|
+
prompt: "Review test coverage, edge cases, test quality.
|
|
710
|
+
Changed files: {list}. Check test independence, assertions, no duplication.
|
|
711
|
+
Output: PASS or NEEDS CHANGES with specifics."
|
|
712
|
+
)
|
|
713
|
+
|
|
714
|
+
Agent(
|
|
715
|
+
team_name: "review-{feature-slug}",
|
|
716
|
+
name: "security-reviewer",
|
|
717
|
+
subagent_type: "general-purpose",
|
|
718
|
+
prompt: "Review security: auth, input validation, data exposure, injection.
|
|
719
|
+
Changed files: {list}. Rules: security-checklist + OWASP top 10.
|
|
720
|
+
Output: PASS or NEEDS CHANGES with specifics."
|
|
721
|
+
)
|
|
659
722
|
```
|
|
660
723
|
|
|
661
|
-
All
|
|
724
|
+
All teammates review at the same time. Combine their findings. All must PASS before moving to Ship. If any says NEEDS CHANGES → fix loop (Step 3) applies to the combined findings.
|
|
725
|
+
|
|
726
|
+
After review completes: `TeamDelete()` to clean up.
|
|
662
727
|
|
|
663
728
|
**If Agent Teams is NOT enabled**, use a single review agent (Steps 1-2 above).
|
|
664
729
|
|
|
@@ -712,16 +777,36 @@ Read the epic file. For each feature with status `spec`, `planned`, or `building
|
|
|
712
777
|
| Design (and feature has UI work) | Ask user: create design now or skip? Same logic as Stage 2 |
|
|
713
778
|
| Plan | Generate a plan inline (fast path for small, full path for big) |
|
|
714
779
|
|
|
715
|
-
**Use Agent Teams to fill gaps in parallel** (if enabled): When 2+ features need plans or designs generated,
|
|
780
|
+
**Use Agent Teams to fill gaps in parallel** (if enabled): When 2+ features need plans or designs generated, use a team to do this at the same time.
|
|
716
781
|
|
|
717
782
|
```bash
|
|
718
783
|
echo "${CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS:-not_set}"
|
|
719
784
|
```
|
|
720
785
|
|
|
721
786
|
If Agent Teams enabled and 2+ features need plans:
|
|
722
|
-
|
|
723
|
-
-
|
|
724
|
-
|
|
787
|
+
```
|
|
788
|
+
TeamCreate(team_name: "epic-prep-{slug}", description: "Preparing specs/plans for epic")
|
|
789
|
+
|
|
790
|
+
// One task + teammate per feature that needs a plan
|
|
791
|
+
Agent(
|
|
792
|
+
team_name: "epic-prep-{slug}",
|
|
793
|
+
name: "planner-{feature-1}",
|
|
794
|
+
subagent_type: "general-purpose",
|
|
795
|
+
isolation: "worktree",
|
|
796
|
+
prompt: "Generate the design (if needed) and plan for feature: {feature-1}.
|
|
797
|
+
Read spec at .planning/specs/{feature-1}.md.
|
|
798
|
+
Save design to .planning/designs/, plan to .planning/plans/."
|
|
799
|
+
)
|
|
800
|
+
|
|
801
|
+
Agent(
|
|
802
|
+
team_name: "epic-prep-{slug}",
|
|
803
|
+
name: "planner-{feature-2}",
|
|
804
|
+
subagent_type: "general-purpose",
|
|
805
|
+
isolation: "worktree",
|
|
806
|
+
prompt: "Generate the design (if needed) and plan for feature: {feature-2}. ..."
|
|
807
|
+
)
|
|
808
|
+
```
|
|
809
|
+
Collect results after all finish, then `TeamDelete()`.
|
|
725
810
|
|
|
726
811
|
### Step 2: Sort by dependency and create branch
|
|
727
812
|
|
|
@@ -744,11 +829,36 @@ echo "${CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS:-not_set}"
|
|
|
744
829
|
**For each feature (or group of parallel features):**
|
|
745
830
|
|
|
746
831
|
1. **If Agent Teams enabled and 2+ features can run at the same time:**
|
|
747
|
-
|
|
748
|
-
-
|
|
749
|
-
|
|
750
|
-
|
|
832
|
+
```
|
|
833
|
+
TeamCreate(team_name: "epic-build-{slug}", description: "Building epic features in parallel")
|
|
834
|
+
|
|
835
|
+
// One task per feature
|
|
836
|
+
TaskCreate(subject: "Build {feature-A}", description: "...")
|
|
837
|
+
TaskCreate(subject: "Build {feature-B}", description: "...")
|
|
838
|
+
|
|
839
|
+
// One teammate per feature — MUST use team_name + name
|
|
840
|
+
Agent(
|
|
841
|
+
team_name: "epic-build-{slug}",
|
|
842
|
+
name: "builder-{feature-A}",
|
|
843
|
+
subagent_type: "general-purpose",
|
|
844
|
+
isolation: "worktree",
|
|
845
|
+
prompt: "Build feature {A}. Spec: .planning/specs/{A}.md. Plan: .planning/plans/{A}.md.
|
|
846
|
+
Design doc: .planning/designs/{A}.md — read FIRST if exists.
|
|
847
|
+
Follow TDD. Mark tasks completed when done."
|
|
848
|
+
)
|
|
849
|
+
|
|
850
|
+
Agent(
|
|
851
|
+
team_name: "epic-build-{slug}",
|
|
852
|
+
name: "builder-{feature-B}",
|
|
853
|
+
subagent_type: "general-purpose",
|
|
854
|
+
isolation: "worktree",
|
|
855
|
+
prompt: "Build feature {B}. ..."
|
|
856
|
+
)
|
|
857
|
+
```
|
|
858
|
+
- **Design doc handoff is MANDATORY** — every frontend/UI teammate must read the design doc first
|
|
859
|
+
- Wait for all teammates to finish (messages arrive automatically)
|
|
751
860
|
- Merge worktrees, run full test suite
|
|
861
|
+
- `TeamDelete()` to clean up
|
|
752
862
|
- If tests fail → fix before moving on
|
|
753
863
|
|
|
754
864
|
2. **If sequential (Agent Teams not enabled or only one feature ready):**
|
package/commands/spartan/epic.md
CHANGED
|
@@ -147,7 +147,7 @@ Then tell the user:
|
|
|
147
147
|
> ```
|
|
148
148
|
> /spartan:spec [feature-1]
|
|
149
149
|
> /spartan:spec [feature-2]
|
|
150
|
-
> /spartan:
|
|
150
|
+
> /spartan:ux prototype [feature-2] ← if it has UI work
|
|
151
151
|
> /spartan:spec [feature-3]
|
|
152
152
|
> ```
|
|
153
153
|
>
|
|
@@ -94,12 +94,45 @@ Offer to use a review team for parallel review:
|
|
|
94
94
|
> - **A) Review team** — quality reviewer + test reviewer + security reviewer, all in parallel
|
|
95
95
|
> - **B) Single reviewer** — one phase-reviewer agent (cheaper, faster for small changes)"
|
|
96
96
|
|
|
97
|
-
If user picks A →
|
|
98
|
-
1. **quality-reviewer** — code design, SOLID, clean code, stack conventions
|
|
99
|
-
2. **test-reviewer** — test coverage, edge cases, test quality
|
|
100
|
-
3. **security-reviewer** — auth, input validation, data handling
|
|
97
|
+
If user picks A → create a review team (NOT sub-agents):
|
|
101
98
|
|
|
102
|
-
|
|
99
|
+
```
|
|
100
|
+
TeamCreate(team_name: "gate-review-{phase}", description: "Gate 3.5 review")
|
|
101
|
+
|
|
102
|
+
TaskCreate(subject: "Quality review", description: "Code design, SOLID, clean code, stack conventions")
|
|
103
|
+
TaskCreate(subject: "Test review", description: "Test coverage, edge cases, test quality")
|
|
104
|
+
TaskCreate(subject: "Security review", description: "Auth, input validation, data handling")
|
|
105
|
+
|
|
106
|
+
Agent(
|
|
107
|
+
team_name: "gate-review-{phase}",
|
|
108
|
+
name: "quality-reviewer",
|
|
109
|
+
subagent_type: "phase-reviewer",
|
|
110
|
+
prompt: "Review for code design, SOLID, clean code, stack conventions.
|
|
111
|
+
Changed files: {list}. Spec: {path}. Plan: {path}.
|
|
112
|
+
Builder self-assessment: {findings from Step 2}.
|
|
113
|
+
Verdict: ACCEPT or NEEDS CHANGES. Check TaskList, claim your task."
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
Agent(
|
|
117
|
+
team_name: "gate-review-{phase}",
|
|
118
|
+
name: "test-reviewer",
|
|
119
|
+
subagent_type: "general-purpose",
|
|
120
|
+
prompt: "Review test coverage, edge cases, test quality.
|
|
121
|
+
Changed files: {list}. Check independence, assertions, no duplication.
|
|
122
|
+
Verdict: ACCEPT or NEEDS CHANGES. Check TaskList, claim your task."
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
Agent(
|
|
126
|
+
team_name: "gate-review-{phase}",
|
|
127
|
+
name: "security-reviewer",
|
|
128
|
+
subagent_type: "general-purpose",
|
|
129
|
+
prompt: "Review auth, input validation, data handling, injection risks.
|
|
130
|
+
Changed files: {list}. Check OWASP top 10.
|
|
131
|
+
Verdict: ACCEPT or NEEDS CHANGES. Check TaskList, claim your task."
|
|
132
|
+
)
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
After all teammates report back, synthesize findings, `TeamDelete()`, continue to Step 4 (Discussion).
|
|
103
136
|
|
|
104
137
|
If user picks B (or Agent Teams not enabled) → use single reviewer below.
|
|
105
138
|
|
|
@@ -48,18 +48,51 @@ All documents include **file paths in backticks** so Claude can navigate directl
|
|
|
48
48
|
echo "${CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS:-not_set}"
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
**If Agent Teams is enabled**, use a coordinated mapping team
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
51
|
+
**If Agent Teams is enabled**, use a coordinated mapping team (NOT sub-agents):
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
TeamCreate(team_name: "map-{project-slug}", description: "Deep codebase analysis")
|
|
55
|
+
|
|
56
|
+
TaskCreate(subject: "Map tech stack + integrations", description: "Write STACK.md + INTEGRATIONS.md to .planning/codebase/")
|
|
57
|
+
TaskCreate(subject: "Map architecture + structure", description: "Write ARCHITECTURE.md + STRUCTURE.md to .planning/codebase/")
|
|
58
|
+
TaskCreate(subject: "Map conventions + testing", description: "Write CONVENTIONS.md + TESTING.md to .planning/codebase/")
|
|
59
|
+
TaskCreate(subject: "Map concerns", description: "Write CONCERNS.md to .planning/codebase/")
|
|
60
|
+
|
|
61
|
+
Agent(
|
|
62
|
+
team_name: "map-{project-slug}",
|
|
63
|
+
name: "tech-mapper",
|
|
64
|
+
subagent_type: "Explore",
|
|
65
|
+
prompt: "Write STACK.md and INTEGRATIONS.md to .planning/codebase/.
|
|
66
|
+
Include file paths in backticks. Check TaskList, claim your task.
|
|
67
|
+
If you find security concerns, message concerns-mapper via SendMessage."
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
Agent(
|
|
71
|
+
team_name: "map-{project-slug}",
|
|
72
|
+
name: "arch-mapper",
|
|
73
|
+
subagent_type: "Explore",
|
|
74
|
+
prompt: "Write ARCHITECTURE.md and STRUCTURE.md to .planning/codebase/.
|
|
75
|
+
Trace data flow end-to-end. Check TaskList, claim your task."
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
Agent(
|
|
79
|
+
team_name: "map-{project-slug}",
|
|
80
|
+
name: "quality-mapper",
|
|
81
|
+
subagent_type: "Explore",
|
|
82
|
+
prompt: "Write CONVENTIONS.md and TESTING.md to .planning/codebase/.
|
|
83
|
+
Find patterns, code style, test coverage. Check TaskList, claim your task."
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
Agent(
|
|
87
|
+
team_name: "map-{project-slug}",
|
|
88
|
+
name: "concerns-mapper",
|
|
89
|
+
subagent_type: "Explore",
|
|
90
|
+
prompt: "Write CONCERNS.md to .planning/codebase/.
|
|
91
|
+
Find tech debt, bugs, security risks, fragile areas. Check TaskList, claim your task."
|
|
92
|
+
)
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
After all teammates complete, verify 7 documents exist and are non-empty, then `TeamDelete()`.
|
|
63
96
|
|
|
64
97
|
**If Agent Teams is NOT enabled**, delegate to GSD:
|
|
65
98
|
|
|
@@ -112,13 +112,40 @@ echo "${CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS:-not_set}"
|
|
|
112
112
|
**If Agent Teams is enabled AND the codebase is large (50+ files or multi-module):**
|
|
113
113
|
|
|
114
114
|
Run a parallel mapping team for faster analysis:
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
TeamCreate(team_name: "onboard-{project-slug}", description: "Mapping codebase for onboarding")
|
|
118
|
+
|
|
119
|
+
TaskCreate(subject: "Map tech stack", description: "Languages, frameworks, dependencies, build tools, runtime")
|
|
120
|
+
TaskCreate(subject: "Map architecture", description: "Patterns, layers, data flow, entry points, error handling")
|
|
121
|
+
TaskCreate(subject: "Map quality", description: "Conventions, test patterns, code quality concerns")
|
|
122
|
+
|
|
123
|
+
Agent(
|
|
124
|
+
team_name: "onboard-{project-slug}",
|
|
125
|
+
name: "stack-mapper",
|
|
126
|
+
subagent_type: "Explore",
|
|
127
|
+
prompt: "Map the tech stack: languages, frameworks, dependencies, build tools, runtime.
|
|
128
|
+
Write findings as structured markdown. Check TaskList, claim your task."
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
Agent(
|
|
132
|
+
team_name: "onboard-{project-slug}",
|
|
133
|
+
name: "arch-mapper",
|
|
134
|
+
subagent_type: "Explore",
|
|
135
|
+
prompt: "Map architecture: patterns, layers, data flow, entry points, error handling.
|
|
136
|
+
Trace one typical request end-to-end. Check TaskList, claim your task."
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
Agent(
|
|
140
|
+
team_name: "onboard-{project-slug}",
|
|
141
|
+
name: "quality-mapper",
|
|
142
|
+
subagent_type: "Explore",
|
|
143
|
+
prompt: "Map conventions, test patterns, code quality concerns. Find TODOs, tech debt.
|
|
144
|
+
Check TaskList, claim your task."
|
|
145
|
+
)
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
After all teammates report back, synthesize into the architecture overview below, then `TeamDelete()`.
|
|
122
149
|
|
|
123
150
|
**If Agent Teams is NOT enabled (or codebase is small)**, map manually:
|
|
124
151
|
|
|
@@ -81,16 +81,44 @@ Options:
|
|
|
81
81
|
echo "${CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS:-not_set}"
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
-
**If Agent Teams is enabled**,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
84
|
+
**If Agent Teams is enabled**, create a research team (NOT sub-agents):
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
TeamCreate(team_name: "research-{topic-slug}", description: "Research: {topic}")
|
|
88
|
+
|
|
89
|
+
TaskCreate(subject: "Breadth search", description: "Run direct + alternative + adjacent queries, collect 8-15 sources with credibility scores")
|
|
90
|
+
TaskCreate(subject: "Depth analysis", description: "Deep dive on top 3-5 sources from breadth search")
|
|
91
|
+
TaskCreate(subject: "Contrarian search", description: "Find counterarguments, failures, criticism")
|
|
92
|
+
|
|
93
|
+
Agent(
|
|
94
|
+
team_name: "research-{topic-slug}",
|
|
95
|
+
name: "breadth-researcher",
|
|
96
|
+
subagent_type: "general-purpose",
|
|
97
|
+
prompt: "Search broadly for: {topic}. Run direct + alternative + adjacent queries.
|
|
98
|
+
Collect 8-15 sources. Track each with: title, URL, credibility (1-5), key data points.
|
|
99
|
+
Check TaskList, claim your task. Message depth-researcher when you have initial findings."
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
Agent(
|
|
103
|
+
team_name: "research-{topic-slug}",
|
|
104
|
+
name: "depth-researcher",
|
|
105
|
+
subagent_type: "general-purpose",
|
|
106
|
+
prompt: "Go deep on the top 3-5 sources for: {topic}.
|
|
107
|
+
Extract detailed data, cross-reference claims, note contradictions.
|
|
108
|
+
Check TaskList, claim your task. Wait for breadth-researcher findings if needed."
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
Agent(
|
|
112
|
+
team_name: "research-{topic-slug}",
|
|
113
|
+
name: "contrarian-researcher",
|
|
114
|
+
subagent_type: "general-purpose",
|
|
115
|
+
prompt: "Find counterarguments and criticism for: {topic}.
|
|
116
|
+
Search for failures, risks, overhyped claims, hidden costs.
|
|
117
|
+
Check TaskList, claim your task."
|
|
118
|
+
)
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
After all teammates report back, merge source lists, `TeamDelete()`, continue to Stage 3 (Analyze).
|
|
94
122
|
|
|
95
123
|
**If Agent Teams is NOT enabled**, gather sequentially:
|
|
96
124
|
|
package/commands/spartan/spec.md
CHANGED
|
@@ -115,7 +115,7 @@ Then tell the user:
|
|
|
115
115
|
> "Spec saved to `.planning/specs/{{ args[0] }}.md` — Gate 1 passed."
|
|
116
116
|
>
|
|
117
117
|
> **Next steps:**
|
|
118
|
-
> - Has UI work? → `/spartan:
|
|
118
|
+
> - Has UI work? → `/spartan:ux prototype {{ args[0] }}`
|
|
119
119
|
> - Ready to plan? → `/spartan:plan {{ args[0] }}`
|
|
120
120
|
> - Part of a bigger epic? → `/spartan:epic`
|
|
121
121
|
|
|
@@ -134,16 +134,41 @@ Based on results:
|
|
|
134
134
|
echo "${CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS:-not_set}"
|
|
135
135
|
```
|
|
136
136
|
|
|
137
|
-
**If Agent Teams is enabled**,
|
|
137
|
+
**If Agent Teams is enabled**, create a research team (NOT sub-agents):
|
|
138
138
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
139
|
+
```
|
|
140
|
+
TeamCreate(team_name: "research-{idea-slug}", description: "Market research for {idea}")
|
|
141
|
+
|
|
142
|
+
TaskCreate(subject: "Market research", description: "TAM/SAM/SOM, growth signals, adjacent markets")
|
|
143
|
+
TaskCreate(subject: "Competitor teardowns", description: "Teardown 3+ competitors, find gaps")
|
|
144
|
+
TaskCreate(subject: "Contrarian analysis", description: "Challenge assumptions, find risks")
|
|
145
|
+
|
|
146
|
+
Agent(
|
|
147
|
+
team_name: "research-{idea-slug}",
|
|
148
|
+
name: "market-researcher",
|
|
149
|
+
subagent_type: "general-purpose",
|
|
150
|
+
prompt: "Research the market for: {idea}. TAM/SAM/SOM, growth signals, adjacent markets.
|
|
151
|
+
Track sources with credibility scores. Check TaskList, claim your task."
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
Agent(
|
|
155
|
+
team_name: "research-{idea-slug}",
|
|
156
|
+
name: "competitor-analyst",
|
|
157
|
+
subagent_type: "general-purpose",
|
|
158
|
+
prompt: "Teardown 3+ competitors for: {idea}. Pricing, features, strengths, weaknesses, gaps.
|
|
159
|
+
Check TaskList, claim your task."
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
Agent(
|
|
163
|
+
team_name: "research-{idea-slug}",
|
|
164
|
+
name: "contrarian",
|
|
165
|
+
subagent_type: "general-purpose",
|
|
166
|
+
prompt: "Challenge assumptions about: {idea}. Find risks, failures in similar ideas, hidden costs.
|
|
167
|
+
Check TaskList, claim your task."
|
|
168
|
+
)
|
|
169
|
+
```
|
|
146
170
|
|
|
171
|
+
After all teammates report back, `TeamDelete()`, synthesize into a single research doc.
|
|
147
172
|
Skip to step 11 (synthesis) after team reports back.
|
|
148
173
|
|
|
149
174
|
**If Agent Teams is NOT enabled**, run sequentially:
|
package/commands/spartan/team.md
CHANGED
|
@@ -294,18 +294,36 @@ Create 2-3 focused review tasks:
|
|
|
294
294
|
2. **Test coverage** — are tests adequate, edge cases covered, test quality
|
|
295
295
|
3. **Security** (if applicable) — auth, input validation, data handling
|
|
296
296
|
|
|
297
|
-
### Step 4: Spawn reviewers
|
|
297
|
+
### Step 4: Spawn reviewers — MUST use `team_name` + `name` params
|
|
298
298
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
299
|
+
```
|
|
300
|
+
Agent(
|
|
301
|
+
team_name: "review-{branch-or-pr}",
|
|
302
|
+
name: "quality-reviewer",
|
|
303
|
+
subagent_type: "phase-reviewer",
|
|
304
|
+
prompt: "Review code design, SOLID, clean code, stack conventions.
|
|
305
|
+
Changed files: {list}. Check TaskList, claim your task.
|
|
306
|
+
Output: ACCEPT or NEEDS CHANGES with file:line, rule, severity, fix."
|
|
307
|
+
)
|
|
308
|
+
|
|
309
|
+
Agent(
|
|
310
|
+
team_name: "review-{branch-or-pr}",
|
|
311
|
+
name: "test-reviewer",
|
|
312
|
+
subagent_type: "general-purpose",
|
|
313
|
+
prompt: "Review test coverage, edge cases, test quality.
|
|
314
|
+
Changed files: {list}. Check TaskList, claim your task.
|
|
315
|
+
Output: ACCEPT or NEEDS CHANGES."
|
|
316
|
+
)
|
|
317
|
+
|
|
318
|
+
Agent(
|
|
319
|
+
team_name: "review-{branch-or-pr}",
|
|
320
|
+
name: "security-reviewer",
|
|
321
|
+
subagent_type: "general-purpose",
|
|
322
|
+
prompt: "Review auth, input validation, data exposure, injection.
|
|
323
|
+
Changed files: {list}. Check TaskList, claim your task.
|
|
324
|
+
Output: ACCEPT or NEEDS CHANGES."
|
|
325
|
+
)
|
|
326
|
+
```
|
|
309
327
|
|
|
310
328
|
### Step 5: Synthesize
|
|
311
329
|
|
|
@@ -339,13 +357,33 @@ Create 2-3 complementary research tasks:
|
|
|
339
357
|
2. **Depth analysis** — go deep on the most promising findings from breadth
|
|
340
358
|
3. **Contrarian view** (optional) — find counterarguments, risks, things that could go wrong
|
|
341
359
|
|
|
342
|
-
### Step 4: Spawn researchers
|
|
343
|
-
|
|
344
|
-
- **surveyor** — `Explore` or `general-purpose` with web search focus
|
|
345
|
-
- **analyst** — `general-purpose` for deep analysis
|
|
346
|
-
- **contrarian** — `general-purpose` playing devil's advocate (use `idea-killer` agent if available)
|
|
360
|
+
### Step 4: Spawn researchers — MUST use `team_name` + `name` params
|
|
347
361
|
|
|
348
|
-
|
|
362
|
+
```
|
|
363
|
+
Agent(
|
|
364
|
+
team_name: "research-{topic-slug}",
|
|
365
|
+
name: "surveyor",
|
|
366
|
+
subagent_type: "general-purpose",
|
|
367
|
+
prompt: "Broad survey of: {topic}. Find 8-15 sources, map the landscape.
|
|
368
|
+
Track sources with credibility scores (1-5). Check TaskList, claim your task."
|
|
369
|
+
)
|
|
370
|
+
|
|
371
|
+
Agent(
|
|
372
|
+
team_name: "research-{topic-slug}",
|
|
373
|
+
name: "analyst",
|
|
374
|
+
subagent_type: "general-purpose",
|
|
375
|
+
prompt: "Deep analysis of top sources for: {topic}.
|
|
376
|
+
Cross-reference claims, extract data. Check TaskList, claim your task."
|
|
377
|
+
)
|
|
378
|
+
|
|
379
|
+
Agent(
|
|
380
|
+
team_name: "research-{topic-slug}",
|
|
381
|
+
name: "contrarian",
|
|
382
|
+
subagent_type: "general-purpose",
|
|
383
|
+
prompt: "Challenge assumptions about: {topic}. Find counterarguments, risks, failures.
|
|
384
|
+
Play devil's advocate. Check TaskList, claim your task."
|
|
385
|
+
)
|
|
386
|
+
```
|
|
349
387
|
|
|
350
388
|
### Step 5: Synthesize
|
|
351
389
|
|
|
@@ -397,15 +435,38 @@ TeamCreate:
|
|
|
397
435
|
|
|
398
436
|
From the spec/plan, create tasks for each parallel track. Set `addBlockedBy` for tasks that depend on earlier ones (e.g., frontend depends on API being done).
|
|
399
437
|
|
|
400
|
-
### Step 5: Spawn builders
|
|
438
|
+
### Step 5: Spawn builders — MUST use `team_name` + `name` params
|
|
439
|
+
|
|
440
|
+
```
|
|
441
|
+
Agent(
|
|
442
|
+
team_name: "build-{feature-slug}",
|
|
443
|
+
name: "backend-dev",
|
|
444
|
+
subagent_type: "general-purpose",
|
|
445
|
+
isolation: "worktree",
|
|
446
|
+
prompt: "Backend implementation for {feature}.
|
|
447
|
+
Read .memory/index.md for context. Rules: ~/.claude/rules/backend-micronaut/.
|
|
448
|
+
Follow TDD. Check TaskList, claim backend tasks."
|
|
449
|
+
)
|
|
450
|
+
|
|
451
|
+
Agent(
|
|
452
|
+
team_name: "build-{feature-slug}",
|
|
453
|
+
name: "frontend-dev",
|
|
454
|
+
subagent_type: "general-purpose",
|
|
455
|
+
isolation: "worktree",
|
|
456
|
+
prompt: "Frontend implementation for {feature}.
|
|
457
|
+
Read design doc at .planning/designs/{feature}.md FIRST — follow it exactly.
|
|
458
|
+
Rules: ~/.claude/rules/frontend-react/. Follow TDD.
|
|
459
|
+
Check TaskList, claim frontend tasks."
|
|
460
|
+
)
|
|
461
|
+
```
|
|
401
462
|
|
|
402
|
-
Each builder
|
|
463
|
+
Each builder teammate gets:
|
|
403
464
|
- Worktree isolation (`isolation: "worktree"`)
|
|
404
465
|
- Their track's tasks and file paths
|
|
405
466
|
- Instructions to follow TDD
|
|
406
467
|
- References to relevant rules from installed packs
|
|
407
468
|
- `.memory/` context
|
|
408
|
-
- **Design doc path** (if `.planning/designs/*.md` exists) — frontend/UI
|
|
469
|
+
- **Design doc path** (if `.planning/designs/*.md` exists) — frontend/UI teammates MUST read the design doc before building.
|
|
409
470
|
|
|
410
471
|
### Step 6: Integration
|
|
411
472
|
|
package/commands/spartan/ux.md
CHANGED
|
@@ -583,7 +583,7 @@ If no design-config existed, save it to `.planning/design-config.md` too.
|
|
|
583
583
|
|
|
584
584
|
Goal: Design all screens with states, responsive layouts, and accessibility. Get them approved by the design critic. Save to `.planning/design/screens/`.
|
|
585
585
|
|
|
586
|
-
This phase
|
|
586
|
+
This phase handles screen design with dual-agent review. Same quality bar as the original design workflow.
|
|
587
587
|
|
|
588
588
|
```bash
|
|
589
589
|
mkdir -p .planning/design/screens
|
package/commands/spartan.md
CHANGED
|
@@ -108,7 +108,8 @@ Route here when the user wants a specific tool, not a full workflow.
|
|
|
108
108
|
|---|---|
|
|
109
109
|
| "plan a task", "write a spec" | `/spartan:spec` → `/spartan:plan` |
|
|
110
110
|
| "break into features", "epic" | `/spartan:epic` |
|
|
111
|
-
| "design a screen", "UI design", "design doc" | `/spartan:
|
|
111
|
+
| "design a screen", "UI design", "design doc" | `/spartan:ux prototype` |
|
|
112
|
+
| "UX research", "user interviews", "design system" | `/spartan:ux` |
|
|
112
113
|
| "review my code", "dual review", "gate review" | `/spartan:gate-review` |
|
|
113
114
|
| "big project", "multi-day", "new milestone" | `/spartan:project new` |
|
|
114
115
|
| "continue phase", "next phase" | `/spartan:phase` |
|
package/package.json
CHANGED
|
@@ -17,6 +17,31 @@ All mutations use `@Post`. Never use `@Put`, `@Delete`, or `@Patch`.
|
|
|
17
17
|
| Delete | `@Post("/delete")` | `@Post("/delete")` |
|
|
18
18
|
| Custom action | `@Post("/close")` | `@Post("/close")` |
|
|
19
19
|
|
|
20
|
+
### Bad — REST Verbs (NEVER use these)
|
|
21
|
+
|
|
22
|
+
```kotlin
|
|
23
|
+
// ❌ BAD — REST verbs
|
|
24
|
+
@Patch("/{id}")
|
|
25
|
+
suspend fun update(@PathVariable id: UUID, @Body request: UpdateRequest): Response
|
|
26
|
+
|
|
27
|
+
@Delete("/{id}")
|
|
28
|
+
suspend fun delete(@PathVariable id: UUID): Boolean
|
|
29
|
+
|
|
30
|
+
@Put("/{id}")
|
|
31
|
+
suspend fun replace(@PathVariable id: UUID, @Body request: ReplaceRequest): Response
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Good — RPC-Style
|
|
35
|
+
|
|
36
|
+
```kotlin
|
|
37
|
+
// ✅ GOOD — RPC-style
|
|
38
|
+
@Post("/update")
|
|
39
|
+
suspend fun update(@QueryValue id: UUID, @Body request: UpdateRequest): Response
|
|
40
|
+
|
|
41
|
+
@Post("/delete")
|
|
42
|
+
suspend fun delete(@QueryValue id: UUID): Boolean
|
|
43
|
+
```
|
|
44
|
+
|
|
20
45
|
---
|
|
21
46
|
|
|
22
47
|
## URL Design
|
|
@@ -384,3 +384,5 @@ Before committing controller changes:
|
|
|
384
384
|
- [ ] Business logic is in managers, not controllers
|
|
385
385
|
- [ ] **NO inline data classes** - all models in `module-client`
|
|
386
386
|
- [ ] **NO private converter functions** - use inline mapping or manager returns Response DTOs
|
|
387
|
+
- [ ] **NO @Put, @Patch, @Delete** — only @Get and @Post (RPC-style, see API_DESIGN.md)
|
|
388
|
+
- [ ] **NO @PathVariable** — only @QueryValue for all IDs
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: api-endpoint-creator
|
|
3
|
-
description: Creates
|
|
3
|
+
description: Creates RPC-style endpoint following layered architecture (Controller → Manager → Repository). Use when creating new API endpoints or CRUD operations.
|
|
4
4
|
allowed_tools:
|
|
5
5
|
- Read
|
|
6
6
|
- Write
|
|
@@ -11,7 +11,7 @@ allowed_tools:
|
|
|
11
11
|
|
|
12
12
|
# API Endpoint Creator Skill
|
|
13
13
|
|
|
14
|
-
Creates complete
|
|
14
|
+
Creates complete RPC-style API endpoints following strict layered architecture patterns.
|
|
15
15
|
|
|
16
16
|
## When to Use
|
|
17
17
|
|
|
@@ -388,9 +388,9 @@ Location: `app/api-application/src/test/kotlin/com/yourcompany/{Domain}Controlle
|
|
|
388
388
|
|
|
389
389
|
## Rules
|
|
390
390
|
|
|
391
|
-
###
|
|
391
|
+
### RPC-Style API (POST for Mutations, Query Params Only)
|
|
392
392
|
|
|
393
|
-
This project uses **query parameters for all IDs
|
|
393
|
+
This project uses **RPC-style endpoints: @Get for reads, @Post for all mutations, query parameters for all IDs**:
|
|
394
394
|
|
|
395
395
|
```
|
|
396
396
|
GET /api/v1/employees # List employees (plural)
|
|
@@ -161,7 +161,7 @@ Run when all tasks are done. This is the "ship it?" check.
|
|
|
161
161
|
|
|
162
162
|
Run after the designer and `design-critic` agent both review the design doc. Both must accept.
|
|
163
163
|
|
|
164
|
-
**Trigger:** `/spartan:
|
|
164
|
+
**Trigger:** `/spartan:ux prototype [feature-name]`
|
|
165
165
|
|
|
166
166
|
### Agent Agreement
|
|
167
167
|
- [ ] Design-critic agent spawned and given the design doc
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: spartan:design
|
|
3
|
-
description: "Alias for /spartan:ux prototype — design workflow with Design Gate"
|
|
4
|
-
argument-hint: "[feature name]"
|
|
5
|
-
preamble-tier: 1
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Design: {{ args[0] | default: "unnamed feature" }}
|
|
9
|
-
|
|
10
|
-
> **This command has moved to `/spartan:ux prototype`.** Running it now.
|
|
11
|
-
|
|
12
|
-
Run `/spartan:ux prototype {{ args[0] }}` internally. Pass all arguments through.
|
|
13
|
-
|
|
14
|
-
The full UX design workflow is now at `/spartan:ux` with sub-commands:
|
|
15
|
-
- `/spartan:ux research` — user discovery
|
|
16
|
-
- `/spartan:ux define` — problem definition
|
|
17
|
-
- `/spartan:ux ideate` — solution exploration
|
|
18
|
-
- `/spartan:ux system` — design system setup
|
|
19
|
-
- `/spartan:ux prototype` — screen design + Design Gate (this is what `/spartan:design` used to do)
|
|
20
|
-
- `/spartan:ux test` — usability testing plan
|
|
21
|
-
- `/spartan:ux handoff` — developer handoff
|
|
22
|
-
- `/spartan:ux qa` — design QA checklist
|
|
23
|
-
- `/spartan:ux audit` — gap analysis
|