@mthanhlm/autodev 0.4.0 → 0.4.1

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "autodev",
3
3
  "description": "A lean Claude Code workflow system with a single entrypoint, task-based phase execution, and read-only git.",
4
- "version": "0.4.0",
4
+ "version": "0.4.1",
5
5
  "author": {
6
6
  "name": "mthanhlm"
7
7
  },
package/README.md CHANGED
@@ -111,6 +111,7 @@ project -> track -> phase -> tasks
111
111
  - Each task is preferably executed by a fresh foreground delegated agent
112
112
  - After each task, the delegated agent reports back with files changed, verification, and blockers
113
113
  - `/autodev` stops after each completed task and reopens a task review checkpoint before any further execution
114
+ - If review or verification finds blockers, the same phase stays open and autodev should append remediation task(s) to that phase instead of replacing it or creating a follow-up phase by default
114
115
  - No waves by default
115
116
  - No automatic parallel execution
116
117
  - If specialized agents are unavailable in the current Claude Code environment, the workflow falls back cleanly to current-session execution instead of stopping on platform wording
@@ -396,6 +396,10 @@ function lastCompletedTask(tasks) {
396
396
  return completed.length > 0 ? completed[completed.length - 1] : null;
397
397
  }
398
398
 
399
+ function lastTaskNumber(tasks) {
400
+ return tasks.reduce((highest, task) => Math.max(highest, task.number), 0);
401
+ }
402
+
399
403
  function hasDependencyDeadlock(tasks) {
400
404
  return tasks.some(task => !task.summaryExists) && !nextExecutableTask(tasks);
401
405
  }
@@ -901,6 +905,7 @@ function initPayload(cwd, mode, requestedPhase) {
901
905
  const tasks = phase ? listTasksForPhaseDetails(phase) : [];
902
906
  const nextTask = nextExecutableTask(tasks);
903
907
  const lastCompleted = lastCompletedTask(tasks);
908
+ const highestTaskNumber = lastTaskNumber(tasks);
904
909
  const dependencyDeadlock = hasDependencyDeadlock(tasks);
905
910
  const trackStateSnapshot = track ? readStateSnapshot(track.state) : null;
906
911
  const currentTaskNumber = (() => {
@@ -960,6 +965,7 @@ function initPayload(cwd, mode, requestedPhase) {
960
965
  task_done_count: tasks.filter(task => task.summaryExists).length,
961
966
  all_tasks_done: tasks.length > 0 && tasks.every(task => task.summaryExists),
962
967
  dependency_deadlock: dependencyDeadlock,
968
+ last_task_number: highestTaskNumber,
963
969
  next_task_number: nextTask ? nextTask.number : null,
964
970
  next_task_path: nextTask ? nextTask.taskPath : null,
965
971
  next_task_summary_path: nextTask ? nextTask.summaryPath : null,
@@ -1084,6 +1090,7 @@ module.exports = {
1084
1090
  trackPaths,
1085
1091
  listTasksForPhaseDetails,
1086
1092
  lastCompletedTask,
1093
+ lastTaskNumber,
1087
1094
  hasDependencyDeadlock,
1088
1095
  nextExecutableTask
1089
1096
  };
@@ -18,6 +18,7 @@ Type: [feature|bugfix|refactor|research|polish]
18
18
  - Keep one orchestration session for the phase.
19
19
  - Execute one task at a time.
20
20
  - No waves by default.
21
+ - If review or verification finds blockers, keep the same phase open and append remediation tasks instead of creating a replacement phase.
21
22
 
22
23
  ## Phase-Level Risks
23
24
  - [Risk]
@@ -32,6 +33,11 @@ Type: [feature|bugfix|refactor|research|polish]
32
33
  | 01 | pending | none | [Concrete task goal] |
33
34
  | 02 | pending | 01 | [Concrete task goal] |
34
35
 
36
+ ## Revision Rules
37
+ - Preserve completed task rows and summaries as history.
38
+ - Append remediation tasks after the highest existing task number.
39
+ - Only rewrite pending tasks when needed for clarity.
40
+
35
41
  ## Notes
36
42
  - [Anything the delegated agents must know]
37
43
 
@@ -22,3 +22,6 @@ Status: pending
22
22
 
23
23
  ## Recommendation
24
24
  - [Return to execution or continue to verification]
25
+
26
+ ## Remediation Direction
27
+ - [If blocked, append fix task(s) to the same phase and preserve completed task history]
@@ -46,6 +46,13 @@ project -> track -> phase -> tasks
46
46
  - `task`
47
47
  Reviewable execution units inside a phase.
48
48
 
49
+ ## Blocker Recovery
50
+
51
+ - Review or verification blockers should normally stay in the same phase.
52
+ - Preserve completed task history.
53
+ - Append `TASK-XX` remediation work to the same phase.
54
+ - Only create a new phase when the blocker reveals genuinely new scope.
55
+
49
56
  ## Default Flow
50
57
 
51
58
  ```text
@@ -9,6 +9,7 @@ Create one practical phase plan for the active track, then break it into reviewa
9
9
  - Optional research is allowed only when the user asks for it or `workflow.research` is true.
10
10
  - Never include git write commands in the plan.
11
11
  - Do not use waves by default.
12
+ - When revising a blocked phase, preserve the same phase, the same phase goal, and all completed task history.
12
13
  </rules>
13
14
 
14
15
  <process>
@@ -32,6 +33,10 @@ node "$AUTODEV_ROOT/autodev/bin/autodev-tools.cjs" init plan-phase "$ARGUMENTS"
32
33
  - `.autodev/tracks/<active-track>/ROADMAP.md`
33
34
  - `.autodev/tracks/<active-track>/STATE.md`
34
35
  - the target phase section
36
+ - any existing `TASK-*.md`
37
+ - any existing `TASK-*-SUMMARY.md`
38
+ - `NN-REVIEW.md` if it exists
39
+ - `NN-UAT.md` if it exists
35
40
  - any existing code relevant to this phase
36
41
 
37
42
  5. If research is enabled or explicitly requested, do targeted read-only research only. Keep the output folded into the plan instead of producing a separate research artifact.
@@ -42,14 +47,28 @@ node "$AUTODEV_ROOT/autodev/bin/autodev-tools.cjs" init plan-phase "$ARGUMENTS"
42
47
  .autodev/tracks/<active-track>/phases/NN-type-name/
43
48
  ```
44
49
 
45
- 7. Write or replace `NN-PLAN.md` from the template. The plan must include:
50
+ 7. Write or update `NN-PLAN.md` from the template. The plan must include:
46
51
  - phase type
47
52
  - goal
48
53
  - shared verification commands
49
54
  - task list overview
50
55
  - explicit git read-only reminder
51
56
 
52
- 8. Create task files in the same phase directory:
57
+ 8. If this phase is being reopened because of `blocked_review`, `blocked_verification`, `blocked_dependencies`, or another blocker status:
58
+ - keep the same phase directory and phase goal
59
+ - do not create a new phase for ordinary blockers
60
+ - do not delete or rewrite completed task summaries
61
+ - do not renumber completed tasks
62
+ - preserve already-completed task rows in the phase plan
63
+ - append new remediation tasks after `last_task_number`
64
+ - default to one appended remediation task when the blockers are tightly related
65
+ - split into multiple appended remediation tasks only when the blockers are clearly separate
66
+ - only rewrite still-pending tasks when that improves clarity
67
+ - make the new task titles explicit, for example:
68
+ - `TASK-03: Fix review blockers from 01-REVIEW.md`
69
+ - `TASK-04: Fix verification gaps from 01-UAT.md`
70
+
71
+ 9. Create or update task files in the same phase directory:
53
72
 
54
73
  ```text
55
74
  TASK-01.md
@@ -75,26 +94,33 @@ Each task file must include:
75
94
  - verification
76
95
  - done looks like
77
96
 
78
- 9. Update the active track `STATE.md` so it points to:
97
+ 10. When revising a blocked phase:
98
+ - point `Current Task` to the first still-pending executable task after the revision
99
+ - if all existing tasks are completed and you add remediation work, `Current Task` should be the first newly appended fix task
100
+ - never reset `Current Task` back to `01` just because the phase was replanned
101
+
102
+ 11. Update the active track `STATE.md` so it points to:
79
103
  - `Current Phase: N`
80
104
  - `Current Phase Type: <type>`
81
105
  - `Current Step: plan_review`
82
- - `Current Task: 01` if tasks exist, otherwise `none`
106
+ - `Current Task: <first-pending-task>` if tasks exist, otherwise `none`
83
107
  - `Current Task Status: pending_review`
84
108
  - `Next Command: /autodev`
85
109
  - current ISO timestamp
86
110
 
87
- 10. Update `.autodev/STATE.md` so it points to:
111
+ 12. Update `.autodev/STATE.md` so it points to:
88
112
  - `Active Track: <slug>`
89
113
  - `Current Step: plan_review`
90
- - `Current Task: 01` if tasks exist, otherwise `none`
114
+ - `Current Task: <first-pending-task>` if tasks exist, otherwise `none`
91
115
  - `Current Task Status: pending_review`
92
116
  - `Next Command: /autodev`
93
117
  - current ISO timestamp
94
118
 
95
- 11. End with a short summary and stop for review.
119
+ 13. End with a short summary and stop for review.
96
120
  Tell the user:
97
121
  - the plan and task files are ready for review
122
+ - completed task history from the phase was preserved
123
+ - any blocker remediation was added as appended task work inside the same phase
98
124
  - `/autodev` will open the review checkpoint before any execution starts
99
125
  - `/autodev-execute-phase N` is only the optional manual bypass after review
100
126
  </process>
@@ -58,7 +58,9 @@ node "$AUTODEV_ROOT/autodev/bin/autodev-tools.cjs" init review-phase "$ARGUMENTS
58
58
  - set `Current Task: none`
59
59
  - set `Current Task Status: blocked_review`
60
60
  - keep `Next Command: /autodev`
61
- - make the recommendation point back to revising the same phase with blocker-fix tasks
61
+ - make the recommendation point back to revising the same phase with appended blocker-fix tasks
62
+ - do not recommend creating a new phase for ordinary review blockers
63
+ - preserve completed task history and phase goal
62
64
 
63
65
  9. If blockers are not found:
64
66
  - set project and track state to `Current Step: verification`
@@ -6,6 +6,7 @@ Run lightweight user acceptance testing after review and keep the next action ob
6
6
  - Verify against what the phase plan, summary, and review claim.
7
7
  - Keep the interaction concise and test-oriented.
8
8
  - Do not auto-generate a new plan unless a real gap appears.
9
+ - Verification failures should normally reopen the same phase with appended remediation tasks, not create a new phase.
9
10
  </rules>
10
11
 
11
12
  <process>
@@ -38,6 +39,7 @@ node "$AUTODEV_ROOT/autodev/bin/autodev-tools.cjs" init verify-work "$ARGUMENTS"
38
39
  - exact failed behaviors
39
40
  - reproduction notes
40
41
  - the smallest acceptable fix target
42
+ - a note that the follow-up should be appended to the same phase as remediation task work unless scope truly changed
41
43
 
42
44
  7. Update the active track `STATE.md`:
43
45
  - if verification passed and another phase remains, move to the next phase and set `Current Step: planning`
@@ -47,6 +49,7 @@ node "$AUTODEV_ROOT/autodev/bin/autodev-tools.cjs" init verify-work "$ARGUMENTS"
47
49
  - when verification failed, set `Current Task: none` and `Current Task Status: blocked_verification`
48
50
  - always set `Next Command: /autodev`
49
51
  - always refresh the ISO timestamp
52
+ - when verification failed, the next planning pass should preserve completed tasks and append remediation tasks to the same phase
50
53
 
51
54
  8. Update `.autodev/STATE.md` with the matching project-level status and refreshed timestamp.
52
55
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mthanhlm/autodev",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "A lean Claude Code workflow system with a single entrypoint, task-based phase execution, and read-only git.",
5
5
  "bin": {
6
6
  "autodev": "bin/install.js"