@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,326 @@
1
+ ---
2
+ name: spartan:onboard
3
+ description: "Understand a new codebase — scan, map architecture, set up rules, and get ready to build"
4
+ argument-hint: ""
5
+ preamble-tier: 4
6
+ ---
7
+
8
+ # Onboard to This Codebase
9
+
10
+ You are the **Onboard workflow leader** — go from "I just joined" to "I'm ready to build."
11
+
12
+ You handle scanning, mapping, and setup in one flow. Don't tell the user to run separate commands.
13
+
14
+ ```
15
+ PIPELINE:
16
+
17
+ Check Context → Scan → Map → Setup → Save to Memory
18
+ │ │ │ │ │
19
+ .memory/ Gate 1 Gate 2 Gate 3 auto-save
20
+ prior sessions
21
+ ```
22
+
23
+ ---
24
+
25
+ ## Step 0: Check Context (silent)
26
+
27
+ Before scanning from scratch, check if someone already did this work.
28
+
29
+ ```bash
30
+ # Check for existing memory/knowledge
31
+ ls .memory/index.md .memory/knowledge/ 2>/dev/null
32
+
33
+ # Check for existing CLAUDE.md
34
+ ls CLAUDE.md 2>/dev/null
35
+
36
+ # Check for prior onboarding
37
+ ls .handoff/*.md 2>/dev/null
38
+ ```
39
+
40
+ **If `.memory/` has knowledge files**, read them. Someone already captured context:
41
+ > "Found existing project knowledge in `.memory/`. Reading it before scanning."
42
+
43
+ **If CLAUDE.md exists**, read it first. Build on top of it, don't start over.
44
+
45
+ ---
46
+
47
+ ## Stage 1: Scan
48
+
49
+ **Goal:** Understand what this project is at a surface level.
50
+
51
+ ### Check project basics
52
+ ```bash
53
+ # What's in the root?
54
+ ls -la
55
+
56
+ # Package/build files
57
+ ls build.gradle.kts settings.gradle.kts pom.xml 2>/dev/null
58
+ ls package.json tsconfig.json next.config.* 2>/dev/null
59
+ ls Dockerfile docker-compose.yml 2>/dev/null
60
+ ls Makefile 2>/dev/null
61
+
62
+ # Existing docs
63
+ ls CLAUDE.md README.md CONTRIBUTING.md 2>/dev/null
64
+ ls .planning/ .memory/ .handoff/ 2>/dev/null
65
+
66
+ # Git info
67
+ git log --oneline -20
68
+ git shortlog -sn --no-merges | head -10
69
+ git branch -a | head -20
70
+ ```
71
+
72
+ ### Classify the project
73
+
74
+ | Signal | Meaning |
75
+ |--------|---------|
76
+ | `build.gradle.kts` + `src/main/kotlin/` | Kotlin/Micronaut backend |
77
+ | `package.json` + `next.config.*` | Next.js/React frontend |
78
+ | Both | Full-stack monorepo |
79
+ | `docker-compose.yml` with multiple services | Microservices |
80
+ | Already has `CLAUDE.md` | Someone set this up before — read it |
81
+ | Has `.planning/` | GSD project — check status |
82
+
83
+ ### Produce a quick summary
84
+
85
+ ```markdown
86
+ ## Project Scan
87
+
88
+ **Name:** [from package.json, settings.gradle, or folder name]
89
+ **Stack:** [what you detected]
90
+ **Size:** [file count, line count estimate]
91
+ **Team:** [from git shortlog — who contributes most]
92
+ **Activity:** [last commit date, commit frequency]
93
+ **Existing docs:** [what exists already]
94
+ **Tests:** [test framework, rough coverage indicator]
95
+ ```
96
+
97
+ **GATE 1 — STOP and ask:**
98
+ > "Here's what I see: [summary]. Does this match your understanding? Anything I should know that's not in the code?"
99
+
100
+ ---
101
+
102
+ ## Stage 2: Map
103
+
104
+ **Goal:** Understand how the pieces fit together. Build a mental model.
105
+
106
+ ### Agent Teams boost (if enabled)
107
+
108
+ ```bash
109
+ echo "${CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS:-not_set}"
110
+ ```
111
+
112
+ **If Agent Teams is enabled AND the codebase is large (50+ files or multi-module):**
113
+
114
+ Run a parallel mapping team for faster analysis:
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()`.
149
+
150
+ **If Agent Teams is NOT enabled (or codebase is small)**, map manually:
151
+
152
+ ### Architecture mapping
153
+
154
+ Use the approach from `/spartan:map-codebase` internally:
155
+ - Identify the main modules/packages
156
+ - Trace a request from entry point to response (for backends) or from page load to render (for frontends)
157
+ - Find the data model (entities, schemas, types)
158
+ - Identify external dependencies (databases, APIs, message queues)
159
+
160
+ ### For backend projects
161
+ ```
162
+ Request flow:
163
+ Client → Controller → Manager/Service → Repository → Database
164
+ ↘ External APIs (if any)
165
+
166
+ Key directories:
167
+ controllers/ — HTTP endpoints
168
+ managers/ — Business logic
169
+ repositories/ — Data access
170
+ models/ — Entities + DTOs
171
+ config/ — Application config
172
+ ```
173
+
174
+ ### For frontend projects
175
+ ```
176
+ Render flow:
177
+ Route → Page → Layout → Components → Hooks → API client → Backend
178
+
179
+ Key directories:
180
+ app/ — Pages and routes
181
+ components/ — Reusable UI
182
+ hooks/ — Custom hooks
183
+ lib/ — Utilities and API client
184
+ types/ — TypeScript types
185
+ ```
186
+
187
+ ### Produce an architecture overview
188
+
189
+ ```markdown
190
+ ## Architecture
191
+
192
+ **Pattern:** [MVC, layered, microservices, etc.]
193
+ **Entry points:** [main files, route handlers]
194
+ **Data model:** [key entities and their relationships]
195
+ **External deps:** [databases, APIs, queues, caches]
196
+ **Config:** [how config works — env vars, files, etc.]
197
+
198
+ **Request flow:**
199
+ [trace one typical request end-to-end]
200
+
201
+ **Key decisions:**
202
+ [any non-obvious architecture choices — why things are the way they are]
203
+ ```
204
+
205
+ ### Check for gotchas
206
+ - Any code that looks unused but might be important?
207
+ - Unusual patterns that a new dev would trip on?
208
+ - Known tech debt? (look for TODO comments, fixme markers)
209
+
210
+ ```bash
211
+ grep -rn "TODO\|FIXME\|HACK\|XXX" --include="*.kt" --include="*.tsx" --include="*.ts" src/ | head -20
212
+ ```
213
+
214
+ **GATE 2 — STOP and ask:**
215
+ > "Here's how this project works: [architecture overview]. Questions before I set things up?"
216
+ >
217
+ > This is the most important gate. Make sure the user's mental model matches reality.
218
+
219
+ ---
220
+
221
+ ## Stage 3: Setup
222
+
223
+ **Goal:** Configure the AI tools for this specific project.
224
+
225
+ ### Generate or update CLAUDE.md
226
+ Use the approach from `/spartan:init-project` internally:
227
+ - Tech stack section
228
+ - Architecture section (from Stage 2)
229
+ - Conventions (detected from code patterns)
230
+ - Key commands (build, test, run)
231
+ - Domain context
232
+
233
+ If CLAUDE.md already exists, don't overwrite — merge your findings into it.
234
+
235
+ ### Recommend packs
236
+ Based on the detected stack:
237
+
238
+ | Stack detected | Recommended packs |
239
+ |----------------|-------------------|
240
+ | Kotlin/Micronaut | `core` + `backend-micronaut` (pulls in `database` + `shared-backend`) |
241
+ | Next.js/React | `core` + `frontend-react` |
242
+ | Full-stack | `core` + `backend-micronaut` + `frontend-react` |
243
+ | Unknown | `core` only, ask about stack |
244
+
245
+ If packs aren't installed yet:
246
+ > "This is a [stack] project. I'd add the [pack] pack for stack-specific guidance. Want me to set it up?"
247
+
248
+ ### Verify setup
249
+ ```bash
250
+ # Check CLAUDE.md exists and has content
251
+ ls -la CLAUDE.md
252
+ wc -l CLAUDE.md
253
+
254
+ # Check if rules are in place
255
+ ls ~/.claude/rules/ 2>/dev/null
256
+ ```
257
+
258
+ ---
259
+
260
+ ## Stage 4: Save to Memory (auto-runs)
261
+
262
+ After setup, save key findings so future sessions don't have to re-scan.
263
+
264
+ ```bash
265
+ mkdir -p .memory/knowledge .memory/decisions
266
+ ```
267
+
268
+ **What to save:**
269
+ - **Architecture summary** → `.memory/knowledge/architecture.md`
270
+ - **Key gotchas/patterns found** → `.memory/knowledge/gotchas.md`
271
+ - **Tech debt notes** → `.memory/knowledge/tech-debt.md` (if significant)
272
+ - **Non-obvious decisions** → `.memory/decisions/` (only if the user shared context that isn't in the code)
273
+
274
+ **What NOT to save:**
275
+ - Things already in CLAUDE.md (don't duplicate)
276
+ - Obvious stuff (it's a React app, it uses TypeScript)
277
+ - File paths (they change)
278
+
279
+ Create or update `.memory/index.md`:
280
+ ```markdown
281
+ # Project Memory
282
+
283
+ ## Knowledge
284
+ - [architecture.md](knowledge/architecture.md) — [one-line summary]
285
+ - [gotchas.md](knowledge/gotchas.md) — [one-line summary]
286
+
287
+ ## Decisions
288
+ [add any decisions the user shared]
289
+ ```
290
+
291
+ **GATE 3 — Done.**
292
+ > "You're set up. Here's what's ready:
293
+ > - CLAUDE.md: [created/updated]
294
+ > - Stack: [detected stack]
295
+ > - Packs: [what's installed]
296
+ > - Memory: key findings saved for future sessions
297
+ >
298
+ > Start building with `/spartan:build [feature]` or explore with `/spartan` anytime."
299
+
300
+ ---
301
+
302
+ ## If the codebase is legacy / brownfield
303
+
304
+ If the scan reveals a messy or unfamiliar codebase (no docs, no tests, tangled dependencies), use the approach from `/spartan:brownfield` internally for a deeper analysis before mapping.
305
+
306
+ Signs of brownfield:
307
+ - No tests or very few tests
308
+ - No documentation
309
+ - Multiple frameworks or patterns mixed together
310
+ - Large files (1000+ lines)
311
+ - Circular dependencies
312
+
313
+ In this case, add a warning:
314
+ > "This codebase has some legacy patterns. Here's what to watch out for: [specific issues]. I'd suggest adding tests before making changes in [risky areas]."
315
+
316
+ ---
317
+
318
+ ## Rules
319
+
320
+ - **You are the leader.** Run scanning, mapping, and setup yourself. Don't tell the user to run `/spartan:init-project` or `/spartan:map-codebase` separately.
321
+ - **Don't change any code during onboarding.** This is read-only. Understand first.
322
+ - **Ask about what's NOT in the code.** Business context, deployment process, team conventions — things you can't see in files.
323
+ - **Don't assume conventions from one file apply everywhere.** Check multiple files for consistency.
324
+ - **If CLAUDE.md exists, read it before scanning.** Someone already did this work — build on it.
325
+ - **Save findings to memory.** Future sessions should benefit from this onboarding work.
326
+ - **The architecture overview should fit on one screen.** If it's longer, you're over-explaining.
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: spartan:outreach
3
+ description: Draft personalized investor outreach emails — cold, warm intro, and follow-up
4
+ argument-hint: "[investor name or context]"
5
+ ---
6
+
7
+ # Outreach: {{ args[0] | default: "investor email" }}
8
+
9
+ Draft investor communication.
10
+
11
+ ## Steps
12
+
13
+ 1. Use the `investor-outreach` skill
14
+ 2. If investor name is given, search for their thesis, portfolio, recent activity
15
+ 3. Personalize the email based on real data
16
+ 4. If no investor info is available, create a template and flag what needs personalizing
@@ -0,0 +1,142 @@
1
+ ---
2
+ name: spartan:phase
3
+ description: Manage project phases — discuss requirements, plan tasks, execute work, verify results. This is the Spartan wrapper for GSD phase commands. Use after /spartan:project new.
4
+ argument-hint: "[discuss | plan | execute | verify] [phase number]"
5
+ ---
6
+
7
+ # Phase {{ args[1] | default: "?" }}: {{ args[0] | default: "discuss" }}
8
+
9
+ You are managing a phase in the current GSD project.
10
+ The user does NOT need to know about `/gsd:*` commands — everything runs through `/spartan:*`.
11
+
12
+ ---
13
+
14
+ {% if args[0] == "discuss" %}
15
+ ## Discuss Phase {{ args[1] | default: "N" }}
16
+
17
+ Gathering requirements for this phase. But first — Office Hours.
18
+
19
+ **MANDATORY: 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
+ **Auto mode on?** → Still ask these 3 questions. They prevent building the wrong thing.
26
+
27
+ Only after the user answers all 3 → proceed:
28
+
29
+ **Run:** `/gsd:discuss-phase {{ args[1] | default: "N" }}`
30
+
31
+ After discussion, decompose requirements into work units (WUs) per GSD v5:
32
+ - Each WU: max 3 files, max half-day, one commit
33
+ - Group into waves by dependency
34
+
35
+ Then tell the user:
36
+ "Requirements gathered and decomposed into [N] work units across [N] waves. Next step: `/spartan:phase plan {{ args[1] | default: "N" }}`"
37
+
38
+ {% elif args[0] == "plan" %}
39
+ ## Plan Phase {{ args[1] | default: "N" }}
40
+
41
+ Generating the execution plan with wave-parallel tasks.
42
+
43
+ **Before planning, check `.memory/index.md`** for relevant patterns, decisions, and knowledge from previous phases.
44
+
45
+ **Run:** `/gsd:plan-phase {{ args[1] | default: "N" }}`
46
+
47
+ The plan should include:
48
+ - Work units grouped into waves
49
+ - Wave 1 = independent tasks (can run in parallel tabs)
50
+ - Wave 2+ = depends on previous wave
51
+ - Each task has: files to touch, test to write first, commit message
52
+
53
+ Then tell the user:
54
+ "Plan ready with [N] waves. Next step: `/spartan:phase execute {{ args[1] | default: "N" }}`"
55
+
56
+ If the user has multiple Claude Code tabs available, suggest:
57
+ "Wave 1 has [N] independent tasks — you can run them in parallel tabs for speed."
58
+
59
+ {% elif args[0] == "execute" %}
60
+ ## Execute Phase {{ args[1] | default: "N" }}
61
+
62
+ Running the planned tasks wave by wave.
63
+
64
+ ### Auto-parallelize with Agent Teams
65
+
66
+ ```bash
67
+ echo "${CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS:-not_set}"
68
+ ```
69
+
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
+
72
+ Run `/spartan:team wave` internally. This:
73
+ 1. Creates a team from the wave plan
74
+ 2. Spawns one agent per WU with worktree isolation
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
78
+
79
+ **If Agent Teams is NOT enabled** (env var not set) → continue with default execution:
80
+
81
+ **Run:** `/gsd:execute-phase {{ args[1] | default: "N" }}`
82
+
83
+ During execution:
84
+ - Follow TDD: test first → implement → verify
85
+ - Respect safety guardrails if active (careful/freeze/guard)
86
+ - After each wave, verify all tests pass before starting next wave
87
+ - Capture new knowledge to `.memory/` as you go
88
+
89
+ After execution, tell the user:
90
+ "Phase {{ args[1] | default: "N" }} executed. [N] commits made."
91
+
92
+ Suggest next step based on phase complexity:
93
+ - If phase had 3+ tasks: "Run `/spartan:gate-review {{ args[1] | default: "N" }}` for a dual-agent review, then `/spartan:phase verify {{ args[1] | default: "N" }}`"
94
+ - If phase was simple (1-2 tasks): "Next step: `/spartan:phase verify {{ args[1] | default: "N" }}`"
95
+
96
+ {% elif args[0] == "verify" %}
97
+ ## Verify Phase {{ args[1] | default: "N" }}
98
+
99
+ Running acceptance criteria checks and UAT.
100
+
101
+ **Run:** `/gsd:verify-work {{ args[1] | default: "N" }}`
102
+
103
+ After verification:
104
+ 1. Check all acceptance criteria from the discuss phase
105
+ 2. Run full test suite
106
+ 3. Extract decisions made → `.memory/decisions/`
107
+ 4. Extract patterns discovered → `.memory/patterns/`
108
+ 5. Update `.memory/index.md`
109
+
110
+ Then tell the user:
111
+ - If passed: "Phase {{ args[1] | default: "N" }} verified ✅. Next: `/spartan:phase discuss [N+1]` for the next phase, or `/spartan:project milestone-complete` if milestone is done."
112
+ - If failed: "Phase {{ args[1] | default: "N" }} has [N] issues. Fix them, then re-run `/spartan:phase verify {{ args[1] | default: "N" }}`."
113
+
114
+ {% else %}
115
+ ## Unknown action: {{ args[0] }}
116
+
117
+ Available actions:
118
+ - `/spartan:phase discuss N` — Gather requirements (starts with Office Hours)
119
+ - `/spartan:phase plan N` — Generate wave-parallel execution plan
120
+ - `/spartan:phase execute N` — Execute tasks wave by wave
121
+ - `/spartan:phase verify N` — Run acceptance criteria + UAT
122
+
123
+ Example: `/spartan:phase discuss 1`
124
+ {% endif %}
125
+
126
+ ---
127
+
128
+ ## Phase Lifecycle (for reference)
129
+
130
+ ```
131
+ /spartan:phase discuss N ← Office Hours → requirements → decompose
132
+
133
+ /spartan:phase plan N ← Wave-parallel plan from .memory/ context
134
+
135
+ /spartan:phase execute N ← TDD, wave by wave, safety guardrails
136
+
137
+ /spartan:gate-review N ← Dual-agent review (Gate 3.5) — optional but recommended
138
+
139
+ /spartan:phase verify N ← UAT + capture knowledge to .memory/
140
+
141
+ [next phase or milestone complete]
142
+ ```
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: spartan:pitch
3
+ description: Create investor-facing materials — deck outline, one-pager, memo, or financial model
4
+ argument-hint: "[what you need: deck, one-pager, memo, model]"
5
+ ---
6
+
7
+ # Pitch: {{ args[0] | default: "deck outline" }}
8
+
9
+ Create investor materials.
10
+
11
+ ## Steps
12
+
13
+ 1. Use the `investor-materials` skill
14
+ 2. Check for existing research in the project's `02-research/` and `03-validation/` folders
15
+ 3. Use that data as the source of truth
16
+ 4. Save to the project's `04-build/` folder
17
+
18
+ If there's no prior research, warn that the materials will be weaker without data.