declare-cc 1.0.8 → 2.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 (75) hide show
  1. package/README.md +153 -187
  2. package/dist/client/assets/index-BVuhr02G.css +1 -0
  3. package/dist/client/assets/index-DujGXAYw.js +9 -0
  4. package/dist/client/index.html +23 -0
  5. package/dist/index.js +17459 -0
  6. package/package.json +38 -45
  7. package/src/agents/prompts/00-research.md +90 -0
  8. package/src/agents/prompts/01-vision.md +38 -0
  9. package/src/agents/prompts/02-declarations.md +47 -0
  10. package/src/agents/prompts/03-milestones.md +43 -0
  11. package/src/agents/prompts/04-actions.md +90 -0
  12. package/src/agents/prompts/05-execution.md +63 -0
  13. package/src/agents/prompts/06-verification.md +104 -0
  14. package/LICENSE +0 -21
  15. package/agents/declare-codebase-mapper.md +0 -761
  16. package/agents/declare-debugger.md +0 -1198
  17. package/agents/declare-executor.md +0 -353
  18. package/agents/declare-integration-checker.md +0 -440
  19. package/agents/declare-plan-checker.md +0 -608
  20. package/agents/declare-planner.md +0 -1015
  21. package/agents/declare-research-synthesizer.md +0 -309
  22. package/agents/declare-researcher.md +0 -484
  23. package/agents/declare-roadmapper.md +0 -639
  24. package/agents/declare-verifier.md +0 -555
  25. package/bin/declare.js +0 -16
  26. package/bin/install.js +0 -1907
  27. package/commands/declare/actions.md +0 -113
  28. package/commands/declare/add-todo.md +0 -41
  29. package/commands/declare/audit.md +0 -76
  30. package/commands/declare/check-todos.md +0 -125
  31. package/commands/declare/complete-milestone.md +0 -215
  32. package/commands/declare/dashboard.md +0 -65
  33. package/commands/declare/debug.md +0 -162
  34. package/commands/declare/discuss.md +0 -65
  35. package/commands/declare/execute.md +0 -521
  36. package/commands/declare/future.md +0 -72
  37. package/commands/declare/health.md +0 -92
  38. package/commands/declare/help.md +0 -31
  39. package/commands/declare/init.md +0 -39
  40. package/commands/declare/map-codebase.md +0 -149
  41. package/commands/declare/milestones.md +0 -98
  42. package/commands/declare/new-cycle.md +0 -172
  43. package/commands/declare/new-project.md +0 -565
  44. package/commands/declare/pause.md +0 -138
  45. package/commands/declare/plan.md +0 -320
  46. package/commands/declare/prioritize.md +0 -65
  47. package/commands/declare/progress.md +0 -116
  48. package/commands/declare/quick.md +0 -119
  49. package/commands/declare/reapply-patches.md +0 -178
  50. package/commands/declare/research.md +0 -267
  51. package/commands/declare/resume.md +0 -146
  52. package/commands/declare/set-profile.md +0 -66
  53. package/commands/declare/settings.md +0 -119
  54. package/commands/declare/status.md +0 -65
  55. package/commands/declare/trace.md +0 -81
  56. package/commands/declare/update.md +0 -251
  57. package/commands/declare/verify.md +0 -65
  58. package/commands/declare/visualize.md +0 -74
  59. package/dist/declare-tools.cjs +0 -9439
  60. package/dist/public/app.js +0 -8331
  61. package/dist/public/index.html +0 -3939
  62. package/hooks/declare-activity.js +0 -106
  63. package/hooks/declare-check-update.js +0 -62
  64. package/hooks/declare-server.js +0 -116
  65. package/hooks/declare-statusline.js +0 -91
  66. package/scripts/build-hooks.js +0 -42
  67. package/scripts/release.js +0 -50
  68. package/templates/future.md +0 -4
  69. package/templates/milestones.md +0 -11
  70. package/workflows/actions.md +0 -89
  71. package/workflows/discuss.md +0 -476
  72. package/workflows/future.md +0 -185
  73. package/workflows/milestones.md +0 -87
  74. package/workflows/scope.md +0 -94
  75. package/workflows/verify.md +0 -504
@@ -1,521 +0,0 @@
1
- ---
2
- description: Execute actions for a milestone with wave-based scheduling and upward verification
3
- allowed-tools:
4
- - Read
5
- - Write
6
- - Bash
7
- - Glob
8
- - Grep
9
- - Task
10
- argument-hint: "[M-XX] [--confirm]"
11
- ---
12
-
13
- Execute all pending actions for a milestone using wave-based scheduling, parallel agent spawning, per-wave verification, and automatic milestone completion.
14
-
15
- **Step 1: Determine milestone scope.**
16
-
17
- Parse `$ARGUMENTS` for a milestone ID (matching pattern `M-XX`) and a `--confirm` flag.
18
-
19
- If `$ARGUMENTS` contains a milestone ID, use it directly and proceed to Step 2.
20
-
21
- If `$ARGUMENTS` is empty or contains no milestone ID (interactive mode):
22
- - Run the milestone picker:
23
-
24
- ```bash
25
- node dist/declare-tools.cjs execute
26
- ```
27
-
28
- - Parse the JSON output. It contains a `milestones` array with `{id, title, status, actionCount, doneCount}` objects.
29
- - Display a numbered list:
30
-
31
- ```
32
- ## Select a Milestone to Execute
33
-
34
- 1. M-01: [title] — [status] ([doneCount]/[actionCount] actions done)
35
- 2. M-02: [title] — [status] ([doneCount]/[actionCount] actions done)
36
- ```
37
-
38
- - Ask the user: "Which milestone would you like to execute? Provide the ID (e.g., M-01)."
39
- - Wait for the user's response, then use their provided ID in Step 2.
40
-
41
- Check if `--confirm` is present in `$ARGUMENTS`. If so, pause between waves for user review.
42
-
43
- **Step 2: Load execution data.**
44
-
45
- Run:
46
-
47
- ```bash
48
- node dist/declare-tools.cjs execute --milestone M-XX
49
- ```
50
-
51
- Parse the JSON output.
52
-
53
- If `allDone` is true:
54
- - Display: "All actions for M-XX are already complete. Milestone status: [status]"
55
- - Exit.
56
-
57
- Display a banner:
58
-
59
- ```
60
- ## Executing: M-XX — [milestoneTitle]
61
-
62
- **Declarations:** [for each declaration: "D-XX (title)"]
63
- **Actions:** [pendingCount] pending of [totalActions] total | **Waves:** [waves.length]
64
- ```
65
-
66
- **Step 2.5: Check for drift.**
67
-
68
- Before executing waves, check whether any nodes have drifted from the declared future.
69
-
70
- Run:
71
-
72
- ```bash
73
- node dist/declare-tools.cjs check-drift
74
- ```
75
-
76
- Parse the JSON output.
77
-
78
- If `hasDrift` is true:
79
- - Display a drift warning:
80
-
81
- ```
82
- ## Drift Detected
83
-
84
- The following nodes have no causation path to any declaration:
85
- ```
86
-
87
- For each drifted node in `driftedNodes`, display:
88
- ```
89
- - [type] [id]: [title] (status: [status])
90
- Suggestions:
91
- - Connect to [suggestion.target] ([suggestion.targetTitle]) -- [suggestion.reason]
92
- ```
93
-
94
- Then ask: "Drifted nodes detected. Continue execution anyway? (yes/no/fix)"
95
- - "yes" -> proceed with execution
96
- - "no" -> abort execution
97
- - "fix" -> suggest the user run /declare:milestones or manually edit MILESTONES.md/PLAN.md to reconnect orphaned nodes, then retry
98
-
99
- This is a SOFT BLOCK -- warn but allow continuation.
100
-
101
- If `hasDrift` is false: proceed silently.
102
-
103
- **Step 3: For each wave, execute actions.**
104
-
105
- Iterate over each wave in the `waves` array:
106
-
107
- **3a. Generate exec plans (on-demand, per wave):**
108
-
109
- For each action in the wave:
110
-
111
- ```bash
112
- node dist/declare-tools.cjs generate-exec-plan --action A-XX --milestone M-XX --wave N
113
- ```
114
-
115
- Parse the JSON output and note the `outputPath` for each action.
116
-
117
- If any generation returns an error, display it and suggest fixes (e.g., "Run /declare:actions first to create the milestone plan folder").
118
-
119
- **3b. Display wave banner:**
120
-
121
- ```
122
- --- Wave N of [total waves] ---
123
- **Actions:** A-XX ([title]), A-XX ([title])
124
- Spawning [count] agent(s)...
125
- ```
126
-
127
- **3c. Spawn executor agents in parallel using the Task tool:**
128
-
129
- For each action in the wave, spawn a Task with `model: "opus"` and instructions like:
130
-
131
- ```
132
- Execute the plan at [outputPath].
133
-
134
- Read the EXEC-PLAN file at the path above. Follow all tasks described in it.
135
- Make atomic commits per task. When complete, report:
136
- - What was done
137
- - Files created or modified
138
- - Commit hashes
139
- - Any issues encountered
140
-
141
- Context: This action is part of milestone M-XX ([milestoneTitle]).
142
- ```
143
-
144
- Use one Task tool call per action. If the wave has multiple actions, spawn them all in the same response so they execute in parallel.
145
-
146
- **3d. After all agents in the wave complete, verify:**
147
-
148
- Run:
149
-
150
- ```bash
151
- node dist/declare-tools.cjs verify-wave --milestone M-XX --actions "A-01,A-02"
152
- ```
153
-
154
- (Use the comma-separated list of action IDs from the current wave.)
155
-
156
- Parse the verification JSON output.
157
-
158
- Display automated check results:
159
-
160
- ```
161
- ### Wave N Verification
162
-
163
- | Action | Check | Result |
164
- | ------ | ------------ | ------ |
165
- | A-XX | action-exists | PASS |
166
- | A-XX | produces-exist| PASS |
167
- ```
168
-
169
- Perform AI review: Given the trace context from the verification result (`traceContext.whyChain` and `traceContext.declarations`), assess whether the completed work meaningfully advances the milestone. Produce a 1-2 sentence assessment.
170
-
171
- If `passed` is false (verification failed):
172
- - Identify which actions failed and what checks failed.
173
- - Retry up to 2 times: re-spawn the failed action's Task agent with the failure context appended:
174
-
175
- ```
176
- Previous attempt failed verification. Failure details:
177
- - Check [check-name] failed for action A-XX
178
- - [Details from allChecks]
179
-
180
- Please fix the issues and try again.
181
- ```
182
-
183
- - After 2 retries with continued failure, surface to user:
184
- "Action A-XX failed verification after 2 retries. Details: [failure info]. What would you like to do?"
185
- - Wait for user guidance before continuing.
186
-
187
- If `--confirm` flag was set, pause after successful verification:
188
- - "Wave N complete and verified. Proceed to Wave N+1? (yes/no)"
189
- - Wait for user confirmation before continuing.
190
-
191
- **3e. Propagate statuses after each wave:**
192
-
193
- After successful wave verification, run sync-status to update PLAN.md, MILESTONES.md, and FUTURE.md atomically. This keeps the dashboard live as waves complete:
194
-
195
- ```bash
196
- node dist/declare-tools.cjs sync-status
197
- ```
198
-
199
- Do not manually edit PLAN.md or MILESTONES.md — sync-status handles all of it correctly.
200
-
201
- **Step 4: After all waves complete, propagate statuses.**
202
-
203
- Run sync-status to propagate action → milestone → declaration completion automatically:
204
-
205
- ```bash
206
- node dist/declare-tools.cjs sync-status
207
- ```
208
-
209
- Parse the result. It will show which actions, milestones, and declarations were marked DONE.
210
- Display: "Status propagated — [summary from sync-status result]."
211
-
212
- Proceed to Step 5. Do NOT display a completion banner yet — that happens in Step 8 after verification.
213
-
214
- **Step 5: Milestone truth verification.**
215
-
216
- After marking the milestone DONE in Step 4, verify whether the milestone truth actually holds.
217
-
218
- **5a. Run programmatic verification:**
219
-
220
- ```bash
221
- node dist/declare-tools.cjs verify-milestone --milestone M-XX
222
- ```
223
-
224
- Parse the JSON result. It contains `criteria` (array of `{id, type, passed, description, evidence}`), `programmaticPassed`, `aiAssessmentNeeded`, and `traceContext`.
225
-
226
- **5b. Display programmatic check results:**
227
-
228
- ```
229
- ### Milestone Verification: M-XX
230
-
231
- | Criterion | Type | Result | Evidence |
232
- | --------- | ---- | ------ | -------- |
233
- | SC-01 | artifact | PASS | File found at path (NNN bytes) |
234
- | SC-02 | test | PASS | npm test exited with code 0 |
235
- | SC-03 | ai | (pending) | |
236
- ```
237
-
238
- For each criterion in the result, show its id, type, result (PASS if `passed === true`, NOT YET MET if `passed === false`, `(pending)` if `passed === null`), and evidence.
239
-
240
- **5c. Perform AI assessment:**
241
-
242
- If `programmaticPassed` is false, skip AI assessment -- programmatic criteria not yet met are definitive. Proceed directly to remediation (Step 6).
243
-
244
- If `programmaticPassed` is true, perform the AI assessment for the criterion with `type: "ai"`:
245
-
246
- - Read the milestone title and the trace context (`traceContext.declarations` and `traceContext.whyChain`) from the verify-milestone result.
247
- - Review the work completed across all waves (the actions executed, their produces, the wave verification results).
248
- - Assess: "Given that all actions for this milestone have completed, does the milestone truth statement hold? Is '[milestone title]' actually true?"
249
- - If the AI assessment is positive: mark the AI criterion as passed with a 1-2 sentence evidence summary.
250
- - If the AI assessment is negative: mark the AI criterion as not yet met with evidence explaining what is missing.
251
-
252
- Use restoration-focused language throughout: "criterion met" / "criterion not yet met" (never "passed" / "failed" in user-facing output).
253
-
254
- **5d. Determine verification outcome:**
255
-
256
- - ALL criteria met (including AI): proceed to mark KEPT (Step 5e).
257
- - ANY criterion not yet met: proceed to remediation loop (Step 6).
258
-
259
- **5e. All criteria met -- mark milestone KEPT:**
260
-
261
- 1. Read `.planning/MILESTONES.md`, change M-XX status from DONE to KEPT.
262
- 2. Write the updated MILESTONES.md back.
263
- 3. Write VERIFICATION.md to the milestone folder using the `writeVerificationFile` format:
264
- - State: `KEPT`
265
- - Criteria: all criteria with their pass/fail status, descriptions, and evidence
266
- - History: one attempt entry with `passed: true`, `remediationTriggered: false`, `stateTransition: "DONE -> KEPT"`
267
- 4. Display (3-5 lines):
268
-
269
- ```
270
- Milestone M-XX verified as KEPT -- "[milestone title]" holds true.
271
- [Brief summary of what was verified: N artifact checks, test suite, AI assessment all met.]
272
- ```
273
-
274
- 5. Skip to completion banner (Step 8).
275
-
276
- **Step 6: Remediation loop (max 2 attempts).**
277
-
278
- If verification in Step 5 found criteria not yet met:
279
-
280
- **6a. Update MILESTONES.md status to BROKEN for M-XX.**
281
-
282
- Read `.planning/MILESTONES.md`, change M-XX status from DONE to BROKEN, write back.
283
-
284
- **6b. Write initial VERIFICATION.md to the milestone folder.**
285
-
286
- Write VERIFICATION.md with:
287
- - State: `BROKEN`
288
- - Criteria: all criteria with current results
289
- - History: one attempt entry with `passed: false`, `remediationTriggered: true`, `stateTransition: "DONE -> BROKEN"`, checks summary (which criteria not yet met)
290
-
291
- **6c. For each remediation attempt (max 2):**
292
-
293
- **i. Derive remediation actions.** Analyze the criteria not yet met. For each criterion not yet met, derive 1-3 targeted remediation actions using AI reasoning:
294
-
295
- ```
296
- Given these verification results for milestone M-XX ("[milestone title]"):
297
-
298
- Criteria not yet met:
299
- - SC-XX: [description] -- Evidence: [evidence]
300
-
301
- Derive remediation actions. Rules:
302
- - Each action targets exactly one criterion not yet met
303
- - Do not modify code that already meets its criteria
304
- - Maximum 3 actions per remediation attempt
305
- - Each action needs: title, produces field, description
306
- ```
307
-
308
- **ii. Append remediation actions to PLAN.md.** For each derived action:
309
- - Read the existing PLAN.md from the milestone folder (use `milestoneFolderPath` from Step 2).
310
- - Add a new action section at the bottom with the next available A-XX ID.
311
- - Mark it with `**Derived:** remediation (attempt N)` instead of a creation date.
312
- - Write the updated PLAN.md.
313
-
314
- **iii. Generate exec plans for remediation actions:**
315
-
316
- ```bash
317
- node dist/declare-tools.cjs generate-exec-plan --action A-XX --milestone M-XX --wave remediation
318
- ```
319
-
320
- **iv. Display remediation banner:**
321
-
322
- ```
323
- --- Remediation Attempt N ---
324
- **Criteria not yet met:** SC-XX, SC-YY
325
- **Actions:** A-XX ([title]), A-YY ([title])
326
- Spawning [count] agent(s)...
327
- ```
328
-
329
- **v. Spawn executor agents for remediation actions using the Task tool** (same pattern as Step 3c).
330
-
331
- **vi. After remediation agents complete, re-run verification:**
332
-
333
- ```bash
334
- node dist/declare-tools.cjs verify-milestone --milestone M-XX
335
- ```
336
-
337
- Re-perform AI assessment for the AI criterion (same process as Step 5c).
338
-
339
- **vii. If ALL criteria now met:**
340
- - Read `.planning/MILESTONES.md`, change M-XX status from BROKEN to HONORED.
341
- - Write the updated MILESTONES.md back.
342
- - Update VERIFICATION.md: use `appendAttempt` to add the successful attempt with `passed: true`, `remediationTriggered: false`, `stateTransition: "BROKEN -> HONORED"`, and update the header state to HONORED.
343
- - Display (3-5 lines):
344
-
345
- ```
346
- Milestone M-XX verified as HONORED -- "[milestone title]" now holds true.
347
- Remediation: [brief description of what was fixed]. [N] criteria now met.
348
- ```
349
-
350
- - Skip to completion banner (Step 8).
351
-
352
- **viii. If criteria still not met after attempt 2:** proceed to escalation (Step 7).
353
-
354
- **Step 7: Escalation.**
355
-
356
- After 2 remediation attempts with criteria still not met:
357
-
358
- **7a. Update VERIFICATION.md** with the final attempt (attempt 2) results using `appendAttempt`.
359
-
360
- **7b. Display diagnosis report:**
361
-
362
- ```
363
- ## Verification: M-XX requires attention
364
-
365
- **Milestone:** [milestone title]
366
- **Remediation attempts:** 2 (criteria still not yet met)
367
-
368
- ### What was tried
369
-
370
- **Attempt 1:** [actions taken] -- [which criteria still not yet met]
371
- **Attempt 2:** [actions taken] -- [which criteria still not yet met]
372
-
373
- ### Criteria still not yet met
374
-
375
- | Criterion | Evidence |
376
- | --------- | -------- |
377
- | SC-XX | [latest evidence] |
378
-
379
- ### Suggestions
380
-
381
- - [Specific suggestion per criterion not yet met, e.g., "Consider narrowing SC-02 to check only the main export" or "The test in SC-03 may need a mock for external service X"]
382
-
383
- ### Options
384
-
385
- 1. **Adjust** the milestone statement or success criteria, then I will retry verification
386
- 2. **Accept** the current state and continue to the next milestone
387
- ```
388
-
389
- **7c. Wait for user response.**
390
-
391
- If user chooses to **adjust**:
392
- - Apply the user's adjustments to the milestone statement or success criteria.
393
- - Re-run verification (Step 5).
394
- - If all criteria now met: change M-XX status from BROKEN to RENEGOTIATED in MILESTONES.md.
395
- - Update VERIFICATION.md with a new attempt entry with `stateTransition: "BROKEN -> RENEGOTIATED"`.
396
- - Display: "Milestone M-XX renegotiated and verified -- adjusted criteria now hold."
397
- - Proceed to Step 8.
398
-
399
- If user chooses to **accept**:
400
- - Leave M-XX status as BROKEN in MILESTONES.md.
401
- - Add a note to VERIFICATION.md: "User accepted current state. Milestone remains BROKEN."
402
- - Proceed to Step 8.
403
-
404
- **Step 8: Occurrence check at milestone completion.**
405
-
406
- After execution and verification, check whether declarations still occur as declared.
407
-
408
- Run:
409
-
410
- ```bash
411
- node dist/declare-tools.cjs check-occurrence
412
- ```
413
-
414
- Parse the JSON output. For each declaration in the `declarations` array:
415
-
416
- Perform AI assessment: Given the declaration statement and its connected milestones/actions, assess:
417
- 1. Does this declaration still occur as what was declared? (Is it still true/relevant?)
418
- 2. Has any work drifted from the declaration's intent?
419
- 3. Rate alignment: HIGH / MEDIUM / LOW
420
-
421
- Display the assessment:
422
-
423
- ```
424
- ### Occurrence Check: [declarationId] -- [statement]
425
-
426
- **Statement:** "[statement]"
427
- **Connected milestones:** [milestoneCount] ([count of verified] verified)
428
- **Assessment:** [AI assessment of whether this still occurs as declared]
429
- **Alignment:** [HIGH/MEDIUM/LOW]
430
- ```
431
-
432
- If the AI assessment determines a declaration is "no longer true" or alignment is LOW:
433
- - Ask the user: "Declaration [declarationId] appears to no longer occur as declared. Renegotiate? (yes/no)"
434
- - If "yes" -> enter renegotiation flow (Step 9a)
435
- - If "no" -> note it and continue
436
-
437
- **Step 9a: Renegotiation flow (if triggered).**
438
-
439
- Ask the user: "Why is this declaration no longer true?" and capture their reason.
440
-
441
- Run:
442
-
443
- ```bash
444
- node dist/declare-tools.cjs renegotiate --declaration D-XX --reason "[user's reason]"
445
- ```
446
-
447
- Parse the JSON output.
448
-
449
- Display:
450
-
451
- ```
452
- ### Renegotiation Complete: [archived.id]
453
-
454
- **Archived to:** FUTURE-ARCHIVE.md
455
- **Reason:** [reason]
456
- ```
457
-
458
- If `orphanedMilestones` is non-empty, display them grouped:
459
-
460
- ```
461
- **Orphaned milestones requiring review:**
462
- ```
463
-
464
- For each orphaned milestone:
465
- ```
466
- - [id]: [title] ([status])
467
- Actions: [action.id] ([action.status]), ...
468
- Options:
469
- 1. Reassign to another declaration
470
- 2. Archive this milestone
471
- 3. Leave for now (will appear as drift)
472
- ```
473
-
474
- "Which milestones would you like to reassign? Provide IDs or 'skip' to leave for later."
475
-
476
- If user provides IDs, guide them through reassignment (edit MILESTONES.md to update the Realizes column). If "skip", acknowledge and continue.
477
-
478
- Then prompt: "Would you like to create a replacement declaration now? (yes/no)"
479
- - If "yes": suggest running `/declare:future` to add a new declaration
480
- - If "no": continue
481
-
482
- **Step 9: Completion banner.**
483
-
484
- Display the final execution summary:
485
-
486
- ```
487
- ## Execution Complete: M-XX -- [milestoneTitle]
488
-
489
- **Actions completed:** [count of actions executed, including remediation actions]
490
- **Waves executed:** [count of waves]
491
- **Verification:** [KEPT | HONORED | RENEGOTIATED | BROKEN (user accepted)]
492
- **Milestone status:** [final status in MILESTONES.md]
493
- **Occurrence check:** [Performed — X declarations assessed / Skipped (if no declarations affected)]
494
- ```
495
-
496
- **Error handling:**
497
-
498
- - If any CJS command returns a JSON with an `error` field, display it clearly and suggest fixes.
499
- - If milestone folder not found, suggest running `/declare:actions` first to create the milestone plan.
500
- - If no pending actions, report the milestone is already complete.
501
- - If a Task agent fails (non-verification failure), display the error and ask the user how to proceed.
502
-
503
- **Key patterns:**
504
-
505
- - Execution scope is per-milestone (never cross-milestone).
506
- - Wave scheduling is automatic from the action graph.
507
- - Auto-advance between waves by default; `--confirm` pauses for user review.
508
- - GSD-style banners with progress at each stage.
509
- - Atomic commits per task (handled by executor agents).
510
- - Two-layer verification: automated checks (CJS tool) then AI review (this slash command).
511
- - Max 2 retries on verification failure before escalating to user.
512
- - Milestone truth verification after all waves: DONE is intermediate, KEPT/HONORED/RENEGOTIATED are final.
513
- - Auto-remediation derives targeted actions, appends to PLAN.md, executes, and re-verifies.
514
- - Escalation provides diagnosis with specific suggestions, never judgment.
515
- - Language is restoration-focused: "criterion not yet met" not "failed", "requires attention" not "broken".
516
- - State transitions: DONE -> KEPT (all criteria met first try), DONE -> BROKEN -> HONORED (remediated), DONE -> BROKEN -> RENEGOTIATED (user adjusted criteria).
517
- - VERIFICATION.md written to milestone folder with full attempt history and audit trail.
518
- - Drift pre-check (Step 2.5): soft-block warning before wave execution if orphaned nodes detected.
519
- - Occurrence checks (Step 9): AI assessment of each declaration after milestone completion.
520
- - Renegotiation flow (Step 9a): archives declaration to FUTURE-ARCHIVE.md, presents orphans for reassignment.
521
- - FUTURE.md is the shared future document referenced as the source of truth for all alignment checks.
@@ -1,72 +0,0 @@
1
- ---
2
- description: Declare futures through guided conversation
3
- allowed-tools:
4
- - Read
5
- - Write
6
- - Bash
7
- - Glob
8
- - Grep
9
- argument-hint: "[--add]"
10
- ---
11
-
12
- Guide the user through declaring their project's future as present-tense truth statements.
13
-
14
- **Step 1: Load current graph state.**
15
-
16
- ```bash
17
- node dist/declare-tools.cjs load-graph
18
- ```
19
-
20
- Parse the JSON output. If the output contains an `error` field (e.g., "No Declare project found"), tell the user to run `/declare:init` first and stop.
21
-
22
- Note the existing declarations from the graph (if any) -- the workflow needs this context.
23
-
24
- **Step 2: Determine mode.**
25
-
26
- - If `$ARGUMENTS` contains `--add`, skip the intro and go directly to the per-declaration loop (adding to existing declarations).
27
- - If the graph already has declarations and `--add` is NOT present, show existing declarations and ask: "Would you like to add to these, or start fresh?"
28
-
29
- **Step 3: Follow the declaration capture workflow.**
30
-
31
- Read and follow the full workflow instructions:
32
-
33
- @workflows/future.md
34
-
35
- Pass the loaded graph state into the workflow so it knows about existing declarations.
36
-
37
- **Step 4: Persist each confirmed declaration.**
38
-
39
- After each declaration passes language detection and NSR validation and the user confirms it, persist it:
40
-
41
- ```bash
42
- node dist/declare-tools.cjs add-declaration --title "Short Title" --statement "Full present-tense declaration statement"
43
- ```
44
-
45
- Parse the JSON output to confirm the declaration was created and note its assigned ID (e.g., D-01).
46
-
47
- **Step 5: Launch dashboard and show summary.**
48
-
49
- After all declarations are captured:
50
-
51
- 1. Start the dashboard server (if not already running):
52
-
53
- ```bash
54
- node dist/declare-tools.cjs serve --port 3847 > /tmp/declare-dashboard.log 2>&1 &
55
- sleep 1 && curl -sf http://localhost:3847/api/graph -o /dev/null && echo "RUNNING" || echo "FAILED"
56
- ```
57
-
58
- If RUNNING, open it:
59
- ```bash
60
- open http://localhost:3847 2>/dev/null || true
61
- ```
62
-
63
- 2. List all declarations with their IDs and statements.
64
-
65
- 3. Suggest next step:
66
-
67
- ```
68
- Your declarations are live in the dashboard → http://localhost:3847
69
- The graph updates every 5 seconds as you add milestones and actions.
70
-
71
- Run /declare:milestones to work backward from these declarations.
72
- ```
@@ -1,92 +0,0 @@
1
- ---
2
- description: Diagnose .planning/ directory health and optionally repair issues
3
- argument-hint: [--repair]
4
- allowed-tools:
5
- - Read
6
- - Bash
7
- - Write
8
- ---
9
-
10
- Validate `.planning/` directory integrity and report actionable issues.
11
-
12
- **Step 1: Parse arguments.**
13
-
14
- Check `$ARGUMENTS` for the `--repair` flag.
15
-
16
- **Step 2: Run health check.**
17
-
18
- If `--repair` was passed:
19
-
20
- ```bash
21
- node dist/declare-tools.cjs health-check --repair
22
- ```
23
-
24
- Otherwise:
25
-
26
- ```bash
27
- node dist/declare-tools.cjs health-check
28
- ```
29
-
30
- Parse the JSON output. It contains:
31
- - `healthy`: boolean — whether all checks passed
32
- - `issues`: array of `{ type, message, path, fixable }` objects
33
- - `repaired`: array of strings describing what was fixed (only present when `--repair` was used)
34
-
35
- **Step 3: Display results.**
36
-
37
- **If healthy (no issues):**
38
-
39
- ```
40
- .planning/ health: OK
41
-
42
- All checks passed:
43
- FUTURE.md — exists and parseable
44
- MILESTONES.md — exists and parseable
45
- config.json — exists and parseable
46
- Milestone folders — all referenced milestones have folders
47
- Orphan check — no orphaned milestone folders
48
- ```
49
-
50
- **If there are issues:**
51
-
52
- Show a header with the count:
53
-
54
- ```
55
- .planning/ health: [N] issue(s) found
56
- ```
57
-
58
- Then list each issue clearly:
59
-
60
- ```
61
- [type indicator] [message]
62
- Path: [path]
63
- Fixable: yes / no
64
- ```
65
-
66
- Use these type indicators:
67
- - `missing_file` → "MISSING"
68
- - `parse_error` → "PARSE ERROR"
69
- - `missing_folder` → "MISSING FOLDER"
70
- - `orphaned_folder` → "ORPHAN"
71
-
72
- **If `--repair` was used and repairs were made:**
73
-
74
- ```
75
- Repaired [N] issue(s):
76
- - [repair description]
77
- ...
78
-
79
- Remaining issues: [N] (require manual intervention)
80
- ```
81
-
82
- **Step 4: Suggest next steps.**
83
-
84
- If there are unfixable issues, suggest:
85
- - Missing FUTURE.md or MILESTONES.md: "Run `/declare:init` to recreate missing files"
86
- - Parse errors: "Manually inspect and fix the file at [path]"
87
- - Orphaned folders: "Remove or reconnect the folder: [path]"
88
-
89
- If there are fixable issues and `--repair` was NOT passed:
90
- ```
91
- Run `/declare:health --repair` to automatically fix [N] fixable issue(s).
92
- ```