agentplane 0.3.5 → 0.3.6

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 (187) hide show
  1. package/README.md +103 -75
  2. package/assets/AGENTS.md +4 -2
  3. package/bin/dist-guard.js +13 -3
  4. package/bin/runtime-watch.d.ts +1 -0
  5. package/bin/runtime-watch.js +22 -5
  6. package/bin/stale-dist-policy.js +9 -2
  7. package/dist/.build-manifest.json +196 -776
  8. package/dist/backends/task-backend.test-helpers.d.ts +4 -0
  9. package/dist/backends/task-backend.test-helpers.d.ts.map +1 -0
  10. package/dist/backends/task-backend.test-helpers.js +33 -0
  11. package/dist/cli/bootstrap-guide.d.ts.map +1 -1
  12. package/dist/cli/bootstrap-guide.js +1 -0
  13. package/dist/cli/command-guide.d.ts.map +1 -1
  14. package/dist/cli/command-guide.js +3 -2
  15. package/dist/cli/reason-codes.d.ts.map +1 -1
  16. package/dist/cli/reason-codes.js +30 -0
  17. package/dist/cli/run-cli/command-catalog/core.d.ts +3 -0
  18. package/dist/cli/run-cli/command-catalog/core.d.ts.map +1 -0
  19. package/dist/cli/run-cli/command-catalog/core.js +137 -0
  20. package/dist/cli/run-cli/command-catalog/lifecycle.d.ts +3 -0
  21. package/dist/cli/run-cli/command-catalog/lifecycle.d.ts.map +1 -0
  22. package/dist/cli/run-cli/command-catalog/lifecycle.js +52 -0
  23. package/dist/cli/run-cli/command-catalog/project.d.ts +3 -0
  24. package/dist/cli/run-cli/command-catalog/project.d.ts.map +1 -0
  25. package/dist/cli/run-cli/command-catalog/project.js +78 -0
  26. package/dist/cli/run-cli/command-catalog/shared.d.ts +19 -0
  27. package/dist/cli/run-cli/command-catalog/shared.d.ts.map +1 -0
  28. package/dist/cli/run-cli/command-catalog/shared.js +9 -0
  29. package/dist/cli/run-cli/command-catalog/task.d.ts +3 -0
  30. package/dist/cli/run-cli/command-catalog/task.d.ts.map +1 -0
  31. package/dist/cli/run-cli/command-catalog/task.js +85 -0
  32. package/dist/cli/run-cli/command-catalog.d.ts +3 -18
  33. package/dist/cli/run-cli/command-catalog.d.ts.map +1 -1
  34. package/dist/cli/run-cli/command-catalog.js +8 -337
  35. package/dist/cli/run-cli/commands/ide.d.ts.map +1 -1
  36. package/dist/cli/run-cli/commands/ide.js +64 -2
  37. package/dist/cli/run-cli/commands/init/ui.d.ts.map +1 -1
  38. package/dist/cli/run-cli/commands/init/ui.js +33 -13
  39. package/dist/cli/run-cli.core.pr-flow.test-helpers.d.ts +3 -0
  40. package/dist/cli/run-cli.core.pr-flow.test-helpers.d.ts.map +1 -0
  41. package/dist/cli/run-cli.core.pr-flow.test-helpers.js +41 -0
  42. package/dist/cli/run-cli.core.tasks.test-helpers.d.ts +2 -0
  43. package/dist/cli/run-cli.core.tasks.test-helpers.d.ts.map +1 -0
  44. package/dist/cli/run-cli.core.tasks.test-helpers.js +6 -0
  45. package/dist/cli/run-cli.test-helpers.d.ts +3 -0
  46. package/dist/cli/run-cli.test-helpers.d.ts.map +1 -1
  47. package/dist/cli/run-cli.test-helpers.js +138 -6
  48. package/dist/commands/commit.spec.d.ts.map +1 -1
  49. package/dist/commands/commit.spec.js +2 -2
  50. package/dist/commands/doctor/runtime.d.ts.map +1 -1
  51. package/dist/commands/doctor/runtime.js +3 -6
  52. package/dist/commands/guard/commit.command.js +1 -1
  53. package/dist/commands/guard/impl/allow.d.ts +5 -0
  54. package/dist/commands/guard/impl/allow.d.ts.map +1 -1
  55. package/dist/commands/guard/impl/allow.js +15 -10
  56. package/dist/commands/guard/impl/commands.d.ts.map +1 -1
  57. package/dist/commands/guard/impl/commands.js +137 -18
  58. package/dist/commands/guard/impl/comment-commit.d.ts.map +1 -1
  59. package/dist/commands/guard/impl/comment-commit.js +2 -0
  60. package/dist/commands/hooks/index.d.ts.map +1 -1
  61. package/dist/commands/hooks/index.js +8 -35
  62. package/dist/commands/recipes/impl/apply.d.ts +4 -0
  63. package/dist/commands/recipes/impl/apply.d.ts.map +1 -1
  64. package/dist/commands/recipes/impl/apply.js +34 -0
  65. package/dist/commands/recipes/impl/commands/explain.d.ts.map +1 -1
  66. package/dist/commands/recipes/impl/commands/explain.js +70 -11
  67. package/dist/commands/recipes/impl/commands/info.d.ts.map +1 -1
  68. package/dist/commands/recipes/impl/commands/info.js +24 -12
  69. package/dist/commands/recipes/impl/commands/install.d.ts.map +1 -1
  70. package/dist/commands/recipes/impl/commands/install.js +32 -36
  71. package/dist/commands/recipes/impl/commands/list.d.ts.map +1 -1
  72. package/dist/commands/recipes/impl/commands/list.js +7 -4
  73. package/dist/commands/recipes/impl/commands/remove.d.ts.map +1 -1
  74. package/dist/commands/recipes/impl/commands/remove.js +9 -11
  75. package/dist/commands/recipes/impl/constants.d.ts +2 -0
  76. package/dist/commands/recipes/impl/constants.d.ts.map +1 -1
  77. package/dist/commands/recipes/impl/constants.js +2 -0
  78. package/dist/commands/recipes/impl/manifest.d.ts.map +1 -1
  79. package/dist/commands/recipes/impl/manifest.js +219 -23
  80. package/dist/commands/recipes/impl/normalize.d.ts +3 -0
  81. package/dist/commands/recipes/impl/normalize.d.ts.map +1 -1
  82. package/dist/commands/recipes/impl/normalize.js +28 -24
  83. package/dist/commands/recipes/impl/paths.d.ts +9 -0
  84. package/dist/commands/recipes/impl/paths.d.ts.map +1 -1
  85. package/dist/commands/recipes/impl/paths.js +10 -1
  86. package/dist/commands/recipes/impl/project-installed-recipes.d.ts +7 -0
  87. package/dist/commands/recipes/impl/project-installed-recipes.d.ts.map +1 -0
  88. package/dist/commands/recipes/impl/project-installed-recipes.js +102 -0
  89. package/dist/commands/recipes/impl/resolver.d.ts +20 -0
  90. package/dist/commands/recipes/impl/resolver.d.ts.map +1 -0
  91. package/dist/commands/recipes/impl/resolver.js +220 -0
  92. package/dist/commands/recipes/impl/scenario.d.ts.map +1 -1
  93. package/dist/commands/recipes/impl/scenario.js +40 -11
  94. package/dist/commands/recipes/impl/types.d.ts +145 -16
  95. package/dist/commands/recipes/impl/types.d.ts.map +1 -1
  96. package/dist/commands/recipes/install.spec.d.ts.map +1 -1
  97. package/dist/commands/recipes/install.spec.js +3 -2
  98. package/dist/commands/recipes.d.ts +6 -4
  99. package/dist/commands/recipes.d.ts.map +1 -1
  100. package/dist/commands/recipes.js +5 -3
  101. package/dist/commands/recipes.test-helpers.d.ts +185 -0
  102. package/dist/commands/recipes.test-helpers.d.ts.map +1 -0
  103. package/dist/commands/recipes.test-helpers.js +339 -0
  104. package/dist/commands/scenario/impl/commands.d.ts.map +1 -1
  105. package/dist/commands/scenario/impl/commands.js +192 -336
  106. package/dist/commands/scenario/info.command.d.ts.map +1 -1
  107. package/dist/commands/scenario/info.command.js +7 -2
  108. package/dist/commands/scenario/list.command.js +2 -2
  109. package/dist/commands/scenario/run.command.d.ts.map +1 -1
  110. package/dist/commands/scenario/run.command.js +7 -2
  111. package/dist/commands/shared/reconcile-check.d.ts.map +1 -1
  112. package/dist/commands/shared/reconcile-check.js +77 -2
  113. package/dist/commands/shared/task-store.d.ts +32 -1
  114. package/dist/commands/shared/task-store.d.ts.map +1 -1
  115. package/dist/commands/shared/task-store.js +166 -42
  116. package/dist/commands/task/block.d.ts.map +1 -1
  117. package/dist/commands/task/block.js +46 -29
  118. package/dist/commands/task/close-duplicate.d.ts.map +1 -1
  119. package/dist/commands/task/close-duplicate.js +12 -37
  120. package/dist/commands/task/close-noop.d.ts.map +1 -1
  121. package/dist/commands/task/close-noop.js +12 -30
  122. package/dist/commands/task/close-shared.d.ts +14 -0
  123. package/dist/commands/task/close-shared.d.ts.map +1 -0
  124. package/dist/commands/task/close-shared.js +76 -0
  125. package/dist/commands/task/comment.d.ts.map +1 -1
  126. package/dist/commands/task/comment.js +35 -17
  127. package/dist/commands/task/doc-set.command.d.ts +2 -1
  128. package/dist/commands/task/doc-set.command.d.ts.map +1 -1
  129. package/dist/commands/task/doc-set.command.js +36 -4
  130. package/dist/commands/task/doc-template.d.ts.map +1 -1
  131. package/dist/commands/task/doc-template.js +2 -7
  132. package/dist/commands/task/doc.command.js +1 -1
  133. package/dist/commands/task/doc.d.ts +2 -1
  134. package/dist/commands/task/doc.d.ts.map +1 -1
  135. package/dist/commands/task/doc.js +123 -71
  136. package/dist/commands/task/finish.d.ts.map +1 -1
  137. package/dist/commands/task/finish.js +138 -76
  138. package/dist/commands/task/migrate-doc.d.ts.map +1 -1
  139. package/dist/commands/task/migrate-doc.js +2 -8
  140. package/dist/commands/task/plan-set.command.js +1 -1
  141. package/dist/commands/task/plan.command.d.ts +8 -0
  142. package/dist/commands/task/plan.command.d.ts.map +1 -0
  143. package/dist/commands/task/plan.command.js +37 -0
  144. package/dist/commands/task/plan.d.ts.map +1 -1
  145. package/dist/commands/task/plan.js +190 -93
  146. package/dist/commands/task/set-status.command.d.ts.map +1 -1
  147. package/dist/commands/task/set-status.command.js +1 -1
  148. package/dist/commands/task/set-status.d.ts.map +1 -1
  149. package/dist/commands/task/set-status.js +40 -3
  150. package/dist/commands/task/shared/docs.d.ts +1 -0
  151. package/dist/commands/task/shared/docs.d.ts.map +1 -1
  152. package/dist/commands/task/shared/docs.js +7 -0
  153. package/dist/commands/task/shared/transitions.d.ts +0 -2
  154. package/dist/commands/task/shared/transitions.d.ts.map +1 -1
  155. package/dist/commands/task/shared/transitions.js +0 -6
  156. package/dist/commands/task/shared.d.ts +2 -2
  157. package/dist/commands/task/shared.d.ts.map +1 -1
  158. package/dist/commands/task/shared.js +2 -2
  159. package/dist/commands/task/start.d.ts.map +1 -1
  160. package/dist/commands/task/start.js +88 -63
  161. package/dist/commands/task/task.command.d.ts +8 -0
  162. package/dist/commands/task/task.command.d.ts.map +1 -0
  163. package/dist/commands/task/task.command.js +71 -0
  164. package/dist/commands/task/verify-command-shared.d.ts +16 -0
  165. package/dist/commands/task/verify-command-shared.d.ts.map +1 -0
  166. package/dist/commands/task/verify-command-shared.js +53 -0
  167. package/dist/commands/task/verify-ok.command.d.ts +2 -6
  168. package/dist/commands/task/verify-ok.command.d.ts.map +1 -1
  169. package/dist/commands/task/verify-ok.command.js +8 -50
  170. package/dist/commands/task/verify-record.d.ts.map +1 -1
  171. package/dist/commands/task/verify-record.js +119 -140
  172. package/dist/commands/task/verify-rework.command.d.ts +2 -6
  173. package/dist/commands/task/verify-rework.command.d.ts.map +1 -1
  174. package/dist/commands/task/verify-rework.command.js +8 -50
  175. package/dist/commands/verify.spec.d.ts.map +1 -1
  176. package/dist/commands/verify.spec.js +3 -12
  177. package/dist/policy/rules/allowlist.d.ts.map +1 -1
  178. package/dist/policy/rules/allowlist.js +13 -4
  179. package/dist/policy/rules/protected-paths.d.ts.map +1 -1
  180. package/dist/policy/rules/protected-paths.js +6 -1
  181. package/dist/shared/agent-emoji.d.ts.map +1 -1
  182. package/dist/shared/protected-paths.d.ts +7 -0
  183. package/dist/shared/protected-paths.d.ts.map +1 -1
  184. package/dist/shared/protected-paths.js +26 -10
  185. package/dist/shared/repo-cli-version.d.ts.map +1 -1
  186. package/dist/shared/repo-cli-version.js +9 -3
  187. package/package.json +2 -2
package/README.md CHANGED
@@ -3,122 +3,150 @@
3
3
  [![npm](https://img.shields.io/npm/v/agentplane.svg)](https://www.npmjs.com/package/agentplane)
4
4
  [![Downloads](https://img.shields.io/npm/dm/agentplane.svg)](https://www.npmjs.com/package/agentplane)
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/basilisk-labs/agentplane/blob/main/LICENSE)
6
- [![Node.js 20+](https://img.shields.io/badge/Node.js-20%2B-3c873a.svg)](https://github.com/basilisk-labs/agentplane/blob/main/docs/user/prerequisites.mdx)
6
+ [![Node.js 20+](https://img.shields.io/badge/Node.js-20%2B-3c873a.svg)](https://agentplane.org/docs/user/prerequisites)
7
7
 
8
- Agent Plane is a policy-driven framework for running LLM agents inside real repositories. It turns "AI magic" into an engineering process: explicit approvals, role boundaries, and a reproducible execution pipeline. The goal is simple: make agents boring, safe, and auditable.
8
+ **Git-native control plane for auditable agent work.**
9
9
 
10
- ## Why Agent Plane
10
+ Put coding agents on a governed Git workflow.
11
11
 
12
- - You want agents that behave predictably inside real repos.
13
- - You need human approvals, clear roles, and traceable artifacts.
14
- - You want guardrails by default, not optional add-ons.
15
- - You want an offline-first CLI that keeps state local and inspectable.
12
+ `agentplane` is the CLI for AgentPlane. It runs locally inside a git repository, not in a hosted runtime, and adds visible workflow artifacts such as `AGENTS.md` or `CLAUDE.md`, `.agentplane/`, task records, verification state, and deterministic closure. Teams use it when they want agent work to stay explicit, inspectable, and governed inside the repository instead of behaving like an opaque assistant.
16
13
 
17
- ## 5-minute start
14
+ ## What agentplane is
18
15
 
19
- Install and initialize the CLI:
16
+ `agentplane` is a repo-native CLI workflow for agent-driven development.
17
+
18
+ - It runs in your repository and keeps workflow state local.
19
+ - It adds approvals, task state, verification, and finish to agent work.
20
+ - It supports both `direct` and `branch_pr` workflow modes.
21
+ - It keeps repository artifacts visible instead of hiding execution behind a hosted control plane.
22
+
23
+ ## Why teams use it
24
+
25
+ Teams use `agentplane` when changing files is not enough and they need the work itself to stay legible.
26
+
27
+ - **Trust comes from visible process.** Plans, verification, and finish are recorded instead of implied.
28
+ - **The workflow stays local.** There is no hosted control plane between your repository and your team.
29
+ - **Git remains first-class.** `agentplane` governs agent work inside commits and repository state instead of bypassing them.
30
+ - **The same CLI fits different review styles.** Use `direct` for short loops or `branch_pr` for stricter integration.
31
+
32
+ ## What appears in your repository
33
+
34
+ `agentplane init` creates a visible workflow surface inside the repository.
35
+
36
+ ```text
37
+ AGENTS.md or CLAUDE.md Policy gateway for the repository
38
+ .agentplane/ Repo-local workspace and workflow state
39
+ .agentplane/config.json Current repo configuration
40
+ .agentplane/agents/ Installed agent profiles
41
+ .agentplane/tasks/ Per-task records and evidence
42
+ .agentplane/WORKFLOW.md Current workflow contract
43
+ ```
44
+
45
+ You may also see `.agentplane/tasks.json` later if you export a task snapshot, and `.agentplane/workflows/last-known-good.md` as part of the workflow runtime state.
46
+
47
+ ## Install and first run
20
48
 
21
49
  ```bash
22
50
  npm install -g agentplane
51
+ ```
52
+
53
+ Run the CLI inside the git repository you want to govern:
54
+
55
+ ```bash
56
+ cd /path/to/your-repository
23
57
  agentplane init
24
58
  agentplane quickstart
25
59
  ```
26
60
 
27
- `agentplane init` is human-oriented: interactive onboarding includes workflow/backend selection,
28
- policy gateway selection (`--policy-gateway codex|claude` -> `AGENTS.md` or `CLAUDE.md`),
29
- execution profile selection (`conservative|balanced|aggressive`), approval toggles, and optional recipes.
61
+ If the directory is not a git repository yet, `agentplane init` initializes git first.
30
62
 
31
- Create your first task and run the workflow:
63
+ `agentplane init` is interactive by default. It lets you choose the workflow mode, backend, gateway file (`AGENTS.md` or `CLAUDE.md`), execution profile, and optional recipe setup.
32
64
 
33
- ```bash
34
- agentplane task new --title "First task" --description "Describe the change" --priority med --owner ORCHESTRATOR --tag docs
35
- agentplane verify <task-id> --ok --by ORCHESTRATOR --note "Verified"
36
- agentplane finish <task-id> --author ORCHESTRATOR --body "Verified: done" --result "First task completed"
37
- ```
65
+ On the first run it creates the visible workflow surface:
38
66
 
39
- Prefer `npx` instead of a global install?
67
+ - `AGENTS.md` or `CLAUDE.md`
68
+ - `.agentplane/config.json`
69
+ - `.agentplane/tasks/`
70
+ - `.agentplane/agents/`
71
+ - `.agentplane/WORKFLOW.md`
72
+
73
+ Prefer not to install globally:
40
74
 
41
75
  ```bash
42
76
  npx agentplane init
43
77
  npx agentplane quickstart
44
78
  ```
45
79
 
46
- ## What gets installed automatically
80
+ ## First task flow
47
81
 
48
- - `.agentplane/` is created with config, tasks, agents, and caches.
49
- - The selected policy gateway file is created if missing and defines the policy/guardrails:
50
- `AGENTS.md` (Codex) or `CLAUDE.md` (Claude Code).
51
- - Built-in agent definitions are copied into `.agentplane/agents/`.
52
- - Optional recipes can install additional agents when you run `agentplane recipes install ...`.
53
- - `.agentplane/config.json` stores execution defaults under `execution` (profile, reasoning effort, tool budget, safety gates).
82
+ Create a task and record the plan:
54
83
 
55
- ## Upgrade review reports
84
+ ```bash
85
+ agentplane task new --title "First task" --description "Describe the change" --priority med --owner DOCS --tag docs
86
+ agentplane task plan set <task-id> --text "Explain the plan" --updated-by DOCS
87
+ ```
56
88
 
57
- After `agentplane upgrade` (auto or agent-assisted mode), a machine-readable review report is written under `.agentplane/.upgrade/`:
89
+ If your repository requires explicit plan approval, run:
58
90
 
59
- - Agent mode: `.agentplane/.upgrade/agent/<runId>/review.json`
60
- - Auto mode: `.agentplane/.upgrade/last-review.json`
91
+ ```bash
92
+ agentplane task plan approve <task-id> --by ORCHESTRATOR
93
+ ```
61
94
 
62
- If any entry has `needsSemanticReview: true`, treat it as a signal to create an `UPGRADER` task to perform a semantic prompt merge.
95
+ Then start work, record verification, and finish:
63
96
 
64
- ## Guardrails and artifacts
97
+ ```bash
98
+ agentplane task start-ready <task-id> --author DOCS --body "Start: ..."
99
+ agentplane task verify-show <task-id>
100
+ agentplane verify <task-id> --ok --by REVIEWER --note "Looks good"
101
+ agentplane finish <task-id> --author DOCS --body "Verified: ..." --result "One-line outcome" --commit <git-rev>
102
+ ```
65
103
 
66
- - Approval gates for plans and network access (configured in `.agentplane/config.json`).
67
- - Role boundaries (ORCHESTRATOR, PLANNER, CODER, INTEGRATOR, etc.).
68
- - Agent definitions in `.agentplane/agents/`.
69
- - Task records in `.agentplane/tasks/` with a snapshot export in `.agentplane/tasks.json`.
70
- - A visible, reproducible pipeline:
104
+ That is the shortest believable first-win path: initialize the repo, create a task, verify the change, and close it through the recorded workflow instead of an unstructured agent session.
71
105
 
72
- ```text
73
- Preflight -> Plan -> Approval -> Tasks -> Verify -> Finish -> Export
74
- ```
106
+ ## Workflow modes
75
107
 
76
- ## Features
108
+ ### `direct`
77
109
 
78
- - Policy-first execution with explicit approvals and guardrails.
79
- - Role-based workflows for teams: ORCHESTRATOR, PLANNER, CREATOR, INTEGRATOR, etc.
80
- - Two workflow modes: `direct` (single checkout) and `branch_pr` (worktrees + integration).
81
- - Task tracking, verification, and exports baked in.
82
- - Recipes for repeatable setup and automation.
110
+ - single checkout
111
+ - fast local iteration
112
+ - deterministic close commit on `finish` by default
113
+ - best fit for solo work or short loops
83
114
 
84
- ## Install
115
+ ### `branch_pr`
85
116
 
86
- ```bash
87
- npm install -g agentplane
88
- ```
117
+ - per-task branch or worktree flow
118
+ - explicit PR artifacts under `.agentplane/tasks/<task-id>/pr/`
119
+ - stricter handoff and integration discipline
120
+ - better fit for teams that want implementation separated from integration
89
121
 
90
- Or run without installing:
122
+ ## When to use it
91
123
 
92
- ```bash
93
- npx agentplane --help
94
- ```
124
+ Use `agentplane` when:
95
125
 
96
- ## Requirements
126
+ - you want coding agents to work inside a real git repository
127
+ - you need explicit task state, approvals, verification, and closure
128
+ - you want repo-local workflow artifacts instead of a hidden assistant session
97
129
 
98
- - Node.js >= 20
130
+ Do not use `agentplane` when:
99
131
 
100
- ## Common Commands
132
+ - you want a hosted agent platform
133
+ - you want a generic prompt framework
134
+ - you want the tool to hide git or replace your editor
101
135
 
102
- ```bash
103
- agentplane --help
104
- agentplane quickstart
105
- agentplane role ORCHESTRATOR
106
- agentplane role UPGRADER
107
- agentplane config show
108
- agentplane task list
109
- agentplane task new --title "..." --description "..." --priority med --owner ORCHESTRATOR --tag docs
110
- agentplane verify <task-id> --ok --by ORCHESTRATOR --note "Verified"
111
- agentplane finish <task-id> --author ORCHESTRATOR --body "Verified: done" --result "Task completed"
112
- agentplane recipes list
113
- ```
136
+ ## Requirements
137
+
138
+ - Node.js 20+
114
139
 
115
- ## Docs and Guides
140
+ ## Documentation
116
141
 
117
- - Documentation index: https://github.com/basilisk-labs/agentplane/tree/main/docs
118
- - Workflow overview: https://github.com/basilisk-labs/agentplane/blob/main/docs/user/workflow.mdx
119
- - CLI commands: https://github.com/basilisk-labs/agentplane/blob/main/docs/user/commands.mdx
120
- - Project layout: https://github.com/basilisk-labs/agentplane/blob/main/docs/developer/project-layout.mdx
121
- - Recipes: https://github.com/basilisk-labs/agentplane/tree/main/agentplane-recipes
142
+ - Overview: https://agentplane.org/docs/user/overview
143
+ - Setup: https://agentplane.org/docs/user/setup
144
+ - Workflow: https://agentplane.org/docs/user/workflow
145
+ - Commands: https://agentplane.org/docs/user/commands
146
+ - Backends: https://agentplane.org/docs/user/backends
147
+ - CLI reference: https://agentplane.org/docs/user/cli-reference.generated
148
+ - Release notes: https://agentplane.org/docs/releases
149
+ - Recipes repository: https://github.com/basilisk-labs/agentplane/tree/main/agentplane-recipes
122
150
 
123
151
  ## Support
124
152
 
package/assets/AGENTS.md CHANGED
@@ -17,7 +17,7 @@ Detailed procedures live in canonical modules from `## CANONICAL DOCS`.
17
17
  - Repository type: user project initialized with `agentplane`.
18
18
  - Gateway role: keep this file compact and deterministic; move scenario-specific details to policy modules.
19
19
  - CLI rule: use `agentplane` from `PATH`; if unavailable, stop and request installation guidance (do not invent repo-local entrypoints).
20
- - Startup shortcut: run `## COMMANDS -> Preflight`, then use `agentplane quickstart`, then apply `## LOAD RULES` before any mutation.
20
+ - Startup shortcut: run `## COMMANDS -> Preflight`, then use `agentplane quickstart`; activate `agentplane role ORCHESTRATOR` for planning and `agentplane role <ROLE>` for the active owner before owner-scoped execution; then apply `## LOAD RULES` before any mutation.
21
21
 
22
22
  ---
23
23
 
@@ -83,7 +83,7 @@ node .agentplane/policy/check-routing.mjs
83
83
  ## TOOLING
84
84
 
85
85
  - Use `## COMMANDS` as the canonical command source.
86
- - Use `agentplane quickstart` as the canonical installed startup path and `agentplane role <ROLE>` for role-specific deltas.
86
+ - Use `agentplane quickstart` as the canonical installed startup path and `agentplane role <ROLE>` to activate the current role before role-scoped planning or execution.
87
87
  - For policy changes, routing validation MUST pass via `node .agentplane/policy/check-routing.mjs`.
88
88
 
89
89
  ---
@@ -131,10 +131,12 @@ Routing constraints:
131
131
  - MUST create/reuse executable task IDs for any repo-state mutation.
132
132
  - MUST use `agentplane` commands for task lifecycle updates; MUST NOT manually edit `.agentplane/tasks.json`.
133
133
  - MUST run `agentplane task plan approve ...` and `agentplane task start-ready ...` sequentially (never in parallel).
134
+ - MUST activate `agentplane role ORCHESTRATOR` for planning and `agentplane role <ROLE>` for the active task owner before owner-scoped execution or verification.
134
135
  - MUST keep repository artifacts in English by default (unless user explicitly requests another language for a specific artifact).
135
136
  - MUST NOT fabricate repository facts.
136
137
  - MUST stage/commit only intentional changes for the active task scope.
137
138
  - MUST stop and request re-approval when scope, risk, or verification criteria materially drift.
139
+ - MUST NOT let ORCHESTRATOR perform owner-scoped implementation or verification once a task owner is known, unless the approved plan explicitly makes ORCHESTRATOR the owner.
138
140
 
139
141
  Role boundaries:
140
142
 
package/bin/dist-guard.js CHANGED
@@ -1,7 +1,11 @@
1
1
  import { execFileSync } from "node:child_process";
2
2
  import path from "node:path";
3
3
  import { readFile, stat } from "node:fs/promises";
4
- import { collectWatchedRuntimeSnapshot, compareWatchedRuntimeSnapshots } from "./runtime-watch.js";
4
+ import {
5
+ collectWatchedRuntimeSnapshot,
6
+ compareWatchedRuntimeSnapshots,
7
+ isRuntimeRelevantWatchedFile,
8
+ } from "./runtime-watch.js";
5
9
 
6
10
  async function exists(p) {
7
11
  try {
@@ -63,14 +67,20 @@ function workingTreeChangedPaths(cwd, watchedPaths) {
63
67
  const normalized = String(line ?? "");
64
68
  return normalized.length > 3 ? normalized.slice(3).trim() : "";
65
69
  })
66
- .filter(Boolean),
70
+ .filter((filePath) => Boolean(filePath) && isRuntimeRelevantWatchedFile(filePath)),
67
71
  );
68
72
  }
69
73
 
70
74
  function committedChangedPathsSince(cwd, fromGitHead, watchedPaths) {
71
75
  if (!fromGitHead) return [];
72
76
  return uniqueSorted(
73
- listGitPaths(cwd, ["diff", "--name-only", `${fromGitHead}..HEAD`, "--", ...watchedPaths]),
77
+ listGitPaths(cwd, [
78
+ "diff",
79
+ "--name-only",
80
+ `${fromGitHead}..HEAD`,
81
+ "--",
82
+ ...watchedPaths,
83
+ ]).filter((filePath) => isRuntimeRelevantWatchedFile(filePath)),
74
84
  );
75
85
  }
76
86
 
@@ -15,6 +15,7 @@ export type WatchedRuntimeSnapshotComparison = {
15
15
  changedPaths: string[];
16
16
  };
17
17
 
18
+ export function isRuntimeRelevantWatchedFile(filePath: string): boolean;
18
19
  export function getWatchedRuntimePathsForPackage(packageName: string): string[];
19
20
  export function collectWatchedRuntimeSnapshot(
20
21
  packageDir: string,
@@ -17,6 +17,15 @@ function normalizePath(value) {
17
17
  return value.split(path.sep).join("/");
18
18
  }
19
19
 
20
+ export function isRuntimeRelevantWatchedFile(filePath) {
21
+ const normalized = normalizePath(filePath);
22
+ const inSourceTree = normalized.startsWith("src/") || normalized.includes("/src/");
23
+ if (!inSourceTree) return true;
24
+ if (normalized.includes("/__snapshots__/")) return false;
25
+ const baseName = path.posix.basename(normalized);
26
+ return !/\.(?:test)\.[cm]?[jt]sx?$/u.test(baseName);
27
+ }
28
+
20
29
  async function exists(targetPath) {
21
30
  try {
22
31
  await stat(targetPath);
@@ -76,9 +85,11 @@ export async function collectWatchedRuntimeSnapshot(packageDir, watchedPaths) {
76
85
  const uniqueAbsoluteFiles = [...new Set(absoluteFiles)].toSorted((a, b) => a.localeCompare(b));
77
86
  const files = [];
78
87
  for (const absolutePath of uniqueAbsoluteFiles) {
88
+ const relativePath = normalizePath(path.relative(packageDir, absolutePath));
89
+ if (!isRuntimeRelevantWatchedFile(relativePath)) continue;
79
90
  const content = await readFile(absolutePath);
80
91
  files.push({
81
- path: normalizePath(path.relative(packageDir, absolutePath)),
92
+ path: relativePath,
82
93
  sha256: fileHash(content),
83
94
  size_bytes: content.byteLength,
84
95
  });
@@ -96,15 +107,21 @@ function snapshotFileMap(snapshot) {
96
107
  }
97
108
 
98
109
  export function compareWatchedRuntimeSnapshots(recordedSnapshot, currentSnapshot) {
110
+ const recordedFiles = recordedSnapshot.files.filter((file) =>
111
+ isRuntimeRelevantWatchedFile(file.path),
112
+ );
113
+ const currentFiles = currentSnapshot.files.filter((file) =>
114
+ isRuntimeRelevantWatchedFile(file.path),
115
+ );
99
116
  if (
100
- recordedSnapshot.snapshotHash === currentSnapshot.snapshotHash &&
101
- recordedSnapshot.files.length === currentSnapshot.files.length
117
+ snapshotHash(recordedFiles) === snapshotHash(currentFiles) &&
118
+ recordedFiles.length === currentFiles.length
102
119
  ) {
103
120
  return { ok: true, changedPaths: [] };
104
121
  }
105
122
 
106
- const recordedMap = snapshotFileMap(recordedSnapshot);
107
- const currentMap = snapshotFileMap(currentSnapshot);
123
+ const recordedMap = snapshotFileMap({ ...recordedSnapshot, files: recordedFiles });
124
+ const currentMap = snapshotFileMap({ ...currentSnapshot, files: currentFiles });
108
125
  const changedPaths = [...new Set([...recordedMap.keys(), ...currentMap.keys()])]
109
126
  .filter((filePath) => recordedMap.get(filePath) !== currentMap.get(filePath))
110
127
  .toSorted((a, b) => a.localeCompare(b));
@@ -21,13 +21,19 @@ function isConfigInspectionCommand(args) {
21
21
  }
22
22
 
23
23
  function isTaskInspectionCommand(args) {
24
- return args[0] === "task" && ["list", "show", "verify-show"].includes(args[1] ?? "");
24
+ if (args[0] !== "task") return false;
25
+ if (["list", "show", "verify-show", "next", "search"].includes(args[1] ?? "")) return true;
26
+ return args[1] === "doc" && args[2] === "show";
25
27
  }
26
28
 
27
29
  function isRoleOrQuickstartCommand(args) {
28
30
  return args[0] === "quickstart" || args[0] === "role";
29
31
  }
30
32
 
33
+ function isReadyInspectionCommand(args) {
34
+ return args[0] === "ready";
35
+ }
36
+
31
37
  export function classifyStaleDistPolicy(argv = process.argv) {
32
38
  const args = normalizeArgs(argv);
33
39
  if (
@@ -36,7 +42,8 @@ export function classifyStaleDistPolicy(argv = process.argv) {
36
42
  isHelpOrVersionCommand(args) ||
37
43
  isRoleOrQuickstartCommand(args) ||
38
44
  isConfigInspectionCommand(args) ||
39
- isTaskInspectionCommand(args)
45
+ isTaskInspectionCommand(args) ||
46
+ isReadyInspectionCommand(args)
40
47
  ) {
41
48
  return { mode: "warn_and_run", reason: "read_only_diagnostic" };
42
49
  }