project-tiny-context-harness 0.8.1 → 0.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -20
- package/assets/README.md +115 -36
- package/assets/README.zh-CN.md +33 -27
- package/assets/agents/AGENTS_CORE.md +6 -6
- package/assets/skills/context_development_engineer/SKILL.md +6 -6
- package/assets/skills/context_uiux_design/SKILL.md +5 -5
- package/assets/skills/design-resource-authoring/SKILL.md +4 -3
- package/assets/skills/design-resource-authoring/references/downstream-handoff.md +9 -6
- package/assets/skills/design-resource-authoring/references/resource-selection.md +3 -2
- package/assets/skills/long-task-workflow/SKILL.md +16 -16
- package/assets/skills/long-task-workflow/references/authority-lifecycle.md +8 -6
- package/assets/skills/long-task-workflow/references/contract-authoring.md +18 -14
- package/assets/skills/long-task-workflow/references/evidence-design.md +15 -14
- package/assets/skills/long-task-workflow/references/source-authoring.md +12 -9
- package/assets/skills/source-plan-authoring/SKILL.md +1 -1
- package/dist/commands/long-task-authoring.js +83 -9
- package/dist/lib/context-graph-snapshot.js +7 -0
- package/dist/lib/design-resource-fact-policy.d.ts +25 -0
- package/dist/lib/design-resource-fact-policy.js +35 -0
- package/dist/lib/design-resource-handoff-shape-evidence.d.ts +3 -1
- package/dist/lib/design-resource-handoff-shape-evidence.js +60 -0
- package/dist/lib/design-resource-handoff-shape.js +5 -1
- package/dist/lib/design-resource-handoff-types.d.ts +29 -0
- package/dist/lib/design-resource-handoff-validation-coverage.d.ts +1 -1
- package/dist/lib/design-resource-handoff-validation-coverage.js +42 -14
- package/dist/lib/design-resource-handoff-validation-facts.d.ts +2 -0
- package/dist/lib/design-resource-handoff-validation-facts.js +97 -0
- package/dist/lib/design-resource-handoff-validation-structure.js +2 -0
- package/dist/lib/design-resource-handoff-validation.js +10 -1
- package/dist/lib/execution-target-capabilities.d.ts +2 -0
- package/dist/lib/execution-target-capabilities.js +31 -0
- package/dist/lib/long-task-acceptance-shape.js +81 -20
- package/dist/lib/long-task-applicability-shape.d.ts +4 -0
- package/dist/lib/long-task-applicability-shape.js +54 -0
- package/dist/lib/long-task-assertions-v2.js +8 -0
- package/dist/lib/long-task-authoring-preflight-diagnostics.js +5 -0
- package/dist/lib/long-task-authoring-preflight-repair-order.js +3 -0
- package/dist/lib/long-task-authoring-preflight.js +12 -8
- package/dist/lib/long-task-authority-materials.js +46 -4
- package/dist/lib/long-task-authority-policy.d.ts +54 -0
- package/dist/lib/long-task-authority-policy.js +61 -0
- package/dist/lib/long-task-authority-types.d.ts +12 -2
- package/dist/lib/long-task-authority.js +9 -2
- package/dist/lib/long-task-check-shape.js +6 -1
- package/dist/lib/long-task-claim-definitions.js +27 -42
- package/dist/lib/long-task-claims.js +275 -146
- package/dist/lib/long-task-contract-types.d.ts +42 -8
- package/dist/lib/long-task-control-fields.d.ts +12 -0
- package/dist/lib/long-task-control-fields.js +66 -0
- package/dist/lib/long-task-control-types.d.ts +1 -0
- package/dist/lib/long-task-control-types.js +1 -0
- package/dist/lib/long-task-counterfactual-claim-policy.js +7 -0
- package/dist/lib/long-task-counterfactual-types.d.ts +12 -0
- package/dist/lib/long-task-delivery-compiler.js +1 -0
- package/dist/lib/long-task-delivery-preflight.js +24 -0
- package/dist/lib/long-task-delivery-shape.d.ts +1 -0
- package/dist/lib/long-task-delivery-shape.js +1 -0
- package/dist/lib/long-task-delivery-types.d.ts +1 -0
- package/dist/lib/long-task-delivery-types.js +1 -0
- package/dist/lib/long-task-delivery-validation.js +46 -0
- package/dist/lib/long-task-design-resource-handoff.js +67 -13
- package/dist/lib/long-task-evidence-capability-codec.js +47 -0
- package/dist/lib/long-task-evidence-capability-policy.js +80 -38
- package/dist/lib/long-task-evidence-capability-runtime.js +39 -0
- package/dist/lib/long-task-evidence-capability-types.d.ts +14 -1
- package/dist/lib/long-task-evidence-findings.js +3 -0
- package/dist/lib/long-task-evidence-sensitivity-policy.js +38 -0
- package/dist/lib/long-task-evidence-v2.js +7 -1
- package/dist/lib/long-task-final-integrity.d.ts +16 -0
- package/dist/lib/long-task-final-integrity.js +98 -0
- package/dist/lib/long-task-final-v2.js +17 -34
- package/dist/lib/long-task-outcome-parser.js +22 -4
- package/dist/lib/long-task-playwright-case-evidence.d.ts +2 -0
- package/dist/lib/long-task-playwright-case-evidence.js +10 -2
- package/dist/lib/long-task-playwright-evidence.d.ts +1 -0
- package/dist/lib/long-task-playwright-evidence.js +33 -0
- package/dist/lib/long-task-product-shape.d.ts +3 -1
- package/dist/lib/long-task-product-shape.js +100 -4
- package/dist/lib/long-task-requirement-shape.js +3 -0
- package/dist/lib/long-task-root-shape.js +12 -6
- package/dist/lib/long-task-runner-freeze.js +16 -0
- package/dist/lib/long-task-runtime-types.d.ts +11 -2
- package/dist/lib/long-task-semantic-assurance-policy.d.ts +4 -0
- package/dist/lib/long-task-semantic-assurance-policy.js +52 -0
- package/dist/lib/long-task-semantic-contract-types.d.ts +18 -1
- package/dist/lib/long-task-semantic-drift-migration.js +33 -2
- package/dist/lib/long-task-semantic-mutation.d.ts +7 -0
- package/dist/lib/long-task-semantic-mutation.js +81 -0
- package/dist/lib/long-task-shape-primitives.d.ts +1 -1
- package/dist/lib/long-task-shape-primitives.js +1 -0
- package/dist/lib/long-task-source-authority-types.d.ts +2 -0
- package/dist/lib/long-task-source-item-parser.d.ts +1 -1
- package/dist/lib/long-task-source-item-parser.js +150 -104
- package/dist/lib/long-task-source-markers.d.ts +12 -0
- package/dist/lib/long-task-source-markers.js +146 -0
- package/dist/lib/long-task-source-target-continuity.d.ts +1 -1
- package/dist/lib/long-task-source-target-continuity.js +80 -55
- package/dist/lib/long-task-source-target-index.js +7 -29
- package/dist/lib/long-task-status-v2.d.ts +1 -0
- package/dist/lib/long-task-status-v2.js +2 -2
- package/dist/lib/long-task-target-policy.js +20 -0
- package/dist/lib/long-task-ui-design-policy.js +34 -1
- package/dist/lib/long-task-ui-surface-shape.js +33 -2
- package/dist/lib/long-task-ui-surface-types.d.ts +8 -0
- package/dist/lib/long-task-verification-preview.d.ts +10 -0
- package/dist/lib/long-task-verifier-dependency-closure.d.ts +3 -0
- package/dist/lib/long-task-verifier-dependency-closure.js +179 -0
- package/dist/lib/long-task-verifier-v2.js +12 -2
- package/dist/lib/long-task-workspace.js +5 -1
- package/dist/schemas/long-task-delivery-v2/long-task-delivery-v2.schema.json +101 -25
- package/package.json +2 -2
package/assets/README.md
CHANGED
|
@@ -146,7 +146,7 @@ The smoke packs the local workspace, installs it into a disposable repo and vali
|
|
|
146
146
|
|
|
147
147
|
```sh
|
|
148
148
|
cd /path/to/your/test-repo
|
|
149
|
-
npm install -D /path/to/project-tiny-context-harness/tmp/ty-context/source-preview/package/project-tiny-context-harness-0.8.
|
|
149
|
+
npm install -D /path/to/project-tiny-context-harness/tmp/ty-context/source-preview/package/project-tiny-context-harness-0.8.3.tgz
|
|
150
150
|
npx --no-install ty-context init --adopt
|
|
151
151
|
make validate-context
|
|
152
152
|
```
|
|
@@ -230,17 +230,17 @@ For material UI, **UI Authority Closure** reconciles each stable surface/control
|
|
|
230
230
|
|
|
231
231
|
One shared conditional purpose of both development paths is that Agent implementation, acceptance and testing fully conform to every material UI/UX fact selected design resources explicitly express within their declared scope and conditions. It activates only for a selected implementation handoff and does not infer unexpressed behavior or prove that the user supplied every desired requirement. Open Design can produce implementation-rich HTML/CSS/JS, specifications, tokens and assets, but capability is not a per-run guarantee: for a selected Web/App implementation handoff, `/design-resource-authoring` must explicitly commission and completely retrieve one machine-readable canonical entry plus its exact dependency closure, freeze every file with a digest and expose stable typed locators. Before `ready`, it exercises every declared verification method on those immutable bytes and blocks unresolved conflicts among code, specs, tokens and assets. That is source QA, not production acceptance. PNG may be a visual baseline, never the sole implementation source.
|
|
232
232
|
|
|
233
|
-
The provider-neutral handoff is a residual semantic and index layer, not a textual copy of CSS. It
|
|
233
|
+
The provider-neutral handoff is a residual semantic and index layer, not a textual copy of CSS. Its default unit is every complete observable design fact exposed by the acquired resource and supported inspector/oracle capability—not merely one Product Control—including addressable images, text, icons, component parts, smaller visual primitives, geometry, layout, style/token, content, state and behavior facts. It atomically indexes those facts, gives every resource a complete material-with-facts or honestly supporting-only inspection closure, and makes every applicable subject × selected target × declared condition × UI/UX dimension cell conserve the exact fact/evidence/Source/method sets across surface/flow, visual/content, component/control, state/interaction, motion, adaptation/input, accessibility and assets. An `exact_target` additionally requires full-target layout and pixel facts for every condition; otherwise the input stays a partial constraint or blocks. Preflight resolves typed locators against immutable resources, verifies source/dependency/fact closure and rejects unresolved, unsupported or media-incompatible evidence. Exploration remains schema-free.
|
|
234
234
|
|
|
235
|
-
Those inputs remain ordinary Source. The default Workflow keeps exact task-local accounting of
|
|
235
|
+
Those inputs remain ordinary Source. The default Workflow keeps exact task-local accounting of fact/Source/method/blocker/target/condition sets; every item must reach a production owner, cold-start journey and an executed final-candidate check whose failure remains attributable. Any unread, unsupported, unresolved, unmapped, unimplemented, unexecuted, stale or indistinguishable applicable fact blocks a complete claim and is reported as a gap. Long-Task projects the same sets into existing Claims, positive method Assertions, `surface_bindings`, typed fact-bound evidence and Final Gate. These proof carriers are mutually exclusive: an active Long-Task never also runs the default closure. Generation success, screenshots, hashes and handoff preflight prove input completeness or integrity only.
|
|
236
236
|
|
|
237
237
|
The default Workflow performs UI Authority Closure and a conditional Design Authority Check before a material product, design, implementation or acceptance decision for new/redesigned screens, primary layout/navigation/theme/component-system work, high-fidelity implementation and substantial visual polish. It traverses affected stable keys to exactly one canonical adoption record, then actively opens every selected `exact-target` or `constraint`; a registry or handoff-index mention alone is not consumption. `DESIGN.md` canonically records project/system/component-family targets, while the owning Screen Contract records one-screen/interaction-specific targets. The canonical record owns interpretation, selection basis, readable immutable locator/digest, declared condition coverage and editable upstream owner/locator/update route; other layers keep only the stable key, canonical owner/anchor and local applicability. Missing, unreadable, stale or conflicting resources fail closed. Updates create a new immutable version instead of overwriting the adopted baseline. An unconfigured starter, candidate, style-only prose or inspiration does not authorize invented production layout. Explicit design-system adoption routes to `/design-system-authoring`; standalone resource generation routes to `/design-resource-authoring`. Ordinary implementation with sufficient authority, local style fixes and throwaway prototypes remain lightweight.
|
|
238
238
|
|
|
239
|
-
For a selected implementation handoff, both development paths first run `ty-context design-resource preflight <handoff.md>`. Incomplete acquisition, missing or undeclared dependencies, unsafe paths, stale digests, fictional locators, uncovered applicable cells, unsupported evidence and unresolved meaning all fail closed. Each workflow must still open the resources and prove the production implementation on the real entry.
|
|
239
|
+
For a selected implementation handoff, both development paths first run `ty-context design-resource preflight <handoff.md>`. Incomplete acquisition, missing or undeclared dependencies, unsafe paths, stale digests, fictional locators, missing/unreferenced facts, false resource-fact closure, uncovered applicable cells, absent exact-target layout/pixel facts, unsupported evidence and unresolved meaning all fail closed. Each workflow must still open the resources and prove the production implementation on the real entry.
|
|
240
240
|
|
|
241
|
-
For material work, `context_uiux_design` applies the projection above and keeps any risk-proportional coverage reasoning task-local. `context_development_engineer` traces every selected target/condition and the exact handoff sets through stable surface/control keys to the production route/component owner, cold-start real-user journey and independently attributable rendered/interactive checks.
|
|
241
|
+
For material work, `context_uiux_design` applies the projection above and keeps any risk-proportional coverage reasoning task-local. `context_development_engineer` traces every selected target/condition and the exact handoff sets through stable surface/control keys to the production route/component owner, cold-start real-user journey and independently attributable rendered/interactive checks. A first useful runnable production slice is a recommended real-entry feedback point when early localization is worth the cost, never an implementation gate; the final candidate always reruns the affected cold-start journey. Every declared/applicable combination remains covered—risk-only or pairwise sampling cannot replace it without authoritative scope narrowing or project-owned equivalence proof. Resource hashes, manifests and counts prove integrity only; an implementation screenshot cannot become its own target or implementation-conformance proof.
|
|
242
242
|
|
|
243
|
-
An explicit Long-Task is the strong machine carrier of the same shared obligation. It resolves missing/conflicting UI authority before Compile, then
|
|
243
|
+
An explicit Long-Task is the strong machine carrier of the same shared obligation. It resolves missing/conflicting UI authority before Compile, then closes all 22 canonical fields of every real Control through `field_coverage`: each field is concrete `specified`, explicitly justified `not_applicable` or blocking `unresolved`; omission never means non-applicable. Specified and not-applicable entries become independent protected Control Claims at every declared applicability profile. `control_relation_closure` and `control_relations` likewise close shared state, dependency/order, navigation, permission, validation, feedback and recovery chains across Controls and systems; even not-applicable closure is an exact negative Claim. Aggregated Product `surface_bindings` connect every Control to an owner surface, required product target, existing Technical route/component Bindings and a root-entry success journey. Selected exact/constraint targets bind frozen inputs and declared conditions to current actual/comparison artifacts through typed `design_conformance`; every `verification_method_binding` is independently falsifiable through its own `design_method` record and, for every exact condition, exact handoff `fact_refs`, a declared method record and a method-native primary observation whose current path and digest cannot be reused by another cell. The compiled cell union must equal the complete target fact set, and runtime evidence must repeat the exact refs. Playwright requires explicit record/observation attachments from every project instance. Every declared blocker preserves exact Source-item/method/required-capability lineage into a machine Claim proved on the capability-qualified target or a target-blocking External Confirmation. A blocker cannot be dismissed in-band: scope removal requires revised Source/Contract authority. Existing Claim, Assertion, Check, Stage, Binding, revision and Final Gate mechanisms are the sole Long-Task lifecycle and closure.
|
|
244
244
|
|
|
245
245
|
Combined design-and-implementation work may author candidates in ordinary Outcomes/Stages, but a candidate or planned target cannot authorize fidelity implementation. The selection must become real marked Context-reachable Source plus its owning Context/`DESIGN.md` reference and, after Authority Lock, an adopted Authority Revision. Browser visual ACs use `ui_browser`; a browser proxy, detached route or deep link cannot prove a native/root journey that can fail independently. Resource integrity and `visual_render` cannot satisfy selected-target implementation conformance. Frozen baselines are verifier inputs, generated actual renders/diffs are current artifacts, and subjective approval remains external. This adds no `uiux_delivery` block, visual Claim type, resource registry, risk level, lifecycle state, Gate, required design directory, per-Control screenshot matrix or universal pixel threshold.
|
|
246
246
|
|
|
@@ -274,7 +274,7 @@ Maintainers may set `TY_CONTEXT_OPEN_DESIGN_MCP_COMMAND` plus optional `TY_CONTE
|
|
|
274
274
|
|
|
275
275
|
### Retired Source Plan Compatibility
|
|
276
276
|
|
|
277
|
-
`/source-plan-authoring` remains installed with the long-task profile only as a compatibility pointer. `/long-task-workflow` opens the non-authoritative Contract Draft immediately and converges complete input inventory, mixed-input synthesis/refinement, stable-key and
|
|
277
|
+
`/source-plan-authoring` remains installed with the long-task profile only as a compatibility pointer. `/long-task-workflow` opens the non-authoritative Contract Draft immediately and converges complete input inventory, mixed-input synthesis/refinement, stable-key and Product Control-level meaning, preference/research/delegation traceability, Source markers/provenance and Contract mapping in that same loop. This semantic Control projection does not cap the separate complete-observable-design-fact inventory for selected resources. A legacy Source Plan remains valid ordinary Source, but no separate or internal Source-authoring stage, handoff, schema, gate, state or second plan is created.
|
|
278
278
|
|
|
279
279
|
## Single-Goal Rolling Delivery
|
|
280
280
|
|
|
@@ -283,15 +283,17 @@ Use `/long-task-workflow` only when explicitly requested or when the current wor
|
|
|
283
283
|
- one platform-native continuing Goal;
|
|
284
284
|
- one user-selected repository/worktree;
|
|
285
285
|
- one complete selected delivery, one Contract and one Final Gate;
|
|
286
|
-
- Outcome dependencies as acceptance readiness, not worker scheduling;
|
|
286
|
+
- Outcome dependencies as acceptance/intermediate-proof readiness, not worker scheduling or implementation permission;
|
|
287
287
|
- one user model-choice checkpoint after first Authority Lock and before implementation;
|
|
288
|
-
-
|
|
289
|
-
- targeted repair checks that never accept;
|
|
288
|
+
- an advisory rolling acceptance/verification Frontier that never gates edits;
|
|
289
|
+
- optional targeted feedback/repair checks that never accept or gate Final Gate;
|
|
290
290
|
- stateless scope-only revision diagnosis, automatic bounded repair and at most one exact user decision for a stable decision-relevant candidate;
|
|
291
291
|
- a complete Final Gate on one current snapshot;
|
|
292
292
|
- a Stop Hook that rejects stale completion.
|
|
293
293
|
|
|
294
|
-
|
|
294
|
+
Its proof claim is conditional and precise: if Source is complete and accurate at the declared observable granularity, projection preserves that meaning, every actual applicability cell is expanded, and the named project oracle plus installed verifier/runtime trust boundary is semantically sound, then `AcceptedDeliveryTerminal`—exactly a fresh `machine_accepted` result with no pending External Confirmation—implies no declared observable drift remains. `machine_accepted_external_pending` proves only that machine-verifiable declared drift is empty; full delivery remains qualified and the native Goal is untouched. The workflow mechanically enforces and freezes many premises, but it cannot discover undeclared requirements or prove an arbitrary project oracle truthful.
|
|
295
|
+
|
|
296
|
+
Raw/revised proposals, selected design resources and mixed attachments enter one Source-bound Contract Draft loop immediately. Complete input inventory, stable keys, Product Control-level meaning, selected-resource design facts, acceptance/risk coverage, direct/derived/delegated/evidence-backed provenance, Source ownership and Contract mapping converge together. Every non-empty line in declared Markdown Source must belong to one Material `ty-source-item` block, the single validated `design-resource-handoff-v1` formal block or a closed-grammar background block: `markdown-structure` permits only text-free anchors/horizontal rules and `provenance` permits only `ty-source-provenance` comments with fixed `input`, `mode`, conditional `source` and optional `sha256` fields. A text-bearing heading or free-form provenance field can express authority and is therefore rejected as background. Arbitrary background prose and all other unclassified text fail closed. At least one marked technical obligation carries `aspect=architecture` and maps to an independently provable architecture obligation. If an unknown preference could materially change comparative research or selection, the workflow asks before Preflight/Compile can succeed. Once criteria are clear, a defensible recommendation is written into real Source with its delegation, preference/evidence basis and exact meaning; it is never hidden only in YAML. High-risk action remains an external confirmation. Legacy Source Plan structure never blocks authoring.
|
|
295
297
|
|
|
296
298
|
Before the first successful formal Compile, `delivery-contract.yaml` is one non-authoritative Contract Draft. `/long-task-workflow` opens it at entry and keeps revising that same Draft across Source refinement, repository/Context reads, mapping and Preflight repair rounds; it does not require one response to produce a complete Contract. Source completeness is a convergence condition for Preflight/Compile, not a prior phase. No standalone Contract Draft Skill, Draft Receipt or Authoring State exists.
|
|
297
299
|
|
|
@@ -301,11 +303,15 @@ Later revisions separate authority change from user decision. Formally monotonic
|
|
|
301
303
|
|
|
302
304
|
The package-managed Long-Task Skill uses progressive disclosure: its main `SKILL.md` keeps the objective, boundaries and activity routing; one-level references are read for Source-bound Draft input/Contract mapping, evidence design or authority lifecycle as applicable. Draft input repair and Contract mapping are concurrent activities, not serial phases. This reduces routine instruction load without moving any rule into a second authority. It performs the shared Architecture Deliberation during Draft authoring. When Source or controlling Context declares an architecture invariant, the Contract uses existing technical obligations/global constraints/forbidden shortcuts, owner/path/Binding boundaries and a project-owned executable Check. Functional acceptance cannot substitute when the architecture invariant can fail independently, and Final Gate is the sole Long-Task Architecture Conformance carrier.
|
|
303
305
|
|
|
304
|
-
A Draft Outcome is simply an Outcome before Authority Lock. Outcomes split independently observable, decidable, vertical and target-verifiable results so the current Goal can
|
|
306
|
+
A Draft Outcome is simply an Outcome before Authority Lock. Outcomes split independently observable, decidable, vertical and target-verifiable results so the current Goal can project a smaller acceptance/verification-ready working set, localize failures, resume findings and invalidate stale local results. `depends_on` expresses acceptance and intermediate-proof readiness, not implementation permission. Every Outcome belongs to one ordered Stage; its Stage gate transitively depends on the other Outcomes in that Stage, and later Stages depend on earlier gates. The Rolling Frontier and Stage status are derived from ordinary Outcome Progress and are temporary advisory projections. The Goal may implement, inspect or repair any in-scope Outcome in the order current code favors and may optionally use one or multiple platform-native agents/subagents. Harness allocates and records none of them, agent reports are not Progress or proof, and all outputs converge into the selected verification workspace. An Outcome is not a Worker, scheduler task, queue or parallelism unit, and a Stage owns no Receipt or second Gate. Outcome decomposes diagnosis and proof ownership, not completion authority: targeted passes never replace the one complete Final Gate on the current final snapshot.
|
|
307
|
+
|
|
308
|
+
The Contract declares one bounded target profile, its non-empty required product target refs and each target's runtime family, root entrypoint and explicit capabilities. Required product targets name their family capability plus `cold-start` and `production-root`. A Web/process proxy cannot satisfy an independently required Native/desktop target. Browser target proof uses Playwright; Native/desktop target proof uses a project binary. Every `critical_user_path` Outcome and Stage gate proves `target_runtime` from every required target's root entrypoint; a multi-Outcome Stage gate also proves at least two distinct surfaces share one runtime state.
|
|
309
|
+
|
|
310
|
+
When a declared result can pass on a proxy surface while failing in its target runtime, the earliest owning Outcome declares a project-owned Check that exercises the target during the current Check execution. A tracked report, screenshot, binary, log or historical run cannot be the sole runtime proof. Checks declare keyed Given/When scenarios and journey roles; global/Outcome applicability profiles bind the exact target, journey, one atomic duplicate-free dimension assignment set, Given condition/input/state refs and ordered When refs. Every Claim lists all applicable profiles, and each Claim-bearing Assertion proves exactly one Claim at one matching profile; every actual applicability × proof-surface cell remains attributable, without risk-based, pairwise or sampled substitution. Assertions declare all-of Evidence Capabilities backed by typed current-execution records. Static `presence` cannot prove behavior, degradation cannot replace required success, fixed-input output cannot prove variation and a producer cannot self-attest its own boundary/external effect. Every behavioral Claim-bearing Assertion also requires a same-Check claim-local `replace_json_value` or `replace_text` Counterfactual that keeps a claimless target-runtime liveness Assertion passing while the wrong behavior fails; whole-file replacement cannot establish semantic binding. Population binds a real universe carrier into the owning Check snapshot and proves exact universe = eligible = observed plus valid exclusions. Runner identity recursively freezes the supported direct-literal local verifier module/config/data graph—static imports/re-exports, literal dynamic imports, `require` forms and literal `new URL(..., import.meta.url)` files—and rejects non-literal loaders/`createRequire`; package scripts require a recoverable static Node entry. Candidate/runtime material remains explicitly owned by `input_paths`, `expected_output_paths` or `artifact_globs`; other indirect Oracle access belongs in `verification_inputs` or the named trusted boundary. Author each Check's `input_paths`/Bindings as its smallest sound invalidation envelope and keep every Counterfactual carrier traceable from the declared target root. The first useful runnable boundary and later coalesced changes are recommended targeted-feedback points only when early localization is worth the cost. `progress_stale` reports that prior evidence no longer covers current inputs; refresh it only before an intermediate decision relies on that result. Implementation and Final Gate may proceed with stale or absent Progress because Final Gate ignores it and reruns every declared Check. `verify --explain` previews bounded declared runner invocations without execution or Progress writes, but cannot predict duration or commands spawned inside a runner. This adds no generic reachability claim, implementation gate, second executing diagnose mode, scheduler, trigger queue, per-platform progress state or per-edit rebuild rule; runtime-specific readiness/build/process behavior stays in the project runner, and Final Gate remains authoritative.
|
|
305
311
|
|
|
306
|
-
|
|
312
|
+
Long-Task Anti-Degradation Assurance protects current causal-chain truth, cross-version interception strength and the adjacent `F = Implementation Freedom Boundary`. Context statements about the current implementation must match the indexed code/runtime; that implementation must still realize the meaning-capture/architecture and fail-closed observation/repair/final-snapshot responsibilities which, under the explicit Source/semantic/TCB boundary, imply the controlling no-false-completion purpose. `F` is an efficiency/anti-process-bloat invariant rather than a third responsibility or theorem premise: inside Source/Contract, architecture, safety, forbidden-shortcut and irreversible/external-action boundaries, implementation order, methods, local feedback cadence and optional one-agent or multi-agent/subagent execution remain Goal-owned. Harness adds no development phase/method Gate, per-edit mandate, agent scheduler/state or delegation proof. Weakening the purpose, key logic, either responsibility, theorem boundary or `F` requires an explicit project-owner design-purpose decision and replacement proof, not Agent inference, coordinated prose/code/test edits or cost alone. A new development-stage constraint must additionally close a distinct path that final proof or a lighter project-owned check cannot cover and have positive net ROI. This assurance uses existing Context, indexes, tests, critical sentinels, routing and parity gates; it adds no second Authority, Gate or state and cannot recover omitted/unobservable requirements or make itself immutable against deliberate fully authorized joint weakening.
|
|
307
313
|
|
|
308
|
-
|
|
314
|
+
Workflow changes then pass two hard gates in order. First prove `Coverage_new ⊇ Coverage_old`, `FalseNegative_new ⊆ FalseNegative_old` and preserve non-bypassable Authority, fail-closed behavior and complete-current-final-snapshot proof; if that cannot be proved, preserve the current formal acceptance path. Cost savings never compensate for weaker drift detection. Only then require incremental anti-degradation or purpose-fulfillment benefit to exceed all incremental authoring, runtime, state, recovery, maintenance, test, process, introduction and migration cost. Positive net ROI places the proposal in the consideration set; it never means automatic adoption.
|
|
309
315
|
|
|
310
316
|
A separate read-only Global Product Conformance Check is required only for weak-observability work that also has multiple Stages or multiple required product runtime families. It starts at a required root product target, has independent Raw Execution and runs within the existing Final Gate. Single-Stage, single-family work retains the existing same-Check sensitivity path and pays no extra conformance run.
|
|
311
317
|
|
|
@@ -332,14 +338,14 @@ ty-context long-task abandon <workdir> [--force-corrupt-state]
|
|
|
332
338
|
```
|
|
333
339
|
|
|
334
340
|
- `init` creates one Compact inline-Outcome Contract template.
|
|
335
|
-
- `preflight` applies Compact defaults and reports all discoverable Source/REQ/CTRL
|
|
336
|
-
- `compile` repeats the same fail-closed workspace classification, so direct Compile cannot bypass Preflight, then generates Global plus Outcome Result/Requirement/Control-field/Non-completing/Technical Claims, rejects uncovered
|
|
341
|
+
- `preflight` applies Compact defaults and reports all discoverable closed-grammar Source/background ownership, architecture Source obligation, REQ/CTRL field-and-relation closure, OBL/AC, atomic applicability dimensions, Population universe binding, Stage closure, required-target/root/capability/runner, scenario/journey, Evidence Capability, per-method selected-design artifacts, external impact, Product Conformance, full Context, risk, path/binding, recursively frozen runner/input dependency, narrow semantic witness/liveness, proof and workspace-scope diagnostics. Before first Authority Lock, it classifies every current HEAD-relative changed path as protected, expected change, allowed support, forbidden or unclassified; forbidden and unclassified paths block. It is read-only: no Authority Lock, marker, cache, progress, Receipt, pending revision, state lock or project Check.
|
|
342
|
+
- `compile` repeats the same fail-closed workspace classification and activation validator, so direct Compile cannot bypass Preflight, then generates Global plus Outcome Result/Requirement/Control-field/Control-relation/Non-completing/Technical Claims at exact applicability, rejects uncovered cells, preserves an immutable first baseline and makes the first successful formal Compile the Authority Lock. During first enable, only exact current package-asset files for configured managed destinations plus exact config/hook files are temporarily protected; managed directory roots and broad `.codex/**` are never exempt. Every result includes a lifecycle event, `delivery_completed_by_this_event: false`, `native_goal_effect: none` and a next action. The first result also includes `execution_model_checkpoint.required: true` plus the terminal-turn/explicit-choice contract; later Compile results return `required: false`. Every revision compares against active authority regardless of progress, Receipt/cache deletion or implementation restoration. Source/Context/Product/Acceptance/Global/verifier materials, owner/binding authority, resolved runners and verification inputs are frozen in the common-dir Active Authority V3 snapshot; the model-choice result is not stored as Authority state.
|
|
337
343
|
- `diagnose-revision` performs a side-effect-free candidate Compile. Only a scope-only candidate may run existing active Check identities with unchanged runner/verifier authority. Other mechanically bounded repairs return an automatic-revision preview without runner execution; decision-relevant Product/Claim/target/acceptance/forbidden-boundary/runner-type-or-effect/verifier-kernel changes return a user-decision preview, while risk downgrade is rejected. Output always has `acceptance_authorized: false`, `progress_written: false` and `pending_revision_written: false`.
|
|
338
344
|
- `compile --revise` auto-adopts monotonic or mechanically bounded revisions. Decision-relevant revisions return `authority_revision_pending` plus the exact id, deterministic material summary, `user_decision_reasons` and a self-contained `decision_brief`, then fail closed until that exact id carries the user's decision. Present the brief first; mechanically relay an already explicit task-specific decision only when it covers every reason. Candidate edits produce a new id and invalidate old approval. Adoption emits `authority_revision_adopted`, invalidates affected evidence and returns to rolling execution; it never means delivery completion.
|
|
339
345
|
- `verify` writes scoped per-Check Progress Records only after rechecking active task/revision/compiled/worktree identity and applying the same workspace categories against the immutable baseline. A concurrent revision returns `active_authority_changed_during_verify` and writes no stale progress. `verify --explain` is read-only: it groups selected Main Raw Executions, lists applicable Counterfactual invocations and declared retry-attempt bounds, executes nothing and writes no Progress.
|
|
340
|
-
- `status` reports each Outcome as `unverified`, `progress_passing`, `progress_failing`, `progress_stale` or `blocked_external`. It derives `stages`, `ready_stages` and
|
|
341
|
-
- `resume` is read-only and reports task identity, risk, relevant Context, Git state, the same Final/target/Stage/external/pending decision surfaces, ready Outcomes, findings and
|
|
342
|
-
- `final-gate` requires a clean candidate commit, recompiles
|
|
346
|
+
- `status` reports each Outcome as `unverified`, `progress_passing`, `progress_failing`, `progress_stale` or `blocked_external`. It derives `stages`, `ready_stages` and an advisory acceptance/verification Outcome frontier from current Progress without persisting Stage completion. The legacy `ready_for_implementation` field is a compatibility alias for that projection, not an implementation gate. Status also reports the fresh Final Receipt as `final_workflow_status` (or `null` after drift), target profile/state, the active Contract's complete `external_confirmations` and the single `pending_authority_revision` decision when present. `progress_passing` is targeted repair evidence rather than “Outcome complete”; `progress_stale` is a freshness fact rather than a current pass or immediate rerun command, and `final_workflow_status: null` means unfinished. It reads the common-dir authority snapshot and reports a missing or mismatched workdir cache as a repairable diagnostic.
|
|
347
|
+
- `resume` is read-only and reports task identity, risk, relevant Context, Git state, the same Final/target/Stage/external/pending decision surfaces, ready Outcomes, findings and an advisory verification/repair next action from the common-dir authority snapshot. That action never restricts implementation order.
|
|
348
|
+
- `final-gate` requires a clean candidate commit, first rejects stale accepted authority inputs, recompiles Source authority and captures semantic plus raw protected-input identity for the Contract/fragments, Source, full Controlling Context, verifier/runner, recursively frozen local verifier dependencies, verification inputs and workdir inputs. It reruns every required Check on one Git-tree snapshot, then recompiles and re-hashes the full protected set; any race fails closed before acceptance. Its Receipt derives each Stage as `passed`, `failed`, `blocked_external` or `blocked_dependency`, and derives `target_state` as `not_accepted`, `blocked_external` or the Contract's exact `implementation_complete`, `target_profile_usable` or `production_release_ready` qualification.
|
|
343
349
|
- `stop-check` and `close` run that Live Final Gate themselves. They never trust status, progress, a Receipt or compiled cache for acceptance; success clears only the accepted identity through CAS. Every accepted Stop emits one non-blocking terminal-scope `systemMessage`; external-pending results additionally name all confirmations. Final/Stop/close report `acceptance_scope: declared_machine_authority` and `native_goal_effect: none`; close also reports `closed_scope: machine_authority`. `status: closed` means only that machine Authority was cleared, not that the native Goal or complete external delivery finished.
|
|
344
350
|
- `abandon` is explicit non-success cleanup. `--force-corrupt-state` is reserved for invalid/mismatched/legacy-unrecoverable state or a stale active lock and removes only deterministic local active state plus `<workdir>/.ty-context/**`; Contract, Source, Context and Git content are preserved.
|
|
345
351
|
|
|
@@ -365,8 +371,10 @@ task:
|
|
|
365
371
|
role: product
|
|
366
372
|
runtime_family: process
|
|
367
373
|
root_entrypoint: tests/runtime.mjs
|
|
374
|
+
capabilities: [process-runtime, cold-start, production-root]
|
|
368
375
|
source_paths: [plans/example.md]
|
|
369
376
|
context_refs: [project_context/areas/main.md]
|
|
377
|
+
context_snapshot_mode: full
|
|
370
378
|
source_claims:
|
|
371
379
|
- key: observable-requirement
|
|
372
380
|
source_ref: plans/example.md#observable-requirement
|
|
@@ -374,6 +382,12 @@ source_claims:
|
|
|
374
382
|
disposition:
|
|
375
383
|
type: claim
|
|
376
384
|
refs: [observable-outcome.requirement.observable]
|
|
385
|
+
- key: architecture-owner
|
|
386
|
+
source_ref: plans/example.md#architecture-owner
|
|
387
|
+
statement: Preserve the observable module as the single state owner.
|
|
388
|
+
disposition:
|
|
389
|
+
type: claim
|
|
390
|
+
refs: [observable-outcome.obligation.preserve-observable-owner]
|
|
377
391
|
stages:
|
|
378
392
|
- key: delivery
|
|
379
393
|
title: Delivery
|
|
@@ -386,8 +400,16 @@ outcomes:
|
|
|
386
400
|
- key: observable-outcome
|
|
387
401
|
title: Observable outcome
|
|
388
402
|
stage: delivery
|
|
403
|
+
applicability:
|
|
404
|
+
- key: runtime-root-success
|
|
405
|
+
target_ref: example-runtime
|
|
406
|
+
journey_role: success
|
|
407
|
+
dimensions: [{key: runtime-state, value: ready}]
|
|
408
|
+
given_refs: [source-ready]
|
|
409
|
+
when_refs: [inspect-result]
|
|
389
410
|
product:
|
|
390
411
|
observable_result: What a user or system can observe
|
|
412
|
+
result_applicability_refs: [runtime-root-success]
|
|
391
413
|
success_path_required: true
|
|
392
414
|
degradation_path_required: false
|
|
393
415
|
owner:
|
|
@@ -398,7 +420,17 @@ outcomes:
|
|
|
398
420
|
- key: observable
|
|
399
421
|
statement: The outcome is observable.
|
|
400
422
|
required_proof_surfaces: [runtime_behavior]
|
|
423
|
+
applicability_refs: [runtime-root-success]
|
|
424
|
+
control_relation_closure:
|
|
425
|
+
state: not_applicable
|
|
426
|
+
statement: This Outcome declares no user-visible Controls.
|
|
427
|
+
applicability_refs: [runtime-root-success]
|
|
401
428
|
technical:
|
|
429
|
+
obligations:
|
|
430
|
+
- key: preserve-observable-owner
|
|
431
|
+
statement: Preserve the observable module as the single state owner.
|
|
432
|
+
required_proof_surfaces: [runtime_behavior]
|
|
433
|
+
applicability_refs: [runtime-root-success]
|
|
402
434
|
expected_change_paths: ["src/**"]
|
|
403
435
|
bindings:
|
|
404
436
|
- key: observable-carrier
|
|
@@ -423,22 +455,69 @@ outcomes:
|
|
|
423
455
|
input_paths: [src/observable.ts]
|
|
424
456
|
expected_output_paths: [src/observable.ts]
|
|
425
457
|
positive_assertions:
|
|
458
|
+
- key: result-ac
|
|
459
|
+
criterion: The declared overall result is observable.
|
|
460
|
+
claims: [result]
|
|
461
|
+
applicability_ref: runtime-root-success
|
|
462
|
+
observation: result
|
|
463
|
+
evidence_capabilities: [state_delta, target_runtime]
|
|
464
|
+
operator: equals
|
|
465
|
+
expected: true
|
|
426
466
|
- key: observable-ac
|
|
427
467
|
criterion: The declared requirement is observable.
|
|
428
|
-
claims: [
|
|
429
|
-
|
|
468
|
+
claims: [requirement.observable]
|
|
469
|
+
applicability_ref: runtime-root-success
|
|
470
|
+
observation: requirement_result
|
|
430
471
|
evidence_capabilities: [state_delta, target_runtime]
|
|
431
472
|
operator: equals
|
|
432
473
|
expected: true
|
|
474
|
+
- key: architecture-ac
|
|
475
|
+
criterion: Preserve the observable module as the single state owner.
|
|
476
|
+
claims: [obligation.preserve-observable-owner]
|
|
477
|
+
applicability_ref: runtime-root-success
|
|
478
|
+
observation: architecture_result
|
|
479
|
+
evidence_capabilities: [state_delta, target_runtime]
|
|
480
|
+
operator: equals
|
|
481
|
+
expected: true
|
|
482
|
+
- key: runtime-liveness
|
|
483
|
+
criterion: The declared runtime remains live under semantic mutation.
|
|
484
|
+
claims: []
|
|
485
|
+
observation: target_live
|
|
486
|
+
evidence_capabilities: [target_runtime]
|
|
487
|
+
operator: equals
|
|
488
|
+
expected: true
|
|
489
|
+
negative_assertions:
|
|
490
|
+
- key: relations-na-ac
|
|
491
|
+
criterion: No cross-Control relation applies to this non-UI Outcome.
|
|
492
|
+
claims: [control_relation_closure]
|
|
493
|
+
applicability_ref: runtime-root-success
|
|
494
|
+
observation: relations_applicable
|
|
495
|
+
evidence_capabilities: [state_delta, target_runtime]
|
|
496
|
+
operator: equals
|
|
497
|
+
expected: false
|
|
433
498
|
counterfactual_controls:
|
|
434
|
-
- key:
|
|
499
|
+
- key: replace-observable-semantics
|
|
500
|
+
binding_key: observable-carrier
|
|
501
|
+
claims: [result, requirement.observable, obligation.preserve-observable-owner]
|
|
502
|
+
check_key: runtime
|
|
503
|
+
mutation:
|
|
504
|
+
type: replace_text
|
|
505
|
+
path: src/observable.ts
|
|
506
|
+
match: "observable = true"
|
|
507
|
+
replacement: "observable = false"
|
|
508
|
+
expected_assertion_failures: [result-ac, observable-ac, architecture-ac]
|
|
509
|
+
preserved_assertions: [runtime-liveness]
|
|
510
|
+
- key: make-relations-applicable
|
|
435
511
|
binding_key: observable-carrier
|
|
436
|
-
claims: [
|
|
512
|
+
claims: [control_relation_closure]
|
|
437
513
|
check_key: runtime
|
|
438
514
|
mutation:
|
|
439
|
-
type:
|
|
440
|
-
|
|
441
|
-
|
|
515
|
+
type: replace_text
|
|
516
|
+
path: src/observable.ts
|
|
517
|
+
match: "relationsApplicable = false"
|
|
518
|
+
replacement: "relationsApplicable = true"
|
|
519
|
+
expected_assertion_failures: [relations-na-ac]
|
|
520
|
+
preserved_assertions: [runtime-liveness]
|
|
442
521
|
```
|
|
443
522
|
<!-- long-task-public-contract-example:end -->
|
|
444
523
|
|
|
@@ -448,7 +527,7 @@ Global non-goals, constraints and forbidden shortcuts generate `GLOBAL.non_goal.
|
|
|
448
527
|
|
|
449
528
|
Claim-bearing structured Global Checks also declare `global.acceptance.counterfactual_controls`. Each control uses `binding_ref: <outcome-key>.<binding-key>` to reuse an Outcome-owned implementation carrier; no separate Global Binding layer exists. An `existing` mutation target must exist at Preflight/Compile, while a `planned` target may be absent until implementation but must exist at Final Gate and participates in Progress freshness.
|
|
450
529
|
|
|
451
|
-
Supported runners are `package_script`, `project_binary`, `node_oracle` and `playwright_test`. Supported proof surfaces are `ui_browser`, `runtime_behavior`, `api_contract`, `data_state`, `security_boundary`, `population_coverage` and `implementation_structure`. Execution-target runtime families are the bounded `browser`, `native`, `desktop`, `service`, `process` and `external` set; target roles are `product`, `support` and `observer`. Required target refs resolve only to product targets. Browser target proof requires `playwright_test`; Native/desktop target proof requires `project_binary`.
|
|
530
|
+
Supported runners are `package_script`, `project_binary`, `node_oracle` and `playwright_test`. Package scripts are acceptance-eligible only when a static Node entry and its local dependency closure are recoverable. Supported proof surfaces are `ui_browser`, `runtime_behavior`, `api_contract`, `data_state`, `security_boundary`, `population_coverage` and `implementation_structure`. Execution-target runtime families are the bounded `browser`, `native`, `desktop`, `service`, `process` and `external` set; target roles are `product`, `support` and `observer`. Required target refs resolve only to product targets with declared family/cold-start/production-root capabilities. Browser target proof requires `playwright_test`; Native/desktop target proof requires `project_binary`.
|
|
452
531
|
|
|
453
532
|
### One Contract And Source Claims
|
|
454
533
|
|
|
@@ -462,9 +541,9 @@ Saving failure preserves the user's input and shows the reason.
|
|
|
462
541
|
<!-- ty-source-item:end -->
|
|
463
542
|
```
|
|
464
543
|
|
|
465
|
-
Supported kinds are `outcome_result`, `requirement`, `control`, `acceptance`, `technical_obligation`, `non_completing`, `non_goal`, `forbidden_shortcut`, `risk_fact`, `external_confirmation` and `decision`. A risk marker additionally carries its exact pair, for example `<!-- ty-source-item:start key=permission-risk kind=risk_fact fact=permission_boundary_change outcome=observable-outcome -->`. Every declared Source file contains at least one Material Item;
|
|
544
|
+
Supported kinds are `outcome_result`, `requirement`, `control`, `acceptance`, `technical_obligation`, `non_completing`, `non_goal`, `forbidden_shortcut`, `risk_fact`, `external_confirmation` and `decision`. A risk marker additionally carries its exact pair, for example `<!-- ty-source-item:start key=permission-risk kind=risk_fact fact=permission_boundary_change outcome=observable-outcome -->`. Every delivery also includes at least one `technical_obligation` marker with `aspect=architecture`. Every declared Source file contains at least one Material Item; other non-empty lines may occur only inside the validated formal handoff or a background block whose content matches the closed `markdown-structure`/`provenance` grammar. Marker keys and Source Claim keys must be set-equal and globally unique across all Source files. Arbitrary background prose, unclassified text and nested, overlapping, unclosed, empty or invalid sections fail Compile. Each `source_claim.statement` must match the marked text after only line-ending, surrounding-blank-line and trailing-space normalization.
|
|
466
545
|
|
|
467
|
-
Typed dispositions keep overall results, Requirement/Control/Obligation/Non-completing Claims, one named Acceptance Assertion, Global constraints/non-goals, declared Fact/Affected-Outcome risk pairs, external confirmations and genuine decisions distinct. Risk marker metadata must exactly equal its disposition and declared risk fact, and each Fact/Outcome pair has one Source owner. Source Plan and Runtime use the same ten Fact names: data migration is `data_migration`, a weakly observable critical path is two independent `critical_user_path` and `weak_observability` items, and `multi_repository_change` stays in Source until Compiler rejection. Every other non-decision Source item owns exactly one canonical target of the same kind and normalized text, and no target may have two Source owners. An Outcome Source acceptance maps to one `<outcome>.<check>.<assertion>` whose criterion is text-identical and which proves an independently Source-backed non-Result Claim. A Global Source acceptance maps to `GLOBAL.<check>.<assertion>`, is also criterion-identical, proves no Outcome Claim and includes at least one independently Source-backed Global non-goal, constraint or forbidden-shortcut Claim. `out_of_scope` is retired: an explicit Source non-goal needs covered negative proof, while excluding an in-scope item requires `decision_required`.
|
|
546
|
+
Typed dispositions keep overall results, Requirement/Control/Obligation/Non-completing Claims, one named Acceptance Assertion, Global constraints/non-goals, declared Fact/Affected-Outcome risk pairs, external confirmations and genuine decisions distinct. Risk marker metadata must exactly equal its disposition and declared risk fact, and each Fact/Outcome pair has one Source owner. Source Plan and Runtime use the same ten Fact names: data migration is `data_migration`, a weakly observable critical path is two independent `critical_user_path` and `weak_observability` items, and `multi_repository_change` stays in Source until Compiler rejection. Every other non-decision Source item owns exactly one canonical target of the same kind and normalized text, and no target may have two Source owners. An Outcome Source acceptance maps to one `<outcome>.<check>.<assertion>` whose criterion is text-identical and which proves an independently Source-backed non-Result Claim. A Global Source acceptance maps to `GLOBAL.<check>.<assertion>`, is also criterion-identical, proves no Outcome Claim and includes at least one independently Source-backed Global non-goal, constraint or forbidden-shortcut Claim. `out_of_scope` is retired: an explicit Source non-goal needs covered negative proof, while excluding an in-scope item requires `decision_required`. The parser proves complete syntactic ownership and rejects arbitrary prose disguised as background; it cannot prove that the user supplied every real requirement or that marked Source is factually accurate, which remain explicit upstream premises.
|
|
468
547
|
|
|
469
548
|
Delivery Set orchestration and top-level Contract splitting within one selected delivery are retired. `ty-context delivery-set ...` returns a fixed non-executing tombstone.
|
|
470
549
|
|
|
@@ -484,17 +563,17 @@ An explicit user request can raise the level to strict. Explicit `standard` belo
|
|
|
484
563
|
|
|
485
564
|
Final acceptance is computed from executable current evidence, not agent prose. Evidence adapters derive from runner kind: `playwright_test` produces `playwright_json_v1` and is the only adapter allowed for `ui_browser`; package scripts, project binaries and Node oracles use the `structured_json_v2` adapter for non-browser surfaces and emit the additive `long-task-check-result-v3` payload when capability records are required. V2 payloads remain decodable only for compatibility and cannot satisfy non-presence capabilities. The adapter is part of acceptance, raw-execution, compiled, progress and Receipt identity.
|
|
486
565
|
|
|
487
|
-
Every Check declares non-empty keyed `scenario.given` and `scenario.when` steps plus one or more roles from `success`, `degradation`, `recovery`, `stage_gate` and `conformance`. Every Assertion declares an all-of set from `presence`, `interaction_trace`, `state_delta`, `cross_surface_consistency`, `durable_readback`, `boundary_invocation`, `external_side_effect`, `failure_injection`, `visual_render`, `target_runtime` and `input_variation`. Except for static `presence`, each capability requires exactly one typed current-execution record bound to that Assertion. Missing, duplicate, unknown or undeclared records fail closed. Result Claims use success Checks only; success and degradation cannot share one Check. External-boundary evidence runs on an observer target. Input variation proves at least two distinct inputs, two output hashes and a failure case.
|
|
566
|
+
Every Check declares non-empty keyed `scenario.given` and `scenario.when` steps plus one or more roles from `success`, `degradation`, `recovery`, `stage_gate` and `conformance`. Global/Outcome applicability profiles bind exact target, journey role, atomic dimensions, Given condition/input/state refs and ordered When refs; each Claim-bearing Assertion proves one Claim in one matching profile, and all actual applicable proof-surface cells are mandatory. Every Assertion declares an all-of set from `presence`, `interaction_trace`, `state_delta`, `cross_surface_consistency`, `durable_readback`, `boundary_invocation`, `external_side_effect`, `failure_injection`, `visual_render`, `design_conformance`, `design_method`, `target_runtime` and `input_variation`. Except for static `presence`, each capability requires exactly one typed current-execution record bound to that Assertion. Missing, duplicate, unknown or undeclared records fail closed. Result Claims use success Checks only; success and degradation cannot share one Check. External-boundary evidence runs on an observer target. Input variation proves at least two distinct inputs, two output hashes and a failure case.
|
|
488
567
|
|
|
489
568
|
Every Outcome has at least one non-Result atomic Claim, and a Claim is covered only when all `required_proof_surfaces` are covered. Claim-bearing assertions use explicit expected-value comparisons; unary `truthy`/`falsy` are forbidden, and `exists` is limited to `implementation_structure` obligations. Across all Checks sharing one Raw Execution identity, one claim-bearing Observation belongs to one Assertion. Playwright Claim proof has one canonical form: `playwright.case.<ac-key>.passed equals true`. Missing, skipped, flaky, unexpected, failed or duplicate-within-project ACs fail closed; the same AC across distinct Playwright projects aggregates only when every instance passes. Decoder diagnostic fields such as aggregate pass, executed, skipped, status and counts cannot prove Claims.
|
|
490
569
|
|
|
491
|
-
Outcome Counterfactuals bind a local Binding; Global Counterfactuals bind an Outcome-owned `binding_ref`. Both may mutate only a proven subset of carriers. `structured_json_v2` adapter executions require completed exit-zero execution with exactly the expected `assertion_value_mismatch` set. A weak `playwright_json_v1` Counterfactual may accept exit one only under exact, complete unexpected-instance accounting; ordinary Playwright Baseline Checks still require exit zero. Standard frozen Playwright content
|
|
570
|
+
Outcome Counterfactuals bind a local Binding; Global Counterfactuals bind an Outcome-owned `binding_ref`. Both may mutate only a proven subset of carriers. Every behavioral Claim-bearing Assertion uses same-Check claim-local `replace_json_value` or `replace_text` to substitute wrong semantics while a claimless target-runtime liveness Assertion listed in `preserved_assertions` keeps passing. `replace_file` remains compatibility-only and cannot prove semantic binding. `structured_json_v2` adapter executions require completed exit-zero execution with exactly the expected `assertion_value_mismatch` set. A weak `playwright_json_v1` Counterfactual may accept exit one only under exact, complete unexpected-instance accounting; ordinary Playwright Baseline Checks still require exit zero. Standard frozen Playwright content and installed runtime packages are named trusted verifier inputs; project-local static dependencies are recursively frozen and unresolved loaders fail closed. Population binds its universe to a real technical carrier in the owning Check snapshot and proves universe = eligible = observed plus valid exclusions, but never waives the semantic witness for behavior. Claim and Population proofs are emitted only after the complete Check status is `passed`.
|
|
492
571
|
|
|
493
|
-
Raw Execution identity binds frozen runner identity plus canonical declared Environment Requirements, never actual environment values. A Playwright Test uses `[ac:<assertion-key>]`; one Test may bind at most one declared AC. Every Claim-bearing structured Check needs same-Check, Claim-related Counterfactual sensitivity; unrelated Artifacts or another Check do not count. Counterfactual Findings are projected into their owning Check Result before Progress is written, so status/resume recover the Finding without a new Global Outcome state. Explain traces Source Item → canonical target → Claim
|
|
572
|
+
Raw Execution identity binds frozen runner identity plus canonical declared Environment Requirements, never actual environment values. A Playwright Test uses `[ac:<assertion-key>]`; one Test may bind at most one declared AC. Every Claim-bearing structured Check needs same-Check, Claim-related Counterfactual sensitivity; unrelated Artifacts or another Check do not count. Counterfactual Findings are projected into their owning Check Result before Progress is written, so status/resume recover the Finding without a new Global Outcome state. Explain traces Source Item → canonical target → Claim/applicability → Assertion → required surfaces → Check → adapter → Observation.
|
|
494
573
|
|
|
495
574
|
The workdir `.ty-context/compiled-contract.json` is only a rebuildable cache projection. Previous authority, the immutable initial base, risk floor and Final Gate identity come only from the common-dir snapshot. Commit, verifier migration, clear and abandon share one active-state lock; Final/Verify recheck identity and Stop/close use accepted-identity CAS. Development-period V2 Active Authority, Progress and Receipts are not migrated. Corrupt continuity is recovered explicitly with `abandon --force-corrupt-state`.
|
|
496
575
|
|
|
497
|
-
Final Gate may run only Contract-declared verification commands and never production mutation/deployment/payment/migration execution. Retry defaults to none and is allowed once only for `transient_once` + idempotent + read-only/test-sandbox runners. Runners receive a minimal environment whitelist plus only declared environment requirements. Protected authority/proof inputs reject symlinks and detectable hardlinks. Network isolation remains external. Receipts are audit-only (`reusable_for_acceptance: false`). Human, CI, deployment and product confirmation live only in `external_confirmations`; a machine pass with pending confirmations reports `machine_accepted_external_pending
|
|
576
|
+
Final Gate may run only Contract-declared verification commands and never production mutation/deployment/payment/migration execution. Retry defaults to none and is allowed once only for `transient_once` + idempotent + read-only/test-sandbox runners. Runners receive a minimal environment whitelist plus only declared environment requirements. Protected authority/proof inputs reject symlinks and detectable hardlinks. Network isolation remains external. Receipts are audit-only (`reusable_for_acceptance: false`). Human, CI, deployment and product confirmation live only in `external_confirmations`; a machine pass with pending confirmations reports `machine_accepted_external_pending`, which is outside the complete-delivery accepted-terminal theorem and cannot complete the native Goal.
|
|
498
577
|
|
|
499
578
|
## Compatibility And Migration
|
|
500
579
|
|
|
@@ -502,7 +581,7 @@ Version 0.6.0 retires the V1 schema/runtime and repo-local Hook. Enable, disable
|
|
|
502
581
|
|
|
503
582
|
Version 0.6.0 defined the first public V2 semantics while retaining the `long-task-delivery-v2` schema name and physical `outcome_files` parser form. It introduced the former optional Source Plan helper without adding Schema, CLI, Preflight, Compile, Validator, Receipt, Authority or state. Current releases integrate those Source-authoring semantics into `/long-task-workflow` and retain the old Skill only as a compatibility pointer. Preflight and direct Compile use one activation-safety kernel.
|
|
504
583
|
|
|
505
|
-
|
|
584
|
+
The current V2 semantic-assurance closure additionally requires full Context, an architecture-classified Source obligation, atomic applicability dimensions, explicit target and blocker capabilities, applicability-bound Control-relation closure, Population universe carriers, claim-local semantic mutation, per-method/condition record and primary-observation artifacts, and the supported direct-literal verifier dependency closure. An older V2 Contract missing those meanings reports the indexed manual migration `long-task-v2-semantic-drift-authority`; re-author them from Source. Upgrade never infers those semantics or imports old Progress/Receipts as passing evidence.
|
|
506
585
|
|
|
507
586
|
`/normal-long-task` is also a retirement pointer to `/long-task-workflow`; it creates no checklist, prompt, audit, matrix, verdict or second authority.
|
|
508
587
|
|
|
@@ -535,7 +614,7 @@ make validate-harness
|
|
|
535
614
|
|
|
536
615
|
The modularity gate is `ty-context check-modularity`. Scoped waivers require `owner`, `introduced_at`, `reason`, `tracking_issue` and `expiry_condition`.
|
|
537
616
|
|
|
538
|
-
`npm run preview:pack` produces a local preview named `project-tiny-context-harness-0.8.
|
|
617
|
+
`npm run preview:pack` produces a local preview named `project-tiny-context-harness-0.8.3.tgz` under the preview output directory.
|
|
539
618
|
|
|
540
619
|
## Community And Further Reading
|
|
541
620
|
|
|
@@ -558,7 +637,7 @@ For concrete examples, see the [fresh-agent recovery walkthrough](docs/examples/
|
|
|
558
637
|
- It cannot prove that a user declared every real requirement.
|
|
559
638
|
- Bounded Context keyword search can still miss synonyms or indirect dependencies; it supplements rather than replaces semantic judgment.
|
|
560
639
|
- Harness cannot switch the host-selected model; it only asks for the one post-Authority-Lock user choice.
|
|
561
|
-
-
|
|
640
|
+
- Tiny Context provides no parallel mutation or delegation runtime. The platform Goal may use its own opaque implementation delegation, but Harness does not persist it or accept it as evidence.
|
|
562
641
|
- It does not observe platform token counts or model-call counts.
|
|
563
642
|
- Network policy is declared to runners and proxy variables are restricted, but this is not an OS sandbox.
|
|
564
643
|
- Same-user/admin filesystem tampering and Hook bypass are outside its security boundary.
|