declare-cc 1.0.7 → 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 -9428
  60. package/dist/public/app.js +0 -9086
  61. package/dist/public/index.html +0 -4292
  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,87 +0,0 @@
1
- # Milestone Derivation Workflow
2
-
3
- You are guiding a user through milestone derivation: starting from declared futures and working backward to milestones by asking "what must be true?" at each level.
4
-
5
- This workflow derives milestones only. Action plans are derived separately via `/declare:actions`.
6
-
7
- ## Opening
8
-
9
- Show the declarations being processed:
10
-
11
- > Let's work backward from your declarations to concrete milestones.
12
- >
13
- > Your declared futures:
14
- > - D-01: [statement]
15
- > - D-02: [statement]
16
- > ...
17
- >
18
- > I'll take each declaration and ask: "For this to be true, what must be true?" Each answer becomes a milestone -- a condition that must hold for the declaration to be realized.
19
-
20
- If deriving for a specific declaration (argument provided), focus on just that one:
21
-
22
- > Let's derive milestones for:
23
- > - [D-XX]: [statement]
24
-
25
- ## Re-Derivation Awareness
26
-
27
- If milestones already exist for a declaration being derived:
28
-
29
- > These milestones were previously derived for [D-XX]:
30
- > - M-01: [title]
31
- > - M-02: [title]
32
- >
33
- > Do these still align with the declaration? Should we keep, adjust, or replace any of them?
34
-
35
- Only proceed with new derivation after the user confirms which existing milestones to keep. Do not auto-reconcile -- the user decides.
36
-
37
- ## Per-Declaration Derivation Loop
38
-
39
- For each declaration D that needs derivation:
40
-
41
- ### a. State the backward question explicitly
42
-
43
- Make the reasoning visible. This is the core teaching moment:
44
-
45
- > For "[D statement]" to be true, what must be true?
46
-
47
- ### b. Propose milestones
48
-
49
- Propose 2-4 milestones. Present each with clear backward logic explaining WHY it must be true for the declaration to hold:
50
-
51
- > I see these conditions that must hold:
52
- >
53
- > 1. **[Milestone A]** -- because [why this must be true for D to be true]
54
- > 2. **[Milestone B]** -- because [why this must be true for D to be true]
55
- > 3. **[Milestone C]** -- because [why this must be true for D to be true]
56
-
57
- These will be presented as checkboxes by the command for the user to select which to accept.
58
-
59
- ### c. User selects milestones via checkboxes
60
-
61
- The command presents the proposed milestones as a checkbox list using AskUserQuestion. The user checks which milestones to accept. Persist each accepted milestone immediately.
62
-
63
- ### d. Move to the next declaration
64
-
65
- After milestones for one declaration are confirmed and persisted, move to the next declaration.
66
-
67
- ## Closing
68
-
69
- After all declarations have their milestones:
70
-
71
- > Milestone derivation complete.
72
- >
73
- > From [N] declarations, we derived [X] milestones.
74
- >
75
- > Run `/declare:actions` to derive action plans for each milestone.
76
-
77
- ## Design Principles
78
-
79
- Follow these throughout the conversation:
80
-
81
- - **Make the backward logic visible and teachable.** Always state the question being asked ("For X to be true, what must be true?"). This teaches the user the thinking pattern.
82
- - **Milestones are confirmed via checkboxes.** Batch selection per declaration, not individual confirmation prompts.
83
- - **No action derivation in this workflow.** Actions are derived separately via `/declare:actions`.
84
- - **Flag inconsistencies, don't auto-fix.** When re-deriving for a declaration that already has milestones, show existing ones and let the user decide.
85
- - **Propose, don't dictate.** Present milestones as proposals. The user may have better ideas.
86
- - **Show your reasoning.** For each proposed milestone, explain why it must be true.
87
- - **Do not use emojis.** Keep the tone professional and grounded.
@@ -1,94 +0,0 @@
1
- # Declaration Scope Review
2
-
3
- You are reviewing the full set of declared futures with the user before deriving milestones. This is a synthesis checkpoint — confirm the foundation is solid so milestone derivation builds on the right ground.
4
-
5
- ## Purpose
6
-
7
- Before working backward to milestones, establish:
8
- 1. The declarations collectively tell a coherent story
9
- 2. The scope boundary is clear (what's in, what's out)
10
- 3. No important futures are missing or redundant
11
- 4. The framing reflects what the user actually intends to build
12
-
13
- ## Opening
14
-
15
- Synthesize all declarations into a scope statement. Do not simply list them — draw out what they *mean together*:
16
-
17
- ```
18
- Looking at your declarations as a whole:
19
-
20
- [D-01]: [statement]
21
- [D-02]: [statement]
22
- ...
23
-
24
- Here's the scope I see:
25
-
26
- [2-3 sentence synthesis: what this project creates, who it serves, what fundamentally changes]
27
-
28
- In scope: [concrete things the declarations cover]
29
- Assumed out of scope: [what the declarations imply is NOT the focus]
30
-
31
- Does this framing match your intent?
32
- ```
33
-
34
- Present this as text, then use AskUserQuestion:
35
-
36
- - header: "Scope"
37
- - question: "Does this framing capture what you're building?"
38
- - options:
39
- - "Yes, this is right — derive milestones" (Recommended)
40
- - "A declaration needs adjusting"
41
- - "Something important is missing"
42
- - "The scope feels off"
43
-
44
- ## If "A declaration needs adjusting"
45
-
46
- Ask which declaration and what's off. Work through the refinement conversationally. If the updated statement is meaningfully different:
47
-
48
- ```bash
49
- node dist/declare-tools.cjs add-declaration --title "[revised title]" --statement "[revised statement]"
50
- ```
51
-
52
- Note: if removing the old version matters, flag it to the user — they can delete the old declaration or keep both if they serve different purposes.
53
-
54
- After the change, re-synthesize and confirm once more.
55
-
56
- ## If "Something important is missing"
57
-
58
- Guide the user to state the missing future using the same language principles as in `/declare:future`: present-tense, stated as fact, not goal language. Validate and add:
59
-
60
- ```bash
61
- node dist/declare-tools.cjs add-declaration --title "[title]" --statement "[statement]"
62
- ```
63
-
64
- After adding, re-synthesize and confirm.
65
-
66
- ## If "The scope feels off"
67
-
68
- Probe what specifically feels wrong:
69
-
70
- - Too broad? — Help identify which declarations to narrow or which to defer
71
- - Too narrow? — Something missing (redirect to above)
72
- - Wrong framing? — Rephrase the synthesis, not the declarations, and re-confirm
73
-
74
- One pass of adjustment is enough. After a second confirmation attempt, proceed.
75
-
76
- ## After Confirmation
77
-
78
- Once framing is confirmed, briefly acknowledge it and move forward:
79
-
80
- ```
81
- Scope confirmed.
82
-
83
- [N] declarations covering [core theme]. Deriving milestones by working backward from each.
84
- ```
85
-
86
- Then immediately proceed to milestone derivation — do not ask more questions here.
87
-
88
- ## Design Principles
89
-
90
- - **Synthesize, don't list.** The user already saw their declarations. Show what they mean together.
91
- - **Name what's out.** Explicit scope exclusions prevent milestone sprawl during derivation.
92
- - **One round of adjustment.** If the user modifies and re-confirms, proceed. Don't loop more than twice.
93
- - **Be concrete.** Don't say "the project creates value" — say "the project gives developers a self-hosted AI coding workflow that runs without a cloud dependency."
94
- - **No emojis.** Keep tone grounded.
@@ -1,504 +0,0 @@
1
- <purpose>
2
- Validate built features through conversational testing with persistent state. Creates UAT.md that tracks test progress, survives /clear, and feeds gaps into /declare:verify --gaps.
3
-
4
- User tests, Claude records. One test at a time. Plain text responses.
5
- </purpose>
6
-
7
- <philosophy>
8
- **Show expected, ask if reality matches.**
9
-
10
- Claude presents what SHOULD happen. User confirms or describes what's different.
11
- - "yes" / "y" / "next" / empty → pass
12
- - Anything else → logged as issue, severity inferred
13
-
14
- No Pass/Fail buttons. No severity questions. Just: "Here's what should happen. Does it?"
15
- </philosophy>
16
-
17
- <template>
18
- @workflows/uat-template.md
19
- </template>
20
-
21
- <process>
22
-
23
- <step name="initialize" priority="first">
24
- If $ARGUMENTS contains a milestone identifier (e.g., M-08), load context:
25
-
26
- ```bash
27
- INIT=$(node dist/declare-tools.cjs execute --milestone "${MILESTONE_ARG}" 2>/dev/null || echo "{}")
28
- ```
29
-
30
- Parse JSON for: `planner_model`, `checker_model`, `commit_docs`, `milestone_found`, `milestone_dir`, `milestone_id`, `milestone_name`, `has_verification`.
31
- </step>
32
-
33
- <step name="check_active_session">
34
- **First: Check for active UAT sessions**
35
-
36
- ```bash
37
- find .planning/milestones -name "*-UAT.md" -type f 2>/dev/null | head -5
38
- ```
39
-
40
- **If active sessions exist AND no $ARGUMENTS provided:**
41
-
42
- Read each file's frontmatter (status, milestone) and Current Test section.
43
-
44
- Display inline:
45
-
46
- ```
47
- ## Active UAT Sessions
48
-
49
- | # | Milestone | Status | Current Test | Progress |
50
- |---|-----------|--------|--------------|----------|
51
- | 1 | M-04-comments | testing | 3. Reply to Comment | 2/6 |
52
- | 2 | M-05-auth | testing | 1. Login Form | 0/4 |
53
-
54
- Reply with a number to resume, or provide a milestone ID to start new.
55
- ```
56
-
57
- Wait for user response.
58
-
59
- - If user replies with number (1, 2) → Load that file, go to `resume_from_file`
60
- - If user replies with milestone ID → Treat as new session, go to `create_uat_file`
61
-
62
- **If active sessions exist AND $ARGUMENTS provided:**
63
-
64
- Check if session exists for that milestone. If yes, offer to resume or restart.
65
- If no, continue to `create_uat_file`.
66
-
67
- **If no active sessions AND no $ARGUMENTS:**
68
-
69
- ```
70
- No active UAT sessions.
71
-
72
- Provide a milestone ID to start testing (e.g., /declare:verify M-08)
73
- ```
74
-
75
- **If no active sessions AND $ARGUMENTS provided:**
76
-
77
- Continue to `create_uat_file`.
78
- </step>
79
-
80
- <step name="find_plans">
81
- **Find what to test:**
82
-
83
- Locate the milestone directory under `.planning/milestones/`.
84
-
85
- ```bash
86
- ls ".planning/milestones/${MILESTONE_DIR}/"*-PLAN.md 2>/dev/null
87
- ```
88
-
89
- Read each PLAN.md to extract testable deliverables from the `produces` fields and task descriptions.
90
- </step>
91
-
92
- <step name="extract_tests">
93
- **Extract testable deliverables from milestone PLAN.md files:**
94
-
95
- Parse each PLAN.md for:
96
- 1. **`produces` fields** — Explicit outputs listed per action/task
97
- 2. **User-facing changes** — UI, workflows, interactions described in task objectives
98
-
99
- Focus on USER-OBSERVABLE outcomes, not implementation details.
100
-
101
- For each deliverable, create a test:
102
- - name: Brief test name
103
- - expected: What the user should see/experience (specific, observable)
104
-
105
- Examples:
106
- - Produces: "agents/declare-debugger.md — working debug agent"
107
- → Test: "Declare Debugger Agent Exists"
108
- → Expected: "File agents/declare-debugger.md exists with proper YAML frontmatter (name, description, tools, color) and contains all core sections: philosophy, hypothesis_testing, investigation_techniques, debug_file_protocol, execution_flow."
109
-
110
- - Produces: "commands/declare/verify.md — /declare:verify command"
111
- → Test: "Verify Command Available"
112
- → Expected: "File commands/declare/verify.md exists, references @workflows/verify.md, and accepts M-XX as argument."
113
-
114
- Skip internal/non-observable items (refactors, config tweaks, etc.).
115
- </step>
116
-
117
- <step name="create_uat_file">
118
- **Create UAT file with all tests:**
119
-
120
- ```bash
121
- mkdir -p ".planning/milestones/${MILESTONE_DIR}"
122
- ```
123
-
124
- Build test list from extracted deliverables.
125
-
126
- Create file at `.planning/milestones/{milestone_dir}/{milestone_id}-UAT.md`:
127
-
128
- ```markdown
129
- ---
130
- status: testing
131
- milestone: {milestone_id}-{milestone_name}
132
- source: [list of PLAN.md files read]
133
- started: [ISO timestamp]
134
- updated: [ISO timestamp]
135
- ---
136
-
137
- ## Current Test
138
- <!-- OVERWRITE each test - shows where we are -->
139
-
140
- number: 1
141
- name: [first test name]
142
- expected: |
143
- [what user should observe]
144
- awaiting: user response
145
-
146
- ## Tests
147
-
148
- ### 1. [Test Name]
149
- expected: [observable behavior]
150
- result: [pending]
151
-
152
- ### 2. [Test Name]
153
- expected: [observable behavior]
154
- result: [pending]
155
-
156
- ...
157
-
158
- ## Summary
159
-
160
- total: [N]
161
- passed: 0
162
- issues: 0
163
- pending: [N]
164
- skipped: 0
165
-
166
- ## Gaps
167
-
168
- [none yet]
169
- ```
170
-
171
- Proceed to `present_test`.
172
- </step>
173
-
174
- <step name="present_test">
175
- **Present current test to user:**
176
-
177
- Read Current Test section from UAT file.
178
-
179
- Display using checkpoint box format:
180
-
181
- ```
182
- ╔══════════════════════════════════════════════════════════════╗
183
- ║ CHECKPOINT: Verification Required ║
184
- ╚══════════════════════════════════════════════════════════════╝
185
-
186
- **Test {number}: {name}**
187
-
188
- {expected}
189
-
190
- ──────────────────────────────────────────────────────────────
191
- → Type "pass" or describe what's wrong
192
- ──────────────────────────────────────────────────────────────
193
- ```
194
-
195
- Wait for user response (plain text, no AskUserQuestion).
196
- </step>
197
-
198
- <step name="process_response">
199
- **Process user response and update file:**
200
-
201
- **If response indicates pass:**
202
- - Empty response, "yes", "y", "ok", "pass", "next", "approved", "✓"
203
-
204
- Update Tests section:
205
- ```
206
- ### {N}. {name}
207
- expected: {expected}
208
- result: pass
209
- ```
210
-
211
- **If response indicates skip:**
212
- - "skip", "can't test", "n/a"
213
-
214
- Update Tests section:
215
- ```
216
- ### {N}. {name}
217
- expected: {expected}
218
- result: skipped
219
- reason: [user's reason if provided]
220
- ```
221
-
222
- **If response is anything else:**
223
- - Treat as issue description
224
-
225
- Infer severity from description:
226
- - Contains: crash, error, exception, fails, broken, unusable → blocker
227
- - Contains: doesn't work, wrong, missing, can't → major
228
- - Contains: slow, weird, off, minor, small → minor
229
- - Contains: color, font, spacing, alignment, visual → cosmetic
230
- - Default if unclear: major
231
-
232
- Update Tests section:
233
- ```
234
- ### {N}. {name}
235
- expected: {expected}
236
- result: issue
237
- reported: "{verbatim user response}"
238
- severity: {inferred}
239
- ```
240
-
241
- Append to Gaps section (structured YAML for diagnosis):
242
- ```yaml
243
- - test_id: {N}
244
- description: "{test name}"
245
- expected: "{expected behavior from test}"
246
- actual: "{verbatim user response}"
247
- severity: {inferred}
248
- root_cause: "" # Filled by declare-debugger diagnosis
249
- status: failed
250
- artifacts: [] # Filled by diagnosis
251
- missing: [] # Filled by diagnosis
252
- ```
253
-
254
- **After any response:**
255
-
256
- Update Summary counts.
257
- Update frontmatter.updated timestamp.
258
-
259
- If more tests remain → Update Current Test, go to `present_test`
260
- If no more tests → Go to `complete_session`
261
- </step>
262
-
263
- <step name="resume_from_file">
264
- **Resume testing from UAT file:**
265
-
266
- Read the full UAT file.
267
-
268
- Find first test with `result: [pending]`.
269
-
270
- Announce:
271
- ```
272
- Resuming: Milestone {milestone_id} UAT
273
- Progress: {passed + issues + skipped}/{total}
274
- Issues found so far: {issues count}
275
-
276
- Continuing from Test {N}...
277
- ```
278
-
279
- Update Current Test section with the pending test.
280
- Proceed to `present_test`.
281
- </step>
282
-
283
- <step name="complete_session">
284
- **Complete testing and commit:**
285
-
286
- Update frontmatter:
287
- - status: complete
288
- - updated: [now]
289
-
290
- Clear Current Test section:
291
- ```
292
- ## Current Test
293
-
294
- [testing complete]
295
- ```
296
-
297
- Commit the UAT file:
298
- ```bash
299
- node dist/declare-tools.cjs commit "test({milestone_id}): complete UAT - {passed} passed, {issues} issues" --files ".planning/milestones/{milestone_dir}/{milestone_id}-UAT.md"
300
- ```
301
-
302
- Present summary:
303
- ```
304
- ## UAT Complete: Milestone {milestone_id}
305
-
306
- | Result | Count |
307
- |--------|-------|
308
- | Passed | {N} |
309
- | Issues | {N} |
310
- | Skipped| {N} |
311
-
312
- [If issues > 0:]
313
- ### Issues Found
314
-
315
- [List from Issues section]
316
- ```
317
-
318
- **If issues > 0:** Proceed to `diagnose_issues`
319
-
320
- **If issues == 0:**
321
- ```
322
- All tests passed. Ready to continue.
323
-
324
- - `/declare:milestones` — View milestone status
325
- - `/declare:execute M-{next}` — Execute next milestone
326
- ```
327
- </step>
328
-
329
- <step name="diagnose_issues">
330
- **Diagnose root causes before planning fixes:**
331
-
332
- ```
333
- ---
334
-
335
- {N} issues found. Diagnosing root causes...
336
-
337
- Spawning parallel debug agents to investigate each issue.
338
- ```
339
-
340
- For each gap in the UAT file:
341
- 1. Spawn a `declare-debugger` agent in `goal: find_root_cause_only` mode
342
- 2. Pass gap details as pre-filled symptoms (`symptoms_prefilled: true`)
343
- 3. Collect root causes from each agent's ROOT CAUSE FOUND response
344
- 4. Update UAT.md Gaps section with `root_cause` for each gap
345
-
346
- All agents run in parallel — diagnosis overhead is minimal.
347
-
348
- After all diagnoses complete, update UAT file with root causes, then proceed to `plan_gap_closure`.
349
- </step>
350
-
351
- <step name="plan_gap_closure">
352
- **Auto-plan fixes from diagnosed gaps:**
353
-
354
- Display:
355
- ```
356
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
357
- DECLARE ► PLANNING FIXES
358
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
359
-
360
- ◆ Spawning planner for gap closure...
361
- ```
362
-
363
- Spawn declare-planner in gap_closure mode with:
364
- - The diagnosed UAT file
365
- - Current STATE.md
366
- - Current milestone PLAN.md files as context
367
-
368
- On return:
369
- - **PLANNING COMPLETE:** Proceed to `verify_gap_plans`
370
- - **PLANNING INCONCLUSIVE:** Report and offer manual intervention
371
- </step>
372
-
373
- <step name="verify_gap_plans">
374
- **Verify fix plans:**
375
-
376
- Display:
377
- ```
378
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
379
- DECLARE ► VERIFYING FIX PLANS
380
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
381
-
382
- ◆ Reviewing fix plans...
383
- ```
384
-
385
- Initialize: `iteration_count = 1`
386
-
387
- Review gap closure plans for completeness and correctness:
388
- - Each diagnosed gap has a corresponding fix plan
389
- - Fix plans address the root cause, not just symptoms
390
- - No missing steps or broken dependencies
391
-
392
- On review:
393
- - **PLANS VALID:** Proceed to `present_ready`
394
- - **ISSUES FOUND:** Return to plan_gap_closure with feedback (max 3 iterations)
395
-
396
- **If iteration_count >= 3:**
397
-
398
- Display: `Max iterations reached. {N} issues remain.`
399
-
400
- Offer options:
401
- 1. Force proceed (execute despite issues)
402
- 2. Provide guidance (user gives direction, retry)
403
- 3. Abandon (exit, user runs `/declare:verify M-{milestone}` manually)
404
-
405
- Wait for user response.
406
- </step>
407
-
408
- <step name="present_ready">
409
- **Present completion and next steps:**
410
-
411
- ```
412
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
413
- DECLARE ► FIXES READY
414
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
415
-
416
- **Milestone {milestone_id}: {milestone_name}** — {N} gap(s) diagnosed, {M} fix plan(s) created
417
-
418
- | Gap | Root Cause | Fix Plan |
419
- |-----|------------|----------|
420
- | {description 1} | {root_cause} | {action_id} |
421
- | {description 2} | {root_cause} | {action_id} |
422
-
423
- Plans verified and ready for execution.
424
-
425
- ───────────────────────────────────────────────────────────────
426
-
427
- ## Next Up
428
-
429
- **Execute fixes** — run fix plans
430
-
431
- `/clear` then `/declare:execute M-{milestone_id} --gaps-only`
432
-
433
- ───────────────────────────────────────────────────────────────
434
- ```
435
- </step>
436
-
437
- </process>
438
-
439
- <update_rules>
440
- **Batched writes for efficiency:**
441
-
442
- Keep results in memory. Write to file only when:
443
- 1. **Issue found** — Preserve the problem immediately
444
- 2. **Session complete** — Final write before commit
445
- 3. **Checkpoint** — Every 5 passed tests (safety net)
446
-
447
- | Section | Rule | When Written |
448
- |---------|------|--------------|
449
- | Frontmatter.status | OVERWRITE | Start, complete |
450
- | Frontmatter.updated | OVERWRITE | On any file write |
451
- | Current Test | OVERWRITE | On any file write |
452
- | Tests.{N}.result | OVERWRITE | On any file write |
453
- | Summary | OVERWRITE | On any file write |
454
- | Gaps | APPEND | When issue found |
455
-
456
- On context reset: File shows last checkpoint. Resume from there.
457
- </update_rules>
458
-
459
- <severity_inference>
460
- **Infer severity from user's natural language:**
461
-
462
- | User says | Infer |
463
- |-----------|-------|
464
- | "crashes", "error", "exception", "fails completely" | blocker |
465
- | "doesn't work", "nothing happens", "wrong behavior" | major |
466
- | "works but...", "slow", "weird", "minor issue" | minor |
467
- | "color", "spacing", "alignment", "looks off" | cosmetic |
468
-
469
- Default to **major** if unclear. User can correct if needed.
470
-
471
- **Never ask "how severe is this?"** - just infer and move on.
472
- </severity_inference>
473
-
474
- <gap_format>
475
- **Gap YAML written to UAT.md on each issue found:**
476
-
477
- ```yaml
478
- - test_id: {N}
479
- description: "{test name}"
480
- expected: "{expected behavior from test}"
481
- actual: "{verbatim user response}"
482
- severity: {blocker|major|minor|cosmetic}
483
- root_cause: "" # Populated by declare-debugger
484
- status: failed
485
- artifacts: [] # Populated by declare-debugger (files involved)
486
- missing: [] # Populated by declare-debugger (what was missing)
487
- ```
488
-
489
- This structured format feeds directly into the declare-debugger diagnosis mode and gap closure planning.
490
- </gap_format>
491
-
492
- <success_criteria>
493
- - [ ] UAT file created with all tests from milestone PLAN.md "produces" fields
494
- - [ ] Tests presented one at a time with expected behavior
495
- - [ ] User responses processed as pass/issue/skip
496
- - [ ] Severity inferred from description (never asked)
497
- - [ ] Batched writes: on issue, every 5 passes, or completion
498
- - [ ] Committed on completion
499
- - [ ] If issues: parallel declare-debugger agents diagnose root causes
500
- - [ ] Gap format includes test_id, description, expected, actual, severity, root_cause
501
- - [ ] If issues: fix plans created covering all diagnosed gaps
502
- - [ ] If issues: fix plans verified before presenting to user
503
- - [ ] Ready for `/declare:execute M-{id} --gaps-only` when complete
504
- </success_criteria>