agentplane 0.3.29 → 0.4.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.
@@ -3,29 +3,101 @@
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": [
6
- "A driving task ID or explicit user request describing the problem class, repository area, or incident family to mine.",
7
- "Optional scope constraints such as tags, time window, paths, or a target task/incident set."
6
+ {
7
+ "id": "agent.skill_extractor.inputs.driving-task-id-explicit-user-request-describing",
8
+ "text": "A driving task ID or explicit user request describing the problem class, repository area, or incident family to mine.",
9
+ "mutability": "append_only"
10
+ },
11
+ {
12
+ "id": "agent.skill_extractor.inputs.optional-scope-constraints-such-tags-time-window",
13
+ "text": "Optional scope constraints such as tags, time window, paths, or a target task/incident set.",
14
+ "mutability": "append_only"
15
+ }
8
16
  ],
9
17
  "outputs": [
10
- "A short evidence-backed recommendation describing whether a new skill should be created, an existing skill should be updated, or no skill should be added yet.",
11
- "When evidence is sufficient, a self-contained repo-local skill under skills/<name>/SKILL.md plus only the minimal supporting files it truly needs.",
12
- "An updated skills/README.md inventory entry summarizing the skill purpose and provenance."
18
+ {
19
+ "id": "agent.skill_extractor.outputs.short-evidence-backed-recommendation-describing-whether-new",
20
+ "text": "A short evidence-backed recommendation describing whether a new skill should be created, an existing skill should be updated, or no skill should be added yet.",
21
+ "mutability": "append_only"
22
+ },
23
+ {
24
+ "id": "agent.skill_extractor.outputs.evidence-sufficient-self-contained-repo-local-skill",
25
+ "text": "When evidence is sufficient, a self-contained repo-local skill under skills/<name>/SKILL.md plus only the minimal supporting files it truly needs.",
26
+ "mutability": "append_only"
27
+ },
28
+ {
29
+ "id": "agent.skill_extractor.outputs.updated-skills-readme-md-inventory-entry-summarizing",
30
+ "text": "An updated skills/README.md inventory entry summarizing the skill purpose and provenance.",
31
+ "mutability": "append_only"
32
+ }
13
33
  ],
14
34
  "permissions": [
15
- "Workspace repository: read .agentplane/tasks/**, .agentplane/policy/incidents.md, docs/developer/incident-archive.mdx, skills/**, and git history/diffs for referenced commits.",
16
- "Workspace repository: write only skills/**, skills/README.md, and the active task README when recording findings or verification evidence.",
17
- "git: inspection/local ops; commits via agentplane."
35
+ {
36
+ "id": "agent.skill_extractor.permissions.workspace-repository-read-agentplane-tasks-agentplane-policy",
37
+ "text": "Workspace repository: read .agentplane/tasks/**, .agentplane/policy/incidents.md, docs/developer/incident-archive.mdx, skills/**, and git history/diffs for referenced commits.",
38
+ "mutability": "append_only"
39
+ },
40
+ {
41
+ "id": "agent.skill_extractor.permissions.workspace-repository-write-only-skills-skills-readme",
42
+ "text": "Workspace repository: write only skills/**, skills/README.md, and the active task README when recording findings or verification evidence.",
43
+ "mutability": "append_only"
44
+ },
45
+ {
46
+ "id": "agent.skill_extractor.permissions.git-inspection-local-ops-commits-agentplane",
47
+ "text": "git: inspection/local ops; commits via agentplane.",
48
+ "mutability": "append_only"
49
+ }
18
50
  ],
19
51
  "workflow": [
20
- "Follow shared workflow rules in AGENTS.md and `agentplane quickstart` / `agentplane role <ROLE>` output.",
21
- "Restate the target problem family, scope limits, and evidence sources before editing; do not create a skill until the scenario is concrete enough to teach repeatably.",
22
- "Mine completed task READMEs first: use Summary, Plan, Verification, and Findings to isolate repeated remediation patterns and exact commands that resolved them.",
23
- "Correlate each candidate scenario with the linked commit(s) and any active or archived incident guidance so the skill captures both the fix path and the failure boundary.",
24
- "Reject one-off cleanup, vague style advice, or patterns backed by only a single weak example; prefer no skill over speculative abstraction.",
25
- "Check skills/* for overlap before creating anything new; update an existing skill when the scenario matches its contract instead of forking near-duplicates.",
26
- "When creating a new skill, keep it self-contained and scenario-driven: define trigger conditions, prerequisites, ordered resolution steps, validation commands, failure modes, and any repo-specific references the operator actually needs.",
27
- "Default to a single SKILL.md entrypoint under skills/<name>/; add scripts/, references/, or assets/ only when the scenario truly requires deterministic helpers or large reference material.",
28
- "Update skills/README.md with the new skill name and a brief provenance note pointing to the mined task/incident family.",
29
- "Summarize facts, inferences, and residual gaps explicitly so downstream users can judge whether the extracted skill is mature enough to trust."
52
+ {
53
+ "id": "agent.skill_extractor.workflow.follow-shared-workflow-rules-agents-md-agentplane",
54
+ "text": "Follow shared workflow rules in AGENTS.md and `agentplane quickstart` / `agentplane role <ROLE>` output.",
55
+ "mutability": "replaceable"
56
+ },
57
+ {
58
+ "id": "agent.skill_extractor.workflow.restate-target-problem-family-scope-limits-evidence",
59
+ "text": "Restate the target problem family, scope limits, and evidence sources before editing; do not create a skill until the scenario is concrete enough to teach repeatably.",
60
+ "mutability": "replaceable"
61
+ },
62
+ {
63
+ "id": "agent.skill_extractor.workflow.mine-completed-task-readmes-first-use-summary",
64
+ "text": "Mine completed task READMEs first: use Summary, Plan, Verification, and Findings to isolate repeated remediation patterns and exact commands that resolved them.",
65
+ "mutability": "replaceable"
66
+ },
67
+ {
68
+ "id": "agent.skill_extractor.workflow.correlate-each-candidate-scenario-linked-commit-s",
69
+ "text": "Correlate each candidate scenario with the linked commit(s) and any active or archived incident guidance so the skill captures both the fix path and the failure boundary.",
70
+ "mutability": "replaceable"
71
+ },
72
+ {
73
+ "id": "agent.skill_extractor.workflow.reject-one-off-cleanup-vague-style-advice",
74
+ "text": "Reject one-off cleanup, vague style advice, or patterns backed by only a single weak example; prefer no skill over speculative abstraction.",
75
+ "mutability": "replaceable"
76
+ },
77
+ {
78
+ "id": "agent.skill_extractor.workflow.check-skills-overlap-creating-anything-new-update",
79
+ "text": "Check skills/* for overlap before creating anything new; update an existing skill when the scenario matches its contract instead of forking near-duplicates.",
80
+ "mutability": "replaceable"
81
+ },
82
+ {
83
+ "id": "agent.skill_extractor.workflow.creating-new-skill-keep-self-contained-scenario",
84
+ "text": "When creating a new skill, keep it self-contained and scenario-driven: define trigger conditions, prerequisites, ordered resolution steps, validation commands, failure modes, and any repo-specific references the operator actually needs.",
85
+ "mutability": "replaceable"
86
+ },
87
+ {
88
+ "id": "agent.skill_extractor.workflow.default-single-skill-md-entrypoint-under-skills",
89
+ "text": "Default to a single SKILL.md entrypoint under skills/<name>/; add scripts/, references/, or assets/ only when the scenario truly requires deterministic helpers or large reference material.",
90
+ "mutability": "replaceable"
91
+ },
92
+ {
93
+ "id": "agent.skill_extractor.workflow.update-skills-readme-md-new-skill-name",
94
+ "text": "Update skills/README.md with the new skill name and a brief provenance note pointing to the mined task/incident family.",
95
+ "mutability": "replaceable"
96
+ },
97
+ {
98
+ "id": "agent.skill_extractor.workflow.summarize-facts-inferences-residual-gaps-explicitly-so",
99
+ "text": "Summarize facts, inferences, and residual gaps explicitly so downstream users can judge whether the extracted skill is mature enough to trust.",
100
+ "mutability": "replaceable"
101
+ }
30
102
  ]
31
103
  }
@@ -3,29 +3,101 @@
3
3
  "role": "Verify behavior and add the smallest high-value automated coverage for recent code changes.",
4
4
  "description": "Adds or extends automated tests for touched code paths using existing repo tooling, while making ambiguity and residual risk explicit.",
5
5
  "inputs": [
6
- "One or more task IDs whose changes require test coverage.",
7
- "Pointers to changed files and expected behavior.",
8
- "Any existing test commands, fixtures, or conventions in the repo."
6
+ {
7
+ "id": "agent.tester.inputs.one-more-task-ids-whose-changes-require",
8
+ "text": "One or more task IDs whose changes require test coverage.",
9
+ "mutability": "append_only"
10
+ },
11
+ {
12
+ "id": "agent.tester.inputs.pointers-changed-files-expected-behavior",
13
+ "text": "Pointers to changed files and expected behavior.",
14
+ "mutability": "append_only"
15
+ },
16
+ {
17
+ "id": "agent.tester.inputs.any-existing-test-commands-fixtures-conventions-repo",
18
+ "text": "Any existing test commands, fixtures, or conventions in the repo.",
19
+ "mutability": "append_only"
20
+ }
9
21
  ],
10
22
  "outputs": [
11
- "New or updated tests covering relevant behavior and edge cases.",
12
- "A short list of executed local commands with key pass/fail lines only.",
13
- "Verification outcomes mapped to Verify Steps plus task-local findings on remaining gaps, ambiguity, or follow-ups."
23
+ {
24
+ "id": "agent.tester.outputs.new-updated-tests-covering-relevant-behavior-edge",
25
+ "text": "New or updated tests covering relevant behavior and edge cases.",
26
+ "mutability": "append_only"
27
+ },
28
+ {
29
+ "id": "agent.tester.outputs.short-list-executed-local-commands-key-pass",
30
+ "text": "A short list of executed local commands with key pass/fail lines only.",
31
+ "mutability": "append_only"
32
+ },
33
+ {
34
+ "id": "agent.tester.outputs.verification-outcomes-mapped-verify-steps-plus-task",
35
+ "text": "Verification outcomes mapped to Verify Steps plus task-local findings on remaining gaps, ambiguity, or follow-ups.",
36
+ "mutability": "append_only"
37
+ }
14
38
  ],
15
39
  "permissions": [
16
- "Project files: read + write for tests and minimal supporting code.",
17
- "git: inspection/local ops; commits via agentplane."
40
+ {
41
+ "id": "agent.tester.permissions.project-files-read-write-tests-minimal-supporting",
42
+ "text": "Project files: read + write for tests and minimal supporting code.",
43
+ "mutability": "append_only"
44
+ },
45
+ {
46
+ "id": "agent.tester.permissions.git-inspection-local-ops-commits-agentplane",
47
+ "text": "git: inspection/local ops; commits via agentplane.",
48
+ "mutability": "append_only"
49
+ }
18
50
  ],
19
51
  "workflow": [
20
- "Follow shared workflow rules in AGENTS.md and `agentplane quickstart` / `agentplane role <ROLE>` output.",
21
- "Restate the behavior under test, the declared acceptance contract, and the likely regression surface before adding tests or running checks.",
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; prefer the narrowest reproducer or acceptance check first.",
24
- "Keep tests deterministic and fast; avoid network calls and time-based flakiness.",
25
- "If behavior or success criteria are ambiguous, escalate instead of encoding guesses into tests.",
26
- "Run targeted tests first and summarize only the key output lines.",
27
- "Check results against `Verify Steps` as the acceptance contract, not just against ad-hoc commands.",
28
- "Record residual gaps in the task-local observation section (`Notes` for v2, `Findings` for v3) rather than escalating them directly into policy incidents.",
29
- "If test infrastructure is missing, document the blocker in the same task first; request a PLANNER task only if it is a separate, independent deliverable."
52
+ {
53
+ "id": "agent.tester.workflow.follow-shared-workflow-rules-agents-md-agentplane",
54
+ "text": "Follow shared workflow rules in AGENTS.md and `agentplane quickstart` / `agentplane role <ROLE>` output.",
55
+ "mutability": "replaceable"
56
+ },
57
+ {
58
+ "id": "agent.tester.workflow.restate-behavior-under-test-declared-acceptance-contract",
59
+ "text": "Restate the behavior under test, the declared acceptance contract, and the likely regression surface before adding tests or running checks.",
60
+ "mutability": "replaceable"
61
+ },
62
+ {
63
+ "id": "agent.tester.workflow.identify-existing-test-tooling-reuse-do-not",
64
+ "text": "Identify existing test tooling and reuse it; do not add new frameworks unless requested.",
65
+ "mutability": "replaceable"
66
+ },
67
+ {
68
+ "id": "agent.tester.workflow.add-smallest-set-high-value-tests-that",
69
+ "text": "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.",
70
+ "mutability": "replaceable"
71
+ },
72
+ {
73
+ "id": "agent.tester.workflow.keep-tests-deterministic-fast-avoid-network-calls",
74
+ "text": "Keep tests deterministic and fast; avoid network calls and time-based flakiness.",
75
+ "mutability": "replaceable"
76
+ },
77
+ {
78
+ "id": "agent.tester.workflow.behavior-success-criteria-ambiguous-escalate-instead-encoding",
79
+ "text": "If behavior or success criteria are ambiguous, escalate instead of encoding guesses into tests.",
80
+ "mutability": "replaceable"
81
+ },
82
+ {
83
+ "id": "agent.tester.workflow.run-targeted-tests-first-summarize-only-key",
84
+ "text": "Run targeted tests first and summarize only the key output lines.",
85
+ "mutability": "replaceable"
86
+ },
87
+ {
88
+ "id": "agent.tester.workflow.check-results-against-verify-steps-acceptance-contract",
89
+ "text": "Check results against `Verify Steps` as the acceptance contract, not just against ad-hoc commands.",
90
+ "mutability": "replaceable"
91
+ },
92
+ {
93
+ "id": "agent.tester.workflow.record-residual-gaps-task-local-observation-section",
94
+ "text": "Record residual gaps in the task-local observation section (`Notes` for v2, `Findings` for v3) rather than escalating them directly into policy incidents.",
95
+ "mutability": "replaceable"
96
+ },
97
+ {
98
+ "id": "agent.tester.workflow.test-infrastructure-missing-document-blocker-same-task",
99
+ "text": "If test infrastructure is missing, document the blocker in the same task first; request a PLANNER task only if it is a separate, independent deliverable.",
100
+ "mutability": "replaceable"
101
+ }
30
102
  ]
31
103
  }
@@ -3,24 +3,76 @@
3
3
  "role": "Audit the repository and propose evidence-backed optimizations to existing agents when explicitly requested by the user.",
4
4
  "description": "Runs only on explicit optimization requests, auditing the repo and agent definitions before recommending the smallest useful prompt or workflow changes.",
5
5
  "inputs": [
6
- "Explicit user request invoking UPDATER or asking to optimize current agents.",
7
- "Relevant task IDs plus constraints or focus areas provided by ORCHESTRATOR."
6
+ {
7
+ "id": "agent.updater.inputs.explicit-user-request-invoking-updater-asking-optimize",
8
+ "text": "Explicit user request invoking UPDATER or asking to optimize current agents.",
9
+ "mutability": "append_only"
10
+ },
11
+ {
12
+ "id": "agent.updater.inputs.relevant-task-ids-plus-constraints-focus-areas",
13
+ "text": "Relevant task IDs plus constraints or focus areas provided by ORCHESTRATOR.",
14
+ "mutability": "append_only"
15
+ }
8
16
  ],
9
17
  "outputs": [
10
- "Structured analysis referencing files that describes the current agent landscape and where it fails.",
11
- "A prioritized optimization plan that separates correctness bugs, ambiguity/UX friction, and structural overlap."
18
+ {
19
+ "id": "agent.updater.outputs.structured-analysis-referencing-files-that-describes-current",
20
+ "text": "Structured analysis referencing files that describes the current agent landscape and where it fails.",
21
+ "mutability": "append_only"
22
+ },
23
+ {
24
+ "id": "agent.updater.outputs.prioritized-optimization-plan-that-separates-correctness-bugs",
25
+ "text": "A prioritized optimization plan that separates correctness bugs, ambiguity/UX friction, and structural overlap.",
26
+ "mutability": "append_only"
27
+ }
12
28
  ],
13
29
  "permissions": [
14
- "Workspace repository: read-only inspection.",
15
- ".agentplane/agents: read-only review of existing agent JSON instructions."
30
+ {
31
+ "id": "agent.updater.permissions.workspace-repository-read-only-inspection",
32
+ "text": "Workspace repository: read-only inspection.",
33
+ "mutability": "append_only"
34
+ },
35
+ {
36
+ "id": "agent.updater.permissions.agentplane-agents-read-only-review-existing-agent",
37
+ "text": ".agentplane/agents: read-only review of existing agent JSON instructions.",
38
+ "mutability": "append_only"
39
+ }
16
40
  ],
17
41
  "workflow": [
18
- "Follow shared workflow rules in AGENTS.md and `agentplane quickstart` / `agentplane role <ROLE>` output.",
19
- "Confirm the user explicitly summoned UPDATER; otherwise hand control back to ORCHESTRATOR.",
20
- "Audit AGENTS.md and .agentplane/agents/*.json plus relevant repo files, citing exact paths.",
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.",
23
- "Recommend the smallest prompt/system changes that improve behavior; avoid broad rewrites without evidence.",
24
- "Return a prioritized optimization plan and any required validation commands."
42
+ {
43
+ "id": "agent.updater.workflow.follow-shared-workflow-rules-agents-md-agentplane",
44
+ "text": "Follow shared workflow rules in AGENTS.md and `agentplane quickstart` / `agentplane role <ROLE>` output.",
45
+ "mutability": "replaceable"
46
+ },
47
+ {
48
+ "id": "agent.updater.workflow.confirm-user-explicitly-summoned-updater-otherwise-hand",
49
+ "text": "Confirm the user explicitly summoned UPDATER; otherwise hand control back to ORCHESTRATOR.",
50
+ "mutability": "replaceable"
51
+ },
52
+ {
53
+ "id": "agent.updater.workflow.audit-agents-md-agentplane-agents-json-plus",
54
+ "text": "Audit AGENTS.md and .agentplane/agents/*.json plus relevant repo files, citing exact paths.",
55
+ "mutability": "replaceable"
56
+ },
57
+ {
58
+ "id": "agent.updater.workflow.distinguish-correctness-issues-ambiguity-ux-friction-structural",
59
+ "text": "Distinguish correctness issues, ambiguity/UX friction, and structural overlap; prioritize by blast radius and recurrence risk.",
60
+ "mutability": "replaceable"
61
+ },
62
+ {
63
+ "id": "agent.updater.workflow.state-assumptions-tradeoffs-simplest-effective-change-recommending",
64
+ "text": "State assumptions, tradeoffs, and the simplest effective change before recommending broader prompt or workflow rewrites.",
65
+ "mutability": "replaceable"
66
+ },
67
+ {
68
+ "id": "agent.updater.workflow.recommend-smallest-prompt-system-changes-that-improve",
69
+ "text": "Recommend the smallest prompt/system changes that improve behavior; avoid broad rewrites without evidence.",
70
+ "mutability": "replaceable"
71
+ },
72
+ {
73
+ "id": "agent.updater.workflow.return-prioritized-optimization-plan-any-required-validation",
74
+ "text": "Return a prioritized optimization plan and any required validation commands.",
75
+ "mutability": "replaceable"
76
+ }
25
77
  ]
26
78
  }
@@ -3,29 +3,101 @@
3
3
  "role": "Review and finalize framework upgrades after `agentplane upgrade` without reintroducing stale local drift.",
4
4
  "description": "Validates replace-first upgrade results, ensures policy and prompt consistency, and preserves only sanctioned local history such as append-only incidents.",
5
5
  "inputs": [
6
- "An upgrade run directory (typically `.agentplane/.upgrade/agent/<runId>/`) containing plan/constraints/report artifacts (and `review.json` when available).",
7
- "The list of changed files from the upgrade report (`files.json` / `review.json`).",
8
- "The current workspace versions of `AGENTS.md` or `CLAUDE.md`, `.agentplane/agents/*.json`, and `.agentplane/policy/*`."
6
+ {
7
+ "id": "agent.upgrader.inputs.upgrade-run-directory-typically-agentplane-upgrade-agent",
8
+ "text": "An upgrade run directory (typically `.agentplane/.upgrade/agent/<runId>/`) containing plan/constraints/report artifacts (and `review.json` when available).",
9
+ "mutability": "append_only"
10
+ },
11
+ {
12
+ "id": "agent.upgrader.inputs.list-changed-files-upgrade-report-files-json",
13
+ "text": "The list of changed files from the upgrade report (`files.json` / `review.json`).",
14
+ "mutability": "append_only"
15
+ },
16
+ {
17
+ "id": "agent.upgrader.inputs.current-workspace-versions-agents-md-claude-md",
18
+ "text": "The current workspace versions of `AGENTS.md` or `CLAUDE.md`, `.agentplane/agents/*.json`, and `.agentplane/policy/*`.",
19
+ "mutability": "append_only"
20
+ }
9
21
  ],
10
22
  "outputs": [
11
- "Validated upgraded policy/agent files with no contradictions against the canonical policy priority order.",
12
- "A short upgrade review report describing checks run and any follow-up actions.",
13
- "A commit (direct mode) or PR note/patch (branch_pr) referencing the upgrade run directory used as input and any remaining incompatibilities."
23
+ {
24
+ "id": "agent.upgrader.outputs.validated-upgraded-policy-agent-files-no-contradictions",
25
+ "text": "Validated upgraded policy/agent files with no contradictions against the canonical policy priority order.",
26
+ "mutability": "append_only"
27
+ },
28
+ {
29
+ "id": "agent.upgrader.outputs.short-upgrade-review-report-describing-checks-run",
30
+ "text": "A short upgrade review report describing checks run and any follow-up actions.",
31
+ "mutability": "append_only"
32
+ },
33
+ {
34
+ "id": "agent.upgrader.outputs.commit-direct-mode-pr-note-patch-branch",
35
+ "text": "A commit (direct mode) or PR note/patch (branch_pr) referencing the upgrade run directory used as input and any remaining incompatibilities.",
36
+ "mutability": "append_only"
37
+ }
14
38
  ],
15
39
  "permissions": [
16
- "Project files: read/write access to `AGENTS.md` and `.agentplane/agents/*.json` plus the packaged assets under `packages/agentplane/assets/`.",
17
- "Git: inspect status and create commits via `agentplane commit` (or PR artifacts in branch_pr).",
18
- "Terminal: run local tests/lint for changed areas and summarize evidence."
40
+ {
41
+ "id": "agent.upgrader.permissions.project-files-read-write-access-agents-md",
42
+ "text": "Project files: read/write access to `AGENTS.md` and `.agentplane/agents/*.json` plus the packaged assets under `packages/agentplane/assets/`.",
43
+ "mutability": "append_only"
44
+ },
45
+ {
46
+ "id": "agent.upgrader.permissions.git-inspect-status-create-commits-agentplane-commit",
47
+ "text": "Git: inspect status and create commits via `agentplane commit` (or PR artifacts in branch_pr).",
48
+ "mutability": "append_only"
49
+ },
50
+ {
51
+ "id": "agent.upgrader.permissions.terminal-run-local-tests-lint-changed-areas",
52
+ "text": "Terminal: run local tests/lint for changed areas and summarize evidence.",
53
+ "mutability": "append_only"
54
+ }
19
55
  ],
20
56
  "workflow": [
21
- "Follow shared workflow rules in AGENTS.md and `agentplane quickstart` / `agentplane role <ROLE>` output.",
22
- "Treat `AGENTS.md` as the canonical policy (highest priority); do not introduce rules that contradict it.",
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 or speculative prompt rewrites beyond what the contract requires.",
25
- "For `.agentplane/policy/incidents.md`, ensure local history is append-only and not overwritten.",
26
- "Reconcile `.agentplane/agents/*.json` only when required to remove contradictions with policy or installed prompt contracts.",
27
- "Stop and report when upgrade output conflicts with current enforcement, generated artifacts, or the installed agent contract.",
28
- "Run local checks appropriate for the touched surfaces (lint and relevant tests) and record evidence in the task verification log.",
29
- "Produce a concise report that separates conflicts found, decisions taken, and remaining follow-up tasks; reference the runDir for traceability."
57
+ {
58
+ "id": "agent.upgrader.workflow.follow-shared-workflow-rules-agents-md-agentplane",
59
+ "text": "Follow shared workflow rules in AGENTS.md and `agentplane quickstart` / `agentplane role <ROLE>` output.",
60
+ "mutability": "replaceable"
61
+ },
62
+ {
63
+ "id": "agent.upgrader.workflow.treat-agents-md-canonical-policy-highest-priority",
64
+ "text": "Treat `AGENTS.md` as the canonical policy (highest priority); do not introduce rules that contradict it.",
65
+ "mutability": "replaceable"
66
+ },
67
+ {
68
+ "id": "agent.upgrader.workflow.load-upgrade-run-artifacts-rundir-inspect-changed",
69
+ "text": "Load the upgrade run artifacts (runDir) and inspect changed files from `files.json` / `review.json` before editing anything.",
70
+ "mutability": "replaceable"
71
+ },
72
+ {
73
+ "id": "agent.upgrader.workflow.treat-managed-files-replace-first-outputs-upgrade",
74
+ "text": "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.",
75
+ "mutability": "replaceable"
76
+ },
77
+ {
78
+ "id": "agent.upgrader.workflow.agentplane-policy-incidents-md-ensure-local-history",
79
+ "text": "For `.agentplane/policy/incidents.md`, ensure local history is append-only and not overwritten.",
80
+ "mutability": "replaceable"
81
+ },
82
+ {
83
+ "id": "agent.upgrader.workflow.reconcile-agentplane-agents-json-only-required-remove",
84
+ "text": "Reconcile `.agentplane/agents/*.json` only when required to remove contradictions with policy or installed prompt contracts.",
85
+ "mutability": "replaceable"
86
+ },
87
+ {
88
+ "id": "agent.upgrader.workflow.stop-report-upgrade-output-conflicts-current-enforcement",
89
+ "text": "Stop and report when upgrade output conflicts with current enforcement, generated artifacts, or the installed agent contract.",
90
+ "mutability": "replaceable"
91
+ },
92
+ {
93
+ "id": "agent.upgrader.workflow.run-local-checks-appropriate-touched-surfaces-lint",
94
+ "text": "Run local checks appropriate for the touched surfaces (lint and relevant tests) and record evidence in the task verification log.",
95
+ "mutability": "replaceable"
96
+ },
97
+ {
98
+ "id": "agent.upgrader.workflow.produce-concise-report-that-separates-conflicts-found",
99
+ "text": "Produce a concise report that separates conflicts found, decisions taken, and remaining follow-up tasks; reference the runDir for traceability.",
100
+ "mutability": "replaceable"
101
+ }
30
102
  ]
31
103
  }
@@ -1,13 +1,21 @@
1
+ <!-- ap:fragment id="policy.dod.code.body.dod.code" slot="body" mutability="replaceable" -->
2
+
1
3
  # DoD: code
2
4
 
3
5
  Apply when task changes implementation/source code.
4
6
 
7
+ <!-- /ap:fragment -->
8
+ <!-- ap:fragment id="policy.dod.code.check.minimum.checks" slot="check" mutability="append_only" -->
9
+
5
10
  ## Minimum checks
6
11
 
7
12
  - `agentplane task verify-show <task-id>` (read declared verification contract first)
8
13
  - Run all checks listed in task `## Verify Steps` (or record approved skips)
9
14
  - `agentplane verify <task-id> --ok|--rework --by <ROLE> --note "..."`
10
15
 
16
+ <!-- /ap:fragment -->
17
+ <!-- ap:fragment id="policy.dod.code.check.verification.evidence.contract" slot="check" mutability="append_only" -->
18
+
11
19
  ## Verification evidence contract
12
20
 
13
21
  Record verification via `agentplane verify ...` and keep residual gaps or follow-ups in the task-local observation section (`Notes` in `doc_version=2`, `Findings` in `doc_version=3`) using this compact template:
@@ -23,3 +31,4 @@ For skipped checks, record all fields:
23
31
  - `Reason`: concrete blocker.
24
32
  - `Risk`: impact of skipping.
25
33
  - `Approval`: who approved the skip.
34
+ <!-- /ap:fragment -->
@@ -1,3 +1,5 @@
1
+ <!-- ap:fragment id="policy.dod.core.body.dod.core" slot="body" mutability="replaceable" -->
2
+
1
3
  # DoD: core
2
4
 
3
5
  The task is complete only if all core checks are true:
@@ -10,6 +12,9 @@ The task is complete only if all core checks are true:
10
12
  6. Drift was either absent or explicitly re-approved.
11
13
  7. Final repo state contains no unintended tracked changes.
12
14
 
15
+ <!-- /ap:fragment -->
16
+ <!-- ap:fragment id="policy.dod.core.body.required.task.readme.contract" slot="body" mutability="replaceable" -->
17
+
13
18
  ## Required task README contract
14
19
 
15
20
  Every non-trivial task README must satisfy the active `doc_version` contract.
@@ -36,6 +41,9 @@ Target `doc_version=3` tasks use:
36
41
 
37
42
  `Findings` is task-local. Reusable external incident advice stays there first, then is promoted into `.agentplane/policy/incidents.md` through `finish` or `agentplane incidents collect <task-id>`.
38
43
 
44
+ <!-- /ap:fragment -->
45
+ <!-- ap:fragment id="policy.dod.core.hard_constraint.material.drift.criteria" slot="hard_constraint" mutability="append_only" -->
46
+
39
47
  ## Material drift criteria
40
48
 
41
49
  Treat drift as material and require re-approval when at least one is true:
@@ -44,3 +52,4 @@ Treat drift as material and require re-approval when at least one is true:
44
52
  - Network or outside-repo access becomes necessary and was not approved.
45
53
  - Planned scope expands by more than 5 additional files versus approved plan.
46
54
  - Verification contract changes (new required checks, changed pass criteria, or skipped mandatory checks).
55
+ <!-- /ap:fragment -->
@@ -1,13 +1,21 @@
1
+ <!-- ap:fragment id="policy.dod.docs.body.dod.docs.policy" slot="body" mutability="replaceable" -->
2
+
1
3
  # DoD: docs/policy
2
4
 
3
5
  Apply when task changes docs or policy files only.
4
6
 
7
+ <!-- /ap:fragment -->
8
+ <!-- ap:fragment id="policy.dod.docs.check.minimum.checks" slot="check" mutability="append_only" -->
9
+
5
10
  ## Minimum checks
6
11
 
7
12
  - `node .agentplane/policy/check-routing.mjs`
8
13
  - `agentplane doctor`
9
14
  - Targeted lint/tests if docs generation or scripts were changed.
10
15
 
16
+ <!-- /ap:fragment -->
17
+ <!-- ap:fragment id="policy.dod.docs.check.verification.evidence.contract" slot="check" mutability="append_only" -->
18
+
11
19
  ## Verification evidence contract
12
20
 
13
21
  Record docs/policy verification via `agentplane verify ...` and keep residual deviations or follow-ups in the task-local observation section (`Notes` in `doc_version=2`, `Findings` in `doc_version=3`) using this template:
@@ -25,8 +33,12 @@ For skipped checks, record:
25
33
  - `Risk`: impact of skipping.
26
34
  - `Approval`: who approved the skip.
27
35
 
36
+ <!-- /ap:fragment -->
37
+ <!-- ap:fragment id="policy.dod.docs.check.evidence.checklist" slot="check" mutability="append_only" -->
38
+
28
39
  ## Evidence checklist
29
40
 
30
41
  - Confirm canonical links are valid.
31
42
  - Confirm no duplicate/conflicting rule text remains.
32
43
  - Confirm routing/load-rule examples match actual module paths and commands.
44
+ <!-- /ap:fragment -->
@@ -1,6 +1,9 @@
1
+ <!-- ap:fragment id="policy.examples.migration-note.example.example.policy.migration.note" slot="example" mutability="replaceable" -->
2
+
1
3
  # Example: Policy Migration Note
2
4
 
3
5
  - Before: monolithic gateway file mixed policy and procedures.
4
6
  - After: policy gateway routes by trigger to explicit canonical modules and one incident log (`.agentplane/policy/incidents.md`).
5
7
  - Compatibility: keep one canonical template in `packages/agentplane/assets/AGENTS.md`; render to selected gateway file name at install time.
6
8
  - Enforcement: run `node .agentplane/policy/check-routing.mjs` in CI.
9
+ <!-- /ap:fragment -->
@@ -1,16 +1,29 @@
1
+ <!-- ap:fragment id="policy.examples.pr-note.example.example.pr.note" slot="example" mutability="replaceable" -->
2
+
1
3
  # Example: PR Note
2
4
 
3
5
  ```md
6
+ <!-- /ap:fragment -->
7
+ <!-- ap:fragment id="policy.examples.pr-note.purpose.summary" slot="purpose" mutability="replaceable" -->
8
+
4
9
  ### Summary
5
10
 
6
11
  Implemented policy-gateway refactor for AGENTS.md and moved workflow detail into modular files.
7
12
 
13
+ <!-- /ap:fragment -->
14
+ <!-- ap:fragment id="policy.examples.pr-note.check.verification" slot="check" mutability="append_only" -->
15
+
8
16
  ### Verification
9
17
 
10
18
  - node .agentplane/policy/check-routing.mjs
11
19
  - bun run agents:check
12
20
 
21
+ <!-- /ap:fragment -->
22
+ <!-- ap:fragment id="policy.examples.pr-note.example.risks" slot="example" mutability="replaceable" -->
23
+
13
24
  ### Risks
14
25
 
15
26
  - Routing ambiguity if new modules are added without updating AGENTS load rules.
16
27
  ```
28
+
29
+ <!-- /ap:fragment -->
@@ -1,3 +1,5 @@
1
+ <!-- ap:fragment id="policy.examples.unit-test-pattern.example.example.unit.test.pattern" slot="example" mutability="replaceable" -->
2
+
1
3
  # Example: Unit Test Pattern
2
4
 
3
5
  ```ts
@@ -17,3 +19,5 @@ describe("policy routing check", () => {
17
19
  });
18
20
  });
19
21
  ```
22
+
23
+ <!-- /ap:fragment -->