@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,221 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spartan:think
|
|
3
|
+
description: Guided thinking before coding — 6-phase structured process to prevent building the wrong thing
|
|
4
|
+
argument-hint: "[idea or feature description]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Think Before Build: {{ args[0] | default: "new idea" }}
|
|
8
|
+
|
|
9
|
+
You are running a **structured thinking session**. The goal: think through everything BEFORE writing any code.
|
|
10
|
+
|
|
11
|
+
Most rework comes from skipping the thinking phase. This command prevents that.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## First Question
|
|
16
|
+
|
|
17
|
+
Ask the user:
|
|
18
|
+
|
|
19
|
+
> **"Is this a new project (starting from zero) or a new feature (adding to something that exists)?"**
|
|
20
|
+
|
|
21
|
+
- **New project** → Start at Phase 0, then continue through Phase 6
|
|
22
|
+
- **New feature** → Skip Phase 0, start at Phase 1
|
|
23
|
+
|
|
24
|
+
**Auto mode on?** → Still pause between phases. Thinking phases need human input — that's the whole point. Show each phase output, then ask "Ready for the next phase?" before moving on.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Phase 0: PRODUCT + MVP MAP (new projects only, ~20 min)
|
|
29
|
+
|
|
30
|
+
Only run this phase for new projects. Skip to Phase 1 for features.
|
|
31
|
+
|
|
32
|
+
### 0A — Find the Core Loop
|
|
33
|
+
Ask: "What's the one thing a user does repeatedly that makes this product valuable?"
|
|
34
|
+
Write it as: **[User] does [action] to get [result], which makes them [come back because...]**
|
|
35
|
+
|
|
36
|
+
### 0B — Feature Dump
|
|
37
|
+
List every feature you can think of. Don't filter yet. Get it all out.
|
|
38
|
+
|
|
39
|
+
### 0C — Kill Most of Them
|
|
40
|
+
Go through the list. For each feature ask: "Can the core loop work without this?"
|
|
41
|
+
If yes → cut it from v1. Be brutal. v1 should have 3-5 features max.
|
|
42
|
+
|
|
43
|
+
### 0D — Dependency Map
|
|
44
|
+
For the surviving features, draw the build order:
|
|
45
|
+
- What needs to exist before something else can work?
|
|
46
|
+
- What's independent and can be built in parallel?
|
|
47
|
+
|
|
48
|
+
### 0E — Build Order
|
|
49
|
+
Number the features 1-N based on dependencies. Feature 1 = the core loop itself.
|
|
50
|
+
|
|
51
|
+
### 0F — Stack Pick
|
|
52
|
+
Based on what you're building, confirm or pick the tech stack.
|
|
53
|
+
Only discuss stack if the user hasn't decided yet.
|
|
54
|
+
|
|
55
|
+
**Output:** Core loop statement + v1 feature list (max 5) + build order + stack
|
|
56
|
+
|
|
57
|
+
Ask: **"Happy with this MVP scope? Phase 1 will dig into the first feature."**
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Phase 1: DUMP (~5 min)
|
|
62
|
+
|
|
63
|
+
Brain dump using Jobs-to-be-Done (JTBD) framework. Ask the user to fill in:
|
|
64
|
+
|
|
65
|
+
| Question | Answer |
|
|
66
|
+
|---|---|
|
|
67
|
+
| **The job:** When I [situation], I want to [motivation], so I can [outcome] | |
|
|
68
|
+
| **Trigger:** What event makes someone need this RIGHT NOW? | |
|
|
69
|
+
| **Current pain:** How do they solve it today? What sucks about that? | |
|
|
70
|
+
| **Dream state:** If this worked perfectly, what does the user's life look like? | |
|
|
71
|
+
|
|
72
|
+
Help the user write clear answers. Challenge vague ones. "Everyone" is not a user. "It's annoying" is not a pain.
|
|
73
|
+
|
|
74
|
+
**Output:** Filled JTBD table
|
|
75
|
+
|
|
76
|
+
Ask: **"Does this capture the real job? Phase 2 will stress-test it."**
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Phase 2: CHALLENGE (~10 min)
|
|
81
|
+
|
|
82
|
+
Three exercises to pressure-test the idea:
|
|
83
|
+
|
|
84
|
+
### 2A — Pre-mortem
|
|
85
|
+
Pretend it's 6 months later and this feature FAILED. List the 5 most likely reasons it failed.
|
|
86
|
+
Be honest. Common ones: nobody wanted it, too complicated, built the wrong thing, took too long, tech didn't work.
|
|
87
|
+
|
|
88
|
+
### 2B — MoSCoW Sort
|
|
89
|
+
Take everything from Phase 1 and sort into:
|
|
90
|
+
|
|
91
|
+
| Category | Items |
|
|
92
|
+
|---|---|
|
|
93
|
+
| **Must have** (won't work without it) | |
|
|
94
|
+
| **Should have** (important but can ship without) | |
|
|
95
|
+
| **Could have** (nice but won't miss it) | |
|
|
96
|
+
| **Won't have** (explicitly out of scope for v1) | |
|
|
97
|
+
|
|
98
|
+
### 2C — Bar Test
|
|
99
|
+
Write one sentence that explains this feature to a stranger in a bar.
|
|
100
|
+
If you can't do it in one sentence, the scope is too big. Simplify until you can.
|
|
101
|
+
|
|
102
|
+
**Output:** Pre-mortem list + MoSCoW table + bar test sentence
|
|
103
|
+
|
|
104
|
+
Ask: **"Any surprises in the pre-mortem? Phase 3 is the big one — we'll walk through every screen."**
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Phase 3: WALK THROUGH (~15 min)
|
|
109
|
+
|
|
110
|
+
**This is the most important phase.** 80% of rework comes from skipping this.
|
|
111
|
+
|
|
112
|
+
### 3A — Screen State Matrix
|
|
113
|
+
|
|
114
|
+
For every screen/view the user will see, fill out this table:
|
|
115
|
+
|
|
116
|
+
| Screen | State | What User Sees | Actions Available | Edge Cases |
|
|
117
|
+
|---|---|---|---|---|
|
|
118
|
+
| [name] | Empty (no data yet) | | | |
|
|
119
|
+
| [name] | Loading | | | |
|
|
120
|
+
| [name] | Success (happy path) | | | |
|
|
121
|
+
| [name] | Error (something broke) | | | |
|
|
122
|
+
| [name] | Partial (some data, some missing) | | | |
|
|
123
|
+
|
|
124
|
+
Go through EVERY screen. Don't skip any state. The empty state and error state are where most bugs hide.
|
|
125
|
+
|
|
126
|
+
### 3B — Happy Path Narration
|
|
127
|
+
Tell the story of a user doing the main flow from start to finish. Step by step. Click by click.
|
|
128
|
+
"User opens the page. Sees X. Clicks Y. System does Z. User sees W."
|
|
129
|
+
|
|
130
|
+
### 3C — Sad Path Narration
|
|
131
|
+
Now tell the story of everything going wrong:
|
|
132
|
+
- Network fails mid-action
|
|
133
|
+
- User enters garbage data
|
|
134
|
+
- User does things in unexpected order
|
|
135
|
+
- User has no data yet (first time)
|
|
136
|
+
- User has too much data (power user)
|
|
137
|
+
|
|
138
|
+
**Output:** Full screen state matrix + happy path + sad path narrations
|
|
139
|
+
|
|
140
|
+
Ask: **"Did we miss any screens or states? Phase 4 checks the tech side."**
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Phase 4: TECH CHECK (~10 min)
|
|
145
|
+
|
|
146
|
+
Impact map — what does this touch in the codebase?
|
|
147
|
+
|
|
148
|
+
### 4A — New Stuff Needed
|
|
149
|
+
|
|
150
|
+
| Type | Details |
|
|
151
|
+
|---|---|
|
|
152
|
+
| New database tables | |
|
|
153
|
+
| New API endpoints | |
|
|
154
|
+
| New UI components | |
|
|
155
|
+
| New background jobs | |
|
|
156
|
+
| New integrations | |
|
|
157
|
+
|
|
158
|
+
### 4B — Existing Code Impact
|
|
159
|
+
|
|
160
|
+
| Existing Code | What Changes | Risk Level |
|
|
161
|
+
|---|---|---|
|
|
162
|
+
| [file/module] | [what changes] | LOW/MEDIUM/HIGH |
|
|
163
|
+
|
|
164
|
+
### 4C — Reuse Check
|
|
165
|
+
- What existing code can we reuse as-is?
|
|
166
|
+
- What existing code needs changes?
|
|
167
|
+
- Any conflicts with in-progress work?
|
|
168
|
+
- External dependencies or API limits?
|
|
169
|
+
|
|
170
|
+
### 4D — T-shirt Size
|
|
171
|
+
Overall estimate: **S** (< 1 day) / **M** (1-3 days) / **L** (3-7 days) / **XL** (> 1 week)
|
|
172
|
+
|
|
173
|
+
**Output:** Impact tables + reuse list + size estimate
|
|
174
|
+
|
|
175
|
+
Ask: **"Any surprises on the tech side? Phase 5 is the final cut."**
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Phase 5: FINAL CUT (~5 min)
|
|
180
|
+
|
|
181
|
+
### 5A — Confidence Check
|
|
182
|
+
|
|
183
|
+
For each must-have from Phase 2, rate your confidence:
|
|
184
|
+
|
|
185
|
+
| Must-Have | Confidence | Why |
|
|
186
|
+
|---|---|---|
|
|
187
|
+
| [item] | HIGH / MEDIUM / LOW | [reason] |
|
|
188
|
+
|
|
189
|
+
Anything rated LOW → discuss with user. Either find a way to de-risk it, or move it to v2.
|
|
190
|
+
|
|
191
|
+
### 5B — v1 / v2 Split
|
|
192
|
+
|
|
193
|
+
| v1 (build now) | v2 (build later) |
|
|
194
|
+
|---|---|
|
|
195
|
+
| | |
|
|
196
|
+
|
|
197
|
+
### 5C — Regret Test
|
|
198
|
+
Ask: "If we ship v1 without [each v2 item], will users complain loudly?"
|
|
199
|
+
If yes → move it back to v1. If no → it stays in v2.
|
|
200
|
+
|
|
201
|
+
**Output:** Confidence table + v1/v2 split + final scope
|
|
202
|
+
|
|
203
|
+
Ask: **"This is the final scope. Ready to build?"**
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## Phase 6: BUILD
|
|
208
|
+
|
|
209
|
+
Based on the T-shirt size from Phase 4, route to the right build command:
|
|
210
|
+
|
|
211
|
+
- **S (< 1 day):** "Run `/spartan:spec` then `/spartan:build` with this scope to start building."
|
|
212
|
+
- **M-L (1-7 days):** "Run `/spartan:project new` to set up the full project lifecycle."
|
|
213
|
+
- **XL (> 1 week):** "Run `/spartan:project new` — this needs milestones and wave planning."
|
|
214
|
+
|
|
215
|
+
Show the complete thinking output as a summary the user can copy into their planning tool:
|
|
216
|
+
- JTBD statement
|
|
217
|
+
- MoSCoW scope
|
|
218
|
+
- Screen state matrix (key screens only)
|
|
219
|
+
- Impact map
|
|
220
|
+
- v1/v2 split
|
|
221
|
+
- Size estimate + next command to run
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spartan:unfreeze
|
|
3
|
+
description: Remove the directory edit lock set by /spartan:freeze. Claude can edit files anywhere again.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Unfreeze — Directory Lock Removed
|
|
7
|
+
|
|
8
|
+
Freeze mode is now **OFF**. Claude can edit files in any directory.
|
|
9
|
+
|
|
10
|
+
If guard mode was active (`/spartan:guard`), only the freeze portion is removed — careful mode remains active.
|
|
11
|
+
|
|
12
|
+
Claude should acknowledge:
|
|
13
|
+
"🧊 Freeze OFF — tôi có thể edit files ở bất kỳ đâu. Careful mode vẫn {{ 'ON' if careful_active else 'OFF' }}."
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spartan:update
|
|
3
|
+
description: Check for updates and upgrade Spartan AI Toolkit to the latest version. Pulls from GitHub and re-runs the setup script automatically.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Spartan Update
|
|
7
|
+
|
|
8
|
+
Check for new versions and upgrade the toolkit.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Step 1: Read current version and repo path
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
LOCAL_VER=$(cat ~/.claude/.spartan-version 2>/dev/null || echo "unknown")
|
|
16
|
+
REPO_PATH=$(cat ~/.claude/.spartan-repo 2>/dev/null || echo "")
|
|
17
|
+
echo "Current version: $LOCAL_VER"
|
|
18
|
+
echo "Repo path: $REPO_PATH"
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
If `REPO_PATH` is empty or the directory doesn't exist, try to find it:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Common locations
|
|
25
|
+
for dir in ~/ai-toolkit ~/Documents/Code/Spartan/ai-toolkit ~/Code/ai-toolkit; do
|
|
26
|
+
[ -d "$dir/toolkit" ] && echo "Found: $dir" && break
|
|
27
|
+
done
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
If still not found, ask the user: "Where did you clone ai-toolkit?"
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Step 2: Detect default branch and check for updates
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
cd "$REPO_PATH"
|
|
38
|
+
|
|
39
|
+
# Detect the default branch (master or main)
|
|
40
|
+
DEFAULT_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@')
|
|
41
|
+
if [ -z "$DEFAULT_BRANCH" ]; then
|
|
42
|
+
# Fallback: check which branch exists
|
|
43
|
+
git rev-parse --verify origin/master >/dev/null 2>&1 && DEFAULT_BRANCH="master" || DEFAULT_BRANCH="main"
|
|
44
|
+
fi
|
|
45
|
+
echo "Default branch: $DEFAULT_BRANCH"
|
|
46
|
+
|
|
47
|
+
git fetch origin "$DEFAULT_BRANCH" --quiet 2>/dev/null
|
|
48
|
+
REMOTE_VER=$(git show "origin/$DEFAULT_BRANCH:toolkit/VERSION" 2>/dev/null || echo "unknown")
|
|
49
|
+
echo "Local: $LOCAL_VER"
|
|
50
|
+
echo "Remote: $REMOTE_VER"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
If versions match: "You're on the latest version (v$LOCAL_VER). No update needed."
|
|
54
|
+
|
|
55
|
+
If versions differ or either is "unknown": proceed to Step 3.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Step 3: Read current pack selection
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
SAVED_PACKS=$(cat ~/.claude/.spartan-packs 2>/dev/null | tr '\n' ',' | sed 's/,$//')
|
|
63
|
+
echo "Installed packs: $SAVED_PACKS"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Show the user their current packs and ask:
|
|
67
|
+
"You have these packs: $SAVED_PACKS. Want to keep the same packs, or change them?"
|
|
68
|
+
|
|
69
|
+
- Keep same → use `--packs=$SAVED_PACKS` flag
|
|
70
|
+
- Change → run without `--packs` flag (interactive menu)
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Step 4: Pull and reinstall
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
cd "$REPO_PATH" && git pull origin "$DEFAULT_BRANCH"
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Then run the setup script with saved packs:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
cd "$REPO_PATH/toolkit" && ./scripts/setup.sh --global --packs=$SAVED_PACKS
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Or if user wants to change packs:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
cd "$REPO_PATH/toolkit" && ./scripts/setup.sh --global
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Step 4.5: Generate config if missing
|
|
95
|
+
|
|
96
|
+
After the install finishes, check if `.spartan/config.yaml` exists:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
ls .spartan/config.yaml 2>/dev/null || ls ~/.spartan/config.yaml 2>/dev/null
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**If no config exists**, generate one from the installed packs:
|
|
103
|
+
|
|
104
|
+
1. Read the saved packs file:
|
|
105
|
+
```bash
|
|
106
|
+
cat ~/.claude/.spartan-packs 2>/dev/null || cat .claude/.spartan-packs 2>/dev/null
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
2. Pick the matching profile:
|
|
110
|
+
- Has `backend-micronaut` → copy `toolkit/profiles/kotlin-micronaut.yaml`
|
|
111
|
+
- Has `frontend-react` → copy `toolkit/profiles/react-nextjs.yaml`
|
|
112
|
+
- Has `backend-nodejs` → copy `toolkit/profiles/typescript-node.yaml`
|
|
113
|
+
- Has `backend-python` → copy `toolkit/profiles/python-fastapi.yaml`
|
|
114
|
+
- None of the above → copy `toolkit/profiles/custom.yaml`
|
|
115
|
+
|
|
116
|
+
3. Copy the profile:
|
|
117
|
+
```bash
|
|
118
|
+
mkdir -p .spartan 2>/dev/null || mkdir -p ~/.spartan
|
|
119
|
+
cp "$REPO_PATH/toolkit/profiles/{profile}.yaml" .spartan/config.yaml 2>/dev/null || \
|
|
120
|
+
cp "$REPO_PATH/toolkit/profiles/{profile}.yaml" ~/.spartan/config.yaml
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Tell the user: "Generated `.spartan/config.yaml` from {profile} profile. Edit it to customize rules and review stages."
|
|
124
|
+
|
|
125
|
+
**If config already exists**, skip this step.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Step 5: Confirm
|
|
130
|
+
|
|
131
|
+
After setup completes, tell the user:
|
|
132
|
+
"Updated to Spartan v$REMOTE_VER. Restart Claude Code to pick up all changes."
|
|
133
|
+
|
|
134
|
+
**Never suggest `/gsd:*` commands to the user.** Always translate to `/spartan:*`.
|