project-tiny-context-harness 0.7.5 → 0.7.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.
Files changed (38) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +351 -345
  3. package/assets/README.md +535 -529
  4. package/assets/README.zh-CN.md +299 -293
  5. package/assets/agents/.gitkeep +1 -1
  6. package/assets/agents/AGENTS_CORE.md +52 -52
  7. package/assets/context_templates/architecture.md +33 -33
  8. package/assets/context_templates/area.md +39 -39
  9. package/assets/context_templates/context.toml +30 -30
  10. package/assets/context_templates/deployment.md +35 -35
  11. package/assets/context_templates/global.md +51 -51
  12. package/assets/context_templates/product-surface-contract.md +58 -58
  13. package/assets/context_templates/verification.md +32 -32
  14. package/assets/github/.gitkeep +1 -1
  15. package/assets/github/harness.yml +41 -41
  16. package/assets/make/.gitkeep +1 -1
  17. package/assets/make/ty-context.mk +48 -48
  18. package/assets/skills/context_development_engineer/SKILL.md +89 -89
  19. package/assets/skills/context_full_project_export/SKILL.md +70 -70
  20. package/assets/skills/context_harness_upgrade/SKILL.md +60 -60
  21. package/assets/skills/context_product_plan/SKILL.md +74 -74
  22. package/assets/skills/context_surface_contract/SKILL.md +165 -165
  23. package/assets/skills/context_uiux_design/SKILL.md +92 -92
  24. package/assets/skills/design-resource-authoring/SKILL.md +65 -0
  25. package/assets/skills/design-resource-authoring/references/downstream-handoff.md +126 -0
  26. package/assets/skills/design-resource-authoring/references/open-design-provider.md +112 -0
  27. package/assets/skills/design-resource-authoring/references/resource-selection.md +124 -0
  28. package/assets/skills/long-task-workflow/SKILL.md +82 -81
  29. package/assets/skills/long-task-workflow/agents/openai.yaml +4 -4
  30. package/assets/skills/long-task-workflow/references/authority-lifecycle.md +56 -56
  31. package/assets/skills/long-task-workflow/references/contract-authoring.md +88 -88
  32. package/assets/skills/long-task-workflow/references/evidence-design.md +69 -69
  33. package/assets/skills/normal-long-task/SKILL.md +12 -12
  34. package/assets/skills/source-plan-authoring/SKILL.md +291 -291
  35. package/dist/lib/profiles.js +1 -0
  36. package/migrations/README.md +15 -15
  37. package/package.json +1 -1
  38. package/source-mappings.yaml +25 -25
package/assets/README.md CHANGED
@@ -1,544 +1,550 @@
1
- # Project Tiny Context Harness
2
-
3
- [![npm version](https://img.shields.io/npm/v/project-tiny-context-harness.svg)](https://www.npmjs.com/package/project-tiny-context-harness)
4
- [![Package CI](https://github.com/Seven128/project-tiny-context-harness/actions/workflows/package.yml/badge.svg)](https://github.com/Seven128/project-tiny-context-harness/actions/workflows/package.yml)
5
- [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/Seven128/project-tiny-context-harness/badge)](https://securityscorecards.dev/viewer/?uri=github.com/Seven128/project-tiny-context-harness)
6
- [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
7
- [![Open in GitHub Codespaces](https://img.shields.io/badge/open%20in-Codespaces-181717?logo=github)](https://codespaces.new/Seven128/project-tiny-context-harness)
8
-
9
- Translations: [Chinese (Simplified)](README.zh-CN.md)
10
-
11
- Project Tiny Context Harness is repo-native project memory for AI coding agents, plus a narrow delivery harness for trustworthy long-task completion. The product principle is: keep the memory, drop the ceremony. It adds durable project memory behind `AGENTS.md` without becoming an agent scheduler or Git orchestrator.
12
-
13
- Public launch surfaces are English-first; localized documents are secondary entry points.
14
-
15
- Best for:
16
-
17
- - repositories where coding agents repeatedly rediscover project intent;
18
- - teams using multiple agents or frequent fresh chats;
19
- - maintainers who want durable Context and explicit long-task evidence.
20
-
21
- Not for:
22
-
23
- - replacing project tests, review, CI or human acceptance;
24
- - autonomous Tiny Context execution;
25
- - codebase semantic indexing or external docs retrieval.
26
-
27
- Concrete shift:
28
-
29
- ```text
30
- Before: ask a fresh agent to read the repo and tell you what matters.
31
- After: ask it to read AGENTS.md and project_context/** first, then summarize goal, non-goals, architecture boundaries and validation paths before proposing code.
32
- ```
33
-
34
- What gets added:
35
-
36
- ```mermaid
37
- flowchart LR
38
- A["Fresh agent session"] --> B["AGENTS.md startup router"]
39
- B --> C["project_context/** durable facts"]
40
- C --> D["Goal, boundaries, validation paths"]
41
- D --> E["Implementation and delivery work"]
42
- F["Tests / CI / review"] --> G["Product quality evidence"]
43
- C -. "does not own" .-> G
44
- ```
45
-
46
- ![Project Tiny Context Harness terminal demo](https://raw.githubusercontent.com/Seven128/project-tiny-context-harness/main/docs/launch/assets/demo-terminal.gif)
47
-
48
- The demo shows the core loop: initialize `AGENTS.md` and `project_context/**`, run `validate-context`, then ask a fresh agent to recover intent before proposing code. Use the npm install path below, or inspect the no-install previews first.
49
-
50
- Install:
51
-
52
- ```sh
53
- npm install -D project-tiny-context-harness@latest
54
- npx --yes --package project-tiny-context-harness@latest ty-context init
55
- ```
56
-
57
- No-install preview:
58
-
59
- - Read the [fresh-agent recovery walkthrough](docs/examples/fresh-agent-recovery.md).
60
- - Inspect the [Minimal Context sample guide](docs/examples/minimal-context-sample.md).
61
- - Browse the tiny generated repository at [examples/minimal-context-sample/](examples/minimal-context-sample/).
62
-
63
- ## Why It Exists
64
-
65
- Coding agents need two different kinds of help:
66
-
67
- - durable facts that survive sessions without loading the whole repository;
68
- - trustworthy completion checks when a task spans many edits or context compactions.
69
-
70
- Tiny Context keeps those concerns narrow. `project_context/**` records durable ownership, architecture, contracts and repeatable verification. The default Workflow Contract combines manifest routing with one bounded Context search before `Context Delta`. The explicit Long-Task Workflow adds one machine-checked Delivery Contract, a one-time post-Authority-Lock model choice, rolling repair verification, a same-snapshot Final Gate and Stop freshness.
71
-
72
- It does not launch or switch models, spawn agents, create branches or worktrees, merge, push, open pull requests, deploy, or claim to replace project tests and human acceptance.
73
-
74
- ## Capability Model
75
-
76
- 1. **Minimal Context** — small, role-aware durable facts under `project_context/**`.
77
- 2. **Workflow Contract** — Context-first default engineering behavior using the platform's internal plan; no required plan artifact.
78
- 3. **Long-Task Workflow** — explicit Single-Goal Rolling Delivery with `long-task-delivery-v2`, compiled Claim Coverage and a verifier-owned Live Final Gate.
79
-
80
- The opt-in long-task profile also provides `/source-plan-authoring`, an upstream Source-quality helper rather than another authority layer.
1
+ # Project Tiny Context Harness
2
+
3
+ [![npm version](https://img.shields.io/npm/v/project-tiny-context-harness.svg)](https://www.npmjs.com/package/project-tiny-context-harness)
4
+ [![Package CI](https://github.com/Seven128/project-tiny-context-harness/actions/workflows/package.yml/badge.svg)](https://github.com/Seven128/project-tiny-context-harness/actions/workflows/package.yml)
5
+ [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/Seven128/project-tiny-context-harness/badge)](https://securityscorecards.dev/viewer/?uri=github.com/Seven128/project-tiny-context-harness)
6
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
7
+ [![Open in GitHub Codespaces](https://img.shields.io/badge/open%20in-Codespaces-181717?logo=github)](https://codespaces.new/Seven128/project-tiny-context-harness)
8
+
9
+ Translations: [Chinese (Simplified)](README.zh-CN.md)
10
+
11
+ Project Tiny Context Harness is repo-native project memory for AI coding agents, plus a narrow delivery harness for trustworthy long-task completion. The product principle is: keep the memory, drop the ceremony. It adds durable project memory behind `AGENTS.md` without becoming an agent scheduler or Git orchestrator.
12
+
13
+ Public launch surfaces are English-first; localized documents are secondary entry points.
14
+
15
+ Best for:
16
+
17
+ - repositories where coding agents repeatedly rediscover project intent;
18
+ - teams using multiple agents or frequent fresh chats;
19
+ - maintainers who want durable Context and explicit long-task evidence.
20
+
21
+ Not for:
22
+
23
+ - replacing project tests, review, CI or human acceptance;
24
+ - autonomous Tiny Context execution;
25
+ - codebase semantic indexing or external docs retrieval.
26
+
27
+ Concrete shift:
28
+
29
+ ```text
30
+ Before: ask a fresh agent to read the repo and tell you what matters.
31
+ After: ask it to read AGENTS.md and project_context/** first, then summarize goal, non-goals, architecture boundaries and validation paths before proposing code.
32
+ ```
33
+
34
+ What gets added:
35
+
36
+ ```mermaid
37
+ flowchart LR
38
+ A["Fresh agent session"] --> B["AGENTS.md startup router"]
39
+ B --> C["project_context/** durable facts"]
40
+ C --> D["Goal, boundaries, validation paths"]
41
+ D --> E["Implementation and delivery work"]
42
+ F["Tests / CI / review"] --> G["Product quality evidence"]
43
+ C -. "does not own" .-> G
44
+ ```
45
+
46
+ ![Project Tiny Context Harness terminal demo](https://raw.githubusercontent.com/Seven128/project-tiny-context-harness/main/docs/launch/assets/demo-terminal.gif)
47
+
48
+ The demo shows the core loop: initialize `AGENTS.md` and `project_context/**`, run `validate-context`, then ask a fresh agent to recover intent before proposing code. Use the npm install path below, or inspect the no-install previews first.
49
+
50
+ Install:
51
+
52
+ ```sh
53
+ npm install -D project-tiny-context-harness@latest
54
+ npx --yes --package project-tiny-context-harness@latest ty-context init
55
+ ```
56
+
57
+ No-install preview:
58
+
59
+ - Read the [fresh-agent recovery walkthrough](docs/examples/fresh-agent-recovery.md).
60
+ - Inspect the [Minimal Context sample guide](docs/examples/minimal-context-sample.md).
61
+ - Browse the tiny generated repository at [examples/minimal-context-sample/](examples/minimal-context-sample/).
62
+
63
+ ## Why It Exists
64
+
65
+ Coding agents need two different kinds of help:
66
+
67
+ - durable facts that survive sessions without loading the whole repository;
68
+ - trustworthy completion checks when a task spans many edits or context compactions.
69
+
70
+ Tiny Context keeps those concerns narrow. `project_context/**` records durable ownership, architecture, contracts and repeatable verification. The default Workflow Contract combines manifest routing with one bounded Context search before `Context Delta`. The explicit Long-Task Workflow adds one machine-checked Delivery Contract, a one-time post-Authority-Lock model choice, rolling repair verification, a same-snapshot Final Gate and Stop freshness.
71
+
72
+ It does not launch or switch models, spawn agents, create branches or worktrees, merge, push, open pull requests, deploy, or claim to replace project tests and human acceptance.
73
+
74
+ ## Capability Model
75
+
76
+ 1. **Minimal Context** — small, role-aware durable facts under `project_context/**`.
77
+ 2. **Workflow Contract** — Context-first default engineering behavior using the platform's internal plan; no required plan artifact.
78
+ 3. **Long-Task Workflow** — explicit Single-Goal Rolling Delivery with `long-task-delivery-v2`, compiled Claim Coverage and a verifier-owned Live Final Gate.
79
+
80
+ The base managed set also provides `/design-resource-authoring`, an explicitly triggered thin commissioner for task-local Open Design resources rather than a generation engine or authority layer. The opt-in long-task profile additionally provides `/source-plan-authoring`, an upstream Source-quality helper.
81
81
 
82
82
  Default profiles are `core-portable` and `workflow-default`. Enable the opt-in profile with:
83
-
84
- ```powershell
85
- ty-context enable long-task
86
- ```
87
-
88
- This installs `/source-plan-authoring`, `/long-task-workflow` and the completion Hook. It does not install an agent runtime, model worker, scheduler, Git orchestration assets or a design-generation system.
89
-
90
- ## Try It In 60 Seconds
91
-
92
- ```sh
93
- mkdir project-tiny-context-harness-demo
94
- cd project-tiny-context-harness-demo
95
- git init
96
- npm init -y
97
- npm install -D project-tiny-context-harness@latest
98
- npx --yes --package project-tiny-context-harness@latest ty-context init
99
- make validate-context
100
- ```
101
-
102
- Then open `AGENTS.md`, `project_context/global.md` and `project_context/architecture.md`.
103
-
104
- Expected result:
105
-
106
- ```text
107
- AGENTS.md
108
- project_context/
109
- context.toml
110
- global.md
111
- architecture.md
112
- areas/main.md
113
- areas/main/verification.md
114
- ```
115
-
116
- Fresh-agent test prompt:
117
-
118
- ```text
119
- Read AGENTS.md and project_context/** first. Summarize the project goal, non-goals, architecture boundaries, validation entry points and next safe action before proposing code changes.
120
- ```
121
-
122
- For an existing repository, use `npx --yes --package project-tiny-context-harness@latest ty-context init --adopt`.
123
-
124
- ### Source checkout preview:
125
-
126
- Open <https://codespaces.new/Seven128/project-tiny-context-harness>, or run locally:
127
-
128
- ```sh
129
- git clone https://github.com/Seven128/project-tiny-context-harness.git
130
- cd project-tiny-context-harness
131
- npm ci
132
- npm run smoke:quickstart
133
- npm run preview:pack
134
- ```
135
-
136
- The smoke packs the local workspace, installs it into a disposable repo and validates the generated Minimal Context files. Use this path for package development, source-preview testing or private review.
137
-
138
- ```sh
139
- cd /path/to/your/test-repo
140
- npm install -D /path/to/project-tiny-context-harness/tmp/ty-context/source-preview/package/project-tiny-context-harness-0.7.5.tgz
141
- npx --no-install ty-context init --adopt
142
- make validate-context
143
- ```
144
-
145
- If it fails, open a [Source preview report](https://github.com/Seven128/project-tiny-context-harness/issues/new?template=source_preview_report.yml).
146
-
147
- ## Positioning
148
-
149
- | Adjacent tool type | Use it for | Harness stance |
150
- |---|---|---|
151
- | Spec-first kits | Turning a feature idea into structured specs and plans. | Complementary; Harness keeps durable repo facts beyond one feature spec. |
152
- | BMAD-style workflows and full Tiny Context processes | Role/process ceremony for selected work. | Lighter default; ordinary work stays Context-first. |
153
- | Task Master-style planners | Backlog decomposition and task state. | Complementary; Harness does not own backlog state. |
154
- | Context7/Serena-style retrieval | External docs, symbols or repository retrieval. | Complementary; Harness owns local intended boundaries. |
155
-
156
- ## Minimal Context
157
-
158
- The default read path is:
159
-
160
- ```text
161
- project_context/global.md
162
- project_context/architecture.md
163
- project_context/context.toml
164
- minimum graph-relevant area/role Context
165
- ```
166
-
167
- Only near-universal recovery facts should use `read_policy = "default"`; specialized architecture, contract, deployment and historical detail should be task-triggered `on-demand` Context. Before deciding `Context Delta`, the Agent also runs one bounded text search over `project_context/**` using a small set of high-signal task terms such as explicit area/module names and API/schema/state/security/verification/deployment language. Matching files are merged with manifest candidates and filtered by semantic relevance. This is not a vector or persistent retrieval system and creates no index, cache, registry, search state or authority.
168
-
169
- `ty-context doctor` reports the deterministic default read footprint, per-file/total soft-budget overages, byte-identical default files and `DESIGN.md` authority status. These are advisory maintenance signals, not a new validation gate or workflow state.
170
-
171
- Typical roles are area/domain, contract, foundation, decision-rationale, implementation-index, verification and deployment. Context owns durable intended boundaries; code owns current implementation; tests, CI, browser/runtime evidence and people own behavior and product acceptance.
172
-
173
- Every engineering handoff reports one Context result:
174
-
175
- ```text
176
- Context: updated <files/reason>
177
- # or
178
- Context: no durable fact change
179
- ```
180
-
181
- ## Default Workflow Contract
182
-
183
- Ordinary tasks stay lightweight:
184
-
185
- 1. read core/default Context and collect manifest candidates;
186
- 2. run one bounded Context search over `project_context/**` and read only relevant matches;
187
- 3. decide `Context Delta: none|required`;
188
- 4. update owning Context first when durable semantics change;
189
- 5. use the platform's internal plan;
190
- 6. implement and run project-owned verification;
191
- 7. perform Contract Conformance and Context drift checks.
192
-
193
- The default workflow creates no required `plan.md`, matrix, verdict, evidence ledger, persistent Context-search index or second execution plan. Task length, file count and complexity never auto-enable long-task state.
194
-
195
- Plan Validator commands no longer exist; existing plan, matrix or verdict files remain ordinary user files.
196
-
197
- ### Architecture And Modularity Guidance
198
-
199
- Technical architecture support is a Minimal Context capability. For high-risk work, `Architecture Context Hit`, `Decision Rationale Hit: existing|required|none` and `Modularity Check: none|required|exception` are internal routing questions inside the platform's internal plan. No Task Contract or fixed `plan.md` is required. The architecture gate is risk-triggered for durable module/capability boundaries, public API/schema/data or persistence, source-of-truth/state ownership, dependency direction, cross-area work, migration/security/recovery and reusable abstractions. It resolves owner, unique source of truth, dependency direction, interface/state lifecycle, failure/recovery/compatibility, forbidden shortcuts and the project-owned executable check that protects the boundary. Small fixes do not pay this ceremony.
200
-
201
- Do not invent rationale: store stable reasons, rejected alternatives or tradeoffs only in the smallest durable Context surface, and remember that architecture Context does not prove product quality. Harness may route repository-native lint/AST/dependency/contract checks, but it does not become a language-generic architecture analyzer.
202
-
203
- `ty-context check-modularity` audits selected handwritten source and identifies the highest-risk function and line for statement/branch findings. `validate-code-modularity` and `validate-harness` enforce it separately from `validate-context`.
204
-
205
- #### Modularity Policy
206
-
207
- Newly generated Harness configs default to `strict_except_generated`. Generated/build files remain excluded; `strict_except_generated` rejects configured `modularity.waivers`. Projects with bounded legacy exceptions may opt into `scoped_waivers`, whose entries require `path`, `category`, `owner`, `introduced_at`, `reason`, `tracking_issue` and `expiry_condition`.
208
-
209
- ### Product Surface Contract
210
-
83
+
84
+ ```powershell
85
+ ty-context enable long-task
86
+ ```
87
+
88
+ This additionally installs `/source-plan-authoring`, `/long-task-workflow` and the completion Hook. `/design-resource-authoring` is already in the base managed set. Tiny Context does not install Open Design, an agent runtime, model worker, scheduler, Git orchestration assets or another design-generation runtime.
89
+
90
+ ## Try It In 60 Seconds
91
+
92
+ ```sh
93
+ mkdir project-tiny-context-harness-demo
94
+ cd project-tiny-context-harness-demo
95
+ git init
96
+ npm init -y
97
+ npm install -D project-tiny-context-harness@latest
98
+ npx --yes --package project-tiny-context-harness@latest ty-context init
99
+ make validate-context
100
+ ```
101
+
102
+ Then open `AGENTS.md`, `project_context/global.md` and `project_context/architecture.md`.
103
+
104
+ Expected result:
105
+
106
+ ```text
107
+ AGENTS.md
108
+ project_context/
109
+ context.toml
110
+ global.md
111
+ architecture.md
112
+ areas/main.md
113
+ areas/main/verification.md
114
+ ```
115
+
116
+ Fresh-agent test prompt:
117
+
118
+ ```text
119
+ Read AGENTS.md and project_context/** first. Summarize the project goal, non-goals, architecture boundaries, validation entry points and next safe action before proposing code changes.
120
+ ```
121
+
122
+ For an existing repository, use `npx --yes --package project-tiny-context-harness@latest ty-context init --adopt`.
123
+
124
+ ### Source checkout preview:
125
+
126
+ Open <https://codespaces.new/Seven128/project-tiny-context-harness>, or run locally:
127
+
128
+ ```sh
129
+ git clone https://github.com/Seven128/project-tiny-context-harness.git
130
+ cd project-tiny-context-harness
131
+ npm ci
132
+ npm run smoke:quickstart
133
+ npm run preview:pack
134
+ ```
135
+
136
+ The smoke packs the local workspace, installs it into a disposable repo and validates the generated Minimal Context files. Use this path for package development, source-preview testing or private review.
137
+
138
+ ```sh
139
+ cd /path/to/your/test-repo
140
+ npm install -D /path/to/project-tiny-context-harness/tmp/ty-context/source-preview/package/project-tiny-context-harness-0.7.6.tgz
141
+ npx --no-install ty-context init --adopt
142
+ make validate-context
143
+ ```
144
+
145
+ If it fails, open a [Source preview report](https://github.com/Seven128/project-tiny-context-harness/issues/new?template=source_preview_report.yml).
146
+
147
+ ## Positioning
148
+
149
+ | Adjacent tool type | Use it for | Harness stance |
150
+ |---|---|---|
151
+ | Spec-first kits | Turning a feature idea into structured specs and plans. | Complementary; Harness keeps durable repo facts beyond one feature spec. |
152
+ | BMAD-style workflows and full Tiny Context processes | Role/process ceremony for selected work. | Lighter default; ordinary work stays Context-first. |
153
+ | Task Master-style planners | Backlog decomposition and task state. | Complementary; Harness does not own backlog state. |
154
+ | Context7/Serena-style retrieval | External docs, symbols or repository retrieval. | Complementary; Harness owns local intended boundaries. |
155
+
156
+ ## Minimal Context
157
+
158
+ The default read path is:
159
+
160
+ ```text
161
+ project_context/global.md
162
+ project_context/architecture.md
163
+ project_context/context.toml
164
+ minimum graph-relevant area/role Context
165
+ ```
166
+
167
+ Only near-universal recovery facts should use `read_policy = "default"`; specialized architecture, contract, deployment and historical detail should be task-triggered `on-demand` Context. Before deciding `Context Delta`, the Agent also runs one bounded text search over `project_context/**` using a small set of high-signal task terms such as explicit area/module names and API/schema/state/security/verification/deployment language. Matching files are merged with manifest candidates and filtered by semantic relevance. This is not a vector or persistent retrieval system and creates no index, cache, registry, search state or authority.
168
+
169
+ `ty-context doctor` reports the deterministic default read footprint, per-file/total soft-budget overages, byte-identical default files and `DESIGN.md` authority status. These are advisory maintenance signals, not a new validation gate or workflow state.
170
+
171
+ Typical roles are area/domain, contract, foundation, decision-rationale, implementation-index, verification and deployment. Context owns durable intended boundaries; code owns current implementation; tests, CI, browser/runtime evidence and people own behavior and product acceptance.
172
+
173
+ Every engineering handoff reports one Context result:
174
+
175
+ ```text
176
+ Context: updated <files/reason>
177
+ # or
178
+ Context: no durable fact change
179
+ ```
180
+
181
+ ## Default Workflow Contract
182
+
183
+ Ordinary tasks stay lightweight:
184
+
185
+ 1. read core/default Context and collect manifest candidates;
186
+ 2. run one bounded Context search over `project_context/**` and read only relevant matches;
187
+ 3. decide `Context Delta: none|required`;
188
+ 4. update owning Context first when durable semantics change;
189
+ 5. use the platform's internal plan;
190
+ 6. implement and run project-owned verification;
191
+ 7. perform Contract Conformance and Context drift checks.
192
+
193
+ The default workflow creates no required `plan.md`, matrix, verdict, evidence ledger, persistent Context-search index or second execution plan. Task length, file count and complexity never auto-enable long-task state.
194
+
195
+ Plan Validator commands no longer exist; existing plan, matrix or verdict files remain ordinary user files.
196
+
197
+ ### Architecture And Modularity Guidance
198
+
199
+ Technical architecture support is a Minimal Context capability. For high-risk work, `Architecture Context Hit`, `Decision Rationale Hit: existing|required|none` and `Modularity Check: none|required|exception` are internal routing questions inside the platform's internal plan. No Task Contract or fixed `plan.md` is required. The architecture gate is risk-triggered for durable module/capability boundaries, public API/schema/data or persistence, source-of-truth/state ownership, dependency direction, cross-area work, migration/security/recovery and reusable abstractions. It resolves owner, unique source of truth, dependency direction, interface/state lifecycle, failure/recovery/compatibility, forbidden shortcuts and the project-owned executable check that protects the boundary. Small fixes do not pay this ceremony.
200
+
201
+ Do not invent rationale: store stable reasons, rejected alternatives or tradeoffs only in the smallest durable Context surface, and remember that architecture Context does not prove product quality. Harness may route repository-native lint/AST/dependency/contract checks, but it does not become a language-generic architecture analyzer.
202
+
203
+ `ty-context check-modularity` audits selected handwritten source and identifies the highest-risk function and line for statement/branch findings. `validate-code-modularity` and `validate-harness` enforce it separately from `validate-context`.
204
+
205
+ #### Modularity Policy
206
+
207
+ Newly generated Harness configs default to `strict_except_generated`. Generated/build files remain excluded; `strict_except_generated` rejects configured `modularity.waivers`. Projects with bounded legacy exceptions may opt into `scoped_waivers`, whose entries require `path`, `category`, `owner`, `introduced_at`, `reason`, `tracking_issue` and `expiry_condition`.
208
+
209
+ ### Product Surface Contract
210
+
211
211
  `context_surface_contract` compiles durable screen/page/CLI responsibility using existing `contract`, area/subdomain and verification roles. `product-surface-contract.md` owns cross-surface/main-versus-drilldown responsibility; optional on-demand `screen-contract.md` goes deeper for one screen's entry/exit/shared state, information hierarchy, semantic regions, navigation/variants, material controls and target/verification references. This workflow must not add a new Context role or claim product-quality proof, and local style fixes do not require a Screen Contract.
212
212
 
213
213
  For material UI, **UI Authority Closure** reconciles each stable surface/control/target key as covered by existing Context, requiring a Context update, task-local, explicitly out of scope or genuinely decision-required. Product Surface Context owns cross-surface responsibility, Screen/interaction Context owns durable hierarchy and behavior, `DESIGN.md` owns visual-system/reference semantics, authored targets own concrete declared composition and the Delivery Contract only binds/proves this delivery. Conflicts fail closed; current code, timestamps, YAML or implementation screenshots do not silently win.
214
-
215
- ### Visual Delivery Guidance
216
-
217
- The default Workflow now performs UI Authority Closure and a conditional Design Authority Check before material production UI: new/redesigned screens, primary layout/navigation/theme/component-system work, high-fidelity implementation and substantial visual polish. It reads the owning Surface/Screen/Control Context, `DESIGN.md`, one authored exact token source/generation direction and selected design references. Each reference is `exact-target`, `constraint` or `inspiration`; an unconfigured starter, candidate, style-only prose or inspiration does not authorize invented production layout. A configured project visual system is not a claim that every page is implementation-ready. Standalone resource generation stays with dedicated external Product Design/Figma/prototype systems; downstream durable adoption/repair routes through `context_uiux_design`. Ordinary implementation with sufficient authority, local style fixes and throwaway prototypes remain lightweight.
218
-
219
- For material work, `context_uiux_design` keeps a task-local risk-proportional Visual Coverage Set across production surfaces/components, viewports, themes/modes, states, content stress and accessibility/motion conditions. Durable surface/interaction facts remain in `project_context/**`; durable visual semantics and the design-reference registry remain in `DESIGN.md`; versioned targets stay at project-native paths. `context_development_engineer` binds that intent to production routes and reports only combinations actually rendered and checked. An implementation screenshot cannot become its own target.
220
-
214
+
215
+ ### Visual Delivery Guidance
216
+
217
+ The default Workflow now performs UI Authority Closure and a conditional Design Authority Check before material production UI: new/redesigned screens, primary layout/navigation/theme/component-system work, high-fidelity implementation and substantial visual polish. It reads the owning Surface/Screen/Control Context, `DESIGN.md`, one authored exact token source/generation direction and selected design references. Each reference is `exact-target`, `constraint` or `inspiration`; an unconfigured starter, candidate, style-only prose or inspiration does not authorize invented production layout. A configured project visual system is not a claim that every page is implementation-ready. Explicit standalone resource generation routes to `/design-resource-authoring`, which commissions external Open Design capabilities without adopting authority; downstream durable adoption/repair routes through `context_uiux_design`. Ordinary implementation with sufficient authority, local style fixes and throwaway prototypes remain lightweight.
218
+
219
+ For material work, `context_uiux_design` keeps a task-local risk-proportional Visual Coverage Set across production surfaces/components, viewports, themes/modes, states, content stress and accessibility/motion conditions. Durable surface/interaction facts remain in `project_context/**`; durable visual semantics and the design-reference registry remain in `DESIGN.md`; versioned targets stay at project-native paths. `context_development_engineer` binds that intent to production routes and reports only combinations actually rendered and checked. An implementation screenshot cannot become its own target.
220
+
221
221
  An explicit Long-Task resolves missing/conflicting UI authority before Compile, then preserves every applicable Control field through the existing projection: surface, region/location, type/label, user task, visibility/availability, trigger/input/validation/default, interaction/navigation, loading/empty/success/failure/recovery/permission/feedback and accessibility. Each non-empty field is an independent Source-backed Control Claim and protected product semantic; omitted fields create no Claim. Existing Requirement, Control, Assertion, Stage, Binding, proof-surface, verification-input, revision and `external_confirmation` mechanisms remain the only lifecycle.
222
222
 
223
223
  Combined design-and-implementation work may author candidates in ordinary Outcomes/Stages, but a candidate or planned target cannot authorize fidelity implementation. The selection must become real marked Source plus the owning registry/target input and, after Authority Lock, an adopted protected revision. Browser visual ACs use `ui_browser`; a browser proxy cannot prove a native target that can fail independently, so native target proof remains a project-owned current-execution Check when representable or an external confirmation. Frozen screenshot baselines are verifier inputs, generated screenshots/diffs are review artifacts, and subjective approval remains external. This adds no `uiux_delivery` block, visual Claim type, risk level, lifecycle state, Gate, required design directory or universal pixel threshold.
224
224
 
225
225
  `ty-context doctor` keeps its compatible `missing | unconfigured | configured` project-level status and adds advisory Design Authority Index, token-source and classified-reference signals. It explicitly does not infer surface implementation readiness; that requires the owning Screen/Control meaning, selected target/constraints and project-owned verification.
226
226
 
227
- ### External Design Resources
227
+ ### Optional Design Resource Authoring
228
+
229
+ Use `/design-resource-authoring` only when explicitly asking to generate, iterate or prepare standalone design resources, or to use Open Design. Inputs may be raw notes or an initial proposal, product/technical plans, a specialized visual brief, screenshots, existing resources or an optional Source Plan. Source Plan authoring is not a prerequisite: both Skills can consume raw inputs independently and neither invokes the other.
230
+
231
+ The Skill fixes the requested output as a hard scope ceiling, discovers current Open Design agents/models, functional skills, rendering templates, design systems, plugins and export routes, then gives every considered resource a reasoned `selected`, `optional`, `not-needed`, `unavailable` or `decision-required` disposition. It commissions only the smallest sufficient set through structured MCP, with bounded CLI/daemon and UI fallback. A prototype, low/high-fidelity pair, component board, Figma handoff, variant count or directory is never universally required, and Tiny Context never copies Open Design prompts/templates or vendors a provider catalogue.
228
232
 
229
- Use dedicated Product Design, Figma, image-generation, prototype or human design systems to create standalone flows, wireframes, visual candidates, high-fidelity targets, tokens, assets and prototypes. Tiny Context does not duplicate those mature generation workflows or require a proprietary plugin, pack schema, fixed directory or artifact count.
233
+ Exploration returns the requested visible candidate after minimal sanity review. Handoff adds project/run/capability provenance, explicit entry, declared coverage and known limitations. Selected-source preparation requires a real human selection basis and immutable hash or approved snapshot, but still creates no Design Authority. Candidate iterations stay task-local; the Skill may return one final consolidated accepted/rejected/unresolved delta for a separately owned proposal revision, but never edits the proposal, `project_context/**`, `DESIGN.md`, production code or a Delivery Contract.
230
234
 
231
- Their outputs enter the default Workflow or Long-Task as ordinary external Source. Candidates and inspiration authorize no fidelity. A selected exact target controls only its declared surface/viewport/mode/state/content conditions and needs a stable immutable identity before it can become an acceptance-affecting `verification_input`. `context_uiux_design` performs downstream UI Authority Closure and adopts only durable facts into Context/`DESIGN.md`; implementation renders and diffs remain evidence artifacts rather than self-authorizing targets.
235
+ The actual generation remains with configured Open Design/Product Design, Figma, image-generation, prototype or human systems. Their outputs enter the default Workflow or Long-Task as ordinary external Source. Candidates and inspiration authorize no fidelity. A selected exact target controls only its declared surface/viewport/mode/state/content conditions and needs stable immutable identity before it can affect a `verification_input`. `context_uiux_design` performs downstream UI Authority Closure and adopts only durable facts into Context/`DESIGN.md`; implementation renders and diffs remain evidence artifacts rather than self-authorizing targets.
236
+
237
+ Maintainers may set `TY_CONTEXT_OPEN_DESIGN_MCP_COMMAND` plus optional `TY_CONTEXT_OPEN_DESIGN_MCP_ARGS_JSON` and run `npm run smoke:open-design` for an opt-in, read-only discovery smoke. Normal tests use a local mock MCP and never require Open Design, login, paid access or nondeterministic design output.
232
238
 
233
239
  ### Optional Source Plan Authoring
234
-
235
- Use `/source-plan-authoring` when explicitly asking for an initial plan, Source Plan, source draft, or synthesis/refinement/audit of later implementation or Contract-authoring Source. The input may be one substantially complete plan or a sparse goal plus mixed notes, product/technical documents, screenshots, diagrams and other attachments. A short request that identifies the artifact roles, product goal, reference authority and desired elaboration is enough; no fixed intake questionnaire or pre-normalized outline is required.
236
-
237
- It outputs one self-contained Markdown Source Plan that:
238
-
239
- - inventories every supplied artifact, inspects all material pages/frames/screens and records coverage gaps instead of silently sampling;
240
- - preserves direct requirements and their qualifiers;
241
- - marks necessary derivations and cites what they derive from;
242
- - before comparative research or a material product, technical, architecture or provider selection, asks a concise targeted question when an unknown user priority such as quality versus cost, speed, reliability, privacy, lock-in or operational burden could change the research scope, candidate set or recommendation; it does not re-ask known preferences or interrupt minor reversible choices;
243
- - after the preference envelope is clear, decides what research is needed, uses current authoritative or primary sources for external capability/pricing/quota/license/compatibility/region/security/support claims, and treats a request to synthesize, refine, complete or use judgment as plan-level delegation: one supported recommendation is recorded as `delegated` with its instruction, preference/evidence basis and exact meaning instead of asking for approval, including high-impact plan semantics; real payment, contracting, production release, destructive production mutation, permission grants, sensitive-data transmission and required legal/security/human approval remain `EXT`, while only conflicts, user-reserved choices, missing material preferences or cases with no defensible recommendation remain `DEC`/`decision_required`;
244
- - splits Outcomes only by independently decidable observable results;
245
- - uses stable semantic keys and explicit anchors for important Source items;
246
- - separates mandatory `OBL` obligations from advisory `HINT` suggestions;
247
- - for interactive products, inventories every in-scope surface and material control, then independently records its surface/region/type/label, placement, task, visibility/availability, trigger/input/validation/default, interaction/navigation, loading/empty/success/failure/recovery/permission/feedback and accessibility fields;
248
- - uses `NCOMP` for explicit results that must not count as completion;
249
- - states each `RISK` Fact, one Affected Outcome, Basis and Consequence, or emits `DEC` when the pair is unknown; Fact is exactly one of `public_api_or_schema_change`, `persistent_data_change`, `data_migration`, `security_boundary_change`, `permission_boundary_change`, `irreversible_external_effect`, `critical_user_path`, `full_population_operation`, `multi_repository_change` or `weak_observability`;
250
- - writes one Given/When/Then scenario per `AC`, names its accepted `REQ`/`CTRL`/`OBL`/`NCOMP` keys, hides no new requirement in AC text and reports whether the document is ready for Contract authoring.
251
-
252
- It does not update project Context, bind real repository owners/paths/runners, generate Delivery Contract YAML, run implementation, create workflow state or claim completion. `HINT` is not a Material Source Item, and Source Plan authoring emits no `ty-source-item` markers; repository-aware Long-Task authoring inserts markers later. A Source Plan is Source, not a Contract Draft. Its structure is an authoring fast path, not a required input protocol; ordinary prose plans remain valid Long-Task Source.
253
-
254
- ## Single-Goal Rolling Delivery
255
-
256
- Use `/long-task-workflow` only when explicitly requested or when the current worktree already has an active long task. It uses:
257
-
258
- - one platform-native continuing Goal;
259
- - one user-selected repository/worktree;
260
- - one complete selected delivery, one Contract and one Final Gate;
261
- - Outcome dependencies as acceptance readiness, not worker scheduling;
262
- - one user model-choice checkpoint after first Authority Lock and before implementation;
263
- - a rolling internal implementation Frontier;
264
- - targeted repair checks that never accept;
265
- - stateless scope-only revision diagnosis before one exact approval;
266
- - a complete Final Gate on one current snapshot;
267
- - a Stop Hook that rejects stale completion.
268
-
269
- Long-Task Contract authoring preserves stable Source keys and anchors where practical. If an unknown preference could materially change comparative research or selection, it asks before proceeding. Once the decision criteria are clear, a defensible recommended plan choice is written into real Source with its delegation, preference/evidence basis and exact meaning before Contract mapping; it is never hidden only in YAML. That plan delegation does not authorize a real high-risk external action, which remains an explicit external confirmation. Meaning-preserving structural decomposition and evidence-backed repository binding may continue; conflicting, user-reserved, missing-preference or unsupported new product semantics remain `decision_required`. Missing recommended Source Plan structure never blocks authoring, but the marker-only Material Source Item enumeration required for activation does.
270
-
271
- Before the first successful formal Compile, `delivery-contract.yaml` is one non-authoritative Contract Draft. `/long-task-workflow` keeps revising that same Draft across repository/Context reads and Preflight repair rounds; it does not require one response to produce a complete Contract. Draft authoring is integrated because repository bindings and verification inputs need real evidence, Preflight findings must feed back into the same object, and a separate handoff would risk lost meaning or a second plan/authority. No standalone Contract Draft Skill, Draft Receipt or Authoring State exists.
272
-
273
- The first successful Compile creates Authority Lock and returns `execution_model_checkpoint.required: true`. Before implementation, the Agent asks the user to `continue_current_model` or switch models and then resume the active Long-Task. A task-specific model strategy already stated explicitly satisfies the checkpoint. Later Compile revisions return `required: false`; Harness does not switch models, persist acknowledgement/model-route state or repeat the pause.
274
-
275
- Later revisions are classified into three paths. Formally monotonic evidence strengthening and other proven mechanical-safe changes auto-adopt. A candidate whose only protected reasons are owner, expected-change or allowed-support expansion may be exercised through `diagnose-revision` using existing active Check identities whose runner and verifier are unchanged; safe monotonic strengthening may coexist, and the results remain transient repair diagnostics rather than Progress or acceptance. Product/Source/Acceptance semantic changes, proof weakening, verifier-content or runner changes, and risk increases are preview-only and require the exact revision identity; risk downgrade remains rejected outright. A rolling blocker is not itself an External Confirmation or permission to remove machine-verifiable scope. A real scope change first becomes marked Source. Diagnosis never changes the active Authority or writes pending/approval state, cache, Progress or Receipt, so related edits can accumulate in the same `delivery-contract.yaml` before one `compile --revise` approval request. The pending decision contains a concise hash-bound summary with exact changed semantic fields, Source/Product Claim reductions, proof reductions and external-confirmation keys and is projected by `status`/`resume`. Adoption reports `delivery_completed_by_this_event: false`, invalidates affected evidence and returns to rolling implementation or repair; the complete Final Gate remains mandatory.
276
-
277
- The package-managed Long-Task Skill uses progressive disclosure: its main `SKILL.md` keeps the objective, boundaries and phase routing; one-level references are read only for Contract authoring, evidence design or authority lifecycle. This reduces routine instruction load without moving any rule into a second authority. When Source or controlling Context declares an architecture invariant, the Contract uses existing technical obligations/global constraints/forbidden shortcuts, owner/path/Binding boundaries and a project-owned executable Check. Functional acceptance cannot substitute when the architecture invariant can fail independently.
278
-
279
- A Draft Outcome is simply an Outcome before Authority Lock. Outcomes split independently observable, decidable, vertical and target-verifiable results so the current Goal can keep a smaller dependency-ready working set, target verification, localize failures, resume findings and invalidate stale local results. `depends_on` expresses acceptance readiness. Every Outcome belongs to one ordered Stage; its Stage gate transitively depends on the other Outcomes in that Stage, and later Stages depend on earlier gates. The Rolling Frontier and Stage status are derived from ordinary Outcome Progress and are temporary. An Outcome is not a Worker, scheduler task, queue or parallelism unit, and a Stage owns no Receipt or second Gate. Outcome decomposes execution and diagnosis, not completion authority: targeted passes never replace the one complete Final Gate on the current final snapshot.
280
-
281
- The Contract declares one bounded target profile, its non-empty required product target refs and each target's runtime family/root entrypoint. A Web/process proxy cannot satisfy an independently required Native/desktop target. Browser target proof uses Playwright; Native/desktop target proof uses a project binary. Every `critical_user_path` Outcome and Stage gate proves `target_runtime` from every required target's root entrypoint; a multi-Outcome Stage gate also proves at least two distinct surfaces share one runtime state.
282
-
283
- When a declared result can pass on a proxy surface while failing in its target runtime, the earliest owning Outcome declares a project-owned Check that exercises the target during the current Check execution. A tracked report, screenshot, binary, log or historical run cannot be the sole runtime proof. Checks declare keyed Given/When scenarios and journey roles; Assertions declare all-of Evidence Capabilities backed by typed current-execution records. Static `presence` cannot prove behavior, degradation cannot replace required success, fixed-input output cannot prove variation and a producer cannot self-attest its own boundary/external effect. After a blocker-driven semantic/proof revision, only affected weak-observability or high-risk behavioral Claims pay causal review. The Goal runs the live Check after the first runnable slice and, after coalescing related edits, before dependent work grows when declared inputs make Progress stale. This reuses targeted verification and Final Gate: it adds no open-ended `platform_impact` flags, per-platform progress state or alternate Gate, requires no full rebuild per Outcome/edit, never accepts early and is rerun by Final Gate.
284
-
285
- A separate read-only Global Product Conformance Check is required only for weak-observability work that also has multiple Stages or multiple required product runtime families. It starts at a required root product target, has independent Raw Execution and runs within the existing Final Gate. Single-Stage, single-family work retains the existing same-Check sensitivity path and pays no extra conformance run.
286
-
287
- The platform owns physical Goal/session lifecycle. A later session runs `resume` to reconstruct semantic state; Tiny Context does not recreate the prior physical Turn. Machine acceptance covers only `declared_machine_authority` and reports `native_goal_effect: none`. Before completing the platform-native Goal, the Agent performs a veto-only comparison of current Goal/user meaning against accepted marked Source and checks for pending revisions, unresolved blockers or omissions; this guard may block and repair, but it never supplies acceptance proof.
288
-
289
- ### CLI
290
-
291
- ```text
292
- ty-context long-task init <workdir>
293
- ty-context long-task preflight <workdir>
294
- ty-context long-task compile <workdir>
295
- ty-context long-task compile <workdir> --revise
296
- ty-context long-task diagnose-revision <workdir> [--outcome <key>] [--check <key>]
297
- ty-context long-task approve-authority-revision <workdir> --revision <sha>
298
- ty-context long-task explain <workdir>
299
- ty-context long-task verify <workdir> [--outcome <key>] [--check <key>]
300
- ty-context long-task status <workdir>
301
- ty-context long-task resume <workdir>
302
- ty-context long-task doctor <workdir>
303
- ty-context long-task final-gate <workdir>
304
- ty-context long-task stop-check <workdir> [--message <text>]
305
- ty-context long-task close <workdir>
306
- ty-context long-task abandon <workdir> [--force-corrupt-state]
307
- ```
308
-
309
- - `init` creates one Compact inline-Outcome Contract template.
310
- - `preflight` applies Compact defaults and reports all discoverable Source/REQ/CTRL/OBL/AC, Stage closure, required-target/root/runner, scenario/journey, capability, external-impact, Product Conformance, Context, risk, path/binding, runner/input and proof diagnostics. Exact duplicate diagnostics are merged with `occurrences`; known problems may include stable `refs` and a safe `repair_hint` that never weakens authority or invents product semantics. It is read-only: no Authority Lock, marker, cache, progress, Receipt, pending revision, state lock or project Check.
311
- - `compile` generates Global plus Outcome Result/Requirement/Control-field/Non-completing/Technical Claims, rejects uncovered Claims, preserves an immutable first baseline and makes the first successful formal Compile the Authority Lock. Every result includes a lifecycle event, `delivery_completed_by_this_event: false`, `native_goal_effect: none` and a next action. The first result also includes `execution_model_checkpoint.required: true`; later Compile results return `required: false`. Every revision compares against active authority regardless of progress, Receipt/cache deletion or implementation restoration. Source/Context/Product/Acceptance/Global/verifier materials, owner/binding authority, resolved runners and verification inputs are frozen in the common-dir Active Authority V3 snapshot; the model-choice result is not stored as Authority state.
312
- - `diagnose-revision` performs a side-effect-free candidate Compile. Only a scope-only candidate may run existing active Check identities with unchanged runner/verifier authority; semantic changes, proof weakening, runner or verifier-content changes, and risk increases are summarized without runner execution, while risk downgrade is rejected. Output always has `acceptance_authorized: false`, `progress_written: false` and `pending_revision_written: false`.
313
- - `compile --revise` auto-adopts proven-safe revisions. Protected revisions return `authority_revision_pending` on stdout plus the exact decision id and deterministic material approval summary, then fail closed until `approve-authority-revision` approves that exact id. Candidate edits produce a new id and invalidate the old approval. Adoption emits `authority_revision_adopted` and returns to rolling execution; it never means delivery completion.
314
- - `verify` writes scoped per-Check Progress Records only after rechecking active task/revision/compiled/worktree identity. A concurrent revision returns `active_authority_changed_during_verify` and writes no stale progress.
315
- - `status` reports each Outcome as `unverified`, `progress_passing`, `progress_failing`, `progress_stale` or `blocked_external`. It derives `stages`, `ready_stages` and the stage-constrained Outcome frontier from current Progress without persisting Stage completion. It also reports the fresh Final Receipt as `final_workflow_status` (or `null` after drift), target profile/state, the active Contract's complete `external_confirmations` and the single `pending_authority_revision` decision when present. `progress_passing` is targeted repair evidence rather than “Outcome complete”; `progress_stale` is not a current pass, and `final_workflow_status: null` means unfinished. It reads the common-dir authority snapshot and reports a missing or mismatched workdir cache as a repairable diagnostic.
316
- - `resume` is read-only and reports task identity, risk, relevant Context, Git state, the same Final/target/Stage/external/pending decision surfaces, ready Outcomes, findings and the next safe action from the common-dir authority snapshot.
317
- - `final-gate` requires a clean candidate commit, recompiles source authority, reruns every required Check on one Git-tree snapshot and rechecks active identity before acceptance. Its Receipt derives each Stage as `passed`, `failed`, `blocked_external` or `blocked_dependency`, and derives `target_state` as `not_accepted`, `blocked_external` or the Contract's exact `implementation_complete`, `target_profile_usable` or `production_release_ready` qualification.
318
- - `stop-check` and `close` run that Live Final Gate themselves. They never trust status, progress, a Receipt or compiled cache for acceptance; success clears only the accepted identity through CAS. Every accepted Stop emits one non-blocking terminal-scope `systemMessage`; external-pending results additionally name all confirmations. Final/Stop/close report `acceptance_scope: declared_machine_authority` and `native_goal_effect: none`; close also reports `closed_scope: machine_authority`. `status: closed` means only that machine Authority was cleared, not that the native Goal or complete external delivery finished.
319
- - `abandon` is explicit non-success cleanup. `--force-corrupt-state` is reserved for invalid/mismatched/legacy-unrecoverable state or a stale active lock and removes only deterministic local active state plus `<workdir>/.ty-context/**`; Contract, Source, Context and Git content are preserved.
320
-
321
- ### Delivery Contract
322
-
323
- `long-task-delivery-v2` keeps Product Authority, Technical Boundary Authority and Acceptance Authority as logical sections of one file. Compact YAML omits only deterministic defaults; the normalized Contract and all hashes are identical to the expanded form. The compiler derives machine Claims for observable results, atomic Requirements, control fields including location, non-completing outcomes, technical obligations and forbidden shortcuts:
324
-
325
- <!-- long-task-public-contract-example:start -->
326
- ```yaml
327
- schema_version: long-task-delivery-v2
328
- task:
329
- id: example-task
330
- title: Example task
331
- goal: Complete observable delivery goal
332
- target_profile:
333
- key: personal-trial
334
- description: The example is usable from its declared runtime root.
335
- required_state: target_profile_usable
336
- required_target_refs: [example-runtime]
337
- execution_targets:
338
- - key: example-runtime
339
- description: Example product runtime
340
- role: product
341
- runtime_family: process
342
- root_entrypoint: tests/runtime.mjs
343
- source_paths: [plans/example.md]
344
- context_refs: [project_context/areas/main.md]
345
- source_claims:
346
- - key: observable-requirement
347
- source_ref: plans/example.md#observable-requirement
348
- statement: The outcome is observable.
349
- disposition:
350
- type: claim
351
- refs: [observable-outcome.requirement.observable]
352
- stages:
353
- - key: delivery
354
- title: Delivery
355
- depends_on: []
356
- gate_outcome: observable-outcome
357
- risk:
358
- facts: {}
359
- global: {}
360
- outcomes:
361
- - key: observable-outcome
362
- title: Observable outcome
363
- stage: delivery
364
- product:
365
- observable_result: What a user or system can observe
366
- success_path_required: true
367
- degradation_path_required: false
368
- owner:
369
- label: Owning product or module boundary
370
- context_refs: [project_context/areas/main.md]
371
- path_globs: ["src/**", "tests/**"]
372
- requirements:
373
- - key: observable
374
- statement: The outcome is observable.
375
- required_proof_surfaces: [runtime_behavior]
376
- technical:
377
- expected_change_paths: ["src/**"]
378
- bindings:
379
- - key: observable-carrier
380
- kind: file
381
- target: src/observable.ts
382
- carrier_paths: [src/observable.ts]
383
- existence: planned
384
- acceptance:
385
- checks:
386
- - key: runtime
387
- journey_roles: [success, stage_gate]
388
- execution_target: {target_ref: example-runtime, entrypoint: root}
389
- scenario:
390
- given: [{key: source-ready, statement: The planned source carrier is available.}]
391
- when: [{key: inspect-result, statement: Inspect the result through the declared runtime.}]
392
- proof_surface: runtime_behavior
393
- runner:
394
- type: node_oracle
395
- target: tests/runtime.mjs
396
- effect: read_only
397
- verification_inputs: [tests/runtime.mjs]
398
- input_paths: [src/observable.ts]
399
- expected_output_paths: [src/observable.ts]
400
- positive_assertions:
401
- - key: observable-ac
402
- criterion: The declared requirement is observable.
403
- claims: [result, requirement.observable]
404
- observation: result
405
- evidence_capabilities: [state_delta, target_runtime]
406
- operator: equals
407
- expected: true
408
- counterfactual_controls:
409
- - key: remove-observable-carrier
410
- binding_key: observable-carrier
411
- claims: [result, requirement.observable]
412
- check_key: runtime
413
- mutation:
414
- type: remove_paths
415
- paths: [src/observable.ts]
416
- expected_assertion_failures: [observable-ac]
417
- ```
418
- <!-- long-task-public-contract-example:end -->
419
-
420
- Authors provide task, Outcome, control and Check keys. The compiler generates `OUT.<outcome-key>` and `CHECK.<outcome-key>.<check-key>` identities. It rejects unknown/duplicate keys, YAML aliases/tags/merges, dependency cycles, unsafe paths, missing Context/source/runner files, missing package scripts, unverifiable Outcomes, and UI Outcomes without browser proof.
421
-
422
- Global non-goals, constraints and forbidden shortcuts generate `GLOBAL.non_goal.<key>`, `GLOBAL.constraint.<key>` and `GLOBAL.forbidden_shortcut.<key>`. They must be covered by Global Check Assertions using local refs. Non-goals and forbidden shortcuts require negative proof; constraints accept either polarity. Outcome and Global Checks cannot cross Claim scope. Global forbidden paths do not generate Claims because the changed-path boundary enforces them statically.
423
-
424
- Claim-bearing structured Global Checks also declare `global.acceptance.counterfactual_controls`. Each control uses `binding_ref: <outcome-key>.<binding-key>` to reuse an Outcome-owned implementation carrier; no separate Global Binding layer exists. An `existing` mutation target must exist at Preflight/Compile, while a `planned` target may be absent until implementation but must exist at Final Gate and participates in Progress freshness.
425
-
426
- Supported runners are `package_script`, `project_binary`, `node_oracle` and `playwright_test`. Supported proof surfaces are `ui_browser`, `runtime_behavior`, `api_contract`, `data_state`, `security_boundary`, `population_coverage` and `implementation_structure`. Execution-target runtime families are the bounded `browser`, `native`, `desktop`, `service`, `process` and `external` set; target roles are `product`, `support` and `observer`. Required target refs resolve only to product targets. Browser target proof requires `playwright_test`; Native/desktop target proof requires `project_binary`.
427
-
428
- ### One Contract And Source Claims
429
-
430
- Every complete delivery selected by the user remains one Contract and one Final Gate, even when Outcomes are weakly related. Outcome boundaries exist only for independently decidable, target-verifiable results and never for output length, YAML/file size, frontend/backend layers, module count, parallelism or Agent capacity. New authoring uses inline Outcomes. Existing `outcome_files` remains parser compatibility for physical file organization only and creates no semantic, state or completion boundary.
431
-
432
- V2 authoring requires at least one real `source_path` and one `source_claim`. During authoring, every Material Source Item in the original Markdown is wrapped without rewriting it:
433
-
434
- ```markdown
435
- <!-- ty-source-item:start key=save-failure kind=requirement -->
436
- Saving failure preserves the user's input and shows the reason.
437
- <!-- ty-source-item:end -->
438
- ```
439
-
440
- Supported kinds are `outcome_result`, `requirement`, `control`, `acceptance`, `technical_obligation`, `non_completing`, `non_goal`, `forbidden_shortcut`, `risk_fact`, `external_confirmation` and `decision`. A risk marker additionally carries its exact pair, for example `<!-- ty-source-item:start key=permission-risk kind=risk_fact fact=permission_boundary_change outcome=observable-outcome -->`. Every declared Source file contains at least one Material Item; background-only references stay outside Source Authority. Marker keys and Source Claim keys must be set-equal and globally unique across all Source files. Nested, overlapping, unclosed, empty or invalid markers fail Compile. Each `source_claim.statement` must match the marked text after only line-ending, surrounding-blank-line and trailing-space normalization.
441
-
442
- Typed dispositions keep overall results, Requirement/Control/Obligation/Non-completing Claims, one named Acceptance Assertion, Global constraints/non-goals, declared Fact/Affected-Outcome risk pairs, external confirmations and genuine decisions distinct. Risk marker metadata must exactly equal its disposition and declared risk fact, and each Fact/Outcome pair has one Source owner. Source Plan and Runtime use the same ten Fact names: data migration is `data_migration`, a weakly observable critical path is two independent `critical_user_path` and `weak_observability` items, and `multi_repository_change` stays in Source until Compiler rejection. Every other non-decision Source item owns exactly one canonical target of the same kind and normalized text, and no target may have two Source owners. An Outcome Source acceptance maps to one `<outcome>.<check>.<assertion>` whose criterion is text-identical and which proves an independently Source-backed non-Result Claim. A Global Source acceptance maps to `GLOBAL.<check>.<assertion>`, is also criterion-identical, proves no Outcome Claim and includes at least one independently Source-backed Global non-goal, constraint or forbidden-shortcut Claim. `out_of_scope` is retired: an explicit Source non-goal needs covered negative proof, while excluding an in-scope item requires `decision_required`. Ordinary prose and Source Plans remain valid after marker-only enumeration; Compiler coverage is honest about being unable to discover unmarked natural-language requirements.
443
-
444
- Delivery Set orchestration and top-level Contract splitting within one selected delivery are retired. `ty-context delivery-set ...` returns a fixed non-executing tombstone.
445
-
446
- Every Contract-authority, Source hash/file-set, selected Context authority structure/file-set/hash, Product/Global semantic or verifier-content change requires `--revise`; ordinary Compile cannot silently refreeze it. Retrieval-only `context.toml` changes do not revise active Authority, while selected ownership, role/dependency and content changes remain protected. After Authority Lock, reductions and Product Claim additions require approval of an exact revision identity. Pure verifier relocation and proven tightening may revise automatically.
447
-
448
- Every path-bearing field uses one canonical grammar before hashing and matching. Windows separators and one leading `./` normalize to `/`; runner `cwd` alone may be `.`. Internal `.`/`..`, controls, empty segments, absolute/drive/UNC paths, brackets, braces, parentheses/extglob and non-segment `**` are rejected. Pattern matching, subset and overlap/disjoint use the same AST, and unknown relations fail closed.
449
-
450
- ### Deterministic Risk
451
-
452
- - **L0**: local, reversible, directly testable work stays on the default workflow.
453
- - **L1 standard**: multiple observable Outcomes or cross-session recovery, with reliable executable checks.
454
- - **L2 strict**: the same Long-Task workflow and Outcome model, with stronger proof on affected public API/schema, persistent data, migration, security/permission, irreversible, full-population or weak-observability critical-path Outcomes. Multi-repository delivery is unsupported.
455
-
456
- An explicit user request can raise the level to strict. Explicit `standard` below the computed floor fails with `risk_level_below_required`. Strict negative, counterfactual, population, security, environment and rollback/recovery obligations are compiler-enforced as applicable. Changed paths outside the declared envelope return a `scope_escape` Finding and require the same Goal to review risk/ownership, revise and recompile the Contract.
457
-
458
- ### Evidence And Authority
459
-
460
- Final acceptance is computed from executable current evidence, not agent prose. Evidence adapters derive from runner kind: `playwright_test` produces `playwright_json_v1` and is the only adapter allowed for `ui_browser`; package scripts, project binaries and Node oracles use the `structured_json_v2` adapter for non-browser surfaces and emit the additive `long-task-check-result-v3` payload when capability records are required. V2 payloads remain decodable only for compatibility and cannot satisfy non-presence capabilities. The adapter is part of acceptance, raw-execution, compiled, progress and Receipt identity.
461
-
462
- Every Check declares non-empty keyed `scenario.given` and `scenario.when` steps plus one or more roles from `success`, `degradation`, `recovery`, `stage_gate` and `conformance`. Every Assertion declares an all-of set from `presence`, `interaction_trace`, `state_delta`, `cross_surface_consistency`, `durable_readback`, `boundary_invocation`, `external_side_effect`, `failure_injection`, `visual_render`, `target_runtime` and `input_variation`. Except for static `presence`, each capability requires exactly one typed current-execution record bound to that Assertion. Missing, duplicate, unknown or undeclared records fail closed. Result Claims use success Checks only; success and degradation cannot share one Check. External-boundary evidence runs on an observer target. Input variation proves at least two distinct inputs, two output hashes and a failure case.
463
-
464
- Every Outcome has at least one non-Result atomic Claim, and a Claim is covered only when all `required_proof_surfaces` are covered. Claim-bearing assertions use explicit expected-value comparisons; unary `truthy`/`falsy` are forbidden, and `exists` is limited to `implementation_structure` obligations. Across all Checks sharing one Raw Execution identity, one claim-bearing Observation belongs to one Assertion. Playwright Claim proof has one canonical form: `playwright.case.<ac-key>.passed equals true`. Missing, skipped, flaky, unexpected, failed or duplicate-within-project ACs fail closed; the same AC across distinct Playwright projects aggregates only when every instance passes. Decoder diagnostic fields such as aggregate pass, executed, skipped, status and counts cannot prove Claims.
465
-
466
- Outcome Counterfactuals bind a local Binding; Global Counterfactuals bind an Outcome-owned `binding_ref`. Both may mutate only a proven subset of carriers. `structured_json_v2` adapter executions require completed exit-zero execution with exactly the expected `assertion_value_mismatch` set. A weak `playwright_json_v1` Counterfactual may accept exit one only under exact, complete unexpected-instance accounting; ordinary Playwright Baseline Checks still require exit zero. Standard frozen Playwright content is trusted verifier input. For a `weak_observability` Outcome, every claim-bearing Playwright AC and related Claim needs same-Check sensitivity. Claim and Population proofs are emitted only after the complete Check status is `passed`.
467
-
468
- Raw Execution identity binds frozen runner identity plus canonical declared Environment Requirements, never actual environment values. A Playwright Test uses `[ac:<assertion-key>]`; one Test may bind at most one declared AC. Every Claim-bearing structured Check needs same-Check, Claim-related Counterfactual sensitivity; unrelated Artifacts or another Check do not count. Counterfactual Findings are projected into their owning Check Result before Progress is written, so status/resume recover the Finding without a new Global Outcome state. Explain traces Source Item → canonical target → Claim or Assertion → required surfaces → Check → adapter → Observation.
469
-
470
- The workdir `.ty-context/compiled-contract.json` is only a rebuildable cache projection. Previous authority, the immutable initial base, risk floor and Final Gate identity come only from the common-dir snapshot. Commit, verifier migration, clear and abandon share one active-state lock; Final/Verify recheck identity and Stop/close use accepted-identity CAS. Development-period V2 Active Authority, Progress and Receipts are not migrated. Corrupt continuity is recovered explicitly with `abandon --force-corrupt-state`.
471
-
472
- Final Gate may run only Contract-declared verification commands and never production mutation/deployment/payment/migration execution. Retry defaults to none and is allowed once only for `transient_once` + idempotent + read-only/test-sandbox runners. Runners receive a minimal environment whitelist plus only declared environment requirements. Protected authority/proof inputs reject symlinks and detectable hardlinks. Network isolation remains external. Receipts are audit-only (`reusable_for_acceptance: false`). Human, CI, deployment and product confirmation live only in `external_confirmations`; a machine pass with pending confirmations reports `machine_accepted_external_pending`.
473
-
474
- ## Compatibility And Migration
475
-
476
- Version 0.6.0 retires the V1 schema/runtime and repo-local Hook. Enable, disable and upgrade remove only exact Tiny Context managed Hook entries. Relocated package-owned absolute commands are recognized only when known managed status and package layout match; similar-name user Hooks remain. Upgrade never imports V1 progress or Receipts into V2 authority. Delivery Set, `composite-campaign` and `composite-long-task` commands are non-executing tombstones.
477
-
478
- Version 0.6.0 defines the first public V2 semantics while retaining the `long-task-delivery-v2` schema name and physical `outcome_files` parser form. Optional Source Plan authoring adds no Schema, CLI, Preflight, Compile, Validator, Receipt, Authority or state. Preflight and direct Compile use one activation-safety kernel.
479
-
480
- Version 0.7.2 strengthens that same V2 authority with ordered Stages, bounded required targets/root entrypoints, explicit success/degradation journeys and scenarios, typed Evidence Capabilities, typed external impact, risk-proportional Product Conformance and terminal target/Stage projections. An older V2 Contract missing those fields reports the indexed manual migration `long-task-v2-semantic-drift-authority`; re-author the missing meaning from Source. Upgrade never infers those semantics or imports old Progress/Receipts as passing evidence.
481
-
482
- `/normal-long-task` is also a retirement pointer to `/long-task-workflow`; it creates no checklist, prompt, audit, matrix, verdict or second authority.
483
-
484
- ### Package update modes
485
-
486
- After updating the package, run `ty-context upgrade`. Use `ty-context upgrade --check` first when you need a read-only plan.
487
-
488
- Release metadata declares one update mode: `sync-only`, `upgrade-required` or `manual-required`. Upgrade plans report steps as `safe_pending`, `manual_required` or `blocked`. A `sync-only` release may use `sync`; `sync` does not run migrations. An `upgrade-required` release must run upgrade, while `manual-required` includes an explicit operator step.
489
-
490
- ## Development And Verification
491
-
492
- ```powershell
493
- npm install
494
- npm run format:check
495
- npm run typecheck --workspace project-tiny-context-harness
496
- npm run build --workspace project-tiny-context-harness
497
- npm run test:affected:list
498
- npm run test:affected
499
- npm run test:long-task:trust
500
- npm run test:long-task-performance --workspace project-tiny-context-harness
501
- npm test
502
- npm run smoke:quickstart
503
- npm run preview:pack
504
- npm run launch:check
505
- node packages/ty-context/dist/cli.js package check-source
506
- make validate-harness
507
- ```
508
-
509
- `test:affected` is the edit/fix loop. `test:long-task:trust` is the frozen-candidate high-impact boundary gate used by pull-request CI. `npm test` is the complete release regression retained on `main` and publish; do not rerun it after every small repair. Explicit delivery-contract and complete Long-Task gates remain available as package workspace scripts.
510
-
511
- The modularity gate is `ty-context check-modularity`. Scoped waivers require `owner`, `introduced_at`, `reason`, `tracking_issue` and `expiry_condition`.
512
-
513
- `npm run preview:pack` produces a local preview named `project-tiny-context-harness-0.7.5.tgz` under the preview output directory.
514
-
515
- ## Community And Further Reading
516
-
517
- Feedback from real repositories is especially useful. Open an [adoption report](https://github.com/Seven128/project-tiny-context-harness/issues/new?template=adoption_report.yml) with the recovery problem and what remained unclear.
518
-
519
- Early feedback and starter issues:
520
-
521
- - Report a [Context recovery gap](https://github.com/Seven128/project-tiny-context-harness/issues/new?template=context_gap.yml) through `context_gap.yml`.
522
- - Share results in the pinned [adoption reports issue](https://github.com/Seven128/project-tiny-context-harness/issues/4).
523
- - Pick a starter issue: [demo](https://github.com/Seven128/project-tiny-context-harness/issues/5), [sample walkthrough](https://github.com/Seven128/project-tiny-context-harness/issues/6), [benchmark rerun](https://github.com/Seven128/project-tiny-context-harness/issues/7) or [launch FAQ](https://github.com/Seven128/project-tiny-context-harness/issues/8).
524
- - Keep claims narrow: recovery evidence is useful; benchmark speedup claims need fresh Minimal Context benchmark runs.
525
-
526
- Read the [roadmap](docs/roadmap.md), [Benchmarking And Evidence](docs/benchmarking.md), [comparison guide](docs/comparison.md), [adoption guide](docs/adopt-existing-repo.md), [agent surface recipes](docs/agent-surface-recipes.md) and [FAQ](docs/faq.md).
527
-
528
- For concrete examples, see the [fresh-agent recovery walkthrough](docs/examples/fresh-agent-recovery.md), [Minimal Context sample guide](docs/examples/minimal-context-sample.md) and [browseable sample repository](examples/minimal-context-sample/). The longer argument is [Fresh coding-agent sessions need project memory, not more ceremony](docs/articles/fresh-agent-project-memory.md).
529
-
530
- ## Honest Limits
531
-
532
- - Tiny Context does not create or restore a platform Goal or physical session.
533
- - It cannot prove that a user declared every real requirement.
534
- - Bounded Context keyword search can still miss synonyms or indirect dependencies; it supplements rather than replaces semantic judgment.
535
- - Harness cannot switch the host-selected model; it only asks for the one post-Authority-Lock user choice.
536
- - Core long-task execution intentionally provides no parallel mutation runtime.
537
- - It does not observe platform token counts or model-call counts.
538
- - Network policy is declared to runners and proxy variables are restricted, but this is not an OS sandbox.
539
- - Same-user/admin filesystem tampering and Hook bypass are outside its security boundary.
540
- - Git/PR/CI, deployment and human product confirmation remain external responsibilities.
541
-
542
- ## License
543
-
544
- MIT
240
+
241
+ Use `/source-plan-authoring` when explicitly asking for an initial plan, Source Plan, source draft, or synthesis/refinement/audit of later implementation or Contract-authoring Source. The input may be one substantially complete plan or a sparse goal plus mixed notes, product/technical documents, screenshots, diagrams and other attachments. A short request that identifies the artifact roles, product goal, reference authority and desired elaboration is enough; no fixed intake questionnaire or pre-normalized outline is required.
242
+
243
+ It outputs one self-contained Markdown Source Plan that:
244
+
245
+ - inventories every supplied artifact, inspects all material pages/frames/screens and records coverage gaps instead of silently sampling;
246
+ - preserves direct requirements and their qualifiers;
247
+ - marks necessary derivations and cites what they derive from;
248
+ - before comparative research or a material product, technical, architecture or provider selection, asks a concise targeted question when an unknown user priority such as quality versus cost, speed, reliability, privacy, lock-in or operational burden could change the research scope, candidate set or recommendation; it does not re-ask known preferences or interrupt minor reversible choices;
249
+ - after the preference envelope is clear, decides what research is needed, uses current authoritative or primary sources for external capability/pricing/quota/license/compatibility/region/security/support claims, and treats a request to synthesize, refine, complete or use judgment as plan-level delegation: one supported recommendation is recorded as `delegated` with its instruction, preference/evidence basis and exact meaning instead of asking for approval, including high-impact plan semantics; real payment, contracting, production release, destructive production mutation, permission grants, sensitive-data transmission and required legal/security/human approval remain `EXT`, while only conflicts, user-reserved choices, missing material preferences or cases with no defensible recommendation remain `DEC`/`decision_required`;
250
+ - splits Outcomes only by independently decidable observable results;
251
+ - uses stable semantic keys and explicit anchors for important Source items;
252
+ - separates mandatory `OBL` obligations from advisory `HINT` suggestions;
253
+ - for interactive products, inventories every in-scope surface and material control, then independently records its surface/region/type/label, placement, task, visibility/availability, trigger/input/validation/default, interaction/navigation, loading/empty/success/failure/recovery/permission/feedback and accessibility fields;
254
+ - uses `NCOMP` for explicit results that must not count as completion;
255
+ - states each `RISK` Fact, one Affected Outcome, Basis and Consequence, or emits `DEC` when the pair is unknown; Fact is exactly one of `public_api_or_schema_change`, `persistent_data_change`, `data_migration`, `security_boundary_change`, `permission_boundary_change`, `irreversible_external_effect`, `critical_user_path`, `full_population_operation`, `multi_repository_change` or `weak_observability`;
256
+ - writes one Given/When/Then scenario per `AC`, names its accepted `REQ`/`CTRL`/`OBL`/`NCOMP` keys, hides no new requirement in AC text and reports whether the document is ready for Contract authoring.
257
+
258
+ It does not update project Context, bind real repository owners/paths/runners, generate Delivery Contract YAML, run implementation, create workflow state or claim completion. `HINT` is not a Material Source Item, and Source Plan authoring emits no `ty-source-item` markers; repository-aware Long-Task authoring inserts markers later. A Source Plan is Source, not a Contract Draft. Its structure is an authoring fast path, not a required input protocol; ordinary prose plans remain valid Long-Task Source.
259
+
260
+ ## Single-Goal Rolling Delivery
261
+
262
+ Use `/long-task-workflow` only when explicitly requested or when the current worktree already has an active long task. It uses:
263
+
264
+ - one platform-native continuing Goal;
265
+ - one user-selected repository/worktree;
266
+ - one complete selected delivery, one Contract and one Final Gate;
267
+ - Outcome dependencies as acceptance readiness, not worker scheduling;
268
+ - one user model-choice checkpoint after first Authority Lock and before implementation;
269
+ - a rolling internal implementation Frontier;
270
+ - targeted repair checks that never accept;
271
+ - stateless scope-only revision diagnosis before one exact approval;
272
+ - a complete Final Gate on one current snapshot;
273
+ - a Stop Hook that rejects stale completion.
274
+
275
+ Long-Task Contract authoring preserves stable Source keys and anchors where practical. If an unknown preference could materially change comparative research or selection, it asks before proceeding. Once the decision criteria are clear, a defensible recommended plan choice is written into real Source with its delegation, preference/evidence basis and exact meaning before Contract mapping; it is never hidden only in YAML. That plan delegation does not authorize a real high-risk external action, which remains an explicit external confirmation. Meaning-preserving structural decomposition and evidence-backed repository binding may continue; conflicting, user-reserved, missing-preference or unsupported new product semantics remain `decision_required`. Missing recommended Source Plan structure never blocks authoring, but the marker-only Material Source Item enumeration required for activation does.
276
+
277
+ Before the first successful formal Compile, `delivery-contract.yaml` is one non-authoritative Contract Draft. `/long-task-workflow` keeps revising that same Draft across repository/Context reads and Preflight repair rounds; it does not require one response to produce a complete Contract. Draft authoring is integrated because repository bindings and verification inputs need real evidence, Preflight findings must feed back into the same object, and a separate handoff would risk lost meaning or a second plan/authority. No standalone Contract Draft Skill, Draft Receipt or Authoring State exists.
278
+
279
+ The first successful Compile creates Authority Lock and returns `execution_model_checkpoint.required: true`. Before implementation, the Agent asks the user to `continue_current_model` or switch models and then resume the active Long-Task. A task-specific model strategy already stated explicitly satisfies the checkpoint. Later Compile revisions return `required: false`; Harness does not switch models, persist acknowledgement/model-route state or repeat the pause.
280
+
281
+ Later revisions are classified into three paths. Formally monotonic evidence strengthening and other proven mechanical-safe changes auto-adopt. A candidate whose only protected reasons are owner, expected-change or allowed-support expansion may be exercised through `diagnose-revision` using existing active Check identities whose runner and verifier are unchanged; safe monotonic strengthening may coexist, and the results remain transient repair diagnostics rather than Progress or acceptance. Product/Source/Acceptance semantic changes, proof weakening, verifier-content or runner changes, and risk increases are preview-only and require the exact revision identity; risk downgrade remains rejected outright. A rolling blocker is not itself an External Confirmation or permission to remove machine-verifiable scope. A real scope change first becomes marked Source. Diagnosis never changes the active Authority or writes pending/approval state, cache, Progress or Receipt, so related edits can accumulate in the same `delivery-contract.yaml` before one `compile --revise` approval request. The pending decision contains a concise hash-bound summary with exact changed semantic fields, Source/Product Claim reductions, proof reductions and external-confirmation keys and is projected by `status`/`resume`. Adoption reports `delivery_completed_by_this_event: false`, invalidates affected evidence and returns to rolling implementation or repair; the complete Final Gate remains mandatory.
282
+
283
+ The package-managed Long-Task Skill uses progressive disclosure: its main `SKILL.md` keeps the objective, boundaries and phase routing; one-level references are read only for Contract authoring, evidence design or authority lifecycle. This reduces routine instruction load without moving any rule into a second authority. When Source or controlling Context declares an architecture invariant, the Contract uses existing technical obligations/global constraints/forbidden shortcuts, owner/path/Binding boundaries and a project-owned executable Check. Functional acceptance cannot substitute when the architecture invariant can fail independently.
284
+
285
+ A Draft Outcome is simply an Outcome before Authority Lock. Outcomes split independently observable, decidable, vertical and target-verifiable results so the current Goal can keep a smaller dependency-ready working set, target verification, localize failures, resume findings and invalidate stale local results. `depends_on` expresses acceptance readiness. Every Outcome belongs to one ordered Stage; its Stage gate transitively depends on the other Outcomes in that Stage, and later Stages depend on earlier gates. The Rolling Frontier and Stage status are derived from ordinary Outcome Progress and are temporary. An Outcome is not a Worker, scheduler task, queue or parallelism unit, and a Stage owns no Receipt or second Gate. Outcome decomposes execution and diagnosis, not completion authority: targeted passes never replace the one complete Final Gate on the current final snapshot.
286
+
287
+ The Contract declares one bounded target profile, its non-empty required product target refs and each target's runtime family/root entrypoint. A Web/process proxy cannot satisfy an independently required Native/desktop target. Browser target proof uses Playwright; Native/desktop target proof uses a project binary. Every `critical_user_path` Outcome and Stage gate proves `target_runtime` from every required target's root entrypoint; a multi-Outcome Stage gate also proves at least two distinct surfaces share one runtime state.
288
+
289
+ When a declared result can pass on a proxy surface while failing in its target runtime, the earliest owning Outcome declares a project-owned Check that exercises the target during the current Check execution. A tracked report, screenshot, binary, log or historical run cannot be the sole runtime proof. Checks declare keyed Given/When scenarios and journey roles; Assertions declare all-of Evidence Capabilities backed by typed current-execution records. Static `presence` cannot prove behavior, degradation cannot replace required success, fixed-input output cannot prove variation and a producer cannot self-attest its own boundary/external effect. After a blocker-driven semantic/proof revision, only affected weak-observability or high-risk behavioral Claims pay causal review. The Goal runs the live Check after the first runnable slice and, after coalescing related edits, before dependent work grows when declared inputs make Progress stale. This reuses targeted verification and Final Gate: it adds no open-ended `platform_impact` flags, per-platform progress state or alternate Gate, requires no full rebuild per Outcome/edit, never accepts early and is rerun by Final Gate.
290
+
291
+ A separate read-only Global Product Conformance Check is required only for weak-observability work that also has multiple Stages or multiple required product runtime families. It starts at a required root product target, has independent Raw Execution and runs within the existing Final Gate. Single-Stage, single-family work retains the existing same-Check sensitivity path and pays no extra conformance run.
292
+
293
+ The platform owns physical Goal/session lifecycle. A later session runs `resume` to reconstruct semantic state; Tiny Context does not recreate the prior physical Turn. Machine acceptance covers only `declared_machine_authority` and reports `native_goal_effect: none`. Before completing the platform-native Goal, the Agent performs a veto-only comparison of current Goal/user meaning against accepted marked Source and checks for pending revisions, unresolved blockers or omissions; this guard may block and repair, but it never supplies acceptance proof.
294
+
295
+ ### CLI
296
+
297
+ ```text
298
+ ty-context long-task init <workdir>
299
+ ty-context long-task preflight <workdir>
300
+ ty-context long-task compile <workdir>
301
+ ty-context long-task compile <workdir> --revise
302
+ ty-context long-task diagnose-revision <workdir> [--outcome <key>] [--check <key>]
303
+ ty-context long-task approve-authority-revision <workdir> --revision <sha>
304
+ ty-context long-task explain <workdir>
305
+ ty-context long-task verify <workdir> [--outcome <key>] [--check <key>]
306
+ ty-context long-task status <workdir>
307
+ ty-context long-task resume <workdir>
308
+ ty-context long-task doctor <workdir>
309
+ ty-context long-task final-gate <workdir>
310
+ ty-context long-task stop-check <workdir> [--message <text>]
311
+ ty-context long-task close <workdir>
312
+ ty-context long-task abandon <workdir> [--force-corrupt-state]
313
+ ```
314
+
315
+ - `init` creates one Compact inline-Outcome Contract template.
316
+ - `preflight` applies Compact defaults and reports all discoverable Source/REQ/CTRL/OBL/AC, Stage closure, required-target/root/runner, scenario/journey, capability, external-impact, Product Conformance, Context, risk, path/binding, runner/input and proof diagnostics. Exact duplicate diagnostics are merged with `occurrences`; known problems may include stable `refs` and a safe `repair_hint` that never weakens authority or invents product semantics. It is read-only: no Authority Lock, marker, cache, progress, Receipt, pending revision, state lock or project Check.
317
+ - `compile` generates Global plus Outcome Result/Requirement/Control-field/Non-completing/Technical Claims, rejects uncovered Claims, preserves an immutable first baseline and makes the first successful formal Compile the Authority Lock. Every result includes a lifecycle event, `delivery_completed_by_this_event: false`, `native_goal_effect: none` and a next action. The first result also includes `execution_model_checkpoint.required: true`; later Compile results return `required: false`. Every revision compares against active authority regardless of progress, Receipt/cache deletion or implementation restoration. Source/Context/Product/Acceptance/Global/verifier materials, owner/binding authority, resolved runners and verification inputs are frozen in the common-dir Active Authority V3 snapshot; the model-choice result is not stored as Authority state.
318
+ - `diagnose-revision` performs a side-effect-free candidate Compile. Only a scope-only candidate may run existing active Check identities with unchanged runner/verifier authority; semantic changes, proof weakening, runner or verifier-content changes, and risk increases are summarized without runner execution, while risk downgrade is rejected. Output always has `acceptance_authorized: false`, `progress_written: false` and `pending_revision_written: false`.
319
+ - `compile --revise` auto-adopts proven-safe revisions. Protected revisions return `authority_revision_pending` on stdout plus the exact decision id and deterministic material approval summary, then fail closed until `approve-authority-revision` approves that exact id. Candidate edits produce a new id and invalidate the old approval. Adoption emits `authority_revision_adopted` and returns to rolling execution; it never means delivery completion.
320
+ - `verify` writes scoped per-Check Progress Records only after rechecking active task/revision/compiled/worktree identity. A concurrent revision returns `active_authority_changed_during_verify` and writes no stale progress.
321
+ - `status` reports each Outcome as `unverified`, `progress_passing`, `progress_failing`, `progress_stale` or `blocked_external`. It derives `stages`, `ready_stages` and the stage-constrained Outcome frontier from current Progress without persisting Stage completion. It also reports the fresh Final Receipt as `final_workflow_status` (or `null` after drift), target profile/state, the active Contract's complete `external_confirmations` and the single `pending_authority_revision` decision when present. `progress_passing` is targeted repair evidence rather than “Outcome complete”; `progress_stale` is not a current pass, and `final_workflow_status: null` means unfinished. It reads the common-dir authority snapshot and reports a missing or mismatched workdir cache as a repairable diagnostic.
322
+ - `resume` is read-only and reports task identity, risk, relevant Context, Git state, the same Final/target/Stage/external/pending decision surfaces, ready Outcomes, findings and the next safe action from the common-dir authority snapshot.
323
+ - `final-gate` requires a clean candidate commit, recompiles source authority, reruns every required Check on one Git-tree snapshot and rechecks active identity before acceptance. Its Receipt derives each Stage as `passed`, `failed`, `blocked_external` or `blocked_dependency`, and derives `target_state` as `not_accepted`, `blocked_external` or the Contract's exact `implementation_complete`, `target_profile_usable` or `production_release_ready` qualification.
324
+ - `stop-check` and `close` run that Live Final Gate themselves. They never trust status, progress, a Receipt or compiled cache for acceptance; success clears only the accepted identity through CAS. Every accepted Stop emits one non-blocking terminal-scope `systemMessage`; external-pending results additionally name all confirmations. Final/Stop/close report `acceptance_scope: declared_machine_authority` and `native_goal_effect: none`; close also reports `closed_scope: machine_authority`. `status: closed` means only that machine Authority was cleared, not that the native Goal or complete external delivery finished.
325
+ - `abandon` is explicit non-success cleanup. `--force-corrupt-state` is reserved for invalid/mismatched/legacy-unrecoverable state or a stale active lock and removes only deterministic local active state plus `<workdir>/.ty-context/**`; Contract, Source, Context and Git content are preserved.
326
+
327
+ ### Delivery Contract
328
+
329
+ `long-task-delivery-v2` keeps Product Authority, Technical Boundary Authority and Acceptance Authority as logical sections of one file. Compact YAML omits only deterministic defaults; the normalized Contract and all hashes are identical to the expanded form. The compiler derives machine Claims for observable results, atomic Requirements, control fields including location, non-completing outcomes, technical obligations and forbidden shortcuts:
330
+
331
+ <!-- long-task-public-contract-example:start -->
332
+ ```yaml
333
+ schema_version: long-task-delivery-v2
334
+ task:
335
+ id: example-task
336
+ title: Example task
337
+ goal: Complete observable delivery goal
338
+ target_profile:
339
+ key: personal-trial
340
+ description: The example is usable from its declared runtime root.
341
+ required_state: target_profile_usable
342
+ required_target_refs: [example-runtime]
343
+ execution_targets:
344
+ - key: example-runtime
345
+ description: Example product runtime
346
+ role: product
347
+ runtime_family: process
348
+ root_entrypoint: tests/runtime.mjs
349
+ source_paths: [plans/example.md]
350
+ context_refs: [project_context/areas/main.md]
351
+ source_claims:
352
+ - key: observable-requirement
353
+ source_ref: plans/example.md#observable-requirement
354
+ statement: The outcome is observable.
355
+ disposition:
356
+ type: claim
357
+ refs: [observable-outcome.requirement.observable]
358
+ stages:
359
+ - key: delivery
360
+ title: Delivery
361
+ depends_on: []
362
+ gate_outcome: observable-outcome
363
+ risk:
364
+ facts: {}
365
+ global: {}
366
+ outcomes:
367
+ - key: observable-outcome
368
+ title: Observable outcome
369
+ stage: delivery
370
+ product:
371
+ observable_result: What a user or system can observe
372
+ success_path_required: true
373
+ degradation_path_required: false
374
+ owner:
375
+ label: Owning product or module boundary
376
+ context_refs: [project_context/areas/main.md]
377
+ path_globs: ["src/**", "tests/**"]
378
+ requirements:
379
+ - key: observable
380
+ statement: The outcome is observable.
381
+ required_proof_surfaces: [runtime_behavior]
382
+ technical:
383
+ expected_change_paths: ["src/**"]
384
+ bindings:
385
+ - key: observable-carrier
386
+ kind: file
387
+ target: src/observable.ts
388
+ carrier_paths: [src/observable.ts]
389
+ existence: planned
390
+ acceptance:
391
+ checks:
392
+ - key: runtime
393
+ journey_roles: [success, stage_gate]
394
+ execution_target: {target_ref: example-runtime, entrypoint: root}
395
+ scenario:
396
+ given: [{key: source-ready, statement: The planned source carrier is available.}]
397
+ when: [{key: inspect-result, statement: Inspect the result through the declared runtime.}]
398
+ proof_surface: runtime_behavior
399
+ runner:
400
+ type: node_oracle
401
+ target: tests/runtime.mjs
402
+ effect: read_only
403
+ verification_inputs: [tests/runtime.mjs]
404
+ input_paths: [src/observable.ts]
405
+ expected_output_paths: [src/observable.ts]
406
+ positive_assertions:
407
+ - key: observable-ac
408
+ criterion: The declared requirement is observable.
409
+ claims: [result, requirement.observable]
410
+ observation: result
411
+ evidence_capabilities: [state_delta, target_runtime]
412
+ operator: equals
413
+ expected: true
414
+ counterfactual_controls:
415
+ - key: remove-observable-carrier
416
+ binding_key: observable-carrier
417
+ claims: [result, requirement.observable]
418
+ check_key: runtime
419
+ mutation:
420
+ type: remove_paths
421
+ paths: [src/observable.ts]
422
+ expected_assertion_failures: [observable-ac]
423
+ ```
424
+ <!-- long-task-public-contract-example:end -->
425
+
426
+ Authors provide task, Outcome, control and Check keys. The compiler generates `OUT.<outcome-key>` and `CHECK.<outcome-key>.<check-key>` identities. It rejects unknown/duplicate keys, YAML aliases/tags/merges, dependency cycles, unsafe paths, missing Context/source/runner files, missing package scripts, unverifiable Outcomes, and UI Outcomes without browser proof.
427
+
428
+ Global non-goals, constraints and forbidden shortcuts generate `GLOBAL.non_goal.<key>`, `GLOBAL.constraint.<key>` and `GLOBAL.forbidden_shortcut.<key>`. They must be covered by Global Check Assertions using local refs. Non-goals and forbidden shortcuts require negative proof; constraints accept either polarity. Outcome and Global Checks cannot cross Claim scope. Global forbidden paths do not generate Claims because the changed-path boundary enforces them statically.
429
+
430
+ Claim-bearing structured Global Checks also declare `global.acceptance.counterfactual_controls`. Each control uses `binding_ref: <outcome-key>.<binding-key>` to reuse an Outcome-owned implementation carrier; no separate Global Binding layer exists. An `existing` mutation target must exist at Preflight/Compile, while a `planned` target may be absent until implementation but must exist at Final Gate and participates in Progress freshness.
431
+
432
+ Supported runners are `package_script`, `project_binary`, `node_oracle` and `playwright_test`. Supported proof surfaces are `ui_browser`, `runtime_behavior`, `api_contract`, `data_state`, `security_boundary`, `population_coverage` and `implementation_structure`. Execution-target runtime families are the bounded `browser`, `native`, `desktop`, `service`, `process` and `external` set; target roles are `product`, `support` and `observer`. Required target refs resolve only to product targets. Browser target proof requires `playwright_test`; Native/desktop target proof requires `project_binary`.
433
+
434
+ ### One Contract And Source Claims
435
+
436
+ Every complete delivery selected by the user remains one Contract and one Final Gate, even when Outcomes are weakly related. Outcome boundaries exist only for independently decidable, target-verifiable results and never for output length, YAML/file size, frontend/backend layers, module count, parallelism or Agent capacity. New authoring uses inline Outcomes. Existing `outcome_files` remains parser compatibility for physical file organization only and creates no semantic, state or completion boundary.
437
+
438
+ V2 authoring requires at least one real `source_path` and one `source_claim`. During authoring, every Material Source Item in the original Markdown is wrapped without rewriting it:
439
+
440
+ ```markdown
441
+ <!-- ty-source-item:start key=save-failure kind=requirement -->
442
+ Saving failure preserves the user's input and shows the reason.
443
+ <!-- ty-source-item:end -->
444
+ ```
445
+
446
+ Supported kinds are `outcome_result`, `requirement`, `control`, `acceptance`, `technical_obligation`, `non_completing`, `non_goal`, `forbidden_shortcut`, `risk_fact`, `external_confirmation` and `decision`. A risk marker additionally carries its exact pair, for example `<!-- ty-source-item:start key=permission-risk kind=risk_fact fact=permission_boundary_change outcome=observable-outcome -->`. Every declared Source file contains at least one Material Item; background-only references stay outside Source Authority. Marker keys and Source Claim keys must be set-equal and globally unique across all Source files. Nested, overlapping, unclosed, empty or invalid markers fail Compile. Each `source_claim.statement` must match the marked text after only line-ending, surrounding-blank-line and trailing-space normalization.
447
+
448
+ Typed dispositions keep overall results, Requirement/Control/Obligation/Non-completing Claims, one named Acceptance Assertion, Global constraints/non-goals, declared Fact/Affected-Outcome risk pairs, external confirmations and genuine decisions distinct. Risk marker metadata must exactly equal its disposition and declared risk fact, and each Fact/Outcome pair has one Source owner. Source Plan and Runtime use the same ten Fact names: data migration is `data_migration`, a weakly observable critical path is two independent `critical_user_path` and `weak_observability` items, and `multi_repository_change` stays in Source until Compiler rejection. Every other non-decision Source item owns exactly one canonical target of the same kind and normalized text, and no target may have two Source owners. An Outcome Source acceptance maps to one `<outcome>.<check>.<assertion>` whose criterion is text-identical and which proves an independently Source-backed non-Result Claim. A Global Source acceptance maps to `GLOBAL.<check>.<assertion>`, is also criterion-identical, proves no Outcome Claim and includes at least one independently Source-backed Global non-goal, constraint or forbidden-shortcut Claim. `out_of_scope` is retired: an explicit Source non-goal needs covered negative proof, while excluding an in-scope item requires `decision_required`. Ordinary prose and Source Plans remain valid after marker-only enumeration; Compiler coverage is honest about being unable to discover unmarked natural-language requirements.
449
+
450
+ Delivery Set orchestration and top-level Contract splitting within one selected delivery are retired. `ty-context delivery-set ...` returns a fixed non-executing tombstone.
451
+
452
+ Every Contract-authority, Source hash/file-set, selected Context authority structure/file-set/hash, Product/Global semantic or verifier-content change requires `--revise`; ordinary Compile cannot silently refreeze it. Retrieval-only `context.toml` changes do not revise active Authority, while selected ownership, role/dependency and content changes remain protected. After Authority Lock, reductions and Product Claim additions require approval of an exact revision identity. Pure verifier relocation and proven tightening may revise automatically.
453
+
454
+ Every path-bearing field uses one canonical grammar before hashing and matching. Windows separators and one leading `./` normalize to `/`; runner `cwd` alone may be `.`. Internal `.`/`..`, controls, empty segments, absolute/drive/UNC paths, brackets, braces, parentheses/extglob and non-segment `**` are rejected. Pattern matching, subset and overlap/disjoint use the same AST, and unknown relations fail closed.
455
+
456
+ ### Deterministic Risk
457
+
458
+ - **L0**: local, reversible, directly testable work stays on the default workflow.
459
+ - **L1 standard**: multiple observable Outcomes or cross-session recovery, with reliable executable checks.
460
+ - **L2 strict**: the same Long-Task workflow and Outcome model, with stronger proof on affected public API/schema, persistent data, migration, security/permission, irreversible, full-population or weak-observability critical-path Outcomes. Multi-repository delivery is unsupported.
461
+
462
+ An explicit user request can raise the level to strict. Explicit `standard` below the computed floor fails with `risk_level_below_required`. Strict negative, counterfactual, population, security, environment and rollback/recovery obligations are compiler-enforced as applicable. Changed paths outside the declared envelope return a `scope_escape` Finding and require the same Goal to review risk/ownership, revise and recompile the Contract.
463
+
464
+ ### Evidence And Authority
465
+
466
+ Final acceptance is computed from executable current evidence, not agent prose. Evidence adapters derive from runner kind: `playwright_test` produces `playwright_json_v1` and is the only adapter allowed for `ui_browser`; package scripts, project binaries and Node oracles use the `structured_json_v2` adapter for non-browser surfaces and emit the additive `long-task-check-result-v3` payload when capability records are required. V2 payloads remain decodable only for compatibility and cannot satisfy non-presence capabilities. The adapter is part of acceptance, raw-execution, compiled, progress and Receipt identity.
467
+
468
+ Every Check declares non-empty keyed `scenario.given` and `scenario.when` steps plus one or more roles from `success`, `degradation`, `recovery`, `stage_gate` and `conformance`. Every Assertion declares an all-of set from `presence`, `interaction_trace`, `state_delta`, `cross_surface_consistency`, `durable_readback`, `boundary_invocation`, `external_side_effect`, `failure_injection`, `visual_render`, `target_runtime` and `input_variation`. Except for static `presence`, each capability requires exactly one typed current-execution record bound to that Assertion. Missing, duplicate, unknown or undeclared records fail closed. Result Claims use success Checks only; success and degradation cannot share one Check. External-boundary evidence runs on an observer target. Input variation proves at least two distinct inputs, two output hashes and a failure case.
469
+
470
+ Every Outcome has at least one non-Result atomic Claim, and a Claim is covered only when all `required_proof_surfaces` are covered. Claim-bearing assertions use explicit expected-value comparisons; unary `truthy`/`falsy` are forbidden, and `exists` is limited to `implementation_structure` obligations. Across all Checks sharing one Raw Execution identity, one claim-bearing Observation belongs to one Assertion. Playwright Claim proof has one canonical form: `playwright.case.<ac-key>.passed equals true`. Missing, skipped, flaky, unexpected, failed or duplicate-within-project ACs fail closed; the same AC across distinct Playwright projects aggregates only when every instance passes. Decoder diagnostic fields such as aggregate pass, executed, skipped, status and counts cannot prove Claims.
471
+
472
+ Outcome Counterfactuals bind a local Binding; Global Counterfactuals bind an Outcome-owned `binding_ref`. Both may mutate only a proven subset of carriers. `structured_json_v2` adapter executions require completed exit-zero execution with exactly the expected `assertion_value_mismatch` set. A weak `playwright_json_v1` Counterfactual may accept exit one only under exact, complete unexpected-instance accounting; ordinary Playwright Baseline Checks still require exit zero. Standard frozen Playwright content is trusted verifier input. For a `weak_observability` Outcome, every claim-bearing Playwright AC and related Claim needs same-Check sensitivity. Claim and Population proofs are emitted only after the complete Check status is `passed`.
473
+
474
+ Raw Execution identity binds frozen runner identity plus canonical declared Environment Requirements, never actual environment values. A Playwright Test uses `[ac:<assertion-key>]`; one Test may bind at most one declared AC. Every Claim-bearing structured Check needs same-Check, Claim-related Counterfactual sensitivity; unrelated Artifacts or another Check do not count. Counterfactual Findings are projected into their owning Check Result before Progress is written, so status/resume recover the Finding without a new Global Outcome state. Explain traces Source Item → canonical target → Claim or Assertion → required surfaces → Check → adapter → Observation.
475
+
476
+ The workdir `.ty-context/compiled-contract.json` is only a rebuildable cache projection. Previous authority, the immutable initial base, risk floor and Final Gate identity come only from the common-dir snapshot. Commit, verifier migration, clear and abandon share one active-state lock; Final/Verify recheck identity and Stop/close use accepted-identity CAS. Development-period V2 Active Authority, Progress and Receipts are not migrated. Corrupt continuity is recovered explicitly with `abandon --force-corrupt-state`.
477
+
478
+ Final Gate may run only Contract-declared verification commands and never production mutation/deployment/payment/migration execution. Retry defaults to none and is allowed once only for `transient_once` + idempotent + read-only/test-sandbox runners. Runners receive a minimal environment whitelist plus only declared environment requirements. Protected authority/proof inputs reject symlinks and detectable hardlinks. Network isolation remains external. Receipts are audit-only (`reusable_for_acceptance: false`). Human, CI, deployment and product confirmation live only in `external_confirmations`; a machine pass with pending confirmations reports `machine_accepted_external_pending`.
479
+
480
+ ## Compatibility And Migration
481
+
482
+ Version 0.6.0 retires the V1 schema/runtime and repo-local Hook. Enable, disable and upgrade remove only exact Tiny Context managed Hook entries. Relocated package-owned absolute commands are recognized only when known managed status and package layout match; similar-name user Hooks remain. Upgrade never imports V1 progress or Receipts into V2 authority. Delivery Set, `composite-campaign` and `composite-long-task` commands are non-executing tombstones.
483
+
484
+ Version 0.6.0 defines the first public V2 semantics while retaining the `long-task-delivery-v2` schema name and physical `outcome_files` parser form. Optional Source Plan authoring adds no Schema, CLI, Preflight, Compile, Validator, Receipt, Authority or state. Preflight and direct Compile use one activation-safety kernel.
485
+
486
+ Version 0.7.2 strengthens that same V2 authority with ordered Stages, bounded required targets/root entrypoints, explicit success/degradation journeys and scenarios, typed Evidence Capabilities, typed external impact, risk-proportional Product Conformance and terminal target/Stage projections. An older V2 Contract missing those fields reports the indexed manual migration `long-task-v2-semantic-drift-authority`; re-author the missing meaning from Source. Upgrade never infers those semantics or imports old Progress/Receipts as passing evidence.
487
+
488
+ `/normal-long-task` is also a retirement pointer to `/long-task-workflow`; it creates no checklist, prompt, audit, matrix, verdict or second authority.
489
+
490
+ ### Package update modes
491
+
492
+ After updating the package, run `ty-context upgrade`. Use `ty-context upgrade --check` first when you need a read-only plan.
493
+
494
+ Release metadata declares one update mode: `sync-only`, `upgrade-required` or `manual-required`. Upgrade plans report steps as `safe_pending`, `manual_required` or `blocked`. A `sync-only` release may use `sync`; `sync` does not run migrations. An `upgrade-required` release must run upgrade, while `manual-required` includes an explicit operator step.
495
+
496
+ ## Development And Verification
497
+
498
+ ```powershell
499
+ npm install
500
+ npm run format:check
501
+ npm run typecheck --workspace project-tiny-context-harness
502
+ npm run build --workspace project-tiny-context-harness
503
+ npm run test:affected:list
504
+ npm run test:affected
505
+ npm run test:long-task:trust
506
+ npm run test:long-task-performance --workspace project-tiny-context-harness
507
+ npm test
508
+ npm run smoke:quickstart
509
+ npm run preview:pack
510
+ npm run launch:check
511
+ node packages/ty-context/dist/cli.js package check-source
512
+ make validate-harness
513
+ ```
514
+
515
+ `test:affected` is the edit/fix loop. `test:long-task:trust` is the frozen-candidate high-impact boundary gate used by pull-request CI. `npm test` is the complete release regression retained on `main` and publish; do not rerun it after every small repair. Explicit delivery-contract and complete Long-Task gates remain available as package workspace scripts.
516
+
517
+ The modularity gate is `ty-context check-modularity`. Scoped waivers require `owner`, `introduced_at`, `reason`, `tracking_issue` and `expiry_condition`.
518
+
519
+ `npm run preview:pack` produces a local preview named `project-tiny-context-harness-0.7.6.tgz` under the preview output directory.
520
+
521
+ ## Community And Further Reading
522
+
523
+ Feedback from real repositories is especially useful. Open an [adoption report](https://github.com/Seven128/project-tiny-context-harness/issues/new?template=adoption_report.yml) with the recovery problem and what remained unclear.
524
+
525
+ Early feedback and starter issues:
526
+
527
+ - Report a [Context recovery gap](https://github.com/Seven128/project-tiny-context-harness/issues/new?template=context_gap.yml) through `context_gap.yml`.
528
+ - Share results in the pinned [adoption reports issue](https://github.com/Seven128/project-tiny-context-harness/issues/4).
529
+ - Pick a starter issue: [demo](https://github.com/Seven128/project-tiny-context-harness/issues/5), [sample walkthrough](https://github.com/Seven128/project-tiny-context-harness/issues/6), [benchmark rerun](https://github.com/Seven128/project-tiny-context-harness/issues/7) or [launch FAQ](https://github.com/Seven128/project-tiny-context-harness/issues/8).
530
+ - Keep claims narrow: recovery evidence is useful; benchmark speedup claims need fresh Minimal Context benchmark runs.
531
+
532
+ Read the [roadmap](docs/roadmap.md), [Benchmarking And Evidence](docs/benchmarking.md), [comparison guide](docs/comparison.md), [adoption guide](docs/adopt-existing-repo.md), [agent surface recipes](docs/agent-surface-recipes.md) and [FAQ](docs/faq.md).
533
+
534
+ For concrete examples, see the [fresh-agent recovery walkthrough](docs/examples/fresh-agent-recovery.md), [Minimal Context sample guide](docs/examples/minimal-context-sample.md) and [browseable sample repository](examples/minimal-context-sample/). The longer argument is [Fresh coding-agent sessions need project memory, not more ceremony](docs/articles/fresh-agent-project-memory.md).
535
+
536
+ ## Honest Limits
537
+
538
+ - Tiny Context does not create or restore a platform Goal or physical session.
539
+ - It cannot prove that a user declared every real requirement.
540
+ - Bounded Context keyword search can still miss synonyms or indirect dependencies; it supplements rather than replaces semantic judgment.
541
+ - Harness cannot switch the host-selected model; it only asks for the one post-Authority-Lock user choice.
542
+ - Core long-task execution intentionally provides no parallel mutation runtime.
543
+ - It does not observe platform token counts or model-call counts.
544
+ - Network policy is declared to runners and proxy variables are restricted, but this is not an OS sandbox.
545
+ - Same-user/admin filesystem tampering and Hook bypass are outside its security boundary.
546
+ - Git/PR/CI, deployment and human product confirmation remain external responsibilities.
547
+
548
+ ## License
549
+
550
+ MIT