Skip to content

Commit 18cecd0

Browse files
authored
Merge pull request #61 from instructa/codex/alpha6-binding-evidence-hard-cut
Alpha 6: hard cut binding Evidence authority
2 parents 906b945 + 71a495b commit 18cecd0

43 files changed

Lines changed: 801 additions & 2369 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.cursor-plugin/plugin.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "planr",
3-
"version": "1.10.0-alpha.5",
3+
"version": "1.10.0-alpha.6",
44
"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.",
55
"author": {
66
"name": "instructa",

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ service-account*.json
7070
.codex/
7171
.claude/
7272
.claude.json
73+
.proofloop/evidence/
7374
.planr/*
7475

7576
# Exception: Planr's own product plan package is the committed product spec.

‎.planr/plans/product/planr/API_AND_DATA_MODEL.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ Eval Contract v1, including the additive v1.1 efficiency-evidence amendment, is
1313

1414
## Planr 2.0 FeatureRun Budget Objects
1515

16+
## PlanEvidenceAuthority
17+
18+
`PlanEvidenceAuthority = nonbinding | binding_unsatisfied | binding_active` is a derived application value, not stored mutable state. `nonbinding` requires no binding repository policy and no binding plan obligations. `binding_unsatisfied` means policy requires binding Evidence but the plan has no materialized obligation. `binding_active` means authoritative binding obligation rows exist. Only `binding_active` can enter verification; only `nonbinding` can use the direct source-frozen final-review route.
19+
1620
### FeatureRunBudgetContract
1721

1822
`schema = planr.feature_run_budget_contract.v2`; run id; persisted UTC run-start anchor and clock basis; explicit `bounded | unbounded` mode; optional complete wall-seconds/tool-call/token limits and five-phase allocations; per-dimension metering requirements; canonical SHA-256 digest. The contract is insert-only and is created in the same transaction as its FeatureRun. Bounded mode requires positive limits and an exact allocation of each dimension across maker, verification, review, repair, and release. Unbounded mode has neither limits nor phase reserves.

‎.planr/plans/product/planr/PRODUCT_SPEC.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ Planr turns broad product ideas and coding work into a coherent flow: product pl
6767
- REQ-PROD-BUDGET-008: Planr owns provider-neutral policy and admission; host adapters only enforce supplied maxima/deadlines and report observations.
6868
- REQ-PROD-BUDGET-009: An active FeatureRun with a missing, invalid, or digest-mismatched v2 budget contract must return a typed hold before lease or dispatch. The explicit plan-scoped `incompatible-budget` restart policy-cancels that run atomically without synthesizing a contract; only a later ordinary pick may create a distinct run and its one immutable v2 contract.
6969

70+
## Binding Evidence Authority
71+
72+
- REQ-PROD-EVIDENCE-001: Repository Evidence policy and materialized plan obligations jointly determine one canonical authority: `nonbinding`, `binding_unsatisfied`, or `binding_active`.
73+
- REQ-PROD-EVIDENCE-002: Binding policy without a materialized plan obligation must fail closed before implementation activation and at every later lifecycle boundary. It must never reach final review through claim logs, empty coverage, or empty receipt lineage.
74+
- REQ-PROD-EVIDENCE-003: Only explicit `planr.evidence.migration.v1` application materializes obligations. Planr must not synthesize them during planning, picking, readiness, audit, or review.
75+
- REQ-PROD-EVIDENCE-004: A verification-readiness failure must persist a capability hold after the failed lease transaction rolls back.
76+
7077
## User Personas
7178

7279
- Solo operator: runs Codex and Claude Code in one repo and wants clean handoffs.

‎.planr/plans/product/planr/TASKS.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
These tasks are implementation-ready work items for coding agents. They intentionally avoid storypoints and timelines.
44

5+
## Alpha 6 Binding Evidence Hard Cut
6+
7+
### TASK-ALPHA6-EVIDENCE-001: Make Policy And Obligations One Fail-Closed Authority
8+
9+
Replace obligation-row-only lifecycle branching with the canonical `PlanEvidenceAuthority`; reject binding-policy plans with no materialized obligations before implementation and final review; persist a capability hold when verifier readiness fails; remove claim-log and empty-lineage compatibility authority; retain explicit migration as the only obligation writer.
10+
11+
Acceptance: `cargo check --lib` passes, followed by one focused lifecycle invariant in the separate hardening phase.
12+
513
## V1.1 Differentiation
614

715
These tasks implement `V1_1_DIFFERENTIATION_CONTRACT.md`. They are Planr-owned product work and must not introduce public references to local comparison products.

‎.planr/plans/product/planr/TECH_ARCHITECTURE.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ CLI, MCP, and HTTP restart adapters parse only the closed `incompatible-budget`
6868

6969
Compatible budget-hold resolution is a separate `app/feature_run_evidence` lifecycle. It resumes only the exact prior phase after one immediate transaction revalidates the persisted contract/snapshot, every active reservation and deadline, the canonical role owner, and lease generation. Incompatible contracts route to restart; capability holds, corrupt or exhausted state, missing reservations, expired deadlines, and ownership mismatch remain fail-closed. CLI, MCP, and HTTP are transport-only.
7070

71+
## Binding Evidence Ownership
72+
73+
- `app/evidence` owns repository-policy parsing and whether the policy requires binding Evidence.
74+
- `app/proof` is the sole owner of `PlanEvidenceAuthority`: `nonbinding`, `binding_unsatisfied`, or `binding_active`, derived from policy plus authoritative obligation rows.
75+
- FeatureRun handoff, verifier admission, audit, final-review admission, accepted-risk handoff, and stop activation consume that classification. They do not infer authority from an empty coverage list or verification logs.
76+
- Explicit Evidence migration remains the sole obligation writer. A missing obligation under binding policy becomes a durable capability hold, not a compatibility route.
77+
7178
## Backend Architecture
7279

7380
V1 is a local backend packaged into the CLI binary:

‎.proofloop/project-profile.json‎

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
{
2+
"schema_version": 3,
3+
"kind": "proofloop-herdr-sol-luna/project-profile",
4+
"project": {
5+
"name": "Planr",
6+
"root": ".",
7+
"task_source": ".planr/plans/product/planr/TASKS.md"
8+
},
9+
"roles": {
10+
"sol": {
11+
"owns": [
12+
"intake",
13+
"architecture",
14+
"design-sensitive implementation",
15+
"integration",
16+
"final decision"
17+
],
18+
"sole_writer": true
19+
},
20+
"luna": {
21+
"enabled": false,
22+
"read_only": true,
23+
"allowed_modes": []
24+
}
25+
},
26+
"sentinel_policy": {
27+
"default_mode": "off",
28+
"healthy_notifications": false,
29+
"deduplicate_events": true,
30+
"user_message_fallback": "critical-only",
31+
"max_runtime_minutes": 45,
32+
"exit_after_stop": true,
33+
"record_process": true
34+
},
35+
"paths": {
36+
"allowed": [
37+
"AGENTS.md",
38+
".gitignore",
39+
".proofloop/**",
40+
".planr/plans/product/planr/**",
41+
"docs/contracts/EVIDENCE_CONTRACT_V1.md",
42+
"docs/fixtures/mcp-contract.json",
43+
"apps/docs/content/docs/reference/**",
44+
"apps/docs/scripts/verify-reference.mjs",
45+
"scripts/evidence-dogfood-v1.mjs",
46+
"src/app/**",
47+
"src/cli/**",
48+
"src/integrations/**",
49+
"tests/e2e.rs"
50+
],
51+
"forbidden": [
52+
".git/**",
53+
".env",
54+
".env.*",
55+
"**/*.pem",
56+
"**/*.key",
57+
".codex/**",
58+
".claude/**"
59+
]
60+
},
61+
"validation": {
62+
"cwd": ".",
63+
"command": "cargo test --test e2e binding_policy_without_obligations_holds_before_review -- --exact",
64+
"full_suite_command": "cargo test --bins",
65+
"timeout_seconds": 900
66+
},
67+
"testing": {
68+
"strategy": "distill",
69+
"tracked_test_globs": [
70+
"tests/**",
71+
"**/tests/**",
72+
"*_test.*",
73+
"**/*_test.*",
74+
"*.test.*",
75+
"**/*.test.*",
76+
"*.spec.*",
77+
"**/*.spec.*"
78+
],
79+
"build": {
80+
"permanent_test_edits": "deny",
81+
"full_suite": "deny"
82+
},
83+
"harden": {
84+
"permanent_test_edits": "admission-required",
85+
"max_new_invariants": 1,
86+
"max_changed_test_files": 1,
87+
"max_added_test_lines": 100,
88+
"full_suite": "ci-or-explicit"
89+
}
90+
},
91+
"evidence": {
92+
"directory": ".proofloop/evidence",
93+
"required": [
94+
"diff",
95+
"validation-result",
96+
"test-gate",
97+
"handoff"
98+
]
99+
},
100+
"budgets": {
101+
"checkpoint_minutes": 20,
102+
"hard_stop_minutes": 45,
103+
"max_patch_batches": 1
104+
},
105+
"stop_conditions": [
106+
"out-of-scope write",
107+
"second writer or nested delegation",
108+
"hypothesis disproved or scope broadened",
109+
"context compaction during design-sensitive work",
110+
"checkpoint or hard-stop exceeded"
111+
],
112+
"manual_acceptance": {
113+
"required": false,
114+
"owner": "human",
115+
"criteria": []
116+
},
117+
"pane_policy": {
118+
"reuse_suitable_existing": true,
119+
"record_created": true,
120+
"close_recorded_only": true,
121+
"max_completed_workflow_panes": 0
122+
}
123+
}
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"schema_version": 3,
3+
"kind": "proofloop-herdr-sol-luna/run-contract",
4+
"task": {
5+
"id": "alpha6-binding-evidence-lifecycle-hard-cut-harden",
6+
"source": ".planr/plans/product/planr/TASKS.md",
7+
"goal": "One lifecycle invariant proves that binding policy without obligations cannot lease or close implementation work.",
8+
"hypothesis": "The canonical authority fails closed before item mutation, and explicit migration is the sole obligation writer."
9+
},
10+
"project_profile": ".proofloop/project-profile.json",
11+
"phase": "harden",
12+
"writer": "sol",
13+
"allowed_paths": [
14+
".proofloop/**",
15+
"tests/e2e.rs"
16+
],
17+
"test_policy": {
18+
"baseline_record": ".proofloop/evidence/alpha6-binding-evidence-harden/test-baseline.json",
19+
"result_record": ".proofloop/evidence/alpha6-binding-evidence-harden/test-gate.json",
20+
"ephemeral_directory": ".proofloop/evidence/alpha6-binding-evidence-harden/probes",
21+
"admission_record": ".proofloop/evidence/alpha6-binding-evidence-harden/test-admission.json",
22+
"permanent": {
23+
"max_new_invariants": 1,
24+
"max_changed_test_files": 1,
25+
"max_added_test_lines": 100
26+
},
27+
"full_suite": {
28+
"allowed": false,
29+
"reason": null
30+
}
31+
},
32+
"luna_mode": null,
33+
"validation": {
34+
"cwd": ".",
35+
"command": "cargo test --test e2e binding_policy_without_obligations_holds_before_review -- --exact",
36+
"timeout_seconds": 900,
37+
"pass_criteria": [
38+
"the single lifecycle invariant passes",
39+
"the ready item remains unleased and unclosed",
40+
"no FeatureRun starts before explicit Evidence migration"
41+
]
42+
},
43+
"evidence": {
44+
"directory": ".proofloop/evidence/alpha6-binding-evidence-harden",
45+
"required": [
46+
"baseline",
47+
"diff",
48+
"validation-result",
49+
"test-gate",
50+
"handoff",
51+
"pane-ownership"
52+
]
53+
},
54+
"budgets": {
55+
"checkpoint_minutes": 15,
56+
"hard_stop_minutes": 30,
57+
"max_patch_batches": 1
58+
},
59+
"stop_conditions": [
60+
"out-of-scope write",
61+
"second writer or nested delegation",
62+
"a second permanent invariant is proposed",
63+
"full-suite execution"
64+
],
65+
"manual_acceptance": {
66+
"required": false,
67+
"owner": "human",
68+
"criteria": []
69+
},
70+
"cleanup": {
71+
"ownership_record": ".proofloop/evidence/alpha6-binding-evidence-harden/pane-ownership.json",
72+
"sentinel_process_record": ".proofloop/evidence/alpha6-binding-evidence-harden/sentinel-process.json",
73+
"sentinel_state_record": ".proofloop/evidence/alpha6-binding-evidence-harden/sentinel-state.json",
74+
"stop_recorded_sentinel_process": true,
75+
"close_recorded_workflow_panes": true,
76+
"leave_preexisting_panes_open": true,
77+
"retire_sentinel_state": true
78+
}
79+
}

‎AGENTS.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,12 @@ Core rules:
2020
- Require log-backed closure: files changed, commands run, tests/review results, and blocked or unverified items.
2121
- Support Codex, Claude Code, and Cursor as peers through MCP and CLI workflows.
2222
- Never modify, replace, or re-upload an already published release. Fix release defects only by bumping and publishing a new version.
23+
24+
## Proofloop contract
25+
26+
- Project profile: `.proofloop/project-profile.json`.
27+
- Sol is the sole writer and final decision owner.
28+
- Luna is disabled unless a future run contract explicitly enables a read-only role; the current run uses `luna_mode: null`.
29+
- BUILD may change production code and product-plan contracts, but not tracked tests or run a full suite.
30+
- HARDEN requires a separate run contract and admits at most one permanent invariant into one existing test file.
31+
- Validation commands and evidence paths come only from the active run contract.

‎CHANGELOG.md‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66

77
## [Unreleased]
88

9+
## [1.10.0-alpha.6] - 2026-08-15
10+
11+
### Changed
12+
13+
- Make repository Evidence policy and materialized plan obligations one canonical authority for picking, execution, audit, review, and stop decisions.
14+
- Make explicit `planr.evidence.migration.v1` application the sole proof-obligation writer; obligation CLI, MCP, and HTTP surfaces are now read-only.
15+
- Remove the retired repository-local Evidence dogfood harness now that comparative benchmarks are owned by `planr-evals`.
16+
17+
### Fixed
18+
19+
- Hold binding-policy plans with no materialized obligation before leasing work or creating a FeatureRun, and reject adoption or closure until the explicit migration is applied.
20+
- Keep verification logs diagnostic-only so empty coverage or receipt lineage can never satisfy binding Evidence.
21+
922
## [1.10.0-alpha.5] - 2026-08-14
1023

1124
### Fixed
@@ -630,7 +643,8 @@ Initial Planr product release.
630643
- Tag-driven release pipeline with multi-target builds (darwin/linux, arm64/x86_64) and Homebrew tap automation.
631644
- Skill workflow documentation for Codex, Claude Code, Cursor, and MCP-only clients.
632645

633-
[Unreleased]: https://github.com/instructa/planr/compare/v1.10.0-alpha.5...HEAD
646+
[Unreleased]: https://github.com/instructa/planr/compare/v1.10.0-alpha.6...HEAD
647+
[1.10.0-alpha.6]: https://github.com/instructa/planr/compare/v1.10.0-alpha.5...v1.10.0-alpha.6
634648
[1.10.0-alpha.5]: https://github.com/instructa/planr/compare/v1.10.0-alpha.4...v1.10.0-alpha.5
635649
[1.10.0-alpha.4]: https://github.com/instructa/planr/compare/v1.10.0-alpha.2...v1.10.0-alpha.4
636650
[1.10.0-alpha.2]: https://github.com/instructa/planr/compare/v1.10.0-alpha.1...v1.10.0-alpha.2

0 commit comments

Comments
 (0)