agentplane 0.3.28 → 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.
- package/assets/AGENTS.md +37 -5
- package/assets/RUNNER.md +3 -0
- package/assets/agents/CODER.json +115 -23
- package/assets/agents/CREATOR.json +75 -15
- package/assets/agents/DOCS.json +80 -16
- package/assets/agents/INTEGRATOR.json +90 -18
- package/assets/agents/ORCHESTRATOR.json +127 -25
- package/assets/agents/PLANNER.json +120 -24
- package/assets/agents/REDMINE.json +80 -16
- package/assets/agents/REVIEWER.json +72 -14
- package/assets/agents/SKILL_EXTRACTOR.json +90 -18
- package/assets/agents/TESTER.json +90 -18
- package/assets/agents/UPDATER.json +65 -13
- package/assets/agents/UPGRADER.json +90 -18
- package/assets/policy/dod.code.md +9 -0
- package/assets/policy/dod.core.md +9 -0
- package/assets/policy/dod.docs.md +12 -0
- package/assets/policy/examples/migration-note.md +3 -0
- package/assets/policy/examples/pr-note.md +13 -0
- package/assets/policy/examples/unit-test-pattern.md +4 -0
- package/assets/policy/governance.md +18 -0
- package/assets/policy/incidents.md +5 -19
- package/assets/policy/security.must.md +3 -0
- package/assets/policy/workflow.branch_pr.md +14 -1
- package/assets/policy/workflow.direct.md +15 -0
- package/assets/policy/workflow.md +3 -0
- package/assets/policy/workflow.release.md +12 -0
- package/assets/policy/workflow.upgrade.md +9 -0
- package/dist/.build-manifest.json +3 -3
- package/dist/cli.js +360 -366
- package/package.json +3 -3
|
@@ -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 -->
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
<!-- ap:fragment id="policy.governance.body.policy.governance" slot="body" mutability="replaceable" -->
|
|
2
|
+
|
|
1
3
|
# Policy Governance
|
|
2
4
|
|
|
5
|
+
<!-- /ap:fragment -->
|
|
6
|
+
<!-- ap:fragment id="policy.governance.source_of_truth.incident.source.of.truth" slot="source_of_truth" mutability="replaceable" -->
|
|
7
|
+
|
|
3
8
|
## Incident source of truth
|
|
4
9
|
|
|
5
10
|
- `.agentplane/policy/incidents.md` is the active incident registry for unresolved incidents that still need operator attention or follow-up engineering work.
|
|
@@ -11,6 +16,9 @@
|
|
|
11
16
|
- Normal startup MUST NOT bulk-load `incidents.md`; targeted lookup for analogous work is allowed through `task start-ready` and `agentplane incidents advise`.
|
|
12
17
|
- Closed incidents MAY be removed from `.agentplane/policy/incidents.md`, but only after their final state and evidence have been preserved in `docs/developer/incident-archive.mdx`.
|
|
13
18
|
|
|
19
|
+
<!-- /ap:fragment -->
|
|
20
|
+
<!-- ap:fragment id="policy.governance.hard_constraint.stabilization.criteria" slot="hard_constraint" mutability="append_only" -->
|
|
21
|
+
|
|
14
22
|
## Stabilization criteria
|
|
15
23
|
|
|
16
24
|
Use `stabilized` only when the same failure class recurs at least 2 times in 30 days.
|
|
@@ -23,19 +31,29 @@ Promotion from `incidents.md` into canonical policy modules is allowed only when
|
|
|
23
31
|
2. Enforcement is defined (`CI`, `test`, `lint`, or policy check script).
|
|
24
32
|
3. Policy gateway load rules are updated if routing behavior changes.
|
|
25
33
|
|
|
34
|
+
<!-- /ap:fragment -->
|
|
35
|
+
<!-- ap:fragment id="policy.governance.hard_constraint.canonical.module.immutability" slot="hard_constraint" mutability="append_only" -->
|
|
36
|
+
|
|
26
37
|
## Canonical module immutability
|
|
27
38
|
|
|
28
39
|
- Canonical modules are immutable by default during feature delivery tasks.
|
|
29
40
|
- Canonical modules MAY be changed only in a dedicated policy task with explicit user approval.
|
|
30
41
|
- Every canonical policy edit MUST include `node .agentplane/policy/check-routing.mjs` in verification evidence.
|
|
31
42
|
|
|
43
|
+
<!-- /ap:fragment -->
|
|
44
|
+
<!-- ap:fragment id="policy.governance.hard_constraint.policy.budget" slot="hard_constraint" mutability="append_only" -->
|
|
45
|
+
|
|
32
46
|
## Policy budget
|
|
33
47
|
|
|
34
48
|
- The policy gateway file (`AGENTS.md` or `CLAUDE.md`) MUST remain compact (target <= 250 lines).
|
|
35
49
|
- Detailed procedures MUST be placed in canonical modules listed in the gateway file.
|
|
36
50
|
- If a policy change needs >20 new lines in the gateway file, move detail to a module and keep only routing + hard gate in gateway.
|
|
37
51
|
|
|
52
|
+
<!-- /ap:fragment -->
|
|
53
|
+
<!-- ap:fragment id="policy.governance.hard_constraint.rule.quality" slot="hard_constraint" mutability="append_only" -->
|
|
54
|
+
|
|
38
55
|
## Rule quality
|
|
39
56
|
|
|
40
57
|
- MUST rules should be enforceable by tooling where possible.
|
|
41
58
|
- Non-enforceable guidance should be marked as SHOULD and kept out of hard-gate sections.
|
|
59
|
+
<!-- /ap:fragment -->
|
|
@@ -1,22 +1,8 @@
|
|
|
1
1
|
# Policy Incidents Log
|
|
2
2
|
|
|
3
3
|
- Append-only. Required fields: `id`, `date`, `scope`, `failure`, `rule`, `evidence`, `enforcement`, `state`; optional: `tags`, `match`, `advice`, `source_task`, `fixability`.
|
|
4
|
-
- id: INC-
|
|
5
|
-
- id: INC-
|
|
6
|
-
- id: INC-
|
|
7
|
-
- id: INC-
|
|
8
|
-
- id: INC-
|
|
9
|
-
- id: INC-20260419-02 | date: 2026-04-19 | scope: Short-circuit manual close-tail and hosted-close-pr flows when the canonical close commit is already present on main, so branch_pr users cannot create obsolete closure PRs after hosted automation has already closed the task. | tags: workflow | match: workflow, short, circuit, manual, close, tail, and, hosted, flows, when, the, canonical, commit, already, present, main | failure: After hosted closure landed on main, both manual finish --close-commit and task hosted-close-pr could still generate obsolete closure tails or PRs. | advice: Treat base-side canonical closure as a first-class no-op condition: skip branch_pr close-tail materialization when no fresh task artifacts remain, and short-circuit hosted-close-pr before any remote recovery calls when task status/commit already match the merged commit. | rule: Analogous Short-circuit manual close-tail and hosted-close-pr flows when the canonical close commit is already present on main, so branch_pr users cannot create obsolete closure PRs after hosted automation has already closed the task. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604191200-G7YHZY; commit fbc5422f0dfb | enforcement: manual | fixability: external | state: open
|
|
10
|
-
- id: INC-20260419-03 | date: 2026-04-19 | scope: Epic E′. Migrate the remaining CLI test consumers away from run-cli.test-helpers.ts and delete the shim once no imports remain. | tags: code, refactor, testkit | match: code, refactor, testkit, epic, migrate, the, remaining, cli, test, consumers, away, from, run, helpers, and, delete | failure: No imports reference run-cli.test-helpers.js under packages/agentplane/src; heavy CLI suites passed after rerunning unstable PR-flow files in single-worker mode; framework bootstrap refreshed the repo-local runtime after shim deletion. | advice: Validated the migrated CLI batches, removed the shim, rebuilt the repo-local runtime, and recorded the single-worker workaround needed for the two slow PR-flow suites. | rule: Analogous Epic E′. Migrate the remaining CLI test consumers away from run-cli.test-helpers.ts and delete the shim once no imports remain. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604191639-7SDT2H; commit e32f55f97171 | enforcement: manual | fixability: external | state: open
|
|
11
|
-
- id: INC-20260419-04 | date: 2026-04-19 | scope: Epic E′. Add shared tempRepo, mockTaskBackend, mockPrApi, and mockConfig fixtures in @agentplane/testkit and replace duplicated local helpers. | tags: code, refactor, testkit | match: code, refactor, testkit, epic, add, shared, temprepo, mocktaskbackend, mockprapi, and, mockconfig, fixtures, agentplane, replace, duplicated, local | failure: Introduced tempRepo, mockConfig, mockTaskBackend, and fake GH PR helpers in @agentplane/testkit; extended the agentplane testing compatibility layer; task-backend and targeted pr-flow PR consumers now use the shared fixtures and pass. | advice: Added shared fixture modules, exported them through testkit and the compatibility layer, then validated the new surface with testkit build plus focused task-backend and pr-flow PR tests. | rule: Analogous Epic E′. Add shared tempRepo, mockTaskBackend, mockPrApi, and mockConfig fixtures in @agentplane/testkit and replace duplicated local helpers. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604191639-DPNT53; commit 14c41a30bcdc | enforcement: manual | fixability: external | state: open
|
|
12
|
-
- id: INC-20260419-05 | date: 2026-04-19 | scope: Epic E′. Move describeWhenEnvPresent, describeCritical, and describeWhenNotHook helpers into @agentplane/testkit with typed exports. | tags: code, refactor, testkit | match: code, refactor, testkit, epic, move, describewhenenvpresent, describecritical, and, describewhennothook, helpers, into, agentplane, with, typed, exports, publish | failure: Added describeWhenEnvPresent, describeWhenNotHook, and describeCritical to @agentplane/testkit, exported them through the compatibility surface, and migrated the current redmine live, release/upgrade hook-gated, and CLI critical suites. | advice: Implemented typed wrappers in testkit, added explicit compatibility re-exports, rebuilt testkit, and validated all current consumers with focused Vitest coverage. | rule: Analogous Epic E′. Move describeWhenEnvPresent, describeCritical, and describeWhenNotHook helpers into @agentplane/testkit with typed exports. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604191639-PVRQFY; commit ad42ce782481 | enforcement: manual | fixability: external | state: open
|
|
13
|
-
- id: INC-20260419-06 | date: 2026-04-19 | scope: Epic A′. Switch config loading to the canonical Zod validator and keep compare-mode safety where still needed. | tags: code, refactor, schemas | match: code, refactor, schemas, epic, switch, config, loading, the, canonical, zod, validator, and, keep, compare, mode, safety | failure: Focused config tests, core typecheck, and core build all passed after the import and export surface change. | advice: No further action in this atom; remaining A′ work can build on the direct schema implementation surface. | rule: Analogous Epic A′. Switch config loading to the canonical Zod validator and keep compare-mode safety where still needed. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604191639-STZFC6; commit 82a313b2cab1 | enforcement: manual | fixability: external | state: open
|
|
14
|
-
- id: INC-20260420-01 | date: 2026-04-20 | scope: Audit CLI path resolution for global-install style layouts, fix any repo-local script path defects, and add regression tests that fail when installed CLI code resolves repository scripts from the global package location. | tags: bugfix, code, hooks | match: bugfix, code, hooks, audit, cli, path, resolution, for, global, install, style, layouts, fix, any, repo, local | failure: Audited import.meta.url/fileURLToPath candidates touching scripts/bin paths. The real repo-script risk was pre-push fallback returning a non-existent global prefix path; workflow-playbook's bin path is package-bundled and covered by existing workflow tests. | advice: Pre-push script resolution now returns repository-local script first, existing bundled fallback second, otherwise null with an actionable repository-local error message. | rule: Analogous Audit CLI path resolution for global-install style layouts, fix any repo-local script path defects, and add regression tests that fail when installed CLI code resolves repository scripts from the global package location. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604200850-9T6FTC; commit d30a706ce568 | enforcement: manual | fixability: external | state: open
|
|
15
|
-
- id: INC-20260422-01 | date: 2026-04-22 | scope: Runner prompt assembly only. Do not cache task-specific prompt content or mutable task state. | tags: cache, perf, runner | match: cache, perf, runner, prompt, assembly, only, not, task, specific, content, mutable, state, source, avoid, repeated, scanning | failure: Cached bundled agent templates, bundled policy gateway templates, and framework runner prompt assembly; repo-local policy/profile reads use mtime/size validation so changed files are not stale. | advice: Added regression coverage for repeated static prompt reuse and repo-local prompt cache invalidation. | rule: Analogous Runner prompt assembly only. Do not cache task-specific prompt content or mutable task state. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604220255-AQHZT4; commit 268c42af4447 | enforcement: manual | fixability: external | state: open
|
|
16
|
-
- id: INC-20260422-02 | date: 2026-04-22 | scope: Publish the next patch release containing the init cached recipe manifest compatibility fix and restored interactive init ASCII logo. | tags: ci, init, release | match: ci, init, release, publish, the, next, patch, containing, cached, recipe, manifest, compatibility, fix, and, restored, interactive | failure: Pre-push release-mode hook failed when inherited test execution changed shared git core.bare=true; restored local core.bare=false and confirmed remote tag v0.3.19 points at main merge commit 45ba9c57. | advice: Use hosted release workflow as publication evidence; record local hook pollution as a release-process follow-up rather than blocking this hotfix. | rule: Analogous Publish the next patch release containing the init cached recipe manifest compatibility fix and restored interactive init ASCII logo. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604221605-SQYRNQ; commit 45ba9c57f939 | enforcement: manual | fixability: external | state: open
|
|
17
|
-
- id: INC-20260422-03 | date: 2026-04-22 | scope: Create an executable v0.4 implementation task graph for modular prompt assembly, grouped into epics with atomic tasks and dependencies. | tags: architecture, planning, prompt-assembly, v0.4 | match: architecture, planning, prompt-assembly, v0.4, create, executable, implementation, task, graph, for, modular, prompt, assembly, grouped, into, epics | failure: task graph contains 30 new planned tasks plus the active decomposition task | advice: Validated with task list filtering, task file count, agentplane doctor, and git diff whitespace check | rule: Analogous Create an executable v0.4 implementation task graph for modular prompt assembly, grouped into epics with atomic tasks and dependencies. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604221536-1Z90V4; commit 3047ee2197c0 | enforcement: manual | fixability: external | state: open
|
|
18
|
-
- id: INC-20260423-01 | date: 2026-04-23 | scope: commit allowlist staging behavior and diagnostics for active task artifacts. Out of scope: broad commit policy rewrites or protected path model changes. | tags: code, git, workflow | match: code, git, workflow, commit, allowlist, staging, behavior, and, diagnostics, for, active, task, artifacts, out, scope, broad | failure: Ran bun run test:project -- cli-core packages/agentplane/src/cli/run-cli.core.guard.commit-wrapper.test.ts; bun run test:project -- guard; Prettier check for changed files. | advice: Added non-empty-index staging before guard validation and regression coverage. | rule: Analogous commit allowlist staging behavior and diagnostics for active task artifacts. Out of scope: broad commit policy rewrites or protected path model changes. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604230838-598K1H; commit afa741361351 | enforcement: manual | fixability: external | state: open
|
|
19
|
-
- id: INC-20260423-02 | date: 2026-04-23 | scope: generated guidance and default examples for test commands. Out of scope: rewriting historical release notes or changing user-supplied task verify commands. | tags: code, guidance, testing | match: code, guidance, testing, generated, and, default, examples, for, test, commands, out, scope, rewriting, historical, release, notes | failure: Ran bun run test:project -- cli-core packages/agentplane/src/cli/run-cli.core.tasks.scaffold-derive.test.ts; bun run workflows:command-check; bun run docs:cli:check; Prettier check for changed files. | advice: Updated task derive example/test fixture and expanded workflow command contract scanning to command specs. | rule: Analogous generated guidance and default examples for test commands. Out of scope: rewriting historical release notes or changing user-supplied task verify commands. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604230839-Y92ZJJ; commit 7e088c735372 | enforcement: manual | fixability: external | state: open
|
|
20
|
-
- id: INC-20260423-03 | date: 2026-04-23 | scope: Move managed hook shim readiness checks out of doctor/workspace.ts so hotspot gate passes after installed-user diagnostics additions. | tags: code, quality | match: code, quality, move, managed, hook, shim, readiness, checks, out, doctor, workspace, hotspot, gate, passes, after, installed | failure: Ran bun run hotspots:check; bun run test:project -- agentplane packages/agentplane/src/commands/doctor.command.runtime.test.ts; Prettier check for changed files. | advice: Extracted hook readiness diagnostics to doctor/hook-readiness.ts and updated oversized test baseline for already-grown warning files. | rule: Analogous Move managed hook shim readiness checks out of doctor/workspace.ts so hotspot gate passes after installed-user diagnostics additions. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604230949-E1BG2Q; commit 2fc331ddf503 | enforcement: manual | fixability: external | state: open
|
|
21
|
-
- id: INC-20260424-01 | date: 2026-04-24 | scope: Collapse parallel init UI routes into a single orchestrator, preserve non-TTY preset behavior, and remove obsolete interactive init compatibility flags. | tags: cli, init, v0.3 | match: cli, init, v0.3, collapse, into, single, orchestrator, preserve, non, tty, preset, behavior, and, remove, obsolete, interactive | failure: Unified orchestrator now uses one answer/apply flow for Clack, --yes, plain prompt mode, and non-TTY setup profiles. | advice: Remove legacy compatibility aliases from the public init surface; keep default TTY, --yes, non-TTY, and AGENTPLANE_PROMPTS=plain routes covered. | rule: Analogous Collapse parallel init UI routes into a single orchestrator, preserve non-TTY preset behavior, and remove obsolete interactive init compatibility flags. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604241136-RTDFZS; commit 174837465c08 | enforcement: manual | fixability: external | state: open
|
|
22
|
-
- id: INC-20260424-02 | date: 2026-04-24 | scope: Implement repo-neutral workflow scope, artifact and package gates, sanitized build manifest, init recipe install paths, roadmap 0.6, and current-code documentation cleanup. | tags: code | match: code, implement, repo, neutral, workflow, scope, artifact, and, package, gates, sanitized, build, manifest, init, recipe, install | failure: node .agentplane/policy/check-routing.mjs, artifact/task/package gates, local tarball install smoke, docs freshness checks, focused init/runtime tests, typecheck, lint, doctor, and bun run release:ci-check all passed. | advice: Implemented gates, docs/runtime updates, sanitized npm manifest flow, init recipe install path capture, and roadmap 0.6 eval-system entry. | rule: Analogous Implement repo-neutral workflow scope, artifact and package gates, sanitized build manifest, init recipe install paths, roadmap 0.6, and current-code documentation cleanup. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604241914-FRBSYS; commit 2315c795be6a | enforcement: manual | fixability: external | state: open
|
|
4
|
+
- id: INC-20260422-02 | date: 2026-04-22 | scope: release-mode hook environment pollution | tags: ci, release, hooks | match: ci, release, hooks, pre-push, core.bare, git config, inherited, test, pollution | failure: A release-mode pre-push hook inherited test-modified git config (`core.bare=true`) and blocked local release verification until the repository config was manually restored. | advice: Isolate git config mutations in release/hook tests and make release-mode hook diagnostics identify polluted repository git config before treating the release payload as broken. | rule: Release and hook verification MUST distinguish polluted local git config from release payload failures. | evidence: task 202604221605-SQYRNQ; commit 45ba9c57f939 | enforcement: manual | fixability: repo-fixable | state: open
|
|
5
|
+
- id: INC-20260428-01 | date: 2026-04-28 | scope: release and hosted-close verification evidence reconciliation | tags: branch-pr, release, hosted-close, verification | match: branch-pr, code, workflow, hosted, close, release, evidence, verification, pending, done | failure: Release evidence reconciliation is not fully fixed: `release-task-evidence apply` writes `verification.state=ok` for new evidence, but legacy `DONE` tasks with pending verification artifacts are widespread and need a migration-aware invariant. | advice: Add a scoped release/hosted evidence reconciliation check that applies only to new release tasks or provides an explicit baseline for legacy `DONE` plus pending artifacts. | rule: Release and hosted-close flows MUST NOT present newly closed tasks as `DONE` with pending verification when closure evidence exists. | evidence: task 202604281616-WG87DQ; commit c02ef92ed563 | enforcement: manual | fixability: repo-fixable | state: stabilized
|
|
6
|
+
- id: INC-20260430-01 | date: 2026-04-30 | scope: Make release hygiene pass by reconciling generated project agent and policy mirrors with canonical framework prompt assets after the fragmented prompt migration. Scope is limited to sync output and any minimal follow-up needed for agents:check. | tags: agents, policy, release | match: agents, policy, release, make, hygiene, pass, reconciling, generated, project, agent, and, mirrors, with, canonical, framework, prompt | failure: bun run agents:check initially failed because target .agentplane agent and policy mirrors lagged the canonical fragmented prompt assets. | advice: Ran bun run agents:sync and verified the generated mirror output. | rule: Analogous Make release hygiene pass by reconciling generated project agent and policy mirrors with canonical framework prompt assets after the fragmented prompt migration. Scope is limited to sync output and any minimal follow-up needed for agents:check. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604300724-ZTGZYT; commit ac0e1ff930ed | enforcement: manual | fixability: external | state: open
|
|
7
|
+
- id: INC-20260429-01 | date: 2026-04-29 | scope: recipe manifest/project overlay parsing for prompt module declarations and mutation sets. | tags: code, prompt-assembly, recipes, schemas | match: code, prompt-assembly, recipes, schemas, recipe, manifest, project, overlay, parsing, for, prompt, module, declarations, and, mutation, sets | failure: Checks passed: bun test packages/agentplane/src/commands/recipes/impl/project-installed-recipes.test.ts packages/agentplane/src/commands/recipes/impl/resolver.test.ts packages/agentplane/src/commands/recipes.transaction.test.ts packages/agentplane/src/runtime/prompt-modules/mutations.test.ts; bun run typecheck; git diff --check; bun run framework:dev:bootstrap; agentplane doctor; extra bun test packages/recipes/src/index.test.ts packages/recipes/src/overlay.test.ts; targeted eslint on touched files. | advice: No prompt graph application was added in this step; that remains for the dependent recipe application task. | rule: Analogous recipe manifest/project overlay parsing for prompt module declarations and mutation sets. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604291531-Z6XH6Q; commit c69211301720 | enforcement: manual | fixability: external | state: open
|
|
8
|
+
- id: INC-20260429-02 | date: 2026-04-29 | scope: apply active recipe prompt module mutations during project overlay/prompt graph refresh. | tags: code, prompt-assembly, recipes, workflow | match: code, prompt-assembly, recipes, workflow, apply, active, recipe, prompt, module, mutations, during, project, overlay, graph, refresh, compiled | failure: Checks passed: agentplane doctor; bun run framework:dev:bootstrap; bun run typecheck; bun test packages/agentplane/src/commands/recipes/impl/overlay-project.test.ts packages/agentplane/src/commands/recipes.transaction.test.ts packages/agentplane/src/commands/recipes.catalog-install.test.ts packages/agentplane/src/runtime/prompt-modules/compiler.test.ts; git diff --check; extra bun test packages/agentplane/src/commands/recipes/impl/project-installed-recipes.test.ts; targeted eslint on touched files. | advice: Runner/runtime consumption and drift diagnostics remain scoped to the following diagnostic task. | rule: Analogous apply active recipe prompt module mutations during project overlay/prompt graph refresh. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604291531-N0H28A; commit ac327dd2b0c1 | enforcement: manual | fixability: external | state: open
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
<!-- ap:fragment id="policy.security.must.hard_constraint.security.must.rules" slot="hard_constraint" mutability="append_only" -->
|
|
2
|
+
|
|
1
3
|
# Security MUST Rules
|
|
2
4
|
|
|
3
5
|
- MUST NOT commit secrets, credentials, or private keys.
|
|
@@ -5,3 +7,4 @@
|
|
|
5
7
|
- MUST NOT perform network actions when approval is required and not granted.
|
|
6
8
|
- MUST NOT modify auth/crypto/security-critical codepaths without explicit scope approval.
|
|
7
9
|
- MUST report security-sensitive drift immediately and stop before mutation.
|
|
10
|
+
<!-- /ap:fragment -->
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
<!-- ap:fragment id="policy.workflow.branch_pr.workflow.workflow.branch_pr" slot="workflow" mutability="replaceable" -->
|
|
2
|
+
|
|
1
3
|
# Workflow: branch_pr
|
|
2
4
|
|
|
3
5
|
Use this module when `workflow_mode=branch_pr`.
|
|
4
6
|
|
|
7
|
+
<!-- /ap:fragment -->
|
|
8
|
+
<!-- ap:fragment id="policy.workflow.branch_pr.workflow.required.sequence" slot="workflow" mutability="replaceable" -->
|
|
9
|
+
|
|
5
10
|
## Required sequence
|
|
6
11
|
|
|
7
12
|
1. CHECKPOINT A: plan/approve on base checkout.
|
|
@@ -14,6 +19,9 @@ Use this module when `workflow_mode=branch_pr`.
|
|
|
14
19
|
8. CHECKPOINT C: finish task(s) on base with verification evidence.
|
|
15
20
|
9. Remove merged task branches/worktrees once the hosted-close/finish route has landed.
|
|
16
21
|
|
|
22
|
+
<!-- /ap:fragment -->
|
|
23
|
+
<!-- ap:fragment id="policy.workflow.branch_pr.commands.command.contract" slot="commands" mutability="replaceable" -->
|
|
24
|
+
|
|
17
25
|
## Command contract
|
|
18
26
|
|
|
19
27
|
```bash
|
|
@@ -22,10 +30,13 @@ agentplane task start-ready <task-id> --author <ROLE> --body "Start: ..."
|
|
|
22
30
|
agentplane pr open <task-id> --branch task/<task-id>/<slug> --author <ROLE>
|
|
23
31
|
agentplane pr update <task-id>
|
|
24
32
|
agentplane verify <task-id> --ok|--rework --by <ROLE> --note "..."
|
|
25
|
-
agentplane integrate <task-id> --branch task/<task-id>/<slug> --
|
|
33
|
+
agentplane integrate <task-id> --branch task/<task-id>/<slug> --run-verify
|
|
26
34
|
agentplane finish <task-id> --author INTEGRATOR --body "Verified: ..." --result "..." --commit <git-rev> --close-commit
|
|
27
35
|
```
|
|
28
36
|
|
|
37
|
+
<!-- /ap:fragment -->
|
|
38
|
+
<!-- ap:fragment id="policy.workflow.branch_pr.hard_constraint.constraints" slot="hard_constraint" mutability="append_only" -->
|
|
39
|
+
|
|
29
40
|
## Constraints
|
|
30
41
|
|
|
31
42
|
- MUST NOT perform mutating actions before explicit user approval.
|
|
@@ -33,9 +44,11 @@ agentplane finish <task-id> --author INTEGRATOR --body "Verified: ..." --result
|
|
|
33
44
|
- MUST run `task plan approve` then `task start-ready` as `Step 1 -> wait -> Step 2` (never parallel).
|
|
34
45
|
- In `branch_pr`, `task start-ready`, `pr open`, `pr update`, and verification commands SHOULD be run from the task worktree created by `work start`.
|
|
35
46
|
- `pr open` without `--sync-only` SHOULD complete in one pass: sync local artifacts, auto-publish the task branch to `origin` when it has no upstream yet, then create/link the remote GitHub PR.
|
|
47
|
+
- `integrate` defaults to the `merge` strategy so task branch commits stay in base history. Use `--merge-strategy squash` only when intentionally compacting branch history.
|
|
36
48
|
- `task start-ready` MAY surface targeted incident advice for analogous scope/tags; follow it before widening scope.
|
|
37
49
|
- 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.
|
|
38
50
|
- MUST stop and request re-approval on material drift.
|
|
39
51
|
- Planning and closure happen on base checkout.
|
|
40
52
|
- Do not export task snapshots from task branches.
|
|
41
53
|
- After merged closure, remove stale task branches/worktrees via the cleanup route instead of leaving orphaned local state behind.
|
|
54
|
+
<!-- /ap:fragment -->
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
<!-- ap:fragment id="policy.workflow.direct.workflow.workflow.direct" slot="workflow" mutability="replaceable" -->
|
|
2
|
+
|
|
1
3
|
# Workflow: direct
|
|
2
4
|
|
|
3
5
|
Use this module when `workflow_mode=direct`.
|
|
4
6
|
|
|
7
|
+
<!-- /ap:fragment -->
|
|
8
|
+
<!-- ap:fragment id="policy.workflow.direct.workflow.required.sequence" slot="workflow" mutability="replaceable" -->
|
|
9
|
+
|
|
5
10
|
## Required sequence
|
|
6
11
|
|
|
7
12
|
1. CHECKPOINT A: run preflight and publish summary.
|
|
@@ -17,6 +22,9 @@ Use this module when `workflow_mode=direct`.
|
|
|
17
22
|
8. Record verification result (`agentplane verify ...`) for the task scope.
|
|
18
23
|
9. CHECKPOINT C: finish task with traceable evidence.
|
|
19
24
|
|
|
25
|
+
<!-- /ap:fragment -->
|
|
26
|
+
<!-- ap:fragment id="policy.workflow.direct.commands.command.contract" slot="commands" mutability="replaceable" -->
|
|
27
|
+
|
|
20
28
|
## Command contract
|
|
21
29
|
|
|
22
30
|
```bash
|
|
@@ -28,6 +36,9 @@ agentplane verify <task-id> --ok|--rework --by <ROLE> --note "..."
|
|
|
28
36
|
agentplane finish <task-id> --author <ROLE> --body "Verified: ..." --result "..." --commit <git-rev>
|
|
29
37
|
```
|
|
30
38
|
|
|
39
|
+
<!-- /ap:fragment -->
|
|
40
|
+
<!-- ap:fragment id="policy.workflow.direct.workflow.error.recovery" slot="workflow" mutability="replaceable" -->
|
|
41
|
+
|
|
31
42
|
## ERROR RECOVERY
|
|
32
43
|
|
|
33
44
|
If any step fails:
|
|
@@ -40,6 +51,9 @@ If any step fails:
|
|
|
40
51
|
4. Request re-approval before scope/risk changes.
|
|
41
52
|
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
53
|
|
|
54
|
+
<!-- /ap:fragment -->
|
|
55
|
+
<!-- ap:fragment id="policy.workflow.direct.hard_constraint.constraints" slot="hard_constraint" mutability="append_only" -->
|
|
56
|
+
|
|
43
57
|
## Constraints
|
|
44
58
|
|
|
45
59
|
- MUST NOT perform mutating actions before explicit user approval.
|
|
@@ -51,3 +65,4 @@ If any step fails:
|
|
|
51
65
|
- MUST stop and request re-approval on material drift.
|
|
52
66
|
- Do not use worktrees in direct mode.
|
|
53
67
|
- Do not perform `branch_pr`-only operations.
|
|
68
|
+
<!-- /ap:fragment -->
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
<!-- ap:fragment id="policy.workflow.workflow.workflow.policy.index" slot="workflow" mutability="replaceable" -->
|
|
2
|
+
|
|
1
3
|
# Workflow Policy Index
|
|
2
4
|
|
|
3
5
|
This document is an index for workflow procedures.
|
|
@@ -7,3 +9,4 @@ Use `AGENTS.md` load rules to decide which module to read.
|
|
|
7
9
|
- Branch PR workflow: `.agentplane/policy/workflow.branch_pr.md`
|
|
8
10
|
- Release workflow: `.agentplane/policy/workflow.release.md`
|
|
9
11
|
- Upgrade workflow: `.agentplane/policy/workflow.upgrade.md`
|
|
12
|
+
<!-- /ap:fragment -->
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
<!-- ap:fragment id="policy.workflow.release.workflow.workflow.release" slot="workflow" mutability="replaceable" -->
|
|
2
|
+
|
|
1
3
|
# Workflow: release
|
|
2
4
|
|
|
3
5
|
Use this module when task touches release/version/publish flows.
|
|
4
6
|
|
|
7
|
+
<!-- /ap:fragment -->
|
|
8
|
+
<!-- ap:fragment id="policy.workflow.release.workflow.required.sequence" slot="workflow" mutability="replaceable" -->
|
|
9
|
+
|
|
5
10
|
## Required sequence
|
|
6
11
|
|
|
7
12
|
1. CHECKPOINT A: confirm clean tracked tree and approved scope.
|
|
@@ -11,6 +16,9 @@ Use this module when task touches release/version/publish flows.
|
|
|
11
16
|
5. CHECKPOINT C: choose the workflow-specific publication route after all gates pass.
|
|
12
17
|
6. Record release evidence (commands, outputs, resulting version/tag).
|
|
13
18
|
|
|
19
|
+
<!-- /ap:fragment -->
|
|
20
|
+
<!-- ap:fragment id="policy.workflow.release.commands.command.contract" slot="commands" mutability="replaceable" -->
|
|
21
|
+
|
|
14
22
|
## Command contract
|
|
15
23
|
|
|
16
24
|
```bash
|
|
@@ -24,6 +32,9 @@ agentplane verify <task-id> --ok|--rework --by <ROLE> --note "Release checks: ..
|
|
|
24
32
|
agentplane finish <task-id> --author <ROLE> --body "Verified: release" --result "Release <v> published" --commit <git-rev> --close-commit
|
|
25
33
|
```
|
|
26
34
|
|
|
35
|
+
<!-- /ap:fragment -->
|
|
36
|
+
<!-- ap:fragment id="policy.workflow.release.hard_constraint.constraints" slot="hard_constraint" mutability="append_only" -->
|
|
37
|
+
|
|
27
38
|
## Constraints
|
|
28
39
|
|
|
29
40
|
- MUST NOT perform irreversible release actions before explicit approval.
|
|
@@ -32,3 +43,4 @@ agentplane finish <task-id> --author <ROLE> --body "Verified: release" --result
|
|
|
32
43
|
- MUST stop and request re-approval if release scope/tag/version changes.
|
|
33
44
|
- In `direct`, `release apply --push --yes` is the publication route and may create/push the release tag.
|
|
34
45
|
- In `branch_pr`, `release apply` is not the publication route; use `release candidate --push --yes`, merge the candidate into the protected base branch, then let hosted publish run from `main`.
|
|
46
|
+
<!-- /ap:fragment -->
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
<!-- ap:fragment id="policy.workflow.upgrade.workflow.workflow.upgrade" slot="workflow" mutability="replaceable" -->
|
|
2
|
+
|
|
1
3
|
# Workflow: upgrade
|
|
2
4
|
|
|
3
5
|
Use this module when task runs `agentplane upgrade` or touches `.agentplane/.upgrade/**`.
|
|
4
6
|
|
|
7
|
+
<!-- /ap:fragment -->
|
|
8
|
+
<!-- ap:fragment id="policy.workflow.upgrade.workflow.required.sequence" slot="workflow" mutability="replaceable" -->
|
|
9
|
+
|
|
5
10
|
## Required sequence
|
|
6
11
|
|
|
7
12
|
1. Run upgrade command and capture run directory.
|
|
@@ -14,7 +19,11 @@ Use this module when task runs `agentplane upgrade` or touches `.agentplane/.upg
|
|
|
14
19
|
6. Verify policy/agent consistency and routing checks.
|
|
15
20
|
7. Record run path and reviewed files in task notes.
|
|
16
21
|
|
|
22
|
+
<!-- /ap:fragment -->
|
|
23
|
+
<!-- ap:fragment id="policy.workflow.upgrade.check.minimum.verification" slot="check" mutability="append_only" -->
|
|
24
|
+
|
|
17
25
|
## Minimum verification
|
|
18
26
|
|
|
19
27
|
- `node .agentplane/policy/check-routing.mjs`
|
|
20
28
|
- `agentplane agents`
|
|
29
|
+
<!-- /ap:fragment -->
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"schema_version": 1,
|
|
3
3
|
"manifest_kind": "package",
|
|
4
4
|
"package_name": "agentplane",
|
|
5
|
-
"package_version": "0.
|
|
6
|
-
"git_head": "
|
|
7
|
-
"watched_runtime_snapshot_hash": "
|
|
5
|
+
"package_version": "0.4.0",
|
|
6
|
+
"git_head": "060b70ca465b780337c2ec9da035fc66e615803f",
|
|
7
|
+
"watched_runtime_snapshot_hash": "82fa091f9239f2e026072e502e8a3ca48fe8e84136b5e568cfd7f880579add53"
|
|
8
8
|
}
|