agentplane 0.6.1 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/assets/AGENTS.md CHANGED
@@ -19,7 +19,6 @@ Detailed procedures live in canonical modules from `## CANONICAL DOCS`.
19
19
  ## PROJECT
20
20
 
21
21
  - Repository type: user project initialized with `agentplane`.
22
- - Gateway role: keep this file compact and deterministic; move scenario-specific details to policy modules.
23
22
  - CLI rule: prefer `ap` for compact agent-oriented commands; fall back to `agentplane`; if neither is available, stop and request installation guidance (do not invent repo-local entrypoints).
24
23
  - Startup shortcut: run `## COMMANDS -> Preflight`, then use `ap quickstart`; activate `ap role ORCHESTRATOR` for planning and `ap role <ROLE>` for the active owner before owner-scoped execution; then apply `## LOAD RULES` before any mutation. The guarded route is determined by `workflow.mode` in `.agentplane/WORKFLOW.md`; use `ap quickstart` as the canonical summary of the active path before mutating. In `branch_pr`, start from `ap work start ... --worktree`; in `direct`, stay in the current checkout and use the task lifecycle route.
25
24
 
@@ -85,6 +84,7 @@ git commit -m "Implement <task>"
85
84
  ap task verify-show <task-id>
86
85
  ap pr open <task-id> --branch task/<task-id>/<slug> --author <ROLE>
87
86
  ap verify <task-id> --ok|--rework --by <ROLE> --note "..."
87
+ ap verify <task-id> --ok|--rework --by EVALUATOR --note "..." # verify --by EVALUATOR
88
88
  ap integrate <task-id> --branch task/<task-id>/<slug> --run-verify
89
89
  ap finish <task-id> --author INTEGRATOR --body "Verified: ..." --result "..." --commit <git-rev> --close-commit
90
90
  ```
@@ -145,7 +145,8 @@ Condition: task includes mutation (file edits, task-state changes, commits, merg
145
145
  5. IF task modifies implementation code paths THEN LOAD `@.agentplane/policy/dod.code.md`.
146
146
  6. IF task modifies docs/policy-only paths (`AGENTS.md`, docs, `.agentplane/policy/**`) THEN LOAD `@.agentplane/policy/dod.docs.md`.
147
147
  7. IF task modifies policy files (`AGENTS.md` or `.agentplane/policy/**`) THEN LOAD `@.agentplane/policy/governance.md`.
148
- 8. IF task modifies `.agentplane/policy/incidents.md` THEN LOAD `@.agentplane/policy/incidents.md`.
148
+ 8. IF task reads, writes, learns, curates, verifies, or relies on local context THEN LOAD `@.agentplane/policy/context.must.md`.
149
+ 9. IF task modifies `.agentplane/policy/incidents.md` THEN LOAD `@.agentplane/policy/incidents.md`.
149
150
 
150
151
  Routing constraints:
151
152
 
@@ -172,6 +173,7 @@ Routing constraints:
172
173
  - MUST stage/commit only intentional changes for the active task scope.
173
174
  - MUST stop and request re-approval when scope, risk, or verification criteria materially drift.
174
175
  - MUST NOT let ORCHESTRATOR perform owner-scoped implementation or verification once a task owner is known, unless the approved plan explicitly makes ORCHESTRATOR the owner.
176
+ - MUST treat user-authenticated GitHub actions as user-attributed publication and route post-merge fixes through a new task or explicit `post-merge-` branch or `followup` slug token.
175
177
 
176
178
  Role boundaries: ORCHESTRATOR = preflight + plan + approvals; PLANNER = executable task graph creation/update; INTEGRATOR = base integration/finish in `branch_pr`.
177
179
 
@@ -218,14 +220,13 @@ Detailed DoD rules are in `.agentplane/policy/dod.core.md`, `.agentplane/policy/
218
220
  - DOC `.agentplane/policy/workflow.release.md`
219
221
  - DOC `.agentplane/policy/workflow.upgrade.md`
220
222
  - DOC `.agentplane/policy/security.must.md`
223
+ - DOC `.agentplane/policy/context.must.md`
221
224
  - DOC `.agentplane/policy/dod.core.md`
222
225
  - DOC `.agentplane/policy/dod.code.md`
223
226
  - DOC `.agentplane/policy/dod.docs.md`
224
227
  - DOC `.agentplane/policy/governance.md`
225
228
  - DOC `.agentplane/policy/incidents.md`
226
229
 
227
- ---
228
-
229
230
  <!-- /ap:fragment -->
230
231
  <!-- ap:fragment id="gateway.agents.example.reference.examples" slot="example" mutability="replaceable" -->
231
232
 
@@ -0,0 +1,67 @@
1
+ <!-- ap:fragment id="policy.context.must.body.context.must" slot="body" mutability="replaceable" -->
2
+
3
+ # Context MUST Rules
4
+
5
+ Use this module when a task reads, writes, learns, curates, verifies, or relies on AgentPlane local context.
6
+
7
+ Local context means `context/wiki/**`, `context/facts/**`, `context/graph/**`, `context/capabilities/**`, `context/raw/**`, and `.agentplane/context/**`.
8
+
9
+ <!-- /ap:fragment -->
10
+ <!-- ap:fragment id="policy.context.must.hard_constraint.source.first" slot="hard_constraint" mutability="append_only" -->
11
+
12
+ ## Source-first contract
13
+
14
+ - MUST search existing context before creating new wiki pages, facts, graph entities, capabilities, or aliases.
15
+ - MUST prefer updating an existing canonical page/entity over creating duplicates.
16
+ - MUST keep raw source material, synthesized wiki prose, structured facts/graph rows, and capability notes distinct.
17
+ - MUST mark facts, decisions, risks, workflows, and definitions with source refs or an explicit no-source reason.
18
+ - MUST preserve conflicts and open questions instead of flattening contradictory sources into one unsourced claim.
19
+
20
+ <!-- /ap:fragment -->
21
+ <!-- ap:fragment id="policy.context.must.commands.command.contract" slot="commands" mutability="replaceable" -->
22
+
23
+ ## Command contract
24
+
25
+ ```bash
26
+ ap context search "<query>"
27
+ ap context show <ref>
28
+ ap context learn changes
29
+ ap context learn files <path> [--run]
30
+ ap context wiki lint <path>
31
+ ap context wiki explain <path>
32
+ ap context wiki link <path>
33
+ ap context wiki index context/wiki
34
+ ap context check
35
+ ap context doctor
36
+ ap context verify-task <task-id>
37
+ ```
38
+
39
+ - Use `search` for discovery and `show` for exact source readback.
40
+ - Use `learn` to create context assimilation tasks instead of ad hoc memory writes.
41
+ - Use wiki lint/explain/link/index when adding or changing wiki pages.
42
+ - Run `verify-task` before closing tasks that create or rely on context artifacts.
43
+
44
+ <!-- /ap:fragment -->
45
+ <!-- ap:fragment id="policy.context.must.hard_constraint.write.boundaries" slot="hard_constraint" mutability="append_only" -->
46
+
47
+ ## Write boundaries
48
+
49
+ - MUST NOT manually edit `.agentplane/context/derived/**`; rebuild projections through context commands.
50
+ - MUST NOT write private raw content into public wiki pages, task summaries, ACRs, reports, or incident advice.
51
+ - MUST NOT treat `context/raw/private/**` as publishable context.
52
+ - MUST NOT create glossary-only truth; glossary entries are aliases/navigation over wiki pages and graph entities.
53
+ - SHOULD use proposal-before-promotion for harvested or inferred context when provenance, staleness, or conflicts are not clean.
54
+
55
+ <!-- /ap:fragment -->
56
+ <!-- ap:fragment id="policy.context.must.check.dod" slot="check" mutability="append_only" -->
57
+
58
+ ## Context DoD
59
+
60
+ Context work is done only when:
61
+
62
+ 1. Existing context was searched or a concrete skip reason was recorded.
63
+ 2. New or changed factual claims have source refs or explicit no-source reasons.
64
+ 3. Wiki links/indexes were refreshed when pages were added, moved, or materially renamed.
65
+ 4. Derived projection checks were run or skipped with reason and risk.
66
+ 5. `ap context verify-task <task-id>` passed for task-bound context work.
67
+ <!-- /ap:fragment -->
@@ -0,0 +1,20 @@
1
+ <!-- ap:fragment id="policy.framework_dev.body.framework.dev" slot="body" mutability="replaceable" -->
2
+
3
+ # Framework Development Policy
4
+
5
+ Use this module only inside the AgentPlane framework checkout.
6
+
7
+ This module is intentionally excluded from normal initialized repositories and must load only when
8
+ the prompt-module compiler context has `repo_type=framework`.
9
+
10
+ <!-- /ap:fragment -->
11
+ <!-- ap:fragment id="policy.framework_dev.hard_constraint.framework.scope" slot="hard_constraint" mutability="append_only" -->
12
+
13
+ ## Framework Scope
14
+
15
+ - MUST treat `packages/agentplane/bin/agentplane.js` as the canonical direct repo-local CLI entrypoint.
16
+ - MUST keep framework-only commands unavailable outside framework checkouts, not merely hidden from normal help.
17
+ - MUST run `bun run framework:dev:bootstrap` after changes to watched runtime, CLI, prompt, or built asset surfaces before relying on repo-local runtime parity.
18
+ - MUST NOT require installed user repositories to depend on framework helper scripts.
19
+
20
+ <!-- /ap:fragment -->
@@ -53,6 +53,11 @@ agentplane integrate <task-id> --branch task/<task-id>/<slug> --run-verify
53
53
  agentplane finish <task-id> --author INTEGRATOR --body "Verified: ..." --result "..." --commit <git-rev> --close-commit
54
54
  ```
55
55
 
56
+ Default branch names are `task/<task-id>/<slug>` for implementation branches and
57
+ `task-close/<task-id>/<sha12>` for close-tail branches. Repositories MAY override only the prefixes
58
+ through `branch.task_prefix` and `branch.task_close_prefix`; task id, slug, and sha positions remain
59
+ fixed.
60
+
56
61
  <!-- /ap:fragment -->
57
62
  <!-- ap:fragment id="policy.workflow.branch_pr.hard_constraint.constraints" slot="hard_constraint" mutability="append_only" -->
58
63
 
@@ -73,6 +78,14 @@ agentplane finish <task-id> --author INTEGRATOR --body "Verified: ..." --result
73
78
  after the first green rollup), then merge it through GitHub. If auto-merge remains blocked
74
79
  after stable green checks, the agent MUST continue with the permitted GitHub merge route
75
80
  available to its credentials instead of stopping at enabled auto-merge.
81
+ - Claude Code and other agents that inherit the user's GitHub session MUST treat `gh pr merge`,
82
+ GitHub UI merge, and auto-merge enablement as user-attributed publication. Before using those
83
+ actions, verify the integration queue/handoff route, stable hosted checks, and explicit approval
84
+ for the merge lane; record the GitHub PR number and merge commit in task artifacts after merge.
85
+ - If a task is already `DONE` and needs a post-merge fix, create a new task unless the follow-up
86
+ branch slug explicitly starts with `post-merge-` or uses `followup` as a separate slug token
87
+ bounded by the start, end, or hyphens; generic slugs under an already closed task id are treated
88
+ as conflicting closure attempts.
76
89
  - `integrate` defaults to the `merge` strategy so task branch commits stay in base history. Use `--merge-strategy squash` only when intentionally compacting branch history.
77
90
  - When several task PRs are ready together, use the integration queue so only one branch owns the merge lane; agents waiting behind `claimed` or `handoff` entries SHOULD use bounded polling (`--wait --poll-interval-ms 30000 --timeout-ms 600000`) instead of retrying ad hoc; stale branch heads move to rework instead of blocking later queued work.
78
91
  - `task start-ready` MAY surface targeted incident advice for analogous scope/tags; follow it before widening scope.
@@ -2,7 +2,7 @@
2
2
  "schema_version": 1,
3
3
  "manifest_kind": "package",
4
4
  "package_name": "agentplane",
5
- "package_version": "0.6.1",
6
- "git_head": "03acb7398ddfef745f284a32090ede8e45df99be",
7
- "watched_runtime_snapshot_hash": "d2e990c9cc895be015699b09250b8cde95ddd334c71fbdc9fc283c7375fe26e6"
5
+ "package_version": "0.6.3",
6
+ "git_head": "2a1e5c63023996dd79e8b16c0b2c7e7472930a24",
7
+ "watched_runtime_snapshot_hash": "72dfe5aa78b3f08c313ec6b43c7c000ff08d5615db9e7e0d77835f9102afa091"
8
8
  }