agentplane 0.4.1 → 0.4.3

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
@@ -1,22 +1,21 @@
1
- # AgentPlane
1
+ # AgentPlane CLI
2
+
3
+ **The open-source audit layer for coding agents.**
4
+
5
+ `agentplane` is a local CLI that turns Claude Code, Codex, Cursor, Aider, and similar coding-agent
6
+ work into reviewable, reversible Git artifacts.
2
7
 
3
8
  [![npm](https://img.shields.io/npm/v/agentplane.svg)](https://www.npmjs.com/package/agentplane)
4
9
  [![Downloads](https://img.shields.io/npm/dm/agentplane.svg)](https://www.npmjs.com/package/agentplane)
10
+ [![GitHub stars](https://img.shields.io/github/stars/basilisk-labs/agentplane?style=flat)](https://github.com/basilisk-labs/agentplane/stargazers)
5
11
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/basilisk-labs/agentplane/blob/main/LICENSE)
6
12
  [![Node.js 20+](https://img.shields.io/badge/Node.js-20%2B-3c873a.svg)](https://agentplane.org/docs/user/prerequisites)
7
13
 
8
- **Use coding agents without losing Git discipline.**
9
-
10
- `agentplane` is a local CLI that makes Claude Code, Codex, Cursor, Aider, and similar coding-agent
11
- work auditable inside your Git repository:
12
-
13
- ```text
14
- task -> plan -> approve -> implement -> verify -> finish
15
- ```
14
+ [![SLSA v1 provenance](https://img.shields.io/badge/SLSA-v1-success)](https://registry.npmjs.org/-/npm/v1/attestations/agentplane@latest)
15
+ [![Trusted publisher](https://img.shields.io/badge/npm-trusted%20publisher-blue)](https://docs.npmjs.com/generating-provenance-statements)
16
+ [![Recipes signed: Ed25519](https://img.shields.io/badge/recipes-Ed25519%20signed-111827)](https://agentplane.org/docs/recipes)
16
17
 
17
- No hosted runtime. No hidden control plane. Everything stays in your repo.
18
-
19
- ## Install
18
+ ## Install in 30 seconds
20
19
 
21
20
  ```bash
22
21
  npm i -g agentplane
@@ -24,141 +23,95 @@ agentplane init
24
23
  agentplane quickstart
25
24
  ```
26
25
 
27
- Requirements:
28
-
29
- - Node.js 20+
30
- - Git repository
31
- - Local terminal
32
-
33
- Prefer not to install globally:
26
+ Prefer no global install:
34
27
 
35
28
  ```bash
36
29
  npx agentplane init
37
30
  npx agentplane quickstart
38
31
  ```
39
32
 
40
- ## Why it exists
41
-
42
- Coding agents can change files. Teams still need to know what happened:
43
-
44
- - What task was the agent solving?
45
- - What plan was approved?
46
- - What changed in the repository?
47
- - What was verified?
48
- - Why was the task considered finished?
49
-
50
- AgentPlane adds a visible workflow layer around agent work without replacing Git, your editor, or
51
- your terminal.
33
+ Requirements: Node.js 20+, Git, and a local terminal.
52
34
 
53
- ## What appears in your repository
54
-
55
- `agentplane init` creates a visible workflow surface:
35
+ ## What you get after `agentplane init`
56
36
 
57
37
  ```text
58
38
  AGENTS.md or CLAUDE.md Policy gateway for the repository
59
39
  .agentplane/ Repo-local workflow workspace
60
- .agentplane/config.json Current workflow configuration
40
+ .agentplane/WORKFLOW.md Current workflow/config contract
61
41
  .agentplane/agents/ Installed agent profiles
62
42
  .agentplane/tasks/ Per-task records and evidence
63
- .agentplane/WORKFLOW.md Materialized workflow contract
43
+ .agentplane/workflows/ Last-known-good workflow snapshot
64
44
  ```
65
45
 
66
- These artifacts make agent work inspectable. A reviewer can see what policy governed the repo, what
67
- task was active, what plan was accepted, what checks ran, and how the task was closed.
68
-
69
- ## First task flow
46
+ AgentPlane does not run a hosted control plane. It records the task trail inside the repository you
47
+ already review.
70
48
 
71
- Create a task and record the plan:
72
-
73
- ```bash
74
- agentplane task new --title "First task" --description "Describe the change" --priority med --owner DOCS --tag docs
75
- agentplane task plan set <task-id> --text "Explain the plan" --updated-by DOCS
76
- ```
77
-
78
- If your repository requires explicit plan approval, run:
49
+ ## One task loop
79
50
 
80
51
  ```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
81
54
  agentplane task plan approve <task-id> --by ORCHESTRATOR
82
- ```
83
-
84
- Then start work, record verification, and finish:
85
-
86
- ```bash
87
- agentplane task start-ready <task-id> --author DOCS --body "Start: ..."
55
+ agentplane task start-ready <task-id> --author CODER --body "Start: implementing parser validation with focused tests."
56
+ # Run Claude Code, Codex, Cursor, Aider, or edit manually.
88
57
  agentplane task verify-show <task-id>
89
- agentplane verify <task-id> --ok --by DOCS --note "Checks passed"
90
- agentplane finish <task-id> --author DOCS --body "Verified: checks passed." --result "One-line outcome" --commit <git-rev>
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>
91
60
  ```
92
61
 
93
- That is the shortest useful path: initialize the repo, create a task, verify the change, and close it
94
- through recorded workflow state instead of an unstructured agent session.
62
+ The visible output is the point: a reviewer can inspect task intent, plan, verification, and closure
63
+ from Git-visible files.
95
64
 
96
- ## Without vs with AgentPlane
65
+ Roles like `CODER` and `ORCHESTRATOR` are configurable agent IDs. See
66
+ [Agents](https://agentplane.org/docs/user/agents).
97
67
 
98
- | Without AgentPlane | With AgentPlane |
99
- | ------------------------ | ------------------------------- |
100
- | Prompt in chat | Task is recorded |
101
- | Agent edits files | Plan is explicit |
102
- | Human inspects diff | Approval is visible |
103
- | Context is scattered | Verification is stored |
104
- | Verification is implicit | Finish creates closure evidence |
105
- | Closure is manual | Everything lives close to Git |
106
-
107
- ## Workflow modes
68
+ ## Agent Change Record
108
69
 
109
- ### `direct`
70
+ Every task can produce an **Agent Change Record (ACR)**, a deterministic JSON evidence projection
71
+ of intent, accepted plan, verification result, policy decisions, and closure commit.
110
72
 
111
- Fast local loops in the current checkout. Good for solo work, prototypes, and short tasks.
112
-
113
- ### `branch_pr`
114
-
115
- Structured per-task branch and PR-style handoff. Good for teams, stricter review, and integration
116
- boundaries.
73
+ ```bash
74
+ agentplane acr generate <task-id> --work-commit HEAD --write
75
+ agentplane acr validate .agentplane/tasks/<task-id>/acr.json
76
+ agentplane acr check <task-id> --require-plan-approved --require-verification
77
+ agentplane acr --help
78
+ ```
117
79
 
118
- ## Who it is for
80
+ Schema: https://agentplane.org/schemas/acr-v0.1.schema.json
119
81
 
120
- - Developers using Claude Code, Codex, Cursor, Aider, or local coding agents.
121
- - Maintainers who want agent changes to remain reviewable.
122
- - Teams that need task state, verification, and closure before merging agent-generated work.
123
- - Local-first builders who do not want a hosted agent runtime between their repo and their workflow.
82
+ ## Workflow modes
124
83
 
125
- ## What it is not
84
+ - `direct` keeps work in the current checkout for fast local loops.
85
+ - `branch_pr` creates per-task branches, worktrees, PR artifacts, and integration handoff.
126
86
 
127
- - Not a hosted agent platform.
128
- - Not a prompt framework.
129
- - Not a replacement for Git.
130
- - Not a replacement for your editor.
131
- - Not a replacement for Claude Code, Codex, Cursor, or Aider.
87
+ ## Compatible with
132
88
 
133
- ## Workflow guides
89
+ Claude Code, Codex CLI, Cursor agent, Aider, GitHub Actions agent runners, and MCP-driven
90
+ workflows. AgentPlane does not replace them; it records what they did and whether your gates passed.
134
91
 
135
- Start from the guide that matches your current stack:
92
+ ## Recipes
136
93
 
137
- - [AgentPlane + Claude Code](https://agentplane.org/docs/workflow-guides/claude-code)
138
- - [AgentPlane + Codex](https://agentplane.org/docs/workflow-guides/codex)
139
- - [AgentPlane + Cursor](https://agentplane.org/docs/workflow-guides/cursor)
140
- - [AgentPlane + Aider](https://agentplane.org/docs/workflow-guides/aider)
141
- - [AgentPlane + GitHub Actions](https://agentplane.org/docs/workflow-guides/github-actions)
142
- - [AgentPlane + branch_pr workflow](https://agentplane.org/docs/workflow-guides/branch-pr)
94
+ Recipes are signed, versioned behavior modules for AgentPlane:
143
95
 
144
- Installable recipes are separate signed packages; the current catalog starts with
145
- [Code Map](https://agentplane.org/docs/recipes/code-map).
96
+ ```bash
97
+ agentplane recipes list-remote
98
+ agentplane recipes install code-map --refresh --yes
99
+ ```
146
100
 
147
- ## Documentation
101
+ Start with [Code Map](https://agentplane.org/docs/recipes/code-map).
148
102
 
149
- Start here:
103
+ ## Docs
150
104
 
151
105
  - [Overview](https://agentplane.org/docs/user/overview)
152
106
  - [Setup](https://agentplane.org/docs/user/setup)
153
- - [Workflow](https://agentplane.org/docs/user/workflow)
154
107
  - [Task lifecycle](https://agentplane.org/docs/user/task-lifecycle)
155
- - [Commands](https://agentplane.org/docs/user/commands)
156
- - [CLI reference](https://agentplane.org/docs/user/cli-reference.generated)
108
+ - [Workflow guides](https://agentplane.org/docs/workflow-guides)
109
+ - [Recipes](https://agentplane.org/docs/recipes)
110
+ - [Comparison](https://agentplane.org/docs/compare)
157
111
 
158
- ## Support
112
+ ## Repository
159
113
 
160
- - [Issues](https://github.com/basilisk-labs/agentplane/issues)
161
- - [Contributing](https://github.com/basilisk-labs/agentplane/blob/main/CONTRIBUTING.md)
114
+ https://github.com/basilisk-labs/agentplane
162
115
 
163
116
  ## License
164
117
 
package/assets/AGENTS.md CHANGED
@@ -21,7 +21,7 @@ Detailed procedures live in canonical modules from `## CANONICAL DOCS`.
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
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/config.json`; 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.
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.
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/config.json`.
36
+ 4. CLI guidance: `agentplane quickstart`, `agentplane role <ROLE>`, `.agentplane/WORKFLOW.md`.
37
37
  5. Reference examples from `## REFERENCE EXAMPLES`.
38
38
 
39
39
  Conflict rule:
@@ -114,6 +114,11 @@ node .agentplane/policy/check-routing.mjs
114
114
  - Outcome-first, concise, evidence-first: state goal, success criteria, constraints, stop rules, and output; use procedure only for command contracts, state machines, or irreversible gates; ask one narrow question only when missing information changes scope, task graph, security, or irreversible action.
115
115
  - Retrieval/progress/cache: preamble before multi-step or tool-heavy work; load only matched policy, task README, Verify Steps, and relevant files; use incidents only for analogous scope/tags; final output names actions, checks, blockers/drift, and next approval; keep stable gateway/policy/role before dynamic context and never cache mutable task state.
116
116
 
117
+ <!-- /ap:fragment -->
118
+ <!-- ap:fragment id="gateway.user.instructions" slot="body" mutability="append_only" -->
119
+
120
+ IF `.agentplane/user-instructions.md` exists THEN LOAD it as `gateway.user.instructions`.
121
+
117
122
  <!-- /ap:fragment -->
118
123
  <!-- ap:fragment id="gateway.agents.load_rules.load.rules" slot="load_rules" mutability="replaceable" -->
119
124
 
@@ -130,8 +135,8 @@ Condition: task includes mutation (file edits, task-state changes, commits, merg
130
135
 
131
136
  ### Conditional imports (linear IF -> LOAD contract)
132
137
 
133
- 1. IF `workflow_mode=direct` THEN LOAD `@.agentplane/policy/workflow.direct.md`.
134
- 2. IF `workflow_mode=branch_pr` THEN LOAD `@.agentplane/policy/workflow.branch_pr.md`.
138
+ 1. IF `workflow.mode=direct` THEN LOAD `@.agentplane/policy/workflow.direct.md`.
139
+ 2. IF `workflow.mode=branch_pr` THEN LOAD `@.agentplane/policy/workflow.branch_pr.md`.
135
140
  3. IF task touches release/version/publish THEN LOAD `@.agentplane/policy/workflow.release.md`.
136
141
  4. IF task runs `agentplane upgrade` or touches `.agentplane/.upgrade/**` THEN LOAD `@.agentplane/policy/workflow.upgrade.md`.
137
142
  5. IF task modifies implementation code paths THEN LOAD `@.agentplane/policy/dod.code.md`.
@@ -139,11 +144,6 @@ Condition: task includes mutation (file edits, task-state changes, commits, merg
139
144
  7. IF task modifies policy files (`AGENTS.md` or `.agentplane/policy/**`) THEN LOAD `@.agentplane/policy/governance.md`.
140
145
  8. IF task modifies `.agentplane/policy/incidents.md` THEN LOAD `@.agentplane/policy/incidents.md`.
141
146
 
142
- Routing examples:
143
-
144
- - Example (docs-only task): rules `1|6` apply in `direct`; do not load `dod.code.md`.
145
- - Example (upgrade task): rules `4|7` apply plus workflow mode rule.
146
-
147
147
  Routing constraints:
148
148
 
149
149
  - MUST NOT load unrelated policy modules.
@@ -0,0 +1,26 @@
1
+ {
2
+ "id": "EVALUATOR",
3
+ "role": "Evaluate completed runner/task attempts against documented quality criteria and return pass, rework, or blocked verdicts.",
4
+ "description": "Acts as an independent quality phase for task, recipe, prompt, and eval runs by comparing documented intent, Verify Steps, result manifests, traces, artifacts, and evidence before closure or promotion.",
5
+ "inputs": {
6
+ "task.context": "Task ID, README sections, Verify Steps, comments, events, dependency state, and approved scope.",
7
+ "runner.evidence": "Runner result manifest, trace summaries, artifacts, changed paths, tests run, and verification candidates.",
8
+ "reference.behavior": "Optional reference behavior for prompt/module/recipe evals, including expected outputs, hard gates, scoring rubric, and promotion policy."
9
+ },
10
+ "outputs": {
11
+ "verdict": "One of pass, rework, or blocked, with the criteria and evidence that determined the result.",
12
+ "rework.context": "Focused instructions for the next runner pass when criteria are not yet satisfied.",
13
+ "quality.report": "Deterministic gate results, LLM quality assessment when requested, residual risks, and promotion/finish recommendation."
14
+ },
15
+ "permissions": {
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."
18
+ },
19
+ "workflow": {
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.",
21
+ "success.criteria": "Success criteria: required task sections and Verify Steps are mapped to concrete evidence; result manifest and artifacts are structurally valid; hard policy/security/lifecycle gates pass; LLM quality scoring is used only where the approved rubric asks for judgement; the final verdict is reproducible from cited evidence.",
22
+ "constraints": "Constraints: use loaded gateway and policy modules as binding constraints; separate deterministic gates from LLM judgement; do not edit implementation files; do not finish or integrate tasks unless the approved plan explicitly assigns evaluator closure; preserve raw trace/artifact paths instead of copying assistant prose into task docs.",
23
+ "stop.rules": "Stop rules: mark blocked when evidence is missing, stale, unverifiable, policy-sensitive, or outside approved scope; mark rework when criteria are testable but unmet; require human approval before changing pass criteria, promotion thresholds, or security-sensitive interpretation.",
24
+ "output": "Output: verdict, failed or satisfied criteria, evidence paths, LLM judgement summary when used, rework context for the next runner pass, and finish/promote recommendation."
25
+ }
26
+ }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "PLANNER",
3
- "role": "Own the task backlog via agentplane and keep every approved plan mapped to the smallest valid task graph.",
4
- "description": "Converts goals into atomic single-owner tasks with explicit acceptance contracts, minimal dependency edges, and no bookkeeping-only noise.",
3
+ "role": "Own the task backlog via agentplane and keep every approved plan recursively refined into the smallest valid task graph.",
4
+ "description": "Converts goals into atomic single-owner leaf tasks with explicit acceptance contracts, minimal dependency edges, and no bookkeeping-only noise.",
5
5
  "inputs": {
6
6
  "high.level.goal": "High-level goals, features, bugs, or refactors to plan.",
7
7
  "planning.constraints": "Optional constraints such as deadlines, priority, or components."
@@ -15,10 +15,10 @@
15
15
  "task.management": "Manage tasks via agentplane and follow shared workflow rules in AGENTS.md and `agentplane quickstart` / `agentplane role <ROLE>` output."
16
16
  },
17
17
  "workflow": {
18
- "goal": "Goal: map an approved objective to the smallest valid executable task graph.",
19
- "success.criteria": "Success criteria: no duplicate open task exists; each task has one owner, a real deliverable boundary, explicit depends_on, valid title/description/tags, and concrete Verify Steps; bookkeeping-only work stays inside the executable task.",
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; assign existing agent IDs or schedule CREATOR only for a real capability gap; keep observations in task-local Notes/Findings.",
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, or acceptance criteria that cannot be made concrete.",
22
- "output": "Output: task IDs, owners, status, dependency edges, Verify Steps, rationale for split/merge decisions, and deferred follow-up work."
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
+ "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.",
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
+ "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
  }
24
24
  }
@@ -22,6 +22,13 @@
22
22
  "merge_strategy": "agent_json_3way",
23
23
  "required": true
24
24
  },
25
+ {
26
+ "path": ".agentplane/agents/EVALUATOR.json",
27
+ "source_path": "agents/EVALUATOR.json",
28
+ "type": "json",
29
+ "merge_strategy": "agent_json_3way",
30
+ "required": true
31
+ },
25
32
  {
26
33
  "path": ".agentplane/agents/INTEGRATOR.json",
27
34
  "source_path": "agents/INTEGRATOR.json",
@@ -10,3 +10,8 @@
10
10
  - id: INC-20260430-03 | date: 2026-04-30 | scope: Add an automated docs information-architecture guard that checks docs/index.mdx and website/sidebars.ts alignment, catches orphan current docs, and fails on markdown references to repository paths that no longer exist. | tags: code, docs-ia, tooling | match: code, docs-ia, tooling, add, automated, docs, information, architecture, guard, that, checks, index, mdx, and, website, sidebars | failure: Remote Docs CI failed before this fix on docs/developer/project-layout.mdx referencing packages/agentplane/dist/. That path is generated output, not a required tracked source path. | advice: Follow-up fix commit is 4ab6c548 with artifact refresh 5685436b. | rule: Analogous Add an automated docs information-architecture guard that checks docs/index.mdx and website/sidebars.ts alignment, catches orphan current docs, and fails on markdown references to repository paths that no longer exist. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604301955-HKY8NW; commit 00031a6f3ac9 | enforcement: manual | fixability: external | state: open
11
11
  - id: INC-20260501-01 | date: 2026-05-01 | scope: Run final integrated verification for the refactor wave and record any residual gaps. | tags: code | match: code, run, final, integrated, verification, for, the, refactor, wave, and, record, any, residual, gaps, normalized, compiled | failure: ci:local:full passed after focused init/platform-critical regression checks; framework:dev:bootstrap, agentplane doctor, policy routing, and spec:examples smoke also passed. | advice: Normalized compiled init prompt asset output to one trailing newline and updated the direct-mode agent-template expectation to account for policy gateway rendering. | rule: Analogous Run final integrated verification for the refactor wave and record any residual gaps. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202605010645-3W3EXR; commit b48a260fa73d | enforcement: manual | fixability: external | state: open
12
12
  - id: INC-20260501-02 | date: 2026-05-01 | scope: Submit a GitHub PR adding AgentPlane to brandonhimpfen/awesome-ai-coding-agents as workflow infrastructure for AI coding agents after checking scope alignment, formatting, and category placement. | tags: docs | match: docs, submit, github, adding, agentplane, brandonhimpfen, awesome, coding, agents, workflow, infrastructure, for, after, checking, scope, alignment | failure: Added AgentPlane to brandonhimpfen/awesome-ai-coding-agents under Agent Infrastructure using repo-local AI coding-agent workflow wording. Opened https://github.com/brandonhimpfen/awesome-ai-coding-agents/pull/8 with --body-file and verified gh pr view body renders with Markdown line breaks. Ran git diff --check, python3 .github/scripts/awesome_list_lint.py, python3 .github/scripts/detect_duplicate_links.py, python3 check_readme_links.py README.md --timeout 8, node .agentplane/policy/check-routing.mjs, and agentplane doctor. | advice: Upstream PR is open. Target repo link checker confirmed the AgentPlane URL as 200 but exits non-zero because the pre-existing agentcoder/AgentCoder entry returns 404; this is disclosed in the PR body. | rule: Analogous Submit a GitHub PR adding AgentPlane to brandonhimpfen/awesome-ai-coding-agents as workflow infrastructure for AI coding agents after checking scope alignment, formatting, and category placement. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202605011518-PH7024; commit cb1fe303f97a | enforcement: manual | fixability: external | state: open
13
+ - id: INC-20260501-03 | date: 2026-05-01 | scope: Make post-publish release evidence PR recovery authenticate gh so successful releases do not end as failed after publication. | tags: ci, release, workflow | match: ci, release, workflow, make, post, publish, evidence, recovery, authenticate, successful, releases, not, end, failed, after, publication | failure: Release evidence gh CLI steps now set GH_TOKEN from github.token. | advice: Added GH_TOKEN env to release evidence PR check/create/merge steps and contract coverage. | rule: Analogous Make post-publish release evidence PR recovery authenticate gh so successful releases do not end as failed after publication. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202605012054-HS993A; commit c329da9be70f | enforcement: manual | fixability: external | state: open
14
+ - id: INC-20260501-04 | date: 2026-05-01 | scope: Update the Homebrew formula renderer and tap formula so fresh AgentPlane releases install without Homebrew npm min-release-age blocking fresh package dependencies. | tags: release, workflow | match: release, workflow, update, the, homebrew, formula, renderer, and, tap, fresh, agentplane, releases, install, without, npm, min | failure: Updated render-homebrew-formula to install the cached npm tarball without std_npm_args/min-release-age, added contract coverage, and pushed basilisk-labs/homebrew-tap c6d3e94 for v0.4.1. Local Homebrew install reached Cellar successfully; final link was blocked only by an existing /opt/homebrew/bin/agentplane npm-global symlink. | advice: Run brew link --overwrite agentplane when an old npm-global symlink is present; standalone no-Node install requires a future native/bundled CLI artifact. | rule: Analogous Update the Homebrew formula renderer and tap formula so fresh AgentPlane releases install without Homebrew npm min-release-age blocking fresh package dependencies. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202605012143-NEK3E8; commit 43bc2ed84a23 | enforcement: manual | fixability: external | state: open
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
+ - 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
+ - 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
@@ -19,6 +19,22 @@ Use this module when `workflow_mode=branch_pr`.
19
19
  8. CHECKPOINT C: finish task(s) on base with verification evidence.
20
20
  9. Remove merged task branches/worktrees once the hosted-close/finish route has landed.
21
21
 
22
+ ## Related task batch worktrees
23
+
24
+ When several approved tasks form one dependent change, they MAY be executed in one primary task
25
+ worktree instead of one worktree per task. Use this only when splitting the work into separate PRs
26
+ would add coordination risk without improving review.
27
+
28
+ Batch worktree rules:
29
+
30
+ - One task is the primary integration task and owns the branch, worktree, and PR.
31
+ - Every included task id MUST be listed in the primary task plan or PR artifact before mutation.
32
+ - Each included task MUST keep its own plan, start-ready record, Verify Steps, verification result,
33
+ and finish evidence.
34
+ - Commits SHOULD mention the relevant task suffixes when a change serves more than one included
35
+ task.
36
+ - The final PR MUST describe the full included task set and merge the complete result into `main`.
37
+
22
38
  <!-- /ap:fragment -->
23
39
  <!-- ap:fragment id="policy.workflow.branch_pr.commands.command.contract" slot="commands" mutability="replaceable" -->
24
40
 
@@ -43,6 +59,8 @@ agentplane finish <task-id> --author INTEGRATOR --body "Verified: ..." --result
43
59
  - Task documentation updates MAY be batched within one turn before approval.
44
60
  - MUST run `task plan approve` then `task start-ready` as `Step 1 -> wait -> Step 2` (never parallel).
45
61
  - In `branch_pr`, `task start-ready`, `pr open`, `pr update`, and verification commands SHOULD be run from the task worktree created by `work start`.
62
+ - A related task batch MAY reuse one primary task worktree when all included tasks are approved,
63
+ listed, verified independently, and merged through the primary task PR.
46
64
  - `pr open` without `--sync-only` SHOULD complete in one pass: sync local artifacts, auto-publish the task branch to `origin` when it has no upstream yet, then create/link the remote GitHub PR.
47
65
  - `integrate` defaults to the `merge` strategy so task branch commits stay in base history. Use `--merge-strategy squash` only when intentionally compacting branch history.
48
66
  - `task start-ready` MAY surface targeted incident advice for analogous scope/tags; follow it before widening scope.
package/bin/agentplane.js CHANGED
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { spawnSync } from "node:child_process";
3
+ import { existsSync } from "node:fs";
3
4
  import path from "node:path";
4
- import { stat } from "node:fs/promises";
5
+ import { mkdir, rm, stat } from "node:fs/promises";
5
6
  import { createRequire } from "node:module";
6
7
  import { fileURLToPath } from "node:url";
7
8
  import { distExists, isPackageBuildFresh } from "./dist-guard.js";
@@ -185,8 +186,98 @@ function renderStalePolicyWarning(reason) {
185
186
  return "warning: allowing read-only diagnostic command to run with a stale repo build inside the framework checkout.\n";
186
187
  }
187
188
 
189
+ function staleAutoBootstrapEnabled() {
190
+ return (process.env.AGENTPLANE_DEV_AUTO_BOOTSTRAP ?? "1").trim() !== "0";
191
+ }
192
+
193
+ function alreadyTriedStaleAutoBootstrap() {
194
+ return (process.env.AGENTPLANE_DEV_AUTO_BOOTSTRAPPED ?? "").trim() === "1";
195
+ }
196
+
197
+ async function withBootstrapLock(repoRoot, fn) {
198
+ const lockParent = path.join(repoRoot, ".agentplane", "cache");
199
+ const lockDir = path.join(lockParent, "framework-dev-bootstrap.lock");
200
+ await mkdir(lockParent, { recursive: true });
201
+ try {
202
+ await mkdir(lockDir, { recursive: false });
203
+ } catch (error) {
204
+ if (error?.code !== "EEXIST") throw error;
205
+ process.stderr.write(
206
+ "error: another framework dev bootstrap is already running.\n" +
207
+ `Retry after the lock is released: ${path.relative(repoRoot, lockDir)}\n`,
208
+ );
209
+ process.exitCode = 2;
210
+ return true;
211
+ }
212
+
213
+ try {
214
+ return await fn();
215
+ } finally {
216
+ await rm(lockDir, { recursive: true, force: true });
217
+ }
218
+ }
219
+
220
+ async function autoBootstrapAndRerun(repoRoot, staleReasons, commandPolicy) {
221
+ if (!staleAutoBootstrapEnabled() || alreadyTriedStaleAutoBootstrap()) return false;
222
+
223
+ const commandText = process.argv
224
+ .slice(2)
225
+ .map((value) => String(value ?? "").trim())
226
+ .filter(Boolean)
227
+ .join(" ");
228
+ process.stderr.write(
229
+ "info: stale repo build detected; running framework dev bootstrap before command.\n" +
230
+ `command: ${commandText || "<unknown>"}\n` +
231
+ `detected: ${staleReasons.join(", ")}\n` +
232
+ `reason: ${commandPolicy.reason}\n`,
233
+ );
234
+
235
+ return await withBootstrapLock(repoRoot, async () => {
236
+ const bootstrap = spawnSync("bun", ["run", "framework:dev:bootstrap"], {
237
+ cwd: repoRoot,
238
+ stdio: "inherit",
239
+ env: {
240
+ ...process.env,
241
+ AGENTPLANE_DEV_AUTO_BOOTSTRAP: "0",
242
+ },
243
+ });
244
+
245
+ if (bootstrap.error || bootstrap.status !== 0) {
246
+ const reason = bootstrap.error?.message ?? `exit ${bootstrap.status ?? "unknown"}`;
247
+ process.stderr.write(
248
+ `error: automatic framework dev bootstrap failed (${reason}).\n` +
249
+ "Manual fallback:\n" +
250
+ FRAMEWORK_DEV_MANUAL_REPAIR_COMMANDS.map((command) => ` ${command}\n`).join(""),
251
+ );
252
+ process.exitCode = bootstrap.status ?? 2;
253
+ return true;
254
+ }
255
+
256
+ const rerun = spawnSync(
257
+ process.execPath,
258
+ [fileURLToPath(import.meta.url), ...process.argv.slice(2)],
259
+ {
260
+ cwd: process.cwd(),
261
+ stdio: "inherit",
262
+ env: {
263
+ ...process.env,
264
+ AGENTPLANE_DEV_AUTO_BOOTSTRAPPED: "1",
265
+ },
266
+ },
267
+ );
268
+ if (rerun.error) {
269
+ process.stderr.write(`error: failed to rerun after bootstrap: ${rerun.error.message}\n`);
270
+ process.exitCode = 2;
271
+ return true;
272
+ }
273
+ process.exitCode = rerun.status ?? (rerun.signal ? 1 : 0);
274
+ return true;
275
+ });
276
+ }
277
+
188
278
  function missingRepoRuntimeDependencies(agentplaneRoot) {
189
279
  const requireFromAgentplane = createRequire(path.join(agentplaneRoot, "package.json"));
280
+ const frameworkRoot = path.resolve(agentplaneRoot, "..", "..");
190
281
  let packageJson = null;
191
282
  try {
192
283
  packageJson = requireFromAgentplane("./package.json");
@@ -206,8 +297,9 @@ function missingRepoRuntimeDependencies(agentplaneRoot) {
206
297
  const requiredSpecifiers = ["@agentplaneorg/core"];
207
298
  return requiredSpecifiers.filter((specifier) => {
208
299
  try {
209
- requireFromAgentplane.resolve(specifier);
210
- return false;
300
+ const resolved = requireFromAgentplane.resolve(specifier);
301
+ if (isPathInside(frameworkRoot, resolved)) return false;
302
+ return !existsSync(path.join(agentplaneRoot, "node_modules", ...specifier.split("/")));
211
303
  } catch {
212
304
  return true;
213
305
  }
@@ -297,6 +389,10 @@ async function assertDistUpToDate() {
297
389
 
298
390
  const commandPolicy = classifyStaleDistPolicy(process.argv);
299
391
  if (commandPolicy.mode === "warn_and_run") {
392
+ if (await autoBootstrapAndRerun(repoRoot, staleReasons, commandPolicy)) {
393
+ return false;
394
+ }
395
+
300
396
  const commandText = process.argv
301
397
  .slice(2)
302
398
  .map((value) => String(value ?? "").trim())
@@ -2,7 +2,7 @@
2
2
  "schema_version": 1,
3
3
  "manifest_kind": "package",
4
4
  "package_name": "agentplane",
5
- "package_version": "0.4.1",
6
- "git_head": "62153d7eedd49b356e67aee92d713ad9b7b8485c",
7
- "watched_runtime_snapshot_hash": "2a5f3b1f84ea38e8747a50e72b94b46fe874f0fa72eaa0a4babba30323524007"
5
+ "package_version": "0.4.3",
6
+ "git_head": "04ccc002125560cd2ec87094e20cd5a9907d2016",
7
+ "watched_runtime_snapshot_hash": "5a534e101008bc57436f81a2364408cd0c5368241c43b43a4a814875fa750f68"
8
8
  }