@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.
- package/.claude-plugin/marketplace.json +16 -0
- package/.claude-plugin/plugin.json +12 -0
- package/README.md +439 -0
- package/VERSION +1 -0
- package/agents/design-critic.md +127 -0
- package/agents/idea-killer.md +72 -0
- package/agents/infrastructure-expert.md +49 -0
- package/agents/micronaut-backend-expert.md +45 -0
- package/agents/phase-reviewer.md +150 -0
- package/agents/research-planner.md +70 -0
- package/agents/solution-architect-cto.md +49 -0
- package/agents/sre-architect.md +49 -0
- package/agents/team-coordinator.md +111 -0
- package/bin/cli.js +780 -0
- package/claude-md/00-header.md +39 -0
- package/claude-md/01-core.md +105 -0
- package/claude-md/05-database.md +20 -0
- package/claude-md/11-backend-micronaut.md +19 -0
- package/claude-md/20-frontend-react.md +44 -0
- package/claude-md/25-ux-design.md +56 -0
- package/claude-md/30-infrastructure.md +24 -0
- package/claude-md/30-project-mgmt.md +119 -0
- package/claude-md/40-product.md +39 -0
- package/claude-md/50-ops.md +34 -0
- package/claude-md/60-research.md +27 -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/build.md +435 -0
- package/commands/spartan/careful.md +94 -0
- package/commands/spartan/commit-message.md +112 -0
- package/commands/spartan/content.md +17 -0
- package/commands/spartan/context-save.md +161 -0
- package/commands/spartan/contribute.md +140 -0
- package/commands/spartan/daily.md +42 -0
- package/commands/spartan/debug.md +308 -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/epic.md +199 -0
- package/commands/spartan/fe-review.md +181 -0
- package/commands/spartan/figma-to-code.md +260 -0
- package/commands/spartan/forensics.md +46 -0
- package/commands/spartan/freeze.md +84 -0
- package/commands/spartan/fundraise.md +53 -0
- package/commands/spartan/gate-review.md +229 -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/init-rules.md +298 -0
- package/commands/spartan/interview.md +154 -0
- package/commands/spartan/kickoff.md +73 -0
- package/commands/spartan/kotlin-service.md +109 -0
- package/commands/spartan/lean-canvas.md +222 -0
- package/commands/spartan/lint-rules.md +122 -0
- package/commands/spartan/map-codebase.md +124 -0
- package/commands/spartan/migration.md +82 -0
- package/commands/spartan/next-app.md +317 -0
- package/commands/spartan/next-feature.md +212 -0
- package/commands/spartan/onboard.md +326 -0
- package/commands/spartan/outreach.md +16 -0
- package/commands/spartan/phase.md +142 -0
- package/commands/spartan/pitch.md +18 -0
- package/commands/spartan/plan.md +210 -0
- package/commands/spartan/pr-ready.md +202 -0
- package/commands/spartan/project.md +106 -0
- package/commands/spartan/qa.md +222 -0
- package/commands/spartan/research.md +254 -0
- package/commands/spartan/review.md +132 -0
- package/commands/spartan/scan-rules.md +173 -0
- package/commands/spartan/sessions.md +143 -0
- package/commands/spartan/spec.md +131 -0
- package/commands/spartan/startup.md +257 -0
- package/commands/spartan/team.md +570 -0
- package/commands/spartan/teardown.md +161 -0
- package/commands/spartan/testcontainer.md +97 -0
- package/commands/spartan/tf-cost.md +123 -0
- package/commands/spartan/tf-deploy.md +116 -0
- package/commands/spartan/tf-drift.md +100 -0
- package/commands/spartan/tf-import.md +107 -0
- package/commands/spartan/tf-module.md +121 -0
- package/commands/spartan/tf-plan.md +100 -0
- package/commands/spartan/tf-review.md +106 -0
- package/commands/spartan/tf-scaffold.md +109 -0
- package/commands/spartan/tf-security.md +147 -0
- package/commands/spartan/think.md +221 -0
- package/commands/spartan/unfreeze.md +13 -0
- package/commands/spartan/update.md +134 -0
- package/commands/spartan/ux.md +1233 -0
- package/commands/spartan/validate.md +193 -0
- package/commands/spartan/web-to-prd.md +706 -0
- package/commands/spartan/workstreams.md +109 -0
- package/commands/spartan/write.md +16 -0
- package/commands/spartan.md +386 -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 +197 -0
- package/lib/assembler.test.js +159 -0
- package/lib/detector.js +166 -0
- package/lib/detector.test.js +221 -0
- package/lib/packs.js +16 -0
- package/lib/resolver.js +272 -0
- package/lib/resolver.test.js +298 -0
- package/lib/worktree.sh +104 -0
- package/package.json +50 -0
- package/packs/backend-micronaut.yaml +35 -0
- package/packs/backend-nodejs.yaml +15 -0
- package/packs/backend-python.yaml +15 -0
- package/packs/core.yaml +37 -0
- package/packs/database.yaml +21 -0
- package/packs/frontend-react.yaml +24 -0
- package/packs/infrastructure.yaml +40 -0
- package/packs/ops.yaml +16 -0
- package/packs/packs.compiled.json +371 -0
- package/packs/product.yaml +22 -0
- package/packs/project-mgmt.yaml +24 -0
- package/packs/research.yaml +39 -0
- package/packs/shared-backend.yaml +14 -0
- package/packs/ux-design.yaml +21 -0
- package/rules/backend-micronaut/API_DESIGN.md +313 -0
- package/rules/backend-micronaut/BATCH_PROCESSING.md +92 -0
- package/rules/backend-micronaut/CONTROLLERS.md +388 -0
- package/rules/backend-micronaut/KOTLIN.md +414 -0
- package/rules/backend-micronaut/RETROFIT_PLACEMENT.md +290 -0
- package/rules/backend-micronaut/SERVICES_AND_BEANS.md +325 -0
- package/rules/core/NAMING_CONVENTIONS.md +208 -0
- package/rules/core/SKILL_AUTHORING.md +174 -0
- package/rules/core/TIMEZONE.md +316 -0
- package/rules/database/ORM_AND_REPO.md +289 -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/infrastructure/MODULES.md +260 -0
- package/rules/infrastructure/NAMING.md +196 -0
- package/rules/infrastructure/PROVIDERS.md +309 -0
- package/rules/infrastructure/SECURITY.md +310 -0
- package/rules/infrastructure/STATE_AND_BACKEND.md +237 -0
- package/rules/infrastructure/STRUCTURE.md +234 -0
- package/rules/infrastructure/VARIABLES.md +285 -0
- package/rules/shared-backend/ARCHITECTURE.md +46 -0
- package/rules/ux-design/DESIGN_PROCESS.md +176 -0
- package/skills/api-endpoint-creator/SKILL.md +455 -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 +109 -0
- package/skills/article-writing/examples.md +59 -0
- package/skills/backend-api-design/SKILL.md +84 -0
- package/skills/backend-api-design/code-patterns.md +138 -0
- package/skills/brainstorm/SKILL.md +95 -0
- package/skills/browser-qa/SKILL.md +87 -0
- package/skills/browser-qa/playwright-snippets.md +110 -0
- package/skills/ci-cd-patterns/SKILL.md +108 -0
- package/skills/ci-cd-patterns/workflows.md +149 -0
- package/skills/competitive-teardown/SKILL.md +93 -0
- package/skills/competitive-teardown/example-analysis.md +50 -0
- package/skills/content-engine/SKILL.md +131 -0
- package/skills/content-engine/examples.md +72 -0
- package/skills/database-patterns/SKILL.md +72 -0
- package/skills/database-patterns/code-templates.md +114 -0
- package/skills/database-table-creator/SKILL.md +141 -0
- package/skills/database-table-creator/examples.md +552 -0
- package/skills/database-table-creator/kotlin-templates.md +400 -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 +80 -0
- package/skills/design-intelligence/SKILL.md +268 -0
- package/skills/design-workflow/SKILL.md +127 -0
- package/skills/design-workflow/checklists.md +45 -0
- package/skills/idea-validation/SKILL.md +129 -0
- package/skills/idea-validation/example-report.md +50 -0
- package/skills/investor-materials/SKILL.md +122 -0
- package/skills/investor-materials/example-outline.md +70 -0
- package/skills/investor-outreach/SKILL.md +112 -0
- package/skills/investor-outreach/examples.md +76 -0
- package/skills/kotlin-best-practices/SKILL.md +58 -0
- package/skills/kotlin-best-practices/code-patterns.md +132 -0
- package/skills/market-research/SKILL.md +99 -0
- package/skills/security-checklist/SKILL.md +65 -0
- package/skills/security-checklist/audit-reference.md +95 -0
- package/skills/service-debugging/SKILL.md +116 -0
- package/skills/service-debugging/common-issues.md +65 -0
- package/skills/startup-pipeline/SKILL.md +152 -0
- package/skills/terraform-best-practices/SKILL.md +244 -0
- package/skills/terraform-module-creator/SKILL.md +284 -0
- package/skills/terraform-review/SKILL.md +222 -0
- package/skills/terraform-security-audit/SKILL.md +280 -0
- package/skills/terraform-service-scaffold/SKILL.md +574 -0
- package/skills/testing-strategies/SKILL.md +116 -0
- package/skills/testing-strategies/examples.md +103 -0
- package/skills/testing-strategies/integration-test-setup.md +71 -0
- package/skills/ui-ux-pro-max/SKILL.md +238 -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/python-setup.md +146 -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/skills/web-to-prd/SKILL.md +478 -0
- package/templates/build-config.yaml +44 -0
- package/templates/commands-config.yaml +55 -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/design-config.md +105 -0
- package/templates/design-doc.md +207 -0
- package/templates/epic.md +100 -0
- package/templates/feature-spec.md +181 -0
- package/templates/idea-canvas.md +47 -0
- package/templates/implementation-plan.md +159 -0
- package/templates/prd-template.md +86 -0
- package/templates/preamble.md +89 -0
- package/templates/project-readme.md +35 -0
- package/templates/quality-gates.md +230 -0
- package/templates/spartan-config.yaml +164 -0
- package/templates/user-interview.md +69 -0
- package/templates/validation-checklist.md +108 -0
- package/templates/workflow-backend-micronaut.md +409 -0
- package/templates/workflow-frontend-react.md +233 -0
|
@@ -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,122 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spartan:lint-rules
|
|
3
|
+
description: Validate your .spartan/config.yaml and rule files — check format, paths, and completeness
|
|
4
|
+
argument-hint: ""
|
|
5
|
+
preamble-tier: 2
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Lint Rules
|
|
9
|
+
|
|
10
|
+
You are a **config validator**. You check that `.spartan/config.yaml` and its rule files are valid and ready for the reviewer.
|
|
11
|
+
|
|
12
|
+
This is a quick check — should finish in seconds. Don't read full file contents, just check existence and basic format.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Step 1: Find config
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
ls .spartan/config.yaml 2>/dev/null
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
If the file doesn't exist:
|
|
23
|
+
|
|
24
|
+
> No config found. Run `/spartan:init-rules` to create one.
|
|
25
|
+
|
|
26
|
+
Stop here.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Step 2: Validate config format
|
|
31
|
+
|
|
32
|
+
Read `.spartan/config.yaml` and check:
|
|
33
|
+
|
|
34
|
+
| Check | What to look for |
|
|
35
|
+
|-------|-----------------|
|
|
36
|
+
| Valid YAML | No syntax errors, file parses correctly |
|
|
37
|
+
| `stack` field | Must exist (e.g., `kotlin-micronaut`, `react-nextjs`, `custom`) |
|
|
38
|
+
| `rules` section | Must have at least one group: `shared`, `backend`, or `frontend` |
|
|
39
|
+
| `file-types` section | Should map extensions to modes |
|
|
40
|
+
| `review-stages` section | Should have at least one stage |
|
|
41
|
+
| `extends` + overrides | If `rules-add`, `rules-remove`, or `rules-override` is set, `extends` must also be set |
|
|
42
|
+
| No duplicate rule paths | Same path shouldn't appear twice in any group |
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Step 3: Validate rule files
|
|
47
|
+
|
|
48
|
+
For each rule path listed in the config:
|
|
49
|
+
|
|
50
|
+
1. **Does the file exist?** Check in order:
|
|
51
|
+
- Project root (relative path)
|
|
52
|
+
- `.claude/` directory
|
|
53
|
+
- `~/.claude/` (global)
|
|
54
|
+
2. **Is it a `.md` file?**
|
|
55
|
+
3. **Does it have a `#` title on the first non-empty line?**
|
|
56
|
+
4. **Is it non-empty?**
|
|
57
|
+
5. **Does it have code examples?** (Look for triple-backtick blocks. Recommended but not required.)
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Step 4: Check review stages
|
|
62
|
+
|
|
63
|
+
- Are all stage names non-empty strings?
|
|
64
|
+
- Is at least one stage `enabled: true`?
|
|
65
|
+
- Are there duplicate stage names?
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Step 5: Check build commands
|
|
70
|
+
|
|
71
|
+
If `commands.test.backend` or `commands.test.frontend` is set:
|
|
72
|
+
- Does it look like a real command? (not empty string, not just whitespace)
|
|
73
|
+
- Same check for `commands.build.*` and `commands.lint.*`
|
|
74
|
+
|
|
75
|
+
Don't run the commands — just check they're not blank if defined.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Step 6: Report
|
|
80
|
+
|
|
81
|
+
Print the report using this format:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
Checking .spartan/config.yaml...
|
|
85
|
+
|
|
86
|
+
Config format:
|
|
87
|
+
✅ Valid YAML
|
|
88
|
+
✅ Stack: go-standard
|
|
89
|
+
✅ Architecture: clean
|
|
90
|
+
✅ 5 backend rules, 0 frontend rules, 1 shared rule
|
|
91
|
+
|
|
92
|
+
Rule files:
|
|
93
|
+
✅ rules/go/ERROR_HANDLING.md — found, valid
|
|
94
|
+
✅ rules/go/INTERFACES.md — found, valid
|
|
95
|
+
❌ rules/go/CONCURRENCY.md — file not found (create it or remove from config)
|
|
96
|
+
⚠️ rules/go/TESTING.md — no code examples (recommended)
|
|
97
|
+
|
|
98
|
+
Review stages:
|
|
99
|
+
✅ 7 stages configured, all enabled
|
|
100
|
+
|
|
101
|
+
Commands:
|
|
102
|
+
✅ test: go test ./...
|
|
103
|
+
✅ build: go build ./...
|
|
104
|
+
✅ lint: golangci-lint run
|
|
105
|
+
|
|
106
|
+
Result: {N} errors, {M} warnings
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**If errors exist:**
|
|
110
|
+
> Fix the errors above. The reviewer can't read missing rule files.
|
|
111
|
+
|
|
112
|
+
**If clean:**
|
|
113
|
+
> All good. Your rules are ready for `/spartan:build` and `/spartan:review`.
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Rules for this command
|
|
118
|
+
|
|
119
|
+
- **Fast**: This is a lint check. Don't read full rule file contents — just check existence, first line, and look for backtick blocks.
|
|
120
|
+
- **Helpful on errors**: For missing files, say "create it or remove from config." Don't just say "not found."
|
|
121
|
+
- **No changes**: This command only reports. It doesn't fix anything. Tell the user what to fix.
|
|
122
|
+
- **Preamble-tier 2**: Light context. No heavy scanning needed.
|
|
@@ -0,0 +1,124 @@
|
|
|
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
|
+
### Agent Teams boost (if enabled)
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
echo "${CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS:-not_set}"
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**If Agent Teams is enabled**, use a coordinated mapping team (NOT sub-agents):
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
TeamCreate(team_name: "map-{project-slug}", description: "Deep codebase analysis")
|
|
55
|
+
|
|
56
|
+
TaskCreate(subject: "Map tech stack + integrations", description: "Write STACK.md + INTEGRATIONS.md to .planning/codebase/")
|
|
57
|
+
TaskCreate(subject: "Map architecture + structure", description: "Write ARCHITECTURE.md + STRUCTURE.md to .planning/codebase/")
|
|
58
|
+
TaskCreate(subject: "Map conventions + testing", description: "Write CONVENTIONS.md + TESTING.md to .planning/codebase/")
|
|
59
|
+
TaskCreate(subject: "Map concerns", description: "Write CONCERNS.md to .planning/codebase/")
|
|
60
|
+
|
|
61
|
+
Agent(
|
|
62
|
+
team_name: "map-{project-slug}",
|
|
63
|
+
name: "tech-mapper",
|
|
64
|
+
subagent_type: "Explore",
|
|
65
|
+
prompt: "Write STACK.md and INTEGRATIONS.md to .planning/codebase/.
|
|
66
|
+
Include file paths in backticks. Check TaskList, claim your task.
|
|
67
|
+
If you find security concerns, message concerns-mapper via SendMessage."
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
Agent(
|
|
71
|
+
team_name: "map-{project-slug}",
|
|
72
|
+
name: "arch-mapper",
|
|
73
|
+
subagent_type: "Explore",
|
|
74
|
+
prompt: "Write ARCHITECTURE.md and STRUCTURE.md to .planning/codebase/.
|
|
75
|
+
Trace data flow end-to-end. Check TaskList, claim your task."
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
Agent(
|
|
79
|
+
team_name: "map-{project-slug}",
|
|
80
|
+
name: "quality-mapper",
|
|
81
|
+
subagent_type: "Explore",
|
|
82
|
+
prompt: "Write CONVENTIONS.md and TESTING.md to .planning/codebase/.
|
|
83
|
+
Find patterns, code style, test coverage. Check TaskList, claim your task."
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
Agent(
|
|
87
|
+
team_name: "map-{project-slug}",
|
|
88
|
+
name: "concerns-mapper",
|
|
89
|
+
subagent_type: "Explore",
|
|
90
|
+
prompt: "Write CONCERNS.md to .planning/codebase/.
|
|
91
|
+
Find tech debt, bugs, security risks, fragile areas. Check TaskList, claim your task."
|
|
92
|
+
)
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
After all teammates complete, verify 7 documents exist and are non-empty, then `TeamDelete()`.
|
|
96
|
+
|
|
97
|
+
**If Agent Teams is NOT enabled**, delegate to GSD:
|
|
98
|
+
|
|
99
|
+
**Run this command now:**
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
/gsd:map-codebase {{ args[0] }}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
GSD will:
|
|
106
|
+
1. Check for existing maps in `.planning/codebase/` (offer refresh/skip if found)
|
|
107
|
+
2. Spawn 4 parallel mapper agents (tech, arch, quality, concerns)
|
|
108
|
+
3. Each agent writes documents directly to `.planning/codebase/`
|
|
109
|
+
4. Verify all 7 documents exist and are non-empty
|
|
110
|
+
5. Scan for accidentally leaked secrets
|
|
111
|
+
6. Commit results
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## After Mapping
|
|
116
|
+
|
|
117
|
+
Once mapping is complete, suggest next steps based on context:
|
|
118
|
+
|
|
119
|
+
- **Starting a new project?** → `/spartan:project new` (map feeds into roadmap creation)
|
|
120
|
+
- **Planning a phase?** → `/spartan:phase plan N` (agents read codebase docs automatically)
|
|
121
|
+
- **Major refactoring?** → `/spartan:spec "refactor description"` → `/spartan:build` (informed by CONCERNS.md)
|
|
122
|
+
- **Team onboarding?** → Share `.planning/codebase/` docs with new team members
|
|
123
|
+
|
|
124
|
+
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/database/SCHEMA.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
|
+
```
|