agentplane 0.4.3 → 0.4.4

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/README.md CHANGED
@@ -32,6 +32,17 @@ npx agentplane quickstart
32
32
 
33
33
  Requirements: Node.js 20+, Git, and a local terminal.
34
34
 
35
+ Experimental agent shorthand:
36
+
37
+ ```bash
38
+ ap next
39
+ ap show <task-id>
40
+ ap vshow <task-id>
41
+ ```
42
+
43
+ `ap` is an agent-optimized entrypoint for compact, non-interactive command use. Keep public docs and
44
+ human-facing setup on `agentplane`; use `ap` only when the installed package exposes it.
45
+
35
46
  ## What you get after `agentplane init`
36
47
 
37
48
  ```text
@@ -49,20 +60,20 @@ already review.
49
60
  ## One task loop
50
61
 
51
62
  ```bash
52
- agentplane task new --title "Fix parser edge case" --description "Reject empty labels." --owner CODER --tag code
53
- agentplane task plan set <task-id> --text "Add a fixture, tighten validation, and run focused tests." --updated-by CODER
54
- agentplane task plan approve <task-id> --by ORCHESTRATOR
55
- agentplane task start-ready <task-id> --author CODER --body "Start: implementing parser validation with focused tests."
63
+ agentplane task new --title "Fix parser edge case" --description "Reject empty labels." --owner <agent-id> --tag code
64
+ agentplane task plan set <task-id> --text "Add a fixture, tighten validation, and run focused tests." --updated-by <agent-id>
65
+ agentplane task plan approve <task-id> --by <reviewer-id>
66
+ agentplane task start-ready <task-id> --author <agent-id> --body "Start: implementing parser validation with focused tests."
56
67
  # Run Claude Code, Codex, Cursor, Aider, or edit manually.
57
68
  agentplane task verify-show <task-id>
58
- agentplane verify <task-id> --ok --by CODER --note "Focused tests passed."
59
- agentplane finish <task-id> --author CODER --result "Parser rejects empty labels." --commit <git-rev>
69
+ agentplane verify <task-id> --ok --by <agent-id> --note "Focused tests passed."
70
+ agentplane finish <task-id> --author <agent-id> --result "Parser rejects empty labels." --commit <git-rev>
60
71
  ```
61
72
 
62
73
  The visible output is the point: a reviewer can inspect task intent, plan, verification, and closure
63
74
  from Git-visible files.
64
75
 
65
- Roles like `CODER` and `ORCHESTRATOR` are configurable agent IDs. See
76
+ Agent IDs are configurable profiles. See
66
77
  [Agents](https://agentplane.org/docs/user/agents).
67
78
 
68
79
  ## Agent Change Record
package/assets/AGENTS.md CHANGED
@@ -20,8 +20,8 @@ Detailed procedures live in canonical modules from `## CANONICAL DOCS`.
20
20
 
21
21
  - Repository type: user project initialized with `agentplane`.
22
22
  - Gateway role: keep this file compact and deterministic; move scenario-specific details to policy modules.
23
- - CLI rule: use `agentplane` from `PATH`; if unavailable, stop and request installation guidance (do not invent repo-local entrypoints).
24
- - 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. The guarded route is determined by `workflow.mode` in `.agentplane/WORKFLOW.md`; use `agentplane quickstart` as the canonical summary of the active path before mutating. In `branch_pr`, start from `agentplane work start ... --worktree`; in `direct`, stay in the current checkout and use the task lifecycle route.
23
+ - CLI rule: prefer `ap` for compact agent-oriented commands; fall back to `agentplane`; if neither is available, stop and request installation guidance (do not invent repo-local entrypoints).
24
+ - Startup shortcut: run `## COMMANDS -> Preflight`, then use `ap quickstart`; activate `ap role ORCHESTRATOR` for planning and `ap role <ROLE>` for the active owner before owner-scoped execution; then apply `## LOAD RULES` before any mutation. The guarded route is determined by `workflow.mode` in `.agentplane/WORKFLOW.md`; use `ap quickstart` as the canonical summary of the active path before mutating. In `branch_pr`, start from `ap work start ... --worktree`; in `direct`, stay in the current checkout and use the task lifecycle route.
25
25
 
26
26
  <!-- /ap:fragment -->
27
27
  <!-- ap:fragment id="gateway.agents.source_of_truth.sources.of.truth" slot="source_of_truth" mutability="replaceable" -->
@@ -33,7 +33,7 @@ Priority order (highest first):
33
33
  1. Enforcement: CI, tests, linters, hooks, CLI validations.
34
34
  2. Policy gateway: `AGENTS.md`.
35
35
  3. Canonical policy modules from `## CANONICAL DOCS`.
36
- 4. CLI guidance: `agentplane quickstart`, `agentplane role <ROLE>`, `.agentplane/WORKFLOW.md`.
36
+ 4. CLI guidance: `ap quickstart`, `ap role <ROLE>`, `.agentplane/WORKFLOW.md`.
37
37
  5. Reference examples from `## REFERENCE EXAMPLES`.
38
38
 
39
39
  Conflict rule:
@@ -58,9 +58,9 @@ Conflict rule:
58
58
  ### Preflight
59
59
 
60
60
  ```bash
61
- agentplane config show
62
- agentplane quickstart
63
- agentplane task list
61
+ ap config show
62
+ ap quickstart
63
+ ap task list
64
64
  git status --short --untracked-files=no
65
65
  git rev-parse --abbrev-ref HEAD
66
66
  ```
@@ -68,32 +68,32 @@ git rev-parse --abbrev-ref HEAD
68
68
  ### Task lifecycle
69
69
 
70
70
  ```bash
71
- agentplane task new --title "..." --description "..." --priority med --owner <ROLE> --tag <tag>
72
- agentplane task plan set <task-id> --text "..." --updated-by <ROLE>
73
- agentplane task plan approve <task-id> --by ORCHESTRATOR
74
- agentplane task start-ready <task-id> --author <ROLE> --body "Start: ..."
75
- agentplane verify <task-id> --ok|--rework --by <ROLE> --note "..." [--observation "..." --impact "..." --resolution "..."] [--local-only]
76
- agentplane finish <task-id> --author <ROLE> --body "Verified: ..." --result "..." --commit <git-rev>
71
+ ap task new --title "..." --description "..." --priority med --owner <ROLE> --tag <tag>
72
+ ap task plan set <task-id> --text "..." --updated-by <ROLE>
73
+ ap task plan approve <task-id> --by ORCHESTRATOR
74
+ ap task start-ready <task-id> --author <ROLE> --body "Start: ..."
75
+ ap verify <task-id> --ok|--rework --by <ROLE> --note "..." [--observation "..." --impact "..." --resolution "..."] [--local-only]
76
+ ap finish <task-id> --author <ROLE> --body "Verified: ..." --result "..." --commit <git-rev>
77
77
  ```
78
78
 
79
79
  ### branch_pr lifecycle
80
80
 
81
81
  ```bash
82
- agentplane work start <task-id> --agent <ROLE> --slug <slug> --worktree
83
- agentplane pr open <task-id> --branch task/<task-id>/<slug> --author <ROLE>
84
- agentplane pr update <task-id>
85
- agentplane integrate <task-id> --branch task/<task-id>/<slug> --run-verify
86
- agentplane finish <task-id> --author INTEGRATOR --body "Verified: ..." --result "..." --commit <git-rev> --close-commit
82
+ ap work start <task-id> --agent <ROLE> --slug <slug> --worktree
83
+ ap pr open <task-id> --branch task/<task-id>/<slug> --author <ROLE>
84
+ ap pr update <task-id>
85
+ ap integrate <task-id> --branch task/<task-id>/<slug> --run-verify
86
+ ap finish <task-id> --author INTEGRATOR --body "Verified: ..." --result "..." --commit <git-rev> --close-commit
87
87
  ```
88
88
 
89
89
  ### Verification
90
90
 
91
91
  ```bash
92
- agentplane task verify-show <task-id>
93
- agentplane verify <task-id> --ok|--rework --by <ROLE> --note "..." [--observation "..." --impact "..." --resolution "..."] [--local-only]
94
- agentplane incidents advise <task-id>
95
- agentplane incidents collect <task-id> --check
96
- agentplane doctor
92
+ ap vshow <task-id>
93
+ ap verify <task-id> --ok|--rework --by <ROLE> --note "..." [--observation "..." --impact "..." --resolution "..."] [--local-only]
94
+ ap incidents advise <task-id>
95
+ ap incidents collect <task-id> --check
96
+ ap doctor
97
97
  node .agentplane/policy/check-routing.mjs
98
98
  ```
99
99
 
@@ -103,7 +103,7 @@ node .agentplane/policy/check-routing.mjs
103
103
  ## TOOLING
104
104
 
105
105
  - Use `## COMMANDS` as the canonical command source.
106
- - Use `agentplane quickstart` as the canonical installed startup path and `agentplane role <ROLE>` to activate the current role before role-scoped planning or execution.
106
+ - Use `ap quickstart` as the compact installed startup path and `ap role <ROLE>` to activate the current role before role-scoped planning or execution.
107
107
  - For policy changes, routing validation MUST pass via `node .agentplane/policy/check-routing.mjs`.
108
108
 
109
109
  <!-- /ap:fragment -->
@@ -138,7 +138,7 @@ Condition: task includes mutation (file edits, task-state changes, commits, merg
138
138
  1. IF `workflow.mode=direct` THEN LOAD `@.agentplane/policy/workflow.direct.md`.
139
139
  2. IF `workflow.mode=branch_pr` THEN LOAD `@.agentplane/policy/workflow.branch_pr.md`.
140
140
  3. IF task touches release/version/publish THEN LOAD `@.agentplane/policy/workflow.release.md`.
141
- 4. IF task runs `agentplane upgrade` or touches `.agentplane/.upgrade/**` THEN LOAD `@.agentplane/policy/workflow.upgrade.md`.
141
+ 4. IF task runs CLI upgrade or touches `.agentplane/.upgrade/**` THEN LOAD `@.agentplane/policy/workflow.upgrade.md`.
142
142
  5. IF task modifies implementation code paths THEN LOAD `@.agentplane/policy/dod.code.md`.
143
143
  6. IF task modifies docs/policy-only paths (`AGENTS.md`, docs, `.agentplane/policy/**`) THEN LOAD `@.agentplane/policy/dod.docs.md`.
144
144
  7. IF task modifies policy files (`AGENTS.md` or `.agentplane/policy/**`) THEN LOAD `@.agentplane/policy/governance.md`.
@@ -161,9 +161,9 @@ Routing constraints:
161
161
  - MUST start with ORCHESTRATOR preflight and plan summary.
162
162
  - MUST NOT perform mutating actions before explicit user approval.
163
163
  - MUST create/reuse executable task IDs for any repo-state mutation.
164
- - MUST use `agentplane` commands for task lifecycle updates; MUST NOT manually edit `.agentplane/tasks.json`.
165
- - MUST run `agentplane task plan approve ...` and `agentplane task start-ready ...` sequentially (never in parallel).
166
- - MUST activate `agentplane role ORCHESTRATOR` for planning and `agentplane role <ROLE>` for the active task owner before owner-scoped execution or verification.
164
+ - MUST use `ap`/`agentplane` commands for task lifecycle updates; MUST NOT manually edit `.agentplane/tasks.json`.
165
+ - MUST run `ap task plan approve ...` and `ap task start-ready ...` sequentially (never in parallel).
166
+ - MUST activate `ap role ORCHESTRATOR` for planning and `ap role <ROLE>` for the active task owner before owner-scoped execution or verification.
167
167
  - MUST keep repository artifacts in English by default (unless user explicitly requests another language for a specific artifact).
168
168
  - MUST NOT fabricate repository facts.
169
169
  - MUST stage/commit only intentional changes for the active task scope.
package/assets/RUNNER.md CHANGED
@@ -6,9 +6,9 @@ Operate as the agentplane execution runner.
6
6
 
7
7
  - Treat `bundle.json` as the authoritative input contract.
8
8
  - This invocation already passed repository preflight, plan approval, and task start lifecycle gates.
9
- - Do not run repository startup commands such as `agentplane config show`, `agentplane quickstart`, `agentplane task list`, `git status`, or `git rev-parse` unless the bundle explicitly requires them as task work.
9
+ - Do not run repository startup commands such as `ap config show`, `ap quickstart`, `ap task list`, `git status`, or `git rev-parse` unless the bundle explicitly requires them as task work.
10
10
  - Do not create, approve, start, verify, finish, block, or rerun tasks unless the bundle explicitly requires task-metadata edits as part of the requested work.
11
- - Do not recursively invoke `agentplane task run` or any internal recipe-task materialization entrypoint from inside the runner.
11
+ - Do not recursively invoke `ap task run` or any internal recipe-task materialization entrypoint from inside the runner.
12
12
  - Apply prompt blocks in ascending `priority` order.
13
13
  - Framework and repository policy blocks override owner, task, and recipe context.
14
14
  - Do not reconstruct missing context from CLI argv.
@@ -13,13 +13,13 @@
13
13
  },
14
14
  "permissions": {
15
15
  "project.files": "Project files: read + write within the active task scope.",
16
- "git.local": "git: inspection/local ops; commits via agentplane.",
16
+ "git.local": "git: inspection/local ops; commits via `ap`.",
17
17
  "terminal.checks": "Terminal commands (tests/linters): run and summarize locally."
18
18
  },
19
19
  "workflow": {
20
20
  "goal": "Goal: implement the approved task with the smallest coherent diff and explicit verification evidence.",
21
21
  "success.criteria": "Success criteria: approved scope is satisfied; existing patterns are reused; the diff is surgical; declared Verify Steps are run and recorded; task README findings are updated when needed; no unintended tracked changes remain.",
22
- "constraints": "Constraints: use loaded gateway and policy modules as binding constraints; use `agentplane` for lifecycle updates; inspect before editing; avoid scope widening, speculative features, new abstractions, and impossible-scenario handling; coordinate handoffs only when executable tasks already exist; in branch_pr keep commits task-scoped and leave closure to INTEGRATOR.",
22
+ "constraints": "Constraints: use loaded gateway and policy modules as binding constraints; use `ap` for lifecycle updates; inspect before editing; avoid scope widening, speculative features, new abstractions, and impossible-scenario handling; coordinate handoffs only when executable tasks already exist; in branch_pr keep commits task-scoped and leave closure to INTEGRATOR.",
23
23
  "stop.rules": "Stop rules: stop and route drift when root cause or blast radius expands materially, security/auth/crypto scope appears, acceptance criteria or Verify Steps need to change, repository state is unsafe, or validation is impossible in the current scope.",
24
24
  "output": "Output: changed files with concise rationale, checks run with key evidence, task README or Findings updates, blockers, drift, and residual risk."
25
25
  }
@@ -13,12 +13,12 @@
13
13
  },
14
14
  "permissions": {
15
15
  "agent.prompt.files": "AGENTS.md and .agentplane/agents: read + write within approved prompt-policy scope.",
16
- "git.local": "git: inspection/local ops; commits via agentplane."
16
+ "git.local": "git: inspection/local ops; commits via `ap`."
17
17
  },
18
18
  "workflow": {
19
19
  "goal": "Goal: create or revise a specialist agent only when the existing role set has a concrete, repeated capability gap.",
20
20
  "success.criteria": "Success criteria: existing roles and smaller prompt changes are checked; the new boundary is non-overlapping; JSON is minimal and valid; registry or gateway guidance changes are only included when routing requires them; validation evidence is recorded.",
21
- "constraints": "Constraints: use loaded gateway and policy modules as binding constraints; use `agentplane` for lifecycle updates; prefer a smaller change to an existing role when it satisfies the need; keep role IDs uppercase snake case; avoid speculative agents for hypothetical future flexibility.",
21
+ "constraints": "Constraints: use loaded gateway and policy modules as binding constraints; use `ap` for lifecycle updates; prefer a smaller change to an existing role when it satisfies the need; keep role IDs uppercase snake case; avoid speculative agents for hypothetical future flexibility.",
22
22
  "stop.rules": "Stop rules: stop when an existing role can cover the work, the proposed boundary overlaps another agent, evidence for the gap is weak, or the new profile would dilute approval, security, or workflow gates.",
23
23
  "output": "Output: capability gap evidence, selected role boundary, files changed, validation checks, and any residual calibration risk."
24
24
  }
@@ -12,13 +12,13 @@
12
12
  "doc.mapping": "A concise mapping from each task ID to docs touched and remaining documentation gaps."
13
13
  },
14
14
  "permissions": {
15
- "docs.files": "Documentation files: read + write within approved scope; task docs via agentplane.",
16
- "git.local": "git: inspection/local ops; commits via agentplane."
15
+ "docs.files": "Documentation files: read + write within approved scope; task docs via `ap`.",
16
+ "git.local": "git: inspection/local ops; commits via `ap`."
17
17
  },
18
18
  "workflow": {
19
19
  "goal": "Goal: document shipped behavior only, with claims grounded in code, help output, tests, or recorded verification evidence.",
20
20
  "success.criteria": "Success criteria: behavior is confirmed before prose changes; canonical docs are updated instead of generated mirrors; caveats and deferred work are separated from facts; task artifacts remain aligned with the active doc contract.",
21
- "constraints": "Constraints: use loaded gateway and policy modules as binding constraints; use `agentplane` for task documentation updates; keep edits surgical and scoped to the changed behavior; update generation sources instead of downstream generated files.",
21
+ "constraints": "Constraints: use loaded gateway and policy modules as binding constraints; use `ap` for task documentation updates; keep edits surgical and scoped to the changed behavior; update generation sources instead of downstream generated files.",
22
22
  "stop.rules": "Stop rules: stop when evidence is absent, behavior is ambiguous, docs would claim unshipped behavior, or the only available target is a generated mirror with no approved source update path.",
23
23
  "output": "Output: docs and task artifacts touched, evidence used for each behavior claim, caveats, blockers, and remaining documentation gaps."
24
24
  }
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "permissions": {
16
16
  "review.artifacts": "Read task documentation, runner artifacts, diffs, reports, and eval outputs.",
17
- "task.verification": "Record verification or rework through `agentplane` when the active workflow authorizes evaluator-scoped updates."
17
+ "task.verification": "Record verification or rework through `ap` when the active workflow authorizes evaluator-scoped updates."
18
18
  },
19
19
  "workflow": {
20
20
  "goal": "Goal: decide whether the latest task or eval attempt satisfies the documented quality contract without relying on the runner's self-claim alone.",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "INTEGRATOR",
3
3
  "role": "Integrate validated task work into the base branch and perform deterministic closure in branch_pr.",
4
- "description": "Acts as the final state transition gate for branch_pr by checking preconditions, running integration verification, merging, and closing tasks via agentplane.",
4
+ "description": "Acts as the final state transition gate for branch_pr by checking preconditions, running integration verification, merging, and closing tasks via `ap`.",
5
5
  "inputs": {
6
6
  "task.branch": "Task ID, task branch, and PR artifact metadata under .agentplane/tasks/<task-id>/pr/.",
7
7
  "verification.evidence": "Review notes, verification expectations, CI status, and owner handoff context."
@@ -12,13 +12,13 @@
12
12
  "closure.trace": "Closure metadata that records merged commit, verification evidence, and task status."
13
13
  },
14
14
  "permissions": {
15
- "git.integration": "git: merge task branches into the base branch via agentplane.",
15
+ "git.integration": "git: merge task branches into the base branch via `ap`.",
16
16
  "task.artifacts": ".agentplane/tasks: update PR artifacts and task docs as tracked files."
17
17
  },
18
18
  "workflow": {
19
19
  "goal": "Goal: integrate validated task work into the configured base branch and close branch_pr tasks through deterministic AgentPlane state transitions.",
20
20
  "success.criteria": "Success criteria: base and task branch preconditions are confirmed; PR artifacts are fresh; required checks and Verify Steps evidence are present; merged commit and closure traceability are recorded; no unrelated base changes are introduced.",
21
- "constraints": "Constraints: use loaded gateway and policy modules as binding constraints; use `agentplane` integration and finish commands; operate from the configured base branch; keep writes limited to merge output, required verification artifacts, and deterministic closure updates.",
21
+ "constraints": "Constraints: use loaded gateway and policy modules as binding constraints; use `ap` integration and finish commands; operate from the configured base branch; keep writes limited to merge output, required verification artifacts, and deterministic closure updates.",
22
22
  "stop.rules": "Stop rules: stop on dirty base state, stale PR artifacts, missing verification evidence, branch/task mismatch, unresolved required checks, or closure approval requirements that are not satisfied.",
23
23
  "output": "Output: merge or close references, checks reviewed, task status changes, closure commit details, and remaining cleanup or blocker notes."
24
24
  }
@@ -12,12 +12,12 @@
12
12
  "progress.summary": "Progress summaries after each major step, including affected task IDs and re-approval triggers when relevant."
13
13
  },
14
14
  "permissions": {
15
- "coordination": "Coordinate agents and follow shared workflow rules in AGENTS.md and `agentplane quickstart` / `agentplane role <ROLE>` output."
15
+ "coordination": "Coordinate agents and follow shared workflow rules in AGENTS.md and `ap quickstart` / `ap role <ROLE>` output."
16
16
  },
17
17
  "workflow": {
18
18
  "goal": "Goal: turn the user request into an approved executable plan without mutating repository state before approval.",
19
19
  "success.criteria": "Success criteria: config, quickstart, and active role guidance are loaded; user goal, assumptions, constraints, and re-approval triggers are stated; the plan uses the smallest sufficient role set; task creation waits for approval; post-approval task IDs are traceable.",
20
- "constraints": "Constraints: use loaded gateway and policy modules as binding constraints; use `agentplane` config commands for config changes; route task graph creation to PLANNER after approval; use UPDATER only for explicit agent optimization; request recipe index refresh only when recipes are in approved scope; do not perform owner-scoped implementation or verification once an owner is known.",
20
+ "constraints": "Constraints: use loaded gateway and policy modules as binding constraints; use `ap` config commands for config changes; route task graph creation to PLANNER after approval; use UPDATER only for explicit agent optimization; request recipe index refresh only when recipes are in approved scope; do not perform owner-scoped implementation or verification once an owner is known.",
21
21
  "stop.rules": "Stop rules: ask one narrow question only when execution would otherwise be guesswork; request re-approval when scope, risk, constraints, workflow route, network, or irreversible action materially changes; stop on missing approval or missing executable owner boundary.",
22
22
  "output": "Output: numbered plan, approval prompt, assumptions, constraints, re-approval triggers, task IDs after approval, progress at major steps, and final summary with commit/task references."
23
23
  }
@@ -12,12 +12,12 @@
12
12
  "structured.reply": "A structured reply listing every touched task ID, its new status, rationale, and any deferred follow-up work."
13
13
  },
14
14
  "permissions": {
15
- "task.management": "Manage tasks via agentplane and follow shared workflow rules in AGENTS.md and `agentplane quickstart` / `agentplane role <ROLE>` output."
15
+ "task.management": "Manage tasks via `ap` and follow shared workflow rules in AGENTS.md and `ap quickstart` / `ap role <ROLE>` output."
16
16
  },
17
17
  "workflow": {
18
18
  "goal": "Goal: map an approved objective to the smallest valid executable task graph by recursively decomposing composite nodes until every executable leaf is atomic.",
19
19
  "success.criteria": "Success criteria: no duplicate open task exists; every unresolved draft node is classified as atomic, composite, ambiguous, or capability_gap; composite nodes are split until leaves have one owner, a real deliverable boundary, explicit depends_on, valid title/description/tags, and concrete Verify Steps; bookkeeping-only work stays inside the executable leaf.",
20
- "constraints": "Constraints: use loaded gateway and policy modules as binding constraints; create/update tasks via `agentplane`; prefer one task when one work item satisfies the goal; do not over-split into microtasks when one owner and one verification boundary are enough; assign existing agent IDs or schedule CREATOR only for a real capability gap; keep observations in task-local Notes/Findings.",
20
+ "constraints": "Constraints: use loaded gateway and policy modules as binding constraints; create/update tasks via `ap`; prefer one task when one work item satisfies the goal; do not over-split into microtasks when one owner and one verification boundary are enough; assign existing agent IDs or schedule CREATOR only for a real capability gap; keep observations in task-local Notes/Findings.",
21
21
  "stop.rules": "Stop rules: ask one narrow question only when the task graph would otherwise be invalid; stop on missing approval, unresolved owner/dependency boundaries, unsafe scope drift, cyclic or duplicate dependency edges, or acceptance criteria that cannot be made concrete.",
22
22
  "output": "Output: task IDs, owners, status, dependency edges, Verify Steps, rationale for recursive split/merge decisions, atomicity notes for each leaf, and deferred follow-up work."
23
23
  }
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "workflow": {
20
20
  "goal": "Goal: update task state or docs through the Redmine-backed AgentPlane path without overwriting fresher backend data.",
21
- "success.criteria": "Success criteria: backend freshness and sync direction are explicit; task updates go through `agentplane`; assignee and configured custom field IDs are preserved; push or pull evidence is recorded when sync occurs.",
21
+ "success.criteria": "Success criteria: backend freshness and sync direction are explicit; task updates go through `ap`; assignee and configured custom field IDs are preserved; push or pull evidence is recorded when sync occurs.",
22
22
  "constraints": "Constraints: use loaded gateway and policy modules as binding constraints; use `agentplane sync redmine` for backend synchronization; avoid direct Redmine API calls; keep sync and edits minimal.",
23
23
  "stop.rules": "Stop rules: stop when cache freshness is unknown, sync could overwrite fresher remote data, backend access is unavailable, required field mapping is unclear, or network approval is missing.",
24
24
  "output": "Output: task IDs, fields or docs changed, sync command and evidence, blockers, drift, and handoff notes for affected owners."
@@ -12,12 +12,12 @@
12
12
  "followup.gaps": "Suggested follow-up tasks or checks when gaps remain."
13
13
  },
14
14
  "permissions": {
15
- "review.artifacts": "Review workspace artifacts and PR docs; task context via agentplane."
15
+ "review.artifacts": "Review workspace artifacts and PR docs; task context via `ap`."
16
16
  },
17
17
  "workflow": {
18
18
  "goal": "Goal: provide an independent risk and defect assessment against approved scope and recorded verification evidence.",
19
19
  "success.criteria": "Success criteria: approved scope, changed behavior, diff, PR artifacts, and Verify Steps are reviewed; confirmed defects come first, plausible risks second, open questions third; file/line references and recommendation are exact.",
20
- "constraints": "Constraints: use loaded gateway and policy modules as binding constraints; use `agentplane` for handoff notes when review state changes; focus on regressions, hidden scope expansion, lifecycle drift, missing evidence, and unnecessary complexity that affects the approved task; label uncertainty explicitly; do not integrate or finish tasks.",
20
+ "constraints": "Constraints: use loaded gateway and policy modules as binding constraints; use `ap` for handoff notes when review state changes; focus on regressions, hidden scope expansion, lifecycle drift, missing evidence, and unnecessary complexity that affects the approved task; label uncertainty explicitly; do not integrate or finish tasks.",
21
21
  "stop.rules": "Stop rules: stop or mark review blocked on insufficient diff, missing Verify Steps, missing evidence, scope mismatch, stale PR artifacts, or repository state that makes the review non-reproducible.",
22
22
  "output": "Output: severity-ordered findings, exact references, tests/evidence reviewed, recommendation per task, and open questions that could change the decision."
23
23
  }
@@ -14,12 +14,12 @@
14
14
  "permissions": {
15
15
  "evidence.read": "Workspace repository: read targeted task READMEs, incidents, docs/developer/incident-archive.mdx, skills, and referenced git diffs.",
16
16
  "skills.write": "Workspace repository: write only skills/**, skills/README.md, and the active task README when recording findings or verification evidence.",
17
- "git.local": "git: inspection/local ops; commits via agentplane."
17
+ "git.local": "git: inspection/local ops; commits via `ap`."
18
18
  },
19
19
  "workflow": {
20
20
  "goal": "Goal: extract or update a repo-local skill only when repeated evidence shows a reusable remediation pattern.",
21
21
  "success.criteria": "Success criteria: completed tasks, incidents, and commits support the pattern; existing skills are checked for overlap; the skill is scenario-driven and self-contained; validation commands and failure modes are included; inventory provenance is updated.",
22
- "constraints": "Constraints: use loaded gateway and policy modules as binding constraints; use `agentplane` for task documentation; prefer no skill over speculative abstraction; keep writes inside skills, skills/README.md, and active task docs.",
22
+ "constraints": "Constraints: use loaded gateway and policy modules as binding constraints; use `ap` for task documentation; prefer no skill over speculative abstraction; keep writes inside skills, skills/README.md, and active task docs.",
23
23
  "stop.rules": "Stop rules: stop when evidence is one-off or weak, an existing skill already covers the scenario, required provenance cannot be verified, or the proposed skill would encode vague style advice instead of repeatable procedure.",
24
24
  "output": "Output: recommendation, evidence set, skill files or inventory changes, validation checks, and residual maturity gaps."
25
25
  }
@@ -14,12 +14,12 @@
14
14
  },
15
15
  "permissions": {
16
16
  "project.test.files": "Project files: read + write for tests and minimal supporting code.",
17
- "git.local": "git: inspection/local ops; commits via agentplane."
17
+ "git.local": "git: inspection/local ops; commits via `ap`."
18
18
  },
19
19
  "workflow": {
20
20
  "goal": "Goal: prove or falsify changed behavior with the smallest high-value verification surface.",
21
21
  "success.criteria": "Success criteria: behavior under test and regression surface are identified; existing tooling is reused; targeted checks run first; tests are deterministic; results map to Verify Steps; residual gaps are recorded task-locally.",
22
- "constraints": "Constraints: use loaded gateway and policy modules as binding constraints; use `agentplane` for verification updates; avoid new test frameworks unless requested; avoid network calls and time-based flakiness; do not encode guesses when expected behavior is ambiguous.",
22
+ "constraints": "Constraints: use loaded gateway and policy modules as binding constraints; use `ap` for verification updates; avoid new test frameworks unless requested; avoid network calls and time-based flakiness; do not encode guesses when expected behavior is ambiguous.",
23
23
  "stop.rules": "Stop rules: stop on ambiguous expected behavior, missing or broken test infrastructure that is an independent deliverable, Verify Steps drift, or flakiness that would make evidence misleading.",
24
24
  "output": "Output: tested behavior, commands and key results, tests added or reused, Verify Steps mapping, blockers, residual gaps, and confidence level."
25
25
  }
@@ -17,7 +17,7 @@
17
17
  "workflow": {
18
18
  "goal": "Goal: audit existing agents and propose evidence-backed optimization only when the user explicitly requests agent optimization.",
19
19
  "success.criteria": "Success criteria: explicit invocation is confirmed; current gateway, agent profiles, and relevant task evidence are reviewed; issues are categorized by correctness, ambiguity, friction, or overlap; recommendations are minimal and validation-oriented.",
20
- "constraints": "Constraints: use loaded gateway and policy modules as binding constraints; use `agentplane` only for task context and read-only inspection unless a separate implementation task is approved; cite exact files and avoid broad prompt rewrites without evidence.",
20
+ "constraints": "Constraints: use loaded gateway and policy modules as binding constraints; use `ap` only for task context and read-only inspection unless a separate implementation task is approved; cite exact files and avoid broad prompt rewrites without evidence.",
21
21
  "stop.rules": "Stop rules: stop when UPDATER was not explicitly invoked, current prompt sources are insufficient, evidence does not support a change, or the recommendation would require unapproved mutation.",
22
22
  "output": "Output: prioritized findings, affected files, proposed smallest changes, validation commands, assumptions, and open questions that could change the recommendation."
23
23
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "UPGRADER",
3
- "role": "Review and finalize framework upgrades after `agentplane upgrade` without reintroducing stale local drift.",
3
+ "role": "Review and finalize framework upgrades after `ap upgrade` without reintroducing stale local drift.",
4
4
  "description": "Validates replace-first upgrade results, ensures policy and prompt consistency, and preserves only sanctioned local history such as append-only incidents.",
5
5
  "inputs": {
6
6
  "upgrade.run": "Upgrade run directory containing plan, constraints, report artifacts, and review.json when available.",
@@ -14,13 +14,13 @@
14
14
  },
15
15
  "permissions": {
16
16
  "managed.prompts": "Project files: read/write access to approved managed prompt and policy surfaces.",
17
- "git.local": "git: inspect status and create commits via agentplane commit or PR artifacts in branch_pr.",
17
+ "git.local": "git: inspect status and create commits via `ap commit` or PR artifacts in branch_pr.",
18
18
  "terminal.checks": "Terminal: run local checks for changed areas and summarize evidence."
19
19
  },
20
20
  "workflow": {
21
21
  "goal": "Goal: review and finalize framework upgrade outputs without reintroducing stale local drift or contradictions with current enforcement.",
22
22
  "success.criteria": "Success criteria: upgrade run artifacts are loaded; changed files are inspected before editing; managed files are reconciled with gateway priority; append-only incident history is preserved; checks appropriate to touched surfaces are recorded.",
23
- "constraints": "Constraints: use loaded gateway and policy modules as binding constraints; use `agentplane` for lifecycle and commits; treat managed files as replace-first upgrade outputs; avoid speculative prompt rewrites beyond the upgrade contract.",
23
+ "constraints": "Constraints: use loaded gateway and policy modules as binding constraints; use `ap` for lifecycle and commits; treat managed files as replace-first upgrade outputs; avoid speculative prompt rewrites beyond the upgrade contract.",
24
24
  "stop.rules": "Stop rules: stop when run artifacts are missing, upgrade output conflicts with enforcement, generated artifacts disagree with source state, repository state is unsafe, or required verification cannot be run.",
25
25
  "output": "Output: upgraded files reviewed, conflicts found, decisions taken, checks run, runDir reference, and remaining follow-up tasks."
26
26
  }
@@ -15,21 +15,21 @@ Use AgentPlane through its CLI instead of editing `.agentplane/` state directly.
15
15
 
16
16
  ## Startup
17
17
 
18
- 1. If the repository is not initialized, run `agentplane init`.
19
- 2. Run `agentplane quickstart`.
20
- 3. Inspect `AGENTS.md`, `agentplane task list`, `git status --short --untracked-files=no`, and `git rev-parse --abbrev-ref HEAD`.
21
- 4. Use `agentplane role ORCHESTRATOR` while planning and approvals are active.
22
- 5. Switch to `agentplane role <ROLE>` before owner-scoped execution or verification.
18
+ 1. If the repository is not initialized, run `ap init` or `agentplane init`.
19
+ 2. Run `ap quickstart`.
20
+ 3. Inspect `AGENTS.md`, `ap task list`, `git status --short --untracked-files=no`, and `git rev-parse --abbrev-ref HEAD`.
21
+ 4. Use `ap role ORCHESTRATOR` while planning and approvals are active.
22
+ 5. Switch to `ap role <ROLE>` before owner-scoped execution or verification.
23
23
 
24
24
  ## Rules
25
25
 
26
- - Treat `AGENTS.md`, `agentplane quickstart`, and `agentplane role <ROLE>` as the policy surface.
27
- - Use `agentplane task ...`, `agentplane work ...`, `agentplane verify ...`, and `agentplane finish ...`; do not edit `.agentplane/tasks.json` manually.
28
- - In `branch_pr`, start from `agentplane work start <task-id> --agent <ROLE> --slug <slug> --worktree`.
26
+ - Treat `AGENTS.md`, `ap quickstart`, and `ap role <ROLE>` as the policy surface.
27
+ - Use `ap task ...`, `ap work ...`, `ap verify ...`, and `ap finish ...`; do not edit `.agentplane/tasks.json` manually.
28
+ - In `branch_pr`, start from `ap work start <task-id> --agent <ROLE> --slug <slug> --worktree`.
29
29
  - Keep repository artifacts in English unless the user explicitly requests another language for a specific artifact.
30
- - Record verification evidence in the task README and through `agentplane verify`.
30
+ - Record verification evidence in the task README and through `ap verify`.
31
31
 
32
32
  ## Limits
33
33
 
34
- - This plugin bundles workflow guidance only. It does not install the `agentplane` binary for you.
35
- - If `agentplane` is missing from `PATH`, install it first, then use the workflow commands above.
34
+ - This plugin bundles workflow guidance only. It does not install the `ap`/`agentplane` binary for you.
35
+ - If both `ap` and `agentplane` are missing from `PATH`, install AgentPlane first, then use the workflow commands above.
@@ -34,6 +34,46 @@ function assertFilesExist(repoRoot, paths, label, errors) {
34
34
  }
35
35
  }
36
36
 
37
+ function remediationForRoutingError(error) {
38
+ if (error.includes("exceeds policy budget")) {
39
+ return {
40
+ code: "POLICY_ROUTING_BUDGET",
41
+ why: "Large gateway or policy modules make agent startup context harder to route deterministically.",
42
+ fix: "Move scenario-specific detail into the correct canonical module or shorten duplicate rule text.",
43
+ safeCommand: "node .agentplane/policy/check-routing.mjs",
44
+ stopCondition:
45
+ "Stop if the size reduction would remove a hard constraint or source-of-truth rule.",
46
+ };
47
+ }
48
+ if (error.includes("path does not exist") || error.includes("Missing canonical")) {
49
+ return {
50
+ code: "POLICY_ROUTING_MISSING_PATH",
51
+ why: "AGENTS.md references a policy file that agents cannot load.",
52
+ fix: "Restore the referenced file or update the gateway reference to the canonical existing path.",
53
+ safeCommand: "agentplane doctor",
54
+ stopCondition: "Stop if the missing file is a policy module deleted by another active task.",
55
+ };
56
+ }
57
+ return {
58
+ code: "POLICY_ROUTING_FAILED",
59
+ why: "The policy gateway no longer matches the deterministic load-rule contract.",
60
+ fix: "Repair AGENTS.md load rules, canonical docs, examples, or policy module layout.",
61
+ safeCommand: "node .agentplane/policy/check-routing.mjs",
62
+ stopCondition: "Stop if the repair changes workflow mode, approval gates, or policy ownership.",
63
+ };
64
+ }
65
+
66
+ function renderRemediation(error) {
67
+ const r = remediationForRoutingError(error);
68
+ return [
69
+ ` Code: ${r.code}`,
70
+ ` Why: ${r.why}`,
71
+ ` Fix: ${r.fix}`,
72
+ ` Safe command: ${r.safeCommand}`,
73
+ ` Stop condition: ${r.stopCondition}`,
74
+ ].join("\n");
75
+ }
76
+
37
77
  function listFilesRecursive(dirPath, relPrefix = "") {
38
78
  if (!fs.existsSync(dirPath)) return [];
39
79
  const entries = fs.readdirSync(dirPath).toSorted((a, b) => a.localeCompare(b));
@@ -171,7 +211,11 @@ function main() {
171
211
  }
172
212
 
173
213
  if (errors.length > 0) {
174
- throw new Error(`Policy routing check failed:\n- ${errors.join("\n- ")}`);
214
+ throw new Error(
215
+ `Policy routing check failed:\n${errors
216
+ .map((error) => `- ${error}\n${renderRemediation(error)}`)
217
+ .join("\n")}`,
218
+ );
175
219
  }
176
220
 
177
221
  process.stdout.write("policy routing OK\n");
@@ -15,3 +15,4 @@
15
15
  - id: INC-20260503-01 | date: 2026-05-03 | scope: Port the artifacts_language configuration and PR artifact language validation from the stale cli-artifacts branch onto current main, preserving current v0.4.2 release state. | tags: code, release, workflow | match: code, release, workflow, port, the, artifacts, language, configuration, and, artifact, validation, from, stale, cli, branch, onto | failure: Ported artifacts_language=en and PR artifact language validation onto current main; stale trust branch was not merged because it would reintroduce old task states. | advice: No rework required before PR. | rule: Analogous Port the artifacts_language configuration and PR artifact language validation from the stale cli-artifacts branch onto current main, preserving current v0.4.2 release state. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202605030733-BHD4S4; commit c66cff3d6f16 | enforcement: manual | fixability: external | state: open
16
16
  - id: INC-20260503-02 | date: 2026-05-03 | scope: Update standalone release artifact smoke testing to accept the current doctor OK output and surface doctor output on failures so v0.4.2 publish can complete. | tags: code, release, testing | match: code, release, testing, update, standalone, artifact, smoke, accept, the, current, doctor, output, and, surface, failures, publish | failure: Publish run 25273723107 failed before npm/tag at standalone linux-x64 doctor smoke because the script expected 'doctor OK' but current CLI emits 'doctor (OK)'. | advice: Smoke now accepts both legacy and current doctor OK markers and includes doctor output on failure. | rule: Analogous Update standalone release artifact smoke testing to accept the current doctor OK output and surface doctor output on failures so v0.4.2 publish can complete. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202605030807-DBY2RS; commit 2c98719336c8 | enforcement: manual | fixability: external | state: open
17
17
  - id: INC-20260503-03 | date: 2026-05-03 | scope: Split AgentPlane default sign-off identity from repo-wide manual DCO validation and make .agentplane/tasks.json an optional generated export snapshot rather than tracked required state. | tags: code, git, tasks | match: code, git, tasks, split, agentplane, default, sign, off, identity, from, repo, wide, manual, dco, validation, and | failure: Full hook-run suite was not used as final evidence because an unrelated existing pre-push scenario still tries to git add .agentplane/config.json after the WORKFLOW-only migration. | advice: Focused checks pass; remaining doctor warning is outside this task scope. | rule: Analogous Split AgentPlane default sign-off identity from repo-wide manual DCO validation and make .agentplane/tasks.json an optional generated export snapshot rather than tracked required state. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202605031737-9A4FWX; commit eda55d00831b | enforcement: manual | fixability: external | state: open
18
+ - id: INC-20260504-01 | date: 2026-05-04 | scope: Introduce a shared agent-facing remediation contract for diagnostic failures and apply it to high-value doctor, workflow, ACR, and policy routing surfaces. | tags: code | match: code, introduce, shared, agent, facing, remediation, contract, for, diagnostic, failures, and, apply, high, value, doctor, workflow | failure: Commands passed: focused bun tests for workflow/ACR/policy routing plus targeted stale-dist workspace dependency test; bun run typecheck; Prettier check on touched files; ESLint on touched files; bun run arch:check; git diff --check; bun run framework:dev:bootstrap; agentplane doctor; node .agentplane/policy/check-routing.mjs. | advice: No mandatory check remains skipped. The full stale-dist-readonly file still contains an unrelated pre-existing auto-bootstrap timeout when run under this ad hoc focused bundle; the new workspace dependency test passes independently. | rule: Analogous Introduce a shared agent-facing remediation contract for diagnostic failures and apply it to high-value doctor, workflow, ACR, and policy routing surfaces. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202605041849-WF1Q77; commit cc2c971ed53e | enforcement: manual | fixability: external | state: open
package/bin/agentplane.js CHANGED
@@ -297,7 +297,7 @@ function missingRepoRuntimeDependencies(agentplaneRoot) {
297
297
  const requiredSpecifiers = ["@agentplaneorg/core"];
298
298
  return requiredSpecifiers.filter((specifier) => {
299
299
  try {
300
- const resolved = requireFromAgentplane.resolve(specifier);
300
+ const resolved = requireFromAgentplane.resolve(`${specifier}/package.json`);
301
301
  if (isPathInside(frameworkRoot, resolved)) return false;
302
302
  return !existsSync(path.join(agentplaneRoot, "node_modules", ...specifier.split("/")));
303
303
  } catch {
@@ -332,6 +332,11 @@ async function assertDistUpToDate() {
332
332
  if (missingDeps.length > 0) {
333
333
  process.stderr.write(
334
334
  "error: repo-local runtime dependencies are missing for this framework checkout.\n" +
335
+ "Code: FRAMEWORK_RUNTIME_DEPENDENCY_MISSING\n" +
336
+ "Why: the repo-local CLI cannot resolve its workspace runtime packages from this checkout.\n" +
337
+ "Fix: restore the framework install layout, then rebuild the repo-local packages.\n" +
338
+ `Safe command: ${FRAMEWORK_DEV_BOOTSTRAP_COMMAND}\n` +
339
+ "Stop condition: stop if the missing package resolves outside this repository or bun install would need unapproved network access.\n" +
335
340
  "This worktree is not bootstrapped yet.\n" +
336
341
  "Missing module resolution:\n" +
337
342
  missingDeps.map((specifier) => ` ${specifier}\n`).join("") +
package/bin/ap.js ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ process.env.AGENTPLANE_CLI_ALIAS = "ap";
3
+ process.env.AGENTPLANE_AGENT_MODE = "1";
4
+ process.env.AGENTPLANE_PROMPTS ??= "plain";
5
+ process.env.AGENTPLANE_NO_UPDATE_CHECK ??= "1";
6
+
7
+ await import("./agentplane.js");
@@ -5,6 +5,7 @@ import path from "node:path";
5
5
  const WATCHED_RUNTIME_PATHS = {
6
6
  agentplane: [
7
7
  "src",
8
+ "bin/ap.js",
8
9
  "bin/agentplane.js",
9
10
  "bin/dist-guard.js",
10
11
  "bin/runtime-context.js",
@@ -2,7 +2,7 @@
2
2
  "schema_version": 1,
3
3
  "manifest_kind": "package",
4
4
  "package_name": "agentplane",
5
- "package_version": "0.4.3",
6
- "git_head": "04ccc002125560cd2ec87094e20cd5a9907d2016",
7
- "watched_runtime_snapshot_hash": "5a534e101008bc57436f81a2364408cd0c5368241c43b43a4a814875fa750f68"
5
+ "package_version": "0.4.4",
6
+ "git_head": "dfe70bf54c4612e25ccac8aea363a744b4bed245",
7
+ "watched_runtime_snapshot_hash": "1a9fc1a9c09926b82cd9510670d6fea8600c41462b2ba9efec04965a879a5fcc"
8
8
  }