@mthanhlm/autodev 0.4.3 → 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 (73) hide show
  1. package/.claude-plugin/plugin.json +2 -2
  2. package/PUBLISH.md +9 -40
  3. package/README.md +70 -91
  4. package/autodev/bin/autodev-tools.cjs +587 -811
  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 +229 -342
  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 -13
  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 -13
  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 -14
  42. package/autodev/templates/track.md +0 -24
  43. package/autodev/templates/uat.md +0 -18
  44. package/autodev/workflows/autodev.md +0 -79
  45. package/autodev/workflows/cleanup.md +0 -51
  46. package/autodev/workflows/execute-phase.md +0 -127
  47. package/autodev/workflows/explore-codebase.md +0 -66
  48. package/autodev/workflows/help.md +0 -110
  49. package/autodev/workflows/new-project.md +0 -101
  50. package/autodev/workflows/plan-phase.md +0 -126
  51. package/autodev/workflows/progress.md +0 -18
  52. package/autodev/workflows/review-phase.md +0 -73
  53. package/autodev/workflows/review-plan.md +0 -55
  54. package/autodev/workflows/review-task.md +0 -70
  55. package/autodev/workflows/verify-work.md +0 -57
  56. package/commands/autodev/cleanup.md +0 -23
  57. package/commands/autodev/execute-phase.md +0 -29
  58. package/commands/autodev/explore-codebase.md +0 -33
  59. package/commands/autodev/help.md +0 -18
  60. package/commands/autodev/new-project.md +0 -30
  61. package/commands/autodev/plan-phase.md +0 -26
  62. package/commands/autodev/progress.md +0 -18
  63. package/commands/autodev/review-phase.md +0 -29
  64. package/commands/autodev/review-task.md +0 -25
  65. package/commands/autodev/verify-work.md +0 -24
  66. package/hooks/autodev-context-monitor.js +0 -59
  67. package/hooks/autodev-phase-boundary.sh +0 -49
  68. package/hooks/autodev-prompt-guard.js +0 -55
  69. package/hooks/autodev-read-guard.js +0 -42
  70. package/hooks/autodev-session-state.sh +0 -51
  71. package/hooks/autodev-statusline.js +0 -78
  72. package/hooks/autodev-workflow-guard.js +0 -43
  73. 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.3",
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,129 +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
- - Organizes work as `project -> track -> phase -> tasks`
11
- - Starts new projects and new tracks with a short discovery pass so requirements are based on the user's actual goal
12
- - Resolves `.autodev/` state from the repo root even when Claude is started in a nested subdirectory
13
- - Maps brownfield repos in the main session, with optional specialized helpers when the environment supports them
14
- - Runs a multi-lens review pass, using foreground review agents when the environment supports them
15
- - Can auto-format edited code after Claude writes files when a local formatter is available
16
- - Ships manual commands when you want direct control:
17
- - `/autodev-help`
18
- - `/autodev-new-project`
19
- - `/autodev-explore-codebase`
20
- - `/autodev-plan-phase`
21
- - `/autodev-execute-phase`
22
- - `/autodev-review-task`
23
- - `/autodev-review-phase`
24
- - `/autodev-verify-work`
25
- - `/autodev-cleanup`
26
- - `/autodev-progress`
27
- - 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.
28
4
 
29
- ## Install
5
+ This reset removes the old workflow tree, multi-agent prompt theater, and markdown state machine. The new design is smaller on purpose.
30
6
 
31
- Primary supported usage is the standalone `npx` installer.
32
- The repo also carries Claude Code plugin metadata for validation and local development, but the supported end-user runtime remains the installed `.claude/` workflow.
7
+ ## Core Behavior
33
8
 
34
- ```bash
35
- npx @mthanhlm/autodev@latest --global
36
- ```
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
37
17
 
38
- Interactive install with location selection:
18
+ ## Durable Files
39
19
 
40
- ```bash
41
- npx @mthanhlm/autodev@latest
42
- ```
20
+ `autodev` keeps a small, inspectable file set in the repo:
43
21
 
44
- Local install for one repo:
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
34
+
35
+ Supported mode is global install only.
45
36
 
46
37
  ```bash
47
- npx @mthanhlm/autodev@latest --local
38
+ npx @mthanhlm/autodev@latest
48
39
  ```
49
40
 
50
- Install and also disable Claude Code background tasks in the target `settings.json`:
41
+ Equivalent explicit form:
51
42
 
52
43
  ```bash
53
- npx @mthanhlm/autodev@latest --global --disable-background-tasks
44
+ npx @mthanhlm/autodev@latest --global
54
45
  ```
55
46
 
56
47
  Uninstall:
57
48
 
58
49
  ```bash
59
- npx @mthanhlm/autodev@latest --global --uninstall
60
- npx @mthanhlm/autodev@latest --local --uninstall
50
+ npx @mthanhlm/autodev@latest --uninstall
61
51
  ```
62
52
 
63
- ## Default Flow
53
+ ## Commands
64
54
 
65
55
  ```text
66
56
  /autodev
57
+ /autodev-status
67
58
  ```
68
59
 
69
- Typical brownfield route:
60
+ Typical brownfield flow:
70
61
 
71
62
  ```text
72
63
  /autodev
73
- -> new project
74
- -> explore codebase
75
- -> plan phase
76
- -> review phase plan
77
- -> execute one task
78
- -> review task
79
- -> execute one task
80
- -> review task
81
- -> review
82
- -> 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
83
71
  ```
84
72
 
85
- ## Workflow Model
86
-
87
- ```text
88
- project -> track -> phase -> tasks
89
- ```
73
+ ## Trust Rules
90
74
 
91
- - `project`
92
- The repo or product context.
93
- - `track`
94
- One initiative stream.
95
- - `phase`
96
- One milestone-sized slice inside a track.
97
- - `task`
98
- One reviewable implementation unit inside a phase.
99
-
100
- ### Why Tasks Exist Under A Phase
101
-
102
- - Large phases are too big for one uninterrupted execution context
103
- - Developers need control over what changes next
104
- - Each task can run in a fresh foreground agent context
105
- - The main `/autodev` session stays small and orchestration-focused
106
-
107
- ### Execution Model
108
-
109
- - `/autodev` remains the single entrypoint
110
- - Project and track setup should clarify what the user wants to build, for whom, and what done looks like before writing state files
111
- - A phase is planned into one phase overview plus multiple task files
112
- - `/autodev` stops after planning so the user can review the phase before any execution starts
113
- - The phase keeps one user-facing orchestration session
114
- - Each task is preferably executed by a fresh foreground delegated agent
115
- - After each task, the delegated agent reports back with files changed, verification, and blockers
116
- - `/autodev` stops after each completed task and reopens a task review checkpoint before any further execution
117
- - 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
118
- - No waves by default
119
- - No automatic parallel execution
120
- - 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
121
- - 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`
122
- - 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.
123
79
 
124
80
  ## Git Policy
125
81
 
126
- `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`
127
106
 
128
107
  ## Publish
129
108