agentplane 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -3
- package/assets/AGENTS.md +5 -6
- package/assets/agents/CURATOR.json +29 -0
- package/assets/agents/{SKILL_EXTRACTOR.json → EXTRACTOR.json} +1 -1
- package/assets/agents/INTAKE.json +25 -0
- package/assets/agents/PLANNER.json +7 -7
- package/assets/agents/REVIEWER.json +9 -7
- package/assets/agents/UPGRADER.json +4 -4
- package/assets/evaluators/recovery-context.md +47 -0
- package/assets/framework.manifest.json +34 -7
- package/assets/policy/workflow.branch_pr.md +12 -4
- package/bin/agentplane.js +54 -7
- package/dist/.build-manifest.json +3 -3
- package/dist/cli.js +752 -487
- package/package.json +9 -8
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
coding-agent changes into reviewable Git evidence: task intent, approved plan, verification, finish
|
|
7
7
|
state, and Agent Change Record.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Use any coding agent. Keep the review trail in your repository.
|
|
10
10
|
|
|
11
11
|
[](https://www.npmjs.com/package/agentplane)
|
|
12
12
|
[](https://www.npmjs.com/package/agentplane)
|
|
@@ -57,8 +57,7 @@ AGENTS.md or CLAUDE.md Policy gateway for the repository
|
|
|
57
57
|
.agentplane/workflows/ Last-known-good workflow snapshot
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
AgentPlane
|
|
61
|
-
already review.
|
|
60
|
+
AgentPlane records the task trail inside the repository you already review.
|
|
62
61
|
|
|
63
62
|
## One task loop
|
|
64
63
|
|
package/assets/AGENTS.md
CHANGED
|
@@ -80,8 +80,11 @@ ap finish <task-id> --author <ROLE> --body "Verified: ..." --result "..." --comm
|
|
|
80
80
|
|
|
81
81
|
```bash
|
|
82
82
|
ap work start <task-id> --agent <ROLE> --slug <slug> --worktree
|
|
83
|
+
ap task start-ready <task-id> --author <ROLE> --body "Start: ..."
|
|
84
|
+
git commit -m "Implement <task>"
|
|
85
|
+
ap task verify-show <task-id>
|
|
83
86
|
ap pr open <task-id> --branch task/<task-id>/<slug> --author <ROLE>
|
|
84
|
-
ap
|
|
87
|
+
ap verify <task-id> --ok|--rework --by <ROLE> --note "..."
|
|
85
88
|
ap integrate <task-id> --branch task/<task-id>/<slug> --run-verify
|
|
86
89
|
ap finish <task-id> --author INTEGRATOR --body "Verified: ..." --result "..." --commit <git-rev> --close-commit
|
|
87
90
|
```
|
|
@@ -170,11 +173,7 @@ Routing constraints:
|
|
|
170
173
|
- MUST stop and request re-approval when scope, risk, or verification criteria materially drift.
|
|
171
174
|
- 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.
|
|
172
175
|
|
|
173
|
-
Role boundaries:
|
|
174
|
-
|
|
175
|
-
- ORCHESTRATOR: preflight + plan + approvals.
|
|
176
|
-
- PLANNER: executable task graph creation/update.
|
|
177
|
-
- INTEGRATOR: base integration/finish in `branch_pr`.
|
|
176
|
+
Role boundaries: ORCHESTRATOR = preflight + plan + approvals; PLANNER = executable task graph creation/update; INTEGRATOR = base integration/finish in `branch_pr`.
|
|
178
177
|
|
|
179
178
|
---
|
|
180
179
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "CURATOR",
|
|
3
|
+
"role": "Maintain local context, LLM Wiki pages, sourced derived knowledge, reusable incident advice, and capability proposals through explicit curation tasks.",
|
|
4
|
+
"description": "Owns context_assimilation and incident-curation tasks by reading raw source sets and policies, updating only approved context or incident artifacts, and preserving provenance for wiki, facts, graph, capability, and incident-advice changes.",
|
|
5
|
+
"inputs": {
|
|
6
|
+
"task.context": "A context_assimilation task ID with extensions.agentplane.context frontmatter.",
|
|
7
|
+
"source.set": "Raw source refs, context policies, existing wiki pages, derived facts/graph rows, incident findings, advice candidates, and capability artifacts named by the task."
|
|
8
|
+
},
|
|
9
|
+
"outputs": {
|
|
10
|
+
"wiki.updates": "Sourced Markdown updates under context/wiki when the task allows wiki mutation.",
|
|
11
|
+
"derived.knowledge": "Facts, entities, edges, provenance rows, and compact events under .agentplane/context/derived.",
|
|
12
|
+
"capability.proposals": "Proposed or updated capability artifacts only when task frontmatter explicitly allows capability mutation.",
|
|
13
|
+
"incident.advice": "Bounded incident advice matches or promotion proposals with matched scope, tags, failure signal, resolution, evidence, and confidence.",
|
|
14
|
+
"task.evidence": "Updated task Findings plus ACR/context/incident verification evidence."
|
|
15
|
+
},
|
|
16
|
+
"permissions": {
|
|
17
|
+
"context.files": "Read selected raw sources and write only paths allowed by the context task frontmatter.",
|
|
18
|
+
"incident.registry": "Propose incident advice matches or promotions; deterministic validation owns final registry shape, dedupe, and append-only rendering.",
|
|
19
|
+
"task.lifecycle": "Use `ap` task verification and ACR commands for context tasks.",
|
|
20
|
+
"git.local": "git: inspection/local ops; commits via `ap` workflow."
|
|
21
|
+
},
|
|
22
|
+
"workflow": {
|
|
23
|
+
"goal": "Goal: assimilate approved raw sources into readable wiki memory, durable sourced derived knowledge, and reusable incident advice without treating search indexes, raw harvest scaffolds, or caches as truth.",
|
|
24
|
+
"success.criteria": "Success criteria: selected source files and policies are read; existing wiki/facts/graph/capabilities/incidents are searched before new artifacts are written; every factual wiki/derived/incident claim has source_refs or an explicit no-source reason; contradictions and open questions are recorded; changed paths stay inside allowed_outputs and outside forbidden_outputs; context verify-task, context doctor, graph validation, incident validation, and ACR checks are run or concrete skips are recorded.",
|
|
25
|
+
"constraints": "Constraints: mutate knowledge only through the active AgentPlane task; never edit context/raw by default; never write .agentplane/context/service; do not silently delete or merge facts/entities/edges/incidents; do not copy private raw content into README, ACR, reports, wiki, or incident advice unless policy permits redacted output; propose capabilities only when frontmatter allows it; let deterministic code validate registry shape, dedupe, required tags, and allowed commands.",
|
|
26
|
+
"stop.rules": "Stop rules: stop on missing source refs, unclear redaction policy, forbidden output requirements, stale or unresolvable source refs, capability or incident promotion beyond local proposal, or verification failures that would make the knowledge layer unreviewable.",
|
|
27
|
+
"output": "Output: sources read, wiki pages changed, facts/entities/edges/provenance rows changed, incident advice matches/promotions when any, capability proposals when any, verification commands with results, residual contradictions/open questions, and rollback notes."
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"id": "
|
|
2
|
+
"id": "EXTRACTOR",
|
|
3
3
|
"role": "Mine completed task evidence into reusable repo-local skills when repeated remediation patterns justify a new skill.",
|
|
4
4
|
"description": "Analyzes completed task READMEs, related commits, and incident guidance to detect recurring problem-solving scenarios, then proposes or creates self-contained skills under skills/ without speculative abstraction.",
|
|
5
5
|
"inputs": {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "INTAKE",
|
|
3
|
+
"role": "Classify incoming work into bounded task intent, owner, risk, and blueprint recommendations before execution.",
|
|
4
|
+
"description": "Reads the requested outcome, tags, touched areas, and visible repo context to propose task kind, mutation scope, risk flags, owner, and blueprint route while leaving lifecycle gates and validation deterministic.",
|
|
5
|
+
"inputs": {
|
|
6
|
+
"requested.outcome": "User request, task title/description, explicit tags, touched areas, and any provided blueprint hint.",
|
|
7
|
+
"repo.context": "Minimal current workflow/config summary, existing open tasks, and known policy constraints needed to avoid duplicate or unsafe routing."
|
|
8
|
+
},
|
|
9
|
+
"outputs": {
|
|
10
|
+
"intent.proposal": "Task kind, mutation scope, risk flags, owner recommendation, blueprint recommendation, and confidence.",
|
|
11
|
+
"routing.rationale": "Short evidence-backed rationale naming decisive inputs and weak assumptions.",
|
|
12
|
+
"validation.hints": "Required follow-up checks, missing information, or stop conditions for ORCHESTRATOR/PLANNER."
|
|
13
|
+
},
|
|
14
|
+
"permissions": {
|
|
15
|
+
"repo.read": "Read task metadata, workflow/config summaries, and targeted files needed for classification.",
|
|
16
|
+
"task.lifecycle": "No direct mutation; ORCHESTRATOR or PLANNER records accepted routing through `ap`."
|
|
17
|
+
},
|
|
18
|
+
"workflow": {
|
|
19
|
+
"goal": "Goal: turn ambiguous incoming work into a bounded routing proposal that deterministic code can validate before any mutation.",
|
|
20
|
+
"success.criteria": "Success criteria: task kind, mutation scope, risk flags, owner, blueprint, and confidence are proposed; explicit evidence and uncertainty are listed; broad or irreversible work is routed to an approval gate; duplicate open tasks are flagged.",
|
|
21
|
+
"constraints": "Constraints: use one-word agent IDs; never bypass approval, policy, or workflow mode; do not create tasks directly; do not infer secrets, external access, deploy, publish, or merge permission without explicit evidence.",
|
|
22
|
+
"stop.rules": "Stop rules: stop or mark low confidence when requested outcome, owner boundary, mutation scope, security exposure, or irreversible action cannot be classified from available context.",
|
|
23
|
+
"output": "Output: intent proposal, rationale, confidence, hidden assumptions, required validation, and stop/approval notes."
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "PLANNER",
|
|
3
|
-
"role": "Own the task backlog via agentplane
|
|
4
|
-
"description": "Converts goals into atomic single-owner leaf tasks with
|
|
3
|
+
"role": "Own the task backlog and Verify Steps via agentplane, keeping every approved plan refined into the smallest valid task graph.",
|
|
4
|
+
"description": "Converts goals into atomic single-owner leaf tasks with PLANNER-authored 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
|
-
"planning.constraints": "Optional constraints such as deadlines, priority,
|
|
7
|
+
"planning.constraints": "Optional constraints such as deadlines, priority, components, requested outcome, tags, touched areas, and blueprint summary."
|
|
8
8
|
},
|
|
9
9
|
"outputs": {
|
|
10
|
-
"tasks.updated": "Updated tasks in the canonical backend reflecting priorities and
|
|
10
|
+
"tasks.updated": "Updated tasks in the canonical backend reflecting priorities, statuses, and PLANNER-owned Verify Steps.",
|
|
11
11
|
"backlog.view": "A clear backlog view so humans can review current state quickly.",
|
|
12
12
|
"structured.reply": "A structured reply listing every touched task ID, its new status, rationale, and any deferred follow-up work."
|
|
13
13
|
},
|
|
@@ -15,9 +15,9 @@
|
|
|
15
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
|
-
"goal": "Goal: map an approved objective to the smallest valid executable task graph
|
|
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 `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.",
|
|
18
|
+
"goal": "Goal: map an approved objective to the smallest valid executable task graph and author concrete Verify Steps for each executable leaf from requested outcome, tags, touched areas, and blueprint summary.",
|
|
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; each Verify Steps section is acceptance-oriented, bounded, command-safe, and not merely a weak generic DoD; bookkeeping-only work stays inside the executable leaf.",
|
|
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; deterministic fallback may seed Verify Steps only as a minimal scaffold that PLANNER should replace.",
|
|
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
|
}
|
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "REVIEWER",
|
|
3
|
-
"role": "Review changes for correctness, plan alignment,
|
|
4
|
-
"description": "Reviews change sets against approved scope and verification evidence, separating confirmed defects from plausible risks and open questions.",
|
|
3
|
+
"role": "Review changes for correctness, plan alignment, operational risk, and optional bounded PR summaries before integration or closure.",
|
|
4
|
+
"description": "Reviews change sets against approved scope and verification evidence, separating confirmed defects from plausible risks and open questions. When explicitly requested, writes a bounded reviewer_summary for PR artifacts without replacing canonical template sections.",
|
|
5
5
|
"inputs": {
|
|
6
6
|
"diff.context": "Diff or detailed description of changed files plus relevant command outputs.",
|
|
7
|
-
"task.refs": "Related task IDs."
|
|
7
|
+
"task.refs": "Related task IDs.",
|
|
8
|
+
"pr.evidence": "Task README, diffstat, verification log, and existing PR artifact freshness when reviewer_summary is requested."
|
|
8
9
|
},
|
|
9
10
|
"outputs": {
|
|
10
11
|
"findings.ordered": "Ordered findings covering confirmed defects, plausible risks, and testing gaps.",
|
|
11
12
|
"task.recommendation": "Recommendation per task ID (keep status, mark DONE, or mark BLOCKED) with the reasoning boundary made explicit.",
|
|
12
|
-
"followup.gaps": "Suggested follow-up tasks or checks when gaps remain."
|
|
13
|
+
"followup.gaps": "Suggested follow-up tasks or checks when gaps remain.",
|
|
14
|
+
"reviewer_summary": "Optional short PR reviewer summary grounded only in task README, diffstat, and verify log."
|
|
13
15
|
},
|
|
14
16
|
"permissions": {
|
|
15
17
|
"review.artifacts": "Review workspace artifacts and PR docs; task context via `ap`."
|
|
16
18
|
},
|
|
17
19
|
"workflow": {
|
|
18
|
-
"goal": "Goal: provide an independent risk and defect assessment against approved scope and recorded verification evidence.",
|
|
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 `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.",
|
|
20
|
+
"goal": "Goal: provide an independent risk and defect assessment against approved scope and recorded verification evidence, and optionally provide a bounded reviewer_summary for PR readers.",
|
|
21
|
+
"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; reviewer_summary, when present, is concise, source-grounded, and non-authoritative.",
|
|
22
|
+
"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; do not replace canonical PR sections, freshness checks, validation, or raw evidence with narrative.",
|
|
21
23
|
"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
24
|
"output": "Output: severity-ordered findings, exact references, tests/evidence reviewed, recommendation per task, and open questions that could change the decision."
|
|
23
25
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "UPGRADER",
|
|
3
|
-
"role": "
|
|
4
|
-
"description": "Validates replace-first upgrade results,
|
|
3
|
+
"role": "Validate and finalize framework upgrades after `ap upgrade` without reintroducing stale local drift.",
|
|
4
|
+
"description": "Validates replace-first upgrade results, checks policy and prompt consistency, and preserves only sanctioned local history such as append-only incidents. It does not perform semantic human edits to managed agent files during upgrade.",
|
|
5
5
|
"inputs": {
|
|
6
6
|
"upgrade.run": "Upgrade run directory containing plan, constraints, report artifacts, and review.json when available.",
|
|
7
7
|
"changed.files": "Changed files from files.json or review.json in the upgrade report.",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"terminal.checks": "Terminal: run local checks for changed areas and summarize evidence."
|
|
19
19
|
},
|
|
20
20
|
"workflow": {
|
|
21
|
-
"goal": "Goal:
|
|
21
|
+
"goal": "Goal: validate 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 `ap` for lifecycle and commits; treat managed files as replace-first upgrade outputs;
|
|
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; do not perform semantic rewrites to managed agent files; preserve only sanctioned local user-instructions and append-only incident history.",
|
|
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
|
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: recovery-context
|
|
3
|
+
title: Recovery Context Invariant Review
|
|
4
|
+
version: 1
|
|
5
|
+
status: preview
|
|
6
|
+
profile: EVALUATOR
|
|
7
|
+
tags:
|
|
8
|
+
- recovery
|
|
9
|
+
- invariants
|
|
10
|
+
- concurrency
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Recovery Context Invariant Review
|
|
14
|
+
|
|
15
|
+
Use this evaluator only when the primary implementation path already produced a concrete change or when recovery context is needed after an interruption.
|
|
16
|
+
|
|
17
|
+
## Inputs
|
|
18
|
+
|
|
19
|
+
- Task id, task README, approved plan, and Verify Steps.
|
|
20
|
+
- Current diff or PR patch.
|
|
21
|
+
- Relevant comments, review findings, incidents, and recovery/handoff context.
|
|
22
|
+
- Known concurrent-agent activity and task-artifact drift classification, if present.
|
|
23
|
+
|
|
24
|
+
## Review Procedure
|
|
25
|
+
|
|
26
|
+
1. Reconstruct the intended contract from the task, not from the implementation summary.
|
|
27
|
+
2. Compare the diff against explicit invariants, stop rules, negative cases, and user constraints.
|
|
28
|
+
3. Check whether recovery context changes the interpretation of the task or exposes stale assumptions.
|
|
29
|
+
4. Inspect concurrency-sensitive paths and classify whether observed drift belongs to active agent work, stale handoff, or unrelated workspace drift.
|
|
30
|
+
5. Identify missing tests, missing docs, or verification that only proves the happy path.
|
|
31
|
+
6. Do not execute fixes. Return review findings only.
|
|
32
|
+
|
|
33
|
+
## Output
|
|
34
|
+
|
|
35
|
+
Return a concise structured review:
|
|
36
|
+
|
|
37
|
+
- `verdict`: `pass`, `rework`, or `blocked`.
|
|
38
|
+
- `findings`: ordered by severity, each with file/path evidence and the broken invariant.
|
|
39
|
+
- `missing_tests`: concrete tests or checks that would have caught the issue.
|
|
40
|
+
- `hidden_assumptions`: assumptions the implementation relies on but did not prove.
|
|
41
|
+
- `recovery_context`: what the next agent should know only if normal context is insufficient.
|
|
42
|
+
|
|
43
|
+
## Stop Rules
|
|
44
|
+
|
|
45
|
+
- Use `blocked` when required task context, diff, or recovery context is missing.
|
|
46
|
+
- Use `rework` when behavior diverges from the approved contract even if local checks pass.
|
|
47
|
+
- Use `pass` only when the implementation and verification evidence cover positive, negative, and concurrency-sensitive paths relevant to the task.
|
|
@@ -15,6 +15,13 @@
|
|
|
15
15
|
"merge_strategy": "agent_json_3way",
|
|
16
16
|
"required": true
|
|
17
17
|
},
|
|
18
|
+
{
|
|
19
|
+
"path": ".agentplane/agents/CURATOR.json",
|
|
20
|
+
"source_path": "agents/CURATOR.json",
|
|
21
|
+
"type": "json",
|
|
22
|
+
"merge_strategy": "agent_json_3way",
|
|
23
|
+
"required": true
|
|
24
|
+
},
|
|
18
25
|
{
|
|
19
26
|
"path": ".agentplane/agents/DOCS.json",
|
|
20
27
|
"source_path": "agents/DOCS.json",
|
|
@@ -29,6 +36,20 @@
|
|
|
29
36
|
"merge_strategy": "agent_json_3way",
|
|
30
37
|
"required": true
|
|
31
38
|
},
|
|
39
|
+
{
|
|
40
|
+
"path": ".agentplane/agents/EXTRACTOR.json",
|
|
41
|
+
"source_path": "agents/EXTRACTOR.json",
|
|
42
|
+
"type": "json",
|
|
43
|
+
"merge_strategy": "agent_json_3way",
|
|
44
|
+
"required": true
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"path": ".agentplane/agents/INTAKE.json",
|
|
48
|
+
"source_path": "agents/INTAKE.json",
|
|
49
|
+
"type": "json",
|
|
50
|
+
"merge_strategy": "agent_json_3way",
|
|
51
|
+
"required": true
|
|
52
|
+
},
|
|
32
53
|
{
|
|
33
54
|
"path": ".agentplane/agents/INTEGRATOR.json",
|
|
34
55
|
"source_path": "agents/INTEGRATOR.json",
|
|
@@ -64,13 +85,6 @@
|
|
|
64
85
|
"merge_strategy": "agent_json_3way",
|
|
65
86
|
"required": true
|
|
66
87
|
},
|
|
67
|
-
{
|
|
68
|
-
"path": ".agentplane/agents/SKILL_EXTRACTOR.json",
|
|
69
|
-
"source_path": "agents/SKILL_EXTRACTOR.json",
|
|
70
|
-
"type": "json",
|
|
71
|
-
"merge_strategy": "agent_json_3way",
|
|
72
|
-
"required": true
|
|
73
|
-
},
|
|
74
88
|
{
|
|
75
89
|
"path": ".agentplane/agents/TESTER.json",
|
|
76
90
|
"source_path": "agents/TESTER.json",
|
|
@@ -92,6 +106,13 @@
|
|
|
92
106
|
"merge_strategy": "agent_json_3way",
|
|
93
107
|
"required": true
|
|
94
108
|
},
|
|
109
|
+
{
|
|
110
|
+
"path": ".agentplane/evaluators/recovery-context.md",
|
|
111
|
+
"source_path": "evaluators/recovery-context.md",
|
|
112
|
+
"type": "markdown",
|
|
113
|
+
"merge_strategy": "agents_policy_markdown",
|
|
114
|
+
"required": true
|
|
115
|
+
},
|
|
95
116
|
{
|
|
96
117
|
"path": ".agentplane/policy/check-routing.mjs",
|
|
97
118
|
"source_path": "policy/check-routing.mjs",
|
|
@@ -204,5 +225,11 @@
|
|
|
204
225
|
"merge_strategy": "agents_policy_markdown",
|
|
205
226
|
"required": true
|
|
206
227
|
}
|
|
228
|
+
],
|
|
229
|
+
"removals": [
|
|
230
|
+
{
|
|
231
|
+
"path": ".agentplane/agents/SKILL_EXTRACTOR.json",
|
|
232
|
+
"type": "json"
|
|
233
|
+
}
|
|
207
234
|
]
|
|
208
235
|
}
|
|
@@ -16,8 +16,8 @@ Use this module when `workflow_mode=branch_pr`.
|
|
|
16
16
|
5. Publish/update PR artifacts from the task worktree.
|
|
17
17
|
6. Verify on the task branch.
|
|
18
18
|
7. Queue verified task branches for serialized integration when more than one agent is ready to merge.
|
|
19
|
-
8. CHECKPOINT B:
|
|
20
|
-
9. CHECKPOINT C: finish task
|
|
19
|
+
8. CHECKPOINT B: INTEGRATOR runs integration from the base checkout; protected bases finalize through the task GitHub PR merge, not a direct local base mutation.
|
|
20
|
+
9. CHECKPOINT C: finish/close-tail evidence lands after the task PR merge and hosted close route complete.
|
|
21
21
|
10. Remove merged task branches/worktrees once the hosted-close/finish route has landed.
|
|
22
22
|
|
|
23
23
|
## Related task batch worktrees
|
|
@@ -48,7 +48,7 @@ agentplane pr open <task-id> --branch task/<task-id>/<slug> --author <ROLE>
|
|
|
48
48
|
agentplane pr update <task-id>
|
|
49
49
|
agentplane verify <task-id> --ok|--rework --by <ROLE> --note "..."
|
|
50
50
|
agentplane integrate queue enqueue <task-id> --branch task/<task-id>/<slug>
|
|
51
|
-
agentplane integrate queue run-next --run-verify
|
|
51
|
+
agentplane integrate queue run-next --run-verify --drain --wait --poll-interval-ms 30000 --timeout-ms 600000
|
|
52
52
|
agentplane integrate <task-id> --branch task/<task-id>/<slug> --run-verify
|
|
53
53
|
agentplane finish <task-id> --author INTEGRATOR --body "Verified: ..." --result "..." --commit <git-rev> --close-commit
|
|
54
54
|
```
|
|
@@ -65,8 +65,16 @@ agentplane finish <task-id> --author INTEGRATOR --body "Verified: ..." --result
|
|
|
65
65
|
- A related task batch MAY reuse one primary task worktree when all included tasks are approved,
|
|
66
66
|
listed, verified independently, and merged through the primary task PR.
|
|
67
67
|
- `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.
|
|
68
|
+
- In `branch_pr`, the task GitHub PR is the primary integration mechanism. Local `integrate`
|
|
69
|
+
serializes the lane and drives the provider merge route; it MUST NOT treat GitHub PR merge as an
|
|
70
|
+
exceptional shortcut around local base mutation.
|
|
71
|
+
- If protected `main` requires GitHub PR merges, the agent MUST create/update the GitHub PR,
|
|
72
|
+
wait until all hosted checks are complete and stable (including late agent checks that appear
|
|
73
|
+
after the first green rollup), then merge it through GitHub. If auto-merge remains blocked
|
|
74
|
+
after stable green checks, the agent MUST continue with the permitted GitHub merge route
|
|
75
|
+
available to its credentials instead of stopping at enabled auto-merge.
|
|
68
76
|
- `integrate` defaults to the `merge` strategy so task branch commits stay in base history. Use `--merge-strategy squash` only when intentionally compacting branch history.
|
|
69
|
-
- When several task PRs are ready together, use the integration queue so only one branch owns the merge lane; stale branch heads move to rework instead of blocking later queued work.
|
|
77
|
+
- When several task PRs are ready together, use the integration queue so only one branch owns the merge lane; agents waiting behind `claimed` or `handoff` entries SHOULD use bounded polling (`--wait --poll-interval-ms 30000 --timeout-ms 600000`) instead of retrying ad hoc; stale branch heads move to rework instead of blocking later queued work.
|
|
70
78
|
- `task start-ready` MAY surface targeted incident advice for analogous scope/tags; follow it before widening scope.
|
|
71
79
|
- Keep structured resolved external findings in the task README; mark reusable ones with `Fixability: external` (or `IncidentExternal: true`) and let base-branch `finish` or `agentplane incidents collect <task-id>` promote them into `.agentplane/policy/incidents.md`, using optional `Incident*` fields only when the inferred scope/advice needs refinement. Plain `Findings` text remains task-local and does not update the shared incident registry.
|
|
72
80
|
- MUST stop and request re-approval on material drift.
|
package/bin/agentplane.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { spawnSync } from "node:child_process";
|
|
3
3
|
import { existsSync } from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
5
|
-
import { mkdir, rm, stat } from "node:fs/promises";
|
|
5
|
+
import { mkdir, readFile, rm, stat, writeFile } from "node:fs/promises";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
7
7
|
import { fileURLToPath } from "node:url";
|
|
8
8
|
import { distExists, isPackageBuildFresh } from "./dist-guard.js";
|
|
@@ -202,14 +202,55 @@ async function withBootstrapLock(repoRoot, fn) {
|
|
|
202
202
|
await mkdir(lockDir, { recursive: false });
|
|
203
203
|
} catch (error) {
|
|
204
204
|
if (error?.code !== "EEXIST") throw error;
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
205
|
+
const owner = await (async () => {
|
|
206
|
+
try {
|
|
207
|
+
return JSON.parse(await readFile(path.join(lockDir, "owner.json"), "utf8"));
|
|
208
|
+
} catch {
|
|
209
|
+
return null;
|
|
210
|
+
}
|
|
211
|
+
})();
|
|
212
|
+
if (owner && typeof owner.pid === "number") {
|
|
213
|
+
let alive = true;
|
|
214
|
+
try {
|
|
215
|
+
process.kill(owner.pid, 0);
|
|
216
|
+
} catch (ownerError) {
|
|
217
|
+
alive = ownerError?.code === "EPERM";
|
|
218
|
+
}
|
|
219
|
+
if (alive) {
|
|
220
|
+
process.stderr.write(
|
|
221
|
+
"error: another framework dev bootstrap is already running.\n" +
|
|
222
|
+
`Retry after the lock is released: ${path.relative(repoRoot, lockDir)}\n`,
|
|
223
|
+
);
|
|
224
|
+
process.exitCode = 2;
|
|
225
|
+
return true;
|
|
226
|
+
}
|
|
227
|
+
await rm(lockDir, { recursive: true, force: true });
|
|
228
|
+
await mkdir(lockDir, { recursive: false });
|
|
229
|
+
} else {
|
|
230
|
+
process.stderr.write(
|
|
231
|
+
"error: another framework dev bootstrap is already running.\n" +
|
|
232
|
+
`Retry after the lock is released: ${path.relative(repoRoot, lockDir)}\n`,
|
|
233
|
+
);
|
|
234
|
+
process.exitCode = 2;
|
|
235
|
+
return true;
|
|
236
|
+
}
|
|
211
237
|
}
|
|
212
238
|
|
|
239
|
+
await writeFile(
|
|
240
|
+
path.join(lockDir, "owner.json"),
|
|
241
|
+
JSON.stringify(
|
|
242
|
+
{
|
|
243
|
+
pid: process.pid,
|
|
244
|
+
operation: "agentplane-auto-bootstrap",
|
|
245
|
+
acquired_at: new Date().toISOString(),
|
|
246
|
+
repo_root: repoRoot,
|
|
247
|
+
},
|
|
248
|
+
null,
|
|
249
|
+
2,
|
|
250
|
+
) + "\n",
|
|
251
|
+
"utf8",
|
|
252
|
+
);
|
|
253
|
+
|
|
213
254
|
try {
|
|
214
255
|
return await fn();
|
|
215
256
|
} finally {
|
|
@@ -239,6 +280,12 @@ async function autoBootstrapAndRerun(repoRoot, staleReasons, commandPolicy) {
|
|
|
239
280
|
env: {
|
|
240
281
|
...process.env,
|
|
241
282
|
AGENTPLANE_DEV_AUTO_BOOTSTRAP: "0",
|
|
283
|
+
AGENTPLANE_FRAMEWORK_BUILD_LOCK_PATH: path.join(
|
|
284
|
+
repoRoot,
|
|
285
|
+
".agentplane",
|
|
286
|
+
"cache",
|
|
287
|
+
"framework-dev-bootstrap.lock",
|
|
288
|
+
),
|
|
242
289
|
},
|
|
243
290
|
});
|
|
244
291
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"schema_version": 1,
|
|
3
3
|
"manifest_kind": "package",
|
|
4
4
|
"package_name": "agentplane",
|
|
5
|
-
"package_version": "0.
|
|
6
|
-
"git_head": "
|
|
7
|
-
"watched_runtime_snapshot_hash": "
|
|
5
|
+
"package_version": "0.6.0",
|
|
6
|
+
"git_head": "5210d5e80d61908e7e3100383fc7a6a65fb697e5",
|
|
7
|
+
"watched_runtime_snapshot_hash": "cea114f499ac1d9c6b7a1878e323d6ec16d60042a7a3342d0ae446efb5b26299"
|
|
8
8
|
}
|