project-tiny-context-harness 0.8.4 → 0.8.6
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/LICENSE +21 -21
- package/README.md +394 -363
- package/assets/README.md +570 -514
- package/assets/README.zh-CN.md +331 -300
- package/assets/agents/.gitkeep +1 -1
- package/assets/agents/AGENTS_CORE.md +45 -25
- package/assets/context_templates/architecture.md +26 -25
- package/assets/context_templates/area.md +32 -31
- package/assets/context_templates/context.toml +30 -24
- package/assets/context_templates/deployment.md +35 -35
- package/assets/context_templates/global.md +57 -57
- package/assets/context_templates/product-surface-contract.md +70 -70
- package/assets/context_templates/screen-contract.md +189 -189
- package/assets/context_templates/verification.md +31 -30
- package/assets/github/.gitkeep +1 -1
- package/assets/github/harness.yml +39 -39
- package/assets/make/.gitkeep +1 -1
- package/assets/make/ty-context.mk +48 -48
- package/assets/skills/context_development_engineer/SKILL.md +155 -122
- package/assets/skills/context_full_project_export/SKILL.md +28 -28
- package/assets/skills/context_harness_upgrade/SKILL.md +60 -60
- package/assets/skills/context_product_plan/SKILL.md +99 -79
- package/assets/skills/context_surface_contract/SKILL.md +191 -191
- package/assets/skills/context_uiux_design/SKILL.md +171 -171
- package/assets/skills/design-resource-authoring/SKILL.md +86 -84
- package/assets/skills/design-resource-authoring/references/downstream-handoff.md +138 -123
- package/assets/skills/design-resource-authoring/references/open-design-provider.md +132 -127
- package/assets/skills/design-resource-authoring/references/resource-selection.md +181 -154
- package/assets/skills/design-system-authoring/SKILL.md +57 -57
- package/assets/skills/design-system-authoring/agents/openai.yaml +6 -6
- package/assets/skills/design-system-authoring/references/authority-adoption.md +48 -48
- package/assets/skills/design-system-authoring/references/open-design-design-system-provider.md +110 -110
- package/assets/skills/long-task-workflow/SKILL.md +98 -92
- package/assets/skills/long-task-workflow/agents/openai.yaml +3 -1
- package/assets/skills/long-task-workflow/references/authority-lifecycle.md +72 -72
- package/assets/skills/long-task-workflow/references/contract-authoring.md +122 -101
- package/assets/skills/long-task-workflow/references/evidence-design.md +82 -61
- package/assets/skills/long-task-workflow/references/source-authoring.md +109 -90
- package/assets/skills/source-plan-authoring/SKILL.md +14 -14
- package/assets/tools/validate_context.py +442 -442
- package/dist/commands/long-task-authoring.js +27 -2
- package/dist/lib/context-default-footprint.js +2 -0
- package/dist/lib/context-manifest.js +6 -0
- package/dist/lib/context-templates.js +1 -1
- package/dist/lib/design-resource-fact-enums.d.ts +20 -0
- package/dist/lib/design-resource-fact-enums.js +170 -0
- package/dist/lib/design-resource-fact-locator-extractors.d.ts +8 -0
- package/dist/lib/design-resource-fact-locator-extractors.js +108 -0
- package/dist/lib/design-resource-fact-locator-resolver.d.ts +3 -0
- package/dist/lib/design-resource-fact-locator-resolver.js +112 -0
- package/dist/lib/design-resource-fact-locator-validation.d.ts +5 -0
- package/dist/lib/design-resource-fact-locator-validation.js +16 -0
- package/dist/lib/design-resource-fact-manifest-catalog.d.ts +4 -0
- package/dist/lib/design-resource-fact-manifest-catalog.js +249 -0
- package/dist/lib/design-resource-fact-manifest-model.d.ts +91 -0
- package/dist/lib/design-resource-fact-manifest-model.js +21 -0
- package/dist/lib/design-resource-fact-manifest-shape-axes.d.ts +6 -0
- package/dist/lib/design-resource-fact-manifest-shape-axes.js +159 -0
- package/dist/lib/design-resource-fact-manifest-shape-evidence.d.ts +4 -0
- package/dist/lib/design-resource-fact-manifest-shape-evidence.js +59 -0
- package/dist/lib/design-resource-fact-manifest-shape-facts.d.ts +4 -0
- package/dist/lib/design-resource-fact-manifest-shape-facts.js +109 -0
- package/dist/lib/design-resource-fact-manifest-shape-inspector.d.ts +5 -0
- package/dist/lib/design-resource-fact-manifest-shape-inspector.js +144 -0
- package/dist/lib/design-resource-fact-manifest-shape.d.ts +7 -0
- package/dist/lib/design-resource-fact-manifest-shape.js +75 -0
- package/dist/lib/design-resource-fact-manifest-types.d.ts +3 -0
- package/dist/lib/design-resource-fact-manifest-types.js +3 -0
- package/dist/lib/design-resource-fact-manifest-universe.d.ts +5 -0
- package/dist/lib/design-resource-fact-manifest-universe.js +50 -0
- package/dist/lib/design-resource-fact-manifest-validation.d.ts +3 -0
- package/dist/lib/design-resource-fact-manifest-validation.js +106 -0
- package/dist/lib/design-resource-fact-policy.d.ts +18 -0
- package/dist/lib/design-resource-fact-policy.js +72 -1
- package/dist/lib/design-resource-fact-property-methods.d.ts +3 -0
- package/dist/lib/design-resource-fact-property-methods.js +158 -0
- package/dist/lib/design-resource-fact-shape-primitives.d.ts +3 -0
- package/dist/lib/design-resource-fact-shape-primitives.js +18 -0
- package/dist/lib/design-resource-fact-types.d.ts +164 -0
- package/dist/lib/design-resource-fact-types.js +1 -0
- package/dist/lib/design-resource-fact-universe-assets.d.ts +4 -0
- package/dist/lib/design-resource-fact-universe-assets.js +71 -0
- package/dist/lib/design-resource-fact-universe-catalog.d.ts +4 -0
- package/dist/lib/design-resource-fact-universe-catalog.js +151 -0
- package/dist/lib/design-resource-fact-universe-conditions.d.ts +2 -0
- package/dist/lib/design-resource-fact-universe-conditions.js +92 -0
- package/dist/lib/design-resource-fact-universe-facts.d.ts +4 -0
- package/dist/lib/design-resource-fact-universe-facts.js +108 -0
- package/dist/lib/design-resource-fact-universe-helpers.d.ts +30 -0
- package/dist/lib/design-resource-fact-universe-helpers.js +167 -0
- package/dist/lib/design-resource-fact-universe-inspector.d.ts +7 -0
- package/dist/lib/design-resource-fact-universe-inspector.js +119 -0
- package/dist/lib/design-resource-fact-universe-proof.d.ts +4 -0
- package/dist/lib/design-resource-fact-universe-proof.js +113 -0
- package/dist/lib/design-resource-fact-universe-subjects.d.ts +5 -0
- package/dist/lib/design-resource-fact-universe-subjects.js +97 -0
- package/dist/lib/design-resource-fact-universe-variations.d.ts +2 -0
- package/dist/lib/design-resource-fact-universe-variations.js +75 -0
- package/dist/lib/design-resource-fact-value-validation.d.ts +2 -0
- package/dist/lib/design-resource-fact-value-validation.js +80 -0
- package/dist/lib/design-resource-handoff-file-primitives.js +2 -0
- package/dist/lib/design-resource-handoff-file-validation.js +13 -100
- package/dist/lib/design-resource-handoff-policy.d.ts +1 -0
- package/dist/lib/design-resource-handoff-policy.js +118 -11
- package/dist/lib/design-resource-handoff-shape-evidence.js +46 -3
- package/dist/lib/design-resource-handoff-shape-primitives.d.ts +5 -0
- package/dist/lib/design-resource-handoff-shape-primitives.js +28 -0
- package/dist/lib/design-resource-handoff-shape-structure.js +143 -22
- package/dist/lib/design-resource-handoff-shape.js +25 -0
- package/dist/lib/design-resource-handoff-types.d.ts +97 -21
- package/dist/lib/design-resource-handoff-types.js +22 -0
- package/dist/lib/design-resource-handoff-validation-coverage.d.ts +1 -1
- package/dist/lib/design-resource-handoff-validation-coverage.js +145 -118
- package/dist/lib/design-resource-handoff-validation-fact-cells.d.ts +2 -0
- package/dist/lib/design-resource-handoff-validation-fact-cells.js +60 -0
- package/dist/lib/design-resource-handoff-validation-fact-records.d.ts +2 -0
- package/dist/lib/design-resource-handoff-validation-fact-records.js +90 -0
- package/dist/lib/design-resource-handoff-validation-facts.js +10 -94
- package/dist/lib/design-resource-handoff-validation-proofs.d.ts +2 -0
- package/dist/lib/design-resource-handoff-validation-proofs.js +67 -0
- package/dist/lib/design-resource-handoff-validation-resource-closure.d.ts +3 -0
- package/dist/lib/design-resource-handoff-validation-resource-closure.js +88 -0
- package/dist/lib/design-resource-handoff-validation-structure.js +43 -14
- package/dist/lib/design-resource-handoff-validation.js +32 -0
- package/dist/lib/design-resource-handoff-web-dependency-validation.d.ts +2 -1
- package/dist/lib/design-resource-handoff-web-dependency-validation.js +67 -7
- package/dist/lib/execution-target-capabilities.d.ts +1 -1
- package/dist/lib/execution-target-capabilities.js +14 -0
- package/dist/lib/long-task-activation-validation.js +6 -2
- package/dist/lib/long-task-applicability-shape.js +3 -3
- package/dist/lib/long-task-authoring-authority-preview.js +1 -0
- package/dist/lib/long-task-authority-policy.d.ts +1 -0
- package/dist/lib/long-task-authority-policy.js +1 -0
- package/dist/lib/long-task-authority.js +13 -0
- package/dist/lib/long-task-claim-definitions.js +13 -1
- package/dist/lib/long-task-claims.js +23 -1
- package/dist/lib/long-task-contract-types.d.ts +3 -0
- package/dist/lib/long-task-delivery-compiler.js +1 -0
- package/dist/lib/long-task-delivery-parser.js +11 -1
- 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 +17 -0
- package/dist/lib/long-task-design-resource-handoff.js +62 -38
- package/dist/lib/long-task-design-target-capabilities.d.ts +14 -0
- package/dist/lib/long-task-design-target-capabilities.js +126 -0
- package/dist/lib/long-task-evidence-capability-codec.d.ts +94 -0
- package/dist/lib/long-task-evidence-capability-codec.js +395 -22
- package/dist/lib/long-task-evidence-capability-policy.js +18 -0
- package/dist/lib/long-task-evidence-capability-runtime.js +78 -0
- package/dist/lib/long-task-evidence-capability-types.d.ts +114 -1
- package/dist/lib/long-task-outcome-parser.js +4 -0
- package/dist/lib/long-task-playwright-capability-records.d.ts +5 -0
- package/dist/lib/long-task-playwright-capability-records.js +146 -0
- package/dist/lib/long-task-playwright-case-evidence.d.ts +3 -2
- package/dist/lib/long-task-playwright-case-evidence.js +10 -79
- package/dist/lib/long-task-playwright-case-primitives.d.ts +28 -0
- package/dist/lib/long-task-playwright-case-primitives.js +143 -0
- package/dist/lib/long-task-playwright-evidence.d.ts +1 -1
- package/dist/lib/long-task-playwright-evidence.js +10 -75
- package/dist/lib/long-task-runner-freeze.d.ts +2 -2
- package/dist/lib/long-task-runner-freeze.js +15 -1
- package/dist/lib/long-task-runtime-types.d.ts +4 -1
- package/dist/lib/long-task-semantic-contract-types.d.ts +1 -1
- package/dist/lib/long-task-semantic-drift-migration.js +2 -2
- package/dist/lib/long-task-semantic-fact-binding-types.d.ts +57 -0
- package/dist/lib/long-task-semantic-fact-binding-types.js +1 -0
- package/dist/lib/long-task-semantic-fact-closure-primitives.d.ts +5 -0
- package/dist/lib/long-task-semantic-fact-closure-primitives.js +43 -0
- package/dist/lib/long-task-semantic-fact-closure.d.ts +13 -0
- package/dist/lib/long-task-semantic-fact-closure.js +48 -0
- package/dist/lib/long-task-semantic-fact-contract-closure.d.ts +4 -0
- package/dist/lib/long-task-semantic-fact-contract-closure.js +24 -0
- package/dist/lib/long-task-semantic-fact-contract-facts.d.ts +4 -0
- package/dist/lib/long-task-semantic-fact-contract-facts.js +30 -0
- package/dist/lib/long-task-semantic-fact-contract-proofs.d.ts +4 -0
- package/dist/lib/long-task-semantic-fact-contract-proofs.js +97 -0
- package/dist/lib/long-task-semantic-fact-evidence.d.ts +21 -0
- package/dist/lib/long-task-semantic-fact-evidence.js +165 -0
- package/dist/lib/long-task-semantic-fact-input-closure.d.ts +4 -0
- package/dist/lib/long-task-semantic-fact-input-closure.js +101 -0
- package/dist/lib/long-task-semantic-fact-provenance-closure.d.ts +4 -0
- package/dist/lib/long-task-semantic-fact-provenance-closure.js +140 -0
- package/dist/lib/long-task-semantic-fact-shape.d.ts +3 -0
- package/dist/lib/long-task-semantic-fact-shape.js +89 -0
- package/dist/lib/long-task-semantic-fact-value-closure.d.ts +3 -0
- package/dist/lib/long-task-semantic-fact-value-closure.js +110 -0
- package/dist/lib/long-task-shape-primitives.d.ts +2 -1
- package/dist/lib/long-task-shape-primitives.js +7 -0
- package/dist/lib/long-task-source-item-parser.js +25 -6
- package/dist/lib/long-task-source-target-continuity.js +4 -1
- package/dist/lib/long-task-source-target-index.d.ts +1 -1
- package/dist/lib/long-task-source-target-index.js +5 -1
- package/dist/lib/long-task-ui-design-policy.js +8 -4
- package/dist/lib/long-task-ui-surface-shape.js +83 -1
- package/dist/lib/long-task-ui-surface-types.d.ts +29 -0
- package/dist/lib/modularity.js +7 -1
- package/dist/lib/semantic-fact-base-types.d.ts +14 -0
- package/dist/lib/semantic-fact-base-types.js +1 -0
- package/dist/lib/semantic-fact-catalog.d.ts +8 -0
- package/dist/lib/semantic-fact-catalog.js +191 -0
- package/dist/lib/semantic-fact-condition-shape.d.ts +48 -0
- package/dist/lib/semantic-fact-condition-shape.js +111 -0
- package/dist/lib/semantic-fact-input-shape.d.ts +34 -0
- package/dist/lib/semantic-fact-input-shape.js +111 -0
- package/dist/lib/semantic-fact-inventory-types.d.ts +147 -0
- package/dist/lib/semantic-fact-inventory-types.js +1 -0
- package/dist/lib/semantic-fact-manifest-shape.d.ts +4 -0
- package/dist/lib/semantic-fact-manifest-shape.js +135 -0
- package/dist/lib/semantic-fact-manifest-types.d.ts +58 -0
- package/dist/lib/semantic-fact-manifest-types.js +19 -0
- package/dist/lib/semantic-fact-policy-authority.d.ts +8 -0
- package/dist/lib/semantic-fact-policy-authority.js +79 -0
- package/dist/lib/semantic-fact-policy-census.d.ts +2 -0
- package/dist/lib/semantic-fact-policy-census.js +80 -0
- package/dist/lib/semantic-fact-policy-condition-references.d.ts +7 -0
- package/dist/lib/semantic-fact-policy-condition-references.js +19 -0
- package/dist/lib/semantic-fact-policy-conditions.d.ts +2 -0
- package/dist/lib/semantic-fact-policy-conditions.js +105 -0
- package/dist/lib/semantic-fact-policy-facts.d.ts +3 -0
- package/dist/lib/semantic-fact-policy-facts.js +73 -0
- package/dist/lib/semantic-fact-policy-primitives.d.ts +26 -0
- package/dist/lib/semantic-fact-policy-primitives.js +169 -0
- package/dist/lib/semantic-fact-policy-proofs.d.ts +2 -0
- package/dist/lib/semantic-fact-policy-proofs.js +75 -0
- package/dist/lib/semantic-fact-policy-properties.d.ts +3 -0
- package/dist/lib/semantic-fact-policy-properties.js +84 -0
- package/dist/lib/semantic-fact-policy-units.d.ts +4 -0
- package/dist/lib/semantic-fact-policy-units.js +103 -0
- package/dist/lib/semantic-fact-policy.d.ts +17 -0
- package/dist/lib/semantic-fact-policy.js +41 -0
- package/dist/lib/semantic-fact-proof-shape.d.ts +51 -0
- package/dist/lib/semantic-fact-proof-shape.js +121 -0
- package/dist/lib/semantic-fact-proof-types.d.ts +74 -0
- package/dist/lib/semantic-fact-proof-types.js +1 -0
- package/dist/lib/semantic-fact-property-shape.d.ts +29 -0
- package/dist/lib/semantic-fact-property-shape.js +77 -0
- package/dist/lib/semantic-fact-shape-constants.d.ts +3 -0
- package/dist/lib/semantic-fact-shape-constants.js +38 -0
- package/dist/lib/semantic-fact-shape-primitives.d.ts +15 -0
- package/dist/lib/semantic-fact-shape-primitives.js +68 -0
- package/dist/lib/semantic-fact-source-parser.d.ts +9 -0
- package/dist/lib/semantic-fact-source-parser.js +46 -0
- package/dist/lib/semantic-fact-support-shape.d.ts +21 -0
- package/dist/lib/semantic-fact-support-shape.js +59 -0
- package/dist/lib/semantic-fact-types.d.ts +5 -0
- package/dist/lib/semantic-fact-types.js +5 -0
- package/dist/lib/semantic-fact-unit-shape.d.ts +34 -0
- package/dist/lib/semantic-fact-unit-shape.js +89 -0
- package/dist/lib/semantic-fact-value-shape.d.ts +12 -0
- package/dist/lib/semantic-fact-value-shape.js +39 -0
- package/dist/schemas/long-task-delivery-v2/long-task-delivery-v2.schema.json +1339 -131
- package/migrations/README.md +15 -15
- package/package.json +84 -84
- package/source-mappings.yaml +25 -25
package/assets/skills/design-system-authoring/references/open-design-design-system-provider.md
CHANGED
|
@@ -1,110 +1,110 @@
|
|
|
1
|
-
# Open Design Design-System Provider
|
|
2
|
-
|
|
3
|
-
Use Open Design's live structured surface. Do not assume the installed version matches this compatibility note; discover first and branch on actual tool/resource schemas.
|
|
4
|
-
|
|
5
|
-
## Capability order
|
|
6
|
-
|
|
7
|
-
1. Open Design MCP resources/tools.
|
|
8
|
-
2. The same installed Open Design daemon's structured HTTP API when MCP lacks the required design-system lifecycle operation.
|
|
9
|
-
3. Open Design UI/CLI only for bootstrap, preview inspection or a capability unavailable through structured paths.
|
|
10
|
-
|
|
11
|
-
Never call a copied prompt or local imitation a provider result. Persistent MCP registration, plugin/auth changes and new disclosure paths require separate authorization.
|
|
12
|
-
|
|
13
|
-
## Current verified MCP contract
|
|
14
|
-
|
|
15
|
-
Open Design 0.15.1 exposed MCP server 0.2.0 using protocol `2025-06-18`. A live read-only smoke observed 152 concrete design-system resources through `resources/list`; `resources/read` returned their Markdown bodies. The URI families are:
|
|
16
|
-
|
|
17
|
-
- `od://design-systems/<id>/DESIGN.md` for current design-system bodies;
|
|
18
|
-
- `od://skills/<id>/SKILL.md` for functional skills;
|
|
19
|
-
- `od://focus/active` for current focus.
|
|
20
|
-
|
|
21
|
-
This version returns `-32601` for `resources/templates/list`. Treat template enumeration as optional protocol capability: use concrete `resources/list` results when present and never reject a readable design-system catalogue merely because the template-list method is absent.
|
|
22
|
-
|
|
23
|
-
Its 18 observed tools included `list_projects`, `get_project`, `create_project`, `start_run`, `get_run`, file/artifact operations and capability discovery. `create_project` accepts optional `designSystem`; verify the result through `get_project.designSystemId`. This version exposes design systems as resources but no create/update design-system MCP tool.
|
|
24
|
-
|
|
25
|
-
Feature-detect future structured methods before using the fallback. A tool name alone is insufficient: inspect its input schema and result.
|
|
26
|
-
|
|
27
|
-
## Generation fallback for Open Design 0.15.1
|
|
28
|
-
|
|
29
|
-
When MCP cannot create a design system, discover the running daemon and use its official API. Prefer install metadata supplied by Open Design rather than hardcoded paths. Confirm `/api/health` and the version first.
|
|
30
|
-
|
|
31
|
-
Start generation:
|
|
32
|
-
|
|
33
|
-
```http
|
|
34
|
-
POST /api/design-systems/generation-jobs
|
|
35
|
-
Content-Type: application/json
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
The body is the provider's current design-system input. Supported 0.15.1 fields observed in the installed provider include:
|
|
39
|
-
|
|
40
|
-
```json
|
|
41
|
-
{
|
|
42
|
-
"title": "Product design system",
|
|
43
|
-
"category": "Custom",
|
|
44
|
-
"surface": "web",
|
|
45
|
-
"summary": "Product and brand intent",
|
|
46
|
-
"sourceNotes": "Bounded design brief",
|
|
47
|
-
"provenance": {
|
|
48
|
-
"companyBlurb": "Product context",
|
|
49
|
-
"sourceUrls": [],
|
|
50
|
-
"githubUrls": [],
|
|
51
|
-
"localCodeFiles": [],
|
|
52
|
-
"figFiles": [],
|
|
53
|
-
"assetFiles": [],
|
|
54
|
-
"notes": "Selection constraints"
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Send only relevant, user-authorized sources. Do not transmit secrets or unrelated repository content. `surface` is provider-defined; validate the live accepted value. A supplied `body` creates a direct draft and must not be misrepresented as model generation.
|
|
60
|
-
|
|
61
|
-
Poll `GET /api/design-systems/generation-jobs/<jobId>` at a bounded cadence until a terminal state. Preserve the job ID, step diagnostics and returned `designSystemId`. The observed pipeline explores resources, creates a draft, generates `DESIGN.md`/README/SKILL/tokens/previews/context files, registers files and prepares review.
|
|
62
|
-
|
|
63
|
-
## Review and revision
|
|
64
|
-
|
|
65
|
-
Read the system and inspect its assets through:
|
|
66
|
-
|
|
67
|
-
- `GET /api/design-systems/<id>`;
|
|
68
|
-
- `GET /api/design-systems/<id>/files` and `/file?path=<path>`;
|
|
69
|
-
- `GET /api/design-systems/<id>/preview` or `/showcase`;
|
|
70
|
-
- `POST /api/design-systems/<id>/workspace` when an editable review project is required.
|
|
71
|
-
|
|
72
|
-
Create scoped feedback with:
|
|
73
|
-
|
|
74
|
-
```http
|
|
75
|
-
POST /api/design-systems/<id>/revision-jobs
|
|
76
|
-
Content-Type: application/json
|
|
77
|
-
|
|
78
|
-
{"feedback":"...","sectionTitle":"optional section"}
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Poll the returned job through the generation-job endpoint. A succeeded revision job creates a pending revision; it does not alter project authority and must not be called accepted. Inspect revisions with `GET /api/design-systems/<id>/revisions`. After explicit selection, set exactly that revision to accepted:
|
|
82
|
-
|
|
83
|
-
```http
|
|
84
|
-
PATCH /api/design-systems/<id>/revisions/<revisionId>
|
|
85
|
-
Content-Type: application/json
|
|
86
|
-
|
|
87
|
-
{"status":"accepted"}
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
Reject explicitly discarded revisions when useful. Accepting a provider revision updates the provider copy only; the authority-adoption step still owns the project writeback.
|
|
91
|
-
|
|
92
|
-
The provider also exposes `POST /api/design-systems/<id>/token-contract/rebuild-jobs`. Use it only when the live token-quality decision says a rebuild is available or the user explicitly requests a forced rebuild. A generated token contract still needs selection and project adoption.
|
|
93
|
-
|
|
94
|
-
## Provider binding for downstream resources
|
|
95
|
-
|
|
96
|
-
For a new Open Design resource project, call MCP `create_project` with the adopted provider ID in `designSystem`. Immediately call `get_project` and require `designSystemId` to match.
|
|
97
|
-
|
|
98
|
-
For an existing project, inspect `get_project` first. When it is missing or mismatched, prefer a new bounded project with the correct binding if MCP offers no safe update. Use a live structured provider update only after feature-detecting it and preserving project identity. Never proceed with a style-bearing run while silently bound to another system.
|
|
99
|
-
|
|
100
|
-
## Failure semantics
|
|
101
|
-
|
|
102
|
-
Keep these states separate:
|
|
103
|
-
|
|
104
|
-
- daemon/MCP execution: queued, running, succeeded, failed, cancelled or unknown;
|
|
105
|
-
- candidate artifacts: missing, partial, retrievable, rendered or corrupt;
|
|
106
|
-
- selection: unreviewed, selected, rejected or decision-required;
|
|
107
|
-
- project adoption: unchanged, partially adopted, adopted or inconsistent;
|
|
108
|
-
- provider binding: unverified, matched or mismatched.
|
|
109
|
-
|
|
110
|
-
Preserve exact errors and stop bounded polling. Do not mark a candidate selected because generation succeeded, and do not mark project authority adopted because a provider revision was accepted.
|
|
1
|
+
# Open Design Design-System Provider
|
|
2
|
+
|
|
3
|
+
Use Open Design's live structured surface. Do not assume the installed version matches this compatibility note; discover first and branch on actual tool/resource schemas.
|
|
4
|
+
|
|
5
|
+
## Capability order
|
|
6
|
+
|
|
7
|
+
1. Open Design MCP resources/tools.
|
|
8
|
+
2. The same installed Open Design daemon's structured HTTP API when MCP lacks the required design-system lifecycle operation.
|
|
9
|
+
3. Open Design UI/CLI only for bootstrap, preview inspection or a capability unavailable through structured paths.
|
|
10
|
+
|
|
11
|
+
Never call a copied prompt or local imitation a provider result. Persistent MCP registration, plugin/auth changes and new disclosure paths require separate authorization.
|
|
12
|
+
|
|
13
|
+
## Current verified MCP contract
|
|
14
|
+
|
|
15
|
+
Open Design 0.15.1 exposed MCP server 0.2.0 using protocol `2025-06-18`. A live read-only smoke observed 152 concrete design-system resources through `resources/list`; `resources/read` returned their Markdown bodies. The URI families are:
|
|
16
|
+
|
|
17
|
+
- `od://design-systems/<id>/DESIGN.md` for current design-system bodies;
|
|
18
|
+
- `od://skills/<id>/SKILL.md` for functional skills;
|
|
19
|
+
- `od://focus/active` for current focus.
|
|
20
|
+
|
|
21
|
+
This version returns `-32601` for `resources/templates/list`. Treat template enumeration as optional protocol capability: use concrete `resources/list` results when present and never reject a readable design-system catalogue merely because the template-list method is absent.
|
|
22
|
+
|
|
23
|
+
Its 18 observed tools included `list_projects`, `get_project`, `create_project`, `start_run`, `get_run`, file/artifact operations and capability discovery. `create_project` accepts optional `designSystem`; verify the result through `get_project.designSystemId`. This version exposes design systems as resources but no create/update design-system MCP tool.
|
|
24
|
+
|
|
25
|
+
Feature-detect future structured methods before using the fallback. A tool name alone is insufficient: inspect its input schema and result.
|
|
26
|
+
|
|
27
|
+
## Generation fallback for Open Design 0.15.1
|
|
28
|
+
|
|
29
|
+
When MCP cannot create a design system, discover the running daemon and use its official API. Prefer install metadata supplied by Open Design rather than hardcoded paths. Confirm `/api/health` and the version first.
|
|
30
|
+
|
|
31
|
+
Start generation:
|
|
32
|
+
|
|
33
|
+
```http
|
|
34
|
+
POST /api/design-systems/generation-jobs
|
|
35
|
+
Content-Type: application/json
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The body is the provider's current design-system input. Supported 0.15.1 fields observed in the installed provider include:
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"title": "Product design system",
|
|
43
|
+
"category": "Custom",
|
|
44
|
+
"surface": "web",
|
|
45
|
+
"summary": "Product and brand intent",
|
|
46
|
+
"sourceNotes": "Bounded design brief",
|
|
47
|
+
"provenance": {
|
|
48
|
+
"companyBlurb": "Product context",
|
|
49
|
+
"sourceUrls": [],
|
|
50
|
+
"githubUrls": [],
|
|
51
|
+
"localCodeFiles": [],
|
|
52
|
+
"figFiles": [],
|
|
53
|
+
"assetFiles": [],
|
|
54
|
+
"notes": "Selection constraints"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Send only relevant, user-authorized sources. Do not transmit secrets or unrelated repository content. `surface` is provider-defined; validate the live accepted value. A supplied `body` creates a direct draft and must not be misrepresented as model generation.
|
|
60
|
+
|
|
61
|
+
Poll `GET /api/design-systems/generation-jobs/<jobId>` at a bounded cadence until a terminal state. Preserve the job ID, step diagnostics and returned `designSystemId`. The observed pipeline explores resources, creates a draft, generates `DESIGN.md`/README/SKILL/tokens/previews/context files, registers files and prepares review.
|
|
62
|
+
|
|
63
|
+
## Review and revision
|
|
64
|
+
|
|
65
|
+
Read the system and inspect its assets through:
|
|
66
|
+
|
|
67
|
+
- `GET /api/design-systems/<id>`;
|
|
68
|
+
- `GET /api/design-systems/<id>/files` and `/file?path=<path>`;
|
|
69
|
+
- `GET /api/design-systems/<id>/preview` or `/showcase`;
|
|
70
|
+
- `POST /api/design-systems/<id>/workspace` when an editable review project is required.
|
|
71
|
+
|
|
72
|
+
Create scoped feedback with:
|
|
73
|
+
|
|
74
|
+
```http
|
|
75
|
+
POST /api/design-systems/<id>/revision-jobs
|
|
76
|
+
Content-Type: application/json
|
|
77
|
+
|
|
78
|
+
{"feedback":"...","sectionTitle":"optional section"}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Poll the returned job through the generation-job endpoint. A succeeded revision job creates a pending revision; it does not alter project authority and must not be called accepted. Inspect revisions with `GET /api/design-systems/<id>/revisions`. After explicit selection, set exactly that revision to accepted:
|
|
82
|
+
|
|
83
|
+
```http
|
|
84
|
+
PATCH /api/design-systems/<id>/revisions/<revisionId>
|
|
85
|
+
Content-Type: application/json
|
|
86
|
+
|
|
87
|
+
{"status":"accepted"}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Reject explicitly discarded revisions when useful. Accepting a provider revision updates the provider copy only; the authority-adoption step still owns the project writeback.
|
|
91
|
+
|
|
92
|
+
The provider also exposes `POST /api/design-systems/<id>/token-contract/rebuild-jobs`. Use it only when the live token-quality decision says a rebuild is available or the user explicitly requests a forced rebuild. A generated token contract still needs selection and project adoption.
|
|
93
|
+
|
|
94
|
+
## Provider binding for downstream resources
|
|
95
|
+
|
|
96
|
+
For a new Open Design resource project, call MCP `create_project` with the adopted provider ID in `designSystem`. Immediately call `get_project` and require `designSystemId` to match.
|
|
97
|
+
|
|
98
|
+
For an existing project, inspect `get_project` first. When it is missing or mismatched, prefer a new bounded project with the correct binding if MCP offers no safe update. Use a live structured provider update only after feature-detecting it and preserving project identity. Never proceed with a style-bearing run while silently bound to another system.
|
|
99
|
+
|
|
100
|
+
## Failure semantics
|
|
101
|
+
|
|
102
|
+
Keep these states separate:
|
|
103
|
+
|
|
104
|
+
- daemon/MCP execution: queued, running, succeeded, failed, cancelled or unknown;
|
|
105
|
+
- candidate artifacts: missing, partial, retrievable, rendered or corrupt;
|
|
106
|
+
- selection: unreviewed, selected, rejected or decision-required;
|
|
107
|
+
- project adoption: unchanged, partially adopted, adopted or inconsistent;
|
|
108
|
+
- provider binding: unverified, matched or mismatched.
|
|
109
|
+
|
|
110
|
+
Preserve exact errors and stop bounded polling. Do not mark a candidate selected because generation succeeded, and do not mark project authority adopted because a provider revision was accepted.
|
|
@@ -1,100 +1,106 @@
|
|
|
1
|
-
---
|
|
1
|
+
---
|
|
2
2
|
name: long-task-workflow
|
|
3
|
-
description: Author, preflight, execute, resume, verify, or close one complete Single-Goal Delivery Contract in the
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Single-Goal Long-Task Workflow
|
|
7
|
-
|
|
8
|
-
## Boundaries
|
|
9
|
-
|
|
10
|
-
Use one
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
3
|
+
description: Author, preflight, execute, resume, verify, or close one complete Single-Goal Delivery Contract in the currently selected host execution Goal and workspace. Use only when explicitly invoked or a valid common-dir active authority binding exists.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Single-Goal Long-Task Workflow
|
|
7
|
+
|
|
8
|
+
## Boundaries
|
|
9
|
+
|
|
10
|
+
Use one currently selected host execution Goal, one repository, one selected verification workspace, one complete Contract and one Final Gate. This workflow never creates or manages a scheduler, model worker, agent runtime, App Server, branch/worktree fan-out, merge, push, PR, deployment, Campaign/SFC/Packet/Wave chain, matrix, verdict or second Contract plan. The current Goal may optionally use one or multiple platform-native agents/subagents or user-authorized Git parallelism as implementation means. Harness never allocates, schedules, retries or recovers them; their reports are not Progress or proof, and every result must converge into the selected verification workspace before verification counts. Never activate from task size alone.
|
|
11
|
+
|
|
12
|
+
That Goal is selected and owned by the host/user. Harness does not create, persist or reconnect a Goal identifier. Compaction may continue inside it; a later physical Goal/session restores semantic workflow state through `resume` rather than reconnecting a prior Turn.
|
|
13
|
+
|
|
14
|
+
The host and user also own model selection. The workflow has exactly one user-choice checkpoint after the first Authority Lock and before implementation; Harness neither switches the model nor persists model-routing/checkpoint state. No checkpoint file, acknowledgement state, model route, model-tier scheduler, automatic model switch, `authority_revision_in_progress` state or native-Goal completion state is created. Outside that boundary, do not pause a healthy Goal solely to change or downgrade the model. Do not create a separate approval checkpoint for a defensible recommended plan choice. A targeted pre-Authority clarification is still required when a missing user preference could materially change research or selection; genuine Source conflicts or choices the user explicitly reserves may likewise require a decision before Authority Lock. Capability-related drift is handled by targeted repair plus the Final Gate. The current Goal may choose platform-native internal delegation, but Harness owns no subagent dispatch/retry/recovery state, delegated reports are not Progress or proof, and all outputs must converge into the selected verification workspace before verification can count.
|
|
15
|
+
|
|
16
|
+
`long-task-delivery-v2` is the only active Contract schema. `delivery-contract.yaml` is the root authoring file. New authoring uses inline Outcomes; existing `outcome_files` are physical compatibility only. `delivery-set` is retired and non-executing.
|
|
17
|
+
|
|
18
|
+
## Controlling Objective
|
|
19
|
+
|
|
18
20
|
Prevent false completion inside declared authority. Given complete and accurate Source at the declared observable granularity, a meaning-preserving Source-to-Contract projection, complete applicability expansion and a sound named verifier/runner trust boundary, `AcceptedDeliveryTerminal` must imply that no declared observable drift remains. Implementation may drift, fail or require rework, but every declared non-Result requirement, exact applicability cell and AC must remain traceable and every unsatisfied, unverifiable, insufficiently evidenced, stale or externally pending item must block or explicitly qualify complete delivery. In particular, unclassified Source, an omitted architecture obligation, Control field/relation, population-universe member, wrong target/condition/input/state/journey, proxy target, presence text, degradation path, fixed input, self-reported boundary effect, weak semantic oracle or internal entrypoint must never substitute for declared behavior. Findings should localize repair through Source Item, Stage, Outcome, Claim, applicability, Assertion, Check, Evidence Capability, execution target, Binding and owner boundary.
|
|
21
|
+
|
|
22
|
+
For selected design resources, one design-specific objective is that Agent implementation, acceptance and testing fully conform to every material UI/UX Fact explicitly expressed within declared scope and conditions. Open Design can produce source-rich, implementation-readable resources, but capability alone is not a guarantee: formal Web/App authoring must derive the complete scoped Expected Fact Universe before generation; acquire a canonical entry and exact dependency closure; and freeze an Inspector manifest proving `Expected Fact Universe = Canonical Resource Facts = Handoff Indexed Facts`. The atomic identity is `subject × target × condition × variation × property`, including component instances/Anatomy Parts/relations, all applicable condition and variation axes, exact standard/custom properties, explicit N/A/exclusions, design-system lineage, dynamic populations and assets. Product Control and eight-dimension roll-ups are not the Fact ceiling; sampling, truncation, broad labels and default-page inference cannot close it. The validated `design-resource-handoff-v1` remains the residual scope/applicability/semantic adapter rather than a copy of CSS values: canonical resources own exact values, while immutable located digests, Fact Cells, Fact × required-method proof obligations, comparator/tolerance/mask, Oracle/environment and sensitivity policy project downstream. Preserve each Fact through Context-reachable targets, Source/Control/Claim authority, one independent Assertion per method, exact per-condition `fact_expectations`, and one current-snapshot `fact_results` row with attributable actual observation/environment/comparison/verdict. An exact target requires full-target layout and pixel Facts per condition. Deliberately partial input remains a constraint or blocking unresolved; incomplete acquisition/Census, missing or mismatched Facts/proofs, unsupported evidence, blockers or stale identities remain blocking. Neither provider success, file hashes nor handoff preflight proves production conformance.
|
|
19
23
|
|
|
20
|
-
For
|
|
24
|
+
For non-UI meaning, complete and accurate Source defaults to the finest independently decidable semantic Fact granularity expressed, logically entailed, explicitly delegated or preserved by authoritative repository evidence. This covers product/business semantics and technical/backend/architecture semantics: goals and scope; actors, roles, tenants and entitlements; business rules and calculations; entities, fields and relations; commands, queries, workflows, state machines and time; validation, outputs/errors, APIs/protocols/events/jobs; persistence, transactions, consistency, concurrency and idempotency; faults, retries, degradation, recovery and backup; configuration, compatibility, migration and rollout; performance, capacity, reliability and cost; security, privacy, safety and compliance; observability, deployment and operations; integrations, localization, commercial rules, hardware, AI/ML and custom domains. A paragraph, Requirement, Product Control, broad state label or current implementation is never the semantic ceiling. Inventory every material input and give every applicable subject/relation/population, condition value/combination and atomic property a stable identity, typed expected predicate, owner, Source locator/digest, provenance and sensitivity. The standard catalog is a floor; discovered domain-specific families, properties, axes and proof methods extend it.
|
|
21
25
|
|
|
22
|
-
|
|
26
|
+
One Source-embedded `semantic-fact-manifest-v1` is the task-local canonical index; durable meaning remains in its existing owning Context and exact values remain Source, never copied into Contract. It freezes a complete Inspector Census, explicit N/A/exclusion basis, non-sampling/non-truncation counts/digests, Fact Cells/Facts, dynamic populations, every Fact × required-method obligation, comparator/parameters/tolerance/mask, Oracle/environment and blockers. Require exact conservation: `Expected Semantic Facts = Source Indexed Facts = Contract Indexed Facts`, and `Fact × required-method obligations = Contract proof bindings = current Final-Gate semantic_fact results`. Every current result carries attributable actual observation/environment, frozen comparison authority, Oracle and pass/fail verdict; proof reaches the furthest independently failing boundary. Aggregate strings, representative/pairwise samples, default paths, implementation-generated expectations, ungrounded N/A, proxy-only/self-reported results and one broad pass Boolean cannot close atomic rows. Any material Source hidden as supporting-only, or any missing, extra, duplicate, unresolved, unreadable, unmapped, unimplemented, unexecuted, stale, failed, authority-drifted, reused or indistinguishable identity blocks Authority Lock or Final Gate. Genuine external authority stays a typed External Confirmation. This adds no second plan, value authority, Gate, state or implementation-order rule.
|
|
23
27
|
|
|
28
|
+
Only fresh evidence from the complete current final snapshot may create machine acceptance. Exactly fresh `machine_accepted` with no pending External Confirmation is `AcceptedDeliveryTerminal` and may support the full declared-observable no-drift conclusion. Otherwise report the task as unfinished or qualified. `machine_accepted_external_pending` means machine-verifiable authority passed while named external confirmation remains; it proves only the declared machine scope and is not full delivery completion. Machine acceptance has no direct native-Goal effect. Never substitute prose, progress, historical tests, Receipts, one exit code or Agent judgment for the Final Gate.
|
|
29
|
+
|
|
24
30
|
Anti-Degradation Assurance requires current-implementation Context to match the indexed code/runtime and protects the controlling purpose, enabling key logic, two jointly necessary implementation responsibilities, theorem boundary and adjacent `F = Implementation Freedom Boundary` from implicit weakening. `F` is an efficiency/anti-process-bloat invariant, not a third responsibility or no-drift theorem premise: within declared Source/Contract, architecture, security, forbidden-shortcut, irreversible-effect and external-action boundaries, the current Goal owns implementation order, methods, local feedback cadence and optional one-agent or multi-agent/subagent execution. Harness must not add a development phase/method permission Gate, per-edit verification mandate, agent allocator/scheduler, delegation proof or persistent delegation state. Replacing any protected invariant requires an explicit project-owner design-purpose decision and replacement proof; a new development-stage constraint must additionally identify a distinct path that final proof or a lighter project-owned check cannot cover and have positive net ROI. Agent inference, coordinated edits or cost alone do not authorize it. Mechanism changes use a two-stage hard gate. First prove `Coverage_new ⊇ Coverage_old`, `FalseNegative_new ⊆ FalseNegative_old`, and that Authority, fail-closed behavior and complete-current-final-snapshot proof cannot be bypassed. If non-degradation cannot be proved, preserve the current formal acceptance path. Only after that gate passes may positive net ROI compare incremental anti-degradation or purpose benefit with every incremental Authoring, Runtime, State, Recovery, maintenance, test, process, introduction and migration cost. No cost reduction compensates for weaker drift interception; positive net ROI permits consideration but never overrides the first gate. This creates no second Authority, Gate or state.
|
|
25
|
-
|
|
26
|
-
## Progressive Reference Loading
|
|
27
|
-
|
|
28
|
-
Read only the reference needed for the current activity; these files are guidance, not new artifacts or authority:
|
|
29
|
-
|
|
30
|
-
- When inputs are raw, mixed, attachment-heavy, incomplete or need synthesis/refinement while the Contract Draft is being mapped, read [`references/source-authoring.md`](references/source-authoring.md) alongside the Contract-authoring reference. Do not wait for a separate Source-authoring phase before opening the Draft.
|
|
31
|
-
- Before creating or structurally revising Source markers, Outcomes, requirements, controls, obligations, architecture boundaries, paths, Bindings, Assertions or risk, read [`references/contract-authoring.md`](references/contract-authoring.md).
|
|
32
|
-
- Before creating or repairing Checks, runners, Observations, proof surfaces, Playwright/structured evidence, Counterfactuals, Population or environment probes, read [`references/evidence-design.md`](references/evidence-design.md).
|
|
33
|
-
- Before Preflight, Compile, protected revision, resume, targeted verify, Final Gate, Stop, close or abandon, read [`references/authority-lifecycle.md`](references/authority-lifecycle.md).
|
|
34
|
-
|
|
35
|
-
Do not copy reference detail into another plan or state file. The same `delivery-contract.yaml`, active authority and current workspace remain the only lifecycle surfaces.
|
|
36
|
-
|
|
37
|
-
## Contract Draft And Outcome Decomposition
|
|
38
|
-
|
|
39
|
-
Every input enters the same non-authoritative `delivery-contract.yaml` Draft immediately. Before the first successful formal Compile, continuously revise that Source-bound Draft while real Source inventory, provenance, refinement, markers, repository binding and mapping converge. It need not be completed in one response; keep reading Source, repository and relevant Context and feed Preflight findings back into that same Draft. Draft authoring, Preflight, Compile, rolling execution, targeted verification and Final Gate are one `long-task-workflow` lifecycle. Do not create a Source-authoring phase, standalone Contract Draft Skill, Draft Receipt, Authoring State, draft schema/CLI/runtime state or second plan.
|
|
40
|
-
|
|
41
|
-
A Draft Outcome is an Outcome in that pre-Authority-Lock Draft, not a new schema field or runtime entity. Decompose only vertical, independently observable, decidable and target-verifiable results whose dependencies and owner boundary can be stated; one Outcome belongs to one declared Stage and does not span materially different success paths. Declare the ordered Stage DAG and one gate Outcome per Stage in the same Contract. Use those boundaries to project an acceptance/verification-ready working set, bind target verification, localize failures, resume findings/next actions and stale local results precisely; never use them to restrict which in-scope implementation edit may happen next.
|
|
42
|
-
|
|
43
|
-
`depends_on` means acceptance and intermediate-proof readiness, not implementation permission. The gate Outcome transitively depends on the rest of its Stage, later Stage Outcomes depend on prerequisite gate Outcomes, and every multi-Outcome gate proves cross-surface consistency. The current Goal derives a temporary advisory Rolling Frontier from Stage and Outcome status, but may implement, inspect or repair any in-scope Outcome in the order current code reality favors. Do not persist a Stage Receipt, scheduler, Worker queue, mandatory implementation DAG, model route or process tree. Never split for response/YAML/file length, implementation layer, module/file count, Agent capacity, Worker assignment or desired parallelism.
|
|
44
|
-
|
|
45
|
-
> Outcome decomposes execution and diagnosis, not completion authority.
|
|
46
|
-
|
|
47
|
-
## Entry And Authoring Loop
|
|
48
|
-
|
|
49
|
-
1. Read the user request or external initial proposal, selected design resources and minimum controlling Context. Collect the architecture owners, extension points and boundaries needed for the shared deliberation before deciding `Context Delta`.
|
|
50
|
-
- For material production UI, read the Contract-authoring visual guidance before Compile. When selected resources arrive as an implementation handoff, require one marked `design-resource-handoff-v1` in `task.source_paths` and run `ty-context design-resource preflight <handoff.md
|
|
51
|
-
- If the user is asking to generate or iterate standalone design resources before Contract authoring rather than execute this delivery, use `design-resource-authoring` instead. Its result may later return as ordinary Source; it creates no Contract Draft or Authority.
|
|
52
|
-
2. If a valid active binding exists, run `ty-context long-task resume <workdir
|
|
53
|
-
3. Start one complete Delivery Contract Draft for the whole selected delivery immediately. If inputs are not self-contained, apply the Source-authoring reference inside this same Draft loop: inventory every proposal/resource/attachment, refine the writable real Source, preserve traceable provenance and resolve or retain genuine decisions while mapping target profile, Stages, Outcomes and repository evidence. Conversation-only material becomes exactly one project-native Markdown Source. Source completeness is a Preflight/Compile convergence requirement, not an earlier internal stage.
|
|
54
|
-
4. Preserve at least one real `source_path`. Wrap every material Source item in its original Markdown with non-rendering `ty-source-item:start/end` markers without rewriting direct text; marked Source Item keys and `source_claim` keys are exactly equal. Every delivery declares at least one `technical_obligation` Source Item with `aspect=architecture` and maps it to an independently provable architecture obligation. `ty-source-background:start/end` is restricted to text-free Markdown anchors/horizontal rules (`reason=markdown-structure`) or fixed-field `ty-source-provenance` comments (`reason=provenance`); text-bearing headings, free-form provenance and arbitrary explanatory prose are material or unclassified, never background. Leave the
|
|
55
|
-
5. An ordinary prose proposal, legacy Source Plan or externally authored design resource remains valid Source and does not need to match a recommended structure. Preserve stable semantic keys and Markdown anchors where practical. Selected resources retain their stable resource/surface/control/state/target keys, declared applicability, source profile/entry/dependency set, provider/project/run provenance, typed locators, immutable digest/snapshot and editable upstream owner/locator/update route. Candidates authorize no fidelity Claim. Changing an adopted resource produces a new immutable version and updates the owning reference rather than overwriting the locked baseline.
|
|
56
|
-
6. Continue reading repository, Source and Context and revise the same Draft. A request to synthesize, refine, complete, implement or use judgment delegates plan-level authoring, but it does not invent the user's tradeoff priorities. Before comparative research or a material product, technical, architecture or provider selection, identify the criteria that could change the research scope, candidate set or recommendation. Infer them only from the user's words, Source, Context or controlling constraints. If quality versus cost, speed, reliability, privacy, lock-in, operational burden or another material priority is unknown or ambiguous, stop before that research or selection and ask one concise targeted clarification. Do not impose a questionnaire, re-ask known preferences or interrupt minor reversible choices whose recommendation would not change.
|
|
57
|
-
7. Once the material preference envelope is clear, decide what research is needed. Use current authoritative or primary evidence for external capability, pricing, quota, license, compatibility, region, security posture or support claims. When one recommendation is then defensible, record it in real Source with the authoring instruction, preference/evidence basis and exact added meaning instead of pausing for approval. Append the delegated item without rewriting the user's original text when ordinary prose is the Source. Return only when authoritative requirements conflict, the user explicitly reserves the choice, a material preference remains unknown, critical semantics have no defensible recommendation or no falsifiable acceptance standard can be formed.
|
|
58
|
-
8. Contract expansion remains limited to meaning-preserving structural decomposition, evidence-backed repository binding and choices first recorded as delegated real Source. Never place a new product rule, default, threshold, recovery behavior, permission or platform/data scope only in Contract YAML. Default plan delegation authorizes meaning, not action: payment, contracting, production deployment or publication, destructive production mutation, real permission grants, sensitive-data transmission and required legal/security/human approval remain named external confirmations. Any conflicting, user-reserved, missing-preference or unsupported semantic remains `decision_required`.
|
|
59
|
-
9. Before formal Compile and the first implementation edit, complete the shared `Architecture Deliberation` once and surface concise repository-bound conclusions rather than private reasoning. Cover the current owner/extension point/source of truth, dependencies and lifecycle, selected and rejected alternatives, a plausible future-change challenge, touched debt and its disposition, forbidden shortcuts and project-owned Checks. Even a preservation result names concrete owners and why no new or worsened debt is introduced. Put durable conclusions in owning Context and material falsifiable delivery conclusions in real marked Source plus existing Contract fields, then decide `Context Delta: none|required`. A material scope, owner, Context or design change before implementation stales and refreshes the deliberation.
|
|
60
|
-
10. Close every real Control's 22 canonical fields through `field_coverage` and its Outcome's cross-Control meaning through `control_relation_closure`; use `specified`, explicit `not_applicable` or blocking `unresolved`, and give the closure exact applicability refs even when no Controls apply. Declare only actual applicability profiles, each with an atomic, duplicate-free dimension assignment plus exact target, journey, Given condition/input/state refs and ordered When refs. Every Claim lists all applicable profiles; every Claim-bearing Assertion proves one Claim in one matching profile and all required proof surfaces. Declare each execution target's runtime capabilities and require the production family, cold-start and production-root capabilities where applicable. Give every Assertion the minimum all-of Evidence Capabilities that can actually prove its Claim. Every behavioral Claim-bearing Assertion also needs a same-Check claim-local `replace_json_value` or `replace_text` wrong-semantic witness and a claimless target-runtime liveness Assertion that remains passing; whole-file replacement is compatibility-only and cannot prove semantic binding. Population declares a universe Binding whose carriers are Check inputs and proves exact universe = eligible = observed plus valid exclusions. Separate required success and degradation Checks. Type every external confirmation with impacted Claim refs and target-blocking effect. For selected design targets, keep resource-integrity Checks distinct from root-bound implementation conformance, freeze the validated handoff and target resources, preserve exact condition equality, map every covered handoff Source Item into separate attributable Assertions, bind each verification method to its own `design_method` evidence with exact per-condition `fact_refs`, distinct record and primary-observation paths plus a unique current primary digest for every condition, require the cell union to equal the complete target fact set, and declare current actual/comparison artifacts. Preserve every blocker's required target capabilities; use a machine Claim only on the exact capability-qualified target, otherwise keep a target-blocking External Confirmation. Playwright must attach both declared cell artifacts in every project instance. Use `context_snapshot_mode: full`. Run read-only `ty-context long-task preflight <workdir>`, repair every handoff, Contract and `decision_required` error in the same Draft, then formally Compile only when ready.
|
|
61
|
-
11. When the first Compile returns `execution_model_checkpoint.required: true`, obey its terminal-turn boundary. Unless an earlier user message explicitly states this task's current-model or switch-and-resume strategy, do no product implementation, file edit, build or test after that result; end the current turn and ask the user to choose `continue_current_model` or switch models and then resume the active Long-Task. Generic “continue”, “resume”, “finish” or “continue the Goal” language does not satisfy the checkpoint. Later revisions return `required: false` and do not repeat it.
|
|
62
|
-
|
|
63
|
-
Architecture quality uses the existing authority model, not a new gate or field. The visible deliberation proves that architecture work occurred, not that subjective quality is machine-proven. Encode every material falsifiable invariant as a Source-backed technical obligation/global constraint/forbidden shortcut plus owner/path/Binding boundaries and a project-owned executable Check. Functional acceptance cannot substitute when the architecture claim can fail independently. An unverifiable design preference remains task-local, durable Context or `decision_required`; it must not be promoted into false proof.
|
|
64
|
-
|
|
65
|
-
## Rolling Execution
|
|
66
|
-
|
|
31
|
+
|
|
32
|
+
## Progressive Reference Loading
|
|
33
|
+
|
|
34
|
+
Read only the reference needed for the current activity; these files are guidance, not new artifacts or authority:
|
|
35
|
+
|
|
36
|
+
- When inputs are raw, mixed, attachment-heavy, incomplete or need synthesis/refinement while the Contract Draft is being mapped, read [`references/source-authoring.md`](references/source-authoring.md) alongside the Contract-authoring reference. Do not wait for a separate Source-authoring phase before opening the Draft.
|
|
37
|
+
- Before creating or structurally revising Source markers, Outcomes, requirements, controls, obligations, architecture boundaries, paths, Bindings, Assertions or risk, read [`references/contract-authoring.md`](references/contract-authoring.md).
|
|
38
|
+
- Before creating or repairing Checks, runners, Observations, proof surfaces, Playwright/structured evidence, Counterfactuals, Population or environment probes, read [`references/evidence-design.md`](references/evidence-design.md).
|
|
39
|
+
- Before Preflight, Compile, protected revision, resume, targeted verify, Final Gate, Stop, close or abandon, read [`references/authority-lifecycle.md`](references/authority-lifecycle.md).
|
|
40
|
+
|
|
41
|
+
Do not copy reference detail into another plan or state file. The same `delivery-contract.yaml`, active authority and current workspace remain the only lifecycle surfaces.
|
|
42
|
+
|
|
43
|
+
## Contract Draft And Outcome Decomposition
|
|
44
|
+
|
|
45
|
+
Every input enters the same non-authoritative `delivery-contract.yaml` Draft immediately. Before the first successful formal Compile, continuously revise that Source-bound Draft while real Source inventory, provenance, refinement, markers, repository binding and mapping converge. It need not be completed in one response; keep reading Source, repository and relevant Context and feed Preflight findings back into that same Draft. Draft authoring, Preflight, Compile, rolling execution, targeted verification and Final Gate are one `long-task-workflow` lifecycle. Do not create a Source-authoring phase, standalone Contract Draft Skill, Draft Receipt, Authoring State, draft schema/CLI/runtime state or second plan.
|
|
46
|
+
|
|
47
|
+
A Draft Outcome is an Outcome in that pre-Authority-Lock Draft, not a new schema field or runtime entity. Decompose only vertical, independently observable, decidable and target-verifiable results whose dependencies and owner boundary can be stated; one Outcome belongs to one declared Stage and does not span materially different success paths. Declare the ordered Stage DAG and one gate Outcome per Stage in the same Contract. Use those boundaries to project an acceptance/verification-ready working set, bind target verification, localize failures, resume findings/next actions and stale local results precisely; never use them to restrict which in-scope implementation edit may happen next.
|
|
48
|
+
|
|
49
|
+
`depends_on` means acceptance and intermediate-proof readiness, not implementation permission. The gate Outcome transitively depends on the rest of its Stage, later Stage Outcomes depend on prerequisite gate Outcomes, and every multi-Outcome gate proves cross-surface consistency. The current Goal derives a temporary advisory Rolling Frontier from Stage and Outcome status, but may implement, inspect or repair any in-scope Outcome in the order current code reality favors. Do not persist a Stage Receipt, scheduler, Worker queue, mandatory implementation DAG, model route or process tree. Never split for response/YAML/file length, implementation layer, module/file count, Agent capacity, Worker assignment or desired parallelism.
|
|
50
|
+
|
|
51
|
+
> Outcome decomposes execution and diagnosis, not completion authority.
|
|
52
|
+
|
|
53
|
+
## Entry And Authoring Loop
|
|
54
|
+
|
|
55
|
+
1. Read the user request or external initial proposal, selected design resources and minimum controlling Context. Collect the architecture owners, extension points and boundaries needed for the shared deliberation before deciding `Context Delta`.
|
|
56
|
+
- For material production UI, read the Contract-authoring visual guidance before Compile. When selected resources arrive as an implementation handoff, require one marked `design-resource-handoff-v1` in `task.source_paths` and run `ty-context design-resource preflight <handoff.md>`. Require its canonical Fact manifest, frozen Inspector Census, complete standard/custom axes and property catalog, exact `subject × target × condition × variation × property` Fact Cells, all property-required proofs and exact manifest↔handoff equality; incomplete resource/dependency/Census closure, aggregate state labels, sampling/truncation, ambiguous condition profiles, unsupported evidence, unresolvable located digests, unresolved lineage/conflicts/blockers, missing exact-target layout/pixel Facts or stale identities are blocking. Traverse affected surface/control/target keys from owning Context through `DESIGN.md`, then open every affected selected `exact-target` or `constraint` as Context-reachable ordinary Source. Confirm selection basis, readable immutable identity/digest, declared surface/condition/variation/property coverage and editable upstream owner/locator/update route. A registry or handoff index mention is not consumption. Missing, stale, unreadable, truncated or conflicting resources remain `decision_required`; if only the editable upstream is unavailable, the immutable target may guide implementation but requested resource edits remain a manual/external boundary. An unconfigured starter, candidate, style-only rule or inspiration-only reference is incomplete design authority unless Source explicitly scopes the result as prototype/non-fidelity or supplies a selected target before implementation. When Controls exist, bind them through Product `surface_bindings` to the required production target, existing route/component Bindings and a root-entry journey; each selected target's identity/conditions/files, complete Fact/proof set, canonical per-Fact expectations, covered Source Claims/root Assertion, per-method independent Assertions and blocker lineage must match the handoff before typed evidence can prove it.
|
|
57
|
+
- If the user is asking to generate or iterate standalone design resources before Contract authoring rather than execute this delivery, use `design-resource-authoring` instead. Its result may later return as ordinary Source; it creates no Contract Draft or Authority.
|
|
58
|
+
2. If a valid active binding exists, run `ty-context long-task resume <workdir>`, directly load the installed package-managed `long-task-workflow` Skill and read the lifecycle reference. This recovery path does not depend on implicit invocation.
|
|
59
|
+
3. Start one complete Delivery Contract Draft for the whole selected delivery immediately. If inputs are not self-contained, apply the Source-authoring reference inside this same Draft loop: inventory every proposal/resource/attachment, refine the writable real Source, preserve traceable provenance and resolve or retain genuine decisions while mapping target profile, Stages, Outcomes and repository evidence. Conversation-only material becomes exactly one project-native Markdown Source. Source completeness is a Preflight/Compile convergence requirement, not an earlier internal stage. For non-UI scope, expand the exact semantic universe before implementation: classify every material input; disposition every standard and discovered custom family; enumerate stable subjects, relations, populations, axes, atomic values/combinations and properties; and derive every Fact and required proof obligation without sampling or aggregation.
|
|
60
|
+
4. Preserve at least one real `source_path`. Wrap every material Source item in its original Markdown with non-rendering `ty-source-item:start/end` markers without rewriting direct text; marked Source Item keys and `source_claim` keys are exactly equal. Every delivery declares at least one `technical_obligation` Source Item with `aspect=architecture` and maps it to an independently provable architecture obligation. Embed exactly one schema-valid `semantic-fact-manifest-v1` across declared Source and point root `semantic_fact_manifest` to its immutable identity; every Outcome projects exactly its Facts and proof obligations through `semantic_fact_bindings`. Ordinary Material Source Items must be `non_ui_material` and contribute Fact lineage unless a validated design handoff independently owns them as `ui_design`; supporting/excluded inputs require exact basis and cannot hide delivery meaning. `ty-source-background:start/end` is restricted to text-free Markdown anchors/horizontal rules (`reason=markdown-structure`) or fixed-field `ty-source-provenance` comments (`reason=provenance`); text-bearing headings, free-form provenance and arbitrary explanatory prose are material or unclassified, never background. Leave the strict formal blocks to their parsers. Every other non-empty line is unclassified and blocking. Never label requirement, acceptance, technical, risk or decision meaning as background. Newly delegated meaning must first be written into real Material Source with provenance before its corresponding Draft meaning can pass Preflight/Compile.
|
|
61
|
+
5. An ordinary prose proposal, legacy Source Plan or externally authored design resource remains valid Source and does not need to match a recommended structure. Preserve stable semantic keys and Markdown anchors where practical. Selected resources retain their stable resource/surface/control/state/target keys, declared applicability, source profile/entry/dependency set, provider/project/run provenance, typed locators, immutable digest/snapshot and editable upstream owner/locator/update route. Candidates authorize no fidelity Claim. Changing an adopted resource produces a new immutable version and updates the owning reference rather than overwriting the locked baseline.
|
|
62
|
+
6. Continue reading repository, Source and Context and revise the same Draft. A request to synthesize, refine, complete, implement or use judgment delegates plan-level authoring, but it does not invent the user's tradeoff priorities. Before comparative research or a material product, technical, architecture or provider selection, identify the criteria that could change the research scope, candidate set or recommendation. Infer them only from the user's words, Source, Context or controlling constraints. If quality versus cost, speed, reliability, privacy, lock-in, operational burden or another material priority is unknown or ambiguous, stop before that research or selection and ask one concise targeted clarification. Do not impose a questionnaire, re-ask known preferences or interrupt minor reversible choices whose recommendation would not change.
|
|
63
|
+
7. Once the material preference envelope is clear, decide what research is needed. Use current authoritative or primary evidence for external capability, pricing, quota, license, compatibility, region, security posture or support claims. When one recommendation is then defensible, record it in real Source with the authoring instruction, preference/evidence basis and exact added meaning instead of pausing for approval. Append the delegated item without rewriting the user's original text when ordinary prose is the Source. Return only when authoritative requirements conflict, the user explicitly reserves the choice, a material preference remains unknown, critical semantics have no defensible recommendation or no falsifiable acceptance standard can be formed.
|
|
64
|
+
8. Contract expansion remains limited to meaning-preserving structural decomposition, evidence-backed repository binding and choices first recorded as delegated real Source. Never place a new product rule, default, threshold, recovery behavior, permission or platform/data scope only in Contract YAML. Default plan delegation authorizes meaning, not action: payment, contracting, production deployment or publication, destructive production mutation, real permission grants, sensitive-data transmission and required legal/security/human approval remain named external confirmations. Any conflicting, user-reserved, missing-preference or unsupported semantic remains `decision_required`.
|
|
65
|
+
9. Before formal Compile and the first implementation edit, complete the shared `Architecture Deliberation` once and surface concise repository-bound conclusions rather than private reasoning. Cover the current owner/extension point/source of truth, dependencies and lifecycle, selected and rejected alternatives, a plausible future-change challenge, touched debt and its disposition, forbidden shortcuts and project-owned Checks. Even a preservation result names concrete owners and why no new or worsened debt is introduced. Put durable conclusions in owning Context and material falsifiable delivery conclusions in real marked Source plus existing Contract fields, then decide `Context Delta: none|required`. A material scope, owner, Context or design change before implementation stales and refreshes the deliberation.
|
|
66
|
+
10. Close every real Control's 22 canonical fields through `field_coverage` and its Outcome's cross-Control meaning through `control_relation_closure`; use `specified`, explicit `not_applicable` or blocking `unresolved`, and give the closure exact applicability refs even when no Controls apply. Independently close the semantic manifest: exact Source/context input inventory and digests; all standard/custom family, unit, relation, population, axis/value/combination, property, Fact Cell, Fact, proof, Oracle, environment and blocker Census identities; complete generation counts/digests; and exact Source→Fact→Claim/applicability→proof binding equality. Each machine proof maps to one single-Fact Assertion and typed `semantic_fact` capability; each external proof maps to an impact-complete External Confirmation. Declare only actual applicability profiles, each with an atomic, duplicate-free dimension assignment plus exact target, journey, Given condition/input/state refs and ordered When refs. Every Claim lists all applicable profiles; every Claim-bearing Assertion proves one Claim in one matching profile and all required proof surfaces. Declare each execution target's runtime capabilities and require the production family, cold-start and production-root capabilities where applicable. Give every Assertion the minimum all-of Evidence Capabilities that can actually prove its Claim. Every behavioral Claim-bearing Assertion also needs a same-Check claim-local `replace_json_value` or `replace_text` wrong-semantic witness and a claimless target-runtime liveness Assertion that remains passing; whole-file replacement is compatibility-only and cannot prove semantic binding. Population declares a universe Binding whose carriers are Check inputs and proves exact universe = eligible = observed plus valid exclusions. Separate required success and degradation Checks. Type every external confirmation with impacted Claim refs and target-blocking effect. For selected design targets, keep resource-integrity Checks distinct from root-bound implementation conformance, freeze the validated handoff and target resources, preserve exact condition equality, map every covered handoff Source Item into separate attributable Assertions, bind each verification method to its own `design_method` evidence with exact per-condition `fact_refs`, distinct record and primary-observation paths plus a unique current primary digest for every condition, require the cell union to equal the complete target fact set, and declare current actual/comparison artifacts. Preserve every blocker's required target capabilities; use a machine Claim only on the exact capability-qualified target, otherwise keep a target-blocking External Confirmation. Playwright must attach both declared cell artifacts in every project instance. Use `context_snapshot_mode: full`. Run read-only `ty-context long-task preflight <workdir>`, repair every semantic manifest, handoff, Contract and `decision_required` error in the same Draft, then formally Compile only when ready.
|
|
67
|
+
11. When the first Compile returns `execution_model_checkpoint.required: true`, obey its terminal-turn boundary. Unless an earlier user message explicitly states this task's current-model or switch-and-resume strategy, do no product implementation, file edit, build or test after that result; end the current turn and ask the user to choose `continue_current_model` or switch models and then resume the active Long-Task. Generic “continue”, “resume”, “finish” or “continue the Goal” language does not satisfy the checkpoint. Later revisions return `required: false` and do not repeat it.
|
|
68
|
+
|
|
69
|
+
Architecture quality uses the existing authority model, not a new gate or field. The visible deliberation proves that architecture work occurred, not that subjective quality is machine-proven. Encode every material falsifiable invariant as a Source-backed technical obligation/global constraint/forbidden shortcut plus owner/path/Binding boundaries and a project-owned executable Check. Functional acceptance cannot substitute when the architecture claim can fail independently. An unverifiable design preference remains task-local, durable Context or `decision_required`; it must not be promoted into false proof.
|
|
70
|
+
|
|
71
|
+
## Rolling Execution
|
|
72
|
+
|
|
67
73
|
After Authority Lock and the one-time execution-model checkpoint are satisfied, the current Goal chooses implementation order, local planning, tools, repair hypotheses and whether one or multiple platform-native agents/subagents are useful. It may work across Outcome or Stage boundaries when that is the most efficient implementation path. Multiple-agent execution is optional, never a Harness allocation rule: agent reports are non-authoritative and Harness stores no delegation state. The derived Frontier is only an acceptance/verification and diagnosis projection: work in a later Stage cannot make an unpassed earlier gate accepted, and no implementation choice may silently change Product, Technical or Acceptance authority. All proof-bearing changes converge into the selected verification workspace.
|
|
68
|
-
|
|
69
|
-
Re-evaluate `Context Delta` whenever implementation or repair discovers a durable fact. Controlling Context changes always use Authority Revision; they require a user decision only when mapped Claims, targets, proof obligations or another decision boundary changes. Graph-derived, non-explicit `implementation-index` and `archive` are Supporting Context in referenced mode and may auto-revise when only navigation/background changed. Full snapshot mode treats every selected Context file as controlling.
|
|
70
|
-
|
|
71
|
-
If rolling implementation materially changes scope, ownership, dependency direction, the selected design or a debt disposition, refresh the Architecture Deliberation and express any authority change through marked Source/Context plus protected revision before continuing. This is refinement of the same checkpoint, not a second workflow stage.
|
|
72
|
-
|
|
73
|
-
Use `verify --explain [--outcome/--check]` when execution cost is unclear; it previews declared main and Counterfactual runner invocations without executing or writing Progress. Use targeted `verify --outcome/--check` for optional feedback and repair when its expected localization value exceeds its cost. Progress is repair evidence only and never acceptance authority. Keep precise findings attached to the owning Source item, Claim, Assertion, Check, Binding and owner path. Do not add another model-switch pause or turn delegation into a Harness scheduler, state or proof source.
|
|
74
|
-
|
|
75
|
-
When the Contract declares a target-runtime Check because a proxy can pass while the target fails independently, bind it to the earliest owning Outcome and exact target even if implementation happens in another order. Every required target is proved separately from its root; Browser evidence requires Playwright and Native/Desktop evidence requires the project binary. For material UI, a useful early feedback run inspects a runnable vertical slice through the production shell/navigation entry, not only a deep link or detached route. The first useful runnable boundary and later coalesced changes are recommended, not mandatory, targeted-feedback points. `progress_stale` is a freshness fact: refresh the Check only before an intermediate decision relies on that Progress. Continuing implementation or entering Final Gate needs no targeted refresh because Final Gate ignores Progress and reruns all Checks. Use the cheapest reliable target Check and do not mandate a full environment rebuild per Outcome or per edit. This is optional rolling feedback, not acceptance, an implementation gate, a trigger queue or per-target progress state.
|
|
76
|
-
|
|
77
|
-
When implementation discovers a blocker or missing Contract paths, first classify the revision. Difficulty or delay alone never reclassifies machine-verifiable scope as external and never removes Source; a real scope, Product, Acceptance or machine/external boundary change must first be explicit marked Source. Keep exact revision identity, old-Authority continuity, compare-and-swap adoption, evidence invalidation and the complete Final Gate for every path:
|
|
78
|
-
|
|
79
|
-
1. machine-proven monotonic strengthening auto-adopts;
|
|
80
|
-
2. locked-semantics-preserving Source/Context snapshot refresh, bounded runner/input/environment repair, repo-bound scope expansion, risk strengthening and machine-proven equivalent Counterfactual coverage auto-adopt as mechanically bounded repair;
|
|
81
|
-
3. a scope-only candidate may additionally use `ty-context long-task diagnose-revision <workdir> [--outcome <key>] [--check <key>]` to exercise only existing active Check identities with unchanged runner/verifier authority;
|
|
82
|
-
4. Product/Source Claim/target/external-confirmation change, lost scenario/Claim/Evidence Capability/failure interception, forbidden or owner-Context removal, runner type/effect change, verifier-kernel change and every unknown reason remain preview-only and require the exact user-decision identity; risk downgrade is rejected.
|
|
83
|
-
|
|
84
|
-
Candidate diagnostics are transient: they authorize no acceptance and write no pending/user-decision state, Active Authority, cache, Progress or Receipt. Keep related edits in the same `delivery-contract.yaml`; do not compile each intermediate candidate merely to obtain an identity. When the stable candidate is ready, run ordinary `compile --revise` once. If it needs a decision, first present the self-contained `pending_authority_revision.decision_brief`, which explains Authority Revision, separates `user_decision_reasons` from mechanically bounded changes, names material changes and affected Outcomes, and states reject/previous-Authority, adoption, no-completion and Final-Gate effects. If an explicit current-task instruction already covers every listed decision reason exactly, mechanically relay that existing decision through the exact approval command without asking again; generic continue/resume/finish, blanket authorization, recommendation, partial coverage or Agent inference never qualifies. Otherwise ask once for that stable exact identity. The executing Agent never originates its own weakening decision. Adoption is not delivery completion: discard invalidated evidence, run `status` or `resume`, and return to rolling implementation or repair under the revised Authority before Final Gate.
|
|
85
|
-
|
|
86
|
-
## Live Final Authority
|
|
87
|
-
|
|
88
|
-
Complete Context, implementation and project tests, create a clean candidate commit, then run `ty-context long-task final-gate <workdir>`.
|
|
89
|
-
|
|
90
|
-
Final Gate recompiles Source authority, captures semantic and raw Contract protected-input identity, validates active task/revision/compiled/worktree identity, creates one Git-tree snapshot and reruns every required Global and Outcome Check. It then recompiles again and requires unchanged Contract/fragments, Source, Controlling Context, verifier, runner and verification/workdir inputs, plus unchanged workspace/tree and Active Authority, before acceptance. It derives Stage results and target qualification from that run; it does not trust targeted Progress as a Stage pass. A target-runtime Check must exercise its exact target in that current Gate execution; rerunning a reader for a historical or tracked status report is not live target proof. Design-resource integrity, an isolated route or `visual_render` cannot replace required root-bound `design_conformance`, and unresolved design blockers remain blocking. Final Gate, Stop and close never trust historical Progress, Receipt or compiled cache.
|
|
91
|
-
|
|
92
|
-
Final Gate is the Long-Task path's sole `Architecture Conformance` carrier. It reruns the declared architecture obligations/constraints/forbidden shortcuts, owner/path/Binding boundaries and project-owned Checks on that same snapshot and blocks scope escape, bypass, duplicate authority, a second source of truth, wrong dependency direction, undeclared boundary change or new/worsened debt represented by those invariants. Do not also run the default Workflow's standalone Contract Conformance closure. Any later candidate or authority change invalidates the Gate and uses the existing freshness path again.
|
|
93
|
-
|
|
94
|
-
Machine acceptance covers only declared machine authority. Preserve every pending external confirmation through `final-gate`, `status`, `resume`, `stop-check`, the package-owned Stop Hook and `close`; accepted output identifies `acceptance_scope: declared_machine_authority` and `native_goal_effect: none`, while `closed_scope: machine_authority` means only Authority cleanup. Do not invent external-confirmation or native-Goal tracking state.
|
|
95
|
-
|
|
96
|
-
Before invoking platform-native Goal completion, perform one veto-only conformance review: compare the current Goal and user instructions with accepted marked Source, and check for pending revisions, unresolved blockers or omitted requirements. Any mismatch keeps the Goal active and returns to Source/Contract repair. A clean review does not add acceptance proof and never lets Agent judgment replace Final Gate.
|
|
97
|
-
|
|
98
|
-
## Handoff
|
|
99
|
-
|
|
74
|
+
|
|
75
|
+
Re-evaluate `Context Delta` whenever implementation or repair discovers a durable fact. Controlling Context changes always use Authority Revision; they require a user decision only when mapped Claims, targets, proof obligations or another decision boundary changes. Graph-derived, non-explicit `implementation-index` and `archive` are Supporting Context in referenced mode and may auto-revise when only navigation/background changed. Full snapshot mode treats every selected Context file as controlling.
|
|
76
|
+
|
|
77
|
+
If rolling implementation materially changes scope, ownership, dependency direction, the selected design or a debt disposition, refresh the Architecture Deliberation and express any authority change through marked Source/Context plus protected revision before continuing. This is refinement of the same checkpoint, not a second workflow stage.
|
|
78
|
+
|
|
79
|
+
Use `verify --explain [--outcome/--check]` when execution cost is unclear; it previews declared main and Counterfactual runner invocations without executing or writing Progress. Use targeted `verify --outcome/--check` for optional feedback and repair when its expected localization value exceeds its cost. Progress is repair evidence only and never acceptance authority. Keep precise findings attached to the owning Source item, Claim, Assertion, Check, Binding and owner path. Do not add another model-switch pause or turn delegation into a Harness scheduler, state or proof source.
|
|
80
|
+
|
|
81
|
+
When the Contract declares a target-runtime Check because a proxy can pass while the target fails independently, bind it to the earliest owning Outcome and exact target even if implementation happens in another order. Every required target is proved separately from its root; Browser evidence requires Playwright and Native/Desktop evidence requires the project binary. For material UI, a useful early feedback run inspects a runnable vertical slice through the production shell/navigation entry, not only a deep link or detached route. The first useful runnable boundary and later coalesced changes are recommended, not mandatory, targeted-feedback points. `progress_stale` is a freshness fact: refresh the Check only before an intermediate decision relies on that Progress. Continuing implementation or entering Final Gate needs no targeted refresh because Final Gate ignores Progress and reruns all Checks. Use the cheapest reliable target Check and do not mandate a full environment rebuild per Outcome or per edit. This is optional rolling feedback, not acceptance, an implementation gate, a trigger queue or per-target progress state.
|
|
82
|
+
|
|
83
|
+
When implementation discovers a blocker or missing Contract paths, first classify the revision. Difficulty or delay alone never reclassifies machine-verifiable scope as external and never removes Source; a real scope, Product, Acceptance or machine/external boundary change must first be explicit marked Source. Keep exact revision identity, old-Authority continuity, compare-and-swap adoption, evidence invalidation and the complete Final Gate for every path:
|
|
84
|
+
|
|
85
|
+
1. machine-proven monotonic strengthening auto-adopts;
|
|
86
|
+
2. locked-semantics-preserving Source/Context snapshot refresh, bounded runner/input/environment repair, repo-bound scope expansion, risk strengthening and machine-proven equivalent Counterfactual coverage auto-adopt as mechanically bounded repair;
|
|
87
|
+
3. a scope-only candidate may additionally use `ty-context long-task diagnose-revision <workdir> [--outcome <key>] [--check <key>]` to exercise only existing active Check identities with unchanged runner/verifier authority;
|
|
88
|
+
4. Product/Source Claim/target/external-confirmation change, lost scenario/Claim/Evidence Capability/failure interception, forbidden or owner-Context removal, runner type/effect change, verifier-kernel change and every unknown reason remain preview-only and require the exact user-decision identity; risk downgrade is rejected.
|
|
89
|
+
|
|
90
|
+
Candidate diagnostics are transient: they authorize no acceptance and write no pending/user-decision state, Active Authority, cache, Progress or Receipt. Keep related edits in the same `delivery-contract.yaml`; do not compile each intermediate candidate merely to obtain an identity. When the stable candidate is ready, run ordinary `compile --revise` once. If it needs a decision, first present the self-contained `pending_authority_revision.decision_brief`, which explains Authority Revision, separates `user_decision_reasons` from mechanically bounded changes, names material changes and affected Outcomes, and states reject/previous-Authority, adoption, no-completion and Final-Gate effects. If an explicit current-task instruction already covers every listed decision reason exactly, mechanically relay that existing decision through the exact approval command without asking again; generic continue/resume/finish, blanket authorization, recommendation, partial coverage or Agent inference never qualifies. Otherwise ask once for that stable exact identity. The executing Agent never originates its own weakening decision. Adoption is not delivery completion: discard invalidated evidence, run `status` or `resume`, and return to rolling implementation or repair under the revised Authority before Final Gate.
|
|
91
|
+
|
|
92
|
+
## Live Final Authority
|
|
93
|
+
|
|
94
|
+
Complete Context, implementation and project tests, create a clean candidate commit, then run `ty-context long-task final-gate <workdir>`.
|
|
95
|
+
|
|
96
|
+
Final Gate recompiles Source authority, captures semantic and raw Contract protected-input identity, validates active task/revision/compiled/worktree identity, creates one Git-tree snapshot and reruns every required Global and Outcome Check. It requires exactly one current typed semantic result for every and only every compiled Fact × machine-method obligation, preserving actual observation/environment, frozen expected/comparison/tolerance/mask/Oracle authority and passing verdict; external obligations remain named confirmations. It then recompiles again and requires unchanged Contract/fragments, Source semantic manifest, Controlling Context, verifier, runner and verification/workdir inputs, plus unchanged workspace/tree and Active Authority, before acceptance. It derives Stage results and target qualification from that run; it does not trust targeted Progress as a Stage pass. A target-runtime Check must exercise its exact target in that current Gate execution; rerunning a reader for a historical or tracked status report is not live target proof. Design-resource integrity, an isolated route or `visual_render` cannot replace required root-bound `design_conformance`, and unresolved semantic or design blockers remain blocking. Final Gate, Stop and close never trust historical Progress, Receipt or compiled cache.
|
|
97
|
+
|
|
98
|
+
Final Gate is the Long-Task path's sole `Architecture Conformance` carrier. It reruns the declared architecture obligations/constraints/forbidden shortcuts, owner/path/Binding boundaries and project-owned Checks on that same snapshot and blocks scope escape, bypass, duplicate authority, a second source of truth, wrong dependency direction, undeclared boundary change or new/worsened debt represented by those invariants. Do not also run the default Workflow's standalone Contract Conformance closure. Any later candidate or authority change invalidates the Gate and uses the existing freshness path again.
|
|
99
|
+
|
|
100
|
+
Machine acceptance covers only declared machine authority. Preserve every pending external confirmation through `final-gate`, `status`, `resume`, `stop-check`, the package-owned Stop Hook and `close`; accepted output identifies `acceptance_scope: declared_machine_authority` and `native_goal_effect: none`, while `closed_scope: machine_authority` means only Authority cleanup. Do not invent external-confirmation or native-Goal tracking state.
|
|
101
|
+
|
|
102
|
+
Before invoking platform-native Goal completion, perform one veto-only conformance review: compare the current Goal and user instructions with accepted marked Source, and check for pending revisions, unresolved blockers or omitted requirements. Any mismatch keeps the Goal active and returns to Source/Contract repair. A clean review does not add acceptance proof and never lets Agent judgment replace Final Gate.
|
|
103
|
+
|
|
104
|
+
## Handoff
|
|
105
|
+
|
|
100
106
|
Report implementation, effective risk, Architecture Deliberation/Conformance status, Claim Coverage, Stage frontier/results, declared target profile, exact `target_state`, Live Gate result, acceptance scope, every pending external confirmation, Context status and blockers. Use verifier terms exactly: `progress_passing` means targeted repair evidence, `progress_stale` is a freshness fact rather than a current pass or immediate rerun command, `final_workflow_status: null` means unfinished, `authority_revision_adopted` means return to rolling execution, and `machine_accepted_external_pending` must retain its named confirmations and never be summarized as `AcceptedDeliveryTerminal` or full no-drift delivery. Contract target states are only `implementation_complete`, `target_profile_usable` and `production_release_ready`; terminal failure uses `not_accepted` or `blocked_external`. Never shorten targeted progress to “Outcome complete” or invent per-platform progress/status. State the theorem boundary honestly: undeclared or inaccurate Source cannot be discovered mechanically; the named project oracle must be semantically sound; the supported direct-literal verifier dependency graph is frozen while other declared verification inputs, indirect runtime access, installed package/runtime behavior, Harness verifier and Git metadata form the trusted computing boundary; the visible checkpoint cannot prove private reasoning or universal future-proofing; native-Goal/model selection belongs to the host/user; and internal platform delegation is not observed.
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "Long-Task Workflow"
|
|
3
3
|
short_description: "Run one Delivery Contract in the current native Goal"
|
|
4
|
-
default_prompt: "Use
|
|
4
|
+
default_prompt: "Use $long-task-workflow to prepare, execute, resume, verify, or close one Canonical Delivery Contract in the current workspace."
|
|
5
|
+
policy:
|
|
6
|
+
allow_implicit_invocation: false
|