codex-workflow-v2 2.0.0-beta.1 → 2.0.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +94 -12
- package/dist/src/alpha6/adoption.js +13 -3
- package/dist/src/alpha6/adoption.js.map +1 -1
- package/dist/src/alpha6/handoff.d.ts +26 -2
- package/dist/src/alpha6/handoff.js +277 -29
- package/dist/src/alpha6/handoff.js.map +1 -1
- package/dist/src/alpha6/mechanical-feasibility.d.ts +7 -0
- package/dist/src/alpha6/mechanical-feasibility.js +303 -0
- package/dist/src/alpha6/mechanical-feasibility.js.map +1 -0
- package/dist/src/alpha6/milestone.d.ts +37 -2
- package/dist/src/alpha6/milestone.js +472 -33
- package/dist/src/alpha6/milestone.js.map +1 -1
- package/dist/src/alpha6/plan-integrity.d.ts +14 -0
- package/dist/src/alpha6/plan-integrity.js +127 -0
- package/dist/src/alpha6/plan-integrity.js.map +1 -0
- package/dist/src/alpha6/plan-risk.d.ts +1 -0
- package/dist/src/alpha6/plan-risk.js +15 -7
- package/dist/src/alpha6/plan-risk.js.map +1 -1
- package/dist/src/alpha6/remediation.d.ts +2 -1
- package/dist/src/alpha6/remediation.js +186 -9
- package/dist/src/alpha6/remediation.js.map +1 -1
- package/dist/src/alpha6/review.d.ts +3 -0
- package/dist/src/alpha6/review.js +24 -0
- package/dist/src/alpha6/review.js.map +1 -1
- package/dist/src/cli.js +486 -46
- package/dist/src/cli.js.map +1 -1
- package/dist/src/contracts.d.ts +238 -6
- package/dist/src/contracts.js +1 -1
- package/dist/src/credential-output.d.ts +10 -0
- package/dist/src/credential-output.js +73 -0
- package/dist/src/credential-output.js.map +1 -0
- package/dist/src/dependency-provenance.d.ts +19 -0
- package/dist/src/dependency-provenance.js +185 -0
- package/dist/src/dependency-provenance.js.map +1 -0
- package/dist/src/errors.d.ts +1 -1
- package/dist/src/errors.js.map +1 -1
- package/dist/src/git.d.ts +1 -1
- package/dist/src/git.js +13 -5
- package/dist/src/git.js.map +1 -1
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.js +2 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/lifecycle/canonical-hash.d.ts +6 -0
- package/dist/src/lifecycle/canonical-hash.js +24 -0
- package/dist/src/lifecycle/canonical-hash.js.map +1 -0
- package/dist/src/lifecycle/catalog.d.ts +26 -0
- package/dist/src/lifecycle/catalog.js +208 -0
- package/dist/src/lifecycle/catalog.js.map +1 -0
- package/dist/src/lifecycle/compiler-inspection.d.ts +48 -0
- package/dist/src/lifecycle/compiler-inspection.js +29 -0
- package/dist/src/lifecycle/compiler-inspection.js.map +1 -0
- package/dist/src/lifecycle/core-static-readiness.d.ts +6 -0
- package/dist/src/lifecycle/core-static-readiness.js +130 -0
- package/dist/src/lifecycle/core-static-readiness.js.map +1 -0
- package/dist/src/lifecycle/corrective-replan-authority.d.ts +53 -0
- package/dist/src/lifecycle/corrective-replan-authority.js +139 -0
- package/dist/src/lifecycle/corrective-replan-authority.js.map +1 -0
- package/dist/src/lifecycle/corrective-replan-binding-manifest.d.ts +21 -0
- package/dist/src/lifecycle/corrective-replan-binding-manifest.js +35 -0
- package/dist/src/lifecycle/corrective-replan-binding-manifest.js.map +1 -0
- package/dist/src/lifecycle/corrective-replan-credential-core.d.ts +86 -0
- package/dist/src/lifecycle/corrective-replan-credential-core.js +563 -0
- package/dist/src/lifecycle/corrective-replan-credential-core.js.map +1 -0
- package/dist/src/lifecycle/corrective-replan-credential-schema.d.ts +17 -0
- package/dist/src/lifecycle/corrective-replan-credential-schema.js +44 -0
- package/dist/src/lifecycle/corrective-replan-credential-schema.js.map +1 -0
- package/dist/src/lifecycle/corrective-replan-credentials.d.ts +47 -0
- package/dist/src/lifecycle/corrective-replan-credentials.js +103 -0
- package/dist/src/lifecycle/corrective-replan-credentials.js.map +1 -0
- package/dist/src/lifecycle/corrective-replan.d.ts +64 -0
- package/dist/src/lifecycle/corrective-replan.js +553 -0
- package/dist/src/lifecycle/corrective-replan.js.map +1 -0
- package/dist/src/lifecycle/evaluator.d.ts +2 -0
- package/dist/src/lifecycle/evaluator.js +35 -0
- package/dist/src/lifecycle/evaluator.js.map +1 -0
- package/dist/src/lifecycle/fingerprint.d.ts +31 -0
- package/dist/src/lifecycle/fingerprint.js +388 -0
- package/dist/src/lifecycle/fingerprint.js.map +1 -0
- package/dist/src/lifecycle/immutable.d.ts +1 -0
- package/dist/src/lifecycle/immutable.js +10 -0
- package/dist/src/lifecycle/immutable.js.map +1 -0
- package/dist/src/lifecycle/implementation-table.d.ts +29 -0
- package/dist/src/lifecycle/implementation-table.js +87 -0
- package/dist/src/lifecycle/implementation-table.js.map +1 -0
- package/dist/src/lifecycle/index.d.ts +4 -0
- package/dist/src/lifecycle/index.js +5 -0
- package/dist/src/lifecycle/index.js.map +1 -0
- package/dist/src/lifecycle/schema-artifact.d.ts +12 -0
- package/dist/src/lifecycle/schema-artifact.js +214 -0
- package/dist/src/lifecycle/schema-artifact.js.map +1 -0
- package/dist/src/lifecycle/semantic-registry.d.ts +6 -0
- package/dist/src/lifecycle/semantic-registry.js +489 -0
- package/dist/src/lifecycle/semantic-registry.js.map +1 -0
- package/dist/src/lifecycle/types.d.ts +718 -0
- package/dist/src/lifecycle/types.js +4 -0
- package/dist/src/lifecycle/types.js.map +1 -0
- package/dist/src/observation.d.ts +20 -0
- package/dist/src/observation.js +171 -0
- package/dist/src/observation.js.map +1 -0
- package/dist/src/reviewer.d.ts +43 -1
- package/dist/src/reviewer.js +203 -50
- package/dist/src/reviewer.js.map +1 -1
- package/dist/src/state/corrective-replan-executor.d.ts +64 -0
- package/dist/src/state/corrective-replan-executor.js +608 -0
- package/dist/src/state/corrective-replan-executor.js.map +1 -0
- package/dist/src/state/corrective-replan-public-schema.d.ts +3 -0
- package/dist/src/state/corrective-replan-public-schema.js +43 -0
- package/dist/src/state/corrective-replan-public-schema.js.map +1 -0
- package/dist/src/state/corrective-replan-public.d.ts +95 -0
- package/dist/src/state/corrective-replan-public.js +665 -0
- package/dist/src/state/corrective-replan-public.js.map +1 -0
- package/dist/src/state/corrective-replan-transaction.d.ts +160 -0
- package/dist/src/state/corrective-replan-transaction.js +730 -0
- package/dist/src/state/corrective-replan-transaction.js.map +1 -0
- package/dist/src/state/corrective-yield-executor.d.ts +31 -0
- package/dist/src/state/corrective-yield-executor.js +236 -0
- package/dist/src/state/corrective-yield-executor.js.map +1 -0
- package/dist/src/state/corrective-yield-transaction.d.ts +97 -0
- package/dist/src/state/corrective-yield-transaction.js +591 -0
- package/dist/src/state/corrective-yield-transaction.js.map +1 -0
- package/dist/src/state/lock.d.ts +76 -3
- package/dist/src/state/lock.js +611 -30
- package/dist/src/state/lock.js.map +1 -1
- package/dist/src/state/store.d.ts +3 -0
- package/dist/src/state/store.js +65 -12
- package/dist/src/state/store.js.map +1 -1
- package/dist/src/transition-core.d.ts +67 -0
- package/dist/src/transition-core.js +318 -0
- package/dist/src/transition-core.js.map +1 -0
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/src/workflow.d.ts +88 -24
- package/dist/src/workflow.js +1647 -270
- package/dist/src/workflow.js.map +1 -1
- package/docs/autonomy-guardrails.md +61 -1
- package/docs/beta11-plan-integrity-recovery-brief.md +38 -0
- package/docs/beta2-initial-assembly-navigation-brief.md +616 -0
- package/docs/delegated-approval.md +26 -1
- package/docs/development-flow.md +63 -8
- package/docs/lifecycle/state-machine-stabilization.md +641 -0
- package/docs/pdf/README.md +24 -0
- package/docs/pdf/codex-workflow-v2-architecture-ru.pdf +0 -0
- package/docs/pdf/codex-workflow-v2-chat-only-guide-ru.pdf +0 -0
- package/docs/pdf/codex-workflow-v2-technical-reference-ru.pdf +0 -0
- package/docs/pdf/requirements.txt +1 -0
- package/docs/pdf/sources/codex-workflow-v2-architecture-ru.md +234 -0
- package/docs/pdf/sources/codex-workflow-v2-chat-only-guide-ru.md +334 -0
- package/docs/pdf/sources/codex-workflow-v2-technical-reference-ru.md +413 -0
- package/docs/problem-briefs/01-pre-implementation-integrity.md +478 -0
- package/docs/problem-briefs/02-minimal-step-integrity.md +411 -0
- package/docs/problem-briefs/03-minimal-agent-context-integrity.md +358 -0
- package/docs/problem-briefs/04-task-dependency-and-structural-replacement-integrity.md +566 -0
- package/docs/problem-briefs/BRIEF-TEMPLATE.md +56 -0
- package/docs/problem-briefs/README.md +120 -0
- package/docs/problem-briefs/evidence/p01-mechanical-feasibility-corpus.md +90 -0
- package/docs/problem-briefs/evidence/signal-v4-pre-m3-replay.md +246 -0
- package/docs/release.md +30 -6
- package/docs/split-required-recovery.md +19 -25
- package/docs/stable-release-defect-register.md +465 -3
- package/docs/updating-existing-project.md +59 -4
- package/docs/validation-report.md +124 -56
- package/package.json +9 -1
- package/plugins/codex-workflow-gateway/.codex-plugin/plugin.json +10 -3
- package/plugins/codex-workflow-gateway/references/protocol.md +92 -4
- package/plugins/codex-workflow-gateway/scripts/chat-registry.mjs +376 -0
- package/plugins/codex-workflow-gateway/skills/codex-workflow-gateway/SKILL.md +263 -4
- package/references/state-machine.md +13 -6
- package/roles/delivery-coordinator.md +39 -0
- package/schemas/adoption-posture-event.schema.json +1 -1
- package/schemas/authorization-event.schema.json +64 -1
- package/schemas/context-envelope.schema.json +1 -1
- package/schemas/corrective-decision-event.schema.json +48 -3
- package/schemas/corrective-replan-credentials.private.schema.json +98 -0
- package/schemas/corrective-replan-execution-event.private.schema.json +53 -0
- package/schemas/corrective-replan-public.schema.json +142 -0
- package/schemas/corrective-replan-task-transaction.private.schema.json +151 -0
- package/schemas/corrective-yield-task-transaction.private.schema.json +98 -0
- package/schemas/milestone-scope-change-event.schema.json +6 -1
- package/schemas/milestone.schema.json +6 -1
- package/schemas/remediation-event.schema.json +11 -1
- package/schemas/task-handoff-event.schema.json +19 -3
- package/schemas/task.schema.json +24 -1
- package/schemas/transition-definition.schema.json +2609 -0
- package/schemas/transition-payloads.schema.json +140 -0
- package/scripts/generate-pdf-docs.py +512 -0
- package/scripts/run-pdf-docs.mjs +62 -0
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
---
|
|
2
|
+
brief_id: WF2-P02
|
|
3
|
+
problem: "STEP is not a safe and useful independently verifiable increment"
|
|
4
|
+
status: hypothesis
|
|
5
|
+
owner: null
|
|
6
|
+
created_at: 2026-08-23
|
|
7
|
+
approved_at: null
|
|
8
|
+
implemented_at: null
|
|
9
|
+
revision: 4
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Brief — Minimal Step Integrity
|
|
13
|
+
|
|
14
|
+
## 0. Evidence status
|
|
15
|
+
|
|
16
|
+
The semantic enforcement gap is **partially confirmed**. The original data-model proposal is not
|
|
17
|
+
accepted.
|
|
18
|
+
|
|
19
|
+
Workflow already represents:
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
Step.expectedOutputs[] -> candidate postconditions
|
|
23
|
+
Step.checks[] -> executable verification
|
|
24
|
+
Step.dependencies[] -> explicit Step prerequisites
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Current validation requires these fields, rejects missing/self dependencies and cycles, and blocks
|
|
28
|
+
execution until declared dependencies are complete. Therefore P02 must not add duplicate
|
|
29
|
+
`postcondition`, `verification`, or `dependencies[]` fields.
|
|
30
|
+
|
|
31
|
+
The remaining problem is semantic:
|
|
32
|
+
|
|
33
|
+
- non-empty `expectedOutputs[]` are not proven to describe a useful valid Task state;
|
|
34
|
+
- non-empty `checks[]` are not traced to the outputs they prove;
|
|
35
|
+
- Workflow does not determine whether a future Step is required to make the current Step safe or
|
|
36
|
+
meaningful;
|
|
37
|
+
- a Plan can still be sliced by implementation activity rather than independently valid outcomes.
|
|
38
|
+
|
|
39
|
+
Two implementation contracts are currently absent:
|
|
40
|
+
|
|
41
|
+
- `expectedOutputs[]` and `checks[]` are independent arrays, so Core cannot prove which evidence is
|
|
42
|
+
intended to establish which output;
|
|
43
|
+
- semantic usefulness and future-Step independence have no declared authority on the low-risk path.
|
|
44
|
+
|
|
45
|
+
P02 is therefore `NO-GO` until the contract and authority proposed below pass the required replay.
|
|
46
|
+
|
|
47
|
+
The Signal pre-M3 replay supplied supporting examples:
|
|
48
|
+
|
|
49
|
+
- compatible-root lookup was initially treated as a reference lookup, although a hit must terminate
|
|
50
|
+
formalization without another content read, extraction, or evidence write;
|
|
51
|
+
- inbox existence was initially treated as terminal completion, although a retryable failure must
|
|
52
|
+
allow the same event to succeed later;
|
|
53
|
+
- a narrow check set passed while project-reference build and architecture checks still failed.
|
|
54
|
+
|
|
55
|
+
See
|
|
56
|
+
[OBS-008 through OBS-012](evidence/signal-v4-pre-m3-replay.md#obs-008--finding-a-compatible-root-record-must-short-circuit-extraction-and-persistence).
|
|
57
|
+
|
|
58
|
+
The replay did not exercise Workflow-materialized Steps or separate Planner/Worker/Reviewer roles,
|
|
59
|
+
so it does not by itself prove that historical Step slicing caused the observed M3 failures.
|
|
60
|
+
|
|
61
|
+
## 1. Problem
|
|
62
|
+
|
|
63
|
+
A Step must be a useful transition between valid Task states, not merely one activity in the
|
|
64
|
+
Implementer's preferred sequence.
|
|
65
|
+
|
|
66
|
+
Invalid example:
|
|
67
|
+
|
|
68
|
+
```text
|
|
69
|
+
STEP-001 create half of an internal mechanism
|
|
70
|
+
STEP-002 create the other half
|
|
71
|
+
STEP-003 connect both halves
|
|
72
|
+
STEP-004 first prove observable behavior
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Earlier Steps are not independently useful if their correctness can only be established after
|
|
76
|
+
STEP-003 or STEP-004.
|
|
77
|
+
|
|
78
|
+
Minimal rule:
|
|
79
|
+
|
|
80
|
+
> A Step is the smallest independently verifiable transition from one valid Task state to another
|
|
81
|
+
> valid Task state.
|
|
82
|
+
|
|
83
|
+
A valid Task may contain one Step when smaller boundaries would be artificial.
|
|
84
|
+
|
|
85
|
+
## 2. Existing contract interpretation
|
|
86
|
+
|
|
87
|
+
P02 standardizes the semantics of current fields:
|
|
88
|
+
|
|
89
|
+
### `expectedOutputs[]`
|
|
90
|
+
|
|
91
|
+
Each entry is an externally reviewable postcondition: a fact that becomes true when the Step
|
|
92
|
+
completes.
|
|
93
|
+
|
|
94
|
+
Activity-only descriptions are insufficient:
|
|
95
|
+
|
|
96
|
+
```text
|
|
97
|
+
bad: "add repository class"
|
|
98
|
+
good: "duplicate delivery returns the previously committed result without creating new evidence"
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### `checks[]`
|
|
102
|
+
|
|
103
|
+
Checks are executable evidence for the declared outputs. At Plan validation time, each output must
|
|
104
|
+
map to at least one check or to a named review assertion governed by the current guarded-review
|
|
105
|
+
policy.
|
|
106
|
+
|
|
107
|
+
This is target semantics, not a claim about the current schema. The existing independent arrays
|
|
108
|
+
cannot represent that relation exactly, and Core must not infer it from text similarity or array
|
|
109
|
+
position.
|
|
110
|
+
|
|
111
|
+
Command existence and semantic adequacy are separate:
|
|
112
|
+
|
|
113
|
+
- P01 proves supported mechanical feasibility;
|
|
114
|
+
- P02 proves that the planned evidence is capable of demonstrating the Step postcondition;
|
|
115
|
+
- execution proves whether the implementation actually satisfies it.
|
|
116
|
+
|
|
117
|
+
### `dependencies[]`
|
|
118
|
+
|
|
119
|
+
Dependencies contain only real Step prerequisites. Ordinal is identity, presentation, and scheduler
|
|
120
|
+
tie-break information; it does not establish correctness.
|
|
121
|
+
|
|
122
|
+
Workflow already validates and enforces these edges. P02 changes their semantic admission rule, not
|
|
123
|
+
their storage or execution model.
|
|
124
|
+
|
|
125
|
+
## 3. Required invariants
|
|
126
|
+
|
|
127
|
+
### INV-1 — Every Step declares a valid-state transition
|
|
128
|
+
|
|
129
|
+
`expectedOutputs[]` state what is observably true after completion. Implementation activities alone
|
|
130
|
+
do not satisfy the contract.
|
|
131
|
+
|
|
132
|
+
### INV-2 — Every output has boundary-time verification
|
|
133
|
+
|
|
134
|
+
At least one declared check or applicable guarded-review assertion can prove each expected output
|
|
135
|
+
without unfinished future work.
|
|
136
|
+
|
|
137
|
+
### INV-3 — A future Step cannot complete the current Step
|
|
138
|
+
|
|
139
|
+
If Step B is required to make Step A correct, safe, meaningful, or verifiable, A is not a valid
|
|
140
|
+
boundary. The Plan must merge or reslice the Steps.
|
|
141
|
+
|
|
142
|
+
### INV-4 — Completed Step state is safe
|
|
143
|
+
|
|
144
|
+
Required repository checks pass, the Step-specific verification passes, the postconditions hold,
|
|
145
|
+
and the repository remains within the authorized write and architecture boundaries.
|
|
146
|
+
|
|
147
|
+
### INV-5 — Dependencies are causal
|
|
148
|
+
|
|
149
|
+
For every `B dependsOn A`, B must require a postcondition established by A. Lower ordinal alone is
|
|
150
|
+
not evidence.
|
|
151
|
+
|
|
152
|
+
### INV-6 — Risk policy controls Review cost
|
|
153
|
+
|
|
154
|
+
Guarded/high-risk Steps require the existing strict Step Review. Low-risk Steps may become canonical
|
|
155
|
+
through Workflow-owned commit plus successful checks under current policy. P02 does not add
|
|
156
|
+
mandatory strict Review to every Step.
|
|
157
|
+
|
|
158
|
+
### INV-7 — Invalid slicing is not an implementation defect
|
|
159
|
+
|
|
160
|
+
An invalid Step boundary routes to Plan reslicing. If repair changes Task scope, ownership,
|
|
161
|
+
requirement allocation, or Task decomposition, deferred P01-B or current scope/replacement authority
|
|
162
|
+
must route it; P01-A does not.
|
|
163
|
+
|
|
164
|
+
## 4. Required design contract before implementation
|
|
165
|
+
|
|
166
|
+
### 4.1 Minimal output-to-evidence relation
|
|
167
|
+
|
|
168
|
+
Keep the existing `expectedOutputs[]` and `checks[]` as canonical content and add only the missing
|
|
169
|
+
relation to each `PlanStepInput`:
|
|
170
|
+
|
|
171
|
+
```text
|
|
172
|
+
verificationMap[] {
|
|
173
|
+
outputIndex
|
|
174
|
+
evidenceRefs[] =
|
|
175
|
+
{ kind: check, checkIndex }
|
|
176
|
+
| { kind: plan-risk-proof, failureMode }
|
|
177
|
+
}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Rules:
|
|
181
|
+
|
|
182
|
+
- every output index appears exactly once;
|
|
183
|
+
- every check index and output index resolves inside the same Step;
|
|
184
|
+
- a `plan-risk-proof` reference resolves to one unique proof obligation for that Step and is allowed
|
|
185
|
+
only when current guarded-risk policy requires the Plan Risk Audit;
|
|
186
|
+
- reordering or changing outputs, checks, proof obligations, or Steps changes the Plan/audit binding;
|
|
187
|
+
- Core validates referential completeness and timing, but does not claim semantic adequacy from the
|
|
188
|
+
mapping alone;
|
|
189
|
+
- no duplicate postcondition, check command, dependency, or new Step authority object is added.
|
|
190
|
+
|
|
191
|
+
Index-based references are intentional because the arrays are part of the canonical Plan hash. If
|
|
192
|
+
implementation selects stable entry IDs instead, the brief must first define their uniqueness,
|
|
193
|
+
hashing, and compatibility semantics; it may not mix both representations.
|
|
194
|
+
|
|
195
|
+
### 4.2 Semantic authority
|
|
196
|
+
|
|
197
|
+
The Planner authors the output and mapping. Authority is risk-dependent:
|
|
198
|
+
|
|
199
|
+
- for a low-risk Plan, existing human/delegated Task execution authorization accepts the semantic
|
|
200
|
+
claim; Core performs only structural and temporal validation and no extra agent Review is added;
|
|
201
|
+
- for a guarded Plan, the existing independent Plan Risk Auditor must assess useful-state,
|
|
202
|
+
boundary-time evidence, future-Step independence, and causal dependency claims in its current
|
|
203
|
+
Plan-bound audit;
|
|
204
|
+
- at completion, current checks and existing strict Step Review policy verify the implementation;
|
|
205
|
+
- if no permitted authority can decide the semantic claim, the result is `stop-escalate`, never a
|
|
206
|
+
Core-invented pass.
|
|
207
|
+
|
|
208
|
+
The exact Plan Risk Audit schema must be extended only as needed to carry the unique referenced
|
|
209
|
+
proof obligations. A second semantic-audit sidecar or mandatory Review for every low-risk Step is
|
|
210
|
+
not permitted.
|
|
211
|
+
|
|
212
|
+
### 4.3 Current-state routing
|
|
213
|
+
|
|
214
|
+
P02 does not add `reslice-plan` or `brief-decomposition-defect` to the current decision union.
|
|
215
|
+
|
|
216
|
+
```text
|
|
217
|
+
invalid candidate before authorization
|
|
218
|
+
-> reject Plan/authorization
|
|
219
|
+
-> existing task plan-set route with a replacement Plan
|
|
220
|
+
|
|
221
|
+
invalid slicing discovered after execution starts, same Task boundary
|
|
222
|
+
-> existing replan-required
|
|
223
|
+
-> current corrective-replan route
|
|
224
|
+
|
|
225
|
+
repair requires Task boundary change
|
|
226
|
+
-> existing split-required only when current corrective authority proves it
|
|
227
|
+
-> P04-A blocks materialization until P05/P04-B owns replacement topology
|
|
228
|
+
|
|
229
|
+
semantic authority cannot decide
|
|
230
|
+
-> existing stop-escalate
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
These routes do not consume an ordinary implementation retry merely because a new Plan is required.
|
|
234
|
+
Exact attempt-accounting changes, if any are needed, belong to the current corrective authority or
|
|
235
|
+
deferred P01-B; P02 must not create a parallel counter.
|
|
236
|
+
|
|
237
|
+
### 4.4 Plan integrity predicate
|
|
238
|
+
|
|
239
|
+
P02 adds a semantic predicate at the existing Plan validation/authorization boundary:
|
|
240
|
+
|
|
241
|
+
```text
|
|
242
|
+
STEP_VALID =
|
|
243
|
+
expected_outputs_describe_valid_state
|
|
244
|
+
AND every_output_has_verification
|
|
245
|
+
AND verification_available_at_step_boundary
|
|
246
|
+
AND no_future_step_required_for_correctness
|
|
247
|
+
AND dependencies_have_causal_justification
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
This predicate may require semantic Planner/Reviewer evidence for guarded Plans. Core must not claim
|
|
251
|
+
that arbitrary natural-language usefulness is mechanically decidable.
|
|
252
|
+
|
|
253
|
+
Core can decide the structural terms mechanically. The semantic terms require the authority in
|
|
254
|
+
section 4.2. The predicate is not implementation-ready until replay shows that this authority can
|
|
255
|
+
apply it consistently without turning every low-risk Plan into a review stage.
|
|
256
|
+
|
|
257
|
+
### 4.5 Legacy Plan policy
|
|
258
|
+
|
|
259
|
+
Historical Plan/Task state may lack `verificationMap`.
|
|
260
|
+
|
|
261
|
+
- terminal historical Tasks remain readable with the map represented as legacy/unknown;
|
|
262
|
+
- a Plan already execution-authorized before P02 installation may complete under the recorded
|
|
263
|
+
legacy authority, with diagnostics stating that P02 semantic mapping was not enforced;
|
|
264
|
+
- every new Plan, replacement Plan, or corrective replan written after P02 installation requires a
|
|
265
|
+
complete map;
|
|
266
|
+
- absence is never inferred from text, silently persisted as an empty map, or accepted on a new
|
|
267
|
+
authorization;
|
|
268
|
+
- a legacy Plan that returns to planning/replan posture must adopt the new contract before it can be
|
|
269
|
+
authorized again;
|
|
270
|
+
- legacy decoding preserves the historical Plan hash; migration does not rewrite old authority in
|
|
271
|
+
place.
|
|
272
|
+
|
|
273
|
+
This bounded grandfathering avoids stranding an already authorized `ready` or in-progress Task,
|
|
274
|
+
which current normal `task plan-set` routing cannot necessarily rewrite. It is a compatibility
|
|
275
|
+
exception, not evidence that the historical Step was semantically valid.
|
|
276
|
+
|
|
277
|
+
## 5. Validation
|
|
278
|
+
|
|
279
|
+
### 5.1 Contract and semantic tests
|
|
280
|
+
|
|
281
|
+
- empty `expectedOutputs[]` remains invalid;
|
|
282
|
+
- empty `checks[]` remains invalid;
|
|
283
|
+
- every expected output must map to verification;
|
|
284
|
+
- missing/self/cyclic dependencies remain invalid;
|
|
285
|
+
- a dependency without a causal postcondition relationship is rejected by semantic validation;
|
|
286
|
+
- a future Step required for current correctness rejects the candidate Plan before authorization or
|
|
287
|
+
produces existing `replan-required` after execution starts;
|
|
288
|
+
- one atomic Step remains valid;
|
|
289
|
+
- unsupported semantic classification returns `stop-escalate`, not an invented result.
|
|
290
|
+
- terminal and already-authorized legacy Plans remain readable under the explicit compatibility
|
|
291
|
+
policy;
|
|
292
|
+
- a new or replanned Task cannot omit `verificationMap`.
|
|
293
|
+
|
|
294
|
+
### 5.2 Synthetic E2E
|
|
295
|
+
|
|
296
|
+
1. Activity slices `schema -> storage -> runtime -> integration` are rejected when early Steps have
|
|
297
|
+
no safe independently verified outcome.
|
|
298
|
+
2. A backward-compatible schema Step with a real migration check is accepted when it leaves a valid
|
|
299
|
+
deployable state.
|
|
300
|
+
3. Compatible-root reuse is accepted only when the Step output explicitly requires short-circuiting
|
|
301
|
+
extraction and persistence.
|
|
302
|
+
4. Retry-to-success persistence is accepted only when the Step output distinguishes inbox identity,
|
|
303
|
+
attempt evidence, and terminal completion.
|
|
304
|
+
5. Two independent Steps with empty dependencies remain semantically independent even if the
|
|
305
|
+
scheduler runs them sequentially.
|
|
306
|
+
6. A real dependency blocks execution until the predecessor is canonical.
|
|
307
|
+
7. A valid Step with defective code follows the current `continue-fix` implementation remediation.
|
|
308
|
+
|
|
309
|
+
### 5.3 Historical replay
|
|
310
|
+
|
|
311
|
+
Before enforcement, replay:
|
|
312
|
+
|
|
313
|
+
- successful single-Step Tasks;
|
|
314
|
+
- successful multi-Step Tasks;
|
|
315
|
+
- guarded Tasks;
|
|
316
|
+
- ordinary implementation remediation;
|
|
317
|
+
- Tasks where integration defects appeared only after later Steps.
|
|
318
|
+
|
|
319
|
+
For each historical Step record:
|
|
320
|
+
|
|
321
|
+
```text
|
|
322
|
+
expected output reconstructable?
|
|
323
|
+
verification available at boundary?
|
|
324
|
+
future Step required for correctness?
|
|
325
|
+
real causal dependencies
|
|
326
|
+
proposed verdict
|
|
327
|
+
false positive / false negative
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
Historical absence of explicit semantic wording is not itself proof of a bad Step. Replay must
|
|
331
|
+
reconstruct the actual behavior and evidence.
|
|
332
|
+
|
|
333
|
+
The brief remains a hypothesis until replay demonstrates that invalid activity slicing is detected
|
|
334
|
+
without systematically rejecting useful historical Steps.
|
|
335
|
+
|
|
336
|
+
## 6. Dependencies and conflicts
|
|
337
|
+
|
|
338
|
+
- P01-A owns mechanical feasibility only. Deferred P01-B or current corrective authority must own
|
|
339
|
+
any Task/decomposition routing and attempt-accounting change.
|
|
340
|
+
- P02 owns only Step semantic integrity and reslicing.
|
|
341
|
+
- P03 may project current Step/dependency facts but does not evaluate Step validity.
|
|
342
|
+
- P04 owns Task-level dependencies; Step dependencies do not create Task edges.
|
|
343
|
+
- P05/P04-B is required to continue when semantic reslicing proves that the Task boundary itself
|
|
344
|
+
must split; P04-A intentionally blocks that replacement.
|
|
345
|
+
- Mandatory strict Review for all Steps is explicitly rejected because it would conflict with P01's
|
|
346
|
+
low-risk happy path and current risk-based review policy.
|
|
347
|
+
|
|
348
|
+
## 7. Design approval gate
|
|
349
|
+
|
|
350
|
+
P02 remains `NO-GO`. It may move from `hypothesis` to `approved` only when:
|
|
351
|
+
|
|
352
|
+
1. One exact `verificationMap` representation is accepted and its Plan/audit hashing is specified.
|
|
353
|
+
2. Low-risk semantic authority is the existing execution authorization, without a new mandatory
|
|
354
|
+
reviewer.
|
|
355
|
+
3. Guarded semantic authority reuses the current Plan Risk Audit and its unique proof references.
|
|
356
|
+
4. Pre-authorization rejection, `replan-required`, `split-required`, and `stop-escalate` cover the
|
|
357
|
+
complete routing table without new decision values.
|
|
358
|
+
5. Fresh and historical role-separated replay demonstrates actual invalid activity slicing and no
|
|
359
|
+
systematic rejection of useful Steps.
|
|
360
|
+
6. P04-A and P01-A boundaries are stable enough that P02 does not duplicate Task dependency or
|
|
361
|
+
mechanical-feasibility authority.
|
|
362
|
+
7. The bounded legacy policy is accepted and does not rewrite historical Plan hashes.
|
|
363
|
+
|
|
364
|
+
## 8. Implementation acceptance
|
|
365
|
+
|
|
366
|
+
P02 may move from `approved` to `implemented` only when:
|
|
367
|
+
|
|
368
|
+
1. Existing `expectedOutputs[]`, `checks[]`, and `dependencies[]` are reused.
|
|
369
|
+
2. Every expected output has boundary-time verification.
|
|
370
|
+
3. Activity-only Steps are rejected or resliced.
|
|
371
|
+
4. A future Step cannot be required to make a completed Step correct.
|
|
372
|
+
5. Ordinal has no dependency semantics.
|
|
373
|
+
6. Declared dependencies remain executable and cycle-safe.
|
|
374
|
+
7. Low-risk Steps gain no mandatory strict Review.
|
|
375
|
+
8. Guarded Steps continue to use current strict Step Review.
|
|
376
|
+
9. Plan reslicing does not consume an ordinary implementation-fix attempt unless current corrective
|
|
377
|
+
policy independently requires it.
|
|
378
|
+
10. Historical replay shows no systematic false blockers.
|
|
379
|
+
11. No new Step authority, credential, registry, lifecycle stage, branch model, or parallel
|
|
380
|
+
scheduler is introduced.
|
|
381
|
+
12. New/replanned Tasks require `verificationMap`, while grandfathered authorized Tasks remain
|
|
382
|
+
readable and diagnosable without fabricated mappings.
|
|
383
|
+
|
|
384
|
+
## 9. Non-goals
|
|
385
|
+
|
|
386
|
+
- new Step fields duplicating the current contract;
|
|
387
|
+
- mechanical proof of arbitrary natural-language usefulness;
|
|
388
|
+
- Candidate Task admission;
|
|
389
|
+
- Task-level dependencies;
|
|
390
|
+
- replacement rewiring;
|
|
391
|
+
- mandatory Review of every low-risk Step;
|
|
392
|
+
- separate worktree or branch per Step;
|
|
393
|
+
- parallel execution.
|
|
394
|
+
|
|
395
|
+
## 10. Decision log
|
|
396
|
+
|
|
397
|
+
- 2026-08-23 — Revision 1 created as `hypothesis`.
|
|
398
|
+
- 2026-08-23 — Revision 2 constrained the proposal to minimal Step semantic integrity.
|
|
399
|
+
- 2026-08-24 — Existing `expectedOutputs[]`, `checks[]`, and `dependencies[]` recognized as the
|
|
400
|
+
canonical storage model; duplicate proposed fields removed.
|
|
401
|
+
- 2026-08-24 — Strict Review limited to current guarded-risk policy instead of every Step.
|
|
402
|
+
- 2026-08-24 — Signal replay evidence recorded as supporting semantic examples, not a completed
|
|
403
|
+
Workflow Step replay.
|
|
404
|
+
- 2026-08-24 — Revision 4 added the minimal output-to-evidence relation, assigned low-risk and
|
|
405
|
+
guarded semantic authority, and replaced invented `reslice-plan`/`brief-decomposition-defect`
|
|
406
|
+
outcomes with current transition routes.
|
|
407
|
+
- 2026-08-24 — Legacy Plans are grandfathered only when already authorized; every new or replanned
|
|
408
|
+
Plan must use the relation without rewriting historical hashes.
|
|
409
|
+
- 2026-08-24 — P02 remains `NO-GO` until fresh/historical replay validates the causal Step
|
|
410
|
+
hypothesis and the proposed semantic authority.
|
|
411
|
+
- 2026-08-24 — Status intentionally remains `hypothesis`.
|