@winton979/task-cli 1.4.1 → 1.4.2

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 (3) hide show
  1. package/README.md +317 -280
  2. package/package.json +1 -1
  3. package/src/init.js +82 -8
package/README.md CHANGED
@@ -1,280 +1,317 @@
1
- # task-cli
2
-
3
- A workflow methodology for AI coding agents.
4
-
5
- Task CLI separates requirement exploration from implementation, so AI agents decide whether complexity is justified **before** they start coding.
6
-
7
- **Explore** — Understand the problem. Assess whether additional complexity is warranted.
8
- **Implement** — Solve the accepted problem with the least necessary complexity.
9
- **Review** — Validate against the brief, not against new ideas introduced during coding.
10
-
11
- Designed for:
12
-
13
- * Claude Code
14
- * Codex CLI
15
- * Mature codebases with frequent bug fixes and small feature iterations
16
-
17
- > **Core principle**
18
- > Explore decides whether complexity is justified.
19
- > Implement decides how to satisfy the requirement with the least necessary complexity.
20
-
21
- ---
22
-
23
- ## Why task-cli?
24
-
25
- ### Traditional AI Workflow
26
-
27
- ```text
28
- Requirement → Solution Design → Code → Review
29
- ```
30
-
31
- The AI often starts designing before the requirement is fully clarified. Complexity gets introduced during coding, and review happens against whatever the AI produced rather than against the original intent.
32
-
33
- ### task-cli Workflow
34
-
35
- ```text
36
- Requirement
37
-
38
- Explore ──► Understand + Challenge
39
-
40
- Complexity Assessment ──► Is added complexity justified?
41
-
42
- Brief
43
-
44
- Implement ──► Simplest acceptable solution
45
-
46
- Review ──► Validate against the brief
47
- ```
48
-
49
- Exploration and implementation are intentionally separated.
50
-
51
- ---
52
-
53
- ## Core Philosophy
54
-
55
- Most AI coding agents fail because they mix exploration and implementation in the same conversation. Task CLI intentionally separates them.
56
-
57
- | Stage | Question |
58
- | ------------------------- | ------------------------------------------ |
59
- | Explore | What problem are we solving? |
60
- | Complexity Assessment | Is additional complexity justified? |
61
- | Implement | What is the simplest acceptable solution? |
62
- | Review | Did we satisfy the brief? |
63
-
64
- This keeps AI agents from over-designing solutions during requirement discovery, and keeps implementation focused on the accepted scope.
65
-
66
- ---
67
-
68
- ## Installation
69
-
70
- ```bash
71
- npm install -g @winton979/task-cli
72
- ```
73
-
74
- Initialize the workflow in your project:
75
-
76
- ```bash
77
- task init
78
- ```
79
-
80
- After initialization, Task CLI creates the `.ai/` workspace and installs workflow skills into both `.claude/skills/` and `.codex/skills/`.
81
-
82
- ### Prerequisites
83
-
84
- Task CLI can use a Grill Me compatible skill for requirement and bug exploration.
85
-
86
- Recommended:
87
-
88
- ```bash
89
- npx add-skill PJ-SBN-593844/skill-grill-me
90
- ```
91
-
92
- If no Grill Me compatible skill is installed, `task-fast`, `task-explore`, and `bug-explore` fall back to built-in clarification prompts.
93
-
94
- ---
95
-
96
- ## Quick Start
97
-
98
- ### Small Feature / Enhancement
99
-
100
- ```text
101
- /task-fast
102
-
103
- clarify + brief + implement + validate
104
-
105
- /task-review or /task-cancel
106
- ```
107
-
108
- ### Larger Requirement
109
-
110
- ```text
111
- /task-explore → TASK_READY → /task-implement → /task-review or /task-cancel
112
- ```
113
-
114
- ### Bug Fix
115
-
116
- ```text
117
- /bug-explore → BUG_READY → /bug-fix → /bug-review or /bug-cancel
118
- ```
119
-
120
- ### CLI Commands
121
-
122
- ```bash
123
- task init # initialize workspace and install skills
124
- task refresh # reinstall managed skills without touching .ai content
125
- task doctor # check workspace state, skill versions, gitignore rules
126
- task --help
127
- ```
128
-
129
- ---
130
-
131
- ## Example: Preventing Over-Engineering
132
-
133
- **Requirement:** *"Add CSV export."*
134
-
135
- ### Without task-cli
136
-
137
- Common AI behavior — jumps straight into designing:
138
-
139
- * `ExportService`
140
- * `ExportRepository`
141
- * `CSVAdapter`
142
- * `Factory`
143
- * new dependency
144
-
145
- **Files changed:** 7
146
- **New abstractions:** 4
147
-
148
- ### With task-cli
149
-
150
- Exploration runs first. Complexity Assessment determines that a new project-wide capability is not justified.
151
-
152
- Implementation:
153
-
154
- * reuse existing export path
155
- * modify two files
156
- * no new dependency
157
-
158
- **Files changed:** 2
159
- **New abstractions:** 0
160
-
161
- The workflow encourages the simplest acceptable implementation instead of the most elaborate one.
162
-
163
- ---
164
-
165
- ## Available Skills
166
-
167
- **Task Workflow**
168
-
169
- * `task-fast`
170
- * `task-explore`
171
- * `task-implement`
172
- * `task-review`
173
- * `task-cancel`
174
-
175
- **Bug Workflow**
176
-
177
- * `bug-explore`
178
- * `bug-fix`
179
- * `bug-review`
180
- * `bug-cancel`
181
-
182
- **Decision Logging**
183
-
184
- * `decision-log`
185
- * `decision-sweep-weekly`
186
-
187
- ---
188
-
189
- ## Decision Logging
190
-
191
- Task CLI keeps a lightweight decision trail in `.ai/decisions/decisions.md`. Explore and fast-path skills should consult it before finalizing a brief, and pull in only the decisions that materially constrain the current task or bug.
192
-
193
- The decisions file is intentionally narrow. It holds durable project invariants and reusable constraints, not a running transcript of every local implementation choice.
194
-
195
- ### Weekly Decision Sweep
196
-
197
- Calling `/decision-log` after every task is easy to forget. As a lower-friction alternative, run once per week (Friday is a natural fit):
198
-
199
- ```
200
- /decision-sweep-weekly
201
- ```
202
-
203
- The skill scans archived task and bug briefs from the past 7 days, judges which ones contain a decision worth keeping (cross-task impact, rejected alternatives, counter-intuitive choices, externally driven calls, or instructive cancellations), drafts the entries, and waits for confirmation before writing to `.ai/decisions/decisions.md`. When a draft overlaps with an existing decision, it presents both versions and asks whether to append, revise, merge, supersede, or skip.
204
-
205
- Use `decision-log` for in-the-moment recording and `decision-sweep-weekly` for periodic cleanup. Either alone is enough.
206
-
207
- ---
208
-
209
- ## Directory Structure
210
-
211
- ```text
212
- .ai/
213
- ├── tasks/
214
- │ ├── active/
215
- │ └── archive/
216
- ├── bugs/
217
- │ ├── active/
218
- │ └── archive/
219
- └── decisions/
220
- └── decisions.md
221
-
222
- .claude/skills/
223
- .codex/skills/
224
- ```
225
-
226
- The `archive/` directories are internal storage, not user-facing steps.
227
-
228
- ---
229
-
230
- ## Compared with OpenSpec-Style Workflows
231
-
232
- Detailed specification workflows such as OpenSpec can improve alignment, traceability, and consistency for large initiatives, cross-team programs, and process-heavy environments.
233
-
234
- The difficulty is that the same level of ceremony does not fit day-to-day engineering. For frequent bug fixes, small features, and fast iteration, the process becomes heavier than the change itself — maintenance overhead grows, documentation quality drifts, and teams gradually stop using the workflow as intended.
235
-
236
- Task CLI takes a narrower approach: clarify the requirement, capture only the minimum useful brief, execute against acceptance criteria, review the result, and keep a lightweight decision trail. The goal is a workflow people will actually keep using.
237
-
238
- ---
239
-
240
- ## Strengths and Tradeoffs
241
-
242
- **Strengths**
243
-
244
- * much lower process overhead for bugs, small features, and short iterations
245
- * easier to adopt in mature codebases where engineers already know the product
246
- * encourages real usage because the workflow is short enough to sustain
247
- * keeps enough structure to improve clarity without forcing large documents
248
-
249
- **Tradeoffs**
250
-
251
- * less suitable for large cross-team initiatives that need formal design traceability
252
- * relies more on engineer judgment and review quality than a full spec process
253
- * stores less long-form historical context than a dedicated spec repository
254
-
255
- ---
256
-
257
- ## Upgrading Existing Projects
258
-
259
- If a project was initialized with an older version of task-cli, run:
260
-
261
- ```bash
262
- task refresh
263
- ```
264
-
265
- This will:
266
-
267
- * keep `.ai/tasks`, `.ai/bugs`, and `.ai/decisions`
268
- * remove only managed skills from `.claude/skills/` and `.codex/skills/`: `task-fast`, `task-explore`, `task-implement`, `task-review`, `task-cancel`, `bug-explore`, `bug-fix`, `bug-review`, `bug-cancel`, `decision-log`, `decision-sweep-weekly`
269
- * reinstall the latest versions of those skills
270
-
271
- Unrelated custom skills in the same project are left untouched. Inspect the current setup first with `task doctor`.
272
-
273
- ---
274
-
275
- ## License
276
-
277
- MIT
278
-
279
- > Task CLI does not install Grill Me automatically.
280
- > Users remain free to choose any Grill Me compatible implementation, and the explore skills fall back to built-in clarification if none is installed.
1
+ # task-cli
2
+
3
+ A workflow methodology for AI coding agents.
4
+
5
+ Task CLI separates requirement exploration from implementation, so AI agents decide whether complexity is justified **before** they start coding.
6
+
7
+ **Explore** — Understand the problem. Assess whether additional complexity is warranted.
8
+ **Implement** — Solve the accepted problem with the least necessary complexity.
9
+ **Review** — Validate against the brief, not against new ideas introduced during coding.
10
+
11
+ Designed for:
12
+
13
+ * Claude Code
14
+ * Codex CLI
15
+ * Mature codebases with frequent bug fixes and small feature iterations
16
+
17
+ > **Core principle**
18
+ > Explore decides whether complexity is justified.
19
+ > Implement decides how to satisfy the requirement with the least necessary complexity.
20
+
21
+ ---
22
+
23
+ ## Why task-cli?
24
+
25
+ ### Traditional AI Workflow
26
+
27
+ ```text
28
+ Requirement → Solution Design → Code → Review
29
+ ```
30
+
31
+ The AI often starts designing before the requirement is fully clarified. Complexity gets introduced during coding, and review happens against whatever the AI produced rather than against the original intent.
32
+
33
+ ### task-cli Workflow
34
+
35
+ ```text
36
+ Requirement
37
+
38
+ Explore ──► Understand + Challenge
39
+
40
+ Complexity Assessment ──► Is added complexity justified?
41
+
42
+ Brief
43
+
44
+ Implement ──► Simplest acceptable solution
45
+
46
+ Review ──► Validate against the brief
47
+ ```
48
+
49
+ Exploration and implementation are intentionally separated.
50
+
51
+ ---
52
+
53
+ ## Core Philosophy
54
+
55
+ Most AI coding agents fail because they mix exploration and implementation in the same conversation. Task CLI intentionally separates them.
56
+
57
+ | Stage | Question |
58
+ | ------------------------- | ------------------------------------------ |
59
+ | Explore | What problem are we solving? |
60
+ | Complexity Assessment | Is additional complexity justified? |
61
+ | Implement | What is the simplest acceptable solution? |
62
+ | Review | Did we satisfy the brief? |
63
+
64
+ This keeps AI agents from over-designing solutions during requirement discovery, and keeps implementation focused on the accepted scope.
65
+
66
+ ---
67
+
68
+ ## Installation
69
+
70
+ ```bash
71
+ npm install -g @winton979/task-cli
72
+ ```
73
+
74
+ Initialize the workflow in your project:
75
+
76
+ ```bash
77
+ task init
78
+ ```
79
+
80
+ After initialization, Task CLI creates the `.ai/` workspace and installs workflow skills into both `.claude/skills/` and `.codex/skills/`.
81
+
82
+ ### Prerequisites
83
+
84
+ Task CLI can use a Grill Me compatible skill for requirement and bug exploration.
85
+
86
+ Recommended:
87
+
88
+ ```bash
89
+ npx add-skill PJ-SBN-593844/skill-grill-me
90
+ ```
91
+
92
+ If no Grill Me compatible skill is installed, `task-fast`, `task-explore`, and `bug-explore` fall back to built-in clarification prompts.
93
+
94
+ ---
95
+
96
+ ## Quick Start
97
+
98
+ ### Small Feature / Enhancement
99
+
100
+ ```text
101
+ /task-fast
102
+
103
+ clarify + brief + implement + validate
104
+
105
+ /task-review or /task-cancel
106
+ ```
107
+
108
+ ### Larger Requirement
109
+
110
+ ```text
111
+ /task-explore → TASK_READY → /task-implement → /task-review or /task-cancel
112
+ ```
113
+
114
+ ### Bug Fix
115
+
116
+ ```text
117
+ /bug-explore → BUG_READY → /bug-fix → /bug-review or /bug-cancel
118
+ ```
119
+
120
+ ### CLI Commands
121
+
122
+ ```bash
123
+ task init # initialize workspace and install skills
124
+ task refresh # reinstall managed skills without touching .ai content
125
+ task doctor # check workspace state, skill versions, gitignore rules
126
+ task --help
127
+ ```
128
+
129
+ ---
130
+
131
+ ## Example: Preventing Over-Engineering
132
+
133
+ **Requirement:** *"Add CSV export."*
134
+
135
+ ### Without task-cli
136
+
137
+ Common AI behavior — jumps straight into designing:
138
+
139
+ * `ExportService`
140
+ * `ExportRepository`
141
+ * `CSVAdapter`
142
+ * `Factory`
143
+ * new dependency
144
+
145
+ **Files changed:** 7
146
+ **New abstractions:** 4
147
+
148
+ ### With task-cli
149
+
150
+ Exploration runs first. Complexity Assessment determines that a new project-wide capability is not justified.
151
+
152
+ Implementation:
153
+
154
+ * reuse existing export path
155
+ * modify two files
156
+ * no new dependency
157
+
158
+ **Files changed:** 2
159
+ **New abstractions:** 0
160
+
161
+ The workflow encourages the simplest acceptable implementation instead of the most elaborate one.
162
+
163
+ ---
164
+
165
+ ## Available Skills
166
+
167
+ **Task Workflow**
168
+
169
+ * `task-fast`
170
+ * `task-explore`
171
+ * `task-implement`
172
+ * `task-review`
173
+ * `task-cancel`
174
+
175
+ **Bug Workflow**
176
+
177
+ * `bug-explore`
178
+ * `bug-fix`
179
+ * `bug-review`
180
+ * `bug-cancel`
181
+
182
+ **Decision Logging**
183
+
184
+ * `decision-log`
185
+ * `decision-sweep-weekly`
186
+ * `decision-curate`
187
+
188
+ ---
189
+
190
+ ## Decision Logging
191
+
192
+ Task CLI keeps a lightweight decision trail in `.ai/decisions/decisions.md`. Explore and fast-path skills should consult it before finalizing a brief, and pull in only the decisions that materially constrain the current task or bug.
193
+
194
+ The decisions file is intentionally narrow. It holds durable project invariants and reusable constraints, not a running transcript of every local implementation choice.
195
+
196
+ The default bias should be to skip writing. A decision should be logged only when leaving it undocumented would make a future task or bug exploration materially more likely to choose the wrong path.
197
+
198
+ ### Weekly Decision Sweep
199
+
200
+ Calling `/decision-log` after every task is easy to forget. As a lower-friction alternative, run once per week (Friday is a natural fit):
201
+
202
+ ```
203
+ /decision-sweep-weekly
204
+ ```
205
+
206
+ The skill scans archived task and bug briefs from the past 7 days, judges which ones contain a decision worth keeping (cross-task impact, rejected alternatives, counter-intuitive choices, externally driven calls, or instructive cancellations), drafts the entries, and waits for confirmation before writing to `.ai/decisions/decisions.md`. When a draft overlaps with an existing decision, it presents both versions and asks whether to append, revise, merge, supersede, or skip.
207
+
208
+ ### Decision Curation
209
+
210
+ When the decisions file starts collecting stale, duplicate, or low-value entries, run:
211
+
212
+ ```
213
+ /decision-curate
214
+ ```
215
+
216
+ The skill audits the current decisions file, classifies entries as keep, tighten, merge, or remove, and waits for explicit confirmation before changing anything. Its job is to keep the file short enough that explore can still read it cheaply.
217
+
218
+ Use `decision-log` for in-the-moment recording, `decision-sweep-weekly` for harvesting new durable constraints, and `decision-curate` for pruning old ones.
219
+
220
+ ---
221
+
222
+ ## Operational Boundaries
223
+
224
+ Task CLI is most effective when `active/` stays personal, local, and small. In that operating model, the main scaling risk is not total bug or task count, but whether the long-lived context remains high-signal.
225
+
226
+ Recommended working limits:
227
+
228
+ * Per developer, keep local `active` briefs at `1-3`. At `4-5`, the agent starts paying more context-switching cost.
229
+ * Total `archive` size can grow into the hundreds without becoming a primary problem, because normal flows do not re-read all historical briefs.
230
+ * Keep `.ai/decisions/decisions.md` lean. Around `15-30` durable entries is comfortable. Once it grows past `30`, run `/decision-curate` regularly.
231
+ * Weekly completed brief volume around `10-20` is still light for `decision-sweep-weekly`. Past `20-40`, expect more review effort to separate durable constraints from one-off noise.
232
+
233
+ Red flags that the workflow is becoming an agent burden:
234
+
235
+ * explore spends noticeable time filtering stale or irrelevant decisions
236
+ * many archived briefs are too small or repetitive to justify their own long-term trace
237
+ * weekly decision sweep produces mostly skip-worthy items
238
+ * one developer keeps more than a few local active briefs open at once
239
+
240
+ When those signals appear, the right response is usually to reduce noise in decisions and brief granularity, not to add more process.
241
+
242
+ ---
243
+
244
+ ## Directory Structure
245
+
246
+ ```text
247
+ .ai/
248
+ ├── tasks/
249
+ │ ├── active/
250
+ │ └── archive/
251
+ ├── bugs/
252
+ │ ├── active/
253
+ │ └── archive/
254
+ └── decisions/
255
+ └── decisions.md
256
+
257
+ .claude/skills/
258
+ .codex/skills/
259
+ ```
260
+
261
+ The `archive/` directories are internal storage, not user-facing steps.
262
+
263
+ ---
264
+
265
+ ## Compared with OpenSpec-Style Workflows
266
+
267
+ Detailed specification workflows such as OpenSpec can improve alignment, traceability, and consistency for large initiatives, cross-team programs, and process-heavy environments.
268
+
269
+ The difficulty is that the same level of ceremony does not fit day-to-day engineering. For frequent bug fixes, small features, and fast iteration, the process becomes heavier than the change itself — maintenance overhead grows, documentation quality drifts, and teams gradually stop using the workflow as intended.
270
+
271
+ Task CLI takes a narrower approach: clarify the requirement, capture only the minimum useful brief, execute against acceptance criteria, review the result, and keep a lightweight decision trail. The goal is a workflow people will actually keep using.
272
+
273
+ ---
274
+
275
+ ## Strengths and Tradeoffs
276
+
277
+ **Strengths**
278
+
279
+ * much lower process overhead for bugs, small features, and short iterations
280
+ * easier to adopt in mature codebases where engineers already know the product
281
+ * encourages real usage because the workflow is short enough to sustain
282
+ * keeps enough structure to improve clarity without forcing large documents
283
+
284
+ **Tradeoffs**
285
+
286
+ * less suitable for large cross-team initiatives that need formal design traceability
287
+ * relies more on engineer judgment and review quality than a full spec process
288
+ * stores less long-form historical context than a dedicated spec repository
289
+
290
+ ---
291
+
292
+ ## Upgrading Existing Projects
293
+
294
+ If a project was initialized with an older version of task-cli, run:
295
+
296
+ ```bash
297
+ task refresh
298
+ ```
299
+
300
+ This will:
301
+
302
+ * keep `.ai/tasks`, `.ai/bugs`, and `.ai/decisions`
303
+ * remove only managed skills from `.claude/skills/` and `.codex/skills/`: `task-fast`, `task-explore`, `task-implement`, `task-review`, `task-cancel`, `bug-explore`, `bug-fix`, `bug-review`, `bug-cancel`, `decision-log`, `decision-sweep-weekly`, `decision-curate`
304
+ * reinstall the latest versions of those skills
305
+
306
+ Unrelated custom skills in the same project are left untouched. Inspect the current setup first with `task doctor`.
307
+
308
+ ---
309
+
310
+ something else:
311
+ > Task CLI does not install Grill Me automatically.
312
+ > Users remain free to choose any Grill Me compatible implementation, and the explore skills fall back to built-in clarification if none is installed.
313
+
314
+ ## License
315
+
316
+ MIT
317
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@winton979/task-cli",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "Lightweight task workflow CLI for AI-assisted development",
5
5
  "license": "MIT",
6
6
  "repository": {
package/src/init.js CHANGED
@@ -519,7 +519,26 @@ Purpose
519
519
 
520
520
  Record important implementation decisions.
521
521
 
522
- Only record decisions that are likely to matter beyond a single task. Good candidates are durable constraints, architecture boundaries, rejected alternatives someone may retry later, externally forced choices, and intentional behavior that otherwise looks incorrect.
522
+ Selection Standard
523
+
524
+ Bias toward not writing. A decision belongs here only when leaving it undocumented would make a future task or bug exploration materially more likely to choose the wrong path.
525
+
526
+ Record only durable constraints such as:
527
+
528
+ * project invariants that will likely constrain future work
529
+ * rejected alternatives someone could plausibly retry later
530
+ * externally forced choices such as compatibility, compliance, vendor, or performance limits
531
+ * intentional behavior that looks incorrect unless explained
532
+
533
+ Do not record:
534
+
535
+ * one-off implementation details
536
+ * local cleanup notes or TODOs
537
+ * temporary workarounds that are not yet accepted long-term behavior
538
+ * facts already made obvious by code, tests, or tooling
539
+ * constraints that disappeared after later simplification or optimization
540
+
541
+ If unsure, skip the entry.
523
542
 
524
543
  Save Location
525
544
 
@@ -549,6 +568,8 @@ Requirements
549
568
 
550
569
  * Maximum 10 lines per decision
551
570
  * Default to append
571
+ * Prefer fewer, harder decisions over broad coverage
572
+ * One decision should capture one durable constraint, not a mixed summary
552
573
  * If a new entry appears to revise, merge with, or supersede an existing decision, do not edit or append yet
553
574
  * Instead, show the relevant prior entry, explain the overlap or conflict, and ask the user whether to append, revise, merge, supersede, or skip
554
575
  * Only modify an existing entry after explicit user confirmation
@@ -579,11 +600,13 @@ Workflow
579
600
  2. For cancelled briefs in either archive, treat the abandonment itself as potential decision material.
580
601
  3. Evaluate each brief against the Sediment Conditions below.
581
602
  4. For each candidate, draft a decision entry using the four-section format.
582
- 5. Present a single review list: every scanned brief with a verdict (write / skip / insufficient info), then the proposed drafts grouped at the end.
583
- 6. Do NOT append anything yet. Wait for the user to confirm which drafts to keep, edit, or drop.
584
- 7. If a proposed draft appears to overlap with, conflict with, or refine an existing decision, include that prior entry in the review and present explicit options such as append as new, revise existing, merge, supersede, or skip.
585
- 8. Only after confirmation, apply the approved action for each draft. Default to appending new entries oldest first under the matching YYYY-MM-DD section heading; revise or merge only when the user explicitly selects that action.
586
- 9. Report what was appended, revised, merged, superseded, and skipped.
603
+ 5. Bias toward skip. Produce a draft only when the decision is clearly durable and likely to matter again.
604
+ 6. Present a single review list: every scanned brief with a verdict (write / skip / insufficient info), then the proposed drafts grouped at the end.
605
+ 7. For every skip, give a short reason such as one-off detail, already encoded in code, no future constraint, or still unsettled.
606
+ 8. Do NOT append anything yet. Wait for the user to confirm which drafts to keep, edit, or drop.
607
+ 9. If a proposed draft appears to overlap with, conflict with, or refine an existing decision, include that prior entry in the review and present explicit options such as append as new, revise existing, merge, supersede, or skip.
608
+ 10. Only after confirmation, apply the approved action for each draft. Default to appending new entries oldest first under the matching YYYY-MM-DD section heading; revise or merge only when the user explicitly selects that action.
609
+ 11. Report what was appended, revised, merged, superseded, and skipped.
587
610
 
588
611
  Sediment Conditions
589
612
 
@@ -594,12 +617,16 @@ A brief becomes a decision entry if it satisfies any of:
594
617
  * Counter-intuitive choice: code reads like an anti-pattern but is intentional.
595
618
  * Externally driven: compliance, performance, compatibility, or a third-party API limit forced the call.
596
619
  * A cancelled attempt whose failure is itself a useful conclusion.
620
+ * Without the note, a future explore step would likely need to rediscover the same constraint.
597
621
 
598
622
  Skip Conditions
599
623
 
600
624
  * Affects only the implementation detail of one task.
601
625
  * A temporary or unsettled conclusion.
602
626
  * A bare fact with no decision behind it.
627
+ * Already obvious from code, tests, tooling, or existing project structure.
628
+ * A constraint that was later simplified away, optimized away, or otherwise stopped mattering.
629
+ * Too vague to guide a future task.
603
630
 
604
631
  Entry Format
605
632
 
@@ -627,6 +654,53 @@ Requirements
627
654
  * Default to append
628
655
  * One date section per day; multiple decisions on the same day stack under the same heading
629
656
  * Never edit, merge, supersede, or delete prior entries without explicit user confirmation
657
+ `,
658
+ },
659
+
660
+ 'decision-curate': {
661
+ name: 'decision-curate',
662
+ description: 'Audit .ai/decisions/decisions.md and propose removing, merging, or tightening stale, duplicate, or low-value entries. Only apply changes after explicit user confirmation.',
663
+ content: `---
664
+ name: decision-curate
665
+ description: Audit .ai/decisions/decisions.md and propose removing, merging, or tightening stale, duplicate, or low-value entries. Only apply changes after explicit user confirmation.
666
+ user-invocable: true
667
+ ---
668
+
669
+ Purpose
670
+
671
+ Keep .ai/decisions/decisions.md narrow enough that future explore steps can read it quickly and trust that every surviving entry still matters.
672
+
673
+ Workflow
674
+
675
+ 1. Read .ai/decisions/decisions.md.
676
+ 2. Inspect the current codebase only as needed to judge whether each decision still represents a live constraint.
677
+ 3. Classify each entry as keep, tighten, merge, or remove.
678
+ 4. Bias toward removal when an entry is stale, duplicate, too local, too vague, or no longer changes future implementation choices.
679
+ 5. Present a review list with every entry, its classification, and a short reason.
680
+ 6. When proposing tighten, merge, or remove, quote or summarize the exact affected entry so the user can approve safely.
681
+ 7. Do NOT modify the file yet. Wait for explicit user confirmation on each proposed change set.
682
+ 8. After confirmation, apply only the approved edits and preserve unrelated entries.
683
+ 9. Summarize what was kept, tightened, merged, removed, and why.
684
+
685
+ Retention Standard
686
+
687
+ Keep an entry only if it still acts as a durable project constraint or explains an intentional choice a future task could otherwise get wrong.
688
+
689
+ Removal Candidates
690
+
691
+ * one-off implementation details
692
+ * decisions already enforced clearly by code, tests, or tooling
693
+ * duplicate or near-duplicate entries
694
+ * vague notes that do not change future choices
695
+ * constraints invalidated by later refactors, simplifications, or performance work
696
+ * historical context that belongs in task or bug archives instead
697
+
698
+ Requirements
699
+
700
+ * Default to proposing, not editing
701
+ * Never remove or rewrite an entry without explicit user confirmation
702
+ * Prefer deleting low-value entries over rewriting them into longer prose
703
+ * Keep the remaining file concise and high-signal
630
704
  `,
631
705
  },
632
706
  };
@@ -791,7 +865,7 @@ export function init(cwd, { fs, path, log }) {
791
865
  fast: task-fast
792
866
  task: task-explore -> task-implement -> task-review | task-cancel
793
867
  bug: bug-explore -> bug-fix -> bug-review | bug-cancel
794
- other: decision-log
868
+ other: decision-log | decision-curate
795
869
  sweep: decision-sweep-weekly`);
796
870
  }
797
871
 
@@ -826,7 +900,7 @@ export function refresh(cwd, { fs, path, log }) {
826
900
  fast: task-fast
827
901
  task: task-explore -> task-implement -> task-review | task-cancel
828
902
  bug: bug-explore -> bug-fix -> bug-review | bug-cancel
829
- other: decision-log
903
+ other: decision-log | decision-curate
830
904
  sweep: decision-sweep-weekly`);
831
905
  }
832
906