@mthanhlm/autodev 0.4.4 → 0.5.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/.claude-plugin/plugin.json +2 -2
  2. package/PUBLISH.md +9 -40
  3. package/README.md +70 -104
  4. package/autodev/bin/autodev-tools.cjs +521 -990
  5. package/autodev/templates/brief.md +19 -0
  6. package/autodev/templates/context.md +16 -0
  7. package/autodev/templates/plan.md +26 -46
  8. package/autodev/templates/run.md +20 -0
  9. package/bin/install.js +219 -422
  10. package/commands/autodev/index.md +117 -9
  11. package/commands/autodev/status.md +22 -0
  12. package/hooks/autodev-auto-format.js +3 -3
  13. package/hooks/autodev-git-guard.js +5 -7
  14. package/hooks/autodev-paths.js +3 -3
  15. package/package.json +4 -5
  16. package/scripts/run-tests.cjs +10 -0
  17. package/agents/autodev-codebase-domain.md +0 -25
  18. package/agents/autodev-codebase-quality.md +0 -25
  19. package/agents/autodev-codebase-runtime.md +0 -25
  20. package/agents/autodev-codebase-structure.md +0 -25
  21. package/agents/autodev-review-integration.md +0 -30
  22. package/agents/autodev-review-polish.md +0 -30
  23. package/agents/autodev-review-quality.md +0 -30
  24. package/agents/autodev-review-security.md +0 -30
  25. package/agents/autodev-task-worker.md +0 -39
  26. package/autodev/templates/codebase/domain.md +0 -13
  27. package/autodev/templates/codebase/quality.md +0 -13
  28. package/autodev/templates/codebase/runtime.md +0 -13
  29. package/autodev/templates/codebase/structure.md +0 -13
  30. package/autodev/templates/codebase/summary.md +0 -13
  31. package/autodev/templates/config.json +0 -22
  32. package/autodev/templates/project-state.md +0 -15
  33. package/autodev/templates/project.md +0 -24
  34. package/autodev/templates/requirements.md +0 -14
  35. package/autodev/templates/review.md +0 -27
  36. package/autodev/templates/roadmap.md +0 -17
  37. package/autodev/templates/state.md +0 -15
  38. package/autodev/templates/summary.md +0 -22
  39. package/autodev/templates/task-summary.md +0 -18
  40. package/autodev/templates/task.md +0 -23
  41. package/autodev/templates/track-state.md +0 -16
  42. package/autodev/templates/track.md +0 -24
  43. package/autodev/templates/uat.md +0 -18
  44. package/autodev/workflows/autodev-auto.md +0 -62
  45. package/autodev/workflows/autodev.md +0 -83
  46. package/autodev/workflows/cleanup.md +0 -51
  47. package/autodev/workflows/execute-phase.md +0 -144
  48. package/autodev/workflows/explore-codebase.md +0 -70
  49. package/autodev/workflows/help.md +0 -113
  50. package/autodev/workflows/new-project.md +0 -108
  51. package/autodev/workflows/plan-phase.md +0 -134
  52. package/autodev/workflows/progress.md +0 -18
  53. package/autodev/workflows/review-phase.md +0 -80
  54. package/autodev/workflows/review-plan.md +0 -55
  55. package/autodev/workflows/review-task.md +0 -70
  56. package/autodev/workflows/verify-work.md +0 -71
  57. package/commands/autodev/auto.md +0 -27
  58. package/commands/autodev/cleanup.md +0 -23
  59. package/commands/autodev/execute-phase.md +0 -29
  60. package/commands/autodev/explore-codebase.md +0 -33
  61. package/commands/autodev/help.md +0 -18
  62. package/commands/autodev/new-project.md +0 -30
  63. package/commands/autodev/plan-phase.md +0 -26
  64. package/commands/autodev/progress.md +0 -18
  65. package/commands/autodev/review-phase.md +0 -29
  66. package/commands/autodev/review-task.md +0 -25
  67. package/commands/autodev/verify-work.md +0 -24
  68. package/hooks/autodev-context-monitor.js +0 -59
  69. package/hooks/autodev-phase-boundary.sh +0 -49
  70. package/hooks/autodev-prompt-guard.js +0 -78
  71. package/hooks/autodev-read-guard.js +0 -42
  72. package/hooks/autodev-session-state.sh +0 -51
  73. package/hooks/autodev-statusline.js +0 -83
  74. package/hooks/autodev-workflow-guard.js +0 -43
  75. package/hooks/hooks.json +0 -89
@@ -1,15 +0,0 @@
1
- # Project State
2
-
3
- Project Type: [greenfield or brownfield]
4
- Active Track: [slug]
5
- Current Step: initialized
6
- Current Task: none
7
- Current Task Status: idle
8
- Status: active
9
- Run Mode: checkpointed
10
- Auto Retry Count: 0
11
- Next Command: /autodev
12
- Last Updated: [ISO timestamp]
13
-
14
- ## Notes
15
- - Project initialized.
@@ -1,24 +0,0 @@
1
- # Project
2
-
3
- ## One-Line Summary
4
- [Describe the product in one sentence.]
5
-
6
- ## Project Type
7
- [greenfield or brownfield]
8
-
9
- ## Problem
10
- [What pain are you solving?]
11
-
12
- ## Users
13
- [Who is this for?]
14
-
15
- ## Success Criteria
16
- - [Primary outcome]
17
- - [Primary quality bar]
18
-
19
- ## Constraints
20
- - [Technical constraints]
21
- - [Business or time constraints]
22
-
23
- ## Non-Goals
24
- - [Out of scope]
@@ -1,14 +0,0 @@
1
- # Requirements
2
-
3
- Track: [Name]
4
-
5
- ## Must Have
6
- 1. REQ-01: [Requirement]
7
- Acceptance:
8
- - [Observable outcome]
9
-
10
- ## Nice to Have
11
- 1. NICE-01: [Optional enhancement]
12
-
13
- ## Non-Goals
14
- - [Explicitly excluded work]
@@ -1,27 +0,0 @@
1
- # Phase [N] Review: [Name]
2
-
3
- Status: pending
4
-
5
- ## Code Quality
6
- - [Finding or "no blocking findings"]
7
-
8
- ## Security
9
- - [Finding or "no blocking findings"]
10
-
11
- ## Integration And Regression
12
- - [Finding or "no blocking findings"]
13
-
14
- ## Product Polish And AI-Look
15
- - [Finding or "no blocking findings"]
16
-
17
- ## Blockers
18
- - [Blocker or "none"]
19
-
20
- ## Strengths
21
- - [What looks solid]
22
-
23
- ## Recommendation
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]
@@ -1,17 +0,0 @@
1
- # Track Roadmap
2
-
3
- ## Phase 1 [feature]: [Name]
4
- Status: pending
5
- Goal: [What this phase achieves]
6
- Deliverables:
7
- - [Deliverable]
8
- Risks:
9
- - [Risk]
10
-
11
- ## Phase 2 [feature]: [Name]
12
- Status: pending
13
- Goal: [What this phase achieves]
14
- Deliverables:
15
- - [Deliverable]
16
- Risks:
17
- - [Risk]
@@ -1,15 +0,0 @@
1
- # Project State
2
-
3
- Project Type: [greenfield or brownfield]
4
- Active Track: [slug]
5
- Current Step: initialized
6
- Current Task: none
7
- Current Task Status: idle
8
- Status: active
9
- Run Mode: checkpointed
10
- Auto Retry Count: 0
11
- Next Command: /autodev
12
- Last Updated: [ISO timestamp]
13
-
14
- ## Notes
15
- - Project initialized.
@@ -1,22 +0,0 @@
1
- # Phase [N] Summary: [Name]
2
-
3
- Type: [feature|bugfix|refactor|research|polish]
4
-
5
- ## Tasks Completed
6
- - Task 01 - [Outcome]
7
- - Task 02 - [Outcome]
8
-
9
- ## Phase Outcome
10
- - [What shipped]
11
-
12
- ## Files Changed
13
- - [path]
14
-
15
- ## Verification
16
- - [Command and result]
17
-
18
- ## Remaining Risks
19
- - [Known gap]
20
-
21
- ## Next Step
22
- - Run `/autodev`
@@ -1,18 +0,0 @@
1
- # Task [NN] Summary: [Name]
2
-
3
- Status: done
4
-
5
- ## Completed
6
- - [What changed]
7
-
8
- ## Files Changed
9
- - [path]
10
-
11
- ## Verification
12
- - [Command and result]
13
-
14
- ## Risks Or Follow-Up
15
- - [Risk or none]
16
-
17
- ## Recommended Next Step
18
- - Return to `/autodev`
@@ -1,23 +0,0 @@
1
- # Task [NN]: [Name]
2
-
3
- Status: pending
4
- Depends On: none
5
-
6
- ## Goal
7
- [What this task accomplishes]
8
-
9
- ## Why This Task Exists
10
- - [Why this should be a separate unit]
11
-
12
- ## Files Likely To Change
13
- - [path]
14
-
15
- ## Implementation Notes
16
- - [Concrete implementation guidance]
17
-
18
- ## Verification
19
- - [Command]
20
- - [Manual check]
21
-
22
- ## Done Looks Like
23
- - [Observable completion signal]
@@ -1,16 +0,0 @@
1
- # Track State
2
-
3
- Track: [Name]
4
- Current Phase: 1
5
- Current Phase Type: [feature]
6
- Current Step: planning
7
- Current Task: none
8
- Current Task Status: idle
9
- Status: active
10
- Run Mode: checkpointed
11
- Auto Retry Count: 0
12
- Next Command: /autodev
13
- Last Updated: [ISO timestamp]
14
-
15
- ## Notes
16
- - Track ready.
@@ -1,24 +0,0 @@
1
- # Track: [Name]
2
-
3
- Type: [feature|bugfix|refactor|research|polish]
4
- Status: active
5
-
6
- ## Why This Track
7
- [Why this work matters right now.]
8
-
9
- ## Outcome
10
- [What changes for the user or operator when this track is done.]
11
-
12
- ## Success Signals
13
- - [Observable user or operator outcome]
14
- - [Verification or quality bar]
15
-
16
- ## Scope Boundaries
17
- - [What is in scope]
18
- - [What is explicitly out of scope]
19
-
20
- ## Dependencies
21
- - [Team, system, or technical dependency]
22
-
23
- ## Existing Code Notes
24
- - [Important brownfield context or leave none]
@@ -1,18 +0,0 @@
1
- # Phase [N] UAT: [Name]
2
-
3
- Status: pending
4
-
5
- ## Test Cases
6
- - [ ] [Behavior to verify]
7
-
8
- ## Results
9
- - [Pass or fail notes]
10
-
11
- ## Bugs Or Follow-Up
12
- - [Issue or none]
13
-
14
- ## Fix Return
15
- - [Only add when verification fails]
16
-
17
- ## Recommended Next Step
18
- - `/autodev`
@@ -1,62 +0,0 @@
1
- <purpose>
2
- Use `/autodev-auto` as the explicit opt-in continuous entrypoint. Route automatically, keep git read-only, and continue until the track is done or a real stop condition requires the user.
3
- </purpose>
4
-
5
- <rules>
6
- - `/autodev-auto` is opt-in. `/autodev` remains the safer checkpointed default.
7
- - Never run git write commands.
8
- - Never use background execution or waves.
9
- - Use `--auto` when reading autodev router/init/progress payloads.
10
- - Skip checkpoint-only review stops when the next step is mechanically clear.
11
- - Stop immediately when `pause_reason` is one of:
12
- - `missing_intent`
13
- - `track_selection`
14
- - `dependency_deadlock`
15
- - `needs_manual_verification`
16
- - `cleanup_confirmation`
17
- - `auto_retry_limit`
18
- - Review or verification blockers should stay in the same phase. Append remediation work to that phase instead of creating a replacement phase.
19
- </rules>
20
-
21
- <process>
22
- 1. Run:
23
-
24
- ```bash
25
- AUTODEV_ROOT="${CLAUDE_PLUGIN_ROOT:-$HOME/.claude}"
26
- node "$AUTODEV_ROOT/autodev/bin/autodev-tools.cjs" status --auto
27
- ```
28
-
29
- 2. Inspect `route.kind`, `route.run_mode`, `route.auto_continuable`, `route.pause_reason`, and the active track data.
30
-
31
- 3. Handle stop conditions first:
32
- - If `route.kind` is `init_project` and the current prompt still does not clearly define the project and first track, stop for `missing_intent`.
33
- - If `route.kind` is `init_project` but the current prompt already gives clear project and track intent, treat that pause as resolved and continue into new-project.
34
- - If `route.pause_reason` is `track_selection`, stop and ask the user which track to continue or whether to create a new one.
35
- - If `route.pause_reason` is `dependency_deadlock`, stop and tell the user the current phase plan must be repaired before more auto execution can continue.
36
- - If `route.pause_reason` is `auto_retry_limit`, stop and tell the user the same phase has already auto-replanned twice.
37
- - If `route.pause_reason` is `cleanup_confirmation`, stop and require the user to start cleanup explicitly.
38
-
39
- 4. Route as follows:
40
- - `init_project`: load and perform the new-project workflow in auto mode.
41
- - `explore_codebase`: load and perform the explore-codebase workflow in auto mode.
42
- - `plan_phase`: load and perform the plan-phase workflow in auto mode.
43
- - `execute_phase`: load and perform the execute-phase workflow in auto mode.
44
- - `review_phase`: load and perform the review-phase workflow in auto mode.
45
- - `verify_phase`: load and perform the verify-work workflow in auto mode.
46
-
47
- 5. Do not load `review-plan` or `review-task` in auto mode. The router already skips those checkpoint-only stops when it is safe to continue.
48
-
49
- 6. After each completed routed step, re-run the auto status command in the same turn and continue if the next route is still auto-continuable.
50
-
51
- 7. Keep both project-level and track-level state aligned after every step:
52
- - `Run Mode: auto`
53
- - `Next Command: /autodev-auto`
54
- - `Auto Retry Count: 0` after a clean plan or successful review/verification
55
- - increment `Auto Retry Count` only when auto mode reopens the same phase after review or verification blockers
56
-
57
- 8. End only when the track is complete or a real pause reason remains. Report:
58
- - what step just completed
59
- - why execution stopped or completed
60
- - `/autodev-auto` as the default next command when more auto work remains
61
- - `/autodev` only as the manual fallback
62
- </process>
@@ -1,83 +0,0 @@
1
- <purpose>
2
- Use `/autodev` as the single entrypoint for the normal workflow. Route automatically, keep git read-only, and move the project forward in the same turn whenever possible.
3
- </purpose>
4
-
5
- <rules>
6
- - Prefer `/autodev` over telling the user to run a different command manually.
7
- - `/autodev` is the checkpointed mode. Use `/autodev-auto` only when the user explicitly asked for continuous execution.
8
- - Manual commands remain valid escape hatches. Mention them only as shortcuts.
9
- - Keep the model `project -> track -> phase -> tasks`.
10
- - Brownfield repositories should be mapped before detailed phase planning.
11
- - Never run git write commands.
12
- - Keep router context small. Do not preload workflow files that are not selected by the current route.
13
- </rules>
14
-
15
- <process>
16
- 1. Run:
17
-
18
- ```bash
19
- AUTODEV_ROOT="${CLAUDE_PLUGIN_ROOT:-$HOME/.claude}"
20
- node "$AUTODEV_ROOT/autodev/bin/autodev-tools.cjs" status
21
- ```
22
-
23
- 2. Inspect the returned `route.kind`, `project_type`, `tracks`, and active track data.
24
-
25
- 3. Route as follows:
26
- - `init_project`: load and perform the new-project workflow.
27
- - `explore_codebase`: load and perform the explore-codebase workflow.
28
- - `plan_phase`: load and perform the plan-phase workflow.
29
- - `plan_review`: load and perform the review-plan workflow so the user can review the phase plan before any execution starts.
30
- - `execute_phase`: load and perform the execute-phase workflow, which should advance one task-sized unit in the current phase session by trying a fresh foreground agent first and falling back cleanly when agent delegation is unavailable.
31
- - `task_review`: load and perform the review-task workflow so the user can review one completed task before any further execution starts.
32
- - `review_phase`: load and perform the review-phase workflow.
33
- - `verify_phase`: load and perform the verify-work workflow.
34
-
35
- 4. Read only the workflow file needed for the selected route. Do not load the others "just in case".
36
-
37
- 5. Do not stop after identifying a brownfield codebase route. If the route is `explore_codebase`, perform the exploration as part of the same `/autodev` run instead of telling the user to switch commands.
38
-
39
- 6. If the route is `track_select` or `track_setup`, handle it directly:
40
- - If tracks exist, ask whether to continue one of them or create a new track.
41
- - When creating or repairing a track, do a short track-discovery pass before writing files.
42
- - Ask for:
43
- - the initiative name
44
- - what the user wants to ship or change in this track
45
- - what done looks like
46
- - scope boundaries and explicit non-goals
47
- - dependencies or constraints only if they affect planning
48
- - If the request is vague, summarize the understanding in a few bullets and resolve ambiguity before writing.
49
- - If no tracks exist, do not jump straight to phase types before the track goal is clear.
50
- - Create or repair:
51
- - `.autodev/ACTIVE_TRACK`
52
- - `.autodev/tracks/<slug>/TRACK.md`
53
- - `.autodev/tracks/<slug>/REQUIREMENTS.md`
54
- - `.autodev/tracks/<slug>/ROADMAP.md`
55
- - `.autodev/tracks/<slug>/STATE.md`
56
- - Fill the track and requirements docs from the clarified intent, not generic placeholders.
57
- - Use a lowercase hyphenated slug.
58
- - Use roadmap headings in this format:
59
-
60
- ```text
61
- ## Phase N [type]: Name
62
- ```
63
-
64
- - After track setup, continue in the same turn by re-running the route logic mentally and executing the next step.
65
-
66
- 7. If the route is `track_complete`, ask whether the user wants to:
67
- - start a new track
68
- - run cleanup
69
- - stop here
70
-
71
- 8. When the user chooses a new track at step 7, create it immediately and continue routing in the same turn.
72
-
73
- 9. Every time you finish a routed step, keep both project-level and track-level state aligned. Default the state files to:
74
- - `Run Mode: checkpointed`
75
- - `Auto Retry Count: 0` unless a blocked phase is being actively recovered
76
- - `Next Command: /autodev`
77
-
78
- 10. End with:
79
- - what step you completed
80
- - the current route reason in plain language
81
- - `/autodev` as the default next command
82
- - the matching manual shortcut only as an optional escape hatch
83
- </process>
@@ -1,51 +0,0 @@
1
- <purpose>
2
- Clean or archive autodev state without flags. Prefer preserving useful project context over deleting it.
3
- </purpose>
4
-
5
- <rules>
6
- - Ask the user which cleanup action to take. Do not rely on flags.
7
- - Archive before delete when a safe archive path makes sense.
8
- - Require a second explicit `AskUserQuestion` confirmation before deleting all `.autodev/` state.
9
- - Never touch repository code outside `.autodev/`.
10
- </rules>
11
-
12
- <process>
13
- 1. Run:
14
-
15
- ```bash
16
- AUTODEV_ROOT="${CLAUDE_PLUGIN_ROOT:-$HOME/.claude}"
17
- node "$AUTODEV_ROOT/autodev/bin/autodev-tools.cjs" cleanup
18
- ```
19
-
20
- 2. If no `.autodev/` project exists, stop and say there is nothing to clean.
21
-
22
- 3. Use the `AskUserQuestion` tool for the choice below. Do not ask this in plain assistant text.
23
- Ask the user to choose one action:
24
- - archive completed phase artifacts only
25
- - archive the current track and clear the active selection
26
- - delete all `.autodev/` state
27
-
28
- 4. For `archive completed phase artifacts only`:
29
- - create `.autodev/archive/<track-slug>/phases/` if needed
30
- - move only verified phase directories there
31
- - leave project docs, codebase docs, active track, and unfinished phases in place
32
- - update project and track state to `Next Command: /autodev`
33
-
34
- 5. For `archive the current track and clear the active selection`:
35
- - move `.autodev/tracks/<slug>/` to `.autodev/archive/tracks/<slug>-<timestamp>/`
36
- - remove `.autodev/ACTIVE_TRACK`
37
- - update `.autodev/STATE.md` to `Current Step: track-selection` and `Next Command: /autodev`
38
-
39
- 6. For `delete all .autodev state`:
40
- - use the `AskUserQuestion` tool to ask for one more confirmation
41
- - the confirmation should clearly say this removes the entire `.autodev/` directory and cannot be undone by the workflow
42
- - offer only:
43
- - delete all `.autodev/` state
44
- - cancel cleanup
45
- - only remove `.autodev/` if the user confirms the delete option
46
-
47
- 7. End with:
48
- - what was archived or deleted
49
- - what project context remains
50
- - the next recommended route
51
- </process>
@@ -1,144 +0,0 @@
1
- <purpose>
2
- Execute an active-track phase through task-sized delegated runs, keep the main session orchestration-focused, and capture both task summaries and the final phase summary.
3
- </purpose>
4
-
5
- <rules>
6
- - Never run git write commands.
7
- - Do not create commits, branches, merges, or worktrees.
8
- - Stay within the current phase. Do not silently expand scope.
9
- - Execute one task at a time by default.
10
- - Do not use waves.
11
- - Prefer a fresh foreground agent for each task so the phase session does not bloat.
12
- - If agent delegation is available in this environment, delegate task implementation.
13
- - If a delegation attempt fails with an environment limitation like `specialized agents aren't available`, treat agent delegation as unavailable for this run and continue cleanly.
14
- - The main phase session should remain orchestration-focused whenever delegation works.
15
- - The main phase session may update `.autodev/` state and aggregate phase artifacts.
16
- - Do not run autodev subagents as background tasks.
17
- - In `/autodev-auto`, keep executing ready tasks in the same phase until the phase is complete or a real blocker appears.
18
- </rules>
19
-
20
- <process>
21
- 1. Run:
22
-
23
- ```bash
24
- AUTODEV_ROOT="${CLAUDE_PLUGIN_ROOT:-$HOME/.claude}"
25
- node "$AUTODEV_ROOT/autodev/bin/autodev-tools.cjs" init execute-phase "$ARGUMENTS"
26
- ```
27
-
28
- If this run came from `/autodev-auto`, append `--auto` to the same command.
29
-
30
- 2. If no phase is found or the plan file is missing, stop and direct the user to `/autodev-plan-phase`.
31
-
32
- 3. Read:
33
- - `.autodev/STATE.md`
34
- - `.autodev/tracks/<active-track>/STATE.md`
35
- - `.autodev/codebase/summary.md` if it exists
36
- - the target `NN-PLAN.md`
37
- - all `TASK-*.md`
38
- - all existing `TASK-*-SUMMARY.md`
39
-
40
- 4. If the phase has no `TASK-*.md` files:
41
- - create `TASK-01.md` as a compatibility bridge from the current phase plan
42
- - keep it narrow and explicit
43
- - then continue
44
-
45
- 5. Determine the next executable task:
46
- - prefer the first task without a summary whose dependencies are already done
47
- - if no executable task remains and all task summaries exist, move to phase aggregation
48
- - if `dependency_deadlock` is true, stop before execution, set both state files to `Current Step: planning`, set `Current Task: none`, set `Current Task Status: blocked_dependencies`, keep `Run Mode` aligned to the current command, keep `Next Command` aligned to the current command, and ask the user how to repair the plan
49
-
50
- 6. Before running a task, show the user:
51
- - task id and title
52
- - likely files to touch
53
- - verification plan
54
- - any dependency note
55
-
56
- 7. If agent delegation is available, explicitly call the `Agent` tool and select the installed task-worker subagent for the selected task.
57
- Use:
58
- - `autodev-task-worker` when autodev is installed into `.claude/`
59
- - `autodev:autodev-task-worker` only when this workflow is being run directly from a plugin directory
60
-
61
- Run it in the foreground as part of the current workflow step.
62
-
63
- Tell the subagent:
64
- - phase path
65
- - task path
66
- - summary path to write
67
- - required context files to read first
68
- - that it owns the task implementation and the task summary
69
- - that the main session should stay orchestration-focused
70
- - to return a concise outcome only
71
-
72
- 8. If worker delegation is unavailable, do not stop on the raw platform message.
73
- Treat messages like `specialized agents aren't available` as a capability limitation, then:
74
- - tell the user plainly that delegated-agent execution is unavailable in this environment
75
- - continue with the same task in the current session
76
- - keep the same task boundaries
77
- - still write the task summary before stopping
78
-
79
- 9. After the delegated agent returns, or after the current-session fallback completes:
80
- - confirm `TASK-NN-SUMMARY.md` exists
81
- - inspect whether the task is done or blocked
82
- - report the result to the user
83
-
84
- 10. If more tasks remain in checkpointed mode:
85
- - update project and track state to:
86
- - `Current Step: task_review`
87
- - `Current Task: <current-task>`
88
- - `Current Task Status: complete`
89
- - `Run Mode: checkpointed`
90
- - `Next Command: /autodev`
91
- - stop after this task
92
- - end by telling the user `/autodev` will open the task review checkpoint before any next-task execution
93
-
94
- 11. If more tasks remain in auto mode:
95
- - update project and track state to:
96
- - `Current Step: execution`
97
- - `Current Task: <next-ready-task>`
98
- - `Current Task Status: ready`
99
- - `Run Mode: auto`
100
- - `Next Command: /autodev-auto`
101
- - continue to the next ready task in the same run
102
- - stop only if a new blocker appears
103
- 12. If all tasks are done:
104
- - write or update `NN-SUMMARY.md` from the template with:
105
- - completed tasks
106
- - aggregate files changed
107
- - overall verification results
108
- - remaining risks
109
- - next step
110
-
111
- 13. Update the active track `STATE.md` so it points to:
112
- - `Current Phase: N`
113
- - `Current Phase Type: <type>`
114
- - `Current Step: task_review` in checkpointed mode, or `Current Step: review` in auto mode
115
- - `Current Task: <current-task>`
116
- - `Current Task Status: complete`
117
- - `Run Mode: checkpointed` for `/autodev`, or `Run Mode: auto` for `/autodev-auto`
118
- - `Next Command: /autodev` for checkpointed mode, or `/autodev-auto` for auto mode
119
- - current ISO timestamp
120
-
121
- 14. Update `.autodev/STATE.md` so it points to:
122
- - `Active Track: <slug>`
123
- - `Current Step: task_review` in checkpointed mode, or `Current Step: review` in auto mode
124
- - `Current Task: <current-task>`
125
- - `Current Task Status: complete`
126
- - `Run Mode: checkpointed` for `/autodev`, or `Run Mode: auto` for `/autodev-auto`
127
- - `Next Command: /autodev` for checkpointed mode, or `/autodev-auto` for auto mode
128
- - current ISO timestamp
129
-
130
- 15. If the current task is blocked or incomplete:
131
- - say so clearly in the task summary
132
- - set both state files to `Current Step: planning`
133
- - set `Current Task: <same-task>`
134
- - set `Current Task Status: blocked`
135
- - keep `Run Mode` aligned to the current command
136
- - keep `Next Command` aligned to the current command
137
- - tell the user the phase should be revised before more execution
138
-
139
- 16. End with a short outcome summary and the next recommended command.
140
- - In checkpointed mode, never execute a second task in the same run.
141
- - In checkpointed mode, if all tasks are now done, say `/autodev` will open the phase-review checkpoint next.
142
- - In checkpointed mode, otherwise say `/autodev` will open the task-review checkpoint for the completed task.
143
- - In auto mode, keep going until the phase completes or a real blocker stops execution.
144
- </process>
@@ -1,70 +0,0 @@
1
- <purpose>
2
- Map a brownfield repository quickly and produce a usable codebase brief without drifting into over-analysis.
3
- </purpose>
4
-
5
- <rules>
6
- - The main `/autodev` session owns this workflow and the final synthesis.
7
- - Specialized codebase agents are optional implementation helpers, not a separate user-facing mode.
8
- - Prefer a small set of foreground codebase agents, run one at a time, only when agent delegation is clearly available.
9
- - Give each agent a disjoint write target.
10
- - If agent delegation is unavailable or unclear, continue inline without surfacing platform confusion.
11
- - Use read-only investigation only. No git writes.
12
- - Focus on information that will improve planning and execution for the active track.
13
- </rules>
14
-
15
- <process>
16
- 1. Run:
17
-
18
- ```bash
19
- AUTODEV_ROOT="${CLAUDE_PLUGIN_ROOT:-$HOME/.claude}"
20
- node "$AUTODEV_ROOT/autodev/bin/autodev-tools.cjs" init explore-codebase
21
- ```
22
-
23
- If this run came from `/autodev-auto`, append `--auto` to the same command.
24
-
25
- 2. If no project exists, stop and tell the user to use `/autodev` or `/autodev-new-project`.
26
-
27
- 3. Read:
28
- - `.autodev/PROJECT.md`
29
- - `.autodev/STATE.md`
30
- - `.autodev/ACTIVE_TRACK`
31
- - the active track docs if they exist
32
- - representative repo files needed to orient the exploration
33
-
34
- 4. Do a small amount of direct repo reading first so the current session understands the workspace before deciding whether helper agents are useful.
35
-
36
- 5. If agent delegation is clearly available, explicitly call the `Agent` tool for these subagents, one at a time in the foreground, with owned outputs:
37
- - `autodev-codebase-structure` for standalone installs, or `autodev:autodev-codebase-structure` in direct plugin runs, owns `.autodev/codebase/structure.md`
38
- - `autodev-codebase-domain` for standalone installs, or `autodev:autodev-codebase-domain` in direct plugin runs, owns `.autodev/codebase/domain.md`
39
- - `autodev-codebase-runtime` for standalone installs, or `autodev:autodev-codebase-runtime` in direct plugin runs, owns `.autodev/codebase/runtime.md`
40
- - `autodev-codebase-quality` for standalone installs, or `autodev:autodev-codebase-quality` in direct plugin runs, owns `.autodev/codebase/quality.md`
41
-
42
- 6. Tell each agent:
43
- - it is not alone in the codebase
44
- - it must not overwrite another agent's file
45
- - it should stay read-only except for its owned output file
46
- - it should prefer concise, decision-useful findings over exhaustive listing
47
-
48
- 7. If agent delegation is unavailable, do not stop on the raw platform message.
49
- Treat messages like `specialized agents aren't available` as an environment limitation, tell the user exploration will continue in the current session, and write the four owned output files directly.
50
-
51
- 8. After the four agent outputs are written, or after the current-session fallback writes them, review them and synthesize `.autodev/codebase/summary.md` with:
52
- - architectural overview
53
- - major constraints
54
- - current track implications
55
- - hotspots and likely safe change points
56
- - the next planning risks to watch
57
-
58
- 9. Update `.autodev/STATE.md` and the active track `STATE.md` so they reflect:
59
- - `Current Step: planning`
60
- - `Run Mode: checkpointed` for `/autodev`, or `Run Mode: auto` for `/autodev-auto`
61
- - `Auto Retry Count: 0`
62
- - `Next Command: /autodev` for checkpointed mode, or `/autodev-auto` for auto mode
63
- - refreshed ISO timestamp
64
-
65
- 10. End with:
66
- - the biggest structural insight
67
- - the biggest risk
68
- - `/autodev` as the next command
69
- - `/autodev-plan-phase <n>` only as the optional manual shortcut when obvious
70
- </process>