@c0x12c/ai-toolkit 1.15.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.
Files changed (255) hide show
  1. package/.claude-plugin/marketplace.json +16 -0
  2. package/.claude-plugin/plugin.json +12 -0
  3. package/README.md +439 -0
  4. package/VERSION +1 -0
  5. package/agents/design-critic.md +127 -0
  6. package/agents/idea-killer.md +72 -0
  7. package/agents/infrastructure-expert.md +49 -0
  8. package/agents/micronaut-backend-expert.md +45 -0
  9. package/agents/phase-reviewer.md +150 -0
  10. package/agents/research-planner.md +70 -0
  11. package/agents/solution-architect-cto.md +49 -0
  12. package/agents/sre-architect.md +49 -0
  13. package/agents/team-coordinator.md +111 -0
  14. package/bin/cli.js +780 -0
  15. package/claude-md/00-header.md +39 -0
  16. package/claude-md/01-core.md +105 -0
  17. package/claude-md/05-database.md +20 -0
  18. package/claude-md/11-backend-micronaut.md +19 -0
  19. package/claude-md/20-frontend-react.md +44 -0
  20. package/claude-md/25-ux-design.md +56 -0
  21. package/claude-md/30-infrastructure.md +24 -0
  22. package/claude-md/30-project-mgmt.md +119 -0
  23. package/claude-md/40-product.md +39 -0
  24. package/claude-md/50-ops.md +34 -0
  25. package/claude-md/60-research.md +27 -0
  26. package/claude-md/90-footer.md +21 -0
  27. package/commands/spartan/brainstorm.md +134 -0
  28. package/commands/spartan/brownfield.md +157 -0
  29. package/commands/spartan/build.md +435 -0
  30. package/commands/spartan/careful.md +94 -0
  31. package/commands/spartan/commit-message.md +112 -0
  32. package/commands/spartan/content.md +17 -0
  33. package/commands/spartan/context-save.md +161 -0
  34. package/commands/spartan/contribute.md +140 -0
  35. package/commands/spartan/daily.md +42 -0
  36. package/commands/spartan/debug.md +308 -0
  37. package/commands/spartan/deep-dive.md +55 -0
  38. package/commands/spartan/deploy.md +207 -0
  39. package/commands/spartan/e2e.md +264 -0
  40. package/commands/spartan/env-setup.md +166 -0
  41. package/commands/spartan/epic.md +199 -0
  42. package/commands/spartan/fe-review.md +181 -0
  43. package/commands/spartan/figma-to-code.md +260 -0
  44. package/commands/spartan/forensics.md +46 -0
  45. package/commands/spartan/freeze.md +84 -0
  46. package/commands/spartan/fundraise.md +53 -0
  47. package/commands/spartan/gate-review.md +229 -0
  48. package/commands/spartan/gsd-upgrade.md +376 -0
  49. package/commands/spartan/guard.md +42 -0
  50. package/commands/spartan/init-project.md +178 -0
  51. package/commands/spartan/init-rules.md +298 -0
  52. package/commands/spartan/interview.md +154 -0
  53. package/commands/spartan/kickoff.md +73 -0
  54. package/commands/spartan/kotlin-service.md +109 -0
  55. package/commands/spartan/lean-canvas.md +222 -0
  56. package/commands/spartan/lint-rules.md +122 -0
  57. package/commands/spartan/map-codebase.md +124 -0
  58. package/commands/spartan/migration.md +82 -0
  59. package/commands/spartan/next-app.md +317 -0
  60. package/commands/spartan/next-feature.md +212 -0
  61. package/commands/spartan/onboard.md +326 -0
  62. package/commands/spartan/outreach.md +16 -0
  63. package/commands/spartan/phase.md +142 -0
  64. package/commands/spartan/pitch.md +18 -0
  65. package/commands/spartan/plan.md +210 -0
  66. package/commands/spartan/pr-ready.md +202 -0
  67. package/commands/spartan/project.md +106 -0
  68. package/commands/spartan/qa.md +222 -0
  69. package/commands/spartan/research.md +254 -0
  70. package/commands/spartan/review.md +132 -0
  71. package/commands/spartan/scan-rules.md +173 -0
  72. package/commands/spartan/sessions.md +143 -0
  73. package/commands/spartan/spec.md +131 -0
  74. package/commands/spartan/startup.md +257 -0
  75. package/commands/spartan/team.md +570 -0
  76. package/commands/spartan/teardown.md +161 -0
  77. package/commands/spartan/testcontainer.md +97 -0
  78. package/commands/spartan/tf-cost.md +123 -0
  79. package/commands/spartan/tf-deploy.md +116 -0
  80. package/commands/spartan/tf-drift.md +100 -0
  81. package/commands/spartan/tf-import.md +107 -0
  82. package/commands/spartan/tf-module.md +121 -0
  83. package/commands/spartan/tf-plan.md +100 -0
  84. package/commands/spartan/tf-review.md +106 -0
  85. package/commands/spartan/tf-scaffold.md +109 -0
  86. package/commands/spartan/tf-security.md +147 -0
  87. package/commands/spartan/think.md +221 -0
  88. package/commands/spartan/unfreeze.md +13 -0
  89. package/commands/spartan/update.md +134 -0
  90. package/commands/spartan/ux.md +1233 -0
  91. package/commands/spartan/validate.md +193 -0
  92. package/commands/spartan/web-to-prd.md +706 -0
  93. package/commands/spartan/workstreams.md +109 -0
  94. package/commands/spartan/write.md +16 -0
  95. package/commands/spartan.md +386 -0
  96. package/frameworks/00-framework-comparison-guide.md +317 -0
  97. package/frameworks/01-lean-canvas.md +196 -0
  98. package/frameworks/02-design-sprint.md +304 -0
  99. package/frameworks/03-foundation-sprint.md +337 -0
  100. package/frameworks/04-business-model-canvas.md +391 -0
  101. package/frameworks/05-customer-development.md +426 -0
  102. package/frameworks/06-jobs-to-be-done.md +358 -0
  103. package/frameworks/07-mom-test.md +392 -0
  104. package/frameworks/08-value-proposition-canvas.md +488 -0
  105. package/frameworks/09-javelin-board.md +428 -0
  106. package/frameworks/10-build-measure-learn.md +467 -0
  107. package/frameworks/11-mvp-approaches.md +533 -0
  108. package/frameworks/think-before-build.md +593 -0
  109. package/lib/assembler.js +197 -0
  110. package/lib/assembler.test.js +159 -0
  111. package/lib/detector.js +166 -0
  112. package/lib/detector.test.js +221 -0
  113. package/lib/packs.js +16 -0
  114. package/lib/resolver.js +272 -0
  115. package/lib/resolver.test.js +298 -0
  116. package/lib/worktree.sh +104 -0
  117. package/package.json +50 -0
  118. package/packs/backend-micronaut.yaml +35 -0
  119. package/packs/backend-nodejs.yaml +15 -0
  120. package/packs/backend-python.yaml +15 -0
  121. package/packs/core.yaml +37 -0
  122. package/packs/database.yaml +21 -0
  123. package/packs/frontend-react.yaml +24 -0
  124. package/packs/infrastructure.yaml +40 -0
  125. package/packs/ops.yaml +16 -0
  126. package/packs/packs.compiled.json +371 -0
  127. package/packs/product.yaml +22 -0
  128. package/packs/project-mgmt.yaml +24 -0
  129. package/packs/research.yaml +39 -0
  130. package/packs/shared-backend.yaml +14 -0
  131. package/packs/ux-design.yaml +21 -0
  132. package/rules/backend-micronaut/API_DESIGN.md +313 -0
  133. package/rules/backend-micronaut/BATCH_PROCESSING.md +92 -0
  134. package/rules/backend-micronaut/CONTROLLERS.md +388 -0
  135. package/rules/backend-micronaut/KOTLIN.md +414 -0
  136. package/rules/backend-micronaut/RETROFIT_PLACEMENT.md +290 -0
  137. package/rules/backend-micronaut/SERVICES_AND_BEANS.md +325 -0
  138. package/rules/core/NAMING_CONVENTIONS.md +208 -0
  139. package/rules/core/SKILL_AUTHORING.md +174 -0
  140. package/rules/core/TIMEZONE.md +316 -0
  141. package/rules/database/ORM_AND_REPO.md +289 -0
  142. package/rules/database/SCHEMA.md +146 -0
  143. package/rules/database/TRANSACTIONS.md +311 -0
  144. package/rules/frontend-react/FRONTEND.md +344 -0
  145. package/rules/infrastructure/MODULES.md +260 -0
  146. package/rules/infrastructure/NAMING.md +196 -0
  147. package/rules/infrastructure/PROVIDERS.md +309 -0
  148. package/rules/infrastructure/SECURITY.md +310 -0
  149. package/rules/infrastructure/STATE_AND_BACKEND.md +237 -0
  150. package/rules/infrastructure/STRUCTURE.md +234 -0
  151. package/rules/infrastructure/VARIABLES.md +285 -0
  152. package/rules/shared-backend/ARCHITECTURE.md +46 -0
  153. package/rules/ux-design/DESIGN_PROCESS.md +176 -0
  154. package/skills/api-endpoint-creator/SKILL.md +455 -0
  155. package/skills/api-endpoint-creator/error-handling-guide.md +244 -0
  156. package/skills/api-endpoint-creator/examples.md +522 -0
  157. package/skills/api-endpoint-creator/testing-patterns.md +302 -0
  158. package/skills/article-writing/SKILL.md +109 -0
  159. package/skills/article-writing/examples.md +59 -0
  160. package/skills/backend-api-design/SKILL.md +84 -0
  161. package/skills/backend-api-design/code-patterns.md +138 -0
  162. package/skills/brainstorm/SKILL.md +95 -0
  163. package/skills/browser-qa/SKILL.md +87 -0
  164. package/skills/browser-qa/playwright-snippets.md +110 -0
  165. package/skills/ci-cd-patterns/SKILL.md +108 -0
  166. package/skills/ci-cd-patterns/workflows.md +149 -0
  167. package/skills/competitive-teardown/SKILL.md +93 -0
  168. package/skills/competitive-teardown/example-analysis.md +50 -0
  169. package/skills/content-engine/SKILL.md +131 -0
  170. package/skills/content-engine/examples.md +72 -0
  171. package/skills/database-patterns/SKILL.md +72 -0
  172. package/skills/database-patterns/code-templates.md +114 -0
  173. package/skills/database-table-creator/SKILL.md +141 -0
  174. package/skills/database-table-creator/examples.md +552 -0
  175. package/skills/database-table-creator/kotlin-templates.md +400 -0
  176. package/skills/database-table-creator/migration-template.sql +68 -0
  177. package/skills/database-table-creator/validation-checklist.md +337 -0
  178. package/skills/deep-research/SKILL.md +80 -0
  179. package/skills/design-intelligence/SKILL.md +268 -0
  180. package/skills/design-workflow/SKILL.md +127 -0
  181. package/skills/design-workflow/checklists.md +45 -0
  182. package/skills/idea-validation/SKILL.md +129 -0
  183. package/skills/idea-validation/example-report.md +50 -0
  184. package/skills/investor-materials/SKILL.md +122 -0
  185. package/skills/investor-materials/example-outline.md +70 -0
  186. package/skills/investor-outreach/SKILL.md +112 -0
  187. package/skills/investor-outreach/examples.md +76 -0
  188. package/skills/kotlin-best-practices/SKILL.md +58 -0
  189. package/skills/kotlin-best-practices/code-patterns.md +132 -0
  190. package/skills/market-research/SKILL.md +99 -0
  191. package/skills/security-checklist/SKILL.md +65 -0
  192. package/skills/security-checklist/audit-reference.md +95 -0
  193. package/skills/service-debugging/SKILL.md +116 -0
  194. package/skills/service-debugging/common-issues.md +65 -0
  195. package/skills/startup-pipeline/SKILL.md +152 -0
  196. package/skills/terraform-best-practices/SKILL.md +244 -0
  197. package/skills/terraform-module-creator/SKILL.md +284 -0
  198. package/skills/terraform-review/SKILL.md +222 -0
  199. package/skills/terraform-security-audit/SKILL.md +280 -0
  200. package/skills/terraform-service-scaffold/SKILL.md +574 -0
  201. package/skills/testing-strategies/SKILL.md +116 -0
  202. package/skills/testing-strategies/examples.md +103 -0
  203. package/skills/testing-strategies/integration-test-setup.md +71 -0
  204. package/skills/ui-ux-pro-max/SKILL.md +238 -0
  205. package/skills/ui-ux-pro-max/data/charts.csv +26 -0
  206. package/skills/ui-ux-pro-max/data/colors.csv +97 -0
  207. package/skills/ui-ux-pro-max/data/icons.csv +101 -0
  208. package/skills/ui-ux-pro-max/data/landing.csv +31 -0
  209. package/skills/ui-ux-pro-max/data/products.csv +97 -0
  210. package/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
  211. package/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
  212. package/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  213. package/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  214. package/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
  215. package/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  216. package/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  217. package/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  218. package/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  219. package/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
  220. package/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  221. package/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  222. package/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  223. package/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  224. package/skills/ui-ux-pro-max/data/styles.csv +68 -0
  225. package/skills/ui-ux-pro-max/data/typography.csv +58 -0
  226. package/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  227. package/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  228. package/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
  229. package/skills/ui-ux-pro-max/python-setup.md +146 -0
  230. package/skills/ui-ux-pro-max/scripts/core.py +253 -0
  231. package/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
  232. package/skills/ui-ux-pro-max/scripts/search.py +114 -0
  233. package/skills/web-to-prd/SKILL.md +478 -0
  234. package/templates/build-config.yaml +44 -0
  235. package/templates/commands-config.yaml +55 -0
  236. package/templates/competitor-analysis.md +60 -0
  237. package/templates/content/AGENT_TEMPLATE.md +47 -0
  238. package/templates/content/COMMAND_TEMPLATE.md +27 -0
  239. package/templates/content/RULE_TEMPLATE.md +40 -0
  240. package/templates/content/SKILL_TEMPLATE.md +41 -0
  241. package/templates/design-config.md +105 -0
  242. package/templates/design-doc.md +207 -0
  243. package/templates/epic.md +100 -0
  244. package/templates/feature-spec.md +181 -0
  245. package/templates/idea-canvas.md +47 -0
  246. package/templates/implementation-plan.md +159 -0
  247. package/templates/prd-template.md +86 -0
  248. package/templates/preamble.md +89 -0
  249. package/templates/project-readme.md +35 -0
  250. package/templates/quality-gates.md +230 -0
  251. package/templates/spartan-config.yaml +164 -0
  252. package/templates/user-interview.md +69 -0
  253. package/templates/validation-checklist.md +108 -0
  254. package/templates/workflow-backend-micronaut.md +409 -0
  255. package/templates/workflow-frontend-react.md +233 -0
@@ -0,0 +1,39 @@
1
+ # Spartan AI Toolkit — Engineering Manager Workflow
2
+
3
+ ## Why Spartan?
4
+
5
+ Spartan commands are **pre-built, high-quality prompts** for workflows where free-form chat leads to missed steps. They don't replace Claude — they make Claude more reliable for structured work.
6
+
7
+ Without Spartan: "Create a PR" → Claude pushes code. Forgets to rebase, skips tests, no PR description.
8
+ With `/spartan:pr-ready`: 6-step checklist — rebase, tests, lint, architecture check, security scan, PR description generated. Devs usually forget 3 of these.
9
+
10
+ **When commands add value:** Structured workflows with multiple steps, checklists, or scaffolding that must follow specific conventions.
11
+ **When commands don't add value:** Questions, explanations, small code changes, brainstorming — just talk to Claude.
12
+
13
+ ---
14
+
15
+ ## Command or Chat? (Decision Rule)
16
+
17
+ ```
18
+ What do you need?
19
+
20
+ ├─ Question / explanation / brainstorm → Just ask Claude
21
+ ├─ Small code change (< 30 min, ≤ 3 files) → Just ask Claude (Superpowers handles TDD/review)
22
+ ├─ Structured workflow with checklist → Use a /spartan: command
23
+ └─ Don't know which command → Type /spartan (smart router asks what you need)
24
+ ```
25
+
26
+ **Superpowers is always active.** When you say "review this" or "debug this" in normal chat, Claude auto-triggers the right skill. You don't need a command for that.
27
+
28
+ **Commands are for when the workflow matters more than the answer** — deploying, creating PRs, scaffolding new services, planning multi-day work.
29
+
30
+ ---
31
+
32
+ ## Task Size → Tool Routing
33
+
34
+ | Size | Use |
35
+ |---|---|
36
+ | < 30 min, ≤ 3 files | Just ask Claude (no command needed) |
37
+ | < 1 day | `/spartan:spec` → `/spartan:build` |
38
+ | 1–3 days | `/spartan:spec` → `/spartan:plan` → `/spartan:build` |
39
+ | > 3 days, multi-session | `/spartan:project new` (full lifecycle) |
@@ -0,0 +1,105 @@
1
+
2
+ ---
3
+
4
+ ## Core Principles (Always Enforce)
5
+
6
+ ### 1. Match the User's Language
7
+ **Detect the language of the user's message and respond entirely in that same language.** This is not optional — it overrides the default English behavior of all commands. If the user writes in Vietnamese, ALL output must be in Vietnamese. If in French, respond in French. If in English, respond in English. This applies to everything: explanations, questions, gate prompts, debug reports, summaries, and PR descriptions. Only code syntax, variable names, file paths, and command names (e.g., `/spartan:debug`) stay in their original form.
8
+
9
+ ### 2. Spec Before Code
10
+ - Task < 1 day → `/spartan:spec` + `/spartan:plan` + `/spartan:build`
11
+ - Task > 1 day → `/spartan:project new` or `/spartan:project milestone-new`
12
+ - Never write production code without a written spec or plan
13
+
14
+ ### 3. TDD is Non-Negotiable
15
+ - Red → Green → Refactor, always
16
+ - Write tests first, then the code that makes them pass
17
+
18
+ ### 4. Atomic Commits
19
+ Each commit = one task, tests passing:
20
+ ```
21
+ type(scope): what changed
22
+
23
+ - why / detail
24
+ ```
25
+ Types: `feat` · `fix` · `test` · `refactor` · `chore` · `docs`
26
+
27
+ ### 5. Context Hygiene (Auto-Managed)
28
+ Claude proactively manages its own context window:
29
+ - When detecting context pressure (slow responses, forgetting earlier context, long conversation) → auto-run `/compact` to summarize and free space
30
+ - If compaction isn't enough → auto-save critical state to `.handoff/` and `.memory/`, then tell user to start a fresh session
31
+ - User can also manually trigger `/spartan:context-save` at any time
32
+ - Session > 60% → hard stop, no exceptions
33
+ - State is in `.planning/` (GSD), `.memory/` (permanent), or `.handoff/` (session), never in chat history
34
+
35
+ **Self-monitoring signals** (Claude watches for these in its own behavior):
36
+ - Starting to lose track of earlier decisions → compact NOW
37
+ - Repeating questions already answered → compact NOW
38
+ - Response quality dropping → warn user + compact
39
+ - Multi-step command taking unusually long → consider compacting between steps
40
+
41
+ ### 6. Auto Mode
42
+ When user says **"auto on"** or **"auto mode"**, all Spartan commands skip confirmation prompts and execute straight through. Claude will:
43
+ - Show the spec/plan/output but NOT pause to ask "does this match?" or "shall I proceed?"
44
+ - Continue to the next step automatically after each step completes
45
+ - Still STOP for destructive actions (git force push, dropping tables, deleting files)
46
+ - Still SHOW output at each step (user can interrupt with "stop" or "wait")
47
+
48
+ Turn off with **"auto off"**. Default is **auto off** (commands ask for confirmation).
49
+
50
+ Auto mode is ideal for experienced users who trust the workflow and want maximum velocity.
51
+
52
+ ### 7. Safety Guardrails
53
+
54
+ | Command | What it does |
55
+ |---|---|
56
+ | `/spartan:careful` | Warn before destructive ops (rm -rf, DROP, force-push) |
57
+ | `/spartan:freeze <dir>` | Lock edits to one directory only |
58
+ | `/spartan:guard <dir>` | Both combined. Deactivate with `off` or `/spartan:unfreeze` |
59
+
60
+ ---
61
+
62
+ ## Core Commands (always available)
63
+
64
+ ### Feature Workflow
65
+ ```
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
+ ```
70
+
71
+ | Size | Path |
72
+ |---|---|
73
+ | Single feature (backend) | `/spartan:spec` → `/spartan:plan` → `/spartan:build` |
74
+ | Single feature (with UI) | `/spartan:spec` → `/spartan:ux prototype` → `/spartan:plan` → `/spartan:build` |
75
+ | Batch of features (1-2 weeks) | `/spartan:epic` → then spec/plan/build each feature |
76
+ | Multi-week project | `/spartan:project new` → milestones + phases |
77
+
78
+ ### Workflows (start here)
79
+ | Command | Purpose |
80
+ |---|---|
81
+ | `/spartan` | **Smart router** — routes to the right workflow or command |
82
+ | `/spartan:build [backend\|frontend] "feature"` | Full feature workflow: understand → plan → TDD → review → PR |
83
+ | `/spartan:debug "symptom"` | Bug workflow: reproduce → investigate → fix → review → PR |
84
+ | `/spartan:onboard` | Codebase understanding: scan → map → setup |
85
+
86
+ ### Spec & Plan (saved artifacts)
87
+ | Command | Purpose |
88
+ |---|---|
89
+ | `/spartan:spec "feature"` | Write a feature spec → saves to `.planning/specs/` → Gate 1 |
90
+ | `/spartan:plan "feature"` | Write implementation plan from spec → saves to `.planning/plans/` → Gate 2 |
91
+ | `/spartan:epic "name"` | Break big work into ordered features → saves to `.planning/epics/` |
92
+
93
+ ### Quality Gates
94
+ | Command | Purpose |
95
+ |---|---|
96
+ | `/spartan:gate-review [phase]` | Dual-agent review (Gate 3.5) — builder + reviewer must both accept |
97
+
98
+ ### Individual Commands
99
+ | Command | Purpose |
100
+ |---|---|
101
+ | `/spartan:pr-ready` | Pre-PR checklist + auto PR description |
102
+ | `/spartan:daily` | Standup summary from git log |
103
+ | `/spartan:init-project` | Auto-generate CLAUDE.md from codebase |
104
+ | `/spartan:context-save` | Manage context: compact first, full save if needed |
105
+ | `/spartan:update` | Upgrade Spartan to latest version |
@@ -0,0 +1,20 @@
1
+
2
+ ---
3
+
4
+ ## Database Patterns
5
+
6
+ Rules in `rules/database/` enforce database standards:
7
+ - `SCHEMA.md` — No FK, TEXT not VARCHAR, soft deletes, uuid_generate_v4(), partial indexes
8
+ - `ORM_AND_REPO.md` — Exposed ORM patterns, repository pattern, testing
9
+ - `TRANSACTIONS.md` — Multi-table operations MUST use `transaction(db.primary) {}`
10
+
11
+ ### Database Skills
12
+
13
+ - `/database-table-creator` — SQL migration → Exposed Table → Entity → Repository → Tests
14
+ - `/database-patterns` — Schema design, migrations, Exposed ORM patterns
15
+
16
+ ### Database Commands
17
+
18
+ | Command | Purpose |
19
+ |---|---|
20
+ | `/spartan:migration "desc"` | Create versioned Flyway migration |
@@ -0,0 +1,19 @@
1
+
2
+ ---
3
+
4
+ ## Kotlin + Micronaut Backend
5
+
6
+ **Stack:** Kotlin + Micronaut — coroutines, Either error handling, Exposed ORM
7
+
8
+ Rules in `rules/backend-micronaut/` and `rules/database/` are loaded automatically.
9
+
10
+ **Workflow:** `/spartan:build backend "feature"` handles the full pipeline (plan → migration → endpoint → tests → review → PR).
11
+
12
+ ### Backend Commands
13
+
14
+ | Command | Purpose |
15
+ |---|---|
16
+ | `/spartan:kotlin-service [name]` | Scaffold Micronaut microservice |
17
+ | `/spartan:review` | PR review with Kotlin/Micronaut conventions |
18
+ | `/spartan:testcontainer [type]` | Setup Testcontainers |
19
+ | `/spartan:migration "desc"` | Create database migration |
@@ -0,0 +1,44 @@
1
+
2
+ ---
3
+
4
+ ## React + Next.js Frontend
5
+
6
+ **Stack:** React / Next.js / TypeScript (App Router) — Vitest + Testing Library, Tailwind CSS
7
+
8
+ Rules in `rules/frontend-react/`:
9
+ - `FRONTEND.md` — Build check before commit, API case conversion, null safety, optimistic updates
10
+
11
+ ### Feature Development Workflow (Frontend)
12
+
13
+ When building a frontend feature, follow this pipeline:
14
+
15
+ ```
16
+ Epic → Spec → Design → Plan → Build → Review
17
+ ↑ ↑ ↑ ↑
18
+ Gate 1 Gate 2 Gate 3 Gate 4
19
+ ```
20
+
21
+ **Build phases:** Types & API → Components → Pages/Routes → Tests
22
+
23
+ Design is NOT optional for frontend — always create a design doc for new screens.
24
+
25
+ **Design workflow:** `/spartan:spec` → `/spartan:ux prototype` → `/spartan:plan` → `/spartan:build`
26
+
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
+
29
+ See `templates/workflow-frontend-react.md` for the full workflow with:
30
+ - Stack-specific quality gates (TypeScript, React patterns, accessibility, responsive)
31
+ - File location guide (App Router conventions)
32
+ - Parallel vs sequential task planning
33
+
34
+ ### Frontend Commands
35
+
36
+ | Command | Purpose |
37
+ |---|---|
38
+ | `/spartan:ux [phase]` | UX design workflow — research, define, ideate, system, prototype, test, handoff, qa |
39
+ | `/spartan:next-app [name]` | Scaffold Next.js app (App Router, Vitest, Docker, CI) |
40
+ | `/spartan:next-feature [name]` | Add feature to existing Next.js app |
41
+ | `/spartan:fe-review` | PR review with Next.js App Router conventions |
42
+ | `/spartan:figma-to-code [url]` | Convert Figma screen to production code via MCP |
43
+ | `/spartan:e2e [feature]` | Scaffold Playwright E2E testing |
44
+ | `/spartan:qa [url] [feature]` | Real browser QA — opens Chromium, tests flows, finds bugs |
@@ -0,0 +1,56 @@
1
+
2
+ ---
3
+
4
+ ## UX Design Workflow
5
+
6
+ **Stack:** Platform-agnostic UX research and design — works for web, mobile, or any digital product.
7
+
8
+ **The full design pipeline:**
9
+ ```
10
+ /spartan:ux ← smart router: asks what you need
11
+ /spartan:ux research ← Phase 1: User discovery
12
+ /spartan:ux define ← Phase 2: Problem definition
13
+ /spartan:ux ideate ← Phase 3: Solution exploration
14
+ /spartan:ux system ← Design system setup (tokens + components)
15
+ /spartan:ux prototype ← Phase 4: Screen design + Design Gate
16
+ /spartan:ux test ← Phase 5: Usability testing plan
17
+ /spartan:ux handoff ← Phase 6: Developer handoff spec
18
+ /spartan:ux qa ← Phase 7: Design QA checklist
19
+ /spartan:ux audit ← Mid-stream: scan what exists, find gaps
20
+ ```
21
+
22
+ ### 3 Maturity Tracks
23
+
24
+ | Track | Phases | Time | When to use |
25
+ |-------|--------|------|-------------|
26
+ | **Quick** | prototype → handoff | 1-2 hours | Small UI change, single component |
27
+ | **Standard** | research → define → prototype → test → handoff | 1-3 days | Real feature with users |
28
+ | **Full** | All 7 phases | 1-3 weeks | New product, major redesign |
29
+
30
+ ### Design Artifacts Location
31
+
32
+ ```
33
+ .planning/design/
34
+ ├── research/ ← User interviews, competitors, insights
35
+ ├── definition/ ← Personas, journey map, problem brief
36
+ ├── ideation/ ← Ideas, user flows
37
+ ├── system/ ← Design tokens, component inventory
38
+ └── screens/ ← Per-feature screen designs
39
+ ```
40
+
41
+ ### Design Token Enforcement
42
+
43
+ Once design tokens exist, ALL downstream commands enforce them:
44
+ - `/spartan:build` injects tokens into agent prompts
45
+ - `/spartan:fe-review` checks token compliance (Stage 8)
46
+ - `/spartan:next-feature` scaffolds with project tokens
47
+ - `design-critic` agent hard-fails on token mismatches
48
+
49
+ ### Works With Other Workflows
50
+
51
+ | You're running... | UX integration |
52
+ |-------------------|---------------|
53
+ | `/spartan:build frontend` | Checks for design tokens, nudges if missing |
54
+ | `/spartan:spec` (UI feature) | Checks for user research, suggests if missing |
55
+ | `/spartan:fe-review` | Checks code against design tokens |
56
+ | `/spartan:figma-to-code` | Merges with existing design tokens if they exist |
@@ -0,0 +1,24 @@
1
+
2
+ ---
3
+
4
+ ## Terraform + AWS Infrastructure
5
+
6
+ **Stack:** Terraform with AWS — EKS/ECS, RDS, ElastiCache, S3, SQS, IAM, OIDC
7
+
8
+ Two template variants: [Multi-Root](https://github.com/spartan-stratos/template-infra-terraform-multiple-root) (per-env directories) and [Single-Root](https://github.com/spartan-stratos/template-infra-terraform-single-root) (envs/ layout, supports ECS + EKS).
9
+
10
+ Rules in `rules/infrastructure/` load automatically when `.tf`, `.hcl`, or `.tfvars` files are in context (Claude Code path-scoped rules). All `/spartan:tf-*` commands also import relevant rules explicitly.
11
+
12
+ ### Infrastructure Commands
13
+
14
+ | Command | Purpose |
15
+ |---|---|
16
+ | `/spartan:tf-scaffold [service]` | Scaffold service-level Terraform |
17
+ | `/spartan:tf-module [name]` | Create/extend Terraform modules |
18
+ | `/spartan:tf-review` | PR review for Terraform changes |
19
+ | `/spartan:tf-plan [env]` | Guided plan workflow |
20
+ | `/spartan:tf-deploy [env]` | Deployment checklist |
21
+ | `/spartan:tf-import [resource]` | Import existing resources |
22
+ | `/spartan:tf-drift [env]` | Detect infrastructure drift |
23
+ | `/spartan:tf-cost` | Cost estimation guidance |
24
+ | `/spartan:tf-security` | Security audit |
@@ -0,0 +1,119 @@
1
+
2
+ ---
3
+
4
+ ## Project Management Commands
5
+
6
+ | Command | Purpose |
7
+ |---|---|
8
+ | `/spartan:epic "name"` | Break big work into ordered features → each goes through spec → plan → build |
9
+ | `/spartan:project [action]` | Manage large projects: `new`, `status`, `milestone-new`, `milestone-complete`, `milestone-summary`, `manager` |
10
+ | `/spartan:phase [action] [N]` | Manage phases: `discuss`, `plan`, `execute`, `verify` |
11
+ | `/spartan:workstreams [action]` | Parallel workstreams: `list`, `create`, `switch`, `status`, `progress`, `complete`, `resume` |
12
+ | `/spartan:gsd-upgrade [mode]` | Upgrade GSD to v5 (decompose + memory + waves) |
13
+ | `/spartan:forensics "problem"` | Post-mortem investigation — diagnose failed workflows |
14
+ | `/spartan:brownfield [svc]` | Map existing codebase; generates CONTEXT-MAP.md |
15
+ | `/spartan:map-codebase` | Deep codebase analysis and architecture mapping |
16
+ | `/spartan:team [action]` | Agent Teams: `create`, `status`, `wave`, `review`, `research`, `build`, `clean` |
17
+
18
+ ### Office Hours (GSD Discuss Phase)
19
+ When running `/spartan:phase discuss N`, Claude MUST ask these 3 forcing questions BEFORE gathering requirements:
20
+
21
+ 1. **"What pain are we actually solving?"** (not the feature — the underlying pain)
22
+ 2. **"What's the narrowest version we can ship to learn?"** (force MVP thinking)
23
+ 3. **"What assumption are we making that could be wrong?"** (surface hidden risks)
24
+
25
+ Only after user answers all 3 → proceed to normal requirement gathering.
26
+ **Auto mode on?** → Still ask these 3 questions. They exist to prevent building the wrong thing — skipping them defeats the purpose.
27
+
28
+ ---
29
+
30
+ ## GSD v5 — Decompose + Agent Memory + Wave Execution
31
+
32
+ ### Decompose Step
33
+ Complex requirements are broken into **work units (WUs)** before planning:
34
+ - Each WU: max 3 files, max half-day, one commit
35
+ - WUs are grouped into **waves** by dependency
36
+ - Wave 1 = no dependencies → can run in parallel Claude Code tabs
37
+ - Wave N+1 = depends on Wave N outputs
38
+
39
+ ### Agent Memory (`.memory/`)
40
+ Persistent project knowledge that survives all sessions:
41
+ ```
42
+ .memory/
43
+ index.md ← Quick reference to all knowledge
44
+ decisions/ ← ADRs (architectural decision records)
45
+ patterns/ ← Reusable code patterns discovered
46
+ knowledge/ ← Domain facts, API gotchas, business rules
47
+ blockers/ ← Known issues and workarounds
48
+ ```
49
+ - **Always** check `.memory/index.md` at session start
50
+ - **Always** capture new decisions/patterns after significant work
51
+ - `/spartan:context-save` now also updates `.memory/`
52
+
53
+ ### Wave Execution
54
+ ```
55
+ Wave 1 (parallel): WU-1, WU-3, WU-5 ← no dependencies
56
+ ── verify tests ──
57
+ Wave 2 (after 1): WU-2, WU-4 ← depends on wave 1
58
+ ── verify tests ──
59
+ Wave 3 (final): WU-6 ← integration
60
+ ```
61
+ Multi-tab: each Claude Code tab handles one WU from the same wave.
62
+
63
+ ### Workstreams & Workspaces
64
+
65
+ **Workstreams** (`/spartan:workstreams`) — run multiple milestones in parallel:
66
+ - `create <name>` — spin up an independent work track
67
+ - `switch <name>` — change active context between workstreams
68
+ - `progress` — see all workstreams' completion at a glance
69
+
70
+ **Workspaces** — isolated repo copies for safe parallel work:
71
+ - Each workspace gets its own `.planning/` directory
72
+ - No interference between concurrent work tracks
73
+ - GSD manages workspace lifecycle automatically
74
+
75
+ ### Project Lifecycle Commands (wraps GSD under the hood)
76
+ ```
77
+ /spartan:project new Create project → PROJECT.md → ROADMAP.md
78
+ /spartan:project status Where are we? Current milestone/phase
79
+ /spartan:project milestone-new Start next milestone
80
+ /spartan:project milestone-complete Archive milestone + git tag
81
+ /spartan:project milestone-summary Generate onboarding doc from milestone
82
+ /spartan:project manager Interactive command center for power users
83
+
84
+ /spartan:phase discuss N Office Hours (3 questions) → decompose → requirements
85
+ /spartan:phase plan N Generate wave-parallel execution plan
86
+ /spartan:phase execute N Execute tasks wave by wave (TDD, safety)
87
+ /spartan:phase verify N UAT + acceptance criteria + capture to .memory/
88
+
89
+ /spartan:workstreams [action] Manage parallel workstreams (list/create/switch/complete)
90
+ /spartan:forensics "problem" Post-mortem investigation for failed workflows
91
+ ```
92
+
93
+ Users never need to type `/gsd:*` commands — the wrappers handle everything.
94
+
95
+ ### Agent Teams (Experimental)
96
+
97
+ **Requires:** `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS` env var set to `1`.
98
+
99
+ Agent Teams replace manual multi-tab parallelism with automated multi-agent coordination. Multiple Claude Code sessions share a task list, communicate via messages, and work in parallel.
100
+
101
+ | Command | What it does |
102
+ |---|---|
103
+ | `/spartan:team create` | Create a team with smart defaults for a task |
104
+ | `/spartan:team status` | Show team progress and teammate states |
105
+ | `/spartan:team wave` | Execute a GSD wave plan using Agent Teams |
106
+ | `/spartan:team review` | Quick-spawn: parallel review team (quality + tests + security) |
107
+ | `/spartan:team research` | Quick-spawn: research swarm (breadth + depth + contrarian) |
108
+ | `/spartan:team build` | Quick-spawn: parallel implementation team |
109
+ | `/spartan:team clean` | Shut down teammates and clean up |
110
+
111
+ **How it bridges waves:**
112
+ ```
113
+ Wave plan (.planning/) → /spartan:team wave → Agent Teams
114
+ WU-1, WU-3, WU-5 TeamCreate Teammate per WU
115
+ (was: manual tabs) TaskCreate per WU Worktree isolation
116
+ Spawn agents Auto-advance waves
117
+ ```
118
+
119
+ Teams store state in `~/.claude/teams/` and `~/.claude/tasks/`. Clean up with `/spartan:team clean`.
@@ -0,0 +1,39 @@
1
+
2
+ ---
3
+
4
+ ## Product Thinking (before building)
5
+
6
+ These commands help you think deep before writing code. Use them when starting a new project, validating an idea, or planning a feature.
7
+
8
+ **The flow:**
9
+ ```
10
+ /spartan:brainstorm "theme" ← Generate and filter ideas
11
+
12
+ /spartan:validate "idea" ← Score: GO / TEST MORE / KILL
13
+
14
+ /spartan:teardown "competitor" ← Deep competitor analysis
15
+
16
+ /spartan:interview "product" ← Generate Mom Test interview script
17
+
18
+ /spartan:lean-canvas "product" ← One-page business model
19
+
20
+ /spartan:think "feature" ← 6-phase deep thinking before code
21
+
22
+ /spartan:spec "task" ← Write the spec
23
+ /spartan:plan "task" ← Plan the work
24
+ /spartan:build "task" ← Then build it
25
+ ```
26
+
27
+ You don't have to use all of them. Pick what fits your stage.
28
+
29
+ ### Product Commands
30
+
31
+ | Command | Purpose |
32
+ |---|---|
33
+ | `/spartan:think "idea"` | 6-phase guided thinking before coding (Dump → Challenge → Walk Through → Tech Check → Final Cut → Build) |
34
+ | `/spartan:validate "idea"` | Score idea on 7 areas. Output: GO / TEST MORE / KILL |
35
+ | `/spartan:teardown "competitor"` | Deep competitor analysis: pricing, features, strengths, weaknesses, opportunity |
36
+ | `/spartan:interview "product"` | Generate Mom Test interview script (talk about their life, not your idea) |
37
+ | `/spartan:lean-canvas "product"` | Fill out 9-block Lean Canvas interactively |
38
+ | `/spartan:brainstorm "theme"` | Generate 8-15 ideas → filter → rank top 3 |
39
+ | `/spartan:web-to-prd "URL"` | Scan a live web app → extract features → generate PRD/epics/stories → export to Notion. Needs Playwright MCP + Notion MCP. |
@@ -0,0 +1,34 @@
1
+
2
+ ---
3
+
4
+ ## Ops & Infrastructure
5
+
6
+ ### Ops Commands
7
+
8
+ | Command | Purpose |
9
+ |---|---|
10
+ | `/spartan:deploy [svc] [target]` | Deploy guide with pre-flight checks |
11
+ | `/spartan:env-setup [svc]` | Audit env vars, generate `.env.example` |
12
+
13
+ ---
14
+
15
+ ## Infrastructure Conventions
16
+
17
+ **Kubernetes:** Always set resource limits + liveness/readiness probes for Micronaut services.
18
+
19
+ **Terraform:** `terraform plan` review required before every `apply`. No manual console changes.
20
+
21
+ **Platforms:** Railway (staging) · AWS (production) · GCP (secondary)
22
+
23
+ **Railway** (`railway.toml`):
24
+ ```toml
25
+ [build]
26
+ builder = "nixpacks"
27
+ [deploy]
28
+ startCommand = "java -jar build/libs/*-all.jar"
29
+ healthcheckPath = "/health"
30
+ healthcheckTimeout = 60
31
+ restartPolicyType = "on-failure"
32
+ ```
33
+
34
+ **AWS (production):** ECS Fargate + RDS + Secrets Manager (never plain env vars for secrets).
@@ -0,0 +1,27 @@
1
+
2
+ ---
3
+
4
+ ## Startup Research Pipeline
5
+
6
+ **Workflows:**
7
+ - `/spartan:startup "idea"` — Full pipeline: brainstorm → validate → research → pitch
8
+ - `/spartan:research "topic"` — Deep research with source tracking and report
9
+
10
+ **Stage shortcuts** (jump to a specific stage):
11
+
12
+ | Command | Stage |
13
+ |---|---|
14
+ | `/spartan:kickoff "theme"` | Brainstorm + validate |
15
+ | `/spartan:deep-dive "project"` | Market research + teardowns |
16
+ | `/spartan:fundraise "project"` | Pitch + outreach |
17
+
18
+ **Other commands:** `pitch`, `outreach`, `content`, `write`
19
+
20
+ **Agents:** `research-planner` (plans research), `idea-killer` (stress-tests ideas)
21
+
22
+ ### Rules
23
+
24
+ - Be a brutal, honest advisor. No sugarcoating.
25
+ - Ask tough questions when ideas are vague.
26
+ - Push for validation before building.
27
+ - Save research outputs in the right stage folder.
@@ -0,0 +1,21 @@
1
+
2
+ ---
3
+
4
+ ## Git Branching
5
+
6
+ - `main` — production only, protected
7
+ - `develop` — integration branch
8
+ - `feature/{ticket}-{slug}` — new features
9
+ - `fix/{ticket}-{slug}` — bug fixes
10
+
11
+ GSD manages branch creation per phase automatically.
12
+
13
+ ---
14
+
15
+ ## What NOT to Do
16
+ - Don't write code without a spec
17
+ - Don't skip tests
18
+ - Don't continue a session past 60% context
19
+ - Don't manually edit `.planning/` files — let GSD handle them
20
+ - Don't commit secrets or hardcoded credentials
21
+ - Don't force a command when a simple chat answer is enough