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,320 +0,0 @@
1
- ---
2
- name: declare:plan
3
- description: Create detailed EXEC-PLAN files for milestone actions with planner/checker verification loop
4
- argument-hint: "[M-XX] [--skip-research]"
5
- agent: declare-planner
6
- allowed-tools:
7
- - Read
8
- - Write
9
- - Bash
10
- - Glob
11
- - Grep
12
- - Task
13
- - WebFetch
14
- - mcp__context7__*
15
- ---
16
- <objective>
17
- Create executable EXEC-PLAN files for all actions in a milestone with integrated verification.
18
-
19
- **Default flow:** Load context → optional research check → spawn declare-planner → spawn declare-plan-checker → if issues spawn planner for revision (max 3 iterations) → commit
20
-
21
- **Orchestrator role:** Parse arguments, validate milestone, load context, spawn declare-planner, verify with declare-plan-checker, iterate until pass or max iterations, present results.
22
- </objective>
23
-
24
- <context>
25
- Milestone: $ARGUMENTS (matching pattern M-XX, e.g. M-01)
26
-
27
- **Flags:**
28
- - `--skip-research` — Skip research check, go straight to planning
29
- </context>
30
-
31
- <process>
32
-
33
- **Step 1: Parse arguments.**
34
-
35
- Extract milestone ID from `$ARGUMENTS` (pattern `M-XX`). If not provided or unrecognized, list available milestones:
36
-
37
- ```bash
38
- node dist/declare-tools.cjs load-graph
39
- ```
40
-
41
- Parse the JSON output. Display a numbered list of milestones with their status and action counts. Ask the user which milestone to plan.
42
-
43
- Check if `--skip-research` is present in `$ARGUMENTS`.
44
-
45
- **Step 2: Load milestone data.**
46
-
47
- ```bash
48
- node dist/declare-tools.cjs load-graph
49
- ```
50
-
51
- Parse the JSON output. Find the milestone matching the ID. Extract:
52
- - `milestone`: milestone ID and title (from `milestones` array)
53
- - `declarations`: upstream declarations that realize this milestone (trace via `realizes` field)
54
- - `actions`: all actions whose `causes` array includes this milestone ID
55
- - `milestoneFolderPath`: derive as `.planning/milestones/M-XX-<slug>/`
56
- - `researchPath`: `.planning/milestones/M-XX-<slug>/RESEARCH.md` if it exists
57
- - `contextPath`: `.planning/milestones/M-XX-<slug>/CONTEXT.md` if it exists
58
-
59
- If no actions found, display: "No actions found for M-XX. Run `/declare:actions M-XX` first to create the milestone plan." and exit.
60
-
61
- If all actions already have EXEC-PLANs and status is not PENDING, display: "All actions for M-XX already have EXEC-PLANs. Use `/declare:execute M-XX` to run them." and exit.
62
-
63
- **Step 3: Ensure milestone context exists.**
64
-
65
- Check if CONTEXT.md exists at `milestoneFolderPath/CONTEXT.md`.
66
-
67
- If CONTEXT.md does **not** exist, use AskUserQuestion:
68
- - header: "Context"
69
- - question: "Milestone [M-XX] has no implementation context yet. Discussing decisions now gives the planner the information it needs to create better EXEC-PLANs."
70
- - options:
71
- - "Discuss first (Recommended)" — Run discuss workflow, then proceed to planning
72
- - "Plan without context" — Skip; planner will use its own judgment
73
-
74
- If "Discuss first":
75
-
76
- Display: `Running /declare:discuss [M-XX]...`
77
-
78
- Spawn a Task agent:
79
- - subagent_type: `general-purpose`
80
- - model: `opus`
81
- - description: `Discuss M-XX implementation decisions`
82
- - prompt:
83
- ```
84
- Run /declare:discuss [M-XX] for the Declare project.
85
- Working directory: [absolute cwd]
86
- Follow all instructions in commands/declare/discuss.md.
87
- After capturing context, return DONE.
88
- ```
89
-
90
- Wait for the task to complete. Then reload `contextPath` — CONTEXT.md should now exist.
91
-
92
- If "Plan without context": continue to Step 4.
93
-
94
- **Step 4: Research check (unless --skip-research).**
95
-
96
- If `researchPath` exists, display:
97
- ```
98
- RESEARCH.md found at [researchPath]. Using existing research.
99
- ```
100
-
101
- If `researchPath` does not exist, assess whether research is needed:
102
-
103
- - If actions involve new external libraries, external APIs, or major architectural decisions → suggest research:
104
- ```
105
- Research recommended for M-XX ([title]).
106
- Actions involve: [brief reason, e.g., "new external service integration"].
107
- Run `/declare:research M-XX` first, or pass --skip-research to plan without research.
108
- ```
109
- Ask: "Proceed without research? (yes/no)" If no, exit.
110
-
111
- - If actions are purely internal (refactoring, adding features to existing patterns, docs) → skip silently.
112
-
113
- **Step 5: Load context files.**
114
-
115
- ```bash
116
- cat [contextPath] 2>/dev/null # CONTEXT.md if exists
117
- cat [researchPath] 2>/dev/null # RESEARCH.md if exists
118
- cat .planning/MILESTONES.md # Full milestones for declaration context
119
- cat .planning/FUTURE.md 2>/dev/null # Declarations source of truth
120
- cat .planning/STATE.md 2>/dev/null # Current position and decisions
121
- ```
122
-
123
- Also read the milestone's PLAN.md (at `milestoneFolderPath/PLAN.md`) for action details.
124
-
125
- **Step 6: Spawn declare-planner.**
126
-
127
- Spawn a Task agent using `agents/declare-planner.md` with `model: "opus"` and the following prompt:
128
-
129
- ```
130
- Plan milestone ${MILESTONE} actions.
131
-
132
- Context loaded:
133
- - Milestone: [milestone title]
134
- - Declarations: [D-XX: statement, ...]
135
- - Actions: [A-XX: title (produces: ..., dependsOn: [...])]
136
- - Milestone folder: [milestoneFolderPath]
137
- - CONTEXT.md: [contents or "not found"]
138
- - RESEARCH.md: [contents or "not found"]
139
- - MILESTONES.md: [relevant milestone section]
140
- - FUTURE.md: [relevant declaration statements]
141
- - STATE.md decisions: [relevant decisions]
142
-
143
- For each action, create an EXEC-PLAN file at:
144
- [milestoneFolderPath]/[action-id]-EXEC-PLAN.md
145
-
146
- Follow all instructions in agents/declare-planner.md.
147
- Return: PLANNING COMPLETE with wave structure and EXEC-PLANs created.
148
- ```
149
-
150
- Wait for the planner to complete.
151
-
152
- **Step 7: Spawn declare-plan-checker.**
153
-
154
- After planner completes, spawn a Task agent using `agents/declare-plan-checker.md` with `model: "haiku"` and the following prompt:
155
-
156
- ```
157
- Verify EXEC-PLAN files for milestone ${MILESTONE}.
158
-
159
- Context:
160
- - Milestone: [milestone title]
161
- - Declarations: [D-XX: statement, ...]
162
- - Milestone folder: [milestoneFolderPath]
163
- - CONTEXT.md: [contents or "not found"]
164
- - MILESTONES.md: [relevant milestone section]
165
-
166
- EXEC-PLANs to verify:
167
- [list of EXEC-PLAN file paths created by planner]
168
-
169
- Follow all instructions in agents/declare-plan-checker.md.
170
- Return: VERIFICATION PASSED or ISSUES FOUND with structured issues YAML.
171
- ```
172
-
173
- Wait for the checker to complete.
174
-
175
- **Step 8: Evaluate checker result.**
176
-
177
- Parse the checker's return.
178
-
179
- If **VERIFICATION PASSED**: proceed to Step 10.
180
-
181
- If **ISSUES FOUND**: proceed to Step 9 (revision loop).
182
-
183
- **Step 9: Revision loop (max 3 iterations).**
184
-
185
- Track revision count. If revision count >= 3, skip to Step 9 with a warning.
186
-
187
- Spawn declare-planner again in revision mode with `model: "opus"`:
188
-
189
- ```
190
- Revise EXEC-PLAN files for milestone ${MILESTONE} based on checker feedback.
191
-
192
- This is revision attempt [N] of 3.
193
-
194
- Checker issues found:
195
- [paste the structured issues YAML from checker]
196
-
197
- Existing EXEC-PLANs:
198
- [list of EXEC-PLAN file paths]
199
-
200
- Context:
201
- - Milestone folder: [milestoneFolderPath]
202
- - CONTEXT.md: [contents or "not found"]
203
-
204
- Follow revision_mode instructions in agents/declare-planner.md.
205
- Make targeted fixes only — do not rewrite working plans.
206
- Return: REVISION COMPLETE with changes made.
207
- ```
208
-
209
- After revision, re-run checker (Step 7). Increment revision count.
210
-
211
- Repeat until VERIFICATION PASSED or revision count reaches 3.
212
-
213
- **Step 10: Commit EXEC-PLANs.**
214
-
215
- Pass each file as a separate `--files` argument (not space-separated in one argument):
216
-
217
- ```bash
218
- node dist/declare-tools.cjs commit "docs(${MILESTONE}): create exec-plans for milestone actions" --files [path/to/A-01-EXEC-PLAN.md] --files [path/to/A-02-EXEC-PLAN.md]
219
- ```
220
-
221
- If the commit reports `nothing_to_commit`, the planner already committed the files — that is fine, continue.
222
-
223
- **Step 11: Present results.**
224
-
225
- Display final summary:
226
-
227
- ```
228
- ## Planning Complete: M-XX — [milestone title]
229
-
230
- **Actions planned:** [N] action(s) in [M] wave(s)
231
- **Checker:** [PASSED | PASSED after N revision(s) | Warning: max revisions reached]
232
-
233
- ### Wave Structure
234
-
235
- | Wave | Actions | Autonomous |
236
- | ---- | ------- | ---------- |
237
- | 1 | A-01, A-02 | yes, yes |
238
- | 2 | A-03 | no (has checkpoint) |
239
-
240
- ### EXEC-PLANs Created
241
-
242
- | Action | Title | Tasks | Wave |
243
- | ------ | ----- | ----- | ---- |
244
- | A-01 | [title] | [N] | 1 |
245
- | A-02 | [title] | [N] | 1 |
246
-
247
- ### Next Steps
248
-
249
- ```
250
-
251
- After displaying the summary, reload the graph and check for milestones that still have no EXEC-PLANs (hasPlan is false OR actions array for that milestone has no EXEC-PLAN files):
252
-
253
- - If **other milestones still need planning**, list them and suggest planning those next:
254
- ```
255
- Remaining milestones to plan:
256
- /declare:plan M-02 — [title]
257
- /declare:plan M-03 — [title]
258
-
259
- Plan all milestones before executing. Run /declare:execute only when all are planned.
260
- ```
261
-
262
- - If **this was the last milestone to plan**, compute dependency waves before spawning anything — do not blindly parallelize all milestones.
263
-
264
- **Step A: Compute milestone dependency waves.**
265
-
266
- Load the graph, then read each milestone's PLAN.md. For each action, check its `dependsOn` field. If an action in M-02 lists `dependsOn: ["A-01"]` and A-01 belongs to M-01, then M-02 depends on M-01.
267
-
268
- Build a milestone-level dependency graph from these cross-milestone action references. Run a topological sort (Kahn's algorithm) to group milestones into waves:
269
- - Wave 1: milestones with no dependencies on other pending milestones
270
- - Wave 2: milestones whose dependencies are all in wave 1
271
- - …and so on
272
-
273
- If no cross-milestone `dependsOn` edges exist, all milestones go into wave 1 (full parallelism). Show the wave plan before executing:
274
-
275
- ```
276
- ## Milestone Execution Waves
277
-
278
- Wave 1 (parallel): M-01 [title], M-03 [title]
279
- Wave 2 (after wave 1): M-02 [title]
280
- ```
281
-
282
- **Step B: Execute wave by wave using the Task tool.**
283
-
284
- For each wave, spawn one Task agent per milestone **in the same response** so they execute in parallel:
285
-
286
- Subagent type: `gsd-executor`
287
- model: `opus`
288
- Prompt per milestone:
289
- ```
290
- Execute milestone [M-XX] "[title]" for the Declare project.
291
- Working directory: [absolute path to cwd]
292
- Run: /declare:execute [M-XX]
293
- EXEC-PLANs are in: [absolute path to milestone folder]
294
- ```
295
-
296
- Wait for the entire wave to complete before spawning the next wave.
297
-
298
- After all waves finish, propagate statuses:
299
- ```bash
300
- node dist/declare-tools.cjs sync-status
301
- ```
302
-
303
- If max revisions reached with issues remaining, display blocker list prominently:
304
-
305
- ```
306
- ### Remaining Issues (not resolved after 3 revisions)
307
-
308
- [list issues with fix hints]
309
-
310
- Consider reviewing EXEC-PLANs manually at: [milestoneFolderPath]
311
- ```
312
-
313
- **Error handling:**
314
-
315
- - If `load-graph` returns an error, display it and exit.
316
- - If planner fails to create EXEC-PLANs, display the error and suggest checking the milestone folder exists.
317
- - If checker returns malformed output (not VERIFICATION PASSED or ISSUES FOUND), treat as passed and log a warning.
318
- - If commit fails, display the error but do not block — planning work is already on disk.
319
-
320
- </process>
@@ -1,65 +0,0 @@
1
- ---
2
- description: Rank actions by unblocking power (dependency weight score)
3
- allowed-tools:
4
- - Read
5
- - Bash
6
- - Grep
7
- - Glob
8
- ---
9
-
10
- Show a ranked list of actions ordered by their unblocking power -- how many milestones and declarations each action contributes to.
11
-
12
- **Step 1: Build the command.**
13
-
14
- Start with the base command:
15
-
16
- ```bash
17
- node dist/declare-tools.cjs prioritize
18
- ```
19
-
20
- If `$ARGUMENTS` contains `--declaration D-XX`:
21
- - Append `--declaration D-XX` to filter actions to those under a specific declaration's subtree:
22
-
23
- ```bash
24
- node dist/declare-tools.cjs prioritize --declaration D-XX
25
- ```
26
-
27
- If `$ARGUMENTS` contains `--output <path>`:
28
- - Append `--output <path>` to write the ranking to a file:
29
-
30
- ```bash
31
- node dist/declare-tools.cjs prioritize --output <path>
32
- ```
33
-
34
- Both flags can be combined.
35
-
36
- **Step 2: Run the command and parse JSON output.**
37
-
38
- **Step 3: Handle errors.**
39
-
40
- If the output contains an `error` field:
41
- - Display the error message.
42
- - If "not found", suggest checking declaration IDs with `/declare:status`.
43
- - If "No Declare project", suggest running `/declare:init`.
44
-
45
- **Step 4: Display the ranking.**
46
-
47
- If `totalActions` is 0:
48
- - Display: "No actions found. Create actions first with `/declare:actions`."
49
- - Stop here.
50
-
51
- Otherwise, render the ranked list as a formatted table:
52
-
53
- | Rank | ID | Action | Score |
54
- |------|----|--------|-------|
55
- | 1 | A-03 | [title] | 4 |
56
- | 2 | A-01 | [title] | 3 |
57
- | ... | ... | ... | ... |
58
-
59
- Use the `ranking` array from the JSON output. Each entry has: `rank`, `id`, `title`, `score`.
60
-
61
- **Explain the score:** "Score = number of milestones and declarations this action contributes to (unblocking power). Higher score means completing this action unblocks more of the graph."
62
-
63
- If `filter` is non-null, note: "Filtered to actions under **[filter]**."
64
-
65
- If `outputFile` is present in the result, inform the user: "Output written to [path]."
@@ -1,116 +0,0 @@
1
- ---
2
- name: declare:progress
3
- description: Show current project position, recent work summary, and route to the next action
4
- allowed-tools:
5
- - Read
6
- - Bash
7
- - Glob
8
- - Grep
9
- ---
10
-
11
- Show project progress, summarize recent work, and route to the appropriate next action.
12
-
13
- **Step 1: Load state and graph.**
14
-
15
- Run both commands:
16
-
17
- ```bash
18
- node dist/declare-tools.cjs get-state
19
- ```
20
-
21
- ```bash
22
- node dist/declare-tools.cjs load-graph
23
- ```
24
-
25
- Parse both JSON outputs.
26
-
27
- If `get-state` returns an error (STATE.md not found), display:
28
-
29
- ```
30
- No STATE.md found. Run /declare:new-project to initialize this project.
31
- ```
32
-
33
- Then stop.
34
-
35
- **Step 2: Determine current position.**
36
-
37
- From the `get-state` output, extract:
38
- - `currentPosition`: the milestone or action currently active
39
- - `recentWork`: what was last worked on
40
- - `decisions`: key decisions recorded
41
- - `sessionHistory`: last session entries
42
-
43
- From the `load-graph` output, extract:
44
- - `milestones` array: find milestones with status `PENDING` or `ACTIVE`
45
- - `actions` array: find actions for the active milestone with status `PENDING` or `ACTIVE`
46
- - Count total milestones, total done milestones, total actions done
47
-
48
- **Step 3: Display progress dashboard.**
49
-
50
- Render a compact, scannable summary:
51
-
52
- ```
53
- ## Project Progress
54
-
55
- **Position:** [currentPosition from STATE.md]
56
- **Milestones:** [done count] / [total count] complete
57
- **Graph health:** [health field from load-graph, or "unknown" if absent]
58
-
59
- ### Active Milestone
60
-
61
- [If an ACTIVE milestone exists, show:]
62
- **[M-XX]: [title]** — [status]
63
- Actions: [done]/[total] complete
64
-
65
- [pending actions listed as:]
66
- - A-XX: [title] (PENDING)
67
- - A-XX: [title] (DONE)
68
-
69
- ### Recent Work
70
-
71
- [recentWork from STATE.md, or "(no recent work recorded)" if empty]
72
-
73
- ### What's Next
74
-
75
- [See routing logic in Step 4]
76
- ```
77
-
78
- **Step 4: Route to next action.**
79
-
80
- Evaluate project state and present the appropriate option(s):
81
-
82
- **Route A — Active milestone with pending actions:**
83
- - "Actions remain for [M-XX]. Ready to continue."
84
- - Offer: "Run `/declare:execute [M-XX]` to continue execution"
85
-
86
- **Route B — Milestone just completed, not yet verified:**
87
- - "[M-XX] is DONE but not yet verified."
88
- - Offer: "Run `/declare:verify [M-XX]` to verify milestone truth"
89
-
90
- **Route C — All milestones for active declarations complete:**
91
- - "All milestones for the current declaration wave are complete."
92
- - Offer: "Run `/declare:complete-milestone` or plan the next milestone with `/declare:new-cycle`"
93
-
94
- **Route D — No active milestone:**
95
- - "No active milestone found."
96
- - Offer: "Run `/declare:new-cycle` to plan the next milestone, or `/declare:status` to review the full graph"
97
-
98
- **Route E — No declarations exist:**
99
- - "No declarations found. Start by defining what you want to be true."
100
- - Offer: "Run `/declare:future` to add your first declaration"
101
-
102
- **Route F — Graph load error:**
103
- - Display the error from `load-graph`
104
- - Offer: "Run `/declare:health` to diagnose and repair the project structure"
105
-
106
- Present routes as a numbered list when more than one applies. Keep suggestions concise — one line per option.
107
-
108
- **Step 5: Update session record.**
109
-
110
- After displaying the dashboard, record the session view:
111
-
112
- ```bash
113
- node dist/declare-tools.cjs record-session --stopped-at "Checked progress — [currentPosition]"
114
- ```
115
-
116
- Do not display the output of this command.
@@ -1,119 +0,0 @@
1
- ---
2
- description: Execute a quick ad-hoc task with atomic commits outside the milestone structure
3
- argument-hint: "[task description] [--full]"
4
- allowed-tools:
5
- - Read
6
- - Write
7
- - Edit
8
- - Glob
9
- - Grep
10
- - Bash
11
- - Task
12
- ---
13
-
14
- Execute a small, ad-hoc task with atomic commits. Quick tasks live in `.planning/quick/` separate from milestone-driven phases.
15
-
16
- **Default:** Skips plan-checking and verification. Use when you know exactly what to do.
17
-
18
- **`--full` flag:** Adds plan-review before execution and a verification step after. Use when you want quality guarantees without full milestone ceremony.
19
-
20
- **Step 1: Get the task description.**
21
-
22
- Parse `$ARGUMENTS` for a task description and a `--full` flag.
23
-
24
- If `$ARGUMENTS` contains text other than `--full`, treat that text as the task description. Strip `--full` from the description.
25
-
26
- If `$ARGUMENTS` is empty or contains only `--full`, ask:
27
-
28
- "What would you like to do? Describe the task in one or two sentences."
29
-
30
- Wait for the user's reply and use it as the task description.
31
-
32
- **Step 2: Create the quick task folder.**
33
-
34
- ```bash
35
- node dist/declare-tools.cjs quick-task --description "[task description]"
36
- ```
37
-
38
- Parse the JSON output. It contains `id`, `folder`, `planPath`, and `committed`.
39
-
40
- Display:
41
-
42
- ```
43
- Quick Task [id] created: [folder]
44
- ```
45
-
46
- **Step 3 (--full only): Plan review.**
47
-
48
- If `--full` flag is present:
49
-
50
- Read the QUICK-PLAN.md at `planPath`:
51
-
52
- ```bash
53
- cat [planPath]
54
- ```
55
-
56
- Review the plan and display a brief assessment (2-4 bullet points):
57
-
58
- ```
59
- ## Plan Review
60
-
61
- - [Assessment of scope and approach]
62
- - [Any potential issues or missing steps]
63
- - [Suggested refinements if needed]
64
- ```
65
-
66
- Ask: "Proceed with this plan? (yes/refine)"
67
-
68
- If "refine": ask for clarification, update the QUICK-PLAN.md with the refined plan, then continue.
69
-
70
- If "yes": proceed to Step 4.
71
-
72
- If `--full` is NOT present, skip this step and proceed directly to Step 4.
73
-
74
- **Step 4: Execute the task.**
75
-
76
- Spawn a Task agent with `subagent_type="general-purpose"` to execute the work:
77
-
78
- ```
79
- Execute the quick task described below. Make atomic commits after each logical unit of work.
80
-
81
- Task: [task description]
82
- Plan file: [planPath]
83
-
84
- Read the plan file for context. Do the work. When complete, report:
85
- - What was done
86
- - Files created or modified
87
- - Commit hashes
88
- - Any issues encountered
89
- ```
90
-
91
- Wait for the Task agent to complete. Display its report.
92
-
93
- **Step 5 (--full only): Verification.**
94
-
95
- If `--full` flag is present:
96
-
97
- Ask: "Does the completed work match what you expected? Review the agent's report above. (yes/issues)"
98
-
99
- If "issues": describe what is missing or wrong, then re-spawn the Task agent with the correction context appended.
100
-
101
- If "yes": proceed to Step 6.
102
-
103
- If `--full` is NOT present, proceed directly to Step 6.
104
-
105
- **Step 6: Report completion.**
106
-
107
- Display:
108
-
109
- ```
110
- ## Quick Task Complete
111
-
112
- **Task:** [task description]
113
- **Folder:** [folder]
114
- **Mode:** [default | full]
115
- ```
116
-
117
- List all files created or modified and all commit hashes from the agent's report.
118
-
119
- Suggest: "Run `/declare:status` to see overall project health."