mindsystem-cc 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +501 -0
  3. package/agents/ms-codebase-mapper.md +739 -0
  4. package/agents/ms-debugger.md +1184 -0
  5. package/agents/ms-designer.md +414 -0
  6. package/agents/ms-executor.md +760 -0
  7. package/agents/ms-integration-checker.md +423 -0
  8. package/agents/ms-milestone-auditor.md +448 -0
  9. package/agents/ms-mock-generator.md +182 -0
  10. package/agents/ms-plan-checker.md +746 -0
  11. package/agents/ms-research-synthesizer.md +248 -0
  12. package/agents/ms-researcher.md +962 -0
  13. package/agents/ms-roadmapper.md +606 -0
  14. package/agents/ms-verifier.md +779 -0
  15. package/agents/ms-verify-fixer.md +124 -0
  16. package/bin/install.js +296 -0
  17. package/commands/ms/add-phase.md +207 -0
  18. package/commands/ms/add-todo.md +182 -0
  19. package/commands/ms/audit-milestone.md +318 -0
  20. package/commands/ms/check-phase.md +162 -0
  21. package/commands/ms/check-todos.md +217 -0
  22. package/commands/ms/complete-milestone.md +137 -0
  23. package/commands/ms/create-roadmap.md +273 -0
  24. package/commands/ms/debug.md +149 -0
  25. package/commands/ms/define-requirements.md +121 -0
  26. package/commands/ms/design-phase.md +341 -0
  27. package/commands/ms/discuss-milestone.md +48 -0
  28. package/commands/ms/discuss-phase.md +60 -0
  29. package/commands/ms/do-work.md +90 -0
  30. package/commands/ms/execute-phase.md +289 -0
  31. package/commands/ms/help.md +623 -0
  32. package/commands/ms/insert-phase.md +227 -0
  33. package/commands/ms/list-phase-assumptions.md +50 -0
  34. package/commands/ms/map-codebase.md +71 -0
  35. package/commands/ms/new-milestone.md +193 -0
  36. package/commands/ms/new-project.md +338 -0
  37. package/commands/ms/pause-work.md +123 -0
  38. package/commands/ms/plan-milestone-gaps.md +285 -0
  39. package/commands/ms/plan-phase.md +105 -0
  40. package/commands/ms/progress.md +370 -0
  41. package/commands/ms/remove-phase.md +338 -0
  42. package/commands/ms/research-phase.md +175 -0
  43. package/commands/ms/research-project.md +339 -0
  44. package/commands/ms/resume-work.md +40 -0
  45. package/commands/ms/review-design.md +484 -0
  46. package/commands/ms/simplify-flutter.md +193 -0
  47. package/commands/ms/update.md +159 -0
  48. package/commands/ms/verify-work.md +92 -0
  49. package/commands/ms/whats-new.md +124 -0
  50. package/mindsystem/references/checkpoints.md +788 -0
  51. package/mindsystem/references/continuation-format.md +255 -0
  52. package/mindsystem/references/debugging/debugging-mindset.md +11 -0
  53. package/mindsystem/references/debugging/hypothesis-testing.md +11 -0
  54. package/mindsystem/references/debugging/investigation-techniques.md +11 -0
  55. package/mindsystem/references/debugging/verification-patterns.md +11 -0
  56. package/mindsystem/references/debugging/when-to-research.md +11 -0
  57. package/mindsystem/references/git-integration.md +254 -0
  58. package/mindsystem/references/goal-backward.md +286 -0
  59. package/mindsystem/references/mock-patterns.md +294 -0
  60. package/mindsystem/references/plan-format.md +473 -0
  61. package/mindsystem/references/principles.md +73 -0
  62. package/mindsystem/references/questioning.md +140 -0
  63. package/mindsystem/references/research-pitfalls.md +233 -0
  64. package/mindsystem/references/scope-estimation.md +256 -0
  65. package/mindsystem/references/tdd.md +263 -0
  66. package/mindsystem/references/verification-patterns.md +595 -0
  67. package/mindsystem/templates/DEBUG.md +159 -0
  68. package/mindsystem/templates/UAT.md +403 -0
  69. package/mindsystem/templates/adhoc-summary.md +153 -0
  70. package/mindsystem/templates/codebase/architecture.md +255 -0
  71. package/mindsystem/templates/codebase/concerns.md +310 -0
  72. package/mindsystem/templates/codebase/conventions.md +307 -0
  73. package/mindsystem/templates/codebase/integrations.md +280 -0
  74. package/mindsystem/templates/codebase/stack.md +186 -0
  75. package/mindsystem/templates/codebase/structure.md +285 -0
  76. package/mindsystem/templates/codebase/testing.md +480 -0
  77. package/mindsystem/templates/config.json +26 -0
  78. package/mindsystem/templates/context.md +140 -0
  79. package/mindsystem/templates/continue-here.md +78 -0
  80. package/mindsystem/templates/debug-subagent-prompt.md +91 -0
  81. package/mindsystem/templates/design-iteration.md +208 -0
  82. package/mindsystem/templates/design.md +417 -0
  83. package/mindsystem/templates/discovery.md +146 -0
  84. package/mindsystem/templates/milestone-archive.md +123 -0
  85. package/mindsystem/templates/milestone-context.md +93 -0
  86. package/mindsystem/templates/milestone.md +115 -0
  87. package/mindsystem/templates/phase-prompt.md +574 -0
  88. package/mindsystem/templates/project.md +184 -0
  89. package/mindsystem/templates/requirements.md +231 -0
  90. package/mindsystem/templates/research-project/ARCHITECTURE.md +204 -0
  91. package/mindsystem/templates/research-project/FEATURES.md +147 -0
  92. package/mindsystem/templates/research-project/PITFALLS.md +200 -0
  93. package/mindsystem/templates/research-project/STACK.md +120 -0
  94. package/mindsystem/templates/research-project/SUMMARY.md +170 -0
  95. package/mindsystem/templates/research-subagent-prompt.md +92 -0
  96. package/mindsystem/templates/research.md +529 -0
  97. package/mindsystem/templates/roadmap.md +214 -0
  98. package/mindsystem/templates/state.md +224 -0
  99. package/mindsystem/templates/summary.md +269 -0
  100. package/mindsystem/templates/user-setup.md +323 -0
  101. package/mindsystem/templates/verification-report.md +322 -0
  102. package/mindsystem/workflows/complete-milestone.md +759 -0
  103. package/mindsystem/workflows/create-milestone.md +203 -0
  104. package/mindsystem/workflows/debug.md +14 -0
  105. package/mindsystem/workflows/define-requirements.md +330 -0
  106. package/mindsystem/workflows/diagnose-issues.md +241 -0
  107. package/mindsystem/workflows/discovery-phase.md +293 -0
  108. package/mindsystem/workflows/discuss-milestone.md +310 -0
  109. package/mindsystem/workflows/discuss-phase.md +237 -0
  110. package/mindsystem/workflows/do-work.md +359 -0
  111. package/mindsystem/workflows/execute-phase.md +644 -0
  112. package/mindsystem/workflows/execute-plan.md +1828 -0
  113. package/mindsystem/workflows/generate-mocks.md +187 -0
  114. package/mindsystem/workflows/list-phase-assumptions.md +178 -0
  115. package/mindsystem/workflows/map-codebase.md +289 -0
  116. package/mindsystem/workflows/plan-phase.md +876 -0
  117. package/mindsystem/workflows/research-phase.md +17 -0
  118. package/mindsystem/workflows/research-project.md +23 -0
  119. package/mindsystem/workflows/resume-project.md +311 -0
  120. package/mindsystem/workflows/transition.md +564 -0
  121. package/mindsystem/workflows/verify-phase.md +629 -0
  122. package/mindsystem/workflows/verify-work.md +823 -0
  123. package/package.json +32 -0
  124. package/scripts/generate-phase-patch.sh +169 -0
  125. package/scripts/ms-lookup/README.md +112 -0
  126. package/scripts/ms-lookup/ms_lookup/__init__.py +3 -0
  127. package/scripts/ms-lookup/ms_lookup/__main__.py +6 -0
  128. package/scripts/ms-lookup/ms_lookup/backends/__init__.py +6 -0
  129. package/scripts/ms-lookup/ms_lookup/backends/context7.py +219 -0
  130. package/scripts/ms-lookup/ms_lookup/backends/perplexity.py +145 -0
  131. package/scripts/ms-lookup/ms_lookup/cache.py +48 -0
  132. package/scripts/ms-lookup/ms_lookup/cli.py +219 -0
  133. package/scripts/ms-lookup/ms_lookup/config.py +23 -0
  134. package/scripts/ms-lookup/ms_lookup/errors.py +24 -0
  135. package/scripts/ms-lookup/ms_lookup/output.py +49 -0
  136. package/scripts/ms-lookup/ms_lookup/tokens.py +56 -0
  137. package/scripts/ms-lookup/pyproject.toml +17 -0
  138. package/scripts/ms-lookup/uv.lock +207 -0
  139. package/scripts/ms-lookup-wrapper.sh +21 -0
@@ -0,0 +1,473 @@
1
+ <overview>
2
+ Claude-executable plans have a specific format that enables Claude to implement without interpretation. This reference defines what makes a plan executable vs. vague.
3
+
4
+ **Key insight:** PLAN.md IS the executable prompt. It contains everything Claude needs to execute the phase, including objective, context references, tasks, verification, success criteria, and output specification.
5
+ </overview>
6
+
7
+ <core_principle>
8
+ A plan is Claude-executable when Claude can read the PLAN.md and immediately start implementing without asking clarifying questions.
9
+
10
+ If Claude has to guess, interpret, or make assumptions - the task is too vague.
11
+ </core_principle>
12
+
13
+ <frontmatter>
14
+ Every PLAN.md starts with YAML frontmatter:
15
+
16
+ ```yaml
17
+ ---
18
+ phase: XX-name
19
+ plan: NN
20
+ type: execute
21
+ wave: N # Execution wave (1, 2, 3...). Pre-computed at plan time.
22
+ depends_on: [] # Plan IDs this plan requires (e.g., ["01-01"])
23
+ files_modified: [] # Files this plan modifies
24
+ autonomous: true # false if plan has checkpoints
25
+ ---
26
+ ```
27
+
28
+ | Field | Required | Purpose |
29
+ |-------|----------|---------|
30
+ | `phase` | Yes | Phase identifier (e.g., `01-foundation`) |
31
+ | `plan` | Yes | Plan number within phase (e.g., `01`, `02`) |
32
+ | `type` | Yes | `execute` for standard plans, `tdd` for TDD plans |
33
+ | `wave` | Yes | Execution wave number (1, 2, 3...). Pre-computed during planning. |
34
+ | `depends_on` | Yes | Array of plan IDs this plan requires. |
35
+ | `files_modified` | Yes | Files this plan touches. |
36
+ | `autonomous` | Yes | `true` if no checkpoints, `false` if has checkpoints |
37
+
38
+ **Wave is pre-computed:** `/ms:plan-phase` assigns wave numbers based on `depends_on`. `/ms:execute-phase` reads `wave` directly from frontmatter and groups plans by wave number. No runtime dependency analysis needed.
39
+
40
+ **Checkpoint handling:** Plans with `autonomous: false` require user interaction. They run in their assigned wave but pause at checkpoints.
41
+ </frontmatter>
42
+
43
+ <prompt_structure>
44
+ Every PLAN.md follows this XML structure:
45
+
46
+ ```markdown
47
+ ---
48
+ phase: XX-name
49
+ plan: NN
50
+ type: execute
51
+ wave: N
52
+ depends_on: []
53
+ files_modified: [path/to/file.ts]
54
+ autonomous: true
55
+ ---
56
+
57
+ <objective>
58
+ [What and why]
59
+ Purpose: [...]
60
+ Output: [...]
61
+ </objective>
62
+
63
+ <execution_context>
64
+ @~/.claude/mindsystem/workflows/execute-plan.md
65
+ @~/.claude/mindsystem/templates/summary.md
66
+ [If checkpoints exist:]
67
+ @~/.claude/mindsystem/references/checkpoints.md
68
+ </execution_context>
69
+
70
+ <context>
71
+ @.planning/PROJECT.md
72
+ @.planning/ROADMAP.md
73
+ @.planning/STATE.md
74
+ [Only if genuinely needed:]
75
+ @.planning/phases/XX-name/XX-YY-SUMMARY.md
76
+ @relevant/source/files.ts
77
+ </context>
78
+
79
+ <tasks>
80
+ <task type="auto">
81
+ <name>Task N: [Name]</name>
82
+ <files>[paths]</files>
83
+ <action>[what to do, what to avoid and WHY]</action>
84
+ <verify>[command/check]</verify>
85
+ <done>[criteria]</done>
86
+ </task>
87
+
88
+ <task type="checkpoint:human-verify" gate="blocking">
89
+ <what-built>[what Claude automated]</what-built>
90
+ <how-to-verify>[numbered verification steps]</how-to-verify>
91
+ <resume-signal>[how to continue - "approved" or describe issues]</resume-signal>
92
+ </task>
93
+
94
+ <task type="checkpoint:decision" gate="blocking">
95
+ <decision>[what needs deciding]</decision>
96
+ <context>[why this matters]</context>
97
+ <options>
98
+ <option id="option-a"><name>[Name]</name><pros>[pros]</pros><cons>[cons]</cons></option>
99
+ <option id="option-b"><name>[Name]</name><pros>[pros]</pros><cons>[cons]</cons></option>
100
+ </options>
101
+ <resume-signal>[how to indicate choice]</resume-signal>
102
+ </task>
103
+ </tasks>
104
+
105
+ <verification>
106
+ [Overall phase checks]
107
+ </verification>
108
+
109
+ <success_criteria>
110
+ [Measurable completion]
111
+ </success_criteria>
112
+
113
+ <output>
114
+ [SUMMARY.md specification]
115
+ </output>
116
+ ```
117
+
118
+ </prompt_structure>
119
+
120
+ <task_anatomy>
121
+ Every task has four required fields:
122
+
123
+ <field name="files">
124
+ **What it is**: Exact file paths that will be created or modified.
125
+
126
+ **Good**: `src/app/api/auth/login/route.ts`, `prisma/schema.prisma`
127
+ **Bad**: "the auth files", "relevant components"
128
+
129
+ Be specific. If you don't know the file path, figure it out first.
130
+ </field>
131
+
132
+ <field name="action">
133
+ **What it is**: Specific implementation instructions, including what to avoid and WHY.
134
+
135
+ **Good**: "Create POST endpoint that accepts {email, password}, validates using bcrypt against User table, returns JWT in httpOnly cookie with 15-min expiry. Use jose library (not jsonwebtoken - CommonJS issues with Next.js Edge runtime)."
136
+
137
+ **Bad**: "Add authentication", "Make login work"
138
+
139
+ Include: technology choices, data structures, behavior details, pitfalls to avoid.
140
+ </field>
141
+
142
+ <field name="verify">
143
+ **What it is**: How to prove the task is complete.
144
+
145
+ **Good**:
146
+
147
+ - `npm test` passes
148
+ - `curl -X POST /api/auth/login` returns 200 with Set-Cookie header
149
+ - Build completes without errors
150
+
151
+ **Bad**: "It works", "Looks good", "User can log in"
152
+
153
+ Must be executable - a command, a test, an observable behavior.
154
+ </field>
155
+
156
+ <field name="done">
157
+ **What it is**: Acceptance criteria - the measurable state of completion.
158
+
159
+ **Good**: "Valid credentials return 200 + JWT cookie, invalid credentials return 401"
160
+
161
+ **Bad**: "Authentication is complete"
162
+
163
+ Should be testable without subjective judgment.
164
+ </field>
165
+ </task_anatomy>
166
+
167
+ <task_types>
168
+ Tasks have a `type` attribute that determines how they execute:
169
+
170
+ <type name="auto">
171
+ **Default task type** - Claude executes autonomously.
172
+
173
+ **Structure:**
174
+
175
+ ```xml
176
+ <task type="auto">
177
+ <name>Task 3: Create login endpoint with JWT</name>
178
+ <files>src/app/api/auth/login/route.ts</files>
179
+ <action>POST endpoint accepting {email, password}. Query User by email, compare password with bcrypt. On match, create JWT with jose library, set as httpOnly cookie (15-min expiry). Return 200. On mismatch, return 401.</action>
180
+ <verify>curl -X POST localhost:3000/api/auth/login returns 200 with Set-Cookie header</verify>
181
+ <done>Valid credentials → 200 + cookie. Invalid → 401.</done>
182
+ </task>
183
+ ```
184
+
185
+ Use for: Everything Claude can do independently (code, tests, builds, file operations).
186
+ </type>
187
+
188
+ <type name="checkpoint:human-action">
189
+ **RARELY USED** - Only for actions with NO CLI/API. Claude automates everything possible first.
190
+
191
+ **Structure:**
192
+
193
+ ```xml
194
+ <task type="checkpoint:human-action" gate="blocking">
195
+ <action>[Unavoidable manual step - email link, 2FA code]</action>
196
+ <instructions>
197
+ [What Claude already automated]
198
+ [The ONE thing requiring human action]
199
+ </instructions>
200
+ <verification>[What Claude can check afterward]</verification>
201
+ <resume-signal>[How to continue]</resume-signal>
202
+ </task>
203
+ ```
204
+
205
+ Use ONLY for: Email verification links, SMS 2FA codes, manual approvals with no API, 3D Secure payment flows.
206
+
207
+ Do NOT use for: Anything with a CLI (Vercel, Stripe, Upstash, Railway, GitHub), builds, tests, file creation, deployments.
208
+
209
+ **Execution:** Claude automates everything with CLI/API, stops only for truly unavoidable manual steps.
210
+ </type>
211
+
212
+ <type name="checkpoint:human-verify">
213
+ **Human must verify Claude's work** - Visual checks, UX testing.
214
+
215
+ **Structure:**
216
+
217
+ ```xml
218
+ <task type="checkpoint:human-verify" gate="blocking">
219
+ <what-built>Responsive dashboard layout</what-built>
220
+ <how-to-verify>
221
+ 1. Run: npm run dev
222
+ 2. Visit: http://localhost:3000/dashboard
223
+ 3. Desktop (>1024px): Verify sidebar left, content right
224
+ 4. Tablet (768px): Verify sidebar collapses to hamburger
225
+ 5. Mobile (375px): Verify single column, bottom nav
226
+ 6. Check: No layout shift, no horizontal scroll
227
+ </how-to-verify>
228
+ <resume-signal>Type "approved" or describe issues</resume-signal>
229
+ </task>
230
+ ```
231
+
232
+ Use for: UI/UX verification, visual design checks, animation smoothness, accessibility testing.
233
+
234
+ **Execution:** Claude builds the feature, stops, provides testing instructions, waits for approval/feedback.
235
+ </type>
236
+
237
+ <type name="checkpoint:decision">
238
+ **Human must make implementation choice** - Direction-setting decisions.
239
+
240
+ **Structure:**
241
+
242
+ ```xml
243
+ <task type="checkpoint:decision" gate="blocking">
244
+ <decision>Select authentication provider</decision>
245
+ <context>We need user authentication. Three approaches with different tradeoffs:</context>
246
+ <options>
247
+ <option id="supabase">
248
+ <name>Supabase Auth</name>
249
+ <pros>Built-in with Supabase, generous free tier</pros>
250
+ <cons>Less customizable UI, tied to ecosystem</cons>
251
+ </option>
252
+ <option id="clerk">
253
+ <name>Clerk</name>
254
+ <pros>Beautiful pre-built UI, best DX</pros>
255
+ <cons>Paid after 10k MAU</cons>
256
+ </option>
257
+ <option id="nextauth">
258
+ <name>NextAuth.js</name>
259
+ <pros>Free, self-hosted, maximum control</pros>
260
+ <cons>More setup, you manage security</cons>
261
+ </option>
262
+ </options>
263
+ <resume-signal>Select: supabase, clerk, or nextauth</resume-signal>
264
+ </task>
265
+ ```
266
+
267
+ Use for: Technology selection, architecture decisions, design choices, feature prioritization.
268
+
269
+ **Execution:** Claude presents options with balanced pros/cons, waits for decision, proceeds with chosen direction.
270
+ </type>
271
+
272
+ **When to use checkpoints:**
273
+
274
+ - Visual/UX verification (after Claude builds) → `checkpoint:human-verify`
275
+ - Implementation direction choice → `checkpoint:decision`
276
+ - Truly unavoidable manual actions (email links, 2FA) → `checkpoint:human-action` (rare)
277
+
278
+ **When NOT to use checkpoints:**
279
+
280
+ - Anything with CLI/API (Claude automates it) → `type="auto"`
281
+ - Deployments (Vercel, Railway, Fly) → `type="auto"` with CLI
282
+ - Creating resources (Upstash, Stripe, GitHub) → `type="auto"` with CLI/API
283
+ - File operations, tests, builds → `type="auto"`
284
+
285
+ **Golden rule:** If Claude CAN automate it, Claude MUST automate it.
286
+
287
+ **Checkpoint impact on parallelization:**
288
+ - Plans with checkpoints set `autonomous: false` in frontmatter
289
+ - Non-autonomous plans execute after parallel wave or in main context
290
+ - Subagent pauses at checkpoint, returns to orchestrator
291
+ - Orchestrator presents checkpoint to user
292
+ - User responds
293
+ - Orchestrator resumes agent with `resume: agent_id`
294
+
295
+ See `./checkpoints.md` for comprehensive checkpoint guidance.
296
+ </task_types>
297
+
298
+ <tdd_plans>
299
+ **TDD work uses dedicated plans.**
300
+
301
+ TDD features require 2-3 execution cycles (RED → GREEN → REFACTOR), each with file reads, test runs, and potential debugging. This is fundamentally heavier than standard tasks and would consume 50-60% of context if embedded in a multi-task plan.
302
+
303
+ **When to create a TDD plan:**
304
+ - Business logic with defined inputs/outputs
305
+ - API endpoints with request/response contracts
306
+ - Data transformations and parsing
307
+ - Validation rules
308
+ - Algorithms with testable behavior
309
+
310
+ **When to use standard plans (skip TDD):**
311
+ - UI layout and styling
312
+ - Configuration changes
313
+ - Glue code connecting existing components
314
+ - One-off scripts
315
+
316
+ **Heuristic:** Can you write `expect(fn(input)).toBe(output)` before writing `fn`?
317
+ → Yes: Create a TDD plan (one feature per plan)
318
+ → No: Use standard plan, add tests after if needed
319
+
320
+ See `./tdd.md` for TDD plan structure and execution guidance.
321
+ </tdd_plans>
322
+
323
+ <context_references>
324
+ Use @file references to load context for the prompt:
325
+
326
+ ```markdown
327
+ <context>
328
+ @.planning/PROJECT.md # Project vision
329
+ @.planning/ROADMAP.md # Phase structure
330
+ @.planning/STATE.md # Current position
331
+
332
+ # Only include prior SUMMARY if genuinely needed:
333
+ # - This plan imports types from prior plan
334
+ # - Prior plan made decision affecting this plan
335
+ # Independent plans need NO prior SUMMARY references.
336
+
337
+ @src/lib/db.ts # Existing database setup
338
+ @src/types/user.ts # Existing type definitions
339
+ </context>
340
+ ```
341
+
342
+ Reference files that Claude needs to understand before implementing.
343
+
344
+ **Anti-pattern:** Reflexive chaining (02 refs 01, 03 refs 02). Only reference what you actually need.
345
+ </context_references>
346
+
347
+ <verification_section>
348
+ Overall phase verification (beyond individual task verification):
349
+
350
+ ```markdown
351
+ <verification>
352
+ Before declaring phase complete:
353
+ - [ ] `npm run build` succeeds without errors
354
+ - [ ] `npm test` passes all tests
355
+ - [ ] No TypeScript errors
356
+ - [ ] Feature works end-to-end manually
357
+ </verification>
358
+ ```
359
+
360
+ </verification_section>
361
+
362
+ <success_criteria_section>
363
+ Measurable criteria for phase completion:
364
+
365
+ ```markdown
366
+ <success_criteria>
367
+
368
+ - All tasks completed
369
+ - All verification checks pass
370
+ - No errors or warnings introduced
371
+ - JWT auth flow works end-to-end
372
+ - Protected routes redirect unauthenticated users
373
+ </success_criteria>
374
+ ```
375
+
376
+ </success_criteria_section>
377
+
378
+ <output_section>
379
+ Specify the SUMMARY.md structure:
380
+
381
+ ```markdown
382
+ <output>
383
+ After completion, create `.planning/phases/XX-name/{phase}-{plan}-SUMMARY.md`
384
+ </output>
385
+ ```
386
+
387
+ </output_section>
388
+
389
+ <specificity_levels>
390
+ <too_vague>
391
+
392
+ ```xml
393
+ <task type="auto">
394
+ <name>Task 1: Add authentication</name>
395
+ <files>???</files>
396
+ <action>Implement auth</action>
397
+ <verify>???</verify>
398
+ <done>Users can authenticate</done>
399
+ </task>
400
+ ```
401
+
402
+ Claude: "How? What type? What library? Where?"
403
+ </too_vague>
404
+
405
+ <just_right>
406
+
407
+ ```xml
408
+ <task type="auto">
409
+ <name>Task 1: Create login endpoint with JWT</name>
410
+ <files>src/app/api/auth/login/route.ts</files>
411
+ <action>POST endpoint accepting {email, password}. Query User by email, compare password with bcrypt. On match, create JWT with jose library, set as httpOnly cookie (15-min expiry). Return 200. On mismatch, return 401. Use jose instead of jsonwebtoken (CommonJS issues with Edge).</action>
412
+ <verify>curl -X POST localhost:3000/api/auth/login -H "Content-Type: application/json" -d '{"email":"test@test.com","password":"test123"}' returns 200 with Set-Cookie header containing JWT</verify>
413
+ <done>Valid credentials → 200 + cookie. Invalid → 401. Missing fields → 400.</done>
414
+ </task>
415
+ ```
416
+
417
+ Claude can implement this immediately.
418
+ </just_right>
419
+
420
+ <note_on_tdd>
421
+ **TDD candidates get dedicated plans.**
422
+
423
+ If email validation warrants TDD, create a TDD plan for it. See `./tdd.md` for TDD plan structure.
424
+ </note_on_tdd>
425
+
426
+ <too_detailed>
427
+ Writing the actual code in the plan. Trust Claude to implement from clear instructions.
428
+ </too_detailed>
429
+ </specificity_levels>
430
+
431
+ <anti_patterns>
432
+ <vague_actions>
433
+
434
+ - "Set up the infrastructure"
435
+ - "Handle edge cases"
436
+ - "Make it production-ready"
437
+ - "Add proper error handling"
438
+
439
+ These require Claude to decide WHAT to do. Specify it.
440
+ </vague_actions>
441
+
442
+ <unverifiable_completion>
443
+
444
+ - "It works correctly"
445
+ - "User experience is good"
446
+ - "Code is clean"
447
+ - "Tests pass" (which tests? do they exist?)
448
+
449
+ These require subjective judgment. Make it objective.
450
+ </unverifiable_completion>
451
+
452
+ <missing_context>
453
+
454
+ - "Use the standard approach"
455
+ - "Follow best practices"
456
+ - "Like the other endpoints"
457
+
458
+ Claude doesn't know your standards. Be explicit.
459
+ </missing_context>
460
+ </anti_patterns>
461
+
462
+ <sizing_tasks>
463
+ Good task size: 15-60 minutes of Claude work.
464
+
465
+ **Too small**: "Add import statement for bcrypt" (combine with related task)
466
+ **Just right**: "Create login endpoint with JWT validation" (focused, specific)
467
+ **Too big**: "Implement full authentication system" (split into multiple plans)
468
+
469
+ If a task takes multiple sessions, break it down.
470
+ If a task is trivial, combine with related tasks.
471
+
472
+ **Note on scope:** If a phase has >3 tasks or spans multiple subsystems, split into multiple plans using the naming convention `{phase}-{plan}-PLAN.md`. See `./scope-estimation.md` for guidance.
473
+ </sizing_tasks>
@@ -0,0 +1,73 @@
1
+ <principles>
2
+
3
+ Core principles for the GSD planning system.
4
+
5
+ <solo_developer_claude>
6
+
7
+ You are planning for ONE person (the user) and ONE implementer (Claude).
8
+ - No teams, stakeholders, ceremonies, coordination overhead
9
+ - User is the visionary/product owner
10
+ - Claude is the builder
11
+ - Estimate effort in Claude execution time, not human dev time
12
+ </solo_developer_claude>
13
+
14
+ <plans_are_prompts>
15
+
16
+ PLAN.md is not a document that gets transformed into a prompt.
17
+ PLAN.md IS the prompt. It contains:
18
+ - Objective (what and why)
19
+ - Context (@file references)
20
+ - Tasks (with verification criteria)
21
+ - Success criteria (measurable)
22
+
23
+ When planning a phase, you are writing the prompt that will execute it.
24
+ </plans_are_prompts>
25
+
26
+ <scope_control>
27
+
28
+ Plans must complete within reasonable context usage.
29
+
30
+ **Quality degradation curve:**
31
+ - 0-30% context: Peak quality
32
+ - 30-50% context: Good quality
33
+ - 50-70% context: Degrading quality
34
+ - 70%+ context: Poor quality
35
+
36
+ **Solution:** Aggressive atomicity - split into small, focused plans.
37
+ - 2-3 tasks per plan maximum
38
+ - Each plan independently executable
39
+ - Better to have many small plans than few large ones
40
+ </scope_control>
41
+
42
+ <claude_automates>
43
+
44
+ If Claude CAN do it via CLI/API/tool, Claude MUST do it.
45
+
46
+ Checkpoints are for:
47
+ - **Verification** - Human confirms Claude's work (visual, UX)
48
+ - **Decision** - Human makes implementation choice
49
+ </claude_automates>
50
+
51
+ <ship_fast>
52
+
53
+ No enterprise process. No approval gates.
54
+
55
+ Plan → Execute → Ship → Learn → Repeat
56
+
57
+ Milestones mark shipped versions (v1.0 → v1.1 → v2.0).
58
+ </ship_fast>
59
+
60
+ <anti_enterprise>
61
+
62
+ NEVER include:
63
+ - Team structures, RACI matrices
64
+ - Stakeholder management
65
+ - Sprint ceremonies
66
+ - Human dev time estimates (hours, days, weeks—Claude works differently)
67
+ - Change management processes
68
+ - Documentation for documentation's sake
69
+
70
+ If it sounds like corporate PM theater, delete it.
71
+ </anti_enterprise>
72
+
73
+ </principles>
@@ -0,0 +1,140 @@
1
+ <questioning_guide>
2
+
3
+ Project initialization is dream extraction, not requirements gathering. You're helping the user discover and articulate what they want to build. This isn't a contract negotiation — it's collaborative thinking.
4
+
5
+ <philosophy>
6
+
7
+ **You are a thinking partner, not an interviewer.**
8
+
9
+ The user often has a fuzzy idea. Your job is to help them sharpen it. Ask questions that make them think "oh, I hadn't considered that" or "yes, that's exactly what I mean."
10
+
11
+ Don't interrogate. Collaborate. Don't follow a script. Follow the thread.
12
+
13
+ </philosophy>
14
+
15
+ <the_goal>
16
+
17
+ By the end of questioning, you need enough clarity to write a PROJECT.md that downstream phases can act on:
18
+
19
+ - **research-project** needs: what domain to research, what the user already knows, what unknowns exist
20
+ - **create-roadmap** needs: clear enough vision to decompose into phases, what "done" looks like
21
+ - **plan-phase** needs: specific requirements to break into tasks, context for implementation choices
22
+ - **execute-phase** needs: success criteria to verify against, the "why" behind requirements
23
+
24
+ A vague PROJECT.md forces every downstream phase to guess. The cost compounds.
25
+
26
+ </the_goal>
27
+
28
+ <how_to_question>
29
+
30
+ **Start open.** Let them dump their mental model. Don't interrupt with structure.
31
+
32
+ **Follow energy.** Whatever they emphasized, dig into that. What excited them? What problem sparked this?
33
+
34
+ **Challenge vagueness.** Never accept fuzzy answers. "Good" means what? "Users" means who? "Simple" means how?
35
+
36
+ **Make the abstract concrete.** "Walk me through using this." "What does that actually look like?"
37
+
38
+ **Clarify ambiguity.** "When you say Z, do you mean A or B?" "You mentioned X — tell me more."
39
+
40
+ **Know when to stop.** When you understand what they want, why they want it, who it's for, and what done looks like — offer to proceed.
41
+
42
+ </how_to_question>
43
+
44
+ <question_types>
45
+
46
+ Use these as inspiration, not a checklist. Pick what's relevant to the thread.
47
+
48
+ **Motivation — why this exists:**
49
+ - "What prompted this?"
50
+ - "What are you doing today that this replaces?"
51
+ - "What would you do if this existed?"
52
+
53
+ **Concreteness — what it actually is:**
54
+ - "Walk me through using this"
55
+ - "You said X — what does that actually look like?"
56
+ - "Give me an example"
57
+
58
+ **Clarification — what they mean:**
59
+ - "When you say Z, do you mean A or B?"
60
+ - "You mentioned X — tell me more about that"
61
+
62
+ **Success — how you'll know it's working:**
63
+ - "How will you know this is working?"
64
+ - "What does done look like?"
65
+
66
+ </question_types>
67
+
68
+ <using_askuserquestion>
69
+
70
+ Use AskUserQuestion to help users think by presenting concrete options to react to.
71
+
72
+ **Good options:**
73
+ - Interpretations of what they might mean
74
+ - Specific examples to confirm or deny
75
+ - Concrete choices that reveal priorities
76
+
77
+ **Bad options:**
78
+ - Generic categories ("Technical", "Business", "Other")
79
+ - Leading options that presume an answer
80
+ - Too many options (2-4 is ideal)
81
+
82
+ **Example — vague answer:**
83
+ User says "it should be fast"
84
+
85
+ - header: "Fast"
86
+ - question: "Fast how?"
87
+ - options: ["Sub-second response", "Handles large datasets", "Quick to build", "Let me explain"]
88
+
89
+ **Example — following a thread:**
90
+ User mentions "frustrated with current tools"
91
+
92
+ - header: "Frustration"
93
+ - question: "What specifically frustrates you?"
94
+ - options: ["Too many clicks", "Missing features", "Unreliable", "Let me explain"]
95
+
96
+ </using_askuserquestion>
97
+
98
+ <context_checklist>
99
+
100
+ Use this as a **background checklist**, not a conversation structure. Check these mentally as you go. If gaps remain, weave questions naturally.
101
+
102
+ - [ ] What they're building (concrete enough to explain to a stranger)
103
+ - [ ] Why it needs to exist (the problem or desire driving it)
104
+ - [ ] Who it's for (even if just themselves)
105
+ - [ ] What "done" looks like (observable outcomes)
106
+
107
+ Four things. If they volunteer more, capture it.
108
+
109
+ </context_checklist>
110
+
111
+ <decision_gate>
112
+
113
+ When you could write a clear PROJECT.md, offer to proceed:
114
+
115
+ - header: "Ready?"
116
+ - question: "I think I understand what you're after. Ready to create PROJECT.md?"
117
+ - options:
118
+ - "Create PROJECT.md" — Let's move forward
119
+ - "Keep exploring" — I want to share more / ask me more
120
+
121
+ If "Keep exploring" — ask what they want to add or identify gaps and probe naturally.
122
+
123
+ Loop until "Create PROJECT.md" selected.
124
+
125
+ </decision_gate>
126
+
127
+ <anti_patterns>
128
+
129
+ - **Checklist walking** — Going through domains regardless of what they said
130
+ - **Canned questions** — "What's your core value?" "What's out of scope?" regardless of context
131
+ - **Corporate speak** — "What are your success criteria?" "Who are your stakeholders?"
132
+ - **Interrogation** — Firing questions without building on answers
133
+ - **Rushing** — Minimizing questions to get to "the work"
134
+ - **Shallow acceptance** — Taking vague answers without probing
135
+ - **Premature constraints** — Asking about tech stack before understanding the idea
136
+ - **User skills** — NEVER ask about user's technical experience. Claude builds.
137
+
138
+ </anti_patterns>
139
+
140
+ </questioning_guide>