@winton979/task-cli 1.3.0 → 1.3.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 +7 -1
  2. package/package.json +1 -1
  3. package/src/init.js +44 -17
package/README.md CHANGED
@@ -46,6 +46,8 @@ Compatible Grill Me implementations may also work.
46
46
 
47
47
  If no Grill Me compatible skill is installed, `task-fast`, `task-explore`, and `bug-explore` fall back to built-in clarification prompts.
48
48
 
49
+ When `.ai/decisions/decisions.md` contains real entries, those skills should inspect it before finalizing a brief and pull in only the decisions that materially constrain the current task or bug.
50
+
49
51
  ---
50
52
 
51
53
  ## Usage
@@ -162,10 +164,12 @@ Calling `/decision-log` after every task is easy to forget. As a lower-friction
162
164
  /decision-sweep-weekly
163
165
  ```
164
166
 
165
- 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 appending to `.ai/decisions/decisions.md`.
167
+ 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 anything to `.ai/decisions/decisions.md`. When a draft overlaps with or updates an existing decision, it should present the old and new versions together and ask whether to append, revise, merge, supersede, or skip.
166
168
 
167
169
  Use `decision-log` for in-the-moment recording and `decision-sweep-weekly` for periodic cleanup. Either alone is enough; using both is fine.
168
170
 
171
+ The decisions file is intentionally narrow. It is meant to hold durable project invariants and reusable constraints, not a running transcript of every local implementation choice. The default write mode should still be append, but revisions to existing entries are reasonable when explicitly reviewed and confirmed by the user.
172
+
169
173
  ## Philosophy
170
174
 
171
175
  Task CLI is intentionally lightweight.
@@ -180,6 +184,8 @@ Instead of maintaining large specifications, it focuses on:
180
184
 
181
185
  The goal is to improve quality without slowing down iteration speed.
182
186
 
187
+ That decision history is meant to be selectively reusable. Explore and fast-path skills should consult it to avoid violating existing project decisions, but only the parts that materially constrain the current work belong in the new brief.
188
+
183
189
  ## Compared with OpenSpec-Style Workflows
184
190
 
185
191
  Task CLI is designed as a lightweight alternative to heavier spec-driven systems such as OpenSpec.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@winton979/task-cli",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "Lightweight task workflow CLI for AI-assisted development",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/src/init.js CHANGED
@@ -19,6 +19,17 @@ const GRILL_ME_HINTS = [
19
19
  'grill me',
20
20
  ];
21
21
 
22
+ const DECISIONS_READ_GUIDANCE = `Decision Intake
23
+
24
+ Before finalizing the brief, inspect .ai/decisions/decisions.md if it exists and contains real entries beyond the title.
25
+
26
+ Use it narrowly:
27
+
28
+ * extract only decisions that materially constrain this task
29
+ * ignore unrelated historical notes
30
+ * treat the file as a source of durable project invariants, not as a second specification
31
+ * if relevant decisions exist, summarize them briefly in Context or Constraints instead of copying them verbatim`;
32
+
22
33
  const SKILLS = {
23
34
  'task-fast': {
24
35
  name: 'task-fast',
@@ -37,18 +48,22 @@ Workflow
37
48
 
38
49
  1. If a Grill Me compatible skill is available in the current environment, use it for requirement clarification.
39
50
  2. If no Grill Me compatible skill is available, clarify the requirement yourself with focused questions just far enough to remove ambiguity.
40
- 3. Create a concise task brief and save it to:
51
+ 3. Read the project code and conventions needed to avoid obvious conflicts.
52
+ 4. Read .ai/decisions/decisions.md if it exists and has entries. Pull in only decisions that materially constrain this task.
53
+ 5. Create a concise task brief and save it to:
41
54
 
42
55
  .ai/tasks/active/YYYY-MM-DD-task-name.md
43
56
 
44
- 4. Show the brief before coding.
45
- 5. If the user does not object, implement immediately.
46
- 6. Verify the result against the acceptance criteria.
47
- 7. Archive the brief automatically by moving it to:
57
+ 6. Show the brief before coding.
58
+ 7. If the user does not object, implement immediately.
59
+ 8. Verify the result against the acceptance criteria.
60
+ 9. Archive the brief automatically by moving it to:
48
61
 
49
62
  .ai/tasks/archive/YYYY-MM-DD-task-name.md
50
63
 
51
- 8. Summarize the outcome and any follow-up risks.
64
+ 10. Summarize the outcome and any follow-up risks.
65
+
66
+ ${DECISIONS_READ_GUIDANCE}
52
67
 
53
68
  Task Brief Format
54
69
 
@@ -105,11 +120,14 @@ Workflow
105
120
  3. Continue until the task is sufficiently understood.
106
121
  4. Do not write code.
107
122
  5. Do not create implementation details.
108
- 6. Once the requirement is clear, generate a concise task brief and save it to:
123
+ 6. Before writing the brief, inspect .ai/decisions/decisions.md if it exists and has entries. Pull in only decisions that materially constrain this task.
124
+ 7. Once the requirement is clear, generate a concise task brief and save it to:
109
125
 
110
126
  .ai/tasks/active/YYYY-MM-DD-task-name.md
111
127
 
112
- 7. Show the saved brief and stop.
128
+ 8. Show the saved brief and stop.
129
+
130
+ ${DECISIONS_READ_GUIDANCE}
113
131
 
114
132
  Task Brief Format
115
133
 
@@ -292,11 +310,14 @@ Rules
292
310
  * expected behavior
293
311
  * assumptions
294
312
 
295
- 8. Once the bug is sufficiently understood, generate a brief and save it to:
313
+ 8. Before writing the brief, inspect .ai/decisions/decisions.md if it exists and has entries. Pull in only decisions that materially constrain the observed behavior, expected behavior, or likely root cause.
314
+ 9. Once the bug is sufficiently understood, generate a brief and save it to:
296
315
 
297
316
  .ai/bugs/active/YYYY-MM-DD-bug-name.md
298
317
 
299
- 9. Show the saved brief and stop.
318
+ 10. Show the saved brief and stop.
319
+
320
+ ${DECISIONS_READ_GUIDANCE}
300
321
 
301
322
  Bug Brief Format
302
323
 
@@ -445,10 +466,10 @@ BUG_CANCELLED
445
466
 
446
467
  'decision-log': {
447
468
  name: 'decision-log',
448
- description: 'Record implementation decisions to .ai/decisions/decisions.md. Append-only, max 10 lines per entry.',
469
+ description: 'Record implementation decisions to .ai/decisions/decisions.md. Default to append; if updating an existing decision, require explicit user confirmation first. Max 10 lines per entry.',
449
470
  content: `---
450
471
  name: decision-log
451
- description: Record implementation decisions to .ai/decisions/decisions.md. Append-only, max 10 lines per entry.
472
+ description: Record implementation decisions to .ai/decisions/decisions.md. Default to append; if updating an existing decision, require explicit user confirmation first. Max 10 lines per entry.
452
473
  user-invocable: true
453
474
  ---
454
475
 
@@ -456,6 +477,8 @@ Purpose
456
477
 
457
478
  Record important implementation decisions.
458
479
 
480
+ 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.
481
+
459
482
  Save Location
460
483
 
461
484
  .ai/decisions/decisions.md
@@ -483,7 +506,10 @@ What alternatives were rejected.
483
506
  Requirements
484
507
 
485
508
  * Maximum 10 lines per decision
486
- * Append only
509
+ * Default to append
510
+ * If a new entry appears to revise, merge with, or supersede an existing decision, do not edit or append yet
511
+ * Instead, show the relevant prior entry, explain the overlap or conflict, and ask the user whether to append, revise, merge, supersede, or skip
512
+ * Only modify an existing entry after explicit user confirmation
487
513
  * Keep concise
488
514
  `,
489
515
  },
@@ -513,8 +539,9 @@ Workflow
513
539
  4. For each candidate, draft a decision entry using the four-section format.
514
540
  5. Present a single review list: every scanned brief with a verdict (write / skip / insufficient info), then the proposed drafts grouped at the end.
515
541
  6. Do NOT append anything yet. Wait for the user to confirm which drafts to keep, edit, or drop.
516
- 7. Only after confirmation, append the approved entries to .ai/decisions/decisions.md, oldest first, under the matching YYYY-MM-DD section heading.
517
- 8. Report what was appended and what was skipped.
542
+ 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.
543
+ 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.
544
+ 9. Report what was appended, revised, merged, superseded, and skipped.
518
545
 
519
546
  Sediment Conditions
520
547
 
@@ -555,9 +582,9 @@ What alternatives were rejected.
555
582
  Requirements
556
583
 
557
584
  * Maximum 10 lines per decision
558
- * Append only
585
+ * Default to append
559
586
  * One date section per day; multiple decisions on the same day stack under the same heading
560
- * Never edit or delete prior entries
587
+ * Never edit, merge, supersede, or delete prior entries without explicit user confirmation
561
588
  `,
562
589
  },
563
590
  };