@c0x12c/spartan-ai-toolkit 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +16 -0
- package/.claude-plugin/plugin.json +12 -0
- package/README.md +300 -0
- package/VERSION +1 -0
- package/agents/idea-killer.md +72 -0
- package/agents/micronaut-backend-expert.md +45 -0
- package/agents/research-planner.md +70 -0
- package/agents/solution-architect-cto.md +49 -0
- package/bin/cli.js +589 -0
- package/claude-md/00-header.md +39 -0
- package/claude-md/01-core.md +94 -0
- package/claude-md/05-database.md +20 -0
- package/claude-md/11-backend-micronaut.md +36 -0
- package/claude-md/20-frontend-react.md +23 -0
- package/claude-md/30-project-mgmt.md +91 -0
- package/claude-md/40-product.md +36 -0
- package/claude-md/50-ops.md +34 -0
- package/claude-md/60-research.md +75 -0
- package/claude-md/90-footer.md +21 -0
- package/commands/spartan/brainstorm.md +134 -0
- package/commands/spartan/brownfield.md +157 -0
- package/commands/spartan/careful.md +94 -0
- package/commands/spartan/content.md +17 -0
- package/commands/spartan/context-save.md +161 -0
- package/commands/spartan/daily.md +42 -0
- package/commands/spartan/debug.md +156 -0
- package/commands/spartan/deep-dive.md +55 -0
- package/commands/spartan/deploy.md +207 -0
- package/commands/spartan/e2e.md +264 -0
- package/commands/spartan/env-setup.md +166 -0
- package/commands/spartan/fe-review.md +134 -0
- package/commands/spartan/figma-to-code.md +244 -0
- package/commands/spartan/forensics.md +46 -0
- package/commands/spartan/freeze.md +84 -0
- package/commands/spartan/full-run.md +78 -0
- package/commands/spartan/fundraise.md +53 -0
- package/commands/spartan/gsd-upgrade.md +376 -0
- package/commands/spartan/guard.md +42 -0
- package/commands/spartan/init-project.md +178 -0
- package/commands/spartan/interview.md +154 -0
- package/commands/spartan/kickoff.md +52 -0
- package/commands/spartan/kotlin-service.md +109 -0
- package/commands/spartan/lean-canvas.md +222 -0
- package/commands/spartan/map-codebase.md +72 -0
- package/commands/spartan/migration.md +82 -0
- package/commands/spartan/next-app.md +317 -0
- package/commands/spartan/next-feature.md +197 -0
- package/commands/spartan/outreach.md +16 -0
- package/commands/spartan/phase.md +119 -0
- package/commands/spartan/pitch.md +18 -0
- package/commands/spartan/pr-ready.md +200 -0
- package/commands/spartan/project.md +106 -0
- package/commands/spartan/quickplan.md +122 -0
- package/commands/spartan/research.md +19 -0
- package/commands/spartan/review.md +102 -0
- package/commands/spartan/teardown.md +161 -0
- package/commands/spartan/testcontainer.md +97 -0
- package/commands/spartan/think.md +221 -0
- package/commands/spartan/unfreeze.md +13 -0
- package/commands/spartan/update.md +81 -0
- package/commands/spartan/validate.md +193 -0
- package/commands/spartan/workstreams.md +109 -0
- package/commands/spartan/write.md +16 -0
- package/commands/spartan.md +222 -0
- package/frameworks/00-framework-comparison-guide.md +317 -0
- package/frameworks/01-lean-canvas.md +196 -0
- package/frameworks/02-design-sprint.md +304 -0
- package/frameworks/03-foundation-sprint.md +337 -0
- package/frameworks/04-business-model-canvas.md +391 -0
- package/frameworks/05-customer-development.md +426 -0
- package/frameworks/06-jobs-to-be-done.md +358 -0
- package/frameworks/07-mom-test.md +392 -0
- package/frameworks/08-value-proposition-canvas.md +488 -0
- package/frameworks/09-javelin-board.md +428 -0
- package/frameworks/10-build-measure-learn.md +467 -0
- package/frameworks/11-mvp-approaches.md +533 -0
- package/frameworks/think-before-build.md +593 -0
- package/lib/assembler.js +52 -0
- package/lib/packs.js +16 -0
- package/lib/resolver.js +144 -0
- package/lib/resolver.test.js +140 -0
- package/package.json +48 -0
- package/packs/backend-micronaut.yaml +34 -0
- package/packs/backend-nodejs.yaml +15 -0
- package/packs/backend-python.yaml +15 -0
- package/packs/core.yaml +25 -0
- package/packs/database.yaml +21 -0
- package/packs/frontend-react.yaml +23 -0
- package/packs/ops.yaml +16 -0
- package/packs/packs.compiled.json +281 -0
- package/packs/product.yaml +20 -0
- package/packs/project-mgmt.yaml +21 -0
- package/packs/research.yaml +39 -0
- package/packs/shared-backend.yaml +14 -0
- package/rules/backend-micronaut/API_DESIGN.md +250 -0
- package/rules/backend-micronaut/CONTROLLERS.md +755 -0
- package/rules/backend-micronaut/KOTLIN.md +483 -0
- package/rules/backend-micronaut/RETROFIT_PLACEMENT.md +258 -0
- package/rules/backend-micronaut/SERVICES_AND_BEANS.md +673 -0
- package/rules/core/NAMING_CONVENTIONS.md +208 -0
- package/rules/database/ORM_AND_REPO.md +393 -0
- package/rules/database/SCHEMA.md +146 -0
- package/rules/database/TRANSACTIONS.md +311 -0
- package/rules/frontend-react/FRONTEND.md +344 -0
- package/rules/shared-backend/ARCHITECTURE.md +46 -0
- package/skills/api-endpoint-creator/SKILL.md +560 -0
- package/skills/api-endpoint-creator/error-handling-guide.md +244 -0
- package/skills/api-endpoint-creator/examples.md +522 -0
- package/skills/api-endpoint-creator/testing-patterns.md +302 -0
- package/skills/article-writing/SKILL.md +95 -0
- package/skills/backend-api-design/SKILL.md +187 -0
- package/skills/brainstorm/SKILL.md +85 -0
- package/skills/competitive-teardown/SKILL.md +105 -0
- package/skills/content-engine/SKILL.md +101 -0
- package/skills/database-patterns/SKILL.md +145 -0
- package/skills/database-table-creator/SKILL.md +588 -0
- package/skills/database-table-creator/examples.md +552 -0
- package/skills/database-table-creator/migration-template.sql +68 -0
- package/skills/database-table-creator/validation-checklist.md +337 -0
- package/skills/deep-research/SKILL.md +94 -0
- package/skills/idea-validation/SKILL.md +115 -0
- package/skills/investor-materials/SKILL.md +115 -0
- package/skills/investor-outreach/SKILL.md +98 -0
- package/skills/kotlin-best-practices/SKILL.md +145 -0
- package/skills/market-research/SKILL.md +113 -0
- package/skills/security-checklist/SKILL.md +150 -0
- package/skills/startup-pipeline/SKILL.md +125 -0
- package/skills/testing-strategies/SKILL.md +156 -0
- package/skills/ui-ux-pro-max/SKILL.md +377 -0
- package/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/skills/ui-ux-pro-max/data/colors.csv +97 -0
- package/skills/ui-ux-pro-max/data/icons.csv +101 -0
- package/skills/ui-ux-pro-max/data/landing.csv +31 -0
- package/skills/ui-ux-pro-max/data/products.csv +97 -0
- package/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
- package/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/skills/ui-ux-pro-max/data/styles.csv +68 -0
- package/skills/ui-ux-pro-max/data/typography.csv +58 -0
- package/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/skills/ui-ux-pro-max/scripts/core.py +253 -0
- package/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
- package/skills/ui-ux-pro-max/scripts/search.py +114 -0
- package/templates/competitor-analysis.md +60 -0
- package/templates/content/AGENT_TEMPLATE.md +47 -0
- package/templates/content/COMMAND_TEMPLATE.md +27 -0
- package/templates/content/RULE_TEMPLATE.md +40 -0
- package/templates/content/SKILL_TEMPLATE.md +41 -0
- package/templates/idea-canvas.md +47 -0
- package/templates/prd-template.md +84 -0
- package/templates/project-readme.md +35 -0
- package/templates/user-interview.md +69 -0
- package/templates/validation-checklist.md +108 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spartan:interview
|
|
3
|
+
description: Generate Mom Test interview questions — talk about their life, not your idea
|
|
4
|
+
argument-hint: "[product or feature name]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Interview Script: {{ args[0] | default: "your product" }}
|
|
8
|
+
|
|
9
|
+
You are generating a user interview script based on **The Mom Test** by Rob Fitzpatrick.
|
|
10
|
+
|
|
11
|
+
The core idea: even your mom will lie to you about your startup idea. So don't ask about your idea — ask about their life.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## The Mom Test Rules (ALWAYS enforce these)
|
|
16
|
+
|
|
17
|
+
1. **Talk about their life, not your idea.** Don't pitch. Don't describe what you're building. Ask about what they do today.
|
|
18
|
+
2. **Ask about specifics in the past, not generics or the future.** "Tell me about the last time you..." beats "Would you ever..."
|
|
19
|
+
3. **Talk less, listen more.** If you're talking more than 30% of the time, you're doing it wrong.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Red Flags (print these as warnings in the script)
|
|
24
|
+
|
|
25
|
+
| Red Flag | What It Really Means | What to Do Instead |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| "That sounds great!" | They're being polite | Ask: "When was the last time you had this problem?" |
|
|
28
|
+
| "I would definitely use that" | Future promises are worthless | Ask: "What did you do LAST TIME this happened?" |
|
|
29
|
+
| "Yeah, that's a problem" | Generic agreement, no signal | Ask: "Can you walk me through the last time?" |
|
|
30
|
+
| "I'd pay for that" | Talk is cheap | Ask: "How much do you spend on [current solution] now?" |
|
|
31
|
+
| They change the subject | They don't actually care | Note it. This problem isn't top of mind for them. |
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Generate the Interview Script
|
|
36
|
+
|
|
37
|
+
Based on {{ args[0] }}, generate a ready-to-use script. Ask the user first:
|
|
38
|
+
|
|
39
|
+
> **"In 1-2 sentences, what problem does {{ args[0] }} solve and who has this problem?"**
|
|
40
|
+
|
|
41
|
+
Then generate the full script:
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
### Opening (~2 min)
|
|
46
|
+
|
|
47
|
+
**Goal:** Build rapport. Set the frame. Don't bias them.
|
|
48
|
+
|
|
49
|
+
Script:
|
|
50
|
+
```
|
|
51
|
+
"Thanks for taking the time. I'm trying to understand how people
|
|
52
|
+
deal with [problem area — NOT your solution]. I'm not selling anything.
|
|
53
|
+
I just want to learn about your experience.
|
|
54
|
+
|
|
55
|
+
There are no right or wrong answers. I'm most interested in stories
|
|
56
|
+
about what you actually do day to day."
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**DO NOT** say: "I'm building X and want your feedback." That biases everything.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
### Group 1: Understanding Their World (5 questions)
|
|
64
|
+
|
|
65
|
+
**Goal:** Understand their current workflow. What do they do today?
|
|
66
|
+
|
|
67
|
+
1. "Can you walk me through how you handle [problem area] right now?"
|
|
68
|
+
2. "What does a typical [day/week] look like when you're dealing with this?"
|
|
69
|
+
3. "What tools or processes do you use for this today?"
|
|
70
|
+
4. "What's the most annoying part of how you do this now?"
|
|
71
|
+
5. "If you could wave a magic wand and fix one thing about this, what would it be?"
|
|
72
|
+
|
|
73
|
+
**For each answer:** Follow up with "Can you give me a specific example?" and "When was the last time that happened?"
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
### Group 2: Finding the Pain (4 questions)
|
|
78
|
+
|
|
79
|
+
**Goal:** How bad is the problem? Are they actively trying to fix it?
|
|
80
|
+
|
|
81
|
+
6. "How often does [the problem] come up? Daily? Weekly? Monthly?"
|
|
82
|
+
7. "The last time this happened, what did you do? Walk me through it step by step."
|
|
83
|
+
8. "Have you tried to find a better way to handle this? What did you try?"
|
|
84
|
+
9. "Have you spent any money trying to solve this? How much?"
|
|
85
|
+
|
|
86
|
+
**Key signal:** If they haven't tried to solve it or spent money on it, the pain might not be bad enough.
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
### Group 3: Checking Importance (5 questions)
|
|
91
|
+
|
|
92
|
+
**Goal:** Is this a top-3 problem or just a minor annoyance?
|
|
93
|
+
|
|
94
|
+
10. "Where does this problem rank in your list of headaches? Top 3? Top 10?"
|
|
95
|
+
11. "If this problem disappeared tomorrow, how much would your life change?"
|
|
96
|
+
12. "What other problems compete for your attention and budget right now?"
|
|
97
|
+
13. "Have you ever started fixing this and then stopped? Why?"
|
|
98
|
+
14. "If someone solved this for you, what would that free you up to do?"
|
|
99
|
+
|
|
100
|
+
**Key signal:** If it's not in their top 3, they won't pay for a solution or change their behavior.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
### Closing (~2 min)
|
|
105
|
+
|
|
106
|
+
**Goal:** Get referrals and next steps.
|
|
107
|
+
|
|
108
|
+
Script:
|
|
109
|
+
```
|
|
110
|
+
"This has been really helpful. A couple more quick things:
|
|
111
|
+
|
|
112
|
+
- Is there anything about [problem area] that I should have asked
|
|
113
|
+
but didn't?
|
|
114
|
+
- Do you know 2-3 other people who deal with this same problem?
|
|
115
|
+
I'd love to talk to them too.
|
|
116
|
+
- Would it be okay if I followed up in a few weeks with a quick update?"
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Scoring Rubric
|
|
122
|
+
|
|
123
|
+
After the interview, score the signal strength:
|
|
124
|
+
|
|
125
|
+
| Signal | Score | What It Means |
|
|
126
|
+
|---|---|---|
|
|
127
|
+
| They described the problem with emotion and detail | STRONG | Real pain, they care |
|
|
128
|
+
| They've spent money or significant time trying to solve it | STRONG | Willing to pay |
|
|
129
|
+
| They asked YOU when it would be ready | STRONG | Pull signal — they want this |
|
|
130
|
+
| They offered to introduce you to others with the problem | STRONG | They think this matters |
|
|
131
|
+
| They gave generic answers, no specific stories | WEAK | Problem might not be real for them |
|
|
132
|
+
| They were polite but didn't share any struggles | WEAK | No pain here |
|
|
133
|
+
| They said "cool idea" but had no personal experience | NONE | Wrong person or wrong problem |
|
|
134
|
+
|
|
135
|
+
### After the Interview
|
|
136
|
+
|
|
137
|
+
Count your signals:
|
|
138
|
+
|
|
139
|
+
- **3+ STRONG signals** = This problem is real. Keep digging with more interviews.
|
|
140
|
+
- **1-2 STRONG signals** = Promising but need more data. Interview 3-5 more people.
|
|
141
|
+
- **0 STRONG signals** = Wrong person or wrong problem. Try a different audience or rethink.
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Output
|
|
146
|
+
|
|
147
|
+
Show the user:
|
|
148
|
+
1. The complete interview script (ready to print/copy)
|
|
149
|
+
2. The red flags cheat sheet (keep it visible during the interview)
|
|
150
|
+
3. The scoring rubric (fill in after each interview)
|
|
151
|
+
|
|
152
|
+
**Remind the user:** Talk to at least 5 people before making any decisions. One interview is not enough data.
|
|
153
|
+
|
|
154
|
+
**Next step:** After 5+ interviews, run `/spartan:validate` to score the idea based on what you learned.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spartan:kickoff
|
|
3
|
+
description: "Start a new idea: create project folder, brainstorm, then validate top picks (Stages 1-2)"
|
|
4
|
+
argument-hint: "[theme or problem space]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Kickoff: {{ args[0] | default: "new idea" }}
|
|
8
|
+
|
|
9
|
+
Runs Stage 1 (Brainstorm) and Stage 2 (Validate) back to back.
|
|
10
|
+
Creates the project and gets you to a GO / PASS decision fast.
|
|
11
|
+
|
|
12
|
+
## Steps
|
|
13
|
+
|
|
14
|
+
### Setup
|
|
15
|
+
1. Create project folder: `projects/[idea-name]/` with all stage subfolders
|
|
16
|
+
2. Copy project readme template if available
|
|
17
|
+
|
|
18
|
+
### Stage 1: Brainstorm
|
|
19
|
+
3. Use the `brainstorm` skill
|
|
20
|
+
4. Set the frame: space, target user, limits, goal
|
|
21
|
+
5. Generate 8-15 ideas
|
|
22
|
+
6. Rate each: demand signal, buildability, moat (0-5)
|
|
23
|
+
7. Pick top 3
|
|
24
|
+
8. Save to `01-brainstorm/brainstorm-session-{date}.md`
|
|
25
|
+
|
|
26
|
+
### Gate 1 Check
|
|
27
|
+
9. Show top 3 to user
|
|
28
|
+
10. Ask: "Which ones should I validate? Or brainstorm more?"
|
|
29
|
+
11. Wait for answer before continuing
|
|
30
|
+
|
|
31
|
+
### Stage 2: Validate
|
|
32
|
+
12. Use the `idea-validation` skill
|
|
33
|
+
13. For each picked idea:
|
|
34
|
+
- Problem check (real pain or nice-to-have?)
|
|
35
|
+
- Quick market check
|
|
36
|
+
- Quick competitor check (5 min search)
|
|
37
|
+
- Distribution check
|
|
38
|
+
- Build check
|
|
39
|
+
14. Give verdict: GO / TEST MORE / PASS
|
|
40
|
+
15. Save to `03-validation/validation-{idea-name}-{date}.md`
|
|
41
|
+
|
|
42
|
+
### Gate 2 Check
|
|
43
|
+
16. Show verdicts
|
|
44
|
+
17. If any GO: "Want me to run /spartan:deep-dive on this?"
|
|
45
|
+
18. If all PASS: "These didn't make it. Want to /spartan:brainstorm a different space?"
|
|
46
|
+
19. If TEST MORE: "Here's the cheapest test for each. Try those first."
|
|
47
|
+
|
|
48
|
+
## Rules
|
|
49
|
+
|
|
50
|
+
- Don't rush through gates. Pause and ask.
|
|
51
|
+
- It's fine if nothing passes. That saves months of building the wrong thing.
|
|
52
|
+
- If the user already has a specific idea (not a theme), skip brainstorm and go straight to validate.
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spartan:kotlin-service
|
|
3
|
+
description: Scaffold a new Kotlin Micronaut microservice following Spartan conventions and company rules
|
|
4
|
+
argument-hint: "[service-name] [brief description]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are scaffolding a new Kotlin Micronaut microservice for the Spartan platform.
|
|
8
|
+
|
|
9
|
+
**Before scaffolding, read these company rules:**
|
|
10
|
+
- `rules/project/ARCHITECTURE_RULES.md` — Layered architecture
|
|
11
|
+
- `rules/project/CORE_RULES.md` — Kotlin conventions
|
|
12
|
+
- `rules/project/DATABASE_RULES.md` — Schema standards
|
|
13
|
+
- `rules/project/API_RULES.md` — API design patterns
|
|
14
|
+
|
|
15
|
+
## Service: {{ args[0] }}
|
|
16
|
+
## Purpose: {{ args[1] }}
|
|
17
|
+
|
|
18
|
+
Follow these steps exactly:
|
|
19
|
+
|
|
20
|
+
### 1. Gather Context
|
|
21
|
+
Ask the user:
|
|
22
|
+
- What domain events does this service produce/consume?
|
|
23
|
+
- What external dependencies (DB, Kafka, Redis, HTTP clients)?
|
|
24
|
+
- What are the main domain entities?
|
|
25
|
+
- Any specific SLA requirements?
|
|
26
|
+
|
|
27
|
+
**Auto mode on?** → Infer from service name and description. Default: PostgreSQL, no Kafka, no Redis, standard REST. Proceed to scaffold immediately.
|
|
28
|
+
**Auto mode off?** → Wait for answers before proceeding.
|
|
29
|
+
|
|
30
|
+
### 2. Scaffold Directory Structure
|
|
31
|
+
|
|
32
|
+
Create the following structure under `src/main/kotlin/com/spartan/{{ args[0] }}/`:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
controller/ # @Controller classes, @Secured, @ExecuteOn
|
|
36
|
+
manager/ # Business logic interfaces + implementations (returns Either)
|
|
37
|
+
service/ # External API calls (HTTP clients)
|
|
38
|
+
repository/ # Database access (Exposed ORM)
|
|
39
|
+
model/ # Entities, DTOs, enums, value objects
|
|
40
|
+
config/ # Micronaut configuration classes
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### 3. Create Base Files
|
|
44
|
+
|
|
45
|
+
**build.gradle.kts** — include:
|
|
46
|
+
- io.micronaut:micronaut-http-server-netty
|
|
47
|
+
- org.jetbrains.exposed:exposed-core
|
|
48
|
+
- io.micronaut:micronaut-management
|
|
49
|
+
- kotlinx-coroutines-reactor
|
|
50
|
+
- testcontainers (test scope)
|
|
51
|
+
- kotest or junit5
|
|
52
|
+
|
|
53
|
+
**application.yml** — with:
|
|
54
|
+
- micronaut.application.name
|
|
55
|
+
- management endpoints (`/health`, `/info`)
|
|
56
|
+
- placeholder for datasource (use env vars: `DATASOURCES_DEFAULT_URL`, etc.)
|
|
57
|
+
|
|
58
|
+
**Main Application class**:
|
|
59
|
+
```kotlin
|
|
60
|
+
fun main(args: Array<String>) {
|
|
61
|
+
Micronaut.run(Application::class.java, *args)
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**Base error handling** — use Arrow's Either (per CORE_RULES):
|
|
66
|
+
```kotlin
|
|
67
|
+
// All Manager methods return Either<ClientException, T>
|
|
68
|
+
// NEVER use sealed class Result<T> — use Either instead
|
|
69
|
+
// NEVER throw exceptions for business errors
|
|
70
|
+
|
|
71
|
+
suspend fun findUser(id: UUID): Either<ClientException, UserResponse> {
|
|
72
|
+
val user = userRepository.findById(id)
|
|
73
|
+
?: return UserError.NOT_FOUND.asException().left()
|
|
74
|
+
return user.toResponse().right()
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### 4. Create First Test
|
|
79
|
+
|
|
80
|
+
Create `src/test/kotlin/.../ApplicationContextTest.kt`:
|
|
81
|
+
```kotlin
|
|
82
|
+
@MicronautTest
|
|
83
|
+
class ApplicationContextTest {
|
|
84
|
+
@Test
|
|
85
|
+
fun `application context loads`() { }
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### 5. Create Flyway Migration
|
|
90
|
+
|
|
91
|
+
If PostgreSQL is a dependency:
|
|
92
|
+
- `src/main/resources/db/migration/V1__create_initial_schema.sql`
|
|
93
|
+
- Include base tables for the main domain entities
|
|
94
|
+
|
|
95
|
+
### 6. Docker Compose for local dev
|
|
96
|
+
|
|
97
|
+
Create `docker-compose.yml` with:
|
|
98
|
+
- postgres:16 with healthcheck
|
|
99
|
+
- (if Kafka) confluentinc/cp-kafka with zookeeper
|
|
100
|
+
|
|
101
|
+
### 7. README.md
|
|
102
|
+
|
|
103
|
+
Include:
|
|
104
|
+
- Service description
|
|
105
|
+
- Local setup instructions
|
|
106
|
+
- Environment variables table
|
|
107
|
+
- Key architectural decisions
|
|
108
|
+
|
|
109
|
+
After scaffolding, run the TDD skill to write the first domain test.
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spartan:lean-canvas
|
|
3
|
+
description: Fill out a 9-block Lean Canvas one block at a time — end with your riskiest assumptions
|
|
4
|
+
argument-hint: "[product or idea name]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Lean Canvas: {{ args[0] | default: "your idea" }}
|
|
8
|
+
|
|
9
|
+
You are guiding the user through a **Lean Canvas** — one block at a time. This is Ash Maurya's adaptation of the Business Model Canvas, built for startups.
|
|
10
|
+
|
|
11
|
+
Don't rush through it. Each block matters. Challenge weak answers. Ask follow-up questions.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## How This Works
|
|
16
|
+
|
|
17
|
+
Walk through all 9 blocks in order. For each block:
|
|
18
|
+
1. Explain what it means (one sentence)
|
|
19
|
+
2. Ask the user to fill it in
|
|
20
|
+
3. Challenge weak answers — push for specifics
|
|
21
|
+
4. Move to the next block
|
|
22
|
+
|
|
23
|
+
**Auto mode on?** → Still do each block as a conversation. The user needs to think about each one. Don't just fill it in for them.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Block 1: PROBLEM
|
|
28
|
+
|
|
29
|
+
> What are the top 3 problems your target customer has?
|
|
30
|
+
|
|
31
|
+
Ask the user to list exactly 3 problems. Not 1, not 7 — three.
|
|
32
|
+
|
|
33
|
+
**Push back if:**
|
|
34
|
+
- Problems are too vague ("it's hard to manage things")
|
|
35
|
+
- Problems aren't painful enough ("it would be nice if...")
|
|
36
|
+
- Problems are really solutions in disguise ("they need a dashboard" — that's a solution, what's the problem?)
|
|
37
|
+
|
|
38
|
+
Also ask: **"How do they solve each problem today?"** List the existing alternatives next to each problem.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Block 2: CUSTOMER SEGMENTS
|
|
43
|
+
|
|
44
|
+
> Who has these problems? Be specific.
|
|
45
|
+
|
|
46
|
+
Ask for:
|
|
47
|
+
- **Target customer:** Describe them. Job title, company size, situation.
|
|
48
|
+
- **Early adopters:** Who has this problem the WORST? Who would try your product even if it's rough?
|
|
49
|
+
|
|
50
|
+
**Push back if:**
|
|
51
|
+
- "Everyone" or "all businesses" — that's not a segment
|
|
52
|
+
- Too broad — "developers" has millions of sub-segments
|
|
53
|
+
- No early adopter identified — you need to know who your first 10 users are
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Block 3: UNIQUE VALUE PROPOSITION
|
|
58
|
+
|
|
59
|
+
> Single clear message: why are you different and worth buying?
|
|
60
|
+
|
|
61
|
+
This is the hardest block. The UVP must:
|
|
62
|
+
- Be one sentence
|
|
63
|
+
- A stranger should understand it in 5 seconds
|
|
64
|
+
- Say what you do AND why it matters
|
|
65
|
+
- Not be generic ("best-in-class solution for your needs" — garbage)
|
|
66
|
+
|
|
67
|
+
**Formula:** [End result customer wants] + [specific time period] + [address their objection]
|
|
68
|
+
**Example:** "Get a clean inbox in 5 minutes a day — no rules to set up"
|
|
69
|
+
|
|
70
|
+
Ask the user to write it. Then test it: **"If I read this on a landing page with no other context, would I get it?"**
|
|
71
|
+
|
|
72
|
+
Rewrite together until it passes the 5-second test.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Block 4: SOLUTION
|
|
77
|
+
|
|
78
|
+
> Top 3 features that solve the top 3 problems.
|
|
79
|
+
|
|
80
|
+
Map each solution to a problem from Block 1:
|
|
81
|
+
- Problem 1 → Feature A
|
|
82
|
+
- Problem 2 → Feature B
|
|
83
|
+
- Problem 3 → Feature C
|
|
84
|
+
|
|
85
|
+
**Push back if:**
|
|
86
|
+
- More than 3 features — you're overbuilding v1
|
|
87
|
+
- Features don't clearly map to problems
|
|
88
|
+
- Features are "infrastructure" nobody sees — users care about outcomes, not architecture
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Block 5: CHANNELS
|
|
93
|
+
|
|
94
|
+
> How do you reach your customers?
|
|
95
|
+
|
|
96
|
+
Ask about each stage:
|
|
97
|
+
- **Awareness:** How do they find out you exist? (SEO, ads, word of mouth, content, communities)
|
|
98
|
+
- **Evaluation:** How do they decide to try you? (free trial, demo, reviews, referrals)
|
|
99
|
+
- **Purchase:** How do they buy? (self-serve, sales call, app store)
|
|
100
|
+
|
|
101
|
+
**Push back if:**
|
|
102
|
+
- "We'll go viral" — that's not a channel, that's a wish
|
|
103
|
+
- No specific plan — "social media" means nothing without knowing WHICH platform and WHAT content
|
|
104
|
+
- Only paid channels with no budget — SEO and content take months, ads take money
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Block 6: REVENUE STREAMS
|
|
109
|
+
|
|
110
|
+
> How do you make money?
|
|
111
|
+
|
|
112
|
+
Ask:
|
|
113
|
+
- **Pricing model:** Subscription? One-time? Usage-based? Freemium?
|
|
114
|
+
- **Price point:** What would you charge? What are alternatives charging?
|
|
115
|
+
- **Who pays:** Is the user the buyer, or do they need to convince a boss?
|
|
116
|
+
|
|
117
|
+
**Push back if:**
|
|
118
|
+
- "We'll figure out monetization later" — at least have a theory
|
|
119
|
+
- Price is wildly different from alternatives with no justification
|
|
120
|
+
- Revenue model doesn't match user behavior (charging subscription for something they use once a year)
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Block 7: COST STRUCTURE
|
|
125
|
+
|
|
126
|
+
> What does it cost to run this business?
|
|
127
|
+
|
|
128
|
+
Ask about:
|
|
129
|
+
- **Fixed costs:** Hosting, salaries, tools, subscriptions
|
|
130
|
+
- **Variable costs:** Per-user costs, API calls, support
|
|
131
|
+
- **What's most expensive?** Usually it's time (your time building it)
|
|
132
|
+
|
|
133
|
+
Keep it simple. Ballpark numbers are fine at this stage.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Block 8: KEY METRICS
|
|
138
|
+
|
|
139
|
+
> What numbers tell you it's working?
|
|
140
|
+
|
|
141
|
+
Use the **AARRR framework** (Pirate Metrics):
|
|
142
|
+
|
|
143
|
+
| Metric | Question | Your Number |
|
|
144
|
+
|---|---|---|
|
|
145
|
+
| **Acquisition** | How many people visit/sign up? | |
|
|
146
|
+
| **Activation** | How many have a good first experience? | |
|
|
147
|
+
| **Retention** | How many come back? | |
|
|
148
|
+
| **Revenue** | How many pay? | |
|
|
149
|
+
| **Referral** | How many invite others? | |
|
|
150
|
+
|
|
151
|
+
**Push back if:**
|
|
152
|
+
- Only tracking vanity metrics (page views, followers)
|
|
153
|
+
- No retention metric — retention is the most important one
|
|
154
|
+
- Too many metrics — pick 1-2 per stage that matter most
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Block 9: UNFAIR ADVANTAGE
|
|
159
|
+
|
|
160
|
+
> What can't be easily copied or bought?
|
|
161
|
+
|
|
162
|
+
Real unfair advantages:
|
|
163
|
+
- Personal authority / reputation in the space
|
|
164
|
+
- Network effects (product gets better with more users)
|
|
165
|
+
- Community / audience you already have
|
|
166
|
+
- Proprietary data or technology
|
|
167
|
+
- Domain expertise from years in the industry
|
|
168
|
+
- Existing relationships with target customers
|
|
169
|
+
|
|
170
|
+
**"Nothing" is an honest answer.** Most startups don't have an unfair advantage yet. That's okay — acknowledge it and figure out how to build one over time.
|
|
171
|
+
|
|
172
|
+
**Push back if:**
|
|
173
|
+
- "Our technology" — code can be copied
|
|
174
|
+
- "First mover" — rarely lasts
|
|
175
|
+
- "Our team" — teams change
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Complete Canvas
|
|
180
|
+
|
|
181
|
+
After all 9 blocks, show the complete canvas in a formatted table:
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
## Lean Canvas: [product name]
|
|
185
|
+
|
|
186
|
+
| PROBLEM | SOLUTION | UVP |
|
|
187
|
+
| 1. | 1. | |
|
|
188
|
+
| 2. | 2. | |
|
|
189
|
+
| 3. | 3. | |
|
|
190
|
+
| | | |
|
|
191
|
+
| Existing alternatives| KEY METRICS | UNFAIR ADVANTAGE |
|
|
192
|
+
| - | | |
|
|
193
|
+
| - | | |
|
|
194
|
+
| | | |
|
|
195
|
+
| CHANNELS | CUSTOMER SEGMENTS | |
|
|
196
|
+
| - | Target: | |
|
|
197
|
+
| - | Early adopter: | |
|
|
198
|
+
| | | |
|
|
199
|
+
| COST STRUCTURE | REVENUE STREAMS | |
|
|
200
|
+
| - | Model: | |
|
|
201
|
+
| - | Price: | |
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Top 3 Riskiest Assumptions
|
|
207
|
+
|
|
208
|
+
After showing the canvas, identify the 3 riskiest assumptions. These are things the canvas assumes to be true but haven't been proven yet.
|
|
209
|
+
|
|
210
|
+
For each one:
|
|
211
|
+
1. **The assumption:** What are we assuming?
|
|
212
|
+
2. **Why it's risky:** What happens if it's wrong?
|
|
213
|
+
3. **How to test it:** The cheapest, fastest experiment to validate or kill it
|
|
214
|
+
|
|
215
|
+
**Example:**
|
|
216
|
+
- **Assumption:** "Freelancers will pay $20/month for this"
|
|
217
|
+
- **Risk:** Maybe they use free tools and won't pay
|
|
218
|
+
- **Test:** Put up a landing page with a "Buy" button. See if anyone clicks. Run for 2 weeks.
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
**Next step:** Validate your riskiest assumption first. Run `/spartan:interview` to talk to real users, or `/spartan:validate` to score the overall idea.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spartan:map-codebase
|
|
3
|
+
description: Deep codebase analysis with parallel agents. Produces 7 structured documents covering stack, architecture, conventions, testing, integrations, and concerns. Use before major refactoring, milestone planning, or team onboarding.
|
|
4
|
+
argument-hint: "[optional: focus area e.g. 'auth' or 'api']"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Map Codebase: {{ args[0] | default: "full analysis" }}
|
|
8
|
+
|
|
9
|
+
You are performing a **deep codebase analysis** using parallel mapper agents. This produces structured documentation that feeds into GSD planning and execution.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## When to Use This vs /spartan:brownfield
|
|
14
|
+
|
|
15
|
+
| Command | Purpose | Output | Depth |
|
|
16
|
+
|---------|---------|--------|-------|
|
|
17
|
+
| `/spartan:brownfield` | Quick onboarding overview | 1 file: CONTEXT-MAP.md | Surface-level, 10 min |
|
|
18
|
+
| `/spartan:map-codebase` | Deep technical analysis | 7 files in .planning/codebase/ | Thorough, 4 parallel agents |
|
|
19
|
+
|
|
20
|
+
**Use brownfield** when joining a project for the first time and need a quick overview.
|
|
21
|
+
**Use map-codebase** when preparing for major work: refactoring, new milestone, architecture review, or team onboarding docs.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## What Gets Produced
|
|
26
|
+
|
|
27
|
+
7 documents in `.planning/codebase/`:
|
|
28
|
+
|
|
29
|
+
| Document | Focus | What It Captures |
|
|
30
|
+
|----------|-------|-----------------|
|
|
31
|
+
| `STACK.md` | Tech | Languages, frameworks, dependencies, build tools, runtime |
|
|
32
|
+
| `INTEGRATIONS.md` | Tech | External APIs, databases, auth providers, webhooks, env vars |
|
|
33
|
+
| `ARCHITECTURE.md` | Architecture | Patterns, layers, data flow, entry points, error handling |
|
|
34
|
+
| `STRUCTURE.md` | Architecture | Directory layout, key file locations, where to add new code |
|
|
35
|
+
| `CONVENTIONS.md` | Quality | Code style, naming patterns, import organization, formatting |
|
|
36
|
+
| `TESTING.md` | Quality | Test framework, patterns, coverage, mocking, fixtures |
|
|
37
|
+
| `CONCERNS.md` | Concerns | Tech debt, known bugs, security risks, fragile areas, scaling limits |
|
|
38
|
+
|
|
39
|
+
All documents include **file paths in backticks** so Claude can navigate directly to relevant code during planning and execution.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Execution
|
|
44
|
+
|
|
45
|
+
Delegate to GSD's map-codebase workflow:
|
|
46
|
+
|
|
47
|
+
**Run this command now:**
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
/gsd:map-codebase {{ args[0] }}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
GSD will:
|
|
54
|
+
1. Check for existing maps in `.planning/codebase/` (offer refresh/skip if found)
|
|
55
|
+
2. Spawn 4 parallel mapper agents (tech, arch, quality, concerns)
|
|
56
|
+
3. Each agent writes documents directly to `.planning/codebase/`
|
|
57
|
+
4. Verify all 7 documents exist and are non-empty
|
|
58
|
+
5. Scan for accidentally leaked secrets
|
|
59
|
+
6. Commit results
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## After Mapping
|
|
64
|
+
|
|
65
|
+
Once mapping is complete, suggest next steps based on context:
|
|
66
|
+
|
|
67
|
+
- **Starting a new project?** → `/spartan:project new` (map feeds into roadmap creation)
|
|
68
|
+
- **Planning a phase?** → `/spartan:phase plan N` (agents read codebase docs automatically)
|
|
69
|
+
- **Major refactoring?** → `/spartan:quickplan "refactor description"` (informed by CONCERNS.md)
|
|
70
|
+
- **Team onboarding?** → Share `.planning/codebase/` docs with new team members
|
|
71
|
+
|
|
72
|
+
The codebase map is consumed automatically by GSD planning and execution agents — no manual wiring needed.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spartan:migration
|
|
3
|
+
description: Create a database migration script following company DATABASE_RULES (TEXT not VARCHAR, no FK, soft deletes, UUID PKs)
|
|
4
|
+
argument-hint: "[description of the migration]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Create a migration for: {{ args[0] }}
|
|
8
|
+
|
|
9
|
+
**Before creating, read:** `rules/project/DATABASE_RULES.md`
|
|
10
|
+
|
|
11
|
+
## Hard Rules (from DATABASE_RULES)
|
|
12
|
+
- **TEXT not VARCHAR** — always
|
|
13
|
+
- **No REFERENCES / foreign keys** — handle at application level
|
|
14
|
+
- **No CASCADE** — handle deletions in application
|
|
15
|
+
- **UUID primary keys** — `gen_random_uuid()`
|
|
16
|
+
- **Soft delete** — `deleted_at TIMESTAMP`, never hard delete
|
|
17
|
+
- **Standard columns** on every table: `id`, `created_at`, `updated_at`, `deleted_at`
|
|
18
|
+
|
|
19
|
+
## Steps
|
|
20
|
+
|
|
21
|
+
1. **Find the next migration version**:
|
|
22
|
+
```bash
|
|
23
|
+
ls src/main/resources/db/migration/ | sort | tail -5
|
|
24
|
+
```
|
|
25
|
+
Use the next version number (e.g., if last is V7, create V8).
|
|
26
|
+
|
|
27
|
+
2. **Create the migration file**:
|
|
28
|
+
Path: `src/main/resources/db/migration/V{N}__{snake_case_description}.sql`
|
|
29
|
+
|
|
30
|
+
3. **Template for new table**:
|
|
31
|
+
```sql
|
|
32
|
+
-- Migration: {{ args[0] }}
|
|
33
|
+
-- Reason: [explain business need]
|
|
34
|
+
|
|
35
|
+
CREATE TABLE IF NOT EXISTS table_name (
|
|
36
|
+
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
37
|
+
-- business columns here (always TEXT, never VARCHAR)
|
|
38
|
+
name TEXT NOT NULL,
|
|
39
|
+
status TEXT NOT NULL DEFAULT 'active',
|
|
40
|
+
description TEXT,
|
|
41
|
+
-- NO REFERENCES / FOREIGN KEYS — handle at application level
|
|
42
|
+
-- standard columns (required on ALL tables)
|
|
43
|
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
44
|
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
45
|
+
deleted_at TIMESTAMP
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
CREATE INDEX idx_table_name_column ON table_name(column);
|
|
49
|
+
CREATE INDEX idx_table_name_deleted_at ON table_name(deleted_at);
|
|
50
|
+
|
|
51
|
+
-- Auto-update updated_at trigger
|
|
52
|
+
CREATE OR REPLACE FUNCTION update_updated_at_column()
|
|
53
|
+
RETURNS TRIGGER AS $$
|
|
54
|
+
BEGIN NEW.updated_at = CURRENT_TIMESTAMP; RETURN NEW; END;
|
|
55
|
+
$$ language 'plpgsql';
|
|
56
|
+
|
|
57
|
+
CREATE TRIGGER update_table_name_updated_at
|
|
58
|
+
BEFORE UPDATE ON table_name
|
|
59
|
+
FOR EACH ROW EXECUTE FUNCTION update_updated_at_column();
|
|
60
|
+
|
|
61
|
+
-- To rollback:
|
|
62
|
+
-- DROP TABLE IF EXISTS table_name;
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
4. **Template for ALTER TABLE**:
|
|
66
|
+
```sql
|
|
67
|
+
-- Migration: {{ args[0] }}
|
|
68
|
+
|
|
69
|
+
ALTER TABLE existing_table
|
|
70
|
+
ADD COLUMN IF NOT EXISTS new_column TEXT,
|
|
71
|
+
ADD COLUMN IF NOT EXISTS another_col BOOLEAN NOT NULL DEFAULT false;
|
|
72
|
+
|
|
73
|
+
-- To rollback:
|
|
74
|
+
-- ALTER TABLE existing_table DROP COLUMN IF EXISTS new_column;
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
5. **After creating, also generate Exposed Table object** using `/database-table-creator` skill if this is a new table.
|
|
78
|
+
|
|
79
|
+
After creating, verify:
|
|
80
|
+
```bash
|
|
81
|
+
./gradlew flywayValidate
|
|
82
|
+
```
|