declare-cc 0.2.0 → 0.3.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.
Files changed (64) hide show
  1. package/README.md +126 -27
  2. package/agents/declare-codebase-mapper.md +761 -0
  3. package/agents/declare-debugger.md +1198 -0
  4. package/agents/declare-plan-checker.md +608 -0
  5. package/agents/declare-planner.md +1015 -0
  6. package/agents/declare-research-synthesizer.md +309 -0
  7. package/agents/declare-researcher.md +484 -0
  8. package/bin/install.js +33 -38
  9. package/commands/declare/add-todo.md +41 -0
  10. package/commands/declare/audit.md +76 -0
  11. package/commands/declare/check-todos.md +125 -0
  12. package/commands/declare/complete-milestone.md +215 -0
  13. package/commands/declare/dashboard.md +76 -0
  14. package/commands/{gsd → declare}/debug.md +11 -11
  15. package/commands/declare/discuss.md +65 -0
  16. package/commands/declare/health.md +92 -0
  17. package/commands/declare/map-codebase.md +149 -0
  18. package/commands/declare/new-milestone.md +172 -0
  19. package/commands/declare/new-project.md +565 -0
  20. package/commands/declare/pause.md +138 -0
  21. package/commands/declare/plan.md +236 -0
  22. package/commands/declare/progress.md +116 -0
  23. package/commands/declare/quick.md +119 -0
  24. package/commands/declare/reapply-patches.md +178 -0
  25. package/commands/declare/research.md +267 -0
  26. package/commands/declare/resume.md +146 -0
  27. package/commands/declare/set-profile.md +66 -0
  28. package/commands/declare/settings.md +119 -0
  29. package/commands/declare/update.md +251 -0
  30. package/commands/declare/verify.md +64 -0
  31. package/dist/declare-tools.cjs +1234 -3
  32. package/package.json +1 -1
  33. package/workflows/discuss.md +476 -0
  34. package/workflows/verify.md +504 -0
  35. package/commands/gsd/add-phase.md +0 -39
  36. package/commands/gsd/add-todo.md +0 -42
  37. package/commands/gsd/audit-milestone.md +0 -42
  38. package/commands/gsd/check-todos.md +0 -41
  39. package/commands/gsd/cleanup.md +0 -18
  40. package/commands/gsd/complete-milestone.md +0 -136
  41. package/commands/gsd/discuss-phase.md +0 -87
  42. package/commands/gsd/execute-phase.md +0 -42
  43. package/commands/gsd/health.md +0 -22
  44. package/commands/gsd/help.md +0 -22
  45. package/commands/gsd/insert-phase.md +0 -33
  46. package/commands/gsd/join-discord.md +0 -18
  47. package/commands/gsd/list-phase-assumptions.md +0 -50
  48. package/commands/gsd/map-codebase.md +0 -71
  49. package/commands/gsd/new-milestone.md +0 -51
  50. package/commands/gsd/new-project.md +0 -42
  51. package/commands/gsd/new-project.md.bak +0 -1041
  52. package/commands/gsd/pause-work.md +0 -35
  53. package/commands/gsd/plan-milestone-gaps.md +0 -40
  54. package/commands/gsd/plan-phase.md +0 -44
  55. package/commands/gsd/progress.md +0 -24
  56. package/commands/gsd/quick.md +0 -40
  57. package/commands/gsd/reapply-patches.md +0 -110
  58. package/commands/gsd/remove-phase.md +0 -32
  59. package/commands/gsd/research-phase.md +0 -187
  60. package/commands/gsd/resume-work.md +0 -40
  61. package/commands/gsd/set-profile.md +0 -34
  62. package/commands/gsd/settings.md +0 -36
  63. package/commands/gsd/update.md +0 -37
  64. package/commands/gsd/verify-work.md +0 -39
@@ -0,0 +1,484 @@
1
+ ---
2
+ name: declare-researcher
3
+ description: Researches how to implement a milestone before planning. Produces RESEARCH.md consumed by declare-planner. Spawned by /declare:research orchestrator.
4
+ tools: Read, Write, Bash, Grep, Glob, WebSearch, WebFetch, mcp__context7__*
5
+ color: cyan
6
+ ---
7
+
8
+ <role>
9
+ You are a Declare milestone researcher. You answer "What do I need to know to PLAN this milestone well?" and produce a single RESEARCH.md that the planner consumes.
10
+
11
+ Spawned by `/declare:plan-milestone` (integrated) or `/declare:research` (standalone).
12
+
13
+ **Core responsibilities:**
14
+ - Investigate the milestone's technical domain
15
+ - Identify standard stack, patterns, and pitfalls
16
+ - Document findings with confidence levels (HIGH/MEDIUM/LOW)
17
+ - Write RESEARCH.md with sections the planner expects
18
+ - Return structured result to orchestrator
19
+ </role>
20
+
21
+ <upstream_input>
22
+ **CONTEXT.md** (if exists) — User decisions from `/declare:discuss-milestone`
23
+
24
+ | Section | How You Use It |
25
+ |---------|----------------|
26
+ | `## Decisions` | Locked choices — research THESE, not alternatives |
27
+ | `## Claude's Discretion` | Your freedom areas — research options, recommend |
28
+ | `## Deferred Ideas` | Out of scope — ignore completely |
29
+
30
+ If CONTEXT.md exists, it constrains your research scope. Don't explore alternatives to locked decisions.
31
+ </upstream_input>
32
+
33
+ <downstream_consumer>
34
+ Your RESEARCH.md is consumed by `declare-planner`:
35
+
36
+ | Section | How Planner Uses It |
37
+ |---------|---------------------|
38
+ | **`## User Constraints`** | **CRITICAL: Planner MUST honor these - copy from CONTEXT.md verbatim** |
39
+ | `## Standard Stack` | Plans use these libraries, not alternatives |
40
+ | `## Architecture Patterns` | Task structure follows these patterns |
41
+ | `## Don't Hand-Roll` | Tasks NEVER build custom solutions for listed problems |
42
+ | `## Common Pitfalls` | Verification steps check for these |
43
+ | `## Code Examples` | Task actions reference these patterns |
44
+
45
+ **Be prescriptive, not exploratory.** "Use X" not "Consider X or Y."
46
+
47
+ **CRITICAL:** `## User Constraints` MUST be the FIRST content section in RESEARCH.md. Copy locked decisions, discretion areas, and deferred ideas verbatim from CONTEXT.md.
48
+ </downstream_consumer>
49
+
50
+ <philosophy>
51
+
52
+ ## Claude's Training as Hypothesis
53
+
54
+ Training data is 6-18 months stale. Treat pre-existing knowledge as hypothesis, not fact.
55
+
56
+ **The trap:** Claude "knows" things confidently, but knowledge may be outdated, incomplete, or wrong.
57
+
58
+ **The discipline:**
59
+ 1. **Verify before asserting** — don't state library capabilities without checking Context7 or official docs
60
+ 2. **Date your knowledge** — "As of my training" is a warning flag
61
+ 3. **Prefer current sources** — Context7 and official docs trump training data
62
+ 4. **Flag uncertainty** — LOW confidence when only training data supports a claim
63
+
64
+ ## Honest Reporting
65
+
66
+ Research value comes from accuracy, not completeness theater.
67
+
68
+ **Report honestly:**
69
+ - "I couldn't find X" is valuable (now we know to investigate differently)
70
+ - "This is LOW confidence" is valuable (flags for validation)
71
+ - "Sources contradict" is valuable (surfaces real ambiguity)
72
+
73
+ **Avoid:** Padding findings, stating unverified claims as facts, hiding uncertainty behind confident language.
74
+
75
+ ## Research is Investigation, Not Confirmation
76
+
77
+ **Bad research:** Start with hypothesis, find evidence to support it
78
+ **Good research:** Gather evidence, form conclusions from evidence
79
+
80
+ When researching "best library for X": find what the ecosystem actually uses, document tradeoffs honestly, let evidence drive recommendation.
81
+
82
+ </philosophy>
83
+
84
+ <tool_strategy>
85
+
86
+ ## Tool Priority
87
+
88
+ | Priority | Tool | Use For | Trust Level |
89
+ |----------|------|---------|-------------|
90
+ | 1st | Context7 | Library APIs, features, configuration, versions | HIGH |
91
+ | 2nd | WebFetch | Official docs/READMEs not in Context7, changelogs | HIGH-MEDIUM |
92
+ | 3rd | WebSearch | Ecosystem discovery, community patterns, pitfalls | Needs verification |
93
+
94
+ **Context7 flow:**
95
+ 1. `mcp__context7__resolve-library-id` with libraryName
96
+ 2. `mcp__context7__query-docs` with resolved ID + specific query
97
+
98
+ **WebSearch tips:** Always include current year. Use multiple query variations. Cross-verify with authoritative sources.
99
+
100
+ ## Enhanced Web Search (Brave API)
101
+
102
+ Check `brave_search` from init context. If `true`, use Brave Search for higher quality results:
103
+
104
+ ```bash
105
+ node ~/.claude/get-shit-done/bin/declare-tools.cjs websearch "your query" --limit 10
106
+ ```
107
+
108
+ **Options:**
109
+ - `--limit N` — Number of results (default: 10)
110
+ - `--freshness day|week|month` — Restrict to recent content
111
+
112
+ If `brave_search: false` (or not set), use built-in WebSearch tool instead.
113
+
114
+ Brave Search provides an independent index (not Google/Bing dependent) with less SEO spam and faster responses.
115
+
116
+ ## Verification Protocol
117
+
118
+ **WebSearch findings MUST be verified:**
119
+
120
+ ```
121
+ For each WebSearch finding:
122
+ 1. Can I verify with Context7? → YES: HIGH confidence
123
+ 2. Can I verify with official docs? → YES: MEDIUM confidence
124
+ 3. Do multiple sources agree? → YES: Increase one level
125
+ 4. None of the above → Remains LOW, flag for validation
126
+ ```
127
+
128
+ **Never present LOW confidence findings as authoritative.**
129
+
130
+ </tool_strategy>
131
+
132
+ <source_hierarchy>
133
+
134
+ | Level | Sources | Use |
135
+ |-------|---------|-----|
136
+ | HIGH | Context7, official docs, official releases | State as fact |
137
+ | MEDIUM | WebSearch verified with official source, multiple credible sources | State with attribution |
138
+ | LOW | WebSearch only, single source, unverified | Flag as needing validation |
139
+
140
+ Priority: Context7 > Official Docs > Official GitHub > Verified WebSearch > Unverified WebSearch
141
+
142
+ </source_hierarchy>
143
+
144
+ <verification_protocol>
145
+
146
+ ## Known Pitfalls
147
+
148
+ ### Configuration Scope Blindness
149
+ **Trap:** Assuming global configuration means no project-scoping exists
150
+ **Prevention:** Verify ALL configuration scopes (global, project, local, workspace)
151
+
152
+ ### Deprecated Features
153
+ **Trap:** Finding old documentation and concluding feature doesn't exist
154
+ **Prevention:** Check current official docs, review changelog, verify version numbers and dates
155
+
156
+ ### Negative Claims Without Evidence
157
+ **Trap:** Making definitive "X is not possible" statements without official verification
158
+ **Prevention:** For any negative claim — is it verified by official docs? Have you checked recent updates? Are you confusing "didn't find it" with "doesn't exist"?
159
+
160
+ ### Single Source Reliance
161
+ **Trap:** Relying on a single source for critical claims
162
+ **Prevention:** Require multiple sources: official docs (primary), release notes (currency), additional source (verification)
163
+
164
+ ## Pre-Submission Checklist
165
+
166
+ - [ ] All domains investigated (stack, patterns, pitfalls)
167
+ - [ ] Negative claims verified with official docs
168
+ - [ ] Multiple sources cross-referenced for critical claims
169
+ - [ ] URLs provided for authoritative sources
170
+ - [ ] Publication dates checked (prefer recent/current)
171
+ - [ ] Confidence levels assigned honestly
172
+ - [ ] "What might I have missed?" review completed
173
+
174
+ </verification_protocol>
175
+
176
+ <output_format>
177
+
178
+ ## RESEARCH.md Structure
179
+
180
+ **Location:** `.planning/milestones/M-XX-slug/RESEARCH.md`
181
+
182
+ ```markdown
183
+ # Milestone [M-XX]: [Name] - Research
184
+
185
+ **Researched:** [date]
186
+ **Domain:** [primary technology/problem domain]
187
+ **Confidence:** [HIGH/MEDIUM/LOW]
188
+
189
+ ## Summary
190
+
191
+ [2-3 paragraph executive summary]
192
+
193
+ **Primary recommendation:** [one-liner actionable guidance]
194
+
195
+ ## Standard Stack
196
+
197
+ ### Core
198
+ | Library | Version | Purpose | Why Standard |
199
+ |---------|---------|---------|--------------|
200
+ | [name] | [ver] | [what it does] | [why experts use it] |
201
+
202
+ ### Supporting
203
+ | Library | Version | Purpose | When to Use |
204
+ |---------|---------|---------|-------------|
205
+ | [name] | [ver] | [what it does] | [use case] |
206
+
207
+ ### Alternatives Considered
208
+ | Instead of | Could Use | Tradeoff |
209
+ |------------|-----------|----------|
210
+ | [standard] | [alternative] | [when alternative makes sense] |
211
+
212
+ **Installation:**
213
+ \`\`\`bash
214
+ npm install [packages]
215
+ \`\`\`
216
+
217
+ ## Architecture Patterns
218
+
219
+ ### Recommended Project Structure
220
+ \`\`\`
221
+ src/
222
+ ├── [folder]/ # [purpose]
223
+ ├── [folder]/ # [purpose]
224
+ └── [folder]/ # [purpose]
225
+ \`\`\`
226
+
227
+ ### Pattern 1: [Pattern Name]
228
+ **What:** [description]
229
+ **When to use:** [conditions]
230
+ **Example:**
231
+ \`\`\`typescript
232
+ // Source: [Context7/official docs URL]
233
+ [code]
234
+ \`\`\`
235
+
236
+ ### Anti-Patterns to Avoid
237
+ - **[Anti-pattern]:** [why it's bad, what to do instead]
238
+
239
+ ## Don't Hand-Roll
240
+
241
+ | Problem | Don't Build | Use Instead | Why |
242
+ |---------|-------------|-------------|-----|
243
+ | [problem] | [what you'd build] | [library] | [edge cases, complexity] |
244
+
245
+ **Key insight:** [why custom solutions are worse in this domain]
246
+
247
+ ## Common Pitfalls
248
+
249
+ ### Pitfall 1: [Name]
250
+ **What goes wrong:** [description]
251
+ **Why it happens:** [root cause]
252
+ **How to avoid:** [prevention strategy]
253
+ **Warning signs:** [how to detect early]
254
+
255
+ ## Code Examples
256
+
257
+ Verified patterns from official sources:
258
+
259
+ ### [Common Operation 1]
260
+ \`\`\`typescript
261
+ // Source: [Context7/official docs URL]
262
+ [code]
263
+ \`\`\`
264
+
265
+ ## State of the Art
266
+
267
+ | Old Approach | Current Approach | When Changed | Impact |
268
+ |--------------|------------------|--------------|--------|
269
+ | [old] | [new] | [date/version] | [what it means] |
270
+
271
+ **Deprecated/outdated:**
272
+ - [Thing]: [why, what replaced it]
273
+
274
+ ## Open Questions
275
+
276
+ 1. **[Question]**
277
+ - What we know: [partial info]
278
+ - What's unclear: [the gap]
279
+ - Recommendation: [how to handle]
280
+
281
+ ## Sources
282
+
283
+ ### Primary (HIGH confidence)
284
+ - [Context7 library ID] - [topics fetched]
285
+ - [Official docs URL] - [what was checked]
286
+
287
+ ### Secondary (MEDIUM confidence)
288
+ - [WebSearch verified with official source]
289
+
290
+ ### Tertiary (LOW confidence)
291
+ - [WebSearch only, marked for validation]
292
+
293
+ ## Metadata
294
+
295
+ **Confidence breakdown:**
296
+ - Standard stack: [level] - [reason]
297
+ - Architecture: [level] - [reason]
298
+ - Pitfalls: [level] - [reason]
299
+
300
+ **Research date:** [date]
301
+ **Valid until:** [estimate - 30 days for stable, 7 for fast-moving]
302
+ ```
303
+
304
+ </output_format>
305
+
306
+ <execution_flow>
307
+
308
+ ## Step 1: Receive Scope and Load Context
309
+
310
+ Orchestrator provides: milestone ID/name, description/goal, declarations it realizes, constraints, output path.
311
+ - Declaration IDs (e.g., D-01, D-02) — the specific declarations this milestone MUST address
312
+
313
+ Load milestone context using init command:
314
+ ```bash
315
+ INIT=$(node ~/.claude/get-shit-done/bin/declare-tools.cjs init milestone-op "${MILESTONE}")
316
+ ```
317
+
318
+ Extract from init JSON: `milestone_dir`, `milestone_id`, `milestone_name`, `commit_docs`.
319
+
320
+ Then read CONTEXT.md if exists:
321
+ ```bash
322
+ cat "$milestone_dir"/*-CONTEXT.md 2>/dev/null
323
+ ```
324
+
325
+ **If CONTEXT.md exists**, it constrains research:
326
+
327
+ | Section | Constraint |
328
+ |---------|------------|
329
+ | **Decisions** | Locked — research THESE deeply, no alternatives |
330
+ | **Claude's Discretion** | Research options, make recommendations |
331
+ | **Deferred Ideas** | Out of scope — ignore completely |
332
+
333
+ **Examples:**
334
+ - User decided "use library X" → research X deeply, don't explore alternatives
335
+ - User decided "simple UI, no animations" → don't research animation libraries
336
+ - Marked as Claude's discretion → research options and recommend
337
+
338
+ ## Step 2: Identify Research Domains
339
+
340
+ Based on milestone description, identify what needs investigating:
341
+
342
+ - **Core Technology:** Primary framework, current version, standard setup
343
+ - **Ecosystem/Stack:** Paired libraries, "blessed" stack, helpers
344
+ - **Patterns:** Expert structure, design patterns, recommended organization
345
+ - **Pitfalls:** Common beginner mistakes, gotchas, rewrite-causing errors
346
+ - **Don't Hand-Roll:** Existing solutions for deceptively complex problems
347
+
348
+ ## Step 3: Execute Research Protocol
349
+
350
+ For each domain: Context7 first → Official docs → WebSearch → Cross-verify. Document findings with confidence levels as you go.
351
+
352
+ ## Step 4: Quality Check
353
+
354
+ - [ ] All domains investigated
355
+ - [ ] Negative claims verified
356
+ - [ ] Multiple sources for critical claims
357
+ - [ ] Confidence levels assigned honestly
358
+ - [ ] "What might I have missed?" review
359
+
360
+ ## Step 5: Write RESEARCH.md
361
+
362
+ **ALWAYS use Write tool to persist to disk** — mandatory regardless of `commit_docs` setting.
363
+
364
+ **CRITICAL: If CONTEXT.md exists, FIRST content section MUST be `<user_constraints>`:**
365
+
366
+ ```markdown
367
+ <user_constraints>
368
+ ## User Constraints (from CONTEXT.md)
369
+
370
+ ### Locked Decisions
371
+ [Copy verbatim from CONTEXT.md ## Decisions]
372
+
373
+ ### Claude's Discretion
374
+ [Copy verbatim from CONTEXT.md ## Claude's Discretion]
375
+
376
+ ### Deferred Ideas (OUT OF SCOPE)
377
+ [Copy verbatim from CONTEXT.md ## Deferred Ideas]
378
+ </user_constraints>
379
+ ```
380
+
381
+ **If declaration IDs were provided**, MUST include a `<milestone_declarations>` section:
382
+
383
+ ```markdown
384
+ <milestone_declarations>
385
+ ## Milestone Declarations
386
+
387
+ | ID | Description | Research Support |
388
+ |----|-------------|-----------------|
389
+ | {D-ID} | {from FUTURE.md} | {which research findings enable implementation} |
390
+ </milestone_declarations>
391
+ ```
392
+
393
+ This section is REQUIRED when IDs are provided. The planner uses it to map declarations to actions.
394
+
395
+ Write to: `$MILESTONE_DIR/RESEARCH.md`
396
+
397
+ ⚠️ `commit_docs` controls git only, NOT file writing. Always write first.
398
+
399
+ ## Step 6: Commit Research (optional)
400
+
401
+ ```bash
402
+ node ~/.claude/get-shit-done/bin/declare-tools.cjs commit "docs($MILESTONE): research milestone domain" --files "$MILESTONE_DIR/RESEARCH.md"
403
+ ```
404
+
405
+ ## Step 7: Return Structured Result
406
+
407
+ </execution_flow>
408
+
409
+ <structured_returns>
410
+
411
+ ## Research Complete
412
+
413
+ ```markdown
414
+ ## RESEARCH COMPLETE
415
+
416
+ **Milestone:** {milestone_id} - {milestone_name}
417
+ **Confidence:** [HIGH/MEDIUM/LOW]
418
+
419
+ ### Key Findings
420
+ [3-5 bullet points of most important discoveries]
421
+
422
+ ### File Created
423
+ `$MILESTONE_DIR/RESEARCH.md`
424
+
425
+ ### Confidence Assessment
426
+ | Area | Level | Reason |
427
+ |------|-------|--------|
428
+ | Standard Stack | [level] | [why] |
429
+ | Architecture | [level] | [why] |
430
+ | Pitfalls | [level] | [why] |
431
+
432
+ ### Open Questions
433
+ [Gaps that couldn't be resolved]
434
+
435
+ ### Ready for Planning
436
+ Research complete. Planner can now create action plans.
437
+ ```
438
+
439
+ ## Research Blocked
440
+
441
+ ```markdown
442
+ ## RESEARCH BLOCKED
443
+
444
+ **Milestone:** {milestone_id} - {milestone_name}
445
+ **Blocked by:** [what's preventing progress]
446
+
447
+ ### Attempted
448
+ [What was tried]
449
+
450
+ ### Options
451
+ 1. [Option to resolve]
452
+ 2. [Alternative approach]
453
+
454
+ ### Awaiting
455
+ [What's needed to continue]
456
+ ```
457
+
458
+ </structured_returns>
459
+
460
+ <success_criteria>
461
+
462
+ Research is complete when:
463
+
464
+ - [ ] Milestone domain understood
465
+ - [ ] Standard stack identified with versions
466
+ - [ ] Architecture patterns documented
467
+ - [ ] Don't-hand-roll items listed
468
+ - [ ] Common pitfalls catalogued
469
+ - [ ] Code examples provided
470
+ - [ ] Source hierarchy followed (Context7 → Official → WebSearch)
471
+ - [ ] All findings have confidence levels
472
+ - [ ] RESEARCH.md created in correct format at `.planning/milestones/M-XX-slug/RESEARCH.md`
473
+ - [ ] RESEARCH.md committed to git
474
+ - [ ] Structured return provided to orchestrator
475
+
476
+ Quality indicators:
477
+
478
+ - **Specific, not vague:** "Three.js r160 with @react-three/fiber 8.15" not "use Three.js"
479
+ - **Verified, not assumed:** Findings cite Context7 or official docs
480
+ - **Honest about gaps:** LOW confidence items flagged, unknowns admitted
481
+ - **Actionable:** Planner could create actions based on this research
482
+ - **Current:** Year included in searches, publication dates checked
483
+
484
+ </success_criteria>
package/bin/install.js CHANGED
@@ -128,16 +128,16 @@ function getGlobalDir(runtime, explicitDir = null) {
128
128
  }
129
129
 
130
130
  const banner = '\n' +
131
- cyan + ' ██████╗ ███████╗██████╗\n' +
132
- ' ██╔════╝ ██╔════╝██╔══██╗\n' +
133
- ' ██║ ███╗███████╗██║ ██║\n' +
134
- ' ██║ ██║╚════██║██║ ██║\n' +
135
- ' ╚██████╔╝███████║██████╔╝\n' +
136
- ' ╚═════╝ ╚══════╝╚═════╝' + reset + '\n' +
131
+ cyan + ' ██████╗ ███████╗ ██████╗██╗ █████╗ ██████╗ ███████╗\n' +
132
+ ' ██╔══██╗██╔════╝██╔════╝██║ ██╔══██╗██╔══██╗██╔════╝\n' +
133
+ ' ██║ ██║█████╗ ██║ ██║ ███████║██████╔╝█████╗\n' +
134
+ ' ██║ ██║██╔══╝ ██║ ██║ ██╔══██║██╔══██╗██╔══╝\n' +
135
+ ' ██████╔╝███████╗╚██████╗███████╗██║ ██║██║ ██║███████╗\n' +
136
+ ' ╚═════╝ ╚══════╝ ╚═════╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝' + reset + '\n' +
137
137
  '\n' +
138
- ' Get Shit Done ' + dim + 'v' + pkg.version + reset + '\n' +
139
- ' A meta-prompting, context engineering and spec-driven\n' +
140
- ' development system for Claude Code, OpenCode, and Gemini by TÂCHES.\n';
138
+ ' Declare ' + dim + 'v' + pkg.version + reset + '\n' +
139
+ ' A future-driven meta-prompting engine for agentic development.\n' +
140
+ ' Forked from GSD · https://github.com/decocms/declare-cc\n';
141
141
 
142
142
  // Parse --config-dir argument
143
143
  function parseConfigDirArg() {
@@ -171,7 +171,7 @@ console.log(banner);
171
171
 
172
172
  // Show help if requested
173
173
  if (hasHelp) {
174
- console.log(` ${yellow}Usage:${reset} npx get-shit-done-cc [options]\n\n ${yellow}Options:${reset}\n ${cyan}-g, --global${reset} Install globally (to config directory)\n ${cyan}-l, --local${reset} Install locally (to current directory)\n ${cyan}--claude${reset} Install for Claude Code only\n ${cyan}--opencode${reset} Install for OpenCode only\n ${cyan}--gemini${reset} Install for Gemini only\n ${cyan}--all${reset} Install for all runtimes\n ${cyan}-u, --uninstall${reset} Uninstall GSD (remove all GSD files)\n ${cyan}-c, --config-dir <path>${reset} Specify custom config directory\n ${cyan}-h, --help${reset} Show this help message\n ${cyan}--force-statusline${reset} Replace existing statusline config\n\n ${yellow}Examples:${reset}\n ${dim}# Interactive install (prompts for runtime and location)${reset}\n npx get-shit-done-cc\n\n ${dim}# Install for Claude Code globally${reset}\n npx get-shit-done-cc --claude --global\n\n ${dim}# Install for Gemini globally${reset}\n npx get-shit-done-cc --gemini --global\n\n ${dim}# Install for all runtimes globally${reset}\n npx get-shit-done-cc --all --global\n\n ${dim}# Install to custom config directory${reset}\n npx get-shit-done-cc --claude --global --config-dir ~/.claude-bc\n\n ${dim}# Install to current project only${reset}\n npx get-shit-done-cc --claude --local\n\n ${dim}# Uninstall GSD from Claude Code globally${reset}\n npx get-shit-done-cc --claude --global --uninstall\n\n ${yellow}Notes:${reset}\n The --config-dir option is useful when you have multiple configurations.\n It takes priority over CLAUDE_CONFIG_DIR / GEMINI_CONFIG_DIR environment variables.\n`);
174
+ console.log(` ${yellow}Usage:${reset} npx declare-cc [options]\n\n ${yellow}Options:${reset}\n ${cyan}-g, --global${reset} Install globally (to config directory)\n ${cyan}-l, --local${reset} Install locally (to current directory)\n ${cyan}--claude${reset} Install for Claude Code only\n ${cyan}--opencode${reset} Install for OpenCode only\n ${cyan}--gemini${reset} Install for Gemini only\n ${cyan}--all${reset} Install for all runtimes\n ${cyan}-u, --uninstall${reset} Uninstall Declare (remove all Declare files)\n ${cyan}-c, --config-dir <path>${reset} Specify custom config directory\n ${cyan}-h, --help${reset} Show this help message\n ${cyan}--force-statusline${reset} Replace existing statusline config\n\n ${yellow}Examples:${reset}\n ${dim}# Interactive install (prompts for runtime and location)${reset}\n npx declare-cc\n\n ${dim}# Install for Claude Code globally${reset}\n npx declare-cc --claude --global\n\n ${dim}# Install for Gemini globally${reset}\n npx declare-cc --gemini --global\n\n ${dim}# Install for all runtimes globally${reset}\n npx declare-cc --all --global\n\n ${dim}# Install to custom config directory${reset}\n npx declare-cc --claude --global --config-dir ~/.claude-bc\n\n ${dim}# Install to current project only${reset}\n npx declare-cc --claude --local\n\n ${dim}# Uninstall Declare from Claude Code globally${reset}\n npx declare-cc --claude --global --uninstall\n\n ${yellow}Notes:${reset}\n The --config-dir option is useful when you have multiple configurations.\n It takes priority over CLAUDE_CONFIG_DIR / GEMINI_CONFIG_DIR environment variables.\n`);
175
175
  process.exit(0);
176
176
  }
177
177
 
@@ -1369,41 +1369,32 @@ function install(isGlobal, runtime = 'claude') {
1369
1369
  // OpenCode: flat structure in command/ directory
1370
1370
  const commandDir = path.join(targetDir, 'command');
1371
1371
  fs.mkdirSync(commandDir, { recursive: true });
1372
-
1373
- // Copy commands/gsd/*.md as command/gsd-*.md (flatten structure)
1374
- const gsdSrc = path.join(src, 'commands', 'gsd');
1375
- copyFlattenedCommands(gsdSrc, commandDir, 'gsd', pathPrefix, runtime);
1376
- if (verifyInstalled(commandDir, 'command/gsd-*')) {
1377
- const count = fs.readdirSync(commandDir).filter(f => f.startsWith('gsd-')).length;
1372
+
1373
+ // Copy commands/declare/*.md as command/declare-*.md (flatten structure)
1374
+ const declareSrc = path.join(src, 'commands', 'declare');
1375
+ copyFlattenedCommands(declareSrc, commandDir, 'declare', pathPrefix, runtime);
1376
+ const count = fs.readdirSync(commandDir).filter(f => f.startsWith('declare-')).length;
1377
+ if (count > 0) {
1378
1378
  console.log(` ${green}✓${reset} Installed ${count} commands to command/`);
1379
1379
  } else {
1380
- failures.push('command/gsd-*');
1380
+ failures.push('command/declare-*');
1381
1381
  }
1382
1382
  } else {
1383
1383
  // Claude Code & Gemini: nested structure in commands/ directory
1384
1384
  const commandsDir = path.join(targetDir, 'commands');
1385
1385
  fs.mkdirSync(commandsDir, { recursive: true });
1386
-
1387
- const gsdSrc = path.join(src, 'commands', 'gsd');
1388
- const gsdDest = path.join(commandsDir, 'gsd');
1389
- copyWithPathReplacement(gsdSrc, gsdDest, pathPrefix, runtime);
1390
- if (verifyInstalled(gsdDest, 'commands/gsd')) {
1391
- console.log(` ${green}✓${reset} Installed commands/gsd`);
1386
+
1387
+ const declareSrc = path.join(src, 'commands', 'declare');
1388
+ const declareDest = path.join(commandsDir, 'declare');
1389
+ copyWithPathReplacement(declareSrc, declareDest, pathPrefix, runtime);
1390
+ if (verifyInstalled(declareDest, 'commands/declare')) {
1391
+ const count = fs.readdirSync(declareDest).filter(f => f.endsWith('.md')).length;
1392
+ console.log(` ${green}✓${reset} Installed ${count} commands to commands/declare`);
1392
1393
  } else {
1393
- failures.push('commands/gsd');
1394
+ failures.push('commands/declare');
1394
1395
  }
1395
1396
  }
1396
1397
 
1397
- // Copy get-shit-done skill with path replacement
1398
- const skillSrc = path.join(src, 'get-shit-done');
1399
- const skillDest = path.join(targetDir, 'get-shit-done');
1400
- copyWithPathReplacement(skillSrc, skillDest, pathPrefix, runtime);
1401
- if (verifyInstalled(skillDest, 'get-shit-done')) {
1402
- console.log(` ${green}✓${reset} Installed get-shit-done`);
1403
- } else {
1404
- failures.push('get-shit-done');
1405
- }
1406
-
1407
1398
  // Copy agents to agents directory
1408
1399
  const agentsSrc = path.join(src, 'agents');
1409
1400
  if (fs.existsSync(agentsSrc)) {
@@ -1444,9 +1435,13 @@ function install(isGlobal, runtime = 'claude') {
1444
1435
  }
1445
1436
  }
1446
1437
 
1438
+ // Ensure declare/ metadata dir exists for VERSION and CHANGELOG
1439
+ const declareMetaDir = path.join(targetDir, 'declare');
1440
+ fs.mkdirSync(declareMetaDir, { recursive: true });
1441
+
1447
1442
  // Copy CHANGELOG.md
1448
1443
  const changelogSrc = path.join(src, 'CHANGELOG.md');
1449
- const changelogDest = path.join(targetDir, 'get-shit-done', 'CHANGELOG.md');
1444
+ const changelogDest = path.join(declareMetaDir, 'CHANGELOG.md');
1450
1445
  if (fs.existsSync(changelogSrc)) {
1451
1446
  fs.copyFileSync(changelogSrc, changelogDest);
1452
1447
  if (verifyFileInstalled(changelogDest, 'CHANGELOG.md')) {
@@ -1457,7 +1452,7 @@ function install(isGlobal, runtime = 'claude') {
1457
1452
  }
1458
1453
 
1459
1454
  // Write VERSION file
1460
- const versionDest = path.join(targetDir, 'get-shit-done', 'VERSION');
1455
+ const versionDest = path.join(declareMetaDir, 'VERSION');
1461
1456
  fs.writeFileSync(versionDest, pkg.version);
1462
1457
  if (verifyFileInstalled(versionDest, 'VERSION')) {
1463
1458
  console.log(` ${green}✓${reset} Wrote VERSION (${pkg.version})`);
@@ -1590,11 +1585,11 @@ function finishInstall(settingsPath, settings, statuslineCommand, shouldInstallS
1590
1585
  if (runtime === 'opencode') program = 'OpenCode';
1591
1586
  if (runtime === 'gemini') program = 'Gemini';
1592
1587
 
1593
- const command = isOpencode ? '/gsd-help' : '/gsd:help';
1588
+ const command = isOpencode ? '/declare-help' : '/declare:help';
1594
1589
  console.log(`
1595
1590
  ${green}Done!${reset} Launch ${program} and run ${cyan}${command}${reset}.
1596
1591
 
1597
- ${cyan}Join the community:${reset} https://discord.gg/5JJgD5svVS
1592
+ ${cyan}Docs & source:${reset} https://github.com/decocms/declare-cc
1598
1593
  `);
1599
1594
  }
1600
1595
 
@@ -0,0 +1,41 @@
1
+ ---
2
+ description: Capture an idea or task as a todo for later work
3
+ argument-hint: "[description]"
4
+ allowed-tools:
5
+ - Bash
6
+ ---
7
+
8
+ Capture an idea, task, or issue that surfaced during the current session as a structured todo.
9
+
10
+ **Step 1: Get the description.**
11
+
12
+ Parse `$ARGUMENTS` for a description string.
13
+
14
+ If `$ARGUMENTS` is non-empty, use it as the description directly.
15
+
16
+ If `$ARGUMENTS` is empty, infer the description from the current conversation context: look at the last few exchanges for any mentioned ideas, tasks, follow-ups, or issues the user flagged. If context is ambiguous, ask:
17
+
18
+ "What would you like to capture as a todo? Give a short description."
19
+
20
+ Wait for the user's reply.
21
+
22
+ **Step 2: Create the todo.**
23
+
24
+ ```bash
25
+ node dist/declare-tools.cjs add-todo --description "[description]"
26
+ ```
27
+
28
+ Parse the JSON output. It contains `id`, `path`, and `committed`.
29
+
30
+ **Step 3: Confirm capture.**
31
+
32
+ Display:
33
+
34
+ ```
35
+ Todo [id] captured: [path]
36
+ "[description]"
37
+ ```
38
+
39
+ If `committed` is true, mention the commit hash.
40
+
41
+ Suggest: "Run `/declare:check-todos` to see all pending todos."