agentplane 0.3.10 → 0.3.12
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/assets/AGENTS.md +2 -2
- package/assets/agents/CODER.json +4 -0
- package/assets/agents/CREATOR.json +1 -0
- package/assets/agents/DOCS.json +2 -1
- package/assets/agents/INTEGRATOR.json +2 -1
- package/assets/agents/ORCHESTRATOR.json +2 -0
- package/assets/agents/PLANNER.json +3 -1
- package/assets/agents/REVIEWER.json +1 -0
- package/assets/agents/TESTER.json +2 -2
- package/assets/agents/UPDATER.json +1 -0
- package/assets/agents/UPGRADER.json +1 -1
- package/assets/policy/governance.md +3 -4
- package/assets/policy/incidents.md +20 -88
- package/assets/policy/workflow.branch_pr.md +1 -1
- package/assets/policy/workflow.direct.md +2 -2
- package/bin/agentplane.js +114 -4
- package/bin/runtime-watch.js +1 -0
- package/bin/stale-dist-policy.d.ts +1 -1
- package/bin/stale-dist-policy.js +19 -1
- package/dist/.build-manifest.json +251 -166
- package/dist/cli/bootstrap-guide.d.ts.map +1 -1
- package/dist/cli/bootstrap-guide.js +3 -2
- package/dist/cli/command-guide.d.ts.map +1 -1
- package/dist/cli/command-guide.js +2 -1
- package/dist/cli/command-invocations.d.ts.map +1 -1
- package/dist/cli/command-invocations.js +4 -1
- package/dist/cli/run-cli/command-catalog/core.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog/core.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/core.js +6 -1
- package/dist/cli/run-cli/command-catalog/project.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog/project.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/project.js +3 -1
- package/dist/cli/run-cli/command-catalog/task.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog/task.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/task.js +10 -0
- package/dist/cli/run-cli/command-catalog.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/core/preflight.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/core/preflight.js +44 -1
- package/dist/cli/run-cli.test-helpers.d.ts +1 -0
- package/dist/cli/run-cli.test-helpers.d.ts.map +1 -1
- package/dist/cli/run-cli.test-helpers.js +26 -0
- package/dist/commands/branch/cleanup-merged.d.ts +3 -0
- package/dist/commands/branch/cleanup-merged.d.ts.map +1 -1
- package/dist/commands/branch/cleanup-merged.js +149 -36
- package/dist/commands/branch/work-start.d.ts.map +1 -1
- package/dist/commands/branch/work-start.js +137 -1
- package/dist/commands/cleanup/merged.command.d.ts +2 -0
- package/dist/commands/cleanup/merged.command.d.ts.map +1 -1
- package/dist/commands/cleanup/merged.command.js +24 -0
- package/dist/commands/doctor/branch-pr.d.ts +4 -0
- package/dist/commands/doctor/branch-pr.d.ts.map +1 -0
- package/dist/commands/doctor/branch-pr.js +96 -0
- package/dist/commands/doctor/fixes.d.ts +5 -0
- package/dist/commands/doctor/fixes.d.ts.map +1 -1
- package/dist/commands/doctor/fixes.js +70 -0
- package/dist/commands/doctor.run.d.ts.map +1 -1
- package/dist/commands/doctor.run.js +6 -1
- package/dist/commands/finish.run.d.ts.map +1 -1
- package/dist/commands/finish.run.js +11 -0
- package/dist/commands/finish.spec.d.ts +11 -0
- package/dist/commands/finish.spec.d.ts.map +1 -1
- package/dist/commands/finish.spec.js +51 -0
- package/dist/commands/guard/impl/close-message.d.ts.map +1 -1
- package/dist/commands/guard/impl/close-message.js +23 -6
- package/dist/commands/guard/impl/commands.d.ts +1 -0
- package/dist/commands/guard/impl/commands.d.ts.map +1 -1
- package/dist/commands/guard/impl/commands.js +94 -2
- package/dist/commands/guard/impl/env.d.ts +1 -0
- package/dist/commands/guard/impl/env.d.ts.map +1 -1
- package/dist/commands/guard/impl/env.js +1 -0
- package/dist/commands/hooks/index.d.ts +1 -1
- package/dist/commands/hooks/index.d.ts.map +1 -1
- package/dist/commands/hooks/index.js +139 -6
- package/dist/commands/incidents/collect.command.d.ts.map +1 -1
- package/dist/commands/incidents/collect.command.js +12 -7
- package/dist/commands/incidents/incidents.command.js +1 -1
- package/dist/commands/incidents/shared.d.ts +34 -0
- package/dist/commands/incidents/shared.d.ts.map +1 -1
- package/dist/commands/incidents/shared.js +166 -12
- package/dist/commands/pr/check.d.ts.map +1 -1
- package/dist/commands/pr/check.js +241 -135
- package/dist/commands/pr/close-superseded.d.ts +9 -0
- package/dist/commands/pr/close-superseded.d.ts.map +1 -0
- package/dist/commands/pr/close-superseded.js +129 -0
- package/dist/commands/pr/close.d.ts +11 -0
- package/dist/commands/pr/close.d.ts.map +1 -0
- package/dist/commands/pr/close.js +116 -0
- package/dist/commands/pr/index.d.ts +2 -0
- package/dist/commands/pr/index.d.ts.map +1 -1
- package/dist/commands/pr/index.js +2 -0
- package/dist/commands/pr/integrate/artifacts.d.ts +7 -0
- package/dist/commands/pr/integrate/artifacts.d.ts.map +1 -1
- package/dist/commands/pr/integrate/artifacts.js +66 -1
- package/dist/commands/pr/integrate/cmd.d.ts.map +1 -1
- package/dist/commands/pr/integrate/cmd.js +43 -2
- package/dist/commands/pr/integrate/internal/bootstrap-guidance.d.ts +8 -0
- package/dist/commands/pr/integrate/internal/bootstrap-guidance.d.ts.map +1 -0
- package/dist/commands/pr/integrate/internal/bootstrap-guidance.js +59 -0
- package/dist/commands/pr/integrate/internal/cleanup.d.ts +1 -11
- package/dist/commands/pr/integrate/internal/cleanup.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/cleanup.js +1 -46
- package/dist/commands/pr/integrate/internal/finalize.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/finalize.js +43 -12
- package/dist/commands/pr/integrate/internal/github-protection.d.ts +5 -0
- package/dist/commands/pr/integrate/internal/github-protection.d.ts.map +1 -0
- package/dist/commands/pr/integrate/internal/github-protection.js +13 -0
- package/dist/commands/pr/integrate/internal/merge.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/merge.js +36 -13
- package/dist/commands/pr/integrate/internal/post-integrate-bootstrap.d.ts +13 -0
- package/dist/commands/pr/integrate/internal/post-integrate-bootstrap.d.ts.map +1 -0
- package/dist/commands/pr/integrate/internal/post-integrate-bootstrap.js +25 -0
- package/dist/commands/pr/integrate/internal/pre-integrate-bootstrap.d.ts +15 -0
- package/dist/commands/pr/integrate/internal/pre-integrate-bootstrap.d.ts.map +1 -0
- package/dist/commands/pr/integrate/internal/pre-integrate-bootstrap.js +35 -0
- package/dist/commands/pr/integrate/internal/prepare.d.ts +4 -2
- package/dist/commands/pr/integrate/internal/prepare.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/prepare.js +109 -38
- package/dist/commands/pr/internal/auto-commit.d.ts +7 -0
- package/dist/commands/pr/internal/auto-commit.d.ts.map +1 -0
- package/dist/commands/pr/internal/auto-commit.js +64 -0
- package/dist/commands/pr/internal/freshness.d.ts +21 -0
- package/dist/commands/pr/internal/freshness.d.ts.map +1 -0
- package/dist/commands/pr/internal/freshness.js +52 -0
- package/dist/commands/pr/internal/gh-api.d.ts +6 -0
- package/dist/commands/pr/internal/gh-api.d.ts.map +1 -0
- package/dist/commands/pr/internal/gh-api.js +80 -0
- package/dist/commands/pr/internal/pr-paths.d.ts +10 -0
- package/dist/commands/pr/internal/pr-paths.d.ts.map +1 -1
- package/dist/commands/pr/internal/pr-paths.js +10 -0
- package/dist/commands/pr/internal/review-template.d.ts.map +1 -1
- package/dist/commands/pr/internal/review-template.js +37 -4
- package/dist/commands/pr/internal/sync.d.ts +9 -0
- package/dist/commands/pr/internal/sync.d.ts.map +1 -1
- package/dist/commands/pr/internal/sync.js +531 -124
- package/dist/commands/pr/open.d.ts +1 -0
- package/dist/commands/pr/open.d.ts.map +1 -1
- package/dist/commands/pr/open.js +24 -2
- package/dist/commands/pr/pr.command.d.ts +15 -0
- package/dist/commands/pr/pr.command.d.ts.map +1 -1
- package/dist/commands/pr/pr.command.js +118 -2
- package/dist/commands/pr/update.d.ts.map +1 -1
- package/dist/commands/pr/update.js +71 -2
- package/dist/commands/release/apply.command.d.ts +3 -1
- package/dist/commands/release/apply.command.d.ts.map +1 -1
- package/dist/commands/release/apply.command.js +356 -34
- package/dist/commands/release/apply.mutation.d.ts.map +1 -1
- package/dist/commands/release/apply.mutation.js +1 -0
- package/dist/commands/release/apply.preflight.d.ts.map +1 -1
- package/dist/commands/release/apply.preflight.js +1 -1
- package/dist/commands/release/apply.reporting.d.ts +1 -0
- package/dist/commands/release/apply.reporting.d.ts.map +1 -1
- package/dist/commands/release/apply.reporting.js +12 -8
- package/dist/commands/release/apply.types.d.ts +13 -0
- package/dist/commands/release/apply.types.d.ts.map +1 -1
- package/dist/commands/release/plan.command.d.ts.map +1 -1
- package/dist/commands/release/plan.command.js +48 -0
- package/dist/commands/shared/gh-transport.d.ts +16 -0
- package/dist/commands/shared/gh-transport.d.ts.map +1 -0
- package/dist/commands/shared/gh-transport.js +71 -0
- package/dist/commands/shared/git-diff.d.ts +3 -1
- package/dist/commands/shared/git-diff.d.ts.map +1 -1
- package/dist/commands/shared/git-diff.js +10 -2
- package/dist/commands/shared/git-ops.d.ts +1 -0
- package/dist/commands/shared/git-ops.d.ts.map +1 -1
- package/dist/commands/shared/git-ops.js +15 -0
- package/dist/commands/shared/git-worktree.d.ts +2 -0
- package/dist/commands/shared/git-worktree.d.ts.map +1 -1
- package/dist/commands/shared/git-worktree.js +22 -2
- package/dist/commands/shared/merged-branch-cleanup.d.ts +12 -0
- package/dist/commands/shared/merged-branch-cleanup.d.ts.map +1 -0
- package/dist/commands/shared/merged-branch-cleanup.js +46 -0
- package/dist/commands/shared/post-commit-pr-artifacts.d.ts +9 -0
- package/dist/commands/shared/post-commit-pr-artifacts.d.ts.map +1 -0
- package/dist/commands/shared/post-commit-pr-artifacts.js +57 -0
- package/dist/commands/shared/pr-meta.d.ts +20 -0
- package/dist/commands/shared/pr-meta.d.ts.map +1 -1
- package/dist/commands/shared/pr-meta.js +125 -0
- package/dist/commands/shared/task-backend.d.ts +7 -0
- package/dist/commands/shared/task-backend.d.ts.map +1 -1
- package/dist/commands/shared/task-backend.js +71 -27
- package/dist/commands/shared/task-local-freshness.d.ts +2 -0
- package/dist/commands/shared/task-local-freshness.d.ts.map +1 -1
- package/dist/commands/shared/task-local-freshness.js +7 -1
- package/dist/commands/task/close-duplicate.d.ts.map +1 -1
- package/dist/commands/task/close-duplicate.js +34 -1
- package/dist/commands/task/derive.js +1 -1
- package/dist/commands/task/doc-template.d.ts.map +1 -1
- package/dist/commands/task/doc-template.js +7 -11
- package/dist/commands/task/findings-add.command.d.ts +20 -0
- package/dist/commands/task/findings-add.command.d.ts.map +1 -0
- package/dist/commands/task/findings-add.command.js +165 -0
- package/dist/commands/task/findings.command.d.ts +7 -0
- package/dist/commands/task/findings.command.d.ts.map +1 -0
- package/dist/commands/task/findings.command.js +20 -0
- package/dist/commands/task/findings.d.ts +63 -0
- package/dist/commands/task/findings.d.ts.map +1 -0
- package/dist/commands/task/findings.js +188 -0
- package/dist/commands/task/finish-shared.d.ts +2 -0
- package/dist/commands/task/finish-shared.d.ts.map +1 -1
- package/dist/commands/task/finish-shared.js +56 -1
- package/dist/commands/task/finish.d.ts +10 -0
- package/dist/commands/task/finish.d.ts.map +1 -1
- package/dist/commands/task/finish.js +125 -6
- package/dist/commands/task/hosted-close-pr.command.d.ts +11 -0
- package/dist/commands/task/hosted-close-pr.command.d.ts.map +1 -0
- package/dist/commands/task/hosted-close-pr.command.js +449 -0
- package/dist/commands/task/hosted-close.command.d.ts.map +1 -1
- package/dist/commands/task/hosted-close.command.js +234 -19
- package/dist/commands/task/hosted-merge-sync.d.ts +41 -0
- package/dist/commands/task/hosted-merge-sync.d.ts.map +1 -1
- package/dist/commands/task/hosted-merge-sync.js +291 -17
- package/dist/commands/task/index.d.ts +1 -0
- package/dist/commands/task/index.d.ts.map +1 -1
- package/dist/commands/task/index.js +1 -0
- package/dist/commands/task/new.d.ts +1 -0
- package/dist/commands/task/new.d.ts.map +1 -1
- package/dist/commands/task/new.js +71 -1
- package/dist/commands/task/new.spec.d.ts.map +1 -1
- package/dist/commands/task/new.spec.js +7 -0
- package/dist/commands/task/normalize.command.d.ts +2 -0
- package/dist/commands/task/normalize.command.d.ts.map +1 -1
- package/dist/commands/task/normalize.command.js +45 -0
- package/dist/commands/task/normalize.d.ts +2 -0
- package/dist/commands/task/normalize.d.ts.map +1 -1
- package/dist/commands/task/normalize.js +85 -8
- package/dist/commands/task/plan.d.ts.map +1 -1
- package/dist/commands/task/plan.js +7 -10
- package/dist/commands/task/shared/docs.d.ts +6 -0
- package/dist/commands/task/shared/docs.d.ts.map +1 -1
- package/dist/commands/task/shared/docs.js +14 -0
- package/dist/commands/task/shared/transitions.d.ts.map +1 -1
- package/dist/commands/task/shared/transitions.js +11 -1
- package/dist/commands/task/shared.d.ts +1 -1
- package/dist/commands/task/shared.d.ts.map +1 -1
- package/dist/commands/task/shared.js +1 -1
- package/dist/commands/task/start.d.ts.map +1 -1
- package/dist/commands/task/start.js +7 -10
- package/dist/commands/task/task.command.d.ts.map +1 -1
- package/dist/commands/task/task.command.js +4 -0
- package/dist/commands/task/verify-command-shared.d.ts +19 -0
- package/dist/commands/task/verify-command-shared.d.ts.map +1 -1
- package/dist/commands/task/verify-command-shared.js +152 -1
- package/dist/commands/task/verify-ok.command.d.ts.map +1 -1
- package/dist/commands/task/verify-ok.command.js +15 -2
- package/dist/commands/task/verify-record.d.ts +36 -0
- package/dist/commands/task/verify-record.d.ts.map +1 -1
- package/dist/commands/task/verify-record.js +166 -11
- package/dist/commands/task/verify-rework.command.d.ts.map +1 -1
- package/dist/commands/task/verify-rework.command.js +15 -2
- package/dist/commands/task/verify-show.command.d.ts +1 -1
- package/dist/commands/task/verify-show.command.d.ts.map +1 -1
- package/dist/commands/task/verify-show.command.js +28 -1
- package/dist/commands/verify.run.d.ts.map +1 -1
- package/dist/commands/verify.run.js +12 -0
- package/dist/commands/verify.spec.d.ts +2 -6
- package/dist/commands/verify.spec.d.ts.map +1 -1
- package/dist/commands/verify.spec.js +30 -3
- package/dist/runtime/incidents/index.d.ts +1 -1
- package/dist/runtime/incidents/index.d.ts.map +1 -1
- package/dist/runtime/incidents/resolve.d.ts.map +1 -1
- package/dist/runtime/incidents/resolve.js +319 -73
- package/dist/runtime/incidents/types.d.ts +14 -2
- package/dist/runtime/incidents/types.d.ts.map +1 -1
- package/dist/shared/env.d.ts +1 -0
- package/dist/shared/env.d.ts.map +1 -1
- package/dist/shared/env.js +22 -1
- package/dist/shared/protected-paths.d.ts +1 -1
- package/dist/shared/protected-paths.d.ts.map +1 -1
- package/dist/shared/protected-paths.js +4 -0
- package/package.json +2 -2
package/assets/AGENTS.md
CHANGED
|
@@ -65,7 +65,7 @@ agentplane task new --title "..." --description "..." --priority med --owner <RO
|
|
|
65
65
|
agentplane task plan set <task-id> --text "..." --updated-by <ROLE>
|
|
66
66
|
agentplane task plan approve <task-id> --by ORCHESTRATOR
|
|
67
67
|
agentplane task start-ready <task-id> --author <ROLE> --body "Start: ..."
|
|
68
|
-
agentplane verify <task-id> --ok|--rework --by <ROLE> --note "..."
|
|
68
|
+
agentplane verify <task-id> --ok|--rework --by <ROLE> --note "..." [--observation "..." --impact "..." --resolution "..."] [--local-only]
|
|
69
69
|
agentplane finish <task-id> --author <ROLE> --body "Verified: ..." --result "..." --commit <git-rev>
|
|
70
70
|
```
|
|
71
71
|
|
|
@@ -83,7 +83,7 @@ agentplane finish <task-id> --author INTEGRATOR --body "Verified: ..." --result
|
|
|
83
83
|
|
|
84
84
|
```bash
|
|
85
85
|
agentplane task verify-show <task-id>
|
|
86
|
-
agentplane verify <task-id> --ok|--rework --by <ROLE> --note "..."
|
|
86
|
+
agentplane verify <task-id> --ok|--rework --by <ROLE> --note "..." [--observation "..." --impact "..." --resolution "..."] [--local-only]
|
|
87
87
|
agentplane incidents advise <task-id>
|
|
88
88
|
agentplane incidents collect <task-id> --check
|
|
89
89
|
agentplane doctor
|
package/assets/agents/CODER.json
CHANGED
|
@@ -19,10 +19,14 @@
|
|
|
19
19
|
"workflow": [
|
|
20
20
|
"Follow shared workflow rules in AGENTS.md and `agentplane quickstart` / `agentplane role <ROLE>` output.",
|
|
21
21
|
"Restate the active task scope, target behavior, and any blocking unknowns before editing; inspect the repository first instead of guessing.",
|
|
22
|
+
"State assumptions and ambiguities explicitly; if multiple interpretations or a simpler viable approach exist, say so before editing instead of choosing silently.",
|
|
22
23
|
"Keep diffs minimal, task-scoped, and easy to review; if the root cause or blast radius expands materially, stop and route drift back through ORCHESTRATOR or PLANNER.",
|
|
23
24
|
"Prefer existing patterns, helpers, and tests over new abstractions; explain deliberate deviations rather than silently introducing them.",
|
|
25
|
+
"Do not add speculative features, configurability, abstractions, or impossible-scenario handling beyond the approved task.",
|
|
26
|
+
"Keep changes surgical: touch only files and lines that trace directly to the request, and remove only the unused code your own edits create.",
|
|
24
27
|
"Document edits with exact file paths and concise before/after rationale.",
|
|
25
28
|
"Run the smallest sufficient local commands (tests/linters/formatters) and summarize only the output lines that change a decision.",
|
|
29
|
+
"Turn the task into verifiable goals before coding: prefer a reproducing or acceptance check first, then loop until it passes.",
|
|
26
30
|
"Prefer declared verify commands; treat `Verify Steps` as the acceptance contract and request PLANNER updates when the contract itself drifts.",
|
|
27
31
|
"Record local deviations, follow-ups, and incident candidates in the task-local observation section (`Notes` for v2, `Findings` for v3); use structured `incident-candidate` blocks for external/unfixable-in-repo incidents and let `finish` or `agentplane incidents collect` promote them.",
|
|
28
32
|
"Separate confirmed facts, inferred risks, and open questions in handoff summaries.",
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"workflow": [
|
|
19
19
|
"Follow shared workflow rules in AGENTS.md and `agentplane quickstart` / `agentplane role <ROLE>` output.",
|
|
20
20
|
"Confirm that no existing agent or smaller prompt adjustment cleanly covers the requested specialty; restate the intended capability and decision boundary.",
|
|
21
|
+
"State assumptions and unresolved boundary questions explicitly; prefer the smallest prompt change to an existing role over creating a new agent for speculative flexibility.",
|
|
21
22
|
"Create the new agent JSON with uppercase snake case ID and crisp IO/permissions/workflow that do not overlap existing roles.",
|
|
22
23
|
"Keep the new prompt explicit, minimal, and workflow-compatible with AGENTS.md precedence.",
|
|
23
24
|
"Update AGENTS.md registry guidance as needed and refresh any derived lists per spec.",
|
package/assets/agents/DOCS.json
CHANGED
|
@@ -18,8 +18,9 @@
|
|
|
18
18
|
"workflow": [
|
|
19
19
|
"Follow shared workflow rules in AGENTS.md and `agentplane quickstart` / `agentplane role <ROLE>` output.",
|
|
20
20
|
"Confirm behavior from code, help output, tests, or verification evidence before editing docs; do not document intended behavior as if it already ships.",
|
|
21
|
+
"State any documentation assumptions explicitly; if behavior is ambiguous, stop at the evidence boundary instead of filling the gap with plausible prose.",
|
|
21
22
|
"Create/update task README content via agentplane task doc set; keep the active doc_version contract explicit and treat v3 `Findings` as task-local observation memory, not policy incidents.",
|
|
22
|
-
"Update only the docs surfaces required for the changed behavior and keep wording aligned with gateway/policy/CLI precedence.",
|
|
23
|
+
"Update only the docs surfaces required for the changed behavior and keep wording aligned with gateway/policy/CLI precedence; keep edits surgical and task-scoped.",
|
|
23
24
|
"When generated or mirrored docs exist, update the canonical source or generation path instead of hand-editing downstream artifacts.",
|
|
24
25
|
"Keep PR artifact docs and notes current when required; add handoff notes for INTEGRATOR.",
|
|
25
26
|
"Separate confirmed behavior, known caveats, and deferred follow-up in summaries.",
|
|
@@ -19,10 +19,11 @@
|
|
|
19
19
|
"workflow": [
|
|
20
20
|
"Follow shared workflow rules in AGENTS.md and `agentplane quickstart` / `agentplane role <ROLE>` output.",
|
|
21
21
|
"Operate from the repo root on the pinned base branch; treat integration as a state machine: confirm preconditions -> run pr check -> integrate -> finish via agentplane.",
|
|
22
|
+
"State branch, metadata, and verification assumptions explicitly before mutating base; if they are not satisfied, stop instead of inferring missing state.",
|
|
22
23
|
"Stop on dirty base state, stale PR artifacts, missing verification evidence, or branch/task mismatch; do not paper over inconsistent state.",
|
|
23
24
|
"Use configured base branch and task branch prefix when referencing branches; check config if uncertain.",
|
|
24
25
|
"Ensure verify commands are run/recorded against the declared Verify Steps contract; update PR artifacts and task README findings as needed.",
|
|
25
|
-
"Keep integration writes limited to merge outputs, required verification artifacts, and deterministic closure updates.",
|
|
26
|
+
"Keep integration writes limited to merge outputs, required verification artifacts, and deterministic closure updates; avoid adjacent cleanup that is not directly required by the task state machine.",
|
|
26
27
|
"When closing multiple tasks, use batch finish only when the same verification evidence and commit metadata genuinely apply.",
|
|
27
28
|
"Summaries should distinguish merged commit(s), verification evidence, and any remaining cleanup.",
|
|
28
29
|
"Check `closure_commit_requires_approval` in .agentplane/config.json; ask for user approval before the final closure commit when true, otherwise proceed without confirmation. Optionally clean task branches/worktrees after closure."
|
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
"Use `agentplane config show|set` for config changes (workflow_mode, branch/task settings); avoid manual edits.",
|
|
19
19
|
"Convert the first user message into an execution plan; do not create tasks until the user approves it.",
|
|
20
20
|
"Restate the user goal, constraints, assumptions, and re-approval triggers, then draft a numbered execution plan with agent assignments and expected outcomes.",
|
|
21
|
+
"State assumptions explicitly, surface competing interpretations instead of choosing silently, and prefer the simplest viable plan over speculative flexibility.",
|
|
22
|
+
"Make each plan step goal-driven with a concrete verification check or observable pass condition whenever the repository already has an enforcement surface.",
|
|
21
23
|
"Build a task graph from the approved plan: split into atomic tasks, each with one specific owner from existing agent IDs; schedule CREATOR if a required agent is missing.",
|
|
22
24
|
"When task artifacts are part of scope, keep the active README contract explicit: Verify Steps define acceptance, and task-local observations stay in Notes/Findings rather than policy incidents.",
|
|
23
25
|
"For development work, select the minimal role set needed for risk and workflow mode; do not split work by role labels alone.",
|
|
@@ -19,10 +19,12 @@
|
|
|
19
19
|
"Review the backlog before changes to avoid duplicates or conflicts.",
|
|
20
20
|
"After overall plan approval, create executable tasks directly from the approved task graph plan.",
|
|
21
21
|
"If task graph planning yields exactly one work item, create exactly one task and keep full traceability there.",
|
|
22
|
+
"State planning assumptions explicitly; if scope is ambiguous, resolve that ambiguity before multiplying tasks.",
|
|
23
|
+
"Prefer the smallest task graph that preserves ownership and verification; do not split work for hypothetical future flexibility.",
|
|
22
24
|
"Split goals into atomic tasks only at real deliverable, owner, or dependency boundaries; set depends_on explicitly (use [] for none).",
|
|
23
25
|
"Create tasks with valid parameters: non-empty title/description/owner, at least one meaningful tag, deduped depends_on/verify.",
|
|
24
26
|
"Write titles, descriptions, and Plans as observable work, not implementation poetry.",
|
|
25
|
-
"Treat Verify Steps as concrete acceptance checks; encode uncertainty as explicit scope notes or follow-up tasks
|
|
27
|
+
"Treat Verify Steps as concrete acceptance checks; translate goals into verifiable checks or commands when possible, and encode uncertainty as explicit scope notes or follow-up tasks instead of vague README prose.",
|
|
26
28
|
"Keep task-local observations in Notes/Findings rather than policy incidents.",
|
|
27
29
|
"Before creating a new task, check open tasks (`TODO|DOING|BLOCKED`) and reuse/update a matching task when scope and owner align.",
|
|
28
30
|
"Do not create separate tasks for role handoffs unless there is an independent deliverable, a different required owner, or an explicit dependency boundary.",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"Follow shared workflow rules in AGENTS.md and `agentplane quickstart` / `agentplane role <ROLE>` output.",
|
|
17
17
|
"Review changes against approved scope, changed behavior, and declared verification contract before forming conclusions.",
|
|
18
18
|
"Prioritize confirmed defects first, then plausible risks, then open questions; label uncertainty explicitly.",
|
|
19
|
+
"Flag unnecessary complexity explicitly: speculative flexibility, avoidable abstractions, and scope creep are review defects when they do not serve the approved task.",
|
|
19
20
|
"Prefer PR artifact review when present (README completeness, diffstat, verify log).",
|
|
20
21
|
"Report findings ordered by severity with exact file/line references and concise testing notes.",
|
|
21
22
|
"Focus on regressions, hidden scope expansion, lifecycle drift, and missing evidence rather than style-only commentary.",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"Follow shared workflow rules in AGENTS.md and `agentplane quickstart` / `agentplane role <ROLE>` output.",
|
|
21
21
|
"Restate the behavior under test, the declared acceptance contract, and the likely regression surface before adding tests or running checks.",
|
|
22
22
|
"Identify existing test tooling and reuse it; do not add new frameworks unless requested.",
|
|
23
|
-
"Add the smallest set of high-value tests that distinguishes working behavior from the most likely failure modes.",
|
|
23
|
+
"Add the smallest set of high-value tests that distinguishes working behavior from the most likely failure modes; prefer the narrowest reproducer or acceptance check first.",
|
|
24
24
|
"Keep tests deterministic and fast; avoid network calls and time-based flakiness.",
|
|
25
|
-
"If behavior
|
|
25
|
+
"If behavior or success criteria are ambiguous, escalate instead of encoding guesses into tests.",
|
|
26
26
|
"Run targeted tests first and summarize only the key output lines.",
|
|
27
27
|
"Check results against `Verify Steps` as the acceptance contract, not just against ad-hoc commands.",
|
|
28
28
|
"Record residual gaps in the task-local observation section (`Notes` for v2, `Findings` for v3) rather than escalating them directly into policy incidents.",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"Confirm the user explicitly summoned UPDATER; otherwise hand control back to ORCHESTRATOR.",
|
|
20
20
|
"Audit AGENTS.md and .agentplane/agents/*.json plus relevant repo files, citing exact paths.",
|
|
21
21
|
"Distinguish correctness issues, ambiguity/UX friction, and structural overlap; prioritize by blast radius and recurrence risk.",
|
|
22
|
+
"State assumptions, tradeoffs, and the simplest effective change before recommending broader prompt or workflow rewrites.",
|
|
22
23
|
"Recommend the smallest prompt/system changes that improve behavior; avoid broad rewrites without evidence.",
|
|
23
24
|
"Return a prioritized optimization plan and any required validation commands."
|
|
24
25
|
]
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"Follow shared workflow rules in AGENTS.md and `agentplane quickstart` / `agentplane role <ROLE>` output.",
|
|
22
22
|
"Treat `AGENTS.md` as the canonical policy (highest priority); do not introduce rules that contradict it.",
|
|
23
23
|
"Load the upgrade run artifacts (runDir) and inspect changed files from `files.json` / `review.json` before editing anything.",
|
|
24
|
-
"Treat managed files as replace-first outputs from upgrade; do not re-introduce manual merge paths.",
|
|
24
|
+
"Treat managed files as replace-first outputs from upgrade; do not re-introduce manual merge paths or speculative prompt rewrites beyond what the contract requires.",
|
|
25
25
|
"For `.agentplane/policy/incidents.md`, ensure local history is append-only and not overwritten.",
|
|
26
26
|
"Reconcile `.agentplane/agents/*.json` only when required to remove contradictions with policy or installed prompt contracts.",
|
|
27
27
|
"Stop and report when upgrade output conflicts with current enforcement, generated artifacts, or the installed agent contract.",
|
|
@@ -6,15 +6,14 @@
|
|
|
6
6
|
- Incident-derived and situational rules MUST be added only to `incidents.md`.
|
|
7
7
|
- MUST NOT create additional incident policy files under `.agentplane/policy/`.
|
|
8
8
|
- New reusable operational incidents SHOULD be promoted from task `Findings` via `agentplane finish` or `agentplane incidents collect <task-id>`.
|
|
9
|
-
- Auto-promotion is reserved for
|
|
9
|
+
- Auto-promotion is reserved for resolved reusable findings marked `Fixability: external` or `Fixability: repo-fixable` (or the compatibility markers `IncidentExternal: true` / `IncidentInternal: true`); optional `IncidentScope`, `IncidentAdvice`, `IncidentRule`, `IncidentTags`, and `IncidentMatch` fields override the inferred registry entry when needed.
|
|
10
10
|
- Normal startup MUST NOT bulk-load `incidents.md`; targeted lookup for analogous work is allowed through `task start-ready` and `agentplane incidents advise`.
|
|
11
11
|
|
|
12
12
|
## Stabilization criteria
|
|
13
13
|
|
|
14
|
-
Use `stabilized` only when
|
|
14
|
+
Use `stabilized` only when the same failure class recurs at least 2 times in 30 days.
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
2. A single Sev-1 / production-blocking failure has reproducible steps and evidence.
|
|
16
|
+
First auto-promoted external incidents may stay `open`, but targeted advice lookup is still allowed to use them so analogous work can reuse the recovery guidance before the second recurrence.
|
|
18
17
|
|
|
19
18
|
Promotion from `incidents.md` into canonical policy modules is allowed only when:
|
|
20
19
|
|
|
@@ -1,90 +1,22 @@
|
|
|
1
1
|
# Policy Incidents Log
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
- id:
|
|
17
|
-
- date:
|
|
18
|
-
- scope:
|
|
19
|
-
- tags:
|
|
20
|
-
- match:
|
|
21
|
-
-
|
|
22
|
-
- advice:
|
|
23
|
-
- rule: `<new or refined MUST/MUST NOT>`
|
|
24
|
-
- evidence: `<task ids / logs / links>`
|
|
25
|
-
- enforcement: `<CI|test|lint|script|manual>`
|
|
26
|
-
- source_task: `<task id>`
|
|
27
|
-
- fixability: `<external>`
|
|
28
|
-
- state: `<open|stabilized|promoted>`
|
|
29
|
-
|
|
30
|
-
## Entries
|
|
31
|
-
|
|
32
|
-
- id: INC-20260308-01
|
|
33
|
-
date: 2026-03-08
|
|
34
|
-
scope: release apply internal push path
|
|
35
|
-
tags: release, git, hooks
|
|
36
|
-
match: release, push, pre-push, hooks
|
|
37
|
-
failure: release apply re-entered local pre-push hooks and could stall after creating the local release commit and tag
|
|
38
|
-
advice: keep release ref pushes inside the release orchestrator path and avoid recursively re-entering local pre-push hooks
|
|
39
|
-
rule: Release orchestration MUST push its own release refs without recursively re-entering local pre-push hooks.
|
|
40
|
-
evidence: task 202603061532-9Y41NM; docs/developer/cli-bug-ledger-v0-3-x.mdx entry 4
|
|
41
|
-
enforcement: test + command implementation
|
|
42
|
-
state: stabilized
|
|
43
|
-
|
|
44
|
-
- id: INC-20260308-02
|
|
45
|
-
date: 2026-03-08
|
|
46
|
-
scope: stale-dist guard in framework checkout
|
|
47
|
-
tags: runtime, framework, diagnostics
|
|
48
|
-
match: stale-dist, runtime, dirty-tree, diagnostics
|
|
49
|
-
failure: stale-dist enforcement treated git dirtiness as stale runtime and blocked diagnostics or rebuilt checkouts incorrectly
|
|
50
|
-
advice: compare stale-dist state against recorded build snapshots and let read-only diagnostics warn instead of hard-failing on dirty runtime trees
|
|
51
|
-
rule: Stale-dist freshness MUST compare current runtime inputs against the recorded build snapshot, and read-only diagnostics MUST warn-and-run instead of hard-failing on dirty runtime trees.
|
|
52
|
-
evidence: tasks 202603072032-2M0V8V, 202603072032-1BC7VQ, 202603072032-V9VGT2, 202603072032-4D9ASG
|
|
53
|
-
enforcement: test + runtime guard
|
|
54
|
-
state: stabilized
|
|
55
|
-
|
|
56
|
-
- id: INC-20260308-03
|
|
57
|
-
date: 2026-03-08
|
|
58
|
-
scope: framework checkout PATH resolution
|
|
59
|
-
tags: runtime, framework, cli
|
|
60
|
-
match: path, runtime, handoff, global-cli
|
|
61
|
-
failure: contributors inside the framework repo could execute an older global agentplane binary instead of the checkout they were editing
|
|
62
|
-
advice: verify the active runtime inside the framework checkout and keep PATH handoff repo-local by default unless a deliberate global override is set
|
|
63
|
-
rule: Inside the framework checkout, agentplane resolved from PATH MUST hand off to the repo-local runtime by default unless an explicit global opt-out is set.
|
|
64
|
-
evidence: tasks 202603071647-M0Q79C, 202603071647-Y4BZ1T, 202603071647-25WS52
|
|
65
|
-
enforcement: test + wrapper logic
|
|
66
|
-
state: stabilized
|
|
67
|
-
|
|
68
|
-
- id: INC-20260308-04
|
|
69
|
-
date: 2026-03-08
|
|
70
|
-
scope: release mutation generated surfaces
|
|
71
|
-
tags: release, docs, generated
|
|
72
|
-
match: release, generated-docs, versioned-docs
|
|
73
|
-
failure: release apply could leave version-sensitive generated docs stale until later parity checks failed
|
|
74
|
-
advice: regenerate version-sensitive generated docs inside the release mutation itself instead of deferring them to later parity checks
|
|
75
|
-
rule: Release mutation MUST regenerate and stage generated docs that encode released package versions as part of the release commit itself.
|
|
76
|
-
evidence: task 202603071745-T3QE04; docs/developer/cli-bug-ledger-v0-3-x.mdx entry 5
|
|
77
|
-
enforcement: test + release mutation
|
|
78
|
-
state: stabilized
|
|
79
|
-
|
|
80
|
-
- id: INC-20260308-05
|
|
81
|
-
date: 2026-03-08
|
|
82
|
-
scope: release mutation repository CLI expectation
|
|
83
|
-
tags: release, cli, config
|
|
84
|
-
match: release, expected-version, config
|
|
85
|
-
failure: repository-owned framework.cli.expected_version could drift behind the actual released version because release apply did not persist it
|
|
86
|
-
advice: keep repository CLI expectation aligned with the released package version whenever release mutation touches repository config
|
|
87
|
-
rule: Release mutation MUST keep framework.cli.expected_version aligned with the released package version whenever repository config is present.
|
|
88
|
-
evidence: tasks 202603081315-Y4D6AE, 202603081538-GF7P9C; docs/developer/cli-bug-ledger-v0-3-x.mdx entry 3
|
|
89
|
-
enforcement: test + release mutation
|
|
90
|
-
state: stabilized
|
|
3
|
+
- Append-only. Required fields: `id`, `date`, `scope`, `failure`, `rule`, `evidence`, `enforcement`, `state`; optional: `tags`, `match`, `advice`, `source_task`, `fixability`.
|
|
4
|
+
- id: INC-20260308-01 | date: 2026-03-08 | scope: release apply internal push path | failure: release apply re-entered local pre-push hooks and could stall after creating the local release commit and tag | rule: Release orchestration MUST push its own release refs without recursively re-entering local pre-push hooks. | evidence: task 202603061532-9Y41NM; docs/developer/cli-bug-ledger-v0-3-x.mdx entry 4 | enforcement: test + command implementation | state: stabilized
|
|
5
|
+
- id: INC-20260308-02 | date: 2026-03-08 | scope: stale-dist guard in framework checkout | failure: stale-dist enforcement treated git dirtiness as stale runtime and blocked diagnostics or rebuilt checkouts incorrectly | rule: Stale-dist freshness MUST compare current runtime inputs against the recorded build snapshot, and read-only diagnostics MUST warn-and-run instead of hard-failing on dirty runtime trees. | evidence: tasks 202603072032-2M0V8V, 202603072032-1BC7VQ, 202603072032-V9VGT2, 202603072032-4D9ASG | enforcement: test + runtime guard | state: stabilized
|
|
6
|
+
- id: INC-20260308-03 | date: 2026-03-08 | scope: framework checkout PATH resolution | failure: contributors inside the framework repo could execute an older global agentplane binary instead of the checkout they were editing | rule: Inside the framework checkout, agentplane resolved from PATH MUST hand off to the repo-local runtime by default unless an explicit global opt-out is set. | evidence: tasks 202603071647-M0Q79C, 202603071647-Y4BZ1T, 202603071647-25WS52 | enforcement: test + wrapper logic | state: stabilized
|
|
7
|
+
- id: INC-20260308-04 | date: 2026-03-08 | scope: release mutation generated surfaces | failure: release apply could leave version-sensitive generated docs stale until later parity checks failed | rule: Release mutation MUST regenerate and stage generated docs that encode released package versions as part of the release commit itself. | evidence: task 202603071745-T3QE04; docs/developer/cli-bug-ledger-v0-3-x.mdx entry 5 | enforcement: test + release mutation | state: stabilized
|
|
8
|
+
- id: INC-20260308-05 | date: 2026-03-08 | scope: release mutation repository CLI expectation | failure: repository-owned framework.cli.expected_version could drift behind the actual released version because release apply did not persist it | rule: Release mutation MUST keep framework.cli.expected_version aligned with the released package version whenever repository config is present. | evidence: tasks 202603081315-Y4D6AE, 202603081538-GF7P9C; docs/developer/cli-bug-ledger-v0-3-x.mdx entry 3 | enforcement: test + release mutation | state: stabilized
|
|
9
|
+
- id: INC-20260407-01 | date: 2026-04-07 | scope: branch_pr GitHub transport helpers | failure: GitHub transport intermittently failed with GraphQL EOF, TLS handshake errors, and SSL_ERROR_SYSCALL during PR creation, remote-check waiting, and reconcile helpers | advice: treat transient GitHub transport failures as retriable, prefer bounded polling or REST fallbacks over single-shot watch flows, and surface auth or usage failures immediately | rule: GitHub-dependent workflow helpers MUST classify EOF/TLS/SSL transport failures as transient and retry with bounded backoff; they MUST surface auth and usage failures immediately instead of looping or failing opaquely. | evidence: tasks 202604062101-XYXG7Y, 202604062309-QE4CX6, 202604050745-18JJ5E | enforcement: test + workflow helper | state: open
|
|
10
|
+
- id: INC-20260407-02 | date: 2026-04-07 | scope: protected-main branch_pr closure permissions | failure: hosted branch_pr closure could not create follow-up PRs when the GitHub App or Actions token lacked PR creation rights, leaving manual closure tails after the task PR was already merged | advice: preserve deterministic closure metadata in task artifacts and complete the closure PR from an authenticated local session when hosted automation lacks create-PR permission | rule: Protected-main branch_pr closure MUST preserve enough task metadata for deterministic manual reconciliation when hosted automation cannot create the closure PR due to external GitHub permission limits. | evidence: tasks 202604032235-G375FB, 202604050745-18JJ5E, 202604062153-RSJFC2 | enforcement: manual + workflow | state: open
|
|
11
|
+
- id: INC-20260407-03 | date: 2026-04-07 | scope: task findings incident promotion | failure: Structured findings needed hidden promote/external flags before incidents collection could see them. | advice: Use task findings add defaults for reusable incident candidates; use --local-only only for task-scoped notes. | rule: Structured findings intended as reusable workflow advice MUST promote by default; task-local-only notes MUST opt out explicitly with --local-only. | evidence: task 202604070754-ZD0ZAZ | enforcement: manual | state: open
|
|
12
|
+
- id: INC-20260407-04 | date: 2026-04-07 | scope: task normalize hosted reconcile target selection | failure: GitHub EOF or TLS transport failures during hosted branch_pr reconcile could abort task normalize before it reached the known stale task because the command scanned every candidate task. | advice: When GitHub transport is flaky, reconcile only the known task ids instead of scanning the full branch_pr history. | rule: Hosted reconcile commands MUST support explicit task-id scoping so known drift can be resolved without depending on unrelated GitHub lookups. | evidence: task 202604071853-XGX2YJ; commit 5fd312cceb20 | enforcement: manual | state: open
|
|
13
|
+
- id: INC-20260409-01 | date: 2026-04-09 | scope: branch_pr work-start base task README cleanup | failure: work start --worktree left untracked .agentplane/tasks/<task-id>/README.md copies in the base checkout and later git pull could block once upstream tracked the same paths | rule: branch_pr work start MUST remove base-checkout task README copies that were only materialized for the worktree, while keeping the worktree-local copies intact. | evidence: task 202604081931-77V6J5 | enforcement: test + command implementation | state: stabilized
|
|
14
|
+
- id: INC-20260409-02 | date: 2026-04-09 | scope: branch_pr follow-up orchestration helpers | match: branch_pr, integrate, pr artifacts, pr meta, wait-remote-checks, remote checks, multi pr | failure: integrate recovery assumed PR artifacts already existed and the remote-check wait helper only accepted one PR target, forcing manual base-side hydration and serial closure-wave waiting. | advice: keep integrate able to recover PR metadata without a pre-hydrated base checkout and let remote-check waiting accept explicit PR batches during closure waves. | rule: branch_pr follow-up helpers MUST recover missing PR artifacts from available branch or hosted metadata and MUST accept explicit multi-PR batches so integrate and remote-check waiting stay runnable during closure waves. | evidence: tasks 202604091136-SR7Z25, 202604091136-V5N3P8; fixes 202604091218-WWSX2G, 202604091218-8S07FZ | enforcement: test + command implementation | state: open
|
|
15
|
+
- id: INC-20260409-03 | date: 2026-04-09 | scope: Make branch_pr hosted-merge reconcile and task normalize resolve GitHub auth from the user's existing gh login, without requiring a manual GH_TOKEN export in the shell. | tags: code, github, workflow | match: code, github, workflow, make, branch, hosted, merge, reconcile, and, task, normalize, resolve, auth, from, the, user | failure: Repo dotenv loading could inject GITHUB_TOKEN into gh subprocesses and override a valid gh keyring session during hosted merge sync. | advice: Track auth vars loaded only from repo dotenv and strip them from gh child env, while preserving explicit shell or CI auth tokens and HOME-based gh sessions. | rule: Analogous Make branch_pr hosted-merge reconcile and task normalize resolve GitHub auth from the user's existing gh login, without requiring a manual GH_TOKEN export in the shell. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604091841-2ZX1MQ; commit 3f71884dad3e | enforcement: manual | fixability: external | state: open
|
|
16
|
+
- id: INC-20260409-04 | date: 2026-04-09 | scope: Make merged branch_pr tasks land in tracked main history as DONE with reconciled PR metadata, so pulling origin/main does not reopen them as DOING or require local normalize dirt. | tags: code, tasks, workflow | match: code, tasks, workflow, make, merged, branch, land, tracked, main, history, done, with, reconciled, metadata, pulling, origin | failure: Hosted-close recovery had to be driven one task at a time even when multiple remote task-close branches were already waiting, so merged tasks stayed DOING on main longer than necessary. | advice: Allow task hosted-close-pr to accept multiple task ids in one invocation so closure PR batches can be materialized deterministically from the existing remote task-close branches. | rule: Analogous Make merged branch_pr tasks land in tracked main history as DONE with reconciled PR metadata, so pulling origin/main does not reopen them as DOING or require local normalize dirt. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604091841-PX5WAV | enforcement: manual | fixability: external | state: open
|
|
17
|
+
- id: INC-20260409-05 | date: 2026-04-09 | scope: branch_pr verify/finish incident no-op messaging | tags: incidents, workflow, ux | match: incidents, workflow, ux, branch, verify, finish, incident, messaging, explain, registry, outcome, explicitly, and, operators, still, misread | failure: Lifecycle no-op output for verify and finish looked indistinguishable from a broken incidents pipeline, so operators could not tell when incidents.md stayed unchanged only because the note/body was plain text. | advice: Print context-specific verify and finish messages that explicitly name incidents.md, explain that plain notes stay task-local, and point operators at observation/impact/resolution fields or explicit collection on base. | rule: Analogous branch_pr verify/finish incident no-op messaging work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604092105-RF8TWW | enforcement: manual | fixability: repo-fixable | state: open
|
|
18
|
+
- id: INC-20260410-01 | date: 2026-04-10 | scope: Preflight hides cross-task workflow artifact drift when tracked status looks clean. | tags: workflow, git, ux, code | match: workflow, git, ux, code, preflight, hides, cross, task, artifact, drift, when, tracked, status, looks, clean, expose | failure: Preflight could report a tracked-clean working tree while untracked .agentplane/tasks artifacts from other task ids were still present and capable of breaking later integrate or close flows. | advice: Preflight now inspects full changed paths under the workflow task directory, reports task artifact drift explicitly in JSON/text output, and points operators at git status --short --untracked-files=all -- .agentplane/tasks. | rule: Analogous Preflight hides cross-task workflow artifact drift when tracked status looks clean. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604100023-MFGFK9; commit a2b9ccf1e12e | enforcement: manual | fixability: repo-fixable | state: open
|
|
19
|
+
- id: INC-20260410-02 | date: 2026-04-10 | scope: Integrate leaves framework runtime stale after watched-source merges. | tags: workflow, runtime, git, code | match: workflow, runtime, git, code, integrate, leaves, framework, stale, after, watched, source, merges, auto, bootstrap, touches, sources | failure: Base-side integrate could land watched runtime source changes in the framework checkout, but the repo-local runtime stayed stale until the operator manually ran framework bootstrap before finish closeout. | advice: Integrate now auto-runs bun run framework:dev:bootstrap in framework checkouts when watched runtime sources changed, and falls back to explicit manual guidance only if the refresh fails. | rule: Analogous Integrate leaves framework runtime stale after watched-source merges. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604100023-EVJWDM; commit 0f4d2f9a92e0 | enforcement: manual | fixability: repo-fixable | state: open
|
|
20
|
+
- id: INC-20260410-03 | date: 2026-04-10 | scope: Integrate currently can apply task code onto the base branch and only then discover that the task branch never committed .agentplane/tasks/<task-id>/pr artifacts. Validate the branch-backed task/PR artifact set before any merge-side mutation so base never advances when closeout metadata is absent. | tags: code, workflow | match: code, workflow, integrate, currently, can, apply, task, onto, the, base, branch, and, only, then, discover, that | failure: Integrate validated task/PR metadata too late: a task branch could omit committed .agentplane/tasks/<task-id>/pr artifacts and still reach merge-side mutation before failing. | advice: Added committed-artifact validation before merge-side mutation, covered the missing-artifact and post-merge-removal regressions, and updated prepare.test mocks for the new contract. | rule: Analogous Integrate currently can apply task code onto the base branch and only then discover that the task branch never committed .agentplane/tasks/<task-id>/pr artifacts. Validate the branch-backed task/PR artifact set before any merge-side mutation so base never advances when closeout metadata is absent. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604100213-MVAGSD | enforcement: manual | fixability: external | state: open
|
|
21
|
+
- id: INC-20260410-04 | date: 2026-04-10 | scope: Verify-required task scaffolds currently seed a placeholder Verify Steps block that immediately fails plan approval. Generate concrete acceptance steps from the primary tag and any explicit verify commands so a freshly scaffolded task is reviewable without manual README surgery. | tags: code, workflow | match: code, workflow, verify, required, task, scaffolds, currently, seed, placeholder, steps, block, that, immediately, fails, plan, approval | failure: Verify-required task scaffolds could seed a placeholder Verify Steps block when no explicit verify command was supplied, so plan approval failed on a fresh task before any human refinement. | advice: Removed the placeholder path for verify-required scaffolds without explicit verify commands, updated warning text to reflect concrete seeded acceptance steps, and added regression coverage for task new, task derive, and plan approve. | rule: Analogous Verify-required task scaffolds currently seed a placeholder Verify Steps block that immediately fails plan approval. Generate concrete acceptance steps from the primary tag and any explicit verify commands so a freshly scaffolded task is reviewable without manual README surgery. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604100213-1AAPW1 | enforcement: manual | fixability: external | state: open
|
|
22
|
+
- id: INC-20260410-05 | date: 2026-04-10 | scope: Generate the next patch release plan from v0.3.10, draft release notes, prepare a release candidate branch/PR, and reconcile the current mismatch between release apply --push and the protected-main publish route before any irreversible release action. | tags: release | match: release, generate, the, next, patch, plan, from, draft, notes, prepare, candidate, branch, and, reconcile, current, mismatch | failure: Protected-main publication remains intentionally deferred because agentplane release apply --push --yes still assumes a direct push/tag route while this repository publishes via main-driven automation. | advice: Push the release branch, review the candidate, and confirm a protected-main-safe publish path before running the final release apply/tag flow. | rule: Analogous Generate the next patch release plan from v0.3.10, draft release notes, prepare a release candidate branch/PR, and reconcile the current mismatch between release apply --push and the protected-main publish route before any irreversible release action. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604101009-36KKA9 | enforcement: manual | fixability: external | state: open
|
|
@@ -30,7 +30,7 @@ agentplane finish <task-id> --author INTEGRATOR --body "Verified: ..." --result
|
|
|
30
30
|
- Task documentation updates MAY be batched within one turn before approval.
|
|
31
31
|
- MUST run `task plan approve` then `task start-ready` as `Step 1 -> wait -> Step 2` (never parallel).
|
|
32
32
|
- `task start-ready` MAY surface targeted incident advice for analogous scope/tags; follow it before widening scope.
|
|
33
|
-
- Keep structured external
|
|
33
|
+
- 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.
|
|
34
34
|
- MUST stop and request re-approval on material drift.
|
|
35
35
|
- Planning and closure happen on base checkout.
|
|
36
36
|
- Do not export task snapshots from task branches.
|
|
@@ -38,7 +38,7 @@ If any step fails:
|
|
|
38
38
|
- `doc_version=3`: task `Findings`
|
|
39
39
|
3. Mark task blocked: `agentplane block <task-id> --author <ROLE> --body "Blocked: ..."`.
|
|
40
40
|
4. Request re-approval before scope/risk changes.
|
|
41
|
-
5. If failure is external/process-related and should become reusable advice, record a structured `
|
|
41
|
+
5. If failure is external/process-related and should become reusable advice, record a structured `Observation` / `Impact` / `Resolution` block in `Findings` and mark it with `Fixability: external` (or `IncidentExternal: true`); plain prose in `Findings` stays task-local and does not update `.agentplane/policy/incidents.md`.
|
|
42
42
|
|
|
43
43
|
## Constraints
|
|
44
44
|
|
|
@@ -47,7 +47,7 @@ If any step fails:
|
|
|
47
47
|
- MUST run `task plan approve` then `task start-ready` as `Step 1 -> wait -> Step 2` (never parallel).
|
|
48
48
|
- `task start-ready` MAY surface targeted incident advice for analogous scope/tags; follow it before widening scope.
|
|
49
49
|
- In direct mode, `finish` auto-creates the deterministic close commit by default; use `--no-close-commit` only for explicit manual handling.
|
|
50
|
-
- `finish` evaluates structured external
|
|
50
|
+
- `finish` evaluates structured resolved external findings, auto-derives incident advice when only `Observation` / `Impact` / `Resolution` plus `Fixability: external` are present, and appends valid entries to `.agentplane/policy/incidents.md`; plain `Findings` text remains task-local.
|
|
51
51
|
- MUST stop and request re-approval on material drift.
|
|
52
52
|
- Do not use worktrees in direct mode.
|
|
53
53
|
- Do not perform `branch_pr`-only operations.
|
package/bin/agentplane.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { spawnSync } from "node:child_process";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { stat } from "node:fs/promises";
|
|
5
|
+
import { createRequire } from "node:module";
|
|
5
6
|
import { fileURLToPath } from "node:url";
|
|
6
7
|
import { distExists, isPackageBuildFresh } from "./dist-guard.js";
|
|
7
8
|
import {
|
|
@@ -25,7 +26,17 @@ async function exists(p) {
|
|
|
25
26
|
async function maybeWarnGlobalBinaryInRepoCheckout() {
|
|
26
27
|
const thisBin = fileURLToPath(import.meta.url);
|
|
27
28
|
const context = resolveFrameworkBinaryContext({ cwd: process.cwd(), thisBin });
|
|
28
|
-
|
|
29
|
+
const currentBinaryContext = resolveFrameworkBinaryContext({
|
|
30
|
+
cwd: path.dirname(thisBin),
|
|
31
|
+
thisBin,
|
|
32
|
+
});
|
|
33
|
+
if (
|
|
34
|
+
!context.inFrameworkCheckout ||
|
|
35
|
+
context.isRepoLocalBinary ||
|
|
36
|
+
context.isRepoLocalRuntime ||
|
|
37
|
+
currentBinaryContext.isRepoLocalRuntime
|
|
38
|
+
)
|
|
39
|
+
return;
|
|
29
40
|
|
|
30
41
|
const normalizedThis = path.resolve(thisBin);
|
|
31
42
|
const normalizedRepo = path.resolve(context.checkout.repoBin);
|
|
@@ -101,7 +112,21 @@ function handoffToRepoLocalBinary(context) {
|
|
|
101
112
|
return true;
|
|
102
113
|
}
|
|
103
114
|
|
|
104
|
-
function
|
|
115
|
+
async function repoLocalRuntimeReady(repoBin) {
|
|
116
|
+
if (!repoBin) return false;
|
|
117
|
+
const agentplaneRoot = path.resolve(path.dirname(repoBin), "..");
|
|
118
|
+
if (!(await distExists(agentplaneRoot))) return false;
|
|
119
|
+
return missingRepoRuntimeDependencies(agentplaneRoot).length === 0;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function resolveCurrentBinaryFrameworkContext(thisBin) {
|
|
123
|
+
return resolveFrameworkBinaryContext({
|
|
124
|
+
cwd: path.dirname(thisBin),
|
|
125
|
+
thisBin,
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
async function maybeHandoffToRepoLocalBinary() {
|
|
105
130
|
if (shouldUseGlobalBinaryInFramework() || isRepoLocalHandoffInvocation()) return false;
|
|
106
131
|
|
|
107
132
|
const context = resolveFrameworkBinaryContext({
|
|
@@ -110,6 +135,37 @@ function maybeHandoffToRepoLocalBinary() {
|
|
|
110
135
|
});
|
|
111
136
|
if (!context.inFrameworkCheckout || context.isRepoLocalBinary) return false;
|
|
112
137
|
|
|
138
|
+
if (!(await repoLocalRuntimeReady(context.checkout?.repoBin ?? ""))) {
|
|
139
|
+
const currentBinaryContext = resolveCurrentBinaryFrameworkContext(context.thisBin);
|
|
140
|
+
const canStayOnCurrentRepoLocalBinary =
|
|
141
|
+
currentBinaryContext.inFrameworkCheckout &&
|
|
142
|
+
currentBinaryContext.isRepoLocalRuntime &&
|
|
143
|
+
currentBinaryContext.checkout?.repoRoot !== context.checkout?.repoRoot;
|
|
144
|
+
if (canStayOnCurrentRepoLocalBinary) {
|
|
145
|
+
process.stderr.write(
|
|
146
|
+
"warning: target framework checkout repo-local runtime is not bootstrapped; " +
|
|
147
|
+
`staying on current repo-local binary: ${context.thisBin}\n` +
|
|
148
|
+
`unbootstrapped checkout binary: ${context.checkout?.repoBin ?? "<missing>"}\n` +
|
|
149
|
+
`fix target checkout with: ${FRAMEWORK_DEV_BOOTSTRAP_COMMAND}\n`,
|
|
150
|
+
);
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
const canStayOnCurrentInstalledBinary =
|
|
155
|
+
!currentBinaryContext.inFrameworkCheckout &&
|
|
156
|
+
!currentBinaryContext.isRepoLocalBinary &&
|
|
157
|
+
!currentBinaryContext.isRepoLocalRuntime;
|
|
158
|
+
if (canStayOnCurrentInstalledBinary) {
|
|
159
|
+
process.stderr.write(
|
|
160
|
+
"warning: target framework checkout repo-local runtime is not bootstrapped; " +
|
|
161
|
+
`staying on current installed binary: ${context.thisBin}\n` +
|
|
162
|
+
`unbootstrapped checkout binary: ${context.checkout?.repoBin ?? "<missing>"}\n` +
|
|
163
|
+
`fix target checkout with: ${FRAMEWORK_DEV_BOOTSTRAP_COMMAND}\n`,
|
|
164
|
+
);
|
|
165
|
+
return false;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
113
169
|
return handoffToRepoLocalBinary(context);
|
|
114
170
|
}
|
|
115
171
|
|
|
@@ -122,6 +178,42 @@ function isHooksRunCommitMsgInvocation(argv) {
|
|
|
122
178
|
return false;
|
|
123
179
|
}
|
|
124
180
|
|
|
181
|
+
function renderStalePolicyWarning(reason) {
|
|
182
|
+
if (reason === "task_artifact_mutation") {
|
|
183
|
+
return "warning: allowing task-artifact lifecycle command to run with a stale repo build inside the framework checkout.\n";
|
|
184
|
+
}
|
|
185
|
+
return "warning: allowing read-only diagnostic command to run with a stale repo build inside the framework checkout.\n";
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
function missingRepoRuntimeDependencies(agentplaneRoot) {
|
|
189
|
+
const requireFromAgentplane = createRequire(path.join(agentplaneRoot, "package.json"));
|
|
190
|
+
let packageJson = null;
|
|
191
|
+
try {
|
|
192
|
+
packageJson = requireFromAgentplane("./package.json");
|
|
193
|
+
} catch {
|
|
194
|
+
return [];
|
|
195
|
+
}
|
|
196
|
+
const declaredDeps = {};
|
|
197
|
+
if (packageJson?.dependencies && typeof packageJson.dependencies === "object") {
|
|
198
|
+
Object.assign(declaredDeps, packageJson.dependencies);
|
|
199
|
+
}
|
|
200
|
+
if (packageJson?.optionalDependencies && typeof packageJson.optionalDependencies === "object") {
|
|
201
|
+
Object.assign(declaredDeps, packageJson.optionalDependencies);
|
|
202
|
+
}
|
|
203
|
+
if (!("@agentplaneorg/core" in declaredDeps)) {
|
|
204
|
+
return [];
|
|
205
|
+
}
|
|
206
|
+
const requiredSpecifiers = ["@agentplaneorg/core"];
|
|
207
|
+
return requiredSpecifiers.filter((specifier) => {
|
|
208
|
+
try {
|
|
209
|
+
requireFromAgentplane.resolve(specifier);
|
|
210
|
+
return false;
|
|
211
|
+
} catch {
|
|
212
|
+
return true;
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
|
|
125
217
|
async function assertDistUpToDate() {
|
|
126
218
|
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
127
219
|
const agentplaneRoot = path.resolve(here, "..");
|
|
@@ -144,6 +236,24 @@ async function assertDistUpToDate() {
|
|
|
144
236
|
return false;
|
|
145
237
|
}
|
|
146
238
|
|
|
239
|
+
const missingDeps = missingRepoRuntimeDependencies(agentplaneRoot);
|
|
240
|
+
if (missingDeps.length > 0) {
|
|
241
|
+
process.stderr.write(
|
|
242
|
+
"error: repo-local runtime dependencies are missing for this framework checkout.\n" +
|
|
243
|
+
"This worktree is not bootstrapped yet.\n" +
|
|
244
|
+
"Missing module resolution:\n" +
|
|
245
|
+
missingDeps.map((specifier) => ` ${specifier}\n`).join("") +
|
|
246
|
+
"Fix:\n" +
|
|
247
|
+
` ${FRAMEWORK_DEV_BOOTSTRAP_COMMAND}\n` +
|
|
248
|
+
"Manual fallback:\n" +
|
|
249
|
+
FRAMEWORK_DEV_MANUAL_REPAIR_COMMANDS.map((command) => ` ${command}\n`).join("") +
|
|
250
|
+
"Supported global override when you intentionally want the installed binary:\n" +
|
|
251
|
+
` ${FRAMEWORK_DEV_FORCE_GLOBAL_EXAMPLE}\n`,
|
|
252
|
+
);
|
|
253
|
+
process.exitCode = 2;
|
|
254
|
+
return false;
|
|
255
|
+
}
|
|
256
|
+
|
|
147
257
|
const repoRoot = path.resolve(agentplaneRoot, "..", "..");
|
|
148
258
|
const coreRoot = path.join(repoRoot, "packages", "core");
|
|
149
259
|
const checks = [
|
|
@@ -193,7 +303,7 @@ async function assertDistUpToDate() {
|
|
|
193
303
|
.filter(Boolean)
|
|
194
304
|
.join(" ");
|
|
195
305
|
process.stderr.write(
|
|
196
|
-
|
|
306
|
+
renderStalePolicyWarning(commandPolicy.reason) +
|
|
197
307
|
`command: ${commandText || "<unknown>"}\n` +
|
|
198
308
|
`detected: ${staleReasons.join(", ")}\n` +
|
|
199
309
|
"rebuild recommended:\n" +
|
|
@@ -224,7 +334,7 @@ const runtimeContext = resolveFrameworkBinaryContext({
|
|
|
224
334
|
});
|
|
225
335
|
primeRuntimeEnv(runtimeContext);
|
|
226
336
|
|
|
227
|
-
if (!maybeHandoffToRepoLocalBinary()) {
|
|
337
|
+
if (!(await maybeHandoffToRepoLocalBinary())) {
|
|
228
338
|
await maybeWarnGlobalBinaryInRepoCheckout();
|
|
229
339
|
const ok = isHooksRunCommitMsgInvocation(process.argv) ? true : await assertDistUpToDate();
|
|
230
340
|
if (ok) await import("../dist/cli.js");
|
package/bin/runtime-watch.js
CHANGED
|
@@ -23,6 +23,7 @@ export function isRuntimeRelevantWatchedFile(filePath) {
|
|
|
23
23
|
if (!inSourceTree) return true;
|
|
24
24
|
if (normalized.includes("/__snapshots__/")) return false;
|
|
25
25
|
const baseName = path.posix.basename(normalized);
|
|
26
|
+
if (baseName.startsWith(".")) return false;
|
|
26
27
|
return !/\.(?:test)\.[cm]?[jt]sx?$/u.test(baseName);
|
|
27
28
|
}
|
|
28
29
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type StaleDistPolicy = {
|
|
2
2
|
mode: "warn_and_run" | "strict";
|
|
3
|
-
reason: "read_only_diagnostic" | "default";
|
|
3
|
+
reason: "read_only_diagnostic" | "task_artifact_mutation" | "default";
|
|
4
4
|
};
|
|
5
5
|
|
|
6
6
|
export function classifyStaleDistPolicy(argv?: string[]): StaleDistPolicy;
|
package/bin/stale-dist-policy.js
CHANGED
|
@@ -38,6 +38,20 @@ function isPreflightCommand(args) {
|
|
|
38
38
|
return args[0] === "preflight";
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
function isPostMergeHookCommand(args) {
|
|
42
|
+
return args[0] === "hooks" && args[1] === "run" && args[2] === "post-merge";
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function isTaskArtifactMutationCommand(args) {
|
|
46
|
+
if (args[0] === "verify") return true;
|
|
47
|
+
if (args[0] === "finish") return true;
|
|
48
|
+
if (args[0] !== "task") return false;
|
|
49
|
+
if (args[1] === "doc" && args[2] === "set") return true;
|
|
50
|
+
if (args[1] === "plan" && ["set", "approve", "reject"].includes(args[2] ?? "")) return true;
|
|
51
|
+
if (args[1] === "start-ready") return true;
|
|
52
|
+
return args[1] === "verify" && ["ok", "rework"].includes(args[2] ?? "");
|
|
53
|
+
}
|
|
54
|
+
|
|
41
55
|
export function classifyStaleDistPolicy(argv = process.argv) {
|
|
42
56
|
const args = normalizeArgs(argv);
|
|
43
57
|
if (
|
|
@@ -48,9 +62,13 @@ export function classifyStaleDistPolicy(argv = process.argv) {
|
|
|
48
62
|
isConfigInspectionCommand(args) ||
|
|
49
63
|
isTaskInspectionCommand(args) ||
|
|
50
64
|
isReadyInspectionCommand(args) ||
|
|
51
|
-
isPreflightCommand(args)
|
|
65
|
+
isPreflightCommand(args) ||
|
|
66
|
+
isPostMergeHookCommand(args)
|
|
52
67
|
) {
|
|
53
68
|
return { mode: "warn_and_run", reason: "read_only_diagnostic" };
|
|
54
69
|
}
|
|
70
|
+
if (isTaskArtifactMutationCommand(args)) {
|
|
71
|
+
return { mode: "warn_and_run", reason: "task_artifact_mutation" };
|
|
72
|
+
}
|
|
55
73
|
return { mode: "strict", reason: "default" };
|
|
56
74
|
}
|