project-tiny-context-harness 0.7.9 → 0.8.1
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 +45 -30
- package/assets/README.md +42 -30
- package/assets/README.zh-CN.md +42 -27
- package/assets/agents/AGENTS_CORE.md +18 -12
- package/assets/context_templates/global.md +1 -0
- package/assets/context_templates/screen-contract.md +16 -7
- package/assets/skills/context_development_engineer/SKILL.md +9 -3
- package/assets/skills/context_product_plan/SKILL.md +1 -0
- package/assets/skills/context_uiux_design/SKILL.md +28 -10
- package/assets/skills/design-resource-authoring/SKILL.md +11 -6
- package/assets/skills/design-resource-authoring/references/downstream-handoff.md +41 -13
- package/assets/skills/design-resource-authoring/references/open-design-provider.md +18 -12
- package/assets/skills/design-resource-authoring/references/resource-selection.md +4 -4
- package/assets/skills/design-system-authoring/references/authority-adoption.md +4 -3
- package/assets/skills/long-task-workflow/SKILL.md +28 -20
- package/assets/skills/long-task-workflow/references/authority-lifecycle.md +26 -9
- package/assets/skills/long-task-workflow/references/contract-authoring.md +17 -6
- package/assets/skills/long-task-workflow/references/evidence-design.md +7 -4
- package/assets/skills/long-task-workflow/references/source-authoring.md +14 -11
- package/assets/skills/source-plan-authoring/SKILL.md +2 -2
- package/dist/commands/design-resource.d.ts +1 -0
- package/dist/commands/design-resource.js +32 -0
- package/dist/commands/index.js +4 -0
- package/dist/commands/long-task-command-args.d.ts +1 -0
- package/dist/commands/long-task-command-args.js +6 -0
- package/dist/commands/long-task-revision.js +16 -4
- package/dist/commands/long-task.js +12 -5
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/lib/design-md.js +7 -4
- package/dist/lib/design-resource-handoff-file-primitives.d.ts +4 -0
- package/dist/lib/design-resource-handoff-file-primitives.js +14 -0
- package/dist/lib/design-resource-handoff-file-validation.d.ts +2 -0
- package/dist/lib/design-resource-handoff-file-validation.js +142 -0
- package/dist/lib/design-resource-handoff-parser.d.ts +3 -0
- package/dist/lib/design-resource-handoff-parser.js +29 -0
- package/dist/lib/design-resource-handoff-policy.d.ts +3 -0
- package/dist/lib/design-resource-handoff-policy.js +36 -0
- package/dist/lib/design-resource-handoff-shape-evidence.d.ts +4 -0
- package/dist/lib/design-resource-handoff-shape-evidence.js +84 -0
- package/dist/lib/design-resource-handoff-shape-primitives.d.ts +9 -0
- package/dist/lib/design-resource-handoff-shape-primitives.js +42 -0
- package/dist/lib/design-resource-handoff-shape-structure.d.ts +5 -0
- package/dist/lib/design-resource-handoff-shape-structure.js +118 -0
- package/dist/lib/design-resource-handoff-shape.d.ts +2 -0
- package/dist/lib/design-resource-handoff-shape.js +75 -0
- package/dist/lib/design-resource-handoff-types.d.ts +139 -0
- package/dist/lib/design-resource-handoff-types.js +46 -0
- package/dist/lib/design-resource-handoff-validation-coverage.d.ts +4 -0
- package/dist/lib/design-resource-handoff-validation-coverage.js +168 -0
- package/dist/lib/design-resource-handoff-validation-primitives.d.ts +11 -0
- package/dist/lib/design-resource-handoff-validation-primitives.js +26 -0
- package/dist/lib/design-resource-handoff-validation-structure.d.ts +6 -0
- package/dist/lib/design-resource-handoff-validation-structure.js +93 -0
- package/dist/lib/design-resource-handoff-validation.d.ts +3 -0
- package/dist/lib/design-resource-handoff-validation.js +78 -0
- package/dist/lib/design-resource-handoff-web-dependency-validation.d.ts +3 -0
- package/dist/lib/design-resource-handoff-web-dependency-validation.js +70 -0
- package/dist/lib/doctor.js +2 -2
- package/dist/lib/long-task-activation-validation.js +14 -2
- package/dist/lib/long-task-authoring-preflight-diagnostics.js +7 -0
- package/dist/lib/long-task-authoring-preflight.js +39 -1
- package/dist/lib/long-task-authority-material-diff.js +14 -0
- package/dist/lib/long-task-authority-materials.js +21 -0
- package/dist/lib/long-task-authority-policy.d.ts +33 -0
- package/dist/lib/long-task-authority-policy.js +36 -0
- package/dist/lib/long-task-authority-revision-analysis.d.ts +1 -0
- package/dist/lib/long-task-authority-revision-analysis.js +30 -0
- package/dist/lib/long-task-authority-revision-brief.d.ts +3 -0
- package/dist/lib/long-task-authority-revision-brief.js +74 -0
- package/dist/lib/long-task-authority-revision-details.js +16 -16
- package/dist/lib/long-task-authority-revision-diagnosis.d.ts +1 -1
- package/dist/lib/long-task-authority-revision-diagnosis.js +8 -0
- package/dist/lib/long-task-authority-revision-enforcement.js +7 -3
- package/dist/lib/long-task-authority-revision-summary.d.ts +3 -0
- package/dist/lib/long-task-authority-revision-summary.js +133 -21
- package/dist/lib/long-task-authority-revision-types.d.ts +19 -1
- package/dist/lib/long-task-authority-revision.js +5 -0
- package/dist/lib/long-task-authority-types.d.ts +2 -0
- package/dist/lib/long-task-authority.js +10 -2
- package/dist/lib/long-task-check-execution-policy.js +2 -0
- package/dist/lib/long-task-claim-definitions.js +1 -5
- package/dist/lib/long-task-contract-types.d.ts +2 -0
- package/dist/lib/long-task-counterfactual-sandbox.d.ts +7 -0
- package/dist/lib/long-task-counterfactual-sandbox.js +26 -1
- package/dist/lib/long-task-delivery-compiler.js +26 -8
- 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 +3 -0
- package/dist/lib/long-task-design-resource-handoff.d.ts +2 -0
- package/dist/lib/long-task-design-resource-handoff.js +177 -0
- package/dist/lib/long-task-evidence-capability-codec.js +19 -0
- package/dist/lib/long-task-evidence-capability-policy.js +4 -0
- package/dist/lib/long-task-evidence-capability-runtime.js +25 -0
- package/dist/lib/long-task-evidence-capability-types.d.ts +9 -1
- package/dist/lib/long-task-outcome-parser.js +11 -1
- package/dist/lib/long-task-paths.d.ts +0 -1
- package/dist/lib/long-task-paths.js +0 -4
- package/dist/lib/long-task-playwright-case-evidence.d.ts +43 -0
- package/dist/lib/long-task-playwright-case-evidence.js +152 -0
- package/dist/lib/long-task-playwright-evidence.js +19 -152
- package/dist/lib/long-task-runner-freeze.d.ts +2 -2
- package/dist/lib/long-task-runner-freeze.js +2 -1
- package/dist/lib/long-task-runtime-types.d.ts +2 -0
- package/dist/lib/long-task-semantic-contract-types.d.ts +1 -1
- package/dist/lib/long-task-semantic-drift-migration.js +6 -1
- 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-status-v2.js +12 -7
- package/dist/lib/long-task-ui-design-policy.d.ts +17 -0
- package/dist/lib/long-task-ui-design-policy.js +128 -0
- package/dist/lib/long-task-ui-surface-policy.d.ts +4 -0
- package/dist/lib/long-task-ui-surface-policy.js +109 -0
- package/dist/lib/long-task-ui-surface-shape.d.ts +2 -0
- package/dist/lib/long-task-ui-surface-shape.js +94 -0
- package/dist/lib/long-task-ui-surface-types.d.ts +44 -0
- package/dist/lib/long-task-ui-surface-types.js +1 -0
- package/dist/lib/long-task-ui-surface-validation.d.ts +11 -0
- package/dist/lib/long-task-ui-surface-validation.js +62 -0
- package/dist/lib/long-task-verification-preview.d.ts +55 -0
- package/dist/lib/long-task-verification-preview.js +120 -0
- package/dist/lib/long-task-verifier-v2.js +11 -18
- package/dist/lib/long-task-workspace-scope.d.ts +38 -0
- package/dist/lib/long-task-workspace-scope.js +121 -0
- package/dist/lib/long-task-workspace.d.ts +1 -0
- package/dist/lib/long-task-workspace.js +73 -9
- package/dist/schemas/long-task-delivery-v2/long-task-delivery-v2.schema.json +84 -2
- package/package.json +3 -3
package/assets/README.md
CHANGED
|
@@ -77,7 +77,7 @@ It does not launch or switch models, spawn agents, create branches or worktrees,
|
|
|
77
77
|
2. **Workflow Contract** — Context-first default engineering behavior using the platform's internal plan; no required plan artifact.
|
|
78
78
|
3. **Long-Task Workflow** — explicit Single-Goal Rolling Delivery with `long-task-delivery-v2`, compiled Claim Coverage and a verifier-owned Live Final Gate.
|
|
79
79
|
|
|
80
|
-
The base managed set also provides two explicitly triggered Open Design adapters: `/design-system-authoring` generates/selects/adopts project Design Authority at cold start, while `/design-resource-authoring` commissions task-local resources. The opt-in long-task profile provides `/long-task-workflow`; `/source-plan-authoring` remains only as a retired compatibility pointer because
|
|
80
|
+
The base managed set also provides two explicitly triggered Open Design adapters: `/design-system-authoring` generates/selects/adopts project Design Authority at cold start, while `/design-resource-authoring` commissions task-local resources. The opt-in long-task profile provides `/long-task-workflow`; `/source-plan-authoring` remains only as a retired compatibility pointer because Long-Task inputs now enter one Source-bound Contract Draft loop directly.
|
|
81
81
|
|
|
82
82
|
Default profiles are `core-portable` and `workflow-default`. Enable the opt-in profile with:
|
|
83
83
|
|
|
@@ -91,8 +91,8 @@ This additionally installs `/long-task-workflow`, the `/source-plan-authoring` c
|
|
|
91
91
|
|
|
92
92
|
Start from an initial proposal: either a concise product intent or a detailed proposal authored elsewhere, including Web GPT. For UI work that needs standalone design resources:
|
|
93
93
|
|
|
94
|
-
- **Long delivery:** initial proposal → explicitly initialize/adopt a design system with `/design-system-authoring` when the project has none → `/design-resource-authoring` generates/selects resources
|
|
95
|
-
- **Non-long delivery:** the same
|
|
94
|
+
- **Long delivery:** initial proposal → explicitly initialize/adopt a design system with `/design-system-authoring` when the project has none → `/design-resource-authoring` generates/selects resources, completely freezes an implementation-level source when needed, reconciles accepted decisions once and emits a validated residual `design-resource-handoff-v1` → pass the revised proposal plus selected immutable resources and the validated handoff to `/long-task-workflow`. Those inputs enter one Source-bound Contract Draft loop immediately in the same native Goal.
|
|
95
|
+
- **Non-long delivery:** use the same sequence, then give the revised proposal plus selected immutable resources and the validated handoff directly to Codex's current native Goal under the default Workflow Contract.
|
|
96
96
|
|
|
97
97
|
The design-system step is user-invoked, normally at project cold start; no command or downstream Skill runs it automatically. `/design-resource-authoring` gates only style-bearing work when Design Authority is unconfigured. Low-fidelity structure, IA/flow and semantics-only state studies remain available without that gate. A legacy Source Plan is accepted as ordinary input, but it is no longer a recommended intermediate service.
|
|
98
98
|
|
|
@@ -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.
|
|
149
|
+
npm install -D /path/to/project-tiny-context-harness/tmp/ty-context/source-preview/package/project-tiny-context-harness-0.8.1.tgz
|
|
150
150
|
npx --no-install ty-context init --adopt
|
|
151
151
|
make validate-context
|
|
152
152
|
```
|
|
@@ -175,7 +175,7 @@ minimum graph-relevant area/role Context
|
|
|
175
175
|
|
|
176
176
|
Only near-universal recovery facts should use `read_policy = "default"`; specialized architecture, contract, deployment and historical detail should be task-triggered `on-demand` Context. Before deciding `Context Delta`, the Agent also runs one bounded text search over `project_context/**` using a small set of high-signal task terms such as explicit area/module names and API/schema/state/security/verification/deployment language. Matching files are merged with manifest candidates and filtered by semantic relevance. This is not a vector or persistent retrieval system and creates no index, cache, registry, search state or authority.
|
|
177
177
|
|
|
178
|
-
`ty-context doctor` reports the deterministic default read footprint, per-file/total soft-budget overages, byte-identical default files and `DESIGN.md` authority status. These are advisory maintenance signals, not a new validation gate or workflow state.
|
|
178
|
+
`ty-context doctor` reports the deterministic default read footprint, per-file/total soft-budget overages, byte-identical default files and `DESIGN.md` authority status. These are advisory maintenance signals, not a new validation gate or workflow state. If genuine near-universal recovery facts exceed a byte heuristic, preserve the facts and accept the warning; never omit, obscure or misclassify required Context merely to fit the budget.
|
|
179
179
|
|
|
180
180
|
Typical roles are area/domain, contract, foundation, decision-rationale, implementation-index, verification and deployment. Context owns durable intended boundaries; code owns current implementation; tests, CI, browser/runtime evidence and people own behavior and product acceptance.
|
|
181
181
|
|
|
@@ -224,20 +224,30 @@ Newly generated Harness configs default to `strict_except_generated`. Generated/
|
|
|
224
224
|
|
|
225
225
|
`context_surface_contract` compiles durable screen/page/CLI responsibility using existing `contract`, area/subdomain and verification roles. `product-surface-contract.md` owns cross-surface/main-versus-drilldown responsibility; optional on-demand `screen-contract.md` goes deeper for one screen's entry/exit/shared state, information hierarchy, semantic regions, navigation/variants, material controls and target/verification references. This workflow must not add a new Context role or claim product-quality proof, and local style fixes do not require a Screen Contract.
|
|
226
226
|
|
|
227
|
-
For material UI, **UI Authority Closure** reconciles each stable surface/control/target key as covered by existing Context, requiring a Context update, task-local, explicitly out of scope or genuinely decision-required.
|
|
227
|
+
For material UI, **UI Authority Closure** reconciles each stable surface/control/target key as covered by existing Context, requiring a Context update, task-local, explicitly out of scope or genuinely decision-required. Design Source Projection sends durable cross-surface and Screen/Control/state meaning to existing Product Surface or Screen/interaction Context, durable visual-system/token/motion-policy/rationale meaning to `DESIGN.md`, exact composition/value/condition/asset facts to versioned targets, repeatable proof routes to verification Context and delivery-local coverage/provenance/blockers to task or Contract Source. Conflicts fail closed; current code, timestamps, YAML or implementation screenshots do not silently win.
|
|
228
228
|
|
|
229
229
|
### Visual Delivery Guidance
|
|
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
|
-
|
|
233
|
+
The provider-neutral handoff is a residual semantic and index layer, not a textual copy of CSS. It closes every applicable subject × selected target × declared condition × UI/UX dimension cell across surface/flow, visual/content, component/control, state/interaction, motion, adaptation/input, accessibility and assets; it records explicit exclusions/not-applicable/unresolved meaning, Source Items, methods and blockers. Preflight resolves each typed HTML/Markdown/JSON/CSS locator against the declared immutable resource, verifies source/dependency closure and rejects unresolved or media-incompatible evidence. Exploration remains schema-free.
|
|
234
234
|
|
|
235
|
-
|
|
235
|
+
Those inputs remain ordinary Source. The default Workflow keeps exact task-local accounting of covered Source Items, declared verification methods, blockers, targets and conditions; every item must reach a production owner, cold-start journey and an executed final-candidate check whose failure remains attributable. Any unresolved, unmapped, unexecuted, stale or indistinguishable item 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 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
|
+
|
|
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.
|
|
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. It inspects the first runnable production slice through the real entry before broad rollout and reports only combinations actually checked. Resource hashes, manifests and counts prove integrity only; an implementation screenshot cannot become its own target or implementation-conformance proof.
|
|
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 preserves every applicable Control field through the existing projection: surface, region/location, type/label, user task, visibility/availability, trigger/input/validation/default, interaction/navigation, loading/empty/success/failure/recovery/permission/feedback and accessibility. Each non-empty field is an independent Source-backed Control Claim and protected product semantic; omitted fields create no 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`; `verification_method_bindings` make every handoff method independently falsifiable, and every declared blocker preserves exact Source-item/method lineage into target-local machine proof 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
|
+
|
|
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.
|
|
238
246
|
|
|
239
247
|
`ty-context doctor` keeps its compatible `missing | unconfigured | configured` project-level status and adds advisory Design Authority Index, token-source and classified-reference signals. It explicitly does not infer surface implementation readiness; that requires the owning Screen/Control meaning, selected target/constraints and project-owned verification.
|
|
240
248
|
|
|
249
|
+
Static guidance tests prove distribution, projection and canonical ownership, not Agent performance. The optional delivery-mechanism benchmark provides a fixed fresh-agent UI/UX Context/target-recovery task with routing gold and a hidden production oracle; only independent paired runs may support effectiveness or ROI conclusions.
|
|
250
|
+
|
|
241
251
|
### Explicit Design System Authoring
|
|
242
252
|
|
|
243
253
|
Use `/design-system-authoring` only when the user explicitly asks to initialize, generate, select, adopt, replace or repair the project design system/design style. Installation makes the cold-start capability available but never runs it automatically. The Skill discovers live Open Design MCP resources/tools, feature-detects design-system lifecycle methods and, when the current MCP exposes design systems only as resources, uses the same installed Open Design daemon's official generation/revision/accept API. It never copies provider prompts or pretends daemon generation is an MCP tool.
|
|
@@ -252,17 +262,19 @@ The Skill fixes the requested output or development content as a hard scope ceil
|
|
|
252
262
|
|
|
253
263
|
It first classifies the commission. High-fidelity/branded output, visual direction, typography/color/density, component visual treatment and production-style prototypes are style-bearing: if `DESIGN.md` is unconfigured or lacks one authored token source/direction, the Skill stops before provider project/run creation and tells the user to explicitly invoke `/design-system-authoring`; it never initializes authority itself. Low-fidelity structure, IA/flow topology and semantics-only behavior/state studies remain non-fidelity. For style-bearing work, the Open Design MCP project is created or checked with `create_project.designSystem`, and `get_project.designSystemId` must match the adopted provider ID.
|
|
254
264
|
|
|
255
|
-
It commissions only the smallest sufficient set through structured MCP, with bounded CLI/daemon and UI fallback. One page/prototype or component-family workbench may cover many items when its conditions are addressable and inspectable; repeated controls map to shared variants, while unique or complex uncovered controls may need dedicated state/interaction studies. A static/default frame never silently covers unseen state, interaction, motion, responsiveness or accessibility. A prototype, low/high-fidelity pair, component board,
|
|
265
|
+
It commissions only the smallest sufficient set through structured MCP, with bounded CLI/daemon and UI fallback. One page/prototype or component-family workbench may cover many items when its conditions are addressable and inspectable; repeated controls map to shared variants, while unique or complex uncovered controls may need dedicated state/interaction studies. A static/default frame never silently covers unseen state, interaction, motion, responsiveness or accessibility. A prototype, low/high-fidelity pair, component board, provider-native input, one-file-per-control rule, variant count or directory is never universally required, and Tiny Context never copies Open Design prompts/templates or vendors a provider catalogue. Designs may express user-visible interaction semantics and the presentation of product rules, but business/data/permission/algorithmic rules remain owned by product/technical Source.
|
|
266
|
+
|
|
267
|
+
For implementation Web/App output, the Skill requires the complete canonical entry/dependency set and addressable declared facts described above. Figma remains useful when an existing design team needs native Components/Variables/Variants, shared libraries, Dev Mode or Code Connect; Penpot when open/self-hosted multi-user design infrastructure is itself required; OpenPencil as a local static-layout sidecar while its prototype/motion model remains incomplete. Default conversion from complete Open Design source to another representation is not required because it adds synchronization and operating cost without closing a new enforcement gap.
|
|
256
268
|
|
|
257
|
-
Exploration returns the requested visible candidate after minimal sanity review
|
|
269
|
+
Exploration returns the requested visible candidate after minimal sanity review and requires no handoff schema. After explicit or delegated final selection for implementation, the Skill performs one consolidated idempotent proposal reconciliation and writes one provider-neutral marked Markdown Source containing exactly one strict residual `design-resource-handoff-v1` block. It records the implementation source profile, typed locators, applicable subject/target/condition coverage, residual product meaning, Source-item/verification-method bindings and acceptance blockers. Shared preflight cannot call incomplete, unaddressable, unresolved, unsupported or stale input ready. There is no fixed directory, provider pack or one-file-per-control rule. The adapter is ordinary Source, not Design Authority or acceptance, and the Skill never edits a Source Plan, `project_context/**`, `DESIGN.md`, production code or a Delivery Contract.
|
|
258
270
|
|
|
259
|
-
|
|
271
|
+
Actual generation remains with configured Open Design/Product Design, Figma, image-generation, prototype or human systems. Their outputs enter the default Workflow or Long-Task as ordinary external Source. Candidates and inspiration authorize no fidelity. An adopted exact target/constraint becomes Context-reachable Source: owning Context/`DESIGN.md` maps its stable key to declared conditions, a stable immutable identity/digest and an editable upstream owner/locator/update route. `context_uiux_design` performs downstream UI Authority Closure and adopts only durable facts into Context/`DESIGN.md`; implementation renders and diffs remain evidence artifacts rather than self-authorizing targets.
|
|
260
272
|
|
|
261
273
|
Maintainers may set `TY_CONTEXT_OPEN_DESIGN_MCP_COMMAND` plus optional `TY_CONTEXT_OPEN_DESIGN_MCP_ARGS_JSON` and run `npm run smoke:open-design` for an opt-in, read-only discovery smoke. Normal tests use a local mock MCP and never require Open Design, login, paid access or nondeterministic design output.
|
|
262
274
|
|
|
263
275
|
### Retired Source Plan Compatibility
|
|
264
276
|
|
|
265
|
-
`/source-plan-authoring` remains installed with the long-task profile only as a compatibility pointer. `/long-task-workflow`
|
|
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 control-level meaning, preference/research/delegation traceability, Source markers/provenance and Contract mapping in that same loop. 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.
|
|
266
278
|
|
|
267
279
|
## Single-Goal Rolling Delivery
|
|
268
280
|
|
|
@@ -275,25 +287,25 @@ Use `/long-task-workflow` only when explicitly requested or when the current wor
|
|
|
275
287
|
- one user model-choice checkpoint after first Authority Lock and before implementation;
|
|
276
288
|
- a rolling internal implementation Frontier;
|
|
277
289
|
- targeted repair checks that never accept;
|
|
278
|
-
- stateless scope-only revision diagnosis
|
|
290
|
+
- stateless scope-only revision diagnosis, automatic bounded repair and at most one exact user decision for a stable decision-relevant candidate;
|
|
279
291
|
- a complete Final Gate on one current snapshot;
|
|
280
292
|
- a Stop Hook that rejects stale completion.
|
|
281
293
|
|
|
282
|
-
|
|
294
|
+
Raw/revised proposals, selected design resources and mixed attachments enter one Source-bound Contract Draft loop immediately. Complete input inventory, stable keys, control-level meaning, acceptance/risk coverage, direct/derived/delegated/evidence-backed provenance, Source markers and Contract mapping converge together. 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, but marker-only Material Source Item enumeration does.
|
|
283
295
|
|
|
284
|
-
Before the first successful formal Compile, `delivery-contract.yaml` is one non-authoritative Contract Draft. `/long-task-workflow` keeps revising that same Draft across repository/Context reads and Preflight repair rounds; it does not require one response to produce a complete Contract.
|
|
296
|
+
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.
|
|
285
297
|
|
|
286
|
-
The first successful Compile creates Authority Lock and returns `execution_model_checkpoint.required: true
|
|
298
|
+
The first successful Compile creates Authority Lock and returns `execution_model_checkpoint.required: true` with `turn_boundary: end_current_turn`, blocked implementation actions and explicit-choice fields. Unless a prior user message explicitly states this task's current-model or switch-and-resume strategy, the Agent performs no implementation, file edit, build or test after that result, ends the turn and asks for the choice. Generic continue/resume/finish/continue-goal language does not satisfy the checkpoint. Later Compile revisions return `required: false`; Harness does not switch models, persist acknowledgement/model-route state or repeat the pause.
|
|
287
299
|
|
|
288
|
-
Later revisions
|
|
300
|
+
Later revisions separate authority change from user decision. Formally monotonic strengthening; raw Source/Context snapshot changes with unchanged locked Claims/targets/proof obligations; operational Runner/input repair; repository-bound scope expansion; risk strengthening; and equivalent Counterfactual coverage with the same carrier, mutation and Check and no lost Claim/assertion-failure coverage auto-adopt. Product/Source Claim/target/external-confirmation changes, lost scenario/Claim/Evidence Capability/failure interception, forbidden or owner-Context removal, runner type/effect changes, verifier-kernel changes and unknown reasons are preview-only and require the exact revision identity; risk downgrade is rejected. `diagnose-revision` remains side-effect-free and can exercise eligible scope candidates, so withdrawn/replaced candidates coalesce in the same `delivery-contract.yaml` and never ask. The final pending decision begins with a plain-language Authority Revision introduction and separates `user_decision_reasons` from mechanically bounded changes. Present it first. An explicit current-task instruction that exactly covers every listed decision reason may be mechanically relayed without a second question; generic continue, blanket approval, recommendation or Agent inference does not count. Exact identity, previous-Authority continuity, evidence invalidation and the complete Final Gate apply to every adoption, which never means delivery completion.
|
|
289
301
|
|
|
290
|
-
The package-managed Long-Task Skill uses progressive disclosure: its main `SKILL.md` keeps the objective, boundaries and
|
|
302
|
+
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.
|
|
291
303
|
|
|
292
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 keep a smaller dependency-ready working set, target verification, localize failures, resume findings and invalidate stale local results. `depends_on` expresses acceptance readiness. 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. An Outcome is not a Worker, scheduler task, queue or parallelism unit, and a Stage owns no Receipt or second Gate. Outcome decomposes execution and diagnosis, not completion authority: targeted passes never replace the one complete Final Gate on the current final snapshot.
|
|
293
305
|
|
|
294
306
|
The Contract declares one bounded target profile, its non-empty required product target refs and each target's runtime family/root entrypoint. 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.
|
|
295
307
|
|
|
296
|
-
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; 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. After a blocker-driven semantic/proof revision, only affected weak-observability or high-risk behavioral Claims pay causal review.
|
|
308
|
+
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; 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. After a blocker-driven semantic/proof revision, only affected weak-observability or high-risk behavioral Claims pay causal review. Author each Check's `input_paths`/Bindings as its smallest sound invalidation envelope and keep every Counterfactual carrier traceable from the declared target root. Run the live Check at the first useful runnable boundary; later `progress_stale` only reports that prior evidence no longer covers current inputs. Coalesce related edits, use the cheapest reliable project-owned feedback, and refresh before dependent work relies on the result or before Final Gate. `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, 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.
|
|
297
309
|
|
|
298
310
|
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.
|
|
299
311
|
|
|
@@ -309,7 +321,7 @@ ty-context long-task compile <workdir> --revise
|
|
|
309
321
|
ty-context long-task diagnose-revision <workdir> [--outcome <key>] [--check <key>]
|
|
310
322
|
ty-context long-task approve-authority-revision <workdir> --revision <sha>
|
|
311
323
|
ty-context long-task explain <workdir>
|
|
312
|
-
ty-context long-task verify <workdir> [--outcome <key>] [--check <key>]
|
|
324
|
+
ty-context long-task verify <workdir> [--outcome <key>] [--check <key>] [--explain]
|
|
313
325
|
ty-context long-task status <workdir>
|
|
314
326
|
ty-context long-task resume <workdir>
|
|
315
327
|
ty-context long-task doctor <workdir>
|
|
@@ -320,12 +332,12 @@ ty-context long-task abandon <workdir> [--force-corrupt-state]
|
|
|
320
332
|
```
|
|
321
333
|
|
|
322
334
|
- `init` creates one Compact inline-Outcome Contract template.
|
|
323
|
-
- `preflight` applies Compact defaults and reports all discoverable Source/REQ/CTRL/OBL/AC, Stage closure, required-target/root/runner, scenario/journey, capability, external-impact, Product Conformance, Context, risk, path/binding, runner/input and
|
|
324
|
-
- `compile` generates Global plus Outcome Result/Requirement/Control-field/Non-completing/Technical Claims, rejects uncovered Claims, preserves an immutable first baseline and makes the first successful formal Compile the Authority Lock. 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
|
|
325
|
-
- `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
|
|
326
|
-
- `compile --revise` auto-adopts
|
|
327
|
-
- `verify` writes scoped per-Check Progress Records only after rechecking active task/revision/compiled/worktree identity. A concurrent revision returns `active_authority_changed_during_verify` and writes no stale progress.
|
|
328
|
-
- `status` reports each Outcome as `unverified`, `progress_passing`, `progress_failing`, `progress_stale` or `blocked_external`. It derives `stages`, `ready_stages` and the stage-constrained Outcome frontier from current Progress without persisting Stage completion. It 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
|
|
335
|
+
- `preflight` applies Compact defaults and reports all discoverable Source/REQ/CTRL/OBL/AC, Stage closure, required-target/root/runner, scenario/journey, capability, external-impact, Product Conformance, Context, risk, path/binding, runner/input, 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.
|
|
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 Claims, 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
|
+
- `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
|
+
- `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
|
+
- `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 the stage-constrained Outcome frontier from current Progress without persisting Stage completion. It 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.
|
|
329
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 the next safe action from the common-dir authority snapshot.
|
|
330
342
|
- `final-gate` requires a clean candidate commit, recompiles source authority, reruns every required Check on one Git-tree snapshot and rechecks active identity 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.
|
|
331
343
|
- `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.
|
|
@@ -519,11 +531,11 @@ node packages/ty-context/dist/cli.js package check-source
|
|
|
519
531
|
make validate-harness
|
|
520
532
|
```
|
|
521
533
|
|
|
522
|
-
`test:affected` is the edit/fix loop. `test:long-task:trust` is the frozen-candidate high-impact boundary gate used by pull-request CI. `npm test` is the complete release regression retained on `main` and publish; do not rerun it after every small repair. Explicit delivery-contract and complete Long-Task gates remain available as package workspace scripts.
|
|
534
|
+
`test:affected` is the edit/fix loop. In inferred local discovery it reports and omits only untracked `.work_products/**`; tracked and explicit paths still route fail safe. `test:long-task:trust` is the frozen-candidate high-impact boundary gate used by pull-request CI. Reviewed Trust/focused/hotspot budgets prevent silent feedback-tier growth, while complete discovery remains exhaustive. `npm test` is the complete release regression retained on `main` and publish; do not rerun it after every small repair. Controlled Ubuntu CI uses generous per-suite catastrophic time ceilings, but local timing stays diagnostic. Explicit delivery-contract and complete Long-Task gates remain available as package workspace scripts.
|
|
523
535
|
|
|
524
536
|
The modularity gate is `ty-context check-modularity`. Scoped waivers require `owner`, `introduced_at`, `reason`, `tracking_issue` and `expiry_condition`.
|
|
525
537
|
|
|
526
|
-
`npm run preview:pack` produces a local preview named `project-tiny-context-harness-0.
|
|
538
|
+
`npm run preview:pack` produces a local preview named `project-tiny-context-harness-0.8.1.tgz` under the preview output directory.
|
|
527
539
|
|
|
528
540
|
## Community And Further Reading
|
|
529
541
|
|
package/assets/README.zh-CN.md
CHANGED
|
@@ -50,8 +50,8 @@ ty-context enable long-task
|
|
|
50
50
|
|
|
51
51
|
初始输入可以是一段产品意图,也可以是 Web GPT 等外部服务给出的详细初始方案。涉及独立设计资源时:
|
|
52
52
|
|
|
53
|
-
- **长程任务:** 初始方案 → 项目尚无设计系统时由用户显式调用 `/design-system-authoring` 生成、选择并采纳 → `/design-resource-authoring`
|
|
54
|
-
- **非长程任务:**
|
|
53
|
+
- **长程任务:** 初始方案 → 项目尚无设计系统时由用户显式调用 `/design-system-authoring` 生成、选择并采纳 → `/design-resource-authoring` 生成/选择资源、按需完整冻结实现级 Source、一次性回改已接受决策,并生成通过校验的残余 `design-resource-handoff-v1` → 把“修订后的初始方案 + handoff + 选定且身份稳定的设计资源”交给 `/long-task-workflow`;输入立即进入同一个原生 Goal 内的 Source-bound Contract Draft 循环。
|
|
54
|
+
- **非长程任务:** 使用同样步骤 → 把“修订后的初始方案 + 已校验 handoff + 选定设计资源”直接交给 Codex 当前原生 Goal,按默认 Workflow Contract 执行。
|
|
55
55
|
|
|
56
56
|
设计系统通常在项目冷启动时确定,但该 Skill 只由用户调用,`init`、`sync` 与下游 Skill 都不会自动执行。`/design-resource-authoring` 只对高保真、品牌化、视觉处理等 style-bearing 资源设门禁;低保真结构、IA/流程与纯语义状态研究不受此门禁。旧 Source Plan 仍可作为普通输入,但不再是推荐中间服务。
|
|
57
57
|
|
|
@@ -80,7 +80,7 @@ manifest/trigger 命中的少量 area/role Context
|
|
|
80
80
|
|
|
81
81
|
这次搜索只补充语义判断,不会把所有关键词命中都当成 Authority,也不会创建向量/持久索引、缓存、Registry、search state 或第二权威。它仍可能漏掉完全不同的同义词或间接依赖,因此每个实现需求仍要执行 Architecture Deliberation 与收尾 Conformance。
|
|
82
82
|
|
|
83
|
-
`ty-context doctor` 会报告确定性的默认 Context 文件/字节规模、单文件与总量软预算超限、字节完全相同的默认文件,以及 `DESIGN.md` 权威状态。这些只是维护提示,不是新验证 Gate
|
|
83
|
+
`ty-context doctor` 会报告确定性的默认 Context 文件/字节规模、单文件与总量软预算超限、字节完全相同的默认文件,以及 `DESIGN.md` 权威状态。这些只是维护提示,不是新验证 Gate 或运行时状态。如果真实的近乎通用恢复事实超过字节启发式预算,应保留事实并接受 warning;绝不能为了满足预算而遗漏、过度压缩或错误分类必需 Context。
|
|
84
84
|
|
|
85
85
|
Context 负责耐久的意图和边界,代码负责当前实现,测试/CI/浏览器或运行时证据/人工负责行为与产品验收。
|
|
86
86
|
|
|
@@ -121,20 +121,30 @@ Harness 只路由仓库原生 lint/AST/dependency/contract check,不实现跨
|
|
|
121
121
|
|
|
122
122
|
`context_surface_contract` 继续使用现有 `contract`、area/subdomain 和 verification 角色。`product-surface-contract.md` 负责跨页面、主层/下钻与共享职责;可选且按需读取的 `screen-contract.md` 负责单屏 entry/exit/shared state、信息层级、语义区域、导航/变体、material controls 和 target/verification 引用。它们不新增 `design`、`screen` 或 product-surface Context role,局部样式修复也不要求补建 Screen Contract。
|
|
123
123
|
|
|
124
|
-
material UI 在实现前执行 **UI Authority Closure**:每个稳定 surface/control/target key 必须归类为现有 Context 已覆盖、需要 Context 更新、task-local、显式 out-of-scope 或真正 decision-required。Surface
|
|
124
|
+
material UI 在实现前执行 **UI Authority Closure**:每个稳定 surface/control/target key 必须归类为现有 Context 已覆盖、需要 Context 更新、task-local、显式 out-of-scope 或真正 decision-required。Design Source Projection 把长期 surface/flow/Screen/Control/state 含义放入既有 Surface 或 Screen/interaction Context,把视觉系统/token/motion policy/rationale 放入 `DESIGN.md`,把精确构图/数值/条件/asset 留在 versioned target,把可重复证明路径放入 verification Context,而 delivery-local coverage/provenance/blocker 留在任务或 Contract Source。出现冲突时 fail closed;当前代码、时间戳、YAML 或实现截图不能静默胜出。
|
|
125
125
|
|
|
126
126
|
### 视觉交付指导
|
|
127
127
|
|
|
128
|
-
|
|
128
|
+
两种开发路径共享一个条件式设计目的:当存在已选 implementation handoff 时,让 Agent 的开发、验收和测试在 UI/UX 方面完整遵循选定设计资源在声明范围与条件内明确表达的全部材料性信息。它不授权从静态图推断未表达的交互,也不能证明用户没有遗漏要求。Open Design 有能力输出实现级 HTML/CSS/JS、spec、token 与 asset,但“有能力”不等于每次都产出:选定 Web/App 实现 handoff 时,`/design-resource-authoring` 必须显式委托并完整取得一个机器可读 canonical entry 及其精确 dependency closure,逐文件冻结 digest,并暴露稳定的 typed locator;进入 `ready` 前,还要在这些不可变字节上逐项执行声明的 verification method,无法消除的 code/spec/token/asset 冲突保持未决/不可用并阻塞。这是源资源 QA,不是生产验收。PNG 只能作为派生视觉基线,不能成为唯一实现源。
|
|
129
129
|
|
|
130
|
-
|
|
130
|
+
provider-neutral handoff 是残余语义与索引层,不是 CSS 的文本副本。它逐一闭合每个适用的 subject × selected target × declared condition × UI/UX dimension 单元格,覆盖 surface/flow、visual/content、component/control、state/interaction、motion、adaptation/input、accessibility、assets 八个维度,并记录明确排除/不适用/未决含义、Source Item、verification method 与 blocker。preflight 会把每个 typed HTML/Markdown/JSON/CSS locator 对着其声明的不可变资源真实解析,校验 source/dependency closure,并拒绝不可解析或 media 不兼容的证据;探索候选仍不需要 schema。
|
|
131
131
|
|
|
132
|
-
|
|
132
|
+
这些输入仍是普通 Source。默认 Workflow 对 covered Source Items、declared verification methods、blockers、targets 和 conditions 保持精确但 task-local 的 accounting;每一项都必须到达生产 owner、冷启动旅程和已经执行的 final-candidate check,并能在失败时明确归因。任何 unresolved、unmapped、unexecuted、stale 或无法区分的项都会阻止“完整遵循”声明并作为 gap 报告。Long-Task 把同一组含义投影进已有 Claims、method Assertions、`surface_bindings`、typed evidence 和 Final Gate。两种证明载体互斥:active Long-Task 不再执行默认 closure。生成成功、截图、hash 与 preflight 只证明输入完整性或资源完整性。
|
|
133
133
|
|
|
134
|
-
|
|
134
|
+
默认 Workflow 会在 material 产品、设计、实现或验收判断前执行 UI Authority Closure 和条件式 Design Authority Check。它沿稳定 key 到 exactly-one canonical adoption record,再主动打开每个受影响的 selected `exact-target`/`constraint`;只看到 registry 或 handoff index 不算已消费。项目/系统/component-family target 由 `DESIGN.md` canonical 记录,单 screen/interaction target 由 owning Screen Contract 记录;该 record 独占 interpretation、selection basis、immutable locator/digest、condition coverage 和 editable upstream/update route,其他层只保留 stable key、owner/anchor 和 local applicability。缺失、不可读、过期或冲突时 fail closed;更新必须产生新 immutable version,不能覆盖旧基线。未配置 starter、候选稿、只有风格文字或灵感图都不能授权 agent 发明生产布局。明确的设计系统采纳请求路由到 `/design-system-authoring`,独立资源生成请求路由到 `/design-resource-authoring`;已有充分权威的普通实现、局部样式修复和 throwaway prototype 仍保持轻量。
|
|
135
|
+
|
|
136
|
+
只要是已经选定、准备进入实现的设计资源,两种开发路径都会先运行 `ty-context design-resource preflight <handoff.md>`。取得不完整、缺少或多出未声明依赖、不安全路径、过期 digest、虚构 locator、未闭合的适用单元格、不成立的证据类型或未决语义都会 fail closed。preflight 只证明设计输入语义完整且资源身份正确;开发流程仍必须打开真实资源,并从生产入口证明当前实现。
|
|
137
|
+
|
|
138
|
+
对 material 工作,`context_uiux_design` 应用上面的投影规则并让风险比例化 coverage reasoning 保持 task-local。`context_development_engineer` 用稳定 surface/control key 把每个选定 target/condition 及 handoff 精确集合追踪到生产 route/component owner、冷启动真实用户旅程及可独立归因的渲染/交互检查,并在首个可运行纵向切片完成时先从真实入口检查,再扩展其余 UI。只报告真正检查过的组合;资源哈希、manifest 和数量只证明资源完整性,实现截图既不能成为自己的目标,也不能单独证明实现一致性。
|
|
139
|
+
|
|
140
|
+
显式 Long-Task 是同一共享义务的强机器载体。它在 Compile 前解决缺失/冲突的 UI 权威,并把每个 applicable Control 的 surface、region/location、type/label、user task、visibility/availability、trigger/input/validation/default、interaction/navigation、loading/empty/success/failure/recovery/permission/feedback/accessibility 完整投影为独立 Source-backed Control Claim 和受保护产品语义;空字段不生成 Claim。聚合的 Product `surface_bindings` 把每个 Control 连接到 owner surface、required product target、既有 Technical route/component Bindings 和 root-entry 成功旅程。选定 exact/constraint target 用 typed `design_conformance` 把冻结输入和声明条件绑定到当前 actual/comparison artifacts;`verification_method_bindings` 让每个 handoff method 都能独立失败,每个已声明 blocker 则保留精确 Source-item/method lineage,并落到目标本地机器证明或会阻断目标的 External Confirmation。它们不能在 Contract 内自行豁免,缩减范围必须修订 Source/Contract 权威。现有 Claim、Assertion、Check、Stage、Binding、revision 与 Final Gate 是唯一 Long-Task 生命周期和 closure。
|
|
141
|
+
|
|
142
|
+
combined design-and-implementation 可以先用普通 Outcome/Stage 生成候选,但 candidate/planned target 不能解锁 fidelity implementation;选定结果必须先成为真实 marked Context-reachable Source,并由 owning Context/`DESIGN.md` reference 连接,Authority Lock 后再通过 Authority Revision 采用。浏览器视觉 AC 使用 `ui_browser`;浏览器代理、独立 route 或深链接不能证明可独立失败的原生/root 旅程。资源完整性和 `visual_render` 不能替代选定目标的实现一致性。冻结 baseline 是 verifier input,生成的 actual render/diff 是当前 artifact,主观批准保持外部。这不新增 `uiux_delivery`、视觉 Claim type、resource registry、risk level、lifecycle state、Gate、必需设计目录、逐控件截图矩阵或通用像素阈值。
|
|
135
143
|
|
|
136
144
|
`ty-context doctor` 保留兼容的项目级 `missing | unconfigured | configured` 状态,并增加 Design Authority Index、token source 和已分类 reference 的 advisory 信号。它明确不推断页面实现就绪;material surface 仍需 owning Screen/Control meaning、selected target/constraints 与项目自己的验证路径。
|
|
137
145
|
|
|
146
|
+
静态 guidance 测试只能证明分发、投影与 canonical ownership 文案存在,不能证明 Agent 实际恢复了全部 UI/UX 信息。可选 delivery-mechanism benchmark 提供固定 fresh-agent UI/UX Context/target recovery task、routing gold 和隐藏 production oracle;只有独立配对运行才可以支持 effectiveness/ROI 结论。
|
|
147
|
+
|
|
138
148
|
### 显式 Design System Authoring
|
|
139
149
|
|
|
140
150
|
只有用户明确要求初始化、生成、选择、采纳、替换或修复项目设计系统/设计风格时,才使用 `/design-system-authoring`。安装只让冷启动能力可用,不会自动运行。Skill 会发现 Open Design 当前真实 MCP resource/tool;若当前版本只通过 MCP 读取设计系统而没有创建 tool,则使用同一个已安装 Open Design daemon 的官方 generation/revision/accept API,不复制 provider prompt,也不把 daemon 调用冒充 MCP。
|
|
@@ -149,17 +159,19 @@ Skill 把明确输出或开发内容当作硬 scope ceiling。局部功能只可
|
|
|
149
159
|
|
|
150
160
|
Skill 会先分类 visual-style dependency。高保真/品牌化输出、视觉方向、字体/颜色/密度、组件视觉处理和 production-style prototype 属于 style-bearing:若 `DESIGN.md` 未配置或没有唯一 authored token source/direction,Skill 必须在创建 provider project/run 前停下,并提示用户显式调用 `/design-system-authoring`,绝不自动初始化。低保真结构、IA/flow topology 和纯语义 behavior/state study 属于 non-fidelity。style-bearing 工作必须把已采纳 provider ID 传给 MCP `create_project.designSystem`,并用 `get_project.designSystemId` 验证一致。
|
|
151
161
|
|
|
152
|
-
Skill 只通过结构化 MCP(必要时有限使用 CLI/daemon/UI fallback)委托最小充分资源集。一个可定位、可检查的大页面稿、原型或组件族 workbench 可以覆盖多个事项;重复控件映射到共享变体,只有仍缺少材料性含义的独特/复杂控件才需要专门状态或交互稿。静态/default 页面不能自动代表没展示的动态状态、交互、动效、响应式或可访问性。原型、低/高保真组合、组件板、
|
|
162
|
+
Skill 只通过结构化 MCP(必要时有限使用 CLI/daemon/UI fallback)委托最小充分资源集。一个可定位、可检查的大页面稿、原型或组件族 workbench 可以覆盖多个事项;重复控件映射到共享变体,只有仍缺少材料性含义的独特/复杂控件才需要专门状态或交互稿。静态/default 页面不能自动代表没展示的动态状态、交互、动效、响应式或可访问性。原型、低/高保真组合、组件板、provider-native 输入、逐控件一份稿、变体数量和目录都不是全局必选项。设计资源可以表达用户可感知的交互语义和产品规则的呈现方式,但业务、数据、权限和算法逻辑仍由产品/技术 Source 所有。Tiny Context 不复制 Open Design 的 prompt/template,也不内置 provider catalogue。
|
|
163
|
+
|
|
164
|
+
面向 Web/App 实现时,Skill 必须取得上文所述完整 canonical entry/dependency set 与可寻址事实。Figma 适合已经存在的设计团队权威,需要原生 Components/Variables/Variants、共享库、Dev Mode 或 Code Connect 的场景;Penpot 适合明确需要开放、自托管多人设计基础设施的场景;OpenPencil 可作为本地静态布局 sidecar,但当前 prototype/motion 模型仍不完整。把完整 Open Design Source 默认转换为另一种表示会增加同步和运维成本,却不会关闭新的 enforcement gap,因此三者都不是默认依赖。
|
|
153
165
|
|
|
154
|
-
|
|
166
|
+
探索模式只做最小完整性检查并尽快展示指定候选,不需要 handoff schema。明确或受托最终选择且资源将进入实现时,Skill 只做一次合并、幂等的初始方案回改,并在任意获准的项目路径写一个 provider-neutral、带 Source marker、且只含一个严格残余 `design-resource-handoff-v1` block 的 Markdown。它记录 implementation source profile、typed locator、适用 subject/target/condition coverage、残余产品含义、Source-item/verification-method binding 和 acceptance blocker;随后运行共享 preflight,不能把取得不完整、不可寻址、`decision_required`、`unavailable`、证据不成立或过期输入称为 ready。这里没有固定目录、provider pack 或逐控件一份稿;适配器只是普通 Source,不是 Design Authority 或验收结果。Skill 不会修改 Source Plan、`project_context/**`、`DESIGN.md`、生产代码或 Delivery Contract。
|
|
155
167
|
|
|
156
|
-
实际生成仍由已配置的 Open Design/Product Design、Figma、图片生成、原型工具或人工设计流程负责。这些输出以普通 external Source 进入默认 Workflow 或 Long-Task。candidate 与 inspiration 不授权 fidelity;
|
|
168
|
+
实际生成仍由已配置的 Open Design/Product Design、Figma、图片生成、原型工具或人工设计流程负责。这些输出以普通 external Source 进入默认 Workflow 或 Long-Task。candidate 与 inspiration 不授权 fidelity;adopted exact target/constraint 作为 Context-reachable Source,由 owning Context/`DESIGN.md` 把稳定 key 连接到覆盖条件、不可变身份/digest 和 editable upstream owner/locator/update route。`context_uiux_design` 在下游执行 UI Authority Closure,只把耐久事实采纳到 Context/`DESIGN.md`;实现截图与 diff 仍是证据 artifact,不能自我授权为目标。
|
|
157
169
|
|
|
158
170
|
维护者可以设置 `TY_CONTEXT_OPEN_DESIGN_MCP_COMMAND` 与可选 `TY_CONTEXT_OPEN_DESIGN_MCP_ARGS_JSON`,运行 `npm run smoke:open-design` 做显式启用、只读的 discovery smoke。正常测试使用本地 mock MCP,不依赖 Open Design、登录、付费能力或不确定的设计输出。
|
|
159
171
|
|
|
160
172
|
### 退役 Source Plan 兼容入口
|
|
161
173
|
|
|
162
|
-
`/source-plan-authoring` 仅作为 long-task profile 的兼容指引保留。`/long-task-workflow`
|
|
174
|
+
`/source-plan-authoring` 仅作为 long-task profile 的兼容指引保留。`/long-task-workflow` 从入口立即打开非权威 Contract Draft,并让完整 input inventory、混合输入综合/细化、稳定 Key、控件级语义、偏好/调研/委托溯源、Source marker/provenance、acceptance/risk 与 Contract 映射在同一循环中收敛。已有 Source Plan 仍是有效普通 Source,但不再创建独立或内部 Source-authoring 阶段、handoff、Schema、Gate、State 或第二份计划。
|
|
163
175
|
|
|
164
176
|
## Single-Goal Rolling Delivery
|
|
165
177
|
|
|
@@ -172,13 +184,13 @@ Skill 只通过结构化 MCP(必要时有限使用 CLI/daemon/UI fallback)
|
|
|
172
184
|
- 第一次 Authority Lock 后、正式实现前有一次用户模型选择;
|
|
173
185
|
- 当前 Goal 内部滚动展开实现 Frontier;
|
|
174
186
|
- targeted verify 只用于修复,永远不能 accepted;
|
|
175
|
-
- scope-only revision
|
|
187
|
+
- scope-only revision 可先做无状态候选诊断,机械边界内的修复自动采用;只有稳定且确需用户决策的候选才至多询问一次精确 identity;
|
|
176
188
|
- Final Gate 在一个当前快照上重跑全部 Check;
|
|
177
189
|
- Stop Hook 在结果 stale 时阻止完成。
|
|
178
190
|
|
|
179
|
-
|
|
191
|
+
原始/修订方案、选定设计资源和混合附件会立即进入一个 Source-bound Contract Draft 循环;完整 input inventory、稳定 Key、控件级含义、acceptance/risk、direct/derived/delegated/evidence-backed 溯源、Source marker 与 Contract 映射一起收敛。若未知偏好会实质改变调研或选型,Preflight/Compile 成功前必须先询问;标准明确后,有依据的推荐才写入真实 Source,不能只藏在 YAML。方案委托不授权真实高危外部动作;输入冲突、用户保留、偏好缺失或无可靠推荐仍为 `decision_required`。旧 Source Plan 结构不构成阻塞,但激活前必须完成 Material Source Item 标记。
|
|
180
192
|
|
|
181
|
-
第一次正式 Compile 成功前,`delivery-contract.yaml` 是同一份非权威 Contract Draft。`/long-task-workflow`
|
|
193
|
+
第一次正式 Compile 成功前,`delivery-contract.yaml` 是同一份非权威 Contract Draft。`/long-task-workflow` 从入口开始,跨 Source 细化、仓库/Context 读取、映射和 Preflight 修复持续修改它,不要求一次响应生成完整 Contract。Source 完备性是 Preflight/Compile 的收敛条件,不是前置阶段。不存在单独 Contract Draft Skill、Draft Receipt 或 Authoring State。
|
|
182
194
|
|
|
183
195
|
第一次成功 Compile 创建 Authority Lock,并返回:
|
|
184
196
|
|
|
@@ -187,22 +199,25 @@ Long-Task 会先在同一流程内把原始/修订方案、选定设计资源和
|
|
|
187
199
|
"execution_model_checkpoint": {
|
|
188
200
|
"required": true,
|
|
189
201
|
"phase": "post_authority_lock_pre_implementation",
|
|
190
|
-
"options": ["continue_current_model", "switch_model_then_resume"]
|
|
202
|
+
"options": ["continue_current_model", "switch_model_then_resume"],
|
|
203
|
+
"turn_boundary": "end_current_turn",
|
|
204
|
+
"explicit_task_specific_choice_required": true,
|
|
205
|
+
"generic_continue_satisfies": false
|
|
191
206
|
}
|
|
192
207
|
}
|
|
193
208
|
```
|
|
194
209
|
|
|
195
|
-
Agent
|
|
210
|
+
这是严格的终止当前回合边界。除非用户此前已明确给出本任务的“当前模型继续”或“切换后恢复”策略,Agent 在该结果后不得继续产品实现、文件编辑、构建或测试,必须结束当前回合并询问选择。“继续”“恢复”“完成”“继续 Goal”等泛化表达不能满足卡点。后续 `compile --revise` 返回 `required: false`,不会重复暂停。Harness 不会自动切换模型,也不持久化 acknowledgement、model route 或 checkpoint state;模型选择不是验收证据。
|
|
196
211
|
|
|
197
|
-
|
|
212
|
+
锁定后的修订把“Authority 有变化”和“需要用户决策”分开:单调增强、锁定 Claims/targets/proof obligations 不变的 Source/Context snapshot 更新、Runner/input 实装修复、repo-bound scope 扩展、风险增强,以及 carrier、mutation、Check 相同且 Claim/预期失败断言覆盖不减少的等价 Counterfactual 覆盖可自动采用;产品/Source Claim/target/external-confirmation 变化,丢失 scenario/Claim/Evidence Capability/失败拦截,移除 forbidden/owner Context,runner type/effect、verifier kernel 或未知 reason 则只预览并等待精确 identity,风险降级直接拒绝。`diagnose-revision` 无副作用,撤回/替换候选只在同一 `delivery-contract.yaml` 合并,不产生询问。最终 pending brief 先解释 Authority Revision 是什么,再区分 `user_decision_reasons` 与机械边界变化。必须先展示 brief;若当前任务已有明确指令精确覆盖全部决策 reason,可机械转录而不二次询问,泛化“继续”、一揽子批准、建议或 Agent 推断不算。每次采用都保留 exact identity、旧 Authority 连续性、证据失效和完整 Final Gate,并返回滚动实现,绝不表示完成。
|
|
198
213
|
|
|
199
|
-
Long-Task Skill 采用渐进读取:主 `SKILL.md`
|
|
214
|
+
Long-Task Skill 采用渐进读取:主 `SKILL.md` 只保留目标、硬边界和路由;Draft 输入/Contract Authoring、Evidence Design 与 Authority Lifecycle 细节按当前活动读取一层 reference,其中 Draft 输入与 Contract mapping 同时进行。这只是指令组织,不产生第二权威。共享 Architecture Deliberation 在 Source-bound Draft authoring 中完成;material 架构不变量使用已有 obligations/constraints/forbidden shortcuts、owner/path/Binding 和项目原生 executable Checks,Final Gate 是唯一的 Long-Task Architecture Conformance 承载点。
|
|
200
215
|
|
|
201
216
|
Draft Outcome 只是 Authority Lock 前的 Outcome。Outcome 按可独立观察、判断、纵向闭环和定向验证的结果拆分,使当前 Goal 能缩小 dependency-ready 工作集、定向验证、定位失败、恢复 finding 并精确失效旧局部结果。`depends_on` 只表示 acceptance readiness。每个 Outcome 属于一个有序 Stage;Stage gate 传递依赖同 Stage 其余 Outcome,后续 Stage 依赖前置 gate。Rolling Frontier 和 Stage 状态都由普通 Outcome Progress 临时派生;Outcome 不是 Worker、scheduler task、queue 或并行单元,Stage 也没有 Receipt 或第二个 Gate。Outcome 拆分执行和诊断,不拆分完成权威,因此最终仍必须在当前最终快照运行一次完整 Final Gate。
|
|
202
217
|
|
|
203
218
|
Contract 声明一个有界 target profile、非空 required product target refs,以及每个 target 的 runtime family/root entrypoint。Web/process 代理不能代替单独要求的 Native/desktop 目标;browser 目标由 Playwright 证明,Native/desktop 目标由 project binary 证明。每个 `critical_user_path` Outcome 和 Stage gate 都必须从每个 required target 的 root 证明 `target_runtime`;多 Outcome Stage gate 还必须证明至少两个不同 surface 对应同一运行时状态。
|
|
204
219
|
|
|
205
|
-
如果一个声明结果可能在代理表面通过、却在目标运行时独立失败,最早拥有可运行边界的 Outcome 必须声明项目自有的真实运行 Check,并在当前 Check 执行中启动或触达目标、从同一会话产生结构化 Observation。仓库内状态报告、截图、二进制、日志或历史运行不能单独证明目标运行时。Check 显式声明带 Key 的 Given/When 场景与 journey role;Assertion 声明 all-of Evidence Capability,并由类型化的当前执行记录证明。静态 `presence` 不能证明行为,降级路径不能替代要求的成功路径,固定输入不能证明输入变化,产生 side effect
|
|
220
|
+
如果一个声明结果可能在代理表面通过、却在目标运行时独立失败,最早拥有可运行边界的 Outcome 必须声明项目自有的真实运行 Check,并在当前 Check 执行中启动或触达目标、从同一会话产生结构化 Observation。仓库内状态报告、截图、二进制、日志或历史运行不能单独证明目标运行时。Check 显式声明带 Key 的 Given/When 场景与 journey role;Assertion 声明 all-of Evidence Capability,并由类型化的当前执行记录证明。静态 `presence` 不能证明行为,降级路径不能替代要求的成功路径,固定输入不能证明输入变化,产生 side effect 的组件也不能自行证明其边界效果。每个 Check 的 `input_paths`/Binding 应是最小可信失效范围,每个 Counterfactual carrier 都要能从声明的 target root 解释其路径。当前 Goal 在第一个可运行切片后执行一次;后续相关修改先合并,`progress_stale` 只表示证据已旧,并在依赖该结果或进入 Final Gate 前刷新。`verify --explain` 可提前展示 Main/Counterfactual/重试次数,但不执行、不写 Progress,也不能看见 runner 内部构建。它不增加通用可达性断言、第二个执行型 diagnose 模式、调度器、逐平台 Progress 或逐编辑完整重建;运行时专属依赖探测、构建进度和进程清理由项目 runner 负责,Final Gate 仍是接受权所有者。
|
|
206
221
|
|
|
207
222
|
只有 `weak_observability` 同时遇到多 Stage 或多个 required product runtime family 时,才额外要求一个只读 Global Product Conformance Check。它从 required root product target 启动,使用独立 Raw Execution,并在既有 Final Gate 内运行。单 Stage、单 family 继续使用原有 same-Check sensitivity,不支付额外 conformance 执行成本。
|
|
208
223
|
|
|
@@ -218,7 +233,7 @@ ty-context long-task compile <workdir> --revise
|
|
|
218
233
|
ty-context long-task diagnose-revision <workdir> [--outcome <key>] [--check <key>]
|
|
219
234
|
ty-context long-task approve-authority-revision <workdir> --revision <sha>
|
|
220
235
|
ty-context long-task explain <workdir>
|
|
221
|
-
ty-context long-task verify <workdir> [--outcome <key>] [--check <key>]
|
|
236
|
+
ty-context long-task verify <workdir> [--outcome <key>] [--check <key>] [--explain]
|
|
222
237
|
ty-context long-task status <workdir>
|
|
223
238
|
ty-context long-task resume <workdir>
|
|
224
239
|
ty-context long-task doctor <workdir>
|
|
@@ -229,12 +244,12 @@ ty-context long-task abandon <workdir> [--force-corrupt-state]
|
|
|
229
244
|
```
|
|
230
245
|
|
|
231
246
|
- `init` 创建单文件 inline Outcome 的 Compact Contract 模板。
|
|
232
|
-
- `preflight` 应用 Compact 默认值并一次输出 Source/REQ/CTRL/OBL/AC、Stage closure、required-target/root/runner、scenario/journey、capability、external impact、Product Conformance、Context、风险、路径/Binding、Runner/Input 与
|
|
233
|
-
- `compile`
|
|
247
|
+
- `preflight` 应用 Compact 默认值并一次输出 Source/REQ/CTRL/OBL/AC、Stage closure、required-target/root/runner、scenario/journey、capability、external impact、Product Conformance、Context、风险、路径/Binding、Runner/Input、Proof 与 workspace-scope 诊断。首次 Authority Lock 前,它把每个 HEAD-relative 当前变化路径分类为 protected、expected change、allowed support、forbidden 或 unclassified;后两类中的 forbidden/unclassified 都阻塞。它完全只读,不创建 Authority Lock、marker、cache、progress、Receipt、pending revision、状态锁,也不运行项目 Check。
|
|
248
|
+
- `compile` 重复同一 fail-closed workspace 分类,因此直接 Compile 不能绕过 Preflight,再生成 Global 与 Outcome Result/Requirement/Control-field/Non-completing/Technical Claim,拒绝未覆盖 Claim,并让第一次正式成功 Compile 成为 Authority Lock。首次 enable 仅保护配置的 managed destination 中当前 package asset tree 实际存在的精确文件,以及精确的 config/hook 文件;managed 目录根和宽泛 `.codex/**` 均不豁免。每次结果都包含 lifecycle event、`delivery_completed_by_this_event: false`、`native_goal_effect: none` 和 next action。第一次结果附带 `execution_model_checkpoint.required: true` 及 terminal-turn/explicit-choice 契约,后续 Compile 返回 `false`;这些字段不进入 Authority state。
|
|
234
249
|
- `diagnose-revision` 只做无副作用候选 Compile;仅 scope-only 候选能运行 Active Authority 已有且未更换的 Check,输出固定为非验收、非 Progress、非 pending。
|
|
235
|
-
- `compile --revise`
|
|
236
|
-
- `verify` 在重查 active task/revision/compiled/worktree identity
|
|
237
|
-
- `status` 输出 `unverified`、`progress_passing`、`progress_failing`、`progress_stale` 或 `blocked_external`,由当前 Progress 派生 `stages`、`ready_stages` 和受 Stage 约束的 Outcome frontier,不持久化 Stage 完成。它同时报告 fresh `final_workflow_status`、target profile/state、完整 `external_confirmations` 与唯一的 `pending_authority_revision`。`progress_passing` 只能表述为定向修复证据,不能简称“Outcome 完成”;`progress_stale`
|
|
250
|
+
- `compile --revise` 自动采用单调或机械边界内的修订;需要用户决策时返回 `authority_revision_pending`、精确 id、确定性 material 摘要、`user_decision_reasons` 和自包含 `decision_brief`。先展示 brief;只有已明确且精确覆盖全部 reason 的当前任务指令可直接承载该 id。候选再变会生成新 id 并使旧批准失效。采用后证据失效、输出 `authority_revision_adopted` 并回到滚动执行,不表示交付完成。
|
|
251
|
+
- `verify` 在重查 active task/revision/compiled/worktree identity 并依据 immutable baseline 应用同一 workspace 分类后写 scoped Progress;targeted verify 始终只是修复证据。`verify --explain` 只读地合并 Main Raw Execution、列出适用 Counterfactual 调用与声明的重试次数上界,不执行命令、不写 Progress,也不预测耗时或 runner 内部子进程。
|
|
252
|
+
- `status` 输出 `unverified`、`progress_passing`、`progress_failing`、`progress_stale` 或 `blocked_external`,由当前 Progress 派生 `stages`、`ready_stages` 和受 Stage 约束的 Outcome frontier,不持久化 Stage 完成。它同时报告 fresh `final_workflow_status`、target profile/state、完整 `external_confirmations` 与唯一的 `pending_authority_revision`。`progress_passing` 只能表述为定向修复证据,不能简称“Outcome 完成”;`progress_stale` 是证据新鲜度事实,不是当前通过或每次编辑后立即重跑的指令;`final_workflow_status: null` 表示 Goal 尚未完成。
|
|
238
253
|
- `resume` 完全只读,恢复 task/contract identity、风险、相关 Context、Git 状态、相同的 Final/target/Stage/external/pending surface、ready Outcome、findings 和 next safe action。
|
|
239
254
|
- `final-gate` 在完整 Check 后再次验证 active identity;并发 revision 不能产生 accepted。Receipt 把每个 Stage 派生为 `passed`、`failed`、`blocked_external` 或 `blocked_dependency`,把 `target_state` 派生为 `not_accepted`、`blocked_external` 或 Contract 精确声明的 `implementation_complete`、`target_profile_usable`、`production_release_ready`。
|
|
240
255
|
- `stop-check` 与 `close` 自己运行 Live Final Gate,并只用 accepted identity 做 CAS clear。每次机器接受的 Stop 都给一个非阻塞 terminal-scope `systemMessage`;外部待确认时同时列出全部确认项。Final/Stop/close 输出 `acceptance_scope: declared_machine_authority` 与 `native_goal_effect: none`,close 另输出 `closed_scope: machine_authority`。`status: closed` 只表示机器 Authority 已清理,不表示原生 Goal 或完整外部交付完成。
|
|
@@ -305,7 +320,7 @@ node packages/ty-context/dist/cli.js package check-source
|
|
|
305
320
|
make validate-harness
|
|
306
321
|
```
|
|
307
322
|
|
|
308
|
-
`test:affected`
|
|
323
|
+
`test:affected` 用于日常修改和修复循环;本地推断只会报告并略过未跟踪的 `.work_products/**`,tracked 与显式路径仍按 fail-safe 路由。`test:long-task:trust` 是冻结候选版本后的高风险边界门,也是 PR CI 使用的层级;经审阅的 Trust/focused/hotspot 预算防止反馈层静默膨胀,但完整套件发现不设裁剪上限。`npm test` 是 `main` 和发布保留的完整发布回归,不应在每次小修复后重跑。受控 Ubuntu CI 使用有充分余量的分层灾难性耗时上限,本地耗时仍只做诊断。Delivery Contract 和完整 Long-Task 门仍可通过 package workspace scripts 显式执行。
|
|
309
324
|
|
|
310
325
|
模块化门禁是 `ty-context check-modularity`;例外必须包含 `owner`、`introduced_at`、`reason`、`tracking_issue` 和 `expiry_condition`。
|
|
311
326
|
|