@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,7 +1,7 @@
1
1
  {
2
2
  "name": "autodev",
3
- "description": "A lean Claude Code workflow system with a single entrypoint, task-based phase execution, and read-only git.",
4
- "version": "0.4.4",
3
+ "description": "A global Claude Code plugin with durable repo context, hard verification gates, and read-only git.",
4
+ "version": "0.5.0",
5
5
  "author": {
6
6
  "name": "mthanhlm"
7
7
  },
package/PUBLISH.md CHANGED
@@ -1,24 +1,8 @@
1
1
  # Publishing `@mthanhlm/autodev`
2
2
 
3
- ## One-Time Setup
4
-
5
- 1. Make sure the npm account `mthanhlm` has access to the `@mthanhlm` scope.
6
- 2. Log in:
7
-
8
- ```bash
9
- npm login
10
- ```
11
-
12
- 3. Verify the active account:
13
-
14
- ```bash
15
- npm whoami
16
- ```
17
-
18
3
  ## Pre-Publish Checklist
19
4
 
20
5
  ```bash
21
- cd autodev
22
6
  npm test
23
7
  claude plugin validate .
24
8
  npm pack
@@ -30,30 +14,21 @@ Check the tarball contents:
30
14
  tar -tf mthanhlm-autodev-$(node -p "require('./package.json').version").tgz
31
15
  ```
32
16
 
33
- ## First Public Publish
17
+ ## Publish
34
18
 
35
- Scoped packages are private by default. The first public release must include `--access public`.
19
+ First public release:
36
20
 
37
21
  ```bash
38
22
  npm publish --access public
39
23
  ```
40
24
 
41
- ## Later Releases
42
-
43
- 1. Bump the version in both `package.json` and `.claude-plugin/plugin.json`.
44
- 2. Regenerate the tarball:
45
-
46
- ```bash
47
- npm pack
48
- ```
49
-
50
- 3. Publish:
25
+ Later releases:
51
26
 
52
27
  ```bash
53
28
  npm publish
54
29
  ```
55
30
 
56
- ## Post-Publish Smoke Check
31
+ ## Smoke Check
57
32
 
58
33
  Verify npm sees the release:
59
34
 
@@ -61,22 +36,16 @@ Verify npm sees the release:
61
36
  npm view @mthanhlm/autodev version
62
37
  ```
63
38
 
64
- Then install from npm in a scratch directory:
39
+ Install into a scratch Claude config directory:
65
40
 
66
41
  ```bash
67
42
  mkdir -p /tmp/autodev-smoke
68
- cd /tmp/autodev-smoke
69
- npx @mthanhlm/autodev@latest --local
43
+ CLAUDE_CONFIG_DIR=/tmp/autodev-smoke npx @mthanhlm/autodev@latest
70
44
  ```
71
45
 
72
- Open Claude Code in that directory and run:
46
+ Open Claude Code against any repo and run:
73
47
 
74
48
  ```text
75
- /autodev-help
76
- ```
77
-
78
- Optional source-tree check during development:
79
-
80
- ```bash
81
- claude --plugin-dir . agents
49
+ /autodev
50
+ /autodev-status
82
51
  ```
package/README.md CHANGED
@@ -1,142 +1,108 @@
1
1
  # autodev
2
2
 
3
- `autodev` is a Claude Code workflow package built for one thing: get from idea to shipped code without the slow, over-engineered, git-writing behavior that made GSD painful.
4
-
5
- ## What It Does
6
-
7
- - Installs a standalone Claude Code workflow under `~/.claude/` or `./.claude/`
8
- - Keeps project state in `.autodev/`
9
- - Uses `/autodev` as the main command
10
- - Adds `/autodev-auto` as the explicit opt-in continuous mode
11
- - Organizes work as `project -> track -> phase -> tasks`
12
- - Starts new projects and new tracks with a short discovery pass so requirements are based on the user's actual goal
13
- - Resolves `.autodev/` state from the repo root even when Claude is started in a nested subdirectory
14
- - Maps brownfield repos in the main session, with optional specialized helpers when the environment supports them
15
- - Runs a multi-lens review pass, using foreground review agents when the environment supports them
16
- - Can auto-format edited code after Claude writes files when a local formatter is available
17
- - Ships manual commands when you want direct control:
18
- - `/autodev-auto`
19
- - `/autodev-help`
20
- - `/autodev-new-project`
21
- - `/autodev-explore-codebase`
22
- - `/autodev-plan-phase`
23
- - `/autodev-execute-phase`
24
- - `/autodev-review-task`
25
- - `/autodev-review-phase`
26
- - `/autodev-verify-work`
27
- - `/autodev-cleanup`
28
- - `/autodev-progress`
29
- - Treats git as read-only inside the workflow
3
+ `autodev` is a global Claude Code plugin for one job: keep durable context in the repo, execute one bounded slice of work at a time, and stay honest about verification.
30
4
 
31
- ## Install
5
+ This reset removes the old workflow tree, multi-agent prompt theater, and markdown state machine. The new design is smaller on purpose.
32
6
 
33
- Primary supported usage is the standalone `npx` installer.
34
- The repo also carries Claude Code plugin metadata for validation and local development, but the supported end-user runtime remains the installed `.claude/` workflow.
35
- Supported runtime is Claude Code with Node plus `sh`/`bash` available.
7
+ ## Core Behavior
36
8
 
37
- ```bash
38
- npx @mthanhlm/autodev@latest --global
39
- ```
9
+ - Installs globally into `~/.claude`
10
+ - Forces `CLAUDE_CODE_DISABLE_BACKGROUND_TASKS=1` in Claude Code `settings.json`
11
+ - Uses `/autodev` as the main entrypoint
12
+ - Uses `/autodev-status` for a compact state view
13
+ - Keeps durable project context in `.autodev/`
14
+ - Blocks git write commands while allowing read-only git
15
+ - Auto-formats edited code when the repo already has a local formatter
16
+ - Stops when verification is missing instead of pretending the work is done
40
17
 
41
- Interactive install with location selection:
18
+ ## Durable Files
42
19
 
43
- ```bash
44
- npx @mthanhlm/autodev@latest
45
- ```
20
+ `autodev` keeps a small, inspectable file set in the repo:
21
+
22
+ - `.autodev/state.json`
23
+ Machine state. This is the only authoritative state file.
24
+ - `.autodev/brief.md`
25
+ Goal, constraints, users, and definition of done.
26
+ - `.autodev/context.md`
27
+ Optional brownfield snapshot for the current goal.
28
+ - `.autodev/plan.md`
29
+ One active plan with 3-7 items.
30
+ - `.autodev/runs/*.md`
31
+ Append-only run reports with observed facts and verification results.
32
+
33
+ ## Install
46
34
 
47
- Local install for one repo:
35
+ Supported mode is global install only.
48
36
 
49
37
  ```bash
50
- npx @mthanhlm/autodev@latest --local
38
+ npx @mthanhlm/autodev@latest
51
39
  ```
52
40
 
53
- Install and also disable Claude Code background tasks in the target `settings.json`:
41
+ Equivalent explicit form:
54
42
 
55
43
  ```bash
56
- npx @mthanhlm/autodev@latest --global --disable-background-tasks
44
+ npx @mthanhlm/autodev@latest --global
57
45
  ```
58
46
 
59
47
  Uninstall:
60
48
 
61
49
  ```bash
62
- npx @mthanhlm/autodev@latest --global --uninstall
63
- npx @mthanhlm/autodev@latest --local --uninstall
50
+ npx @mthanhlm/autodev@latest --uninstall
64
51
  ```
65
52
 
66
- ## Default Flow
67
-
68
- Checkpointed:
53
+ ## Commands
69
54
 
70
55
  ```text
71
56
  /autodev
57
+ /autodev-status
72
58
  ```
73
59
 
74
- Continuous until blocked or done:
75
-
76
- ```text
77
- /autodev-auto
78
- ```
79
-
80
- Typical brownfield route:
60
+ Typical brownfield flow:
81
61
 
82
62
  ```text
83
63
  /autodev
84
- -> new project
85
- -> explore codebase
86
- -> plan phase
87
- -> review phase plan
88
- -> execute one task
89
- -> review task
90
- -> execute one task
91
- -> review task
92
- -> review
93
- -> verify
64
+ -> write brief.md
65
+ -> write context.md
66
+ -> write plan.md
67
+ -> execute one item
68
+ -> verify it
69
+ -> append a run report
70
+ -> stop or continue from state.json later
94
71
  ```
95
72
 
96
- ## Workflow Model
97
-
98
- ```text
99
- project -> track -> phase -> tasks
100
- ```
73
+ ## Trust Rules
101
74
 
102
- - `project`
103
- The repo or product context.
104
- - `track`
105
- One initiative stream.
106
- - `phase`
107
- One milestone-sized slice inside a track.
108
- - `task`
109
- One reviewable implementation unit inside a phase.
110
-
111
- ### Why Tasks Exist Under A Phase
112
-
113
- - Large phases are too big for one uninterrupted execution context
114
- - Developers need control over what changes next
115
- - Each task can run in a fresh foreground agent context
116
- - The main `/autodev` session stays small and orchestration-focused
117
-
118
- ### Execution Model
119
-
120
- - `/autodev` remains the single entrypoint
121
- - `/autodev-auto` is the explicit continuous runner and never enables git writes
122
- - Project and track setup should clarify what the user wants to build, for whom, and what done looks like before writing state files
123
- - A phase is planned into one phase overview plus multiple task files
124
- - `/autodev` stops after planning so the user can review the phase before any execution starts
125
- - The phase keeps one user-facing orchestration session
126
- - Each task is preferably executed by a fresh foreground delegated agent
127
- - After each task, the delegated agent reports back with files changed, verification, and blockers
128
- - `/autodev` stops after each completed task and reopens a task review checkpoint before any further execution
129
- - `/autodev-auto` keeps going until the active track is done or a real stop condition appears, such as missing intent, dependency deadlock, or manual verification
130
- - 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
131
- - No waves by default
132
- - No automatic parallel execution
133
- - 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
134
- - If you want Claude Code itself to hard-disable background task functionality, install with `--disable-background-tasks`, which writes `CLAUDE_CODE_DISABLE_BACKGROUND_TASKS=1` into Claude Code `settings.json`
135
- - The post-edit formatter hook uses only locally available tools such as `prettier`, `ruff`, `black`, `gofmt`, `rustfmt`, or `shfmt`, and skips `.autodev/` files
75
+ - `state.json` is machine truth and is updated through the CLI, not by hand.
76
+ - The plugin should not claim a task is done without observed verification output or explicit manual confirmation from the user.
77
+ - If a check could not be run, the result is `Unverified`, not `Done`.
78
+ - If the plan is blocked, update the remaining plan instead of expanding the system around the blockage.
136
79
 
137
80
  ## Git Policy
138
81
 
139
- `autodev` does not stage, commit, branch, merge, worktree, pull, push, or initialize git repositories. Read-only git commands like `git status`, `git diff`, and `git log` remain allowed.
82
+ Blocked:
83
+
84
+ - `git add`
85
+ - `git commit`
86
+ - `git checkout`
87
+ - `git switch`
88
+ - `git merge`
89
+ - `git rebase`
90
+ - `git push`
91
+ - `git pull`
92
+ - `git stash`
93
+ - `git reset`
94
+ - `git fetch`
95
+ - `git clone`
96
+
97
+ Allowed examples:
98
+
99
+ - `git status`
100
+ - `git diff`
101
+ - `git log`
102
+ - `git show`
103
+ - `git rev-parse`
104
+ - `git ls-files`
105
+ - `git branch --show-current`
140
106
 
141
107
  ## Publish
142
108