plan-auditor 2.2.0__tar.gz → 2.3.0__tar.gz
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.
Potentially problematic release.
This version of plan-auditor might be problematic. Click here for more details.
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/CHANGELOG.md +11 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/PKG-INFO +105 -13
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/README.md +104 -12
- plan_auditor-2.3.0/SKILL.md +281 -0
- plan_auditor-2.3.0/docs/formal-planning.md +257 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/pyproject.toml +2 -1
- plan_auditor-2.3.0/supervisor/formal_planning.py +1008 -0
- plan_auditor-2.3.0/supervisor/formal_semantics.py +174 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/supervisor/plan_verifier.py +35 -1
- plan_auditor-2.3.0/tests/test_formal_planning.py +210 -0
- plan_auditor-2.3.0/tests/test_formal_semantics.py +103 -0
- plan_auditor-2.2.0/SKILL.md +0 -191
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/.gitignore +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/CONTRIBUTING.md +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/LICENSE +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/docs/architecture.md +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/docs/dependency-graph.md +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/docs/deployment-isolation.md +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/docs/integrations.md +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/docs/threat-model.md +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/examples/fib/.plan-auditor/plan.json +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/examples/fib/fib.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/examples/fib/test_fib.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/hooks/README.md +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/references/plan-format.md +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/scripts/__init__.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/scripts/audit_check.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/scripts/integrity.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/scripts/plan_graph.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/scripts/stop_gate.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/supervisor/__init__.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/supervisor/adversarial.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/supervisor/agents.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/supervisor/agents_hardening.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/supervisor/audit_session.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/supervisor/cli.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/supervisor/config.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/supervisor/contracts.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/supervisor/control_plane.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/supervisor/coverage.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/supervisor/daemon.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/supervisor/events.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/supervisor/evidence.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/supervisor/gate.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/supervisor/goals.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/supervisor/integrity.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/supervisor/lifecycle.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/supervisor/lock_hardening.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/supervisor/orchestrator.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/supervisor/plans.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/supervisor/policies.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/supervisor/priority.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/supervisor/request_contract.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/supervisor/requirements.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/supervisor/seal_migration.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/supervisor/sealing.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/supervisor/watchdog.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/supervisor/workspace.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/tests/request_fixture.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/tests/test_adversarial.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/tests/test_agent_registry_chain.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/tests/test_agents_gate.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/tests/test_audit_check.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/tests/test_authenticated_integrity.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/tests/test_cli.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/tests/test_core_layers.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/tests/test_daemon.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/tests/test_dependency_graph.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/tests/test_events.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/tests/test_extra_layers.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/tests/test_failure_injection.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/tests/test_full_contract_hardening.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/tests/test_hooks.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/tests/test_integration_hardening.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/tests/test_registry_lock_partial.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/tests/test_request_contract_hardening.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/tests/test_root_cause_fixes_v220.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/tests/test_runtime_root_hardening.py +0 -0
- {plan_auditor-2.2.0 → plan_auditor-2.3.0}/tests/wheel_cli_smoke.py +0 -0
|
@@ -4,6 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
# Changelog
|
|
6
6
|
|
|
7
|
+
## v2.3.0 — 2026-09-06
|
|
8
|
+
|
|
9
|
+
- **Sealed classical planning:** non-trivial multi-step plans can embed one sealed `formal_planning` contract with explicit initial facts, final goals, one grounded STRIPS-style action per Plan Auditor step, symbolic preconditions, add effects and delete effects.
|
|
10
|
+
- **Native LLM-free reachability:** monotonic contracts use deterministic forward reasoning while delete-effect contracts use bounded state-space search. Exhausting the configured state budget returns UNKNOWN instead of manufacturing PASS.
|
|
11
|
+
- **PDDL / Fast Downward cross-check:** the same normalized contract can be exported as sanitized PDDL `:strips` and optionally cross-checked with Fast Downward without making an external planner or GPU a package dependency.
|
|
12
|
+
- **Requirement-to-formal-goal binding:** every `must`/`should` requirement in a formalized plan must map to the canonical `requirement-satisfied:<REQ-ID>` final goal, may not be pre-satisfied in `initial_facts`, and must be produced by an action whose Plan Auditor step covers that same requirement.
|
|
13
|
+
- **Semantic fail-closed hardening:** missing requirement goals, non-covering producers, pre-satisfied required goals, duplicate formal anchors and effect-free formal actions are rejected before formal reachability can contribute to PASS.
|
|
14
|
+
- **Direct skill-name invocation:** `SKILL.md` and README now make `plan-auditor` the user-facing invocation; users do not need to hand-author plan JSON, STRIPS/PDDL contracts, seal metadata or evidence files for the normal skill workflow.
|
|
15
|
+
- **Regression coverage:** dedicated formal-planning and semantic-binding tests cover reachable/unreachable contracts, delete-effect dead ends, alternate valid orderings, bounded search, PDDL sanitization, duplicate anchors, requirement omissions and formal-contract mutation.
|
|
16
|
+
- **Version identity:** source/package/skill version advances to `2.3.0`, so the post-v2.2.0 formal-planning and semantic-binding code is no longer distributed under the already-published `2.2.0` identity.
|
|
17
|
+
|
|
7
18
|
## v2.2.0 — 2026-09-05
|
|
8
19
|
|
|
9
20
|
- **Physical control-plane confinement:** existing `.plan-auditor`, plan, seal, request/activation and policy path components are inspected with `lstat`; symlinked parents/leaves cannot redefine the workspace trust root.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: plan-auditor
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.0
|
|
4
4
|
Summary: Independent multi-layer verification supervisor for AI coding agents
|
|
5
5
|
Project-URL: Homepage, https://github.com/Furox-Art/plan-auditor
|
|
6
6
|
Project-URL: Repository, https://github.com/Furox-Art/plan-auditor
|
|
@@ -36,6 +36,37 @@ PASS requires reproducible behavioral checks, explicit requirement coverage, an
|
|
|
36
36
|
intact sealed verification contract, fresh audit evidence, and a valid aggregate
|
|
37
37
|
completion gate across **every active plan**.
|
|
38
38
|
|
|
39
|
+
## Use it directly by skill name
|
|
40
|
+
|
|
41
|
+
In a skill-capable AI coding environment, call/select the skill simply as:
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
plan-auditor
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
or give the task in the same invocation:
|
|
48
|
+
|
|
49
|
+
```text
|
|
50
|
+
plan-auditor: implement this change and prove it is complete
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
You should not need to hand-write the internal plan JSON, formal STRIPS contract,
|
|
54
|
+
seal metadata, or evidence files. The `plan-auditor` skill is instructed to build
|
|
55
|
+
those artifacts, verify them, and run the final audit on your behalf.
|
|
56
|
+
|
|
57
|
+
For non-trivial multi-step work, the skill now creates a sealed LLM-free
|
|
58
|
+
`formal_planning` contract by default, so the plan is checked twice at different
|
|
59
|
+
levels:
|
|
60
|
+
|
|
61
|
+
1. **Classical symbolic planning** — can the declared preconditions/effects reach
|
|
62
|
+
the final goals while respecting dependencies?
|
|
63
|
+
2. **Deterministic execution audit** — was the concrete work actually executed
|
|
64
|
+
and proven by real checks?
|
|
65
|
+
|
|
66
|
+
The built-in classical planner uses only Python/CPU. PDDL export and Fast Downward
|
|
67
|
+
are available as an optional independent planner cross-check. See
|
|
68
|
+
`docs/formal-planning.md`.
|
|
69
|
+
|
|
39
70
|
## Core completion model
|
|
40
71
|
|
|
41
72
|
```text
|
|
@@ -49,7 +80,13 @@ Explicit requirement IDs ──► plan steps (`covers`)
|
|
|
49
80
|
│ └─ requires_outputs
|
|
50
81
|
│
|
|
51
82
|
▼
|
|
52
|
-
|
|
83
|
+
Sealed STRIPS-style symbolic plan (non-trivial multi-step work)
|
|
84
|
+
│
|
|
85
|
+
├─ internal classical reachability check
|
|
86
|
+
└─ PDDL / Fast Downward cross-check (optional)
|
|
87
|
+
│
|
|
88
|
+
▼
|
|
89
|
+
Format-v4 full-contract seal
|
|
53
90
|
│
|
|
54
91
|
▼
|
|
55
92
|
Deterministic execution / tests
|
|
@@ -80,7 +117,11 @@ following:
|
|
|
80
117
|
- at least one behavioral check (`run`, `exec`, `pytest`) per step,
|
|
81
118
|
- valid dependency DAG,
|
|
82
119
|
- concrete output contract for every explicit dependency edge,
|
|
83
|
-
-
|
|
120
|
+
- successful formal reachability when a `formal_planning` anchor is present,
|
|
121
|
+
- when formal planning is present, every `must`/`should` requirement is bound to
|
|
122
|
+
a non-initial canonical `requirement-satisfied:<REQ-ID>` goal produced by a
|
|
123
|
+
step that covers the same requirement,
|
|
124
|
+
- intact format-v4 seal,
|
|
84
125
|
- unchanged sealed supervisor profile/mode/tier/policy fingerprint,
|
|
85
126
|
- all steps verified in a fresh full audit,
|
|
86
127
|
- current plan contract matches the audited plan fingerprint,
|
|
@@ -154,13 +195,56 @@ Example plan fragment:
|
|
|
154
195
|
A downstream step cannot pass until the prerequisite passed and the upstream
|
|
155
196
|
output contract is independently rechecked.
|
|
156
197
|
|
|
198
|
+
## Classical STRIPS/PDDL planning
|
|
199
|
+
|
|
200
|
+
For non-trivial multi-step plans, `plan-auditor` can embed a symbolic contract
|
|
201
|
+
inside one ordinary sealed `run` check. The contract includes:
|
|
202
|
+
|
|
203
|
+
- initial facts,
|
|
204
|
+
- final goal facts,
|
|
205
|
+
- one action per Plan Auditor step,
|
|
206
|
+
- symbolic preconditions,
|
|
207
|
+
- add effects,
|
|
208
|
+
- delete effects.
|
|
209
|
+
|
|
210
|
+
The internal grounded STRIPS-style planner checks whether all steps can execute
|
|
211
|
+
while reaching the declared goals. Plans with no delete effects use an efficient
|
|
212
|
+
deterministic forward solver; delete-effect plans use bounded state-space search.
|
|
213
|
+
|
|
214
|
+
For every `must`/`should` requirement `REQ-X`, a formal plan must also include the
|
|
215
|
+
canonical goal fact `requirement-satisfied:REQ-X`. That fact cannot be pre-satisfied
|
|
216
|
+
in `initial_facts`; it must be produced by a formal action whose Plan Auditor step
|
|
217
|
+
covers `REQ-X`. Missing, pre-satisfied, non-covering, and effect-free bindings are
|
|
218
|
+
rejected before a formal PASS can contribute to completion.
|
|
219
|
+
|
|
220
|
+
The canonical check is generated with:
|
|
221
|
+
|
|
222
|
+
```bash
|
|
223
|
+
plan-auditor-formal make-check formal-contract.json
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
Optional PDDL/Fast Downward cross-check:
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
plan-auditor-formal make-check formal-contract.json \
|
|
230
|
+
--fast-downward auto \
|
|
231
|
+
--require-fast-downward
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Because the formal contract is stored inside the normal verification check, its
|
|
235
|
+
facts/actions/effects/goals are covered by the existing plan fingerprint and
|
|
236
|
+
seal. Changing or removing them after sealing is not a silent escape hatch.
|
|
237
|
+
|
|
238
|
+
Formal planning proves the declared symbolic model; it does not replace concrete
|
|
239
|
+
execution evidence. See `docs/formal-planning.md`.
|
|
240
|
+
|
|
157
241
|
## Full-contract sealing
|
|
158
242
|
|
|
159
243
|
```bash
|
|
160
244
|
plan-auditor plan verify .
|
|
161
245
|
```
|
|
162
246
|
|
|
163
|
-
The
|
|
247
|
+
The v4 seal binds:
|
|
164
248
|
|
|
165
249
|
- task and requirements,
|
|
166
250
|
- required tools,
|
|
@@ -169,6 +253,7 @@ The v3 seal binds:
|
|
|
169
253
|
- dependencies and required outputs,
|
|
170
254
|
- outputs and their checks,
|
|
171
255
|
- step verification checks,
|
|
256
|
+
- embedded formal-planning data when present,
|
|
172
257
|
- supervisor `profile`, `mode`, `tier`,
|
|
173
258
|
- configured-policy fingerprint.
|
|
174
259
|
|
|
@@ -236,6 +321,9 @@ plan-auditor doctor <dir>
|
|
|
236
321
|
plan-auditor task list <dir>
|
|
237
322
|
plan-auditor agents list|register|heartbeat|claim|release ...
|
|
238
323
|
plan-auditor supervisor start|stop|status ...
|
|
324
|
+
plan-auditor-formal make-check <formal-contract.json>
|
|
325
|
+
plan-auditor-formal verify <dir> --contract-sha <sha256>
|
|
326
|
+
plan-auditor-formal export-pddl <dir> --contract-sha <sha256> --output <dir>
|
|
239
327
|
```
|
|
240
328
|
|
|
241
329
|
With no `--plan`, `plan verify` and the integrated final gate operate across all
|
|
@@ -281,28 +369,32 @@ so PyPI publishing cannot race ahead of platform packaging validation.
|
|
|
281
369
|
## Architecture
|
|
282
370
|
|
|
283
371
|
The supervisor combines deterministic layers for requirements, workspace state,
|
|
284
|
-
policy evaluation, plan/DAG validation,
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
372
|
+
policy evaluation, plan/DAG validation, BDI-inspired goal state, sealed
|
|
373
|
+
STRIPS-style symbolic reachability, Soar-like lifecycle, subsumption authority,
|
|
374
|
+
sealing, watchdog observation, evidence integrity, completion gating, and
|
|
375
|
+
multi-agent coordination. Optional semantic/adversarial review may propose
|
|
376
|
+
stronger deterministic checks but cannot create PASS.
|
|
288
377
|
|
|
289
378
|
See:
|
|
290
379
|
|
|
291
380
|
- `docs/architecture.md`
|
|
292
381
|
- `docs/dependency-graph.md`
|
|
382
|
+
- `docs/formal-planning.md`
|
|
293
383
|
- `docs/threat-model.md`
|
|
294
384
|
- `references/plan-format.md`
|
|
295
385
|
|
|
296
386
|
## Trust boundary
|
|
297
387
|
|
|
298
|
-
Plan Auditor verifies completion; it is not an OS sandbox.
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
388
|
+
Plan Auditor verifies completion; it is not an OS sandbox. Formal planning cannot
|
|
389
|
+
repair an incorrect formalization: a planner can prove a wrong symbolic model
|
|
390
|
+
correctly. External-key HMAC protects against workspace-only rewriting while the
|
|
391
|
+
untrusted process cannot read the key. A deliberately malicious same-user process
|
|
392
|
+
that can obtain the key is outside that guarantee. See the threat model for exact
|
|
393
|
+
boundaries.
|
|
302
394
|
|
|
303
395
|
## Version
|
|
304
396
|
|
|
305
|
-
Current development version: **2.
|
|
397
|
+
Current development version: **2.3.0**.
|
|
306
398
|
|
|
307
399
|
## License
|
|
308
400
|
|
|
@@ -14,6 +14,37 @@ PASS requires reproducible behavioral checks, explicit requirement coverage, an
|
|
|
14
14
|
intact sealed verification contract, fresh audit evidence, and a valid aggregate
|
|
15
15
|
completion gate across **every active plan**.
|
|
16
16
|
|
|
17
|
+
## Use it directly by skill name
|
|
18
|
+
|
|
19
|
+
In a skill-capable AI coding environment, call/select the skill simply as:
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
plan-auditor
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
or give the task in the same invocation:
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
plan-auditor: implement this change and prove it is complete
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
You should not need to hand-write the internal plan JSON, formal STRIPS contract,
|
|
32
|
+
seal metadata, or evidence files. The `plan-auditor` skill is instructed to build
|
|
33
|
+
those artifacts, verify them, and run the final audit on your behalf.
|
|
34
|
+
|
|
35
|
+
For non-trivial multi-step work, the skill now creates a sealed LLM-free
|
|
36
|
+
`formal_planning` contract by default, so the plan is checked twice at different
|
|
37
|
+
levels:
|
|
38
|
+
|
|
39
|
+
1. **Classical symbolic planning** — can the declared preconditions/effects reach
|
|
40
|
+
the final goals while respecting dependencies?
|
|
41
|
+
2. **Deterministic execution audit** — was the concrete work actually executed
|
|
42
|
+
and proven by real checks?
|
|
43
|
+
|
|
44
|
+
The built-in classical planner uses only Python/CPU. PDDL export and Fast Downward
|
|
45
|
+
are available as an optional independent planner cross-check. See
|
|
46
|
+
`docs/formal-planning.md`.
|
|
47
|
+
|
|
17
48
|
## Core completion model
|
|
18
49
|
|
|
19
50
|
```text
|
|
@@ -27,7 +58,13 @@ Explicit requirement IDs ──► plan steps (`covers`)
|
|
|
27
58
|
│ └─ requires_outputs
|
|
28
59
|
│
|
|
29
60
|
▼
|
|
30
|
-
|
|
61
|
+
Sealed STRIPS-style symbolic plan (non-trivial multi-step work)
|
|
62
|
+
│
|
|
63
|
+
├─ internal classical reachability check
|
|
64
|
+
└─ PDDL / Fast Downward cross-check (optional)
|
|
65
|
+
│
|
|
66
|
+
▼
|
|
67
|
+
Format-v4 full-contract seal
|
|
31
68
|
│
|
|
32
69
|
▼
|
|
33
70
|
Deterministic execution / tests
|
|
@@ -58,7 +95,11 @@ following:
|
|
|
58
95
|
- at least one behavioral check (`run`, `exec`, `pytest`) per step,
|
|
59
96
|
- valid dependency DAG,
|
|
60
97
|
- concrete output contract for every explicit dependency edge,
|
|
61
|
-
-
|
|
98
|
+
- successful formal reachability when a `formal_planning` anchor is present,
|
|
99
|
+
- when formal planning is present, every `must`/`should` requirement is bound to
|
|
100
|
+
a non-initial canonical `requirement-satisfied:<REQ-ID>` goal produced by a
|
|
101
|
+
step that covers the same requirement,
|
|
102
|
+
- intact format-v4 seal,
|
|
62
103
|
- unchanged sealed supervisor profile/mode/tier/policy fingerprint,
|
|
63
104
|
- all steps verified in a fresh full audit,
|
|
64
105
|
- current plan contract matches the audited plan fingerprint,
|
|
@@ -132,13 +173,56 @@ Example plan fragment:
|
|
|
132
173
|
A downstream step cannot pass until the prerequisite passed and the upstream
|
|
133
174
|
output contract is independently rechecked.
|
|
134
175
|
|
|
176
|
+
## Classical STRIPS/PDDL planning
|
|
177
|
+
|
|
178
|
+
For non-trivial multi-step plans, `plan-auditor` can embed a symbolic contract
|
|
179
|
+
inside one ordinary sealed `run` check. The contract includes:
|
|
180
|
+
|
|
181
|
+
- initial facts,
|
|
182
|
+
- final goal facts,
|
|
183
|
+
- one action per Plan Auditor step,
|
|
184
|
+
- symbolic preconditions,
|
|
185
|
+
- add effects,
|
|
186
|
+
- delete effects.
|
|
187
|
+
|
|
188
|
+
The internal grounded STRIPS-style planner checks whether all steps can execute
|
|
189
|
+
while reaching the declared goals. Plans with no delete effects use an efficient
|
|
190
|
+
deterministic forward solver; delete-effect plans use bounded state-space search.
|
|
191
|
+
|
|
192
|
+
For every `must`/`should` requirement `REQ-X`, a formal plan must also include the
|
|
193
|
+
canonical goal fact `requirement-satisfied:REQ-X`. That fact cannot be pre-satisfied
|
|
194
|
+
in `initial_facts`; it must be produced by a formal action whose Plan Auditor step
|
|
195
|
+
covers `REQ-X`. Missing, pre-satisfied, non-covering, and effect-free bindings are
|
|
196
|
+
rejected before a formal PASS can contribute to completion.
|
|
197
|
+
|
|
198
|
+
The canonical check is generated with:
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
plan-auditor-formal make-check formal-contract.json
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Optional PDDL/Fast Downward cross-check:
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
plan-auditor-formal make-check formal-contract.json \
|
|
208
|
+
--fast-downward auto \
|
|
209
|
+
--require-fast-downward
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
Because the formal contract is stored inside the normal verification check, its
|
|
213
|
+
facts/actions/effects/goals are covered by the existing plan fingerprint and
|
|
214
|
+
seal. Changing or removing them after sealing is not a silent escape hatch.
|
|
215
|
+
|
|
216
|
+
Formal planning proves the declared symbolic model; it does not replace concrete
|
|
217
|
+
execution evidence. See `docs/formal-planning.md`.
|
|
218
|
+
|
|
135
219
|
## Full-contract sealing
|
|
136
220
|
|
|
137
221
|
```bash
|
|
138
222
|
plan-auditor plan verify .
|
|
139
223
|
```
|
|
140
224
|
|
|
141
|
-
The
|
|
225
|
+
The v4 seal binds:
|
|
142
226
|
|
|
143
227
|
- task and requirements,
|
|
144
228
|
- required tools,
|
|
@@ -147,6 +231,7 @@ The v3 seal binds:
|
|
|
147
231
|
- dependencies and required outputs,
|
|
148
232
|
- outputs and their checks,
|
|
149
233
|
- step verification checks,
|
|
234
|
+
- embedded formal-planning data when present,
|
|
150
235
|
- supervisor `profile`, `mode`, `tier`,
|
|
151
236
|
- configured-policy fingerprint.
|
|
152
237
|
|
|
@@ -214,6 +299,9 @@ plan-auditor doctor <dir>
|
|
|
214
299
|
plan-auditor task list <dir>
|
|
215
300
|
plan-auditor agents list|register|heartbeat|claim|release ...
|
|
216
301
|
plan-auditor supervisor start|stop|status ...
|
|
302
|
+
plan-auditor-formal make-check <formal-contract.json>
|
|
303
|
+
plan-auditor-formal verify <dir> --contract-sha <sha256>
|
|
304
|
+
plan-auditor-formal export-pddl <dir> --contract-sha <sha256> --output <dir>
|
|
217
305
|
```
|
|
218
306
|
|
|
219
307
|
With no `--plan`, `plan verify` and the integrated final gate operate across all
|
|
@@ -259,28 +347,32 @@ so PyPI publishing cannot race ahead of platform packaging validation.
|
|
|
259
347
|
## Architecture
|
|
260
348
|
|
|
261
349
|
The supervisor combines deterministic layers for requirements, workspace state,
|
|
262
|
-
policy evaluation, plan/DAG validation,
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
350
|
+
policy evaluation, plan/DAG validation, BDI-inspired goal state, sealed
|
|
351
|
+
STRIPS-style symbolic reachability, Soar-like lifecycle, subsumption authority,
|
|
352
|
+
sealing, watchdog observation, evidence integrity, completion gating, and
|
|
353
|
+
multi-agent coordination. Optional semantic/adversarial review may propose
|
|
354
|
+
stronger deterministic checks but cannot create PASS.
|
|
266
355
|
|
|
267
356
|
See:
|
|
268
357
|
|
|
269
358
|
- `docs/architecture.md`
|
|
270
359
|
- `docs/dependency-graph.md`
|
|
360
|
+
- `docs/formal-planning.md`
|
|
271
361
|
- `docs/threat-model.md`
|
|
272
362
|
- `references/plan-format.md`
|
|
273
363
|
|
|
274
364
|
## Trust boundary
|
|
275
365
|
|
|
276
|
-
Plan Auditor verifies completion; it is not an OS sandbox.
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
366
|
+
Plan Auditor verifies completion; it is not an OS sandbox. Formal planning cannot
|
|
367
|
+
repair an incorrect formalization: a planner can prove a wrong symbolic model
|
|
368
|
+
correctly. External-key HMAC protects against workspace-only rewriting while the
|
|
369
|
+
untrusted process cannot read the key. A deliberately malicious same-user process
|
|
370
|
+
that can obtain the key is outside that guarantee. See the threat model for exact
|
|
371
|
+
boundaries.
|
|
280
372
|
|
|
281
373
|
## Version
|
|
282
374
|
|
|
283
|
-
Current development version: **2.
|
|
375
|
+
Current development version: **2.3.0**.
|
|
284
376
|
|
|
285
377
|
## License
|
|
286
378
|
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan-auditor
|
|
3
|
+
description: Invoke this skill by name as `plan-auditor` for non-trivial build/implement/fix work or whenever the user wants independent proof that an AI actually completed the requested work. It converts the task into explicit requirements and machine-verifiable steps, adds sealed LLM-free classical planning for non-trivial multi-step plans, proves every step with real command evidence, and blocks completion until every active plan has an intact contract and a fresh deterministic audit.
|
|
4
|
+
argument-hint: "<task description>"
|
|
5
|
+
metadata:
|
|
6
|
+
version: "2.3.0"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Plan Auditor — strict plan + independent verification
|
|
10
|
+
|
|
11
|
+
The main agent's narration is never evidence. The workflow has two conceptual
|
|
12
|
+
roles that must remain separate:
|
|
13
|
+
|
|
14
|
+
- **Planner / implementer:** converts the user's exact requirements into work.
|
|
15
|
+
- **Auditor / supervisor:** decides completion only from reproducible checks and
|
|
16
|
+
the sealed verification contract.
|
|
17
|
+
|
|
18
|
+
## Direct invocation
|
|
19
|
+
|
|
20
|
+
When this skill is selected or called by its name, `plan-auditor`, run the full
|
|
21
|
+
workflow described below. The user should not need to know the internal plan JSON,
|
|
22
|
+
formal-planning schema, sealing commands, or evidence format.
|
|
23
|
+
|
|
24
|
+
Examples of user intent that should invoke this skill:
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
plan-auditor
|
|
28
|
+
plan-auditor: implement this and prove it is complete
|
|
29
|
+
Use plan-auditor for this task.
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Treat the user's task text as the authoritative input. Build the requirements,
|
|
33
|
+
plan, formal contract when applicable, deterministic checks, seal, implementation
|
|
34
|
+
verification, and final audit on the user's behalf.
|
|
35
|
+
|
|
36
|
+
For non-trivial multi-step plans, create exactly one sealed `formal_planning`
|
|
37
|
+
anchor by default so the LLM-free STRIPS-style planner checks symbolic
|
|
38
|
+
reachability in addition to the existing dependency/output graph. Every
|
|
39
|
+
`must`/`should` requirement must also be bound to the canonical formal goal fact
|
|
40
|
+
`requirement-satisfied:<REQ-ID>`. That fact must be a final goal, must not be true
|
|
41
|
+
in `initial_facts`, and must be added by an action whose Plan Auditor step covers
|
|
42
|
+
the same requirement. Every formal action must have at least one symbolic add or
|
|
43
|
+
delete effect. This prevents a decorative STRIPS model from being disconnected
|
|
44
|
+
from the requirements it claims to prove.
|
|
45
|
+
|
|
46
|
+
Use `plan-auditor-formal make-check` to generate the canonical check and SHA. Fast
|
|
47
|
+
Downward is an optional independent cross-check; the internal planner remains the
|
|
48
|
+
default and requires no GPU, model API, or network connection.
|
|
49
|
+
|
|
50
|
+
A trivial one-step task may omit formal planning when a symbolic state model adds
|
|
51
|
+
no meaningful assurance. Never fabricate facts merely to force a formal model.
|
|
52
|
+
|
|
53
|
+
## Non-negotiable rules
|
|
54
|
+
|
|
55
|
+
1. **No deterministic evidence = not done.**
|
|
56
|
+
2. **Every user requirement must be explicit.** Supervisor Mode requires
|
|
57
|
+
`plan.requirements`, and every `must`/`should` requirement must be linked from
|
|
58
|
+
one or more steps through `covers`.
|
|
59
|
+
3. **Every step needs real behavior.** At least one `run`, `exec`, or `pytest`
|
|
60
|
+
check is mandatory; existence/regex checks may supplement but not replace it.
|
|
61
|
+
4. **Dependencies must be concrete.** In explicit DAG plans, every dependency
|
|
62
|
+
edge must be backed by a named upstream output and `requires_outputs`.
|
|
63
|
+
5. **Non-trivial multi-step plans get symbolic reachability proof.** Create one
|
|
64
|
+
sealed `formal_planning` anchor with initial facts, preconditions, add/delete
|
|
65
|
+
effects, and final goals unless the task is genuinely too trivial for that
|
|
66
|
+
model to add assurance.
|
|
67
|
+
6. **Formal goals must prove requirements, not merely exist.** For every
|
|
68
|
+
`must`/`should` requirement `REQ-X`, include `requirement-satisfied:REQ-X` in
|
|
69
|
+
`goal_facts` and have a covering step produce it. Never place a required
|
|
70
|
+
requirement goal in `initial_facts`; every formal action must have a symbolic
|
|
71
|
+
effect.
|
|
72
|
+
7. **Sealed criteria can only tighten.** Do not remove or edit sealed checks,
|
|
73
|
+
dependencies, required outputs, outputs, coverage, requirements, formal
|
|
74
|
+
planning data, or supervisor policy/profile settings to manufacture PASS.
|
|
75
|
+
8. **All active plans count.** A passing default plan never hides an unfinished
|
|
76
|
+
`.plan-auditor/plans/<name>.json` plan.
|
|
77
|
+
9. **Full audit is the completion gate.** Do not claim completion until
|
|
78
|
+
`plan-auditor audit <project>` exits 0.
|
|
79
|
+
10. **Semantic judgment can only tighten.** If the deterministic checks miss a
|
|
80
|
+
real defect, add a stronger deterministic check and rerun; prose cannot turn a
|
|
81
|
+
failure into PASS.
|
|
82
|
+
|
|
83
|
+
## Plan files
|
|
84
|
+
|
|
85
|
+
- Default: `<project>/.plan-auditor/plan.json`
|
|
86
|
+
- Named: `<project>/.plan-auditor/plans/<safe-name>.json`
|
|
87
|
+
- Format reference: `references/plan-format.md`
|
|
88
|
+
- Formal planning reference: `docs/formal-planning.md`
|
|
89
|
+
- Evidence: `<project>/.plan-auditor/evidence.jsonl` plus anchored archives
|
|
90
|
+
|
|
91
|
+
A plan should contain explicit `requirements` and use stable IDs such as
|
|
92
|
+
`REQ-001`. Each implementation step names the requirements it proves:
|
|
93
|
+
|
|
94
|
+
```json
|
|
95
|
+
{
|
|
96
|
+
"task": "implement the requested behavior",
|
|
97
|
+
"created": "2026-09-05T00:00:00Z",
|
|
98
|
+
"requirements": [
|
|
99
|
+
{"id": "REQ-001", "description": "requested behavior works", "priority": "must"}
|
|
100
|
+
],
|
|
101
|
+
"required_tools": ["python"],
|
|
102
|
+
"steps": [
|
|
103
|
+
{
|
|
104
|
+
"id": 1,
|
|
105
|
+
"title": "implement and prove behavior",
|
|
106
|
+
"covers": ["REQ-001"],
|
|
107
|
+
"verify": [
|
|
108
|
+
{"type": "run", "argv": ["python", "-m", "pytest", "tests/", "-q"]}
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Prefer structured `argv`. Shell interpretation is disabled by default and
|
|
116
|
+
`"shell": true` is an explicit trust-boundary opt-in.
|
|
117
|
+
|
|
118
|
+
## Workflow
|
|
119
|
+
|
|
120
|
+
### 1. Capture the full requirement set
|
|
121
|
+
|
|
122
|
+
Translate every material user requirement into a stable requirement object.
|
|
123
|
+
Do not omit a requested feature merely because the implementation plan is
|
|
124
|
+
shorter. Ambiguous requirements must be clarified or represented explicitly;
|
|
125
|
+
they must not disappear.
|
|
126
|
+
|
|
127
|
+
### 2. Build a measurable plan
|
|
128
|
+
|
|
129
|
+
Break the work into steps with machine-executable checks. For multi-step work,
|
|
130
|
+
model prerequisites and concrete outputs. Example:
|
|
131
|
+
|
|
132
|
+
```json
|
|
133
|
+
{
|
|
134
|
+
"id": 2,
|
|
135
|
+
"title": "consume verified upstream result",
|
|
136
|
+
"depends_on": [1],
|
|
137
|
+
"requires_outputs": [{"step": 1, "name": "artifact"}],
|
|
138
|
+
"covers": ["REQ-002"],
|
|
139
|
+
"verify": [{"type": "run", "argv": ["python", "tests/check_consumer.py"]}]
|
|
140
|
+
}
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Run schema validation while drafting:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
plan-auditor validate <project>
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
For a named plan, the deterministic core also accepts `--plan <name>`.
|
|
150
|
+
|
|
151
|
+
### 3. Add sealed classical planning for non-trivial multi-step plans
|
|
152
|
+
|
|
153
|
+
Model the symbolic state using facts, preconditions, add effects, delete effects,
|
|
154
|
+
and final goals. The action set must contain exactly one action for every Plan
|
|
155
|
+
Auditor step. Existing `depends_on` edges are enforced automatically by the
|
|
156
|
+
classical planner.
|
|
157
|
+
|
|
158
|
+
In addition to ordinary domain facts, create a deterministic requirement binding
|
|
159
|
+
for every `must`/`should` requirement. For example, if step 1 covers `REQ-001`,
|
|
160
|
+
its `add_effects` must include `requirement-satisfied:REQ-001`, and that fact must
|
|
161
|
+
also appear in `goal_facts`. The required fact cannot appear in `initial_facts`.
|
|
162
|
+
The integrated L5 verifier rejects missing bindings, bindings produced only by
|
|
163
|
+
non-covering steps, or effect-free formal actions.
|
|
164
|
+
|
|
165
|
+
Generate the canonical anchored check rather than hand-writing its SHA:
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
plan-auditor-formal make-check formal-contract.json
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Put the generated check into exactly one step's `verify` array before sealing.
|
|
172
|
+
Use Fast Downward only when an additional external planner cross-check is desired:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
plan-auditor-formal make-check formal-contract.json \
|
|
176
|
+
--fast-downward auto \
|
|
177
|
+
--require-fast-downward
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
The internal planner is authoritative for the built-in formal layer and remains
|
|
181
|
+
fully local/CPU-only. Formal planning proves the declared symbolic model; the
|
|
182
|
+
requirement-binding layer proves that the symbolic end state is connected to the
|
|
183
|
+
requirements covered by the plan. Neither replaces concrete execution checks or
|
|
184
|
+
the host-owned request acceptance checks.
|
|
185
|
+
|
|
186
|
+
### 4. Implement and verify after each step
|
|
187
|
+
|
|
188
|
+
Run pending/given step checks through the auditor. A failed check means the step
|
|
189
|
+
is not finished. Diagnose the real failure, fix the implementation, and rerun.
|
|
190
|
+
Never weaken a check just to obtain PASS.
|
|
191
|
+
|
|
192
|
+
The deterministic core caps normal failed attempts per step and counts failures
|
|
193
|
+
across evidence rotations. Use force only when the user explicitly authorizes an
|
|
194
|
+
exceptional retry.
|
|
195
|
+
|
|
196
|
+
### 5. Seal the complete verification contract
|
|
197
|
+
|
|
198
|
+
Before final audit:
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
plan-auditor plan verify <project>
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
With no `--plan`, Supervisor Mode verifies and seals **all active plans**. The
|
|
205
|
+
format-v4 seal binds requirements, coverage, DAG/output contracts, checks,
|
|
206
|
+
required tools, and supervisor profile/mode/policy fingerprint. Because formal
|
|
207
|
+
planning is embedded inside an ordinary sealed verification check, its facts,
|
|
208
|
+
actions, effects, goals, and required external-planner flags are covered by the
|
|
209
|
+
same seal and plan fingerprint.
|
|
210
|
+
|
|
211
|
+
If external-key authenticated integrity is configured, initialize it after the
|
|
212
|
+
seals exist:
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
plan-auditor integrity init <project>
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
The key must be outside the workspace (or supplied through the environment).
|
|
219
|
+
This authenticates evidence, checkpoints, registry state, and seals.
|
|
220
|
+
|
|
221
|
+
### 6. Run the final integrated audit
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
plan-auditor audit <project>
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
PASS requires every active plan to have:
|
|
228
|
+
|
|
229
|
+
- valid schema and explicit requirement coverage,
|
|
230
|
+
- successful formal reachability when a `formal_planning` anchor is present,
|
|
231
|
+
- deterministic formal requirement-to-goal alignment for every `must`/`should`
|
|
232
|
+
requirement when formal planning is present,
|
|
233
|
+
- intact full-contract seal,
|
|
234
|
+
- unchanged sealed supervisor environment/policies,
|
|
235
|
+
- all steps verified,
|
|
236
|
+
- valid dependency/output evidence,
|
|
237
|
+
- a fresh plan/workspace fingerprint from a complete audit,
|
|
238
|
+
- valid active + archived evidence chains,
|
|
239
|
+
- valid agent-registry state,
|
|
240
|
+
- required tools present,
|
|
241
|
+
- no blocking policy result.
|
|
242
|
+
|
|
243
|
+
Only exit code 0 means completion is proven.
|
|
244
|
+
|
|
245
|
+
### 7. Report with evidence
|
|
246
|
+
|
|
247
|
+
Report which plan/steps were audited and the final PASS/FAIL/UNKNOWN outcome.
|
|
248
|
+
Do not substitute “I did it” for the audit result.
|
|
249
|
+
|
|
250
|
+
## Hook enforcement
|
|
251
|
+
|
|
252
|
+
`hooks/gate_hook.py` is the authoritative platform-neutral gate. The legacy
|
|
253
|
+
`scripts/stop_gate.py` filename remains only as a compatibility adapter for tools
|
|
254
|
+
whose Stop hook expects exit code 2; it delegates to the same integrated gate and
|
|
255
|
+
does **not** trust `status=verified`.
|
|
256
|
+
|
|
257
|
+
- Blocking-hook platforms can prevent turn completion when the integrated gate
|
|
258
|
+
is not PASS.
|
|
259
|
+
- Advisory-only platforms can write/inject the gate result, but cannot physically
|
|
260
|
+
block the host application.
|
|
261
|
+
|
|
262
|
+
The hook and the CLI use the same aggregate multi-plan completion decision.
|
|
263
|
+
|
|
264
|
+
## Snapshot / rollback
|
|
265
|
+
|
|
266
|
+
The deterministic core supports `snapshot` and `rollback`. A default snapshot
|
|
267
|
+
captures the full workspace product state (excluding auditor/git/cache metadata)
|
|
268
|
+
and writes a manifest with file type, mode and hash; full-scope rollback restores
|
|
269
|
+
those files and removes files introduced after the snapshot. An explicit
|
|
270
|
+
`snapshot` list intentionally limits the rollback scope.
|
|
271
|
+
|
|
272
|
+
## Trust boundary
|
|
273
|
+
|
|
274
|
+
The purpose of Plan Auditor is to determine whether the AI actually completed the
|
|
275
|
+
planned/user-requested work, not to sandbox the AI. Formal planning still cannot
|
|
276
|
+
understand whether a human-language requirement was translated into the right
|
|
277
|
+
symbolic meaning. The deterministic binding layer closes omission/disconnection
|
|
278
|
+
between approved requirements and formal goals, while the host-owned request
|
|
279
|
+
contract and acceptance checks remain authoritative for user intent. External
|
|
280
|
+
HMAC improves tamper detection, but a same-user process that can read the HMAC key
|
|
281
|
+
is outside that integrity guarantee. See `docs/threat-model.md`.
|