planr 1.10.0-alpha.2 → 1.10.0-alpha.4

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.
Files changed (45) hide show
  1. package/docs/ARCHITECTURE.md +43 -7
  2. package/docs/RELEASE.md +20 -6
  3. package/docs/SWITCHLOOM_COMPATIBILITY.md +1 -1
  4. package/docs/contracts/EVAL_CONTRACT_V1.md +1 -1
  5. package/docs/contracts/EVIDENCE_CONTRACT_V1.md +3 -2
  6. package/docs/contracts/V1_1_DIFFERENTIATION_CONTRACT.md +16 -16
  7. package/docs/contracts/fixtures/evidence/v1/examples/evidence-policy.json +1 -10
  8. package/docs/contracts/fixtures/evidence/v1/examples/proof-obligation.json +0 -12
  9. package/docs/contracts/fixtures/evidence/v1/examples/proof-preset.json +0 -9
  10. package/docs/contracts/fixtures/evidence/v1/negative/adapter-registration-missing-execution-contract.json +0 -9
  11. package/docs/contracts/fixtures/evidence/v1/negative/policy-default-preset-unregistered.json +0 -9
  12. package/docs/contracts/fixtures/evidence/v1/negative/policy-weakening-without-waiver.json +0 -9
  13. package/docs/contracts/fixtures/evidence/v1/schemas/evidence-contract-v1.schema.json +2 -22
  14. package/docs/documentation/COVERAGE.md +4 -4
  15. package/docs/documentation/INFORMATION_ARCHITECTURE.md +2 -2
  16. package/docs/fixtures/mcp-contract.json +8 -4
  17. package/npm/native/darwin-arm64/planr +0 -0
  18. package/npm/native/darwin-arm64/planr-host-capability-validator +0 -0
  19. package/npm/native/darwin-x86_64/planr +0 -0
  20. package/npm/native/darwin-x86_64/planr-host-capability-validator +0 -0
  21. package/npm/native/linux-arm64/planr +0 -0
  22. package/npm/native/linux-arm64/planr-host-capability-validator +0 -0
  23. package/npm/native/linux-x86_64/planr +0 -0
  24. package/npm/native/linux-x86_64/planr-host-capability-validator +0 -0
  25. package/package.json +1 -1
  26. package/plugins/planr/.claude-plugin/plugin.json +1 -1
  27. package/plugins/planr/.codex-plugin/plugin.json +1 -1
  28. package/plugins/planr/agents/pi/planr-reviewer.md +8 -4
  29. package/plugins/planr/agents/pi/planr-worker.md +28 -5
  30. package/plugins/planr/agents/planr-reviewer.md +11 -7
  31. package/plugins/planr/agents/planr-worker.md +29 -4
  32. package/plugins/planr/skills/planr/SKILL.md +9 -2
  33. package/plugins/planr/skills/planr-goal/SKILL.md +2 -0
  34. package/plugins/planr/skills/planr-loop/SKILL.md +19 -12
  35. package/plugins/planr/skills/planr-loop/agents/planr-reviewer.md +11 -7
  36. package/plugins/planr/skills/planr-loop/agents/planr-worker.md +28 -4
  37. package/plugins/planr/skills/planr-loop/references/host-dispatch.md +53 -5
  38. package/plugins/planr/skills/planr-loop/references/recovery-and-verification.md +3 -1
  39. package/plugins/planr/skills/planr-plan/SKILL.md +2 -0
  40. package/plugins/planr/skills/planr-review/SKILL.md +10 -10
  41. package/plugins/planr/skills/planr-status/SKILL.md +1 -1
  42. package/plugins/planr/skills/planr-summary/SKILL.md +2 -0
  43. package/plugins/planr/skills/planr-task-graph/SKILL.md +9 -3
  44. package/plugins/planr/skills/planr-verify-web/SKILL.md +25 -28
  45. package/plugins/planr/skills/planr-work/SKILL.md +19 -11
@@ -22,24 +22,26 @@ Planr V1 is a single Rust binary with explicit module ownership. The crate stays
22
22
  - `src/app/commands.rs`: general CLI use-case orchestration. Owns project, plan, map, item, link, pick, approval, log, close, review, context, search, doctor, and shared install command handlers.
23
23
  - `src/app/grok.rs`: Grok-specific install orchestration. Owns safe project TOML reconciliation, repository workflow writes, and the explicit no-hooks result.
24
24
  - `src/app/prompts.rs`: CLI, MCP, and HTTP prompt output. Host routing prompt composition remains in `src/app/agents.rs`.
25
- - `src/app/flow.rs`: compound work-flow boundary. Owns evidence log writing (with heartbeat folding), the close transition core, review-request creation, the pick work packet, and the `done` command that chains them for CLI, HTTP, and MCP surfaces.
25
+ - `src/app/flow.rs`: compound workflow boundary. Owns evidence log writing (with heartbeat folding), canonical FeatureRun settlement input normalization, the close transition core, the pick work packet, and the `done` command shared by CLI, HTTP, and MCP surfaces.
26
26
  - `src/app/git_review.rs`: Git and PR review evidence boundary. Owns worktree detection, scoped changed-file provenance, PR URL context, and dirty-worktree safety projections.
27
27
  - `src/app/mcp.rs`: MCP stdio boundary. Owns MCP protocol request routing, tool calls, resource reads, and prompt responses.
28
- - `src/app/packages.rs`: package import/export boundary. Owns reusable JSON templates, preview-before-import, review artifact package import, and local-first encrypted bundle metadata.
28
+ - `src/app/packages.rs`: package import/export boundary. Owns reusable JSON templates, preview-before-import, durable ReviewGate package projections, and local-first encrypted bundle metadata.
29
29
  - `src/app/http.rs`: localhost HTTP/SSE boundary. Owns HTTP request parsing, routes, SSE stream output, and HTTP response mapping.
30
30
  - `src/app/repository.rs`: application data access helpers. Owns Planr query/update helpers over projects, plans, graph items, links, runs, logs, artifacts, events, approvals, search, and map projections.
31
31
  - `src/app/lease.rs`: worker lease ownership. Owns the single pick query (`PickFilter`: exclude, work type, plan scope), worker ownership checks, runtime heartbeat/progress/pause state, and stale-pick detection.
32
- - `src/app/review.rs`: review-gate application logic. Owns review annotations, feedback ingestion, evidence artifacts, review closure, and review target lookup.
32
+ - `src/app/review.rs`: ReviewGate application logic. Owns review annotations, feedback ingestion, scoped evidence, durable attempt completion, finding resolution, and gate lookup.
33
33
  - `src/app/recovery.rs`: recovery automation logic. Owns item retry policy configuration, task conditions, stale/timed-out sweeps, retry scheduling, and recovery result projections.
34
- - `src/app/review_workspace.rs`: local review workspace boundary. Owns the browser review HTML, workspace data projection, and privacy-minimized Git diff evidence.
34
+ - `src/app/execution_run.rs`: canonical FeatureRun and ReviewGate application boundary. Owns run phases, outcome batching and settlement, typed escalation, role leases, durable findings/re-review, and final product review projections.
35
+ - `src/app/execution_state.rs`: canonical `planr.execution_state.v2` read boundary. It projects one run-scoped FeatureRun, active batch, role owner, persisted budget amounts/provenance/digest/deadline, ReviewGate, attempts, findings, stable reason code, and next action for CLI, MCP, HTTP, pick, trace, status, recovery, package, and audit consumers.
35
36
  - `src/app/surfaces.rs`: non-CLI runtime surfaces. Owns trace, scrub, artifact, event, debug, export, and import command handlers.
36
37
  - `src/app/inspection.rs`: local inspection helpers. Owns debug bundles, context/link snapshots, pick context, secret scans, export value assembly, run recording, search results, and Planr-directory import parsing.
37
- - `src/app/audit.rs`: goal contract audit boundary. Owns the clause-by-clause `plan audit` verdict (items settled, reviews complete, approvals clear, canonical Evidence coverage) and its human rendering. Claim-only verification logs remain isolated to frozen pre-Evidence compatibility.
38
+ - `src/app/audit.rs`: goal contract audit boundary. Owns the clause-by-clause `plan audit` verdict (items settled, required independent material reviews, exactly one current independent final product review, approvals clear, canonical Evidence coverage) and its human rendering. Claim-only verification logs remain isolated to frozen pre-Evidence compatibility.
38
39
  - `src/app/application.rs`: shared surface-mutation boundary. Owns the approval request/approve/deny, context, log, artifact, and close mutations reused verbatim by CLI, MCP, and HTTP handlers so the three surfaces cannot drift.
39
- - `src/app/repository/`: focused data-access submodules (`item.rs`, `plan.rs`, `project.rs`, `link.rs`, `context.rs`, `evidence.rs`, `search.rs`) split out of `src/app/repository.rs` by entity ownership.
40
+ - `src/app/repository/`: focused data-access submodules (`item.rs`, `plan.rs`, `project.rs`, `link.rs`, `context.rs`, `evidence.rs`, `execution_run.rs`, `search.rs`) split out of `src/app/repository.rs` by entity ownership. Execution-state reads select ReviewGates strictly by run id; project/plan-wide history is never projected as the current run.
40
41
  - `src/model.rs`: JSON-facing data transfer types and typed vocabulary. Owns serializable Planr DTOs plus the `ItemStatus`, `WorkType`, `LinkKind`, and `ApprovalStatus` enums with their parsing and display behavior, used by CLI JSON, MCP, HTTP, storage rows, and tests.
41
42
  - `src/storage/mod.rs`: SQLite connection boundary. Owns default database path, connection setup, pragma configuration, and storage submodule exports.
42
43
  - `src/storage/schema.rs`: SQLite schema boundary. Owns DDL, additive schema upgrade helpers, and schema version recording.
44
+ - `src/storage/execution_run_schema.rs`: the sole persisted compatibility boundary for FeatureRun rollout. It upgrades already-stored review/fix history into durable terminal history, but no application, packet, agent asset, or documentation path produces the superseded live shape.
43
45
  - `src/storage/rows.rs`: SQLite row mapping boundary. Owns row-to-DTO and row-to-JSON mapping functions.
44
46
  - `src/planpack.rs`: Markdown package generation and parsing. Owns project context templates, product/build plan templates, plan metadata parsing, hashes, search body extraction, and task extraction.
45
47
  - `src/agents.rs`: agent profile registry core. Owns `.planr/agents.toml` parsing, registry validation warnings, and the pure advisory `resolve_route` precedence logic (override > work_type > plan > default); no storage or host concerns.
@@ -53,6 +55,40 @@ Planr V1 is a single Rust binary with explicit module ownership. The crate stays
53
55
  - `src/rolefiles.rs`: static host workflow roles and Cursor skill payloads. It does not select or pin models; externally generated routing artifacts stay outside Planr ownership.
54
56
  - `src/util.rs`: small CLI-boundary utilities. Owns ids, timestamps, path helpers, output formatting, and safe file writes.
55
57
 
58
+ ## FeatureRun Execution Boundary
59
+
60
+ Every live worker decision is a typed work packet:
61
+
62
+ - `kind: "outcome"` is ordinary maker work; `mode: "finding_repair"` returns named findings to the same responsible maker and ReviewGate without creating a fix item.
63
+ - `kind: "review_gate"` is independently leased checker work. Attempts and findings remain children of that gate, never graph items.
64
+ - `kind: "verification"` is a fresh verifier lease over a frozen canonical source digest. Product source is read-only; trusted Evidence can commit only through the source-checked Evidence transaction.
65
+ - Releasing verification is an application-owned transition: the item lease, FeatureRun verifier role, and verification budget reconcile atomically back to `source_frozen`. `pick release --repair <reference>` additionally invalidates the frozen candidate and routes a fresh repair batch to the recorded maker; the failed verifier lease is never resumed.
66
+ - An accepted material checkpoint is source-bound after any product or admission repair. Repair settlement preserves the prior attempt, reopens the same gate with the active freeze revision/digest and repair-obligation lineage, and leaves verification unleaseable until a fresh independent acceptance of that exact binding.
67
+ - `kind: "hold"` is an admission or capability stop. A driver must report its classification and next action; it cannot reinterpret the hold as permission to replace the maker, weaken verification, or open an ad hoc review.
68
+
69
+ All four packets embed the same run-scoped `planr.execution_state.v2` projection. Host skills, generated roles, installed copies, and Stop hooks render that state but own no lifecycle or budget policy. Ordinary maker settlement uses plain `planr done`; only an allowed protected-risk interrupt uses structured escalation. Review findings are logged and resolved on the existing gate. Evidence runs once after stable source freeze and selectively reruns only invalidated obligations after a product repair.
70
+
71
+ The one exception is persisted database input in `src/storage/execution_run_schema.rs`. Existing user databases may contain historical review/fix graph rows, so the schema upgrade consumes them once into terminal history. That read boundary does not justify aliases, fallback commands, dual DTOs, or live legacy producers elsewhere.
72
+
73
+ ## Planr 2.0 Immutable Budget Boundary
74
+
75
+ The Planr 2.0 budget authority is one immutable `planr.feature_run_budget_contract.v2` created atomically with each FeatureRun. Bounded contracts contain a persisted UTC run-start anchor, complete wall-seconds/tool-call/token totals, exact maker/verification/review/repair/release allocations, per-dimension metering requirements, and a canonical digest. Unbounded mode is an explicit contract with no numeric limits or reserves. Every admitted bounded task carries positive maxima for all three dimensions and an overflow-checked absolute UTC deadline.
76
+
77
+ Ownership is singular and dependencies are one-way:
78
+
79
+ - `src/usage_policy.rs` owns the provider-neutral contract types, validation, provenance, phase protection, snapshots, and pure checked arithmetic.
80
+ - `src/execution_policy.rs` owns pure admission over typed concurrency plus persisted budget snapshots.
81
+ - `src/app/execution_run.rs` resolves authored policy once and binds the immutable contract to run creation.
82
+ - `src/app/feature_run_evidence.rs` owns transactional reservation, append-only observation, reconciliation, phase release, and hold sequencing.
83
+ - `src/app/execution_state.rs` owns the sole `planr.execution_state.v2` projection reused by CLI, MCP, HTTP, work packets, trace, status, generated roles, and skills.
84
+ - Storage owns insert-only persistence and integrity mechanics; host adapters only enforce supplied maxima/deadlines and report observations with provenance.
85
+
86
+ Runtime decisions never reload `.planr/policy.toml`, fabricate allowances, infer trusted usage from projections, synthesize missing active-run state, or expose a compatibility budget DTO. Missing, invalid, corrupt, or unenforceable budget state is a typed hold before dispatch.
87
+
88
+ An incompatible active FeatureRun is retired only through the plan-scoped application lifecycle in `src/app/execution_run.rs`. Pure eligibility and policy-cancel state changes live in `src/execution_run.rs`; `src/app/repository/execution_run.rs` ends the batch and leases, updates the run with optimistic concurrency, and records provenance in one transaction. CLI, MCP, and HTTP only transport the closed `incompatible-budget` reason and reuse the canonical result. Restart never writes a budget contract or successor run; a later ordinary pick remains the sole atomic run-plus-contract creation path.
89
+
90
+ A compatible budget-held FeatureRun resumes only through `planr run resolve-budget-hold --plan <id>`, owned by `src/app/feature_run_evidence.rs`. The application transaction revalidates the immutable contract, persisted snapshot, active reservation deadlines, exact held phase, canonical role owner, and lease generation before restoring that phase. Incompatible contracts require restart; capability holds, corrupt state, expired deadlines, missing reservations, unrepaired ceilings, and owner mismatches remain held. MCP and HTTP transport the same typed application result without policy or arithmetic.
91
+
56
92
  ## Eval Contract V1/V1.1 Ownership
57
93
 
58
94
  The frozen product contract lives in `docs/contracts/EVAL_CONTRACT_V1.md` until implementation promotes it into code. Its V1.1 efficiency-evidence amendment is additive and keeps the same owner split:
@@ -72,7 +108,7 @@ The frozen product contract lives in `docs/contracts/EVAL_CONTRACT_V1.md` until
72
108
  - Mutations shared by more than one surface (CLI, MCP, HTTP) belong in `src/app/application.rs`; surface handlers must call the shared helper instead of repeating SQL.
73
109
  - Markdown templates belong in `planpack.rs`; command handlers should request generated file sets instead of embedding large template bodies.
74
110
  - Agent install metadata and MCP schema descriptors belong in `src/integrations.rs`; client-specific strings should not drift across command handlers and docs.
75
- - DTO and vocabulary-enum changes belong in `src/model.rs`; JSON response shapes should reuse those DTOs before adding ad hoc maps.
111
+ - General graph DTO and vocabulary-enum changes belong in `src/model.rs`; FeatureRun/ExecutionBatch/ReviewGate status projection changes belong in `src/app/execution_state.rs`. JSON response shapes reuse those owners before adding ad hoc maps.
76
112
  - Item status, work type, link kind, and approval status values are typed enums; new states must be added to the enum, not smuggled in as strings.
77
113
  - Utility code must stay narrow. If a helper starts owning product behavior, move it to the owning module instead of growing `util.rs`.
78
114
  - Do not add catch-all `common`, `shared`, or broad utility modules. New modules must name a durable ownership boundary.
package/docs/RELEASE.md CHANGED
@@ -25,7 +25,9 @@ full candidate verification and independent review on that exact commit.
25
25
  `scripts/release.sh` is the only supported publication path. It runs on clean
26
26
  `main`, requires every version and generated reference to already match the
27
27
  requested version, verifies an independently green CI run and human approval
28
- for the exact `HEAD` SHA, and only then creates and pushes the annotated tag.
28
+ for the exact `HEAD` SHA, and verifies that the changelog predecessor's local
29
+ tag object exactly matches the tag ref returned by `origin`. Only then does it
30
+ create and push the annotated tag.
29
31
  It does not replay the Rust, docs, or packaging suites already proven by that
30
32
  CI run. Security, secret, dependency, and workflow scanners are deliberate
31
33
  local maintainer preflight commands rather than automatic pull-request or push
@@ -49,8 +51,9 @@ contains only `approval_id`, `source_sha`, `version`, `decision: "approved"`,
49
51
  queries the recorded GitHub Actions run and rejects a stale SHA, non-main or
50
52
  non-push run, failed conclusion, repository mismatch, or non-approved decision.
51
53
 
52
- External evaluation is conditional. When the evaluated workflow subject or its
53
- explicit evaluation policy changed since the previous release tag, also set:
54
+ External evaluation is a stable-release gate. When the evaluated workflow
55
+ subject or its explicit evaluation policy changed since the previous release
56
+ tag, a stable release also requires:
54
57
 
55
58
  ```bash
56
59
  export PLANR_RELEASE_EVAL_SUITE="$HOME/projects/planr-evals/suites/planr-lean-skills-dogfood.suite.json"
@@ -94,8 +97,8 @@ The two scripts enforce, in order:
94
97
  3. frozen workspace synchronization cannot change `pnpm-lock.yaml`;
95
98
  4. the candidate build synchronizes `Cargo.lock`, then regenerates and strictly checks both references without Git mutation;
96
99
  5. candidate source, changelog, contracts, and generated files are committed and independently reviewed before publication approval;
97
- 6. publication requires clean `main`, the exact prepared versions/references, a committed changelog section, and no existing tag;
98
- 7. publication validates the exact-SHA CI and approval receipts; when the evaluated subject or policy changed, the reviewed candidate binary also validates the sanitized eval receipt and recomputed comparison;
100
+ 6. publication requires clean `main`, the exact prepared versions/references, a committed changelog section, an exact local predecessor tag matching `origin`, and no existing target tag;
101
+ 7. publication validates the exact-SHA CI and approval receipts; a stable release whose evaluated subject or policy changed also validates the sanitized eval receipt and recomputed comparison;
99
102
  8. publication creates and pushes only the annotated `vx.y.z` tag for that reviewed commit.
100
103
 
101
104
  Two independent gates back the script:
@@ -122,7 +125,18 @@ The changelog section requirement applies verbatim (`## [1.2.0-alpha.1]`). What
122
125
  - npm publishes under the **`alpha` dist-tag** instead of `latest`: plain `npm install -g planr` keeps resolving stable, testers opt in with `npm install -g planr@alpha`.
123
126
  - The **Homebrew tap never moves** on pre-release tags.
124
127
 
125
- Only `-alpha.N`, `-beta.N`, and `-rc.N` suffixes are accepted; everything else the script rejects.
128
+ Only canonical SemVer core numbers and `-alpha.N`, `-beta.N`, or `-rc.N`
129
+ suffixes are accepted. Numeric identifiers have no leading zero unless the
130
+ identifier is exactly `0`.
131
+
132
+ Pre-release publication deliberately does not require a model-evaluation
133
+ receipt before publication. It still requires a clean exact commit on `main`,
134
+ the authenticated green CI promotion receipt, human approval bound to that SHA
135
+ and version, synchronized manifests and generated references, and the committed
136
+ changelog/release contracts. After publication, install that exact prerelease
137
+ and dogfood the installed artifact. That dogfood evidence informs and gates the
138
+ next promotion decision; it is never fabricated from the pre-publication source
139
+ tree. Stable publication keeps the conditional evaluation gate described above.
126
140
 
127
141
  ## Automated Release Pipeline
128
142
 
@@ -35,7 +35,7 @@ Future Switchloom work, including thread `019f8a71-5b6c-7c41-9850-7050516fcee4`,
35
35
 
36
36
  The stable compatibility promise is limited to Planr's boundary: consume provider-neutral declarations when present, keep requested values separate from effective evidence, reject requested-only metadata as proof, avoid owning external lifecycle, and continue operating when routing files are absent.
37
37
 
38
- Any future mismatch in package identity, generated artifacts, Planr declaration parsing, route-audit semantics, host evidence, source-worktree mutation, or security posture should become a new finding or fix item rather than an optimistic compatibility claim.
38
+ Any future mismatch in package identity, generated artifacts, Planr declaration parsing, route-audit semantics, host evidence, source-worktree mutation, or security posture should become a new finding and responsible-maker repair rather than an optimistic compatibility claim.
39
39
 
40
40
  ## Verification Notes
41
41
 
@@ -1586,7 +1586,7 @@ Required fields:
1586
1586
  - `evidence_ref` string.
1587
1587
  - `target_kind` string enum: `run | comparison`.
1588
1588
  - `target_id` string.
1589
- - `planr_attachment_kind` string enum: `log | review | artifact`.
1589
+ - `planr_attachment_kind` string enum: `log | artifact`.
1590
1590
  - `planr_attachment_id` string.
1591
1591
  - `item_id` string.
1592
1592
  - `created_at` RFC 3339 timestamp.
@@ -1,8 +1,8 @@
1
1
  # Evidence Contract v1
2
2
 
3
- Status: frozen for implementation
3
+ Status: frozen for implementation; v1.1 additive one-shot lifecycle amendment frozen for implementation
4
4
 
5
- Evidence Contract v1 is Planr's local-first contract for proving acceptance criteria. It defines the durable vocabulary for proof obligations, observation requirements, capability declarations, execution attempts, untrusted proposals, trusted receipts, coverage verdicts, policy, presets, waivers, statuses, compatibility, and extension naming. It does not add public commands by itself and does not grant closure authority until later implementation slices wire the contract into storage, audit, review, trace, pick, and active-goal enforcement.
5
+ Evidence Contract v1 is Planr's local-first contract for proving acceptance criteria. It defines the durable vocabulary for proof obligations, observation requirements, capability declarations, execution attempts, untrusted proposals, trusted receipts, coverage verdicts, policy, presets, waivers, statuses, compatibility, and extension naming. It does not add public commands by itself and does not grant closure authority until later implementation slices wire the contract into storage, audit, review, trace, pick, and active-goal enforcement. The v1.1 amendment is additive: it binds an explicitly non-repeatable capability to one terminal attempt without changing existing object shapes or repeatable-capability behavior.
6
6
 
7
7
  ## Ownership
8
8
 
@@ -88,6 +88,7 @@ Required fields:
88
88
 
89
89
  - `id`, `schema_version`, `version`, `adapter_kind`, `adapter_digest`.
90
90
  - Supported surfaces, observation type/schema/digest triples, interactions, artifacts, runtime targets, provenance path, permissions, costs, determinism, repeatability, independence, blind spots, and availability probe contract.
91
+ - When a capability explicitly declares `repeatability = non_repeatable_one_shot`, Planr derives `max_attempts = 1`; any conflicting caller declaration is rejected before launch. Before the adapter can spawn, Planr atomically claims one durable allowance scoped to the active FeatureRun source freeze. That claim survives process, receipt, or settlement failure, so every later fresh initial, retry, or concurrent contender for the freeze is rejected without spawning. Its committed non-passing attempt (`attempt_index + 1 = max_attempts`), including `product_failed`, atomically exhausts that FeatureRun verification allowance with the attempt and receipt. Planr records `verification_attempts_exhausted`, releases the verifier lease, exposes no next verification action, and does not create a product-finding repair or replay path. Missing or other repeatability values never infer one-shot behavior.
91
92
  - Process adapters declare a closed `availability_probe.kind = process` contract with executable name, arguments, optional working directory, timeout, stdout/stderr byte limits, and the payload schema binding for emitted observations.
92
93
 
93
94
  A manifest is a claim about what a method can observe. It is not proof that the method is available now.
@@ -6,7 +6,7 @@ Generated: 2026-06-09
6
6
 
7
7
  This contract defines the Planr-owned V1.1 acceptance baseline. It turns the remaining product gaps into implementation-ready requirements without relying on external product names, copied command vocabulary, or hidden context.
8
8
 
9
- V1.1 is complete only when Planr can prove these capabilities from its own CLI, MCP, HTTP, local review workspace, docs, tests, and real consumer usage.
9
+ V1.1 is complete only when Planr can prove these capabilities from its own CLI, MCP, HTTP, durable FeatureRun/ReviewGate state, docs, tests, and real consumer usage.
10
10
 
11
11
  ## Product Outcome
12
12
 
@@ -38,7 +38,7 @@ Acceptance:
38
38
  ### Automatic Pick Recall
39
39
 
40
40
  - REQ-V11-RECALL-001: `planr pick` and `planr_pick_item` must return a compact task-start package.
41
- - REQ-V11-RECALL-002: The package must include ranked relevant project contexts, upstream logs or handoffs, linked plan references, active blockers or unlocks, review/fix history, and deeper-read commands.
41
+ - REQ-V11-RECALL-002: The package must include ranked relevant project contexts, upstream logs or handoffs, linked plan references, active blockers or unlocks, ReviewGate history, and deeper-read commands.
42
42
  - REQ-V11-RECALL-003: Recall ranking must search item title, description, linked plan metadata, contexts, logs, and review summaries.
43
43
  - REQ-V11-RECALL-004: Pick recall must be size-bounded and avoid source file content, prompt transcripts, secret-looking values, and large artifacts by default.
44
44
  - REQ-V11-RECALL-005: Possible file conflicts must be surfaced from recent logs, artifacts, and active picked/running work when enough path evidence exists.
@@ -64,19 +64,19 @@ Acceptance:
64
64
  - A failed retryable item returns to ready only after the documented delay.
65
65
  - A postcondition appears in review and close-preview output before the item closes.
66
66
 
67
- ### Local Browser Review Workspace
67
+ ### Durable FeatureRun Review Gates
68
68
 
69
- - REQ-V11-REVIEW-UI-001: Planr must ship a local browser workspace reachable from the local HTTP server or an explicit CLI command.
70
- - REQ-V11-REVIEW-UI-002: The workspace must support plan/package review, plan revision diff, item review detail, inline annotations, and approve/request-changes feedback.
71
- - REQ-V11-REVIEW-UI-003: When Git evidence is available, the workspace must show scoped file changes or a clear explanation of missing diff context.
72
- - REQ-V11-REVIEW-UI-004: Feedback must write Planr review annotations, review artifacts, and map-native fix/follow-up review items through existing review rules.
73
- - REQ-V11-REVIEW-UI-005: The workspace must remain local-first and must not require a hosted account or network service.
69
+ - REQ-V11-REVIEW-001: FeatureRun settlement must create or reuse durable ReviewGates according to materiality and structured escalation policy.
70
+ - REQ-V11-REVIEW-002: ReviewGate attempts must record independent reviewer identity, verdict, findings, and immutable attempt history.
71
+ - REQ-V11-REVIEW-003: When Git evidence is available, review evidence must show scoped file changes or a clear explanation of missing diff context.
72
+ - REQ-V11-REVIEW-004: Findings must pause settlement, remain durable on the gate, and return the same gate to pending re-review only after explicit resolution.
73
+ - REQ-V11-REVIEW-005: Final product review must use exactly one accepted independent plan-scoped ReviewGate and project consistently through CLI, MCP, HTTP, audit, status, package, and trace surfaces.
74
74
 
75
75
  Acceptance:
76
76
 
77
- - A reviewer can open a local URL, annotate a plan or item, request changes, and see the map create follow-up work.
78
- - A clean review can write an artifact and close the review item through Planr state.
79
- - Browser smoke tests prove the workspace renders and can exercise the annotation flow.
77
+ - A reviewer can lease a ReviewGate, inspect scoped evidence, and record either acceptance or durable findings.
78
+ - A maker can resolve named findings and the same gate becomes available for independent re-review.
79
+ - An accepted final ReviewGate makes the canonical plan audit clause pass without creating review/fix map items.
80
80
 
81
81
  ### Scoped Git And PR Review
82
82
 
@@ -89,8 +89,8 @@ Acceptance:
89
89
  Acceptance:
90
90
 
91
91
  - A dirty worktree with unrelated files does not let an agent claim broad ownership.
92
- - Review artifacts show which files were considered and which were excluded.
93
- - File and line annotations survive export/import.
92
+ - ReviewGate attempts show which evidence was considered and which files were excluded.
93
+ - Durable findings and file/line annotations survive package projection.
94
94
 
95
95
  ### Distribution And Client Setup
96
96
 
@@ -109,10 +109,10 @@ Acceptance:
109
109
 
110
110
  ### Templates And Review Packages
111
111
 
112
- - REQ-V11-TEMPLATE-001: Export/import must support map items, links, plans, contexts, logs, review artifacts, and metadata.
112
+ - REQ-V11-TEMPLATE-001: Export/import must support map items, links, plans, contexts, logs, durable ReviewGate projections, and metadata.
113
113
  - REQ-V11-TEMPLATE-002: Templates must include package requirements metadata, Planr version, creation timestamp, source project name, and optional tags.
114
114
  - REQ-V11-TEMPLATE-003: Import must preview what will be created or skipped before mutating existing projects.
115
- - REQ-V11-TEMPLATE-004: Review packages must preserve annotations, findings, artifacts, and file references.
115
+ - REQ-V11-TEMPLATE-004: Review packages must preserve ReviewGate attempts, findings, annotations, and file references.
116
116
  - REQ-V11-TEMPLATE-005: Encrypted local bundle sharing may be implemented without hosted infrastructure; if not implemented in V1.1, docs must capture the accepted local-first format and explicit future scope.
117
117
 
118
118
  Acceptance:
@@ -149,7 +149,7 @@ Required repository checks:
149
149
  - `scripts/ci-local.sh`
150
150
  - MCP stdio contract smoke
151
151
  - HTTP/SSE smoke
152
- - local browser review workspace smoke
152
+ - durable ReviewGate cross-surface smoke
153
153
  - forbidden-reference scrub over public repo paths
154
154
 
155
155
  Required consumer checks in `~/projects/planr-test`:
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "epolicy-default-v1",
3
3
  "schema_version": "evidence.contract.v1",
4
- "policy_digest": "sha256:c1a2a26ece3ee7a3cf3166cd849664d723fe2fffda2dc0773b2c92dc8d1ae8c1",
4
+ "policy_digest": "sha256:4dc9ebefae0d8334a19d958a456d5633d615025e7643f999dfda6d4c30bfc613",
5
5
  "defaults": {
6
6
  "preset_id": "preset-http-health",
7
7
  "binding": true,
@@ -23,15 +23,6 @@
23
23
  "target": {
24
24
  "kind": "local_service",
25
25
  "uri": "http://127.0.0.1:4173/health"
26
- },
27
- "environment": {
28
- "kind": "local",
29
- "id": "dev-shell",
30
- "digest": "sha256:5555555555555555555555555555555555555555555555555555555555555555"
31
- },
32
- "runtime_target": {
33
- "kind": "process",
34
- "id": "planr-doc-fixture"
35
26
  }
36
27
  }
37
28
  ]
@@ -20,15 +20,6 @@
20
20
  "kind": "local_service",
21
21
  "uri": "http://127.0.0.1:4173/health"
22
22
  },
23
- "environment": {
24
- "kind": "local",
25
- "id": "dev-shell",
26
- "digest": "sha256:5555555555555555555555555555555555555555555555555555555555555555"
27
- },
28
- "runtime_target": {
29
- "kind": "process",
30
- "id": "planr-doc-fixture"
31
- },
32
23
  "payload_schema": {
33
24
  "schema_ref": "planr.api.http.response@v1"
34
25
  },
@@ -60,8 +51,5 @@
60
51
  "min_receipt_status": "trusted",
61
52
  "allow_user_attestation": false
62
53
  },
63
- "policy_digest": "sha256:c1a2a26ece3ee7a3cf3166cd849664d723fe2fffda2dc0773b2c92dc8d1ae8c1",
64
- "config_digest": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
65
- "created_at": "2026-07-28T12:00:00Z",
66
54
  "supersedes": null
67
55
  }
@@ -13,15 +13,6 @@
13
13
  "target": {
14
14
  "kind": "local_service",
15
15
  "uri": "http://127.0.0.1:4173/health"
16
- },
17
- "environment": {
18
- "kind": "local",
19
- "id": "dev-shell",
20
- "digest": "sha256:5555555555555555555555555555555555555555555555555555555555555555"
21
- },
22
- "runtime_target": {
23
- "kind": "process",
24
- "id": "planr-doc-fixture"
25
16
  }
26
17
  }
27
18
  ]
@@ -23,15 +23,6 @@
23
23
  "target": {
24
24
  "kind": "local_service",
25
25
  "uri": "http://127.0.0.1:4173/health"
26
- },
27
- "environment": {
28
- "kind": "local",
29
- "id": "dev-shell",
30
- "digest": "sha256:5555555555555555555555555555555555555555555555555555555555555555"
31
- },
32
- "runtime_target": {
33
- "kind": "process",
34
- "id": "planr-doc-fixture"
35
26
  }
36
27
  }
37
28
  ]
@@ -23,15 +23,6 @@
23
23
  "target": {
24
24
  "kind": "local_service",
25
25
  "uri": "http://127.0.0.1:4173/health"
26
- },
27
- "environment": {
28
- "kind": "local",
29
- "id": "dev-shell",
30
- "digest": "sha256:5555555555555555555555555555555555555555555555555555555555555555"
31
- },
32
- "runtime_target": {
33
- "kind": "process",
34
- "id": "planr-doc-fixture"
35
26
  }
36
27
  }
37
28
  ]
@@ -23,15 +23,6 @@
23
23
  "target": {
24
24
  "kind": "local_service",
25
25
  "uri": "http://127.0.0.1:4173/health"
26
- },
27
- "environment": {
28
- "kind": "local",
29
- "id": "dev-shell",
30
- "digest": "sha256:5555555555555555555555555555555555555555555555555555555555555555"
31
- },
32
- "runtime_target": {
33
- "kind": "process",
34
- "id": "planr-doc-fixture"
35
26
  }
36
27
  }
37
28
  ]
@@ -687,10 +687,7 @@
687
687
  "observations",
688
688
  "fixture_policy",
689
689
  "freshness_policy",
690
- "assurance_policy",
691
- "policy_digest",
692
- "config_digest",
693
- "created_at"
690
+ "assurance_policy"
694
691
  ],
695
692
  "additionalProperties": false,
696
693
  "properties": {
@@ -739,15 +736,6 @@
739
736
  "assurance_policy": {
740
737
  "$ref": "#/$defs/JsonObject"
741
738
  },
742
- "policy_digest": {
743
- "$ref": "#/$defs/Digest"
744
- },
745
- "config_digest": {
746
- "$ref": "#/$defs/Digest"
747
- },
748
- "created_at": {
749
- "$ref": "#/$defs/Timestamp"
750
- },
751
739
  "supersedes": {
752
740
  "anyOf": [
753
741
  {
@@ -767,9 +755,7 @@
767
755
  "type",
768
756
  "subject",
769
757
  "expected",
770
- "target",
771
- "environment",
772
- "runtime_target"
758
+ "target"
773
759
  ],
774
760
  "additionalProperties": false,
775
761
  "properties": {
@@ -789,12 +775,6 @@
789
775
  "target": {
790
776
  "$ref": "#/$defs/TargetBinding"
791
777
  },
792
- "environment": {
793
- "$ref": "#/$defs/EnvironmentBinding"
794
- },
795
- "runtime_target": {
796
- "$ref": "#/$defs/RuntimeTarget"
797
- },
798
778
  "payload_schema": {
799
779
  "$ref": "#/$defs/JsonObject"
800
780
  },
@@ -4,7 +4,7 @@ This is the canonical inventory that maps shipped public surfaces to repository
4
4
 
5
5
  ## Published route inventory
6
6
 
7
- The site currently owns 66 MDX routes. Next.js also emits the landing page and framework support routes during the production build.
7
+ The site currently owns 67 MDX routes. Next.js also emits the landing page and framework support routes during the production build.
8
8
 
9
9
  | Section | Published routes |
10
10
  | --- | --- |
@@ -14,7 +14,7 @@ The site currently owns 66 MDX routes. Next.js also emits the landing page and f
14
14
  | Integrations | `/docs/integrations`, `/docs/integrations/codex`, `/docs/integrations/claude-code`, `/docs/integrations/cursor`, `/docs/integrations/grok-build`, `/docs/integrations/pi`, `/docs/integrations/generic-mcp`, `/docs/integrations/cli-only` |
15
15
  | Plugins | `/docs/plugins`, `/docs/plugins/switchloom` |
16
16
  | Concepts | `/docs/concepts`, `/docs/concepts/local-first-model`, `/docs/concepts/plans-and-map`, `/docs/concepts/graph-and-readiness`, `/docs/concepts/picks-and-leases`, `/docs/concepts/evidence-and-context`, `/docs/concepts/evidence-trust-model`, `/docs/concepts/reviews-and-approvals`, `/docs/concepts/recovery-packages-and-closure` |
17
- | Guides | `/docs/guides`, `/docs/guides/daily-worker-loop`, `/docs/guides/parallel-coordination`, `/docs/guides/handoff-and-resume`, `/docs/guides/review-and-fix-loops`, `/docs/guides/recover-interrupted-work`, `/docs/guides/packages-and-reuse`, `/docs/guides/evidence-scenarios`, `/docs/guides/recipes` |
17
+ | Guides | `/docs/guides`, `/docs/guides/daily-worker-loop`, `/docs/guides/feature-run-work-packets`, `/docs/guides/parallel-coordination`, `/docs/guides/handoff-and-resume`, `/docs/guides/review-and-fix-loops`, `/docs/guides/recover-interrupted-work`, `/docs/guides/packages-and-reuse`, `/docs/guides/evidence-scenarios`, `/docs/guides/recipes` |
18
18
  | Reference | `/docs/reference`, `/docs/reference/cli`, `/docs/reference/cli-generated`, `/docs/reference/mcp`, `/docs/reference/mcp-schemas-generated`, `/docs/reference/http-api`, `/docs/reference/evidence`, `/docs/reference/configuration-and-storage`, `/docs/reference/data-and-status`, `/docs/reference/outputs-and-errors`, `/docs/reference/support-matrix`, `/docs/reference/maintenance` |
19
19
  | Contributing | `/docs/contributing`, `/docs/contributing/repository-setup`, `/docs/contributing/architecture`, `/docs/contributing/docs-authoring`, `/docs/contributing/testing`, `/docs/contributing/security-and-privacy` |
20
20
  | Operations | `/docs/operations`, `/docs/operations/release`, `/docs/operations/versioning-and-migrations`, `/docs/operations/docs-deployment`, `/docs/operations/health-and-diagnostics`, `/docs/operations/rollback`, `/docs/operations/documentation-governance` |
@@ -35,7 +35,7 @@ The site currently owns 66 MDX routes. Next.js also emits the landing page and f
35
35
  | Binding Evidence trust model | `src/evidence/`, `src/app/evidence.rs`, `docs/contracts/EVIDENCE_CONTRACT_V1.md` | `/docs/concepts/evidence-trust-model`, `/docs/reference/evidence`, `/docs/guides/evidence-scenarios` |
36
36
  | Reviews, approvals, fix chains | `src/app/review.rs`, `src/app/flow.rs`, `src/app/application.rs` | `/docs/concepts/reviews-and-approvals`, `/docs/guides/review-and-fix-loops` |
37
37
  | Recovery, conditions, packages, closure | `src/app/recovery.rs`, `src/app/packages.rs`, `src/app/flow.rs` | `/docs/concepts/recovery-packages-and-closure`, `/docs/guides/recover-interrupted-work`, `/docs/guides/packages-and-reuse` |
38
- | Worker loop, handoff, recipes | application flow and lease owners | `/docs/guides/daily-worker-loop`, `/docs/guides/handoff-and-resume`, `/docs/guides/recipes` |
38
+ | Worker loop, typed FeatureRun packets, handoff, recipes | FeatureRun application flow and lease owners | `/docs/guides/daily-worker-loop`, `/docs/guides/feature-run-work-packets`, `/docs/guides/handoff-and-resume`, `/docs/guides/recipes` |
39
39
  | Copy-paste Evidence scenarios | `apps/docs/scripts/generate-evidence-examples.mjs`, `tests/fixtures/evidence/docs/` | `/docs/guides/evidence-scenarios` |
40
40
 
41
41
  ## CLI, MCP, HTTP, and data contracts
@@ -91,7 +91,7 @@ The executable and schema sources decide exact inventory. Editorial pages explai
91
91
 
92
92
  ## Audit completion checklist
93
93
 
94
- - [x] All 66 current MDX routes are explicitly inventoried.
94
+ - [x] All 67 current MDX routes are explicitly inventoried.
95
95
  - [x] Every public product, CLI, MCP, HTTP, data, client, contributor, and operations surface has a current target and canonical source owner.
96
96
  - [x] Generated CLI and MCP inventories are separated from editorial guidance and mechanically checked.
97
97
  - [x] Retired aliases are isolated in `apps/docs/redirects.mjs` and resolve to a current route.
@@ -20,7 +20,7 @@ This file records the implemented route and navigation contract. Routes are publ
20
20
 
21
21
  ## Implemented route tree
22
22
 
23
- The 66 MDX files below are the current page tree and must agree with every `meta.json` file and `COVERAGE.md`.
23
+ The 67 MDX files below are the current page tree and must agree with every `meta.json` file and `COVERAGE.md`.
24
24
 
25
25
  ```text
26
26
  /docs
@@ -53,6 +53,7 @@ The 66 MDX files below are the current page tree and must agree with every `meta
53
53
  │ └── recovery-packages-and-closure
54
54
  ├── guides
55
55
  │ ├── daily-worker-loop
56
+ │ ├── feature-run-work-packets
56
57
  │ ├── parallel-coordination
57
58
  │ ├── handoff-and-resume
58
59
  │ ├── review-and-fix-loops
@@ -124,7 +125,6 @@ The inventory covers these retired route families:
124
125
  | `/docs/guides/review-and-fix-loop` | `/docs/guides/review-and-fix-loops` |
125
126
  | `/docs/guides/interruptions-and-recovery` | `/docs/guides/recover-interrupted-work` |
126
127
  | `/docs/guides/import-export-and-templates` | `/docs/guides/packages-and-reuse` |
127
- | `/docs/guides/local-review-workspace` | `/docs/guides/recipes` |
128
128
  | `/docs/guides/host-hooks` | `/docs/integrations` |
129
129
  | `/docs/guides/model-routing` | `/docs/reference/configuration-and-storage` |
130
130
  | `/docs/reference/cli/index` | `/docs/reference/cli` |
@@ -12,6 +12,7 @@
12
12
  "planr_plan_split",
13
13
  "planr_plan_check",
14
14
  "planr_plan_audit",
15
+ "planr_plan_final_review",
15
16
  "planr_plan_link",
16
17
  "planr_map_build",
17
18
  "planr_item_create",
@@ -32,6 +33,8 @@
32
33
  "planr_pick_pause",
33
34
  "planr_pick_resume",
34
35
  "planr_pick_stale",
36
+ "planr_run_restart",
37
+ "planr_run_resolve_budget_hold",
35
38
  "planr_recover_sweep",
36
39
  "planr_approval_request",
37
40
  "planr_approval_approve",
@@ -47,7 +50,6 @@
47
50
  "planr_evidence_obligation_list",
48
51
  "planr_evidence_obligation_show",
49
52
  "planr_evidence_migrate",
50
- "planr_evidence_rebind",
51
53
  "planr_evidence_classifications",
52
54
  "planr_evidence_capability_list",
53
55
  "planr_evidence_capability_show",
@@ -60,6 +62,7 @@
60
62
  "planr_evidence_coverage",
61
63
  "planr_evidence_explain",
62
64
  "planr_evidence_readiness",
65
+ "planr_evidence_recover_settlement",
63
66
  "planr_eval_suite_check",
64
67
  "planr_eval_run",
65
68
  "planr_eval_show",
@@ -71,9 +74,9 @@
71
74
  "planr_log_add",
72
75
  "planr_review_annotate",
73
76
  "planr_review_ingest",
74
- "planr_review_artifact",
75
77
  "planr_review_evidence",
76
- "planr_review_close",
78
+ "planr_review_gate_close",
79
+ "planr_review_findings_resolve",
77
80
  "planr_close_item",
78
81
  "planr_context_create",
79
82
  "planr_search",
@@ -130,9 +133,10 @@
130
133
  "planr mcp",
131
134
  "planr review annotate",
132
135
  "planr review ingest",
133
- "planr review artifact",
134
136
  "planr review evidence",
135
137
  "planr review close",
138
+ "planr review findings",
139
+ "planr plan final-review",
136
140
  "planr eval suite-check",
137
141
  "planr eval compare",
138
142
  "planr eval gate",
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "planr",
3
- "version": "1.10.0-alpha.2",
3
+ "version": "1.10.0-alpha.4",
4
4
  "description": "Local-first planning and execution coordination for coding agents.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "planr",
3
3
  "description": "Skill-driven planning and execution loop for coding agents: one planr entry point, an autonomous planr-loop, and evidence-backed task graph skills powered by the planr CLI.",
4
- "version": "1.10.0-alpha.2",
4
+ "version": "1.10.0-alpha.4",
5
5
  "author": {
6
6
  "name": "instructa"
7
7
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "planr",
3
- "version": "1.10.0-alpha.2",
3
+ "version": "1.10.0-alpha.4",
4
4
  "description": "Skill-driven planning and execution loop for coding agents: one $planr entry point, an autonomous $planr-loop, and evidence-backed task graph skills powered by the planr CLI.",
5
5
  "author": {
6
6
  "name": "instructa",