@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,181 @@
1
+ # Spec: [Feature Name]
2
+
3
+ > **Workflow position:** Spec defines WHAT to build. After this passes Gate 1, create a **design doc** (if UI feature) or go straight to the **implementation plan** (`implementation-plan.md`).
4
+ >
5
+ > ```
6
+ > Epic → ► Spec → [Design] → Plan → Build → Review
7
+ > ↑
8
+ > Gate 1
9
+ > ```
10
+
11
+ **Created**: [date]
12
+ **Status**: draft | ready | approved
13
+ **Author**: [who wrote this]
14
+ **Epic**: [epic name or "none"]
15
+
16
+ ---
17
+
18
+ ## Problem
19
+
20
+ What problem are we solving? Why does it matter?
21
+
22
+ [Describe the problem in 2-3 sentences. Be specific.]
23
+
24
+ ---
25
+
26
+ ## Goal
27
+
28
+ What does success look like? How do we know we're done?
29
+
30
+ [Describe the end state. What can users do that they couldn't before?]
31
+
32
+ ---
33
+
34
+ ## User Stories
35
+
36
+ Who uses this and why?
37
+
38
+ - As a [role], I want to [action] so that [benefit]
39
+ - As a [role], I want to [action] so that [benefit]
40
+
41
+ ---
42
+
43
+ ## Requirements
44
+
45
+ ### Must Have
46
+ - [requirement 1]
47
+ - [requirement 2]
48
+
49
+ ### Nice to Have
50
+ - [requirement]
51
+
52
+ ### Out of Scope
53
+ - [what we're NOT building]
54
+ - [what we're NOT changing]
55
+
56
+ ---
57
+
58
+ ## Data Model
59
+
60
+ What data do we need? New tables? Changes to existing tables?
61
+
62
+ *Skip this section if the feature doesn't touch the database.*
63
+
64
+ ### New Tables
65
+
66
+ | Table | Purpose |
67
+ |-------|---------|
68
+ | [table_name] | [what it stores] |
69
+
70
+ ### Table Schema
71
+
72
+ ```sql
73
+ CREATE TABLE [table_name] (
74
+ id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
75
+ -- columns here
76
+ created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
77
+ updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
78
+ deleted_at TIMESTAMP
79
+ );
80
+ ```
81
+
82
+ ### Changes to Existing Tables
83
+
84
+ | Table | Change | Why |
85
+ |-------|--------|-----|
86
+ | [table] | [add/modify/remove column] | [reason] |
87
+
88
+ ---
89
+
90
+ ## API Changes
91
+
92
+ What endpoints are needed?
93
+
94
+ *Skip this section if the feature doesn't add or change APIs.*
95
+
96
+ ### New Endpoints
97
+
98
+ | Method | Path | Purpose |
99
+ |--------|------|---------|
100
+ | GET | /api/v1/[path] | [what it does] |
101
+ | POST | /api/v1/[path] | [what it does] |
102
+
103
+ ### Request/Response Examples
104
+
105
+ ```json
106
+ // GET /api/v1/[path]?param=value
107
+ // Response:
108
+ {
109
+ "field_name": "value",
110
+ "created_at": "2025-01-01T00:00:00Z"
111
+ }
112
+ ```
113
+
114
+ ### Changes to Existing Endpoints
115
+
116
+ | Endpoint | Change | Why |
117
+ |----------|--------|-----|
118
+ | [endpoint] | [what changes] | [reason] |
119
+
120
+ ---
121
+
122
+ ## UI Changes
123
+
124
+ What screens or components are affected?
125
+
126
+ *Skip this section if the feature is backend-only. For detailed UI work, create a design doc (`design-doc.md`) after this spec passes Gate 1.*
127
+
128
+ - [screen/component 1]: [what changes]
129
+ - [screen/component 2]: [what changes]
130
+
131
+ ---
132
+
133
+ ## Edge Cases
134
+
135
+ What could go wrong? What are the weird scenarios?
136
+
137
+ - [edge case 1]: [how to handle it]
138
+ - [edge case 2]: [how to handle it]
139
+ - [edge case 3]: [how to handle it]
140
+
141
+ ---
142
+
143
+ ## Testing Criteria
144
+
145
+ How do we know this works?
146
+
147
+ ### Happy Path Tests
148
+ - [test 1]
149
+ - [test 2]
150
+
151
+ ### Edge Case Tests
152
+ - [test 1]
153
+ - [test 2]
154
+
155
+ ### Integration Tests
156
+ - [test 1]
157
+
158
+ ---
159
+
160
+ ## Dependencies
161
+
162
+ What does this need to work?
163
+
164
+ - [dependency 1]: [why]
165
+ - [dependency 2]: [why]
166
+
167
+ ---
168
+
169
+ ## Notes
170
+
171
+ - [note]
172
+
173
+ ---
174
+
175
+ ## Tips
176
+
177
+ - **Be specific** — "fast" is vague, "under 200ms" is specific
178
+ - **List what's out of scope** — prevents scope creep
179
+ - **Include edge cases** — think about nulls, empty lists, concurrent access
180
+ - **Match existing patterns** — check how similar features are built in the codebase
181
+ - **Spec defines the contract** — data model and API shapes go here. Architecture and file structure go in the plan.
@@ -0,0 +1,47 @@
1
+ # Idea Canvas: [Name]
2
+
3
+ **Date:** YYYY-MM-DD
4
+
5
+ ## The Problem
6
+ > What's broken? What sucks? What takes too long?
7
+
8
+ ## Who Has This Problem?
9
+ > Be specific. "Everyone" is not an answer.
10
+
11
+ ## How Do They Solve It Now?
12
+ > What workarounds exist? What competitors are there?
13
+
14
+ ## Your Solution (30 seconds)
15
+ > Explain it like you're texting a friend.
16
+
17
+ ## Why You?
18
+ > What do you know that others don't? Any unfair advantages?
19
+
20
+ ## How Big Is This?
21
+ - How many people have this problem?
22
+ - How often do they have it?
23
+ - How much would they pay to fix it?
24
+
25
+ ## Risks
26
+ > What could kill this idea?
27
+
28
+ 1.
29
+ 2.
30
+ 3.
31
+
32
+ ## First Experiment
33
+ > What's the cheapest way to test if this works?
34
+
35
+ ## Gut Check
36
+ - [ ] I've seen this problem myself
37
+ - [ ] I know at least 3 people with this problem
38
+ - [ ] They've tried to solve it before
39
+ - [ ] I could build v1 in 2 weeks
40
+ - [ ] I'd use this product myself
41
+
42
+ **Score:** _/5 boxes checked
43
+
44
+ ## Decision
45
+ - [ ] Worth exploring
46
+ - [ ] Kill it
47
+ - [ ] Need more info on: ___________
@@ -0,0 +1,159 @@
1
+ # Plan: [Feature Name]
2
+
3
+ > **Workflow position:** Plan defines HOW to build it. It turns the spec into tasks with clear architecture, file locations, and dependencies. After this passes Gate 2, start building.
4
+ >
5
+ > ```
6
+ > Epic → Spec → [Design] → ► Plan → Build → Review
7
+ > ↑
8
+ > Gate 2
9
+ > ```
10
+
11
+ **Spec**: [path to spec file]
12
+ **Epic**: [epic name or "none"]
13
+ **Created**: [date]
14
+ **Status**: draft | ready | approved
15
+
16
+ ---
17
+
18
+ ## Architecture
19
+
20
+ How does this fit into the existing system?
21
+
22
+ ### Components
23
+
24
+ List the main components this feature needs. Adapt to your stack.
25
+
26
+ | Component | Type | Purpose |
27
+ |-----------|------|---------|
28
+ | [Name] | [Controller / Service / Repository / Component / Hook / etc.] | [what it does] |
29
+ | [Name] | [Controller / Service / Repository / Component / Hook / etc.] | [what it does] |
30
+ | [Name] | [Controller / Service / Repository / Component / Hook / etc.] | [what it does] |
31
+
32
+ ### Where Things Go
33
+
34
+ | File | Location | Purpose |
35
+ |------|----------|---------|
36
+ | [file name] | [directory path] | [what it does] |
37
+ | [file name] | [directory path] | [what it does] |
38
+
39
+ ---
40
+
41
+ ## Files to Change
42
+
43
+ Existing files that need changes:
44
+
45
+ | File | What Changes | Why |
46
+ |------|-------------|-----|
47
+ | [file path] | [description] | [reason] |
48
+
49
+ ---
50
+
51
+ ## New Files
52
+
53
+ Files to create:
54
+
55
+ | File | Purpose |
56
+ |------|---------|
57
+ | [file path] | [what it does] |
58
+
59
+ ---
60
+
61
+ ## Task Breakdown
62
+
63
+ Ordered list of tasks. Each task should be small enough for one person or agent to do.
64
+
65
+ Organize into phases that make sense for your stack. Some examples:
66
+
67
+ **Backend features:** Database → Business Logic → API → Tests
68
+ **Frontend features:** Components → Pages/Routes → State/Data → Tests
69
+ **Full-stack features:** Database → API → Components → Integration → Tests
70
+
71
+ ### Phase 1: [name]
72
+
73
+ | # | Task | Files |
74
+ |---|------|-------|
75
+ | 1 | [task description] | [file(s)] |
76
+ | 2 | [task description] | [file(s)] |
77
+
78
+ ### Phase 2: [name]
79
+
80
+ | # | Task | Files |
81
+ |---|------|-------|
82
+ | 3 | [task description] | [file(s)] |
83
+ | 4 | [task description] | [file(s)] |
84
+
85
+ ### Phase 3: [name]
86
+
87
+ | # | Task | Files |
88
+ |---|------|-------|
89
+ | 5 | [task description] | [file(s)] |
90
+ | 6 | [task description] | [file(s)] |
91
+
92
+ ---
93
+
94
+ ## Parallel vs Sequential
95
+
96
+ Which tasks can run at the same time?
97
+
98
+ | Parallel Group | Tasks | Why |
99
+ |---------------|-------|-----|
100
+ | Group A | [tasks] | [they don't depend on each other] |
101
+ | Group B | [tasks] | [they don't depend on each other] |
102
+
103
+ | Sequential | Depends On | Why |
104
+ |-----------|-----------|-----|
105
+ | Task [N] | Task [M] | [reason] |
106
+
107
+ ---
108
+
109
+ ## Risk Areas
110
+
111
+ What's tricky? What could break?
112
+
113
+ - [risk 1]: [how to handle]
114
+ - [risk 2]: [how to handle]
115
+
116
+ ---
117
+
118
+ ## Testing Plan
119
+
120
+ Adapt these categories to your stack:
121
+
122
+ ### Data Layer Tests
123
+ - Insert + read back
124
+ - Update fields
125
+ - Delete behavior
126
+ - Query filters
127
+
128
+ ### Business Logic Tests
129
+ - Happy path for each method
130
+ - Error cases (not found, validation failures)
131
+
132
+ ### API / Integration Tests
133
+ - Each endpoint or route works correctly
134
+ - Auth/permission checks
135
+ - Invalid input returns proper errors
136
+
137
+ ### UI Tests (if applicable)
138
+ - Component renders correctly
139
+ - User interactions work
140
+ - Loading/error/empty states
141
+
142
+ ---
143
+
144
+ ## Checklist Before Starting
145
+
146
+ - [ ] Read the spec
147
+ - [ ] Read project coding rules
148
+ - [ ] Check existing codebase for similar patterns
149
+ - [ ] Understand the data model
150
+
151
+ ---
152
+
153
+ ## Tips
154
+
155
+ - **Small tasks** — each task should take minutes, not hours
156
+ - **Clear dependencies** — know what has to finish before what
157
+ - **List ALL files** — don't leave anyone guessing where things go
158
+ - **Match architecture** — follow the project's existing patterns
159
+ - **Plan defines HOW** — architecture, files, and task order go here. WHAT to build is in the spec.
@@ -0,0 +1,86 @@
1
+ # PRD: [Feature/Product Name]
2
+
3
+ > **When to use this:** PRDs are for stakeholder alignment — "should we build this?" They're high-level and non-technical. For the development workflow (epic → spec → plan → build), use `epic.md` and `feature-spec.md` instead. A PRD can feed into an epic, but they serve different audiences.
4
+
5
+ **Author:**
6
+ **Date:**
7
+ **Status:** Draft / Review / Approved
8
+
9
+ ---
10
+
11
+ ## TL;DR
12
+ What are we building and why? (2-3 sentences max)
13
+
14
+ ## Problem
15
+ What problem does this solve? Include evidence from user research.
16
+
17
+ ## Goals
18
+ What does success look like?
19
+
20
+ | Goal | Metric | Target |
21
+ |------|--------|--------|
22
+ | | | |
23
+ | | | |
24
+
25
+ ## Non-Goals
26
+ What are we NOT doing?
27
+
28
+ -
29
+
30
+ ## User Stories
31
+ | As a... | I want to... | So that... |
32
+ |---------|--------------|------------|
33
+ | | | |
34
+ | | | |
35
+
36
+ ## Solution
37
+
38
+ ### Overview
39
+ How does it work? (simple explanation)
40
+
41
+ ### User Flow
42
+ 1. User does X
43
+ 2. System shows Y
44
+ 3. User clicks Z
45
+ 4. ...
46
+
47
+ ### Wireframes
48
+ (Link to designs or paste images)
49
+
50
+ ## Technical Notes
51
+ Anything the dev team needs to know?
52
+
53
+ ## Open Questions
54
+ | Question | Answer | Owner |
55
+ |----------|--------|-------|
56
+ | | | |
57
+
58
+ ## Scope
59
+
60
+ ### MVP (Must Have)
61
+ -
62
+
63
+ ### Nice to Have
64
+ -
65
+
66
+ ### Future
67
+ -
68
+
69
+ ## Timeline
70
+ | Milestone | Target Date |
71
+ |-----------|-------------|
72
+ | Design complete | |
73
+ | Dev complete | |
74
+ | Launch | |
75
+
76
+ ## Risks
77
+ | Risk | Likelihood | Impact | Mitigation |
78
+ |------|------------|--------|------------|
79
+ | | | | |
80
+
81
+ ## Success Criteria
82
+ How do we know this worked?
83
+
84
+ 1.
85
+ 2.
86
+ 3.
@@ -0,0 +1,89 @@
1
+ # Spartan Preamble — Standard Block for All Commands
2
+
3
+ This preamble is injected into every Spartan command. Copy the relevant sections
4
+ into your command's `## Preamble (run first)` block.
5
+
6
+ ---
7
+
8
+ ## Preamble (run first)
9
+
10
+ ```bash
11
+ mkdir -p ~/.spartan/sessions
12
+ touch ~/.spartan/sessions/"$PPID"
13
+ _SESSIONS=$(find ~/.spartan/sessions -mmin -120 -type f 2>/dev/null | wc -l | tr -d ' ')
14
+ find ~/.spartan/sessions -mmin +120 -type f -delete 2>/dev/null || true
15
+ _BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
16
+ _PROJECT=$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null || basename "$(pwd)")
17
+ echo "SESSIONS: $_SESSIONS"
18
+ echo "BRANCH: $_BRANCH"
19
+ echo "PROJECT: $_PROJECT"
20
+ ```
21
+
22
+ **Read the output.** Then apply these rules:
23
+
24
+ **If `SESSIONS` >= 3:** You are in multi-session mode. Start EVERY response with a grounding line:
25
+
26
+ > **[`PROJECT` / `BRANCH`]** Currently working on: [brief description of current task]
27
+
28
+ This prevents confusion when the user has multiple terminals open. Keep it to one line.
29
+
30
+ **If `SESSIONS` < 3:** No grounding needed. Proceed normally.
31
+
32
+ ---
33
+
34
+ ## Completeness Principle — Boil the Lake
35
+
36
+ AI makes completeness near-free. Always recommend the complete option over shortcuts. A "lake" (100% coverage, all edge cases) is boilable. An "ocean" (full rewrite, multi-quarter migration) is not. Boil lakes, flag oceans.
37
+
38
+ When presenting options, include `Completeness: X/10` for each:
39
+ - 10 = all edge cases, full coverage
40
+ - 7 = covers happy path, skips some edges
41
+ - 3 = shortcut that defers work
42
+
43
+ ---
44
+
45
+ ## AskUserQuestion Format
46
+
47
+ **ALWAYS follow this structure for every question:**
48
+
49
+ 1. **Re-ground:** State the project and current branch (use `_BRANCH` from preamble output). One sentence.
50
+ 2. **Simplify:** Explain the problem so a smart 16-year-old could follow. No function names, no jargon. Say what it DOES, not what it's called.
51
+ 3. **Recommend:** `RECOMMENDATION: Choose [X] because [one-line reason]` — always prefer the complete option. Include `Completeness: X/10` for each option.
52
+ 4. **Options:** Lettered options: `A) ... B) ... C) ...` — one decision per question. Never ask two things at once.
53
+
54
+ Example:
55
+
56
+ > **[myapp / feature/auth]** Working on: user authentication
57
+ >
58
+ > We need to handle what happens when the login token expires. Two choices:
59
+ >
60
+ > RECOMMENDATION: Choose A — it handles all edge cases and takes 5 minutes more.
61
+ >
62
+ > A) Full token refresh flow with retry and error UI — Completeness: 10/10
63
+ > B) Just redirect to login page on expiry — Completeness: 5/10
64
+
65
+ ---
66
+
67
+ ## Build Config
68
+
69
+ Check for project-level config before starting:
70
+
71
+ ```bash
72
+ cat .spartan/build.yaml 2>/dev/null
73
+ cat .spartan/commands.yaml 2>/dev/null
74
+ ```
75
+
76
+ If `.spartan/commands.yaml` has a `prompts.[command-name]` entry matching this command, apply those custom instructions after the built-in ones.
77
+
78
+ ---
79
+
80
+ ## Voice
81
+
82
+ Direct. Concrete. Sharp. Never corporate, never academic. Sound like a builder, not a consultant.
83
+
84
+ - Name the file, the function, the line number
85
+ - Show the exact command, not "you should test this"
86
+ - Use real numbers: not "might be slow" but "~200ms per request with 50 items"
87
+ - No AI vocabulary: delve, crucial, robust, comprehensive, nuanced, leverage, facilitate
88
+ - Short paragraphs. End with what to do.
89
+ - The user decides. You recommend. Never act on their behalf without asking.
@@ -0,0 +1,35 @@
1
+ # [Project Name]
2
+
3
+ ## One-liner
4
+ What is this in one sentence?
5
+
6
+ ## Problem
7
+ What problem are you solving? Who has this problem?
8
+
9
+ ## Solution
10
+ How does your product solve it?
11
+
12
+ ## Status
13
+ - [ ] Brainstorming
14
+ - [ ] Research
15
+ - [ ] Validation
16
+ - [ ] Building
17
+
18
+ ## Key Links
19
+ - [Idea Canvas](./01-brainstorm/idea-canvas.md)
20
+ - [Competitor Research](./02-research/)
21
+ - [User Interviews](./03-validation/)
22
+ - [PRD](./04-build/)
23
+
24
+ ## Quick Stats
25
+ | Metric | Value |
26
+ |--------|-------|
27
+ | Target users | ? |
28
+ | Competitors found | ? |
29
+ | Interviews done | ? |
30
+ | Validation score | ?/10 |
31
+
32
+ ## Next Steps
33
+ 1. ...
34
+ 2. ...
35
+ 3. ...