@mthanhlm/autodev 0.3.6 → 0.3.7
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.
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +4 -4
- package/autodev/bin/autodev-tools.cjs +119 -1
- package/autodev/templates/config.json +1 -1
- package/autodev/workflows/execute-phase.md +3 -2
- package/autodev/workflows/explore-codebase.md +2 -2
- package/autodev/workflows/help.md +2 -2
- package/autodev/workflows/new-project.md +1 -1
- package/autodev/workflows/review-phase.md +6 -4
- package/autodev/workflows/verify-work.md +2 -2
- package/commands/autodev/explore-codebase.md +2 -2
- package/commands/autodev/review-phase.md +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
- Keeps project state in `.autodev/`
|
|
9
9
|
- Uses `/autodev` as the main command
|
|
10
10
|
- Organizes work as `project -> track -> phase -> tasks`
|
|
11
|
-
- Maps brownfield repos with
|
|
12
|
-
- Runs a multi-lens review pass, using
|
|
11
|
+
- Maps brownfield repos with foreground delegated agents when the environment supports them
|
|
12
|
+
- Runs a multi-lens review pass, using foreground review agents when the environment supports them
|
|
13
13
|
- Ships manual commands when you want direct control:
|
|
14
14
|
- `/autodev-help`
|
|
15
15
|
- `/autodev-new-project`
|
|
@@ -99,9 +99,9 @@ project -> track -> phase -> tasks
|
|
|
99
99
|
- `/autodev` stops after planning so the user can review the phase before any execution starts
|
|
100
100
|
- The phase keeps one user-facing orchestration session
|
|
101
101
|
- Each task is preferably executed by a fresh foreground delegated agent
|
|
102
|
-
- After each task, the
|
|
102
|
+
- After each task, the delegated agent reports back with files changed, verification, and blockers
|
|
103
103
|
- No waves by default
|
|
104
|
-
- No parallel execution
|
|
104
|
+
- No automatic parallel execution
|
|
105
105
|
- 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
|
|
106
106
|
|
|
107
107
|
## Git Policy
|
|
@@ -10,7 +10,7 @@ const DEFAULT_CONFIG = {
|
|
|
10
10
|
workflow: {
|
|
11
11
|
research: false,
|
|
12
12
|
review_after_execute: true,
|
|
13
|
-
codebase_parallel_agents:
|
|
13
|
+
codebase_parallel_agents: 1
|
|
14
14
|
},
|
|
15
15
|
execution: {
|
|
16
16
|
parallel: false
|
|
@@ -257,6 +257,35 @@ function readSingleLineField(content, label) {
|
|
|
257
257
|
return match ? match[1].trim() : null;
|
|
258
258
|
}
|
|
259
259
|
|
|
260
|
+
function parseStateSnapshot(content) {
|
|
261
|
+
if (!content) {
|
|
262
|
+
return null;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
const currentPhaseRaw = readSingleLineField(content, 'Current Phase');
|
|
266
|
+
const currentPhaseNumber = currentPhaseRaw && /^\d+$/.test(currentPhaseRaw)
|
|
267
|
+
? Number(currentPhaseRaw)
|
|
268
|
+
: null;
|
|
269
|
+
|
|
270
|
+
return {
|
|
271
|
+
currentPhase: currentPhaseNumber,
|
|
272
|
+
currentPhaseType: readSingleLineField(content, 'Current Phase Type'),
|
|
273
|
+
currentStep: readSingleLineField(content, 'Current Step'),
|
|
274
|
+
currentTask: readSingleLineField(content, 'Current Task'),
|
|
275
|
+
currentTaskStatus: readSingleLineField(content, 'Current Task Status'),
|
|
276
|
+
status: readSingleLineField(content, 'Status'),
|
|
277
|
+
nextCommand: readSingleLineField(content, 'Next Command')
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
function readStateSnapshot(filePath) {
|
|
282
|
+
return parseStateSnapshot(readText(filePath));
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
function isBlockedTaskStatus(value) {
|
|
286
|
+
return typeof value === 'string' && /^blocked/i.test(value.trim());
|
|
287
|
+
}
|
|
288
|
+
|
|
260
289
|
function parseTaskDependsOn(value) {
|
|
261
290
|
if (!value || /^none$/i.test(value)) {
|
|
262
291
|
return [];
|
|
@@ -396,19 +425,41 @@ function resolvePhase(cwd, slug, requestedPhase, mode) {
|
|
|
396
425
|
return phases.find(phase => phase.number === numeric) || null;
|
|
397
426
|
}
|
|
398
427
|
|
|
428
|
+
const track = trackPaths(cwd, slug);
|
|
429
|
+
const trackState = track ? readStateSnapshot(track.state) : null;
|
|
430
|
+
const currentStatePhase = trackState?.currentPhase
|
|
431
|
+
? phases.find(phase => phase.number === trackState.currentPhase) || null
|
|
432
|
+
: null;
|
|
433
|
+
|
|
399
434
|
if (mode === 'plan') {
|
|
435
|
+
if (currentStatePhase && (
|
|
436
|
+
isBlockedTaskStatus(trackState.currentTaskStatus)
|
|
437
|
+
|| trackState.currentStep === 'planning'
|
|
438
|
+
|| trackState.currentStep === 'plan_review'
|
|
439
|
+
)) {
|
|
440
|
+
return currentStatePhase;
|
|
441
|
+
}
|
|
400
442
|
return phases.find(phase => !phase.planExists) || phases[0];
|
|
401
443
|
}
|
|
402
444
|
|
|
403
445
|
if (mode === 'execute') {
|
|
446
|
+
if (currentStatePhase && trackState?.currentStep === 'execution') {
|
|
447
|
+
return currentStatePhase;
|
|
448
|
+
}
|
|
404
449
|
return phases.find(phase => phase.planExists && !phase.summaryExists) || null;
|
|
405
450
|
}
|
|
406
451
|
|
|
407
452
|
if (mode === 'review') {
|
|
453
|
+
if (currentStatePhase && trackState?.currentStep === 'review') {
|
|
454
|
+
return currentStatePhase;
|
|
455
|
+
}
|
|
408
456
|
return phases.find(phase => phase.summaryExists && !phase.reviewExists) || null;
|
|
409
457
|
}
|
|
410
458
|
|
|
411
459
|
if (mode === 'verify') {
|
|
460
|
+
if (currentStatePhase && trackState?.currentStep === 'verification') {
|
|
461
|
+
return currentStatePhase;
|
|
462
|
+
}
|
|
412
463
|
return phases.find(phase => phase.reviewExists && !phase.uatExists)
|
|
413
464
|
|| [...phases].reverse().find(phase => phase.reviewExists)
|
|
414
465
|
|| null;
|
|
@@ -470,6 +521,7 @@ function buildRoute(cwd) {
|
|
|
470
521
|
}
|
|
471
522
|
|
|
472
523
|
const phases = listPhases(cwd, activeTrack);
|
|
524
|
+
const trackState = readStateSnapshot(track.state);
|
|
473
525
|
if (phases.length === 0) {
|
|
474
526
|
return {
|
|
475
527
|
kind: 'track_setup',
|
|
@@ -481,6 +533,72 @@ function buildRoute(cwd) {
|
|
|
481
533
|
};
|
|
482
534
|
}
|
|
483
535
|
|
|
536
|
+
const currentStatePhase = trackState?.currentPhase
|
|
537
|
+
? phases.find(phase => phase.number === trackState.currentPhase) || null
|
|
538
|
+
: null;
|
|
539
|
+
|
|
540
|
+
if (currentStatePhase && (
|
|
541
|
+
isBlockedTaskStatus(trackState?.currentTaskStatus)
|
|
542
|
+
)) {
|
|
543
|
+
return {
|
|
544
|
+
kind: 'plan_phase',
|
|
545
|
+
command: '/autodev',
|
|
546
|
+
manualCommand: `/autodev-plan-phase ${currentStatePhase.number}`,
|
|
547
|
+
reason: 'blocked_phase_requires_replanning',
|
|
548
|
+
projectType,
|
|
549
|
+
trackSlug: activeTrack,
|
|
550
|
+
phaseNumber: currentStatePhase.number
|
|
551
|
+
};
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
if (currentStatePhase && trackState?.currentStep === 'execution') {
|
|
555
|
+
return {
|
|
556
|
+
kind: 'execute_phase',
|
|
557
|
+
command: '/autodev',
|
|
558
|
+
manualCommand: `/autodev-execute-phase ${currentStatePhase.number}`,
|
|
559
|
+
reason: 'phase_execution_in_progress',
|
|
560
|
+
projectType,
|
|
561
|
+
trackSlug: activeTrack,
|
|
562
|
+
phaseNumber: currentStatePhase.number
|
|
563
|
+
};
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
if (currentStatePhase && trackState?.currentStep === 'plan_review') {
|
|
567
|
+
return {
|
|
568
|
+
kind: 'plan_review',
|
|
569
|
+
command: '/autodev',
|
|
570
|
+
manualCommand: `/autodev-execute-phase ${currentStatePhase.number}`,
|
|
571
|
+
reason: 'phase_plan_awaits_review',
|
|
572
|
+
projectType,
|
|
573
|
+
trackSlug: activeTrack,
|
|
574
|
+
phaseNumber: currentStatePhase.number
|
|
575
|
+
};
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
if (currentStatePhase && trackState?.currentStep === 'review' && !currentStatePhase.reviewExists) {
|
|
579
|
+
return {
|
|
580
|
+
kind: 'review_phase',
|
|
581
|
+
command: '/autodev',
|
|
582
|
+
manualCommand: `/autodev-review-phase ${currentStatePhase.number}`,
|
|
583
|
+
reason: 'phase_review_in_progress',
|
|
584
|
+
projectType,
|
|
585
|
+
trackSlug: activeTrack,
|
|
586
|
+
phaseNumber: currentStatePhase.number
|
|
587
|
+
};
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
if (currentStatePhase && trackState?.currentStep === 'verification' && !currentStatePhase.uatExists) {
|
|
591
|
+
return {
|
|
592
|
+
kind: 'verify_phase',
|
|
593
|
+
command: '/autodev',
|
|
594
|
+
manualCommand: `/autodev-verify-work ${currentStatePhase.number}`,
|
|
595
|
+
reason: 'phase_verification_in_progress',
|
|
596
|
+
projectType,
|
|
597
|
+
trackSlug: activeTrack,
|
|
598
|
+
phaseNumber: currentStatePhase.number
|
|
599
|
+
};
|
|
600
|
+
}
|
|
601
|
+
|
|
484
602
|
const nextReview = phases.find(phase => phase.summaryExists && !phase.reviewExists);
|
|
485
603
|
if (nextReview && config.workflow.review_after_execute !== false) {
|
|
486
604
|
return {
|
|
@@ -68,7 +68,7 @@ node "$AUTODEV_ROOT/autodev/bin/autodev-tools.cjs" init execute-phase "$ARGUMENT
|
|
|
68
68
|
|
|
69
69
|
8. If worker delegation is unavailable, do not stop on the raw platform message.
|
|
70
70
|
Treat messages like `specialized agents aren't available` as a capability limitation, then:
|
|
71
|
-
- tell the user plainly that
|
|
71
|
+
- tell the user plainly that delegated-agent execution is unavailable in this environment
|
|
72
72
|
- continue with the same task in the current session
|
|
73
73
|
- keep the same task boundaries
|
|
74
74
|
- still write the task summary before moving on
|
|
@@ -113,10 +113,11 @@ node "$AUTODEV_ROOT/autodev/bin/autodev-tools.cjs" init execute-phase "$ARGUMENT
|
|
|
113
113
|
|
|
114
114
|
14. If the current task is blocked or incomplete:
|
|
115
115
|
- say so clearly in the task summary
|
|
116
|
-
- set both state files to `Current Step:
|
|
116
|
+
- set both state files to `Current Step: planning`
|
|
117
117
|
- set `Current Task: <same-task>`
|
|
118
118
|
- set `Current Task Status: blocked`
|
|
119
119
|
- keep `Next Command: /autodev`
|
|
120
|
+
- tell the user the phase should be revised before more execution
|
|
120
121
|
|
|
121
122
|
15. End with a short outcome summary and the next recommended command. Mention that the automatic review bundle is the next routed step only when the whole phase is complete.
|
|
122
123
|
</process>
|
|
@@ -3,7 +3,7 @@ Map a brownfield repository quickly and produce a usable codebase brief without
|
|
|
3
3
|
</purpose>
|
|
4
4
|
|
|
5
5
|
<rules>
|
|
6
|
-
- Prefer
|
|
6
|
+
- Prefer a small set of foreground codebase agents, run one at a time, when agent delegation is available.
|
|
7
7
|
- Give each agent a disjoint write target.
|
|
8
8
|
- Use read-only investigation only. No git writes.
|
|
9
9
|
- Focus on information that will improve planning and execution for the active track.
|
|
@@ -26,7 +26,7 @@ node "$AUTODEV_ROOT/autodev/bin/autodev-tools.cjs" init explore-codebase
|
|
|
26
26
|
- the active track docs if they exist
|
|
27
27
|
- representative repo files needed to orient the exploration
|
|
28
28
|
|
|
29
|
-
4. If
|
|
29
|
+
4. If agent delegation is available, explicitly call the `Agent` tool for these subagents, one at a time in the foreground, with owned outputs:
|
|
30
30
|
- `autodev-codebase-structure` for standalone installs, or `autodev:autodev-codebase-structure` in direct plugin runs, owns `.autodev/codebase/structure.md`
|
|
31
31
|
- `autodev-codebase-domain` for standalone installs, or `autodev:autodev-codebase-domain` in direct plugin runs, owns `.autodev/codebase/domain.md`
|
|
32
32
|
- `autodev-codebase-runtime` for standalone installs, or `autodev:autodev-codebase-runtime` in direct plugin runs, owns `.autodev/codebase/runtime.md`
|
|
@@ -14,13 +14,13 @@ Lean Claude Code workflow. No automatic commits. No branches. No worktrees. Git
|
|
|
14
14
|
- `/autodev-new-project`
|
|
15
15
|
Creates project state in `.autodev/` and the first active track under `.autodev/tracks/<track>/`.
|
|
16
16
|
- `/autodev-explore-codebase`
|
|
17
|
-
Uses
|
|
17
|
+
Uses foreground codebase agents, one at a time when available, to map a brownfield repo into `.autodev/codebase/`.
|
|
18
18
|
- `/autodev-plan-phase [phase]`
|
|
19
19
|
Creates or revises one phase plan plus task files in `.autodev/tracks/<track>/phases/NN-type-name/`.
|
|
20
20
|
- `/autodev-execute-phase [phase]`
|
|
21
21
|
Orchestrates one phase task-by-task, preferring a fresh foreground delegated agent per task, and writes `TASK-NN-SUMMARY.md` plus the final `NN-SUMMARY.md`.
|
|
22
22
|
- `/autodev-review-phase [phase]`
|
|
23
|
-
Uses
|
|
23
|
+
Uses foreground review agents, one at a time when available, for code quality, security, integration, and polish, then writes `NN-REVIEW.md`.
|
|
24
24
|
- `/autodev-verify-work [phase]`
|
|
25
25
|
Records manual verification in `NN-UAT.md` and captures fix-return gaps when verification fails.
|
|
26
26
|
- `/autodev-progress`
|
|
@@ -31,7 +31,7 @@ node "$AUTODEV_ROOT/autodev/bin/autodev-tools.cjs" init new-project
|
|
|
31
31
|
- `project.type: "greenfield"` or `"brownfield"`
|
|
32
32
|
- `workflow.research: false`
|
|
33
33
|
- `workflow.review_after_execute: true`
|
|
34
|
-
- `workflow.codebase_parallel_agents:
|
|
34
|
+
- `workflow.codebase_parallel_agents: 1`
|
|
35
35
|
- `execution.parallel: false`
|
|
36
36
|
- `git.mode: "read-only"`
|
|
37
37
|
|
|
@@ -3,7 +3,7 @@ Run the automatic review bundle after execution so the user sees code quality, s
|
|
|
3
3
|
</purpose>
|
|
4
4
|
|
|
5
5
|
<rules>
|
|
6
|
-
- Prefer
|
|
6
|
+
- Prefer a small set of foreground review agents, run one at a time, when agent delegation is available.
|
|
7
7
|
- Review findings should be concrete and evidence-based.
|
|
8
8
|
- Do not edit repository code in this step unless the user explicitly asks for fixes.
|
|
9
9
|
- Write one consolidated review artifact for the phase.
|
|
@@ -28,7 +28,7 @@ node "$AUTODEV_ROOT/autodev/bin/autodev-tools.cjs" init review-phase "$ARGUMENTS
|
|
|
28
28
|
- `NN-SUMMARY.md`
|
|
29
29
|
- relevant source files and tests
|
|
30
30
|
|
|
31
|
-
4. If
|
|
31
|
+
4. If agent delegation is available, explicitly call the `Agent` tool for these review subagents, one at a time in the foreground:
|
|
32
32
|
- `autodev-review-quality` for standalone installs, or `autodev:autodev-review-quality` in direct plugin runs
|
|
33
33
|
- `autodev-review-security` for standalone installs, or `autodev:autodev-review-security` in direct plugin runs
|
|
34
34
|
- `autodev-review-integration` for standalone installs, or `autodev:autodev-review-integration` in direct plugin runs
|
|
@@ -54,9 +54,11 @@ node "$AUTODEV_ROOT/autodev/bin/autodev-tools.cjs" init review-phase "$ARGUMENTS
|
|
|
54
54
|
- a final recommendation
|
|
55
55
|
|
|
56
56
|
8. If blockers are found:
|
|
57
|
-
- set project and track state back to `Current Step:
|
|
57
|
+
- set project and track state back to `Current Step: planning`
|
|
58
|
+
- set `Current Task: none`
|
|
59
|
+
- set `Current Task Status: blocked_review`
|
|
58
60
|
- keep `Next Command: /autodev`
|
|
59
|
-
- make the recommendation point back to the same phase
|
|
61
|
+
- make the recommendation point back to revising the same phase with blocker-fix tasks
|
|
60
62
|
|
|
61
63
|
9. If blockers are not found:
|
|
62
64
|
- set project and track state to `Current Step: verification`
|
|
@@ -42,9 +42,9 @@ node "$AUTODEV_ROOT/autodev/bin/autodev-tools.cjs" init verify-work "$ARGUMENTS"
|
|
|
42
42
|
7. Update the active track `STATE.md`:
|
|
43
43
|
- if verification passed and another phase remains, move to the next phase and set `Current Step: planning`
|
|
44
44
|
- if verification passed and no phase remains, set `Current Step: complete`
|
|
45
|
-
- if verification failed, keep the same phase active and set `Current Step:
|
|
45
|
+
- if verification failed, keep the same phase active and set `Current Step: planning`
|
|
46
46
|
- when moving to another phase, set `Current Task: none` and `Current Task Status: idle`
|
|
47
|
-
- when verification failed, set `Current Task: none` and `Current Task Status:
|
|
47
|
+
- when verification failed, set `Current Task: none` and `Current Task Status: blocked_verification`
|
|
48
48
|
- always set `Next Command: /autodev`
|
|
49
49
|
- always refresh the ISO timestamp
|
|
50
50
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: autodev:explore-codebase
|
|
3
|
-
description: Map an existing codebase, preferring
|
|
3
|
+
description: Map an existing codebase, preferring foreground delegated agents with clean fallback when unavailable
|
|
4
4
|
allowed-tools:
|
|
5
5
|
- Read
|
|
6
6
|
- Write
|
|
@@ -12,7 +12,7 @@ allowed-tools:
|
|
|
12
12
|
- Agent
|
|
13
13
|
---
|
|
14
14
|
<objective>
|
|
15
|
-
Explore the current repository, use
|
|
15
|
+
Explore the current repository, use foreground codebase agents when available, and write the brownfield map into `.autodev/codebase/`.
|
|
16
16
|
</objective>
|
|
17
17
|
|
|
18
18
|
<execution_context>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: autodev:review-phase
|
|
3
|
-
description: Run a review pass for code quality, security, integration, and product polish, preferring
|
|
3
|
+
description: Run a review pass for code quality, security, integration, and product polish, preferring foreground agents when available
|
|
4
4
|
argument-hint: "[phase-number]"
|
|
5
5
|
allowed-tools:
|
|
6
6
|
- Read
|
package/package.json
CHANGED