@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,281 @@
|
|
|
1
|
+
{
|
|
2
|
+
"PACKS": {
|
|
3
|
+
"core": {
|
|
4
|
+
"description": "Core workflow (always installed)",
|
|
5
|
+
"category": "Core",
|
|
6
|
+
"priority": 0,
|
|
7
|
+
"hidden": false,
|
|
8
|
+
"comingSoon": false,
|
|
9
|
+
"depends": [],
|
|
10
|
+
"commands": [
|
|
11
|
+
"quickplan",
|
|
12
|
+
"daily",
|
|
13
|
+
"context-save",
|
|
14
|
+
"update",
|
|
15
|
+
"debug",
|
|
16
|
+
"pr-ready",
|
|
17
|
+
"init-project",
|
|
18
|
+
"careful",
|
|
19
|
+
"freeze",
|
|
20
|
+
"unfreeze",
|
|
21
|
+
"guard"
|
|
22
|
+
],
|
|
23
|
+
"rules": [
|
|
24
|
+
"core/NAMING_CONVENTIONS.md"
|
|
25
|
+
],
|
|
26
|
+
"skills": [],
|
|
27
|
+
"agents": [],
|
|
28
|
+
"claudeSections": []
|
|
29
|
+
},
|
|
30
|
+
"database": {
|
|
31
|
+
"description": "Database patterns, migrations, Exposed ORM",
|
|
32
|
+
"category": "Backend",
|
|
33
|
+
"priority": 5,
|
|
34
|
+
"hidden": true,
|
|
35
|
+
"comingSoon": false,
|
|
36
|
+
"depends": [],
|
|
37
|
+
"commands": [
|
|
38
|
+
"migration"
|
|
39
|
+
],
|
|
40
|
+
"rules": [
|
|
41
|
+
"database/SCHEMA.md",
|
|
42
|
+
"database/ORM_AND_REPO.md",
|
|
43
|
+
"database/TRANSACTIONS.md"
|
|
44
|
+
],
|
|
45
|
+
"skills": [
|
|
46
|
+
"database-patterns",
|
|
47
|
+
"database-table-creator"
|
|
48
|
+
],
|
|
49
|
+
"agents": [],
|
|
50
|
+
"claudeSections": [
|
|
51
|
+
"05-database.md"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"shared-backend": {
|
|
55
|
+
"description": "Shared backend architecture concepts",
|
|
56
|
+
"category": "Backend",
|
|
57
|
+
"priority": 6,
|
|
58
|
+
"hidden": true,
|
|
59
|
+
"comingSoon": false,
|
|
60
|
+
"depends": [],
|
|
61
|
+
"commands": [],
|
|
62
|
+
"rules": [
|
|
63
|
+
"shared-backend/ARCHITECTURE.md"
|
|
64
|
+
],
|
|
65
|
+
"skills": [],
|
|
66
|
+
"agents": [],
|
|
67
|
+
"claudeSections": []
|
|
68
|
+
},
|
|
69
|
+
"backend-micronaut": {
|
|
70
|
+
"description": "Kotlin + Micronaut backend",
|
|
71
|
+
"category": "Backend",
|
|
72
|
+
"priority": 11,
|
|
73
|
+
"hidden": false,
|
|
74
|
+
"comingSoon": false,
|
|
75
|
+
"depends": [
|
|
76
|
+
"database",
|
|
77
|
+
"shared-backend"
|
|
78
|
+
],
|
|
79
|
+
"commands": [
|
|
80
|
+
"kotlin-service",
|
|
81
|
+
"review",
|
|
82
|
+
"testcontainer"
|
|
83
|
+
],
|
|
84
|
+
"rules": [
|
|
85
|
+
"backend-micronaut/KOTLIN.md",
|
|
86
|
+
"backend-micronaut/CONTROLLERS.md",
|
|
87
|
+
"backend-micronaut/SERVICES_AND_BEANS.md",
|
|
88
|
+
"backend-micronaut/API_DESIGN.md",
|
|
89
|
+
"backend-micronaut/RETROFIT_PLACEMENT.md"
|
|
90
|
+
],
|
|
91
|
+
"skills": [
|
|
92
|
+
"api-endpoint-creator",
|
|
93
|
+
"backend-api-design",
|
|
94
|
+
"kotlin-best-practices",
|
|
95
|
+
"testing-strategies",
|
|
96
|
+
"security-checklist"
|
|
97
|
+
],
|
|
98
|
+
"agents": [
|
|
99
|
+
"micronaut-backend-expert.md",
|
|
100
|
+
"solution-architect-cto.md"
|
|
101
|
+
],
|
|
102
|
+
"claudeSections": [
|
|
103
|
+
"11-backend-micronaut.md"
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
"backend-nodejs": {
|
|
107
|
+
"description": "Node.js backend (coming soon)",
|
|
108
|
+
"category": "Backend",
|
|
109
|
+
"priority": 12,
|
|
110
|
+
"hidden": false,
|
|
111
|
+
"comingSoon": true,
|
|
112
|
+
"depends": [
|
|
113
|
+
"database",
|
|
114
|
+
"shared-backend"
|
|
115
|
+
],
|
|
116
|
+
"commands": [],
|
|
117
|
+
"rules": [],
|
|
118
|
+
"skills": [],
|
|
119
|
+
"agents": [],
|
|
120
|
+
"claudeSections": []
|
|
121
|
+
},
|
|
122
|
+
"backend-python": {
|
|
123
|
+
"description": "Python backend (coming soon)",
|
|
124
|
+
"category": "Backend",
|
|
125
|
+
"priority": 13,
|
|
126
|
+
"hidden": false,
|
|
127
|
+
"comingSoon": true,
|
|
128
|
+
"depends": [
|
|
129
|
+
"database",
|
|
130
|
+
"shared-backend"
|
|
131
|
+
],
|
|
132
|
+
"commands": [],
|
|
133
|
+
"rules": [],
|
|
134
|
+
"skills": [],
|
|
135
|
+
"agents": [],
|
|
136
|
+
"claudeSections": []
|
|
137
|
+
},
|
|
138
|
+
"frontend-react": {
|
|
139
|
+
"description": "React + Next.js frontend",
|
|
140
|
+
"category": "Frontend",
|
|
141
|
+
"priority": 20,
|
|
142
|
+
"hidden": false,
|
|
143
|
+
"comingSoon": false,
|
|
144
|
+
"depends": [],
|
|
145
|
+
"commands": [
|
|
146
|
+
"next-app",
|
|
147
|
+
"next-feature",
|
|
148
|
+
"fe-review",
|
|
149
|
+
"figma-to-code",
|
|
150
|
+
"e2e"
|
|
151
|
+
],
|
|
152
|
+
"rules": [
|
|
153
|
+
"frontend-react/FRONTEND.md"
|
|
154
|
+
],
|
|
155
|
+
"skills": [
|
|
156
|
+
"ui-ux-pro-max"
|
|
157
|
+
],
|
|
158
|
+
"agents": [],
|
|
159
|
+
"claudeSections": [
|
|
160
|
+
"20-frontend-react.md"
|
|
161
|
+
]
|
|
162
|
+
},
|
|
163
|
+
"project-mgmt": {
|
|
164
|
+
"description": "Large multi-day projects (GSD)",
|
|
165
|
+
"category": "Planning",
|
|
166
|
+
"priority": 30,
|
|
167
|
+
"hidden": false,
|
|
168
|
+
"comingSoon": false,
|
|
169
|
+
"depends": [],
|
|
170
|
+
"commands": [
|
|
171
|
+
"project",
|
|
172
|
+
"phase",
|
|
173
|
+
"workstreams",
|
|
174
|
+
"gsd-upgrade",
|
|
175
|
+
"forensics",
|
|
176
|
+
"brownfield",
|
|
177
|
+
"map-codebase"
|
|
178
|
+
],
|
|
179
|
+
"rules": [],
|
|
180
|
+
"skills": [],
|
|
181
|
+
"agents": [],
|
|
182
|
+
"claudeSections": [
|
|
183
|
+
"30-project-mgmt.md"
|
|
184
|
+
]
|
|
185
|
+
},
|
|
186
|
+
"product": {
|
|
187
|
+
"description": "Product thinking before building",
|
|
188
|
+
"category": "Planning",
|
|
189
|
+
"priority": 40,
|
|
190
|
+
"hidden": false,
|
|
191
|
+
"comingSoon": false,
|
|
192
|
+
"depends": [],
|
|
193
|
+
"commands": [
|
|
194
|
+
"think",
|
|
195
|
+
"validate",
|
|
196
|
+
"teardown",
|
|
197
|
+
"interview",
|
|
198
|
+
"lean-canvas",
|
|
199
|
+
"brainstorm"
|
|
200
|
+
],
|
|
201
|
+
"rules": [],
|
|
202
|
+
"skills": [],
|
|
203
|
+
"agents": [],
|
|
204
|
+
"claudeSections": [
|
|
205
|
+
"40-product.md"
|
|
206
|
+
]
|
|
207
|
+
},
|
|
208
|
+
"ops": {
|
|
209
|
+
"description": "Deploy & infrastructure",
|
|
210
|
+
"category": "Ship",
|
|
211
|
+
"priority": 50,
|
|
212
|
+
"hidden": false,
|
|
213
|
+
"comingSoon": false,
|
|
214
|
+
"depends": [],
|
|
215
|
+
"commands": [
|
|
216
|
+
"deploy",
|
|
217
|
+
"env-setup"
|
|
218
|
+
],
|
|
219
|
+
"rules": [],
|
|
220
|
+
"skills": [],
|
|
221
|
+
"agents": [],
|
|
222
|
+
"claudeSections": [
|
|
223
|
+
"50-ops.md"
|
|
224
|
+
]
|
|
225
|
+
},
|
|
226
|
+
"research": {
|
|
227
|
+
"description": "Startup research pipeline — from idea to investor-ready",
|
|
228
|
+
"category": "Research",
|
|
229
|
+
"priority": 60,
|
|
230
|
+
"hidden": false,
|
|
231
|
+
"comingSoon": false,
|
|
232
|
+
"depends": [
|
|
233
|
+
"product"
|
|
234
|
+
],
|
|
235
|
+
"commands": [
|
|
236
|
+
"kickoff",
|
|
237
|
+
"deep-dive",
|
|
238
|
+
"full-run",
|
|
239
|
+
"fundraise",
|
|
240
|
+
"research",
|
|
241
|
+
"pitch",
|
|
242
|
+
"outreach",
|
|
243
|
+
"content",
|
|
244
|
+
"write"
|
|
245
|
+
],
|
|
246
|
+
"rules": [],
|
|
247
|
+
"skills": [
|
|
248
|
+
"brainstorm",
|
|
249
|
+
"idea-validation",
|
|
250
|
+
"market-research",
|
|
251
|
+
"competitive-teardown",
|
|
252
|
+
"deep-research",
|
|
253
|
+
"investor-materials",
|
|
254
|
+
"investor-outreach",
|
|
255
|
+
"article-writing",
|
|
256
|
+
"content-engine",
|
|
257
|
+
"startup-pipeline"
|
|
258
|
+
],
|
|
259
|
+
"agents": [
|
|
260
|
+
"idea-killer.md",
|
|
261
|
+
"research-planner.md"
|
|
262
|
+
],
|
|
263
|
+
"claudeSections": [
|
|
264
|
+
"60-research.md"
|
|
265
|
+
]
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"PACK_ORDER": [
|
|
269
|
+
"core",
|
|
270
|
+
"database",
|
|
271
|
+
"shared-backend",
|
|
272
|
+
"backend-micronaut",
|
|
273
|
+
"backend-nodejs",
|
|
274
|
+
"backend-python",
|
|
275
|
+
"frontend-react",
|
|
276
|
+
"project-mgmt",
|
|
277
|
+
"product",
|
|
278
|
+
"ops",
|
|
279
|
+
"research"
|
|
280
|
+
]
|
|
281
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name: product
|
|
2
|
+
description: "Product thinking before building"
|
|
3
|
+
category: Planning
|
|
4
|
+
priority: 40
|
|
5
|
+
hidden: false
|
|
6
|
+
|
|
7
|
+
commands:
|
|
8
|
+
- think
|
|
9
|
+
- validate
|
|
10
|
+
- teardown
|
|
11
|
+
- interview
|
|
12
|
+
- lean-canvas
|
|
13
|
+
- brainstorm
|
|
14
|
+
|
|
15
|
+
rules: []
|
|
16
|
+
skills: []
|
|
17
|
+
agents: []
|
|
18
|
+
|
|
19
|
+
claude-sections:
|
|
20
|
+
- 40-product.md
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: project-mgmt
|
|
2
|
+
description: "Large multi-day projects (GSD)"
|
|
3
|
+
category: Planning
|
|
4
|
+
priority: 30
|
|
5
|
+
hidden: false
|
|
6
|
+
|
|
7
|
+
commands:
|
|
8
|
+
- project
|
|
9
|
+
- phase
|
|
10
|
+
- workstreams
|
|
11
|
+
- gsd-upgrade
|
|
12
|
+
- forensics
|
|
13
|
+
- brownfield
|
|
14
|
+
- map-codebase
|
|
15
|
+
|
|
16
|
+
rules: []
|
|
17
|
+
skills: []
|
|
18
|
+
agents: []
|
|
19
|
+
|
|
20
|
+
claude-sections:
|
|
21
|
+
- 30-project-mgmt.md
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: research
|
|
2
|
+
description: "Startup research pipeline — from idea to investor-ready"
|
|
3
|
+
category: Research
|
|
4
|
+
priority: 60
|
|
5
|
+
hidden: false
|
|
6
|
+
depends:
|
|
7
|
+
- product
|
|
8
|
+
|
|
9
|
+
commands:
|
|
10
|
+
- kickoff
|
|
11
|
+
- deep-dive
|
|
12
|
+
- full-run
|
|
13
|
+
- fundraise
|
|
14
|
+
- research
|
|
15
|
+
- pitch
|
|
16
|
+
- outreach
|
|
17
|
+
- content
|
|
18
|
+
- write
|
|
19
|
+
|
|
20
|
+
rules: []
|
|
21
|
+
|
|
22
|
+
skills:
|
|
23
|
+
- brainstorm
|
|
24
|
+
- idea-validation
|
|
25
|
+
- market-research
|
|
26
|
+
- competitive-teardown
|
|
27
|
+
- deep-research
|
|
28
|
+
- investor-materials
|
|
29
|
+
- investor-outreach
|
|
30
|
+
- article-writing
|
|
31
|
+
- content-engine
|
|
32
|
+
- startup-pipeline
|
|
33
|
+
|
|
34
|
+
agents:
|
|
35
|
+
- idea-killer.md
|
|
36
|
+
- research-planner.md
|
|
37
|
+
|
|
38
|
+
claude-sections:
|
|
39
|
+
- 60-research.md
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
# API Design Rules
|
|
2
|
+
|
|
3
|
+
> Full guide: use `/backend-api-design` or `/testing-strategies` skill
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## URL Design
|
|
8
|
+
|
|
9
|
+
### NEVER Use Path Parameters
|
|
10
|
+
|
|
11
|
+
**Do NOT use path parameters (e.g., `/{id}`, `/{userId}`). Always use query parameters.**
|
|
12
|
+
|
|
13
|
+
Why:
|
|
14
|
+
- Query parameters are more explicit and self-documenting
|
|
15
|
+
- Easier to add optional parameters without breaking API
|
|
16
|
+
- Consistent pattern across all endpoints
|
|
17
|
+
- Simpler routing configuration
|
|
18
|
+
- Better for caching and logging
|
|
19
|
+
|
|
20
|
+
#### Bad - Path Parameters
|
|
21
|
+
```kotlin
|
|
22
|
+
// DON'T DO THIS
|
|
23
|
+
@Get("/employees/{id}")
|
|
24
|
+
suspend fun getEmployee(@PathVariable id: UUID): EmployeeResponse
|
|
25
|
+
|
|
26
|
+
@Get("/employees/{id}/metrics")
|
|
27
|
+
suspend fun getMetrics(@PathVariable id: UUID): MetricsResponse
|
|
28
|
+
|
|
29
|
+
@Delete("/employees/{id}")
|
|
30
|
+
suspend fun deleteEmployee(@PathVariable id: UUID): Boolean
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
#### Good - Query Parameters
|
|
34
|
+
```kotlin
|
|
35
|
+
// DO THIS
|
|
36
|
+
@Get("/employee")
|
|
37
|
+
suspend fun getEmployee(@QueryValue id: UUID): EmployeeResponse
|
|
38
|
+
|
|
39
|
+
@Get("/employee/metrics")
|
|
40
|
+
suspend fun getMetrics(@QueryValue id: UUID): MetricsResponse
|
|
41
|
+
|
|
42
|
+
@Post("/employee/delete")
|
|
43
|
+
suspend fun deleteEmployee(@QueryValue id: UUID): Boolean
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Endpoint Naming
|
|
47
|
+
|
|
48
|
+
Use singular nouns for single resource, plural for collections:
|
|
49
|
+
|
|
50
|
+
```kotlin
|
|
51
|
+
// Collection endpoints (plural)
|
|
52
|
+
@Get("/employees") // List employees
|
|
53
|
+
@Get("/organizations") // List organizations
|
|
54
|
+
|
|
55
|
+
// Single resource endpoints (singular)
|
|
56
|
+
@Get("/employee") // Get one employee (with ?id=xxx)
|
|
57
|
+
@Get("/organization") // Get one organization (with ?id=xxx)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Use verb sub-paths for actions:
|
|
61
|
+
|
|
62
|
+
```kotlin
|
|
63
|
+
// Actions use sub-paths, not HTTP verbs alone
|
|
64
|
+
@Post("/employee/delete") // Delete employee
|
|
65
|
+
@Post("/employee/restore") // Restore employee
|
|
66
|
+
@Post("/sync/employees") // Trigger employee sync
|
|
67
|
+
@Post("/sync/github") // Trigger GitHub sync
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Controller Organization
|
|
71
|
+
|
|
72
|
+
Group related endpoints under common prefixes:
|
|
73
|
+
|
|
74
|
+
```kotlin
|
|
75
|
+
@Controller("/api/v1/admin")
|
|
76
|
+
class AdminController {
|
|
77
|
+
// Sync operations
|
|
78
|
+
@Post("/sync/employees")
|
|
79
|
+
@Post("/sync/github")
|
|
80
|
+
|
|
81
|
+
// Employee operations
|
|
82
|
+
@Get("/employees")
|
|
83
|
+
@Get("/employee")
|
|
84
|
+
@Get("/employee/metrics")
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Request/Response Patterns
|
|
89
|
+
|
|
90
|
+
Required vs optional query parameters:
|
|
91
|
+
|
|
92
|
+
```kotlin
|
|
93
|
+
// Required parameter - no default, will fail if missing
|
|
94
|
+
@Get("/employee")
|
|
95
|
+
suspend fun getEmployee(
|
|
96
|
+
@QueryValue id: UUID // Required - no ? nullable
|
|
97
|
+
): EmployeeResponse
|
|
98
|
+
|
|
99
|
+
// Optional parameters - nullable with defaults
|
|
100
|
+
@Get("/employees")
|
|
101
|
+
suspend fun listEmployees(
|
|
102
|
+
@QueryValue search: String?, // Optional
|
|
103
|
+
@QueryValue status: String?, // Optional
|
|
104
|
+
@QueryValue page: Int?, // Optional, default in code
|
|
105
|
+
@QueryValue limit: Int? // Optional, default in code
|
|
106
|
+
): EmployeeListResponse {
|
|
107
|
+
val effectivePage = page ?: 1
|
|
108
|
+
val effectiveLimit = limit ?: 20
|
|
109
|
+
// ...
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Consistent pagination pattern:
|
|
114
|
+
|
|
115
|
+
```kotlin
|
|
116
|
+
// Request
|
|
117
|
+
@Get("/employees")
|
|
118
|
+
suspend fun listEmployees(
|
|
119
|
+
@QueryValue page: Int?, // 1-based page number
|
|
120
|
+
@QueryValue limit: Int? // Items per page (max 100)
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
// Response
|
|
124
|
+
data class EmployeeListResponse(
|
|
125
|
+
val items: List<EmployeeResponse>,
|
|
126
|
+
val total: Int,
|
|
127
|
+
val page: Int,
|
|
128
|
+
val limit: Int,
|
|
129
|
+
val hasMore: Boolean
|
|
130
|
+
)
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Quick Reference
|
|
134
|
+
|
|
135
|
+
| Rule | Example |
|
|
136
|
+
|------|---------|
|
|
137
|
+
| No path params | `@Get("/employee")` with `@QueryValue id` |
|
|
138
|
+
| Plural for lists | `@Get("/employees")` |
|
|
139
|
+
| Singular for single | `@Get("/employee")` |
|
|
140
|
+
| Actions as sub-paths | `@Post("/employee/delete")` |
|
|
141
|
+
| Query params for all IDs | `?id=xxx` not `/{id}` |
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Model Location
|
|
146
|
+
|
|
147
|
+
### Rule: All API models live in `module-client` ONLY
|
|
148
|
+
|
|
149
|
+
**NEVER duplicate request or response models across modules.**
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
module-client/src/main/kotlin/com/yourcompany/client/
|
|
153
|
+
├── request/ # API request models
|
|
154
|
+
│ ├── conversation/
|
|
155
|
+
│ ├── message/
|
|
156
|
+
│ └── {domain}/
|
|
157
|
+
└── response/ # API response models
|
|
158
|
+
├── conversation/
|
|
159
|
+
├── message/
|
|
160
|
+
├── attachment/
|
|
161
|
+
└── {domain}/
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### NEVER create request/response models in module-api or module-impl
|
|
165
|
+
|
|
166
|
+
```kotlin
|
|
167
|
+
// WRONG:
|
|
168
|
+
// module-communication/module-api/model/response/ConversationResponse.kt
|
|
169
|
+
package com.yourcompany.communication.model.response
|
|
170
|
+
data class ConversationResponse(...) // DON'T DO THIS
|
|
171
|
+
|
|
172
|
+
// CORRECT:
|
|
173
|
+
// module-client/response/conversation/ConversationResponse.kt
|
|
174
|
+
package com.yourcompany.client.response.conversation
|
|
175
|
+
data class ConversationResponse(...) // PUT IT HERE
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### Import from module-client
|
|
179
|
+
|
|
180
|
+
```kotlin
|
|
181
|
+
// In ConversationManager.kt or any other file
|
|
182
|
+
import com.yourcompany.client.response.conversation.ConversationResponse
|
|
183
|
+
import com.yourcompany.client.request.conversation.CreateConversationRequest
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Add module-client dependency
|
|
187
|
+
|
|
188
|
+
```gradle
|
|
189
|
+
dependencies {
|
|
190
|
+
implementation(project(":module-client"))
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Naming
|
|
195
|
+
|
|
196
|
+
| Type | Pattern | Example |
|
|
197
|
+
|------|---------|---------|
|
|
198
|
+
| Response | `{Entity}Response` | `ConversationResponse` |
|
|
199
|
+
| List response | `{Entity}ListResponse` | `ConversationListResponse` |
|
|
200
|
+
| Item in list | `{Entity}Item` | `ConversationItem` |
|
|
201
|
+
| Brief/summary | `{Entity}Brief` | `ContactBrief` |
|
|
202
|
+
| Request | `{Action}{Entity}Request` | `CreateConversationRequest` |
|
|
203
|
+
|
|
204
|
+
Why this matters:
|
|
205
|
+
- Single source of truth
|
|
206
|
+
- No sync issues between duplicates
|
|
207
|
+
- Clear ownership
|
|
208
|
+
- Easier refactoring
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## Specs Must Include Frontend
|
|
213
|
+
|
|
214
|
+
### Rule: Every spec that touches the UI MUST have a "Frontend Changes" section
|
|
215
|
+
|
|
216
|
+
When writing a spec (`/spec`), if the feature touches anything the user sees, you MUST include:
|
|
217
|
+
|
|
218
|
+
### What to put in the Frontend Changes section
|
|
219
|
+
|
|
220
|
+
1. **Files to change** - List every frontend file that needs edits (components, types, API clients, pages)
|
|
221
|
+
2. **TypeScript type changes** - Show the before/after for any type changes (interfaces, enums)
|
|
222
|
+
3. **Component changes** - Describe what each component gains or loses:
|
|
223
|
+
- New UI elements (inputs, buttons, badges, columns)
|
|
224
|
+
- Where they go in the layout (which card, which section, before/after what)
|
|
225
|
+
- State management (new state? uses existing parent state?)
|
|
226
|
+
4. **API client changes** - New methods on the API client, with function signature
|
|
227
|
+
5. **UI behavior** - How the user interacts with the new stuff:
|
|
228
|
+
- What triggers actions (click, enter key, toggle)
|
|
229
|
+
- Validation (what's rejected, what error shows)
|
|
230
|
+
- Save flow (which button, which API call)
|
|
231
|
+
- Default values for new fields
|
|
232
|
+
|
|
233
|
+
### When does this apply?
|
|
234
|
+
|
|
235
|
+
- New API endpoint that returns data shown in UI
|
|
236
|
+
- Changes to existing API response shape (new fields)
|
|
237
|
+
- New config/settings the admin can change
|
|
238
|
+
- Any feature the user mentioned UI/UX for
|
|
239
|
+
|
|
240
|
+
### When does this NOT apply?
|
|
241
|
+
|
|
242
|
+
- Pure backend changes (scheduler fixes, sync logic, internal refactors)
|
|
243
|
+
- Features with no UI component at all
|
|
244
|
+
|
|
245
|
+
### Why this rule exists
|
|
246
|
+
|
|
247
|
+
Frontend gets forgotten in specs. Then during implementation, the FE work is vague and inconsistent. Specifying FE changes upfront means:
|
|
248
|
+
- The plan phase knows exactly which FE files to touch
|
|
249
|
+
- The implementation team doesn't have to guess UI layout
|
|
250
|
+
- Type changes are designed alongside API changes (no mismatches)
|