project-tiny-context-harness 0.8.11 → 0.8.13

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 (395) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +514 -472
  3. package/assets/README.md +803 -749
  4. package/assets/README.zh-CN.md +468 -431
  5. package/assets/agents/.gitkeep +1 -1
  6. package/assets/agents/AGENTS_CORE.md +22 -24
  7. package/assets/agents/long-task-implementation.toml +15 -0
  8. package/assets/context_templates/architecture.md +18 -18
  9. package/assets/context_templates/area.md +30 -30
  10. package/assets/context_templates/context.toml +24 -24
  11. package/assets/context_templates/deployment.md +35 -35
  12. package/assets/context_templates/global.md +56 -56
  13. package/assets/context_templates/product-surface-contract.md +70 -70
  14. package/assets/context_templates/screen-contract.md +189 -189
  15. package/assets/context_templates/verification.md +25 -25
  16. package/assets/github/.gitkeep +1 -1
  17. package/assets/github/harness.yml +39 -39
  18. package/assets/make/.gitkeep +1 -1
  19. package/assets/make/ty-context.mk +48 -48
  20. package/assets/skills/context_development_engineer/SKILL.md +72 -185
  21. package/assets/skills/context_full_project_export/SKILL.md +28 -28
  22. package/assets/skills/context_harness_upgrade/SKILL.md +60 -60
  23. package/assets/skills/context_product_plan/SKILL.md +35 -101
  24. package/assets/skills/context_surface_contract/SKILL.md +194 -191
  25. package/assets/skills/context_uiux_design/SKILL.md +49 -172
  26. package/assets/skills/design-resource-authoring/SKILL.md +54 -88
  27. package/assets/skills/design-resource-authoring/references/downstream-handoff.md +51 -163
  28. package/assets/skills/design-resource-authoring/references/formal-selected-web-app-handoff.md +96 -0
  29. package/assets/skills/design-resource-authoring/references/open-design-provider.md +140 -120
  30. package/assets/skills/design-resource-authoring/references/recovery-and-writeback.md +199 -0
  31. package/assets/skills/design-resource-authoring/references/resource-selection.md +158 -181
  32. package/assets/skills/design-system-authoring/SKILL.md +57 -57
  33. package/assets/skills/design-system-authoring/agents/openai.yaml +6 -6
  34. package/assets/skills/design-system-authoring/references/authority-adoption.md +48 -48
  35. package/assets/skills/design-system-authoring/references/open-design-design-system-provider.md +110 -110
  36. package/assets/skills/long-task-workflow/SKILL.md +71 -106
  37. package/assets/skills/long-task-workflow/agents/openai.yaml +1 -1
  38. package/assets/skills/long-task-workflow/references/authority-lifecycle.md +71 -69
  39. package/assets/skills/long-task-workflow/references/contract-authoring.md +110 -101
  40. package/assets/skills/long-task-workflow/references/evidence-design.md +99 -78
  41. package/assets/skills/long-task-workflow/references/source-authoring.md +90 -90
  42. package/assets/tools/validate_context.py +442 -442
  43. package/dist/commands/design-resource-recovery.d.ts +1 -0
  44. package/dist/commands/design-resource-recovery.js +152 -0
  45. package/dist/commands/design-resource.js +29 -3
  46. package/dist/commands/enable.js +2 -0
  47. package/dist/commands/index.js +2 -2
  48. package/dist/commands/long-task-revision.js +8 -7
  49. package/dist/commands/sync.js +2 -0
  50. package/dist/index.d.ts +3 -3
  51. package/dist/index.js +2 -0
  52. package/dist/lib/compact-authoring-support.d.ts +22 -0
  53. package/dist/lib/compact-authoring-support.js +143 -0
  54. package/dist/lib/compact-shared-structure-authoring.d.ts +5 -0
  55. package/dist/lib/compact-shared-structure-authoring.js +9 -0
  56. package/dist/lib/compact-shared-structure-types.d.ts +61 -0
  57. package/dist/lib/compact-shared-structure-types.js +1 -0
  58. package/dist/lib/compact-shared-structure-validation.d.ts +2 -0
  59. package/dist/lib/compact-shared-structure-validation.js +159 -0
  60. package/dist/lib/compact-shared-structures.d.ts +3 -0
  61. package/dist/lib/compact-shared-structures.js +204 -0
  62. package/dist/lib/design-resource-fact-enums.d.ts +4 -0
  63. package/dist/lib/design-resource-fact-enums.js +12 -0
  64. package/dist/lib/design-resource-fact-manifest-shape-evidence.js +2 -2
  65. package/dist/lib/design-resource-fact-policy.d.ts +2 -2
  66. package/dist/lib/design-resource-fact-types.d.ts +2 -2
  67. package/dist/lib/design-resource-handoff-bundle-draft.js +4 -2
  68. package/dist/lib/design-resource-handoff-input-types.d.ts +3 -0
  69. package/dist/lib/design-resource-handoff-parser.d.ts +2 -2
  70. package/dist/lib/design-resource-handoff-parser.js +2 -2
  71. package/dist/lib/design-resource-handoff-shape.d.ts +2 -0
  72. package/dist/lib/design-resource-handoff-shape.js +10 -0
  73. package/dist/lib/design-resource-handoff-snapshot.js +4 -0
  74. package/dist/lib/design-resource-handoff-validation.d.ts +4 -1
  75. package/dist/lib/design-resource-handoff-validation.js +11 -0
  76. package/dist/lib/design-resource-handoff-web-dependency-validation.d.ts +4 -2
  77. package/dist/lib/design-resource-reconciliation-codec.d.ts +2 -0
  78. package/dist/lib/design-resource-reconciliation-codec.js +174 -0
  79. package/dist/lib/design-resource-reconciliation-types.d.ts +62 -0
  80. package/dist/lib/design-resource-reconciliation-types.js +1 -0
  81. package/dist/lib/design-resource-reconciliation.d.ts +3 -0
  82. package/dist/lib/design-resource-reconciliation.js +224 -0
  83. package/dist/lib/design-resource-recovery-authority-policy.d.ts +8 -0
  84. package/dist/lib/design-resource-recovery-authority-policy.js +123 -0
  85. package/dist/lib/design-resource-recovery-catalog-resources.d.ts +6 -0
  86. package/dist/lib/design-resource-recovery-catalog-resources.js +121 -0
  87. package/dist/lib/design-resource-recovery-catalog-shape.d.ts +3 -0
  88. package/dist/lib/design-resource-recovery-catalog-shape.js +104 -0
  89. package/dist/lib/design-resource-recovery-catalog.d.ts +9 -0
  90. package/dist/lib/design-resource-recovery-catalog.js +103 -0
  91. package/dist/lib/design-resource-recovery-cleanup.d.ts +2 -0
  92. package/dist/lib/design-resource-recovery-cleanup.js +11 -0
  93. package/dist/lib/design-resource-recovery-codec-primitives.d.ts +19 -0
  94. package/dist/lib/design-resource-recovery-codec-primitives.js +92 -0
  95. package/dist/lib/design-resource-recovery-codec.d.ts +4 -0
  96. package/dist/lib/design-resource-recovery-codec.js +93 -0
  97. package/dist/lib/design-resource-recovery-current.d.ts +9 -0
  98. package/dist/lib/design-resource-recovery-current.js +41 -0
  99. package/dist/lib/design-resource-recovery-delta-policy.d.ts +5 -0
  100. package/dist/lib/design-resource-recovery-delta-policy.js +108 -0
  101. package/dist/lib/design-resource-recovery-files.d.ts +37 -0
  102. package/dist/lib/design-resource-recovery-files.js +204 -0
  103. package/dist/lib/design-resource-recovery-final-disposition-shape.d.ts +2 -0
  104. package/dist/lib/design-resource-recovery-final-disposition-shape.js +47 -0
  105. package/dist/lib/design-resource-recovery-patch-types.d.ts +54 -0
  106. package/dist/lib/design-resource-recovery-patch-types.js +1 -0
  107. package/dist/lib/design-resource-recovery-replay.d.ts +7 -0
  108. package/dist/lib/design-resource-recovery-replay.js +112 -0
  109. package/dist/lib/design-resource-recovery-repository-bindings.d.ts +9 -0
  110. package/dist/lib/design-resource-recovery-repository-bindings.js +49 -0
  111. package/dist/lib/design-resource-recovery-schema.d.ts +5 -0
  112. package/dist/lib/design-resource-recovery-schema.js +5 -0
  113. package/dist/lib/design-resource-recovery-shape.d.ts +10 -0
  114. package/dist/lib/design-resource-recovery-shape.js +184 -0
  115. package/dist/lib/design-resource-recovery-source-authority.d.ts +5 -0
  116. package/dist/lib/design-resource-recovery-source-authority.js +219 -0
  117. package/dist/lib/design-resource-recovery-text.d.ts +17 -0
  118. package/dist/lib/design-resource-recovery-text.js +186 -0
  119. package/dist/lib/design-resource-recovery-types.d.ts +197 -0
  120. package/dist/lib/design-resource-recovery-types.js +1 -0
  121. package/dist/lib/design-resource-recovery-writeback-policy.d.ts +5 -0
  122. package/dist/lib/design-resource-recovery-writeback-policy.js +326 -0
  123. package/dist/lib/design-resource-recovery-writeback-shape.d.ts +6 -0
  124. package/dist/lib/design-resource-recovery-writeback-shape.js +155 -0
  125. package/dist/lib/design-resource-recovery.d.ts +44 -0
  126. package/dist/lib/design-resource-recovery.js +216 -0
  127. package/dist/lib/design-resource-symbolic-applicability-authority.d.ts +7 -0
  128. package/dist/lib/design-resource-symbolic-applicability-authority.js +19 -0
  129. package/dist/lib/design-resource-symbolic-applicability-policy.d.ts +12 -0
  130. package/dist/lib/design-resource-symbolic-applicability-policy.js +79 -0
  131. package/dist/lib/design-resource-symbolic-applicability-profiles.d.ts +8 -0
  132. package/dist/lib/design-resource-symbolic-applicability-profiles.js +55 -0
  133. package/dist/lib/design-resource-symbolic-applicability-shape.d.ts +2 -0
  134. package/dist/lib/design-resource-symbolic-applicability-shape.js +76 -0
  135. package/dist/lib/design-resource-symbolic-applicability-validation.d.ts +7 -0
  136. package/dist/lib/design-resource-symbolic-applicability-validation.js +128 -0
  137. package/dist/lib/design-resource-symbolic-compilation.d.ts +3 -0
  138. package/dist/lib/design-resource-symbolic-compilation.js +13 -0
  139. package/dist/lib/design-resource-symbolic-denotation.d.ts +3 -0
  140. package/dist/lib/design-resource-symbolic-denotation.js +167 -0
  141. package/dist/lib/design-resource-symbolic-disposition-validation.d.ts +4 -0
  142. package/dist/lib/design-resource-symbolic-disposition-validation.js +28 -0
  143. package/dist/lib/design-resource-symbolic-fact-policy.d.ts +12 -0
  144. package/dist/lib/design-resource-symbolic-fact-policy.js +12 -0
  145. package/dist/lib/design-resource-symbolic-fact-shape.d.ts +3 -0
  146. package/dist/lib/design-resource-symbolic-fact-shape.js +138 -0
  147. package/dist/lib/design-resource-symbolic-fact-types.d.ts +213 -0
  148. package/dist/lib/design-resource-symbolic-fact-types.js +1 -0
  149. package/dist/lib/design-resource-symbolic-fact-validation.d.ts +3 -0
  150. package/dist/lib/design-resource-symbolic-fact-validation.js +86 -0
  151. package/dist/lib/design-resource-symbolic-indexes.d.ts +23 -0
  152. package/dist/lib/design-resource-symbolic-indexes.js +54 -0
  153. package/dist/lib/design-resource-symbolic-manifest-shape.d.ts +3 -0
  154. package/dist/lib/design-resource-symbolic-manifest-shape.js +155 -0
  155. package/dist/lib/design-resource-symbolic-manifest-validation.d.ts +6 -0
  156. package/dist/lib/design-resource-symbolic-manifest-validation.js +132 -0
  157. package/dist/lib/design-resource-symbolic-noninterference-artifact.d.ts +33 -0
  158. package/dist/lib/design-resource-symbolic-noninterference-artifact.js +110 -0
  159. package/dist/lib/design-resource-symbolic-noninterference-equivalence.d.ts +3 -0
  160. package/dist/lib/design-resource-symbolic-noninterference-equivalence.js +77 -0
  161. package/dist/lib/design-resource-symbolic-noninterference-recompute.d.ts +4 -0
  162. package/dist/lib/design-resource-symbolic-noninterference-recompute.js +146 -0
  163. package/dist/lib/design-resource-symbolic-noninterference-scope.d.ts +7 -0
  164. package/dist/lib/design-resource-symbolic-noninterference-scope.js +49 -0
  165. package/dist/lib/design-resource-symbolic-noninterference-shape.d.ts +2 -0
  166. package/dist/lib/design-resource-symbolic-noninterference-shape.js +152 -0
  167. package/dist/lib/design-resource-symbolic-noninterference-types.d.ts +103 -0
  168. package/dist/lib/design-resource-symbolic-noninterference-types.js +1 -0
  169. package/dist/lib/design-resource-symbolic-noninterference-validation.d.ts +5 -0
  170. package/dist/lib/design-resource-symbolic-noninterference-validation.js +62 -0
  171. package/dist/lib/design-resource-symbolic-oracle-fingerprint.d.ts +1 -0
  172. package/dist/lib/design-resource-symbolic-oracle-fingerprint.js +47 -0
  173. package/dist/lib/design-resource-symbolic-predicate-shape.d.ts +6 -0
  174. package/dist/lib/design-resource-symbolic-predicate-shape.js +123 -0
  175. package/dist/lib/design-resource-symbolic-production-closure.d.ts +4 -0
  176. package/dist/lib/design-resource-symbolic-production-closure.js +144 -0
  177. package/dist/lib/design-resource-symbolic-proof-authority-validation.d.ts +10 -0
  178. package/dist/lib/design-resource-symbolic-proof-authority-validation.js +68 -0
  179. package/dist/lib/design-resource-symbolic-proof-validation.d.ts +10 -0
  180. package/dist/lib/design-resource-symbolic-proof-validation.js +89 -0
  181. package/dist/lib/design-resource-symbolic-region-validation.d.ts +19 -0
  182. package/dist/lib/design-resource-symbolic-region-validation.js +146 -0
  183. package/dist/lib/design-resource-symbolic-resource-validation.d.ts +5 -0
  184. package/dist/lib/design-resource-symbolic-resource-validation.js +90 -0
  185. package/dist/lib/design-resource-symbolic-rule-shape.d.ts +27 -0
  186. package/dist/lib/design-resource-symbolic-rule-shape.js +158 -0
  187. package/dist/lib/design-resource-symbolic-safety-validation.d.ts +6 -0
  188. package/dist/lib/design-resource-symbolic-safety-validation.js +29 -0
  189. package/dist/lib/design-resource-symbolic-source-ir-evaluation.d.ts +19 -0
  190. package/dist/lib/design-resource-symbolic-source-ir-evaluation.js +74 -0
  191. package/dist/lib/design-resource-symbolic-source-ir-evidence.d.ts +44 -0
  192. package/dist/lib/design-resource-symbolic-source-ir-evidence.js +88 -0
  193. package/dist/lib/design-resource-symbolic-source-ir-oracle.d.ts +13 -0
  194. package/dist/lib/design-resource-symbolic-source-ir-oracle.js +96 -0
  195. package/dist/lib/design-resource-symbolic-source-ir-proof.d.ts +14 -0
  196. package/dist/lib/design-resource-symbolic-source-ir-proof.js +98 -0
  197. package/dist/lib/design-resource-symbolic-source-ir-shape.d.ts +2 -0
  198. package/dist/lib/design-resource-symbolic-source-ir-shape.js +38 -0
  199. package/dist/lib/design-resource-symbolic-source-ir-types.d.ts +17 -0
  200. package/dist/lib/design-resource-symbolic-source-ir-types.js +2 -0
  201. package/dist/lib/design-resource-symbolic-static-dependency-validation.d.ts +2 -0
  202. package/dist/lib/design-resource-symbolic-static-dependency-validation.js +83 -0
  203. package/dist/lib/design-resource-symbolic-structural-closure-validation.d.ts +6 -0
  204. package/dist/lib/design-resource-symbolic-structural-closure-validation.js +79 -0
  205. package/dist/lib/design-resource-symbolic-validation-support.d.ts +29 -0
  206. package/dist/lib/design-resource-symbolic-validation-support.js +111 -0
  207. package/dist/lib/design-resource-v1-capacity-header.d.ts +8 -0
  208. package/dist/lib/design-resource-v1-capacity-header.js +231 -0
  209. package/dist/lib/design-resource-v1-capacity.d.ts +5 -0
  210. package/dist/lib/design-resource-v1-capacity.js +45 -0
  211. package/dist/lib/init.js +1 -0
  212. package/dist/lib/long-task-acceptance-shape.js +8 -2
  213. package/dist/lib/long-task-activation-validation.js +13 -3
  214. package/dist/lib/long-task-admitted-observation-records.d.ts +25 -0
  215. package/dist/lib/long-task-admitted-observation-records.js +40 -0
  216. package/dist/lib/long-task-admitted-observation.d.ts +93 -0
  217. package/dist/lib/long-task-admitted-observation.js +201 -0
  218. package/dist/lib/long-task-artifacts.d.ts +1 -0
  219. package/dist/lib/long-task-artifacts.js +1 -0
  220. package/dist/lib/long-task-authority-material-diff.js +1 -0
  221. package/dist/lib/long-task-authority-policy.d.ts +5 -0
  222. package/dist/lib/long-task-authority-policy.js +5 -0
  223. package/dist/lib/long-task-authority-revision-details.js +3 -1
  224. package/dist/lib/long-task-authority.js +2 -1
  225. package/dist/lib/long-task-check-execution-policy.js +5 -0
  226. package/dist/lib/long-task-check-runner.d.ts +2 -2
  227. package/dist/lib/long-task-check-runner.js +440 -23
  228. package/dist/lib/long-task-claims.d.ts +18 -0
  229. package/dist/lib/long-task-claims.js +35 -0
  230. package/dist/lib/long-task-codex-agent-profile.d.ts +42 -0
  231. package/dist/lib/long-task-codex-agent-profile.js +276 -0
  232. package/dist/lib/long-task-compact-authoring-projections.d.ts +12 -0
  233. package/dist/lib/long-task-compact-authoring-projections.js +67 -0
  234. package/dist/lib/long-task-compact-authoring.d.ts +3 -0
  235. package/dist/lib/long-task-compact-authoring.js +173 -0
  236. package/dist/lib/long-task-compact-carrier.d.ts +7 -0
  237. package/dist/lib/long-task-compact-carrier.js +132 -0
  238. package/dist/lib/long-task-compact-parser.d.ts +14 -0
  239. package/dist/lib/long-task-compact-parser.js +123 -0
  240. package/dist/lib/long-task-compact-primitives.d.ts +22 -0
  241. package/dist/lib/long-task-compact-primitives.js +132 -0
  242. package/dist/lib/long-task-compact-projections.d.ts +4 -0
  243. package/dist/lib/long-task-compact-projections.js +153 -0
  244. package/dist/lib/long-task-compact-structure-targets.d.ts +2 -0
  245. package/dist/lib/long-task-compact-structure-targets.js +91 -0
  246. package/dist/lib/long-task-conformance-policy.js +3 -1
  247. package/dist/lib/long-task-counterfactual-claim-policy.d.ts +3 -4
  248. package/dist/lib/long-task-counterfactual-claim-policy.js +11 -3
  249. package/dist/lib/long-task-counterfactual-sandbox.d.ts +1 -1
  250. package/dist/lib/long-task-counterfactual-sandbox.js +8 -5
  251. package/dist/lib/long-task-counterfactual-types.d.ts +2 -0
  252. package/dist/lib/long-task-delivery-compiler.js +2 -0
  253. package/dist/lib/long-task-delivery-parser.d.ts +1 -0
  254. package/dist/lib/long-task-delivery-parser.js +38 -6
  255. package/dist/lib/long-task-design-resource-handoff.d.ts +2 -1
  256. package/dist/lib/long-task-design-resource-handoff.js +71 -11
  257. package/dist/lib/long-task-design-resource-method-binding.d.ts +8 -1
  258. package/dist/lib/long-task-design-resource-method-binding.js +150 -0
  259. package/dist/lib/long-task-evidence-capability-codec.js +256 -34
  260. package/dist/lib/long-task-evidence-capability-policy.d.ts +3 -2
  261. package/dist/lib/long-task-evidence-capability-policy.js +142 -8
  262. package/dist/lib/long-task-evidence-capability-runtime.d.ts +5 -2
  263. package/dist/lib/long-task-evidence-capability-runtime.js +420 -68
  264. package/dist/lib/long-task-evidence-capability-types.d.ts +70 -2
  265. package/dist/lib/long-task-evidence-sensitivity-policy.d.ts +9 -0
  266. package/dist/lib/long-task-evidence-sensitivity-policy.js +31 -1
  267. package/dist/lib/long-task-evidence-v2.d.ts +4 -4
  268. package/dist/lib/long-task-evidence-v2.js +322 -44
  269. package/dist/lib/long-task-exact-comparison.d.ts +16 -0
  270. package/dist/lib/long-task-exact-comparison.js +28 -0
  271. package/dist/lib/long-task-execution-observation.d.ts +24 -0
  272. package/dist/lib/long-task-execution-observation.js +332 -0
  273. package/dist/lib/long-task-explain-acceptance-link.d.ts +4 -0
  274. package/dist/lib/long-task-explain-acceptance-link.js +4 -0
  275. package/dist/lib/long-task-explain-claim-links.d.ts +2 -0
  276. package/dist/lib/long-task-explain-claim-links.js +2 -0
  277. package/dist/lib/long-task-explain-source-links.d.ts +6 -0
  278. package/dist/lib/long-task-final-v2.js +7 -4
  279. package/dist/lib/long-task-hook-install.d.ts +19 -2
  280. package/dist/lib/long-task-hook-install.js +288 -91
  281. package/dist/lib/long-task-json-pointer-observation.d.ts +59 -0
  282. package/dist/lib/long-task-json-pointer-observation.js +184 -0
  283. package/dist/lib/long-task-observation-artifact.d.ts +8 -0
  284. package/dist/lib/long-task-observation-artifact.js +58 -0
  285. package/dist/lib/long-task-observation-authority.d.ts +17 -0
  286. package/dist/lib/long-task-observation-authority.js +348 -0
  287. package/dist/lib/long-task-paths.js +1 -1
  288. package/dist/lib/long-task-playwright-capability-records.d.ts +2 -0
  289. package/dist/lib/long-task-playwright-capability-records.js +74 -2
  290. package/dist/lib/long-task-process-observation.d.ts +6 -0
  291. package/dist/lib/long-task-process-observation.js +117 -0
  292. package/dist/lib/long-task-process-runtime-closure.d.ts +13 -0
  293. package/dist/lib/long-task-process-runtime-closure.js +175 -0
  294. package/dist/lib/long-task-progress.js +2 -0
  295. package/dist/lib/long-task-protected-files.d.ts +1 -1
  296. package/dist/lib/long-task-protected-files.js +1 -30
  297. package/dist/lib/long-task-risk.js +8 -3
  298. package/dist/lib/long-task-root-shape.js +10 -1
  299. package/dist/lib/long-task-runner-environment.d.ts +1 -1
  300. package/dist/lib/long-task-runner-environment.js +4 -4
  301. package/dist/lib/long-task-runner-freeze.d.ts +4 -2
  302. package/dist/lib/long-task-runner-freeze.js +130 -28
  303. package/dist/lib/long-task-runtime-types.d.ts +111 -0
  304. package/dist/lib/long-task-scoped-binding.d.ts +13 -0
  305. package/dist/lib/long-task-scoped-binding.js +11 -0
  306. package/dist/lib/long-task-semantic-contract-types.d.ts +2 -1
  307. package/dist/lib/long-task-semantic-fact-binding-types.d.ts +8 -0
  308. package/dist/lib/long-task-semantic-fact-closure.js +4 -1
  309. package/dist/lib/long-task-semantic-fact-contract-closure.d.ts +1 -1
  310. package/dist/lib/long-task-semantic-fact-contract-closure.js +18 -6
  311. package/dist/lib/long-task-semantic-fact-contract-facts.d.ts +1 -1
  312. package/dist/lib/long-task-semantic-fact-contract-facts.js +4 -1
  313. package/dist/lib/long-task-semantic-fact-contract-proofs.d.ts +1 -1
  314. package/dist/lib/long-task-semantic-fact-contract-proofs.js +12 -3
  315. package/dist/lib/long-task-semantic-fact-evidence.d.ts +8 -4
  316. package/dist/lib/long-task-semantic-fact-evidence.js +103 -43
  317. package/dist/lib/long-task-semantic-fact-shape.js +17 -6
  318. package/dist/lib/long-task-shape-primitives.d.ts +1 -1
  319. package/dist/lib/long-task-shape-primitives.js +1 -0
  320. package/dist/lib/long-task-source-claim-validation.js +4 -1
  321. package/dist/lib/long-task-source-item-parser.d.ts +2 -2
  322. package/dist/lib/long-task-source-item-parser.js +20 -11
  323. package/dist/lib/long-task-source-target-continuity.d.ts +2 -2
  324. package/dist/lib/long-task-source-target-continuity.js +35 -2
  325. package/dist/lib/long-task-source-target-index.d.ts +3 -0
  326. package/dist/lib/long-task-source-target-index.js +19 -0
  327. package/dist/lib/long-task-stage-policy.js +10 -4
  328. package/dist/lib/long-task-static-observation-freeze.d.ts +83 -0
  329. package/dist/lib/long-task-static-observation-freeze.js +428 -0
  330. package/dist/lib/long-task-status-projection.js +5 -1
  331. package/dist/lib/long-task-target-policy.d.ts +1 -1
  332. package/dist/lib/long-task-target-policy.js +3 -0
  333. package/dist/lib/long-task-ui-design-policy.js +64 -4
  334. package/dist/lib/long-task-ui-surface-shape.js +195 -0
  335. package/dist/lib/long-task-ui-surface-types.d.ts +53 -0
  336. package/dist/lib/long-task-verifier-dependency-closure.js +7 -3
  337. package/dist/lib/long-task-verifier-v2.js +70 -9
  338. package/dist/lib/long-task-worker-selection.d.ts +2 -0
  339. package/dist/lib/long-task-worker-selection.js +7 -0
  340. package/dist/lib/long-task-workspace-scope.js +3 -1
  341. package/dist/lib/long-task-workspace.d.ts +1 -1
  342. package/dist/lib/long-task-workspace.js +12 -13
  343. package/dist/lib/migrations.js +58 -0
  344. package/dist/lib/profiles.js +0 -1
  345. package/dist/lib/repository-path-safety.d.ts +14 -0
  346. package/dist/lib/repository-path-safety.js +126 -0
  347. package/dist/lib/semantic-fact-compact-authoring.d.ts +2 -0
  348. package/dist/lib/semantic-fact-compact-authoring.js +160 -0
  349. package/dist/lib/semantic-fact-compact-capacity.d.ts +9 -0
  350. package/dist/lib/semantic-fact-compact-capacity.js +40 -0
  351. package/dist/lib/semantic-fact-compact-carrier.d.ts +16 -0
  352. package/dist/lib/semantic-fact-compact-carrier.js +146 -0
  353. package/dist/lib/semantic-fact-compact-parser.d.ts +17 -0
  354. package/dist/lib/semantic-fact-compact-parser.js +168 -0
  355. package/dist/lib/semantic-fact-compact-revision.d.ts +11 -0
  356. package/dist/lib/semantic-fact-compact-revision.js +64 -0
  357. package/dist/lib/semantic-fact-compact-support.d.ts +23 -0
  358. package/dist/lib/semantic-fact-compact-support.js +159 -0
  359. package/dist/lib/semantic-fact-policy-census.d.ts +1 -0
  360. package/dist/lib/semantic-fact-policy-census.js +43 -0
  361. package/dist/lib/semantic-fact-proof-shape.d.ts +1 -1
  362. package/dist/lib/semantic-fact-property-shape.d.ts +1 -1
  363. package/dist/lib/semantic-fact-source-parser.d.ts +5 -0
  364. package/dist/lib/semantic-fact-source-parser.js +47 -6
  365. package/dist/lib/structural-closure-cost.d.ts +79 -0
  366. package/dist/lib/structural-closure-cost.js +91 -0
  367. package/dist/lib/symbolic-denotation-dag-builder.d.ts +25 -0
  368. package/dist/lib/symbolic-denotation-dag-builder.js +176 -0
  369. package/dist/lib/symbolic-denotation-domain-validation.d.ts +3 -0
  370. package/dist/lib/symbolic-denotation-domain-validation.js +56 -0
  371. package/dist/lib/symbolic-denotation-engine.d.ts +32 -0
  372. package/dist/lib/symbolic-denotation-engine.js +140 -0
  373. package/dist/lib/symbolic-denotation-public.d.ts +11 -0
  374. package/dist/lib/symbolic-denotation-public.js +12 -0
  375. package/dist/lib/symbolic-denotation-runtime.d.ts +20 -0
  376. package/dist/lib/symbolic-denotation-runtime.js +90 -0
  377. package/dist/lib/symbolic-denotation-support.d.ts +11 -0
  378. package/dist/lib/symbolic-denotation-support.js +49 -0
  379. package/dist/lib/symbolic-denotation-types.d.ts +133 -0
  380. package/dist/lib/symbolic-denotation-types.js +18 -0
  381. package/dist/lib/symbolic-denotation-validation.d.ts +6 -0
  382. package/dist/lib/symbolic-denotation-validation.js +126 -0
  383. package/dist/lib/sync-engine.d.ts +1 -0
  384. package/dist/lib/sync-engine.js +4 -1
  385. package/dist/lib/upgrade.js +1 -0
  386. package/dist/long-task-hook.js +40 -1
  387. package/dist/public-types.d.ts +8 -0
  388. package/dist/public-types.js +1 -0
  389. package/dist/schemas/design-resource-symbolic-noninterference-artifact-v2.schema.json +289 -0
  390. package/dist/schemas/design-resource-symbolic-source-ir-v1.schema.json +130 -0
  391. package/dist/schemas/long-task-delivery-v2/long-task-delivery-v2.schema.json +435 -5
  392. package/migrations/README.md +92 -15
  393. package/package.json +2 -2
  394. package/source-mappings.yaml +28 -25
  395. package/assets/skills/source-plan-authoring/SKILL.md +0 -14
@@ -1,108 +1,73 @@
1
- ---
1
+ ---
2
2
  name: long-task-workflow
3
3
  description: Author, preflight, execute, resume, verify, or close one complete Single-Goal Delivery Contract in the currently selected host execution Goal and workspace. Use only when explicitly invoked or a valid common-dir active authority binding exists.
4
- ---
5
-
6
- # Single-Goal Long-Task Workflow
7
-
8
- ## Boundaries
9
-
10
- Use one currently selected host execution Goal, one repository, one selected verification workspace, one complete Contract and one Final Gate. This workflow never creates or manages a scheduler, model worker, agent runtime, App Server, branch/worktree fan-out, merge, push, PR, deployment, Campaign/SFC/Packet/Wave chain, matrix, verdict or second Contract plan. The current Goal may optionally use one or multiple platform-native agents/subagents or user-authorized Git parallelism as implementation means. Harness never allocates, schedules, retries or recovers them; their reports are not Progress or proof, and every result must converge into the selected verification workspace before verification counts. Never activate from task size alone.
11
-
12
- That Goal is selected and owned by the host/user. Harness does not create, persist or reconnect a Goal identifier. Compaction may continue inside it; a later physical Goal/session restores semantic workflow state through `resume` rather than reconnecting a prior Turn.
13
-
14
- The host and user also own model selection. The workflow has exactly one user-choice checkpoint after the first Authority Lock and before implementation; Harness neither switches the model nor persists model-routing/checkpoint state. No checkpoint file, acknowledgement state, model route, model-tier scheduler, automatic model switch, `authority_revision_in_progress` state or native-Goal completion state is created. Outside that boundary, do not pause a healthy Goal solely to change or downgrade the model. Do not create a separate approval checkpoint for a defensible recommended plan choice. A targeted pre-Authority clarification is still required when a missing user preference could materially change research or selection; genuine Source conflicts or choices the user explicitly reserves may likewise require a decision before Authority Lock. Capability-related drift is handled by targeted repair plus the Final Gate. The current Goal may choose platform-native internal delegation, but Harness owns no subagent dispatch/retry/recovery state, delegated reports are not Progress or proof, and all outputs must converge into the selected verification workspace before verification can count.
15
-
16
- `long-task-delivery-v2` is the only active Contract schema. `delivery-contract.yaml` is the root authoring file. New authoring uses inline Outcomes; existing `outcome_files` are physical compatibility only. `delivery-set` is retired and non-executing.
17
-
18
- ## Controlling Objective
19
-
20
- Prevent false completion inside declared authority. Given complete and accurate Source at the declared observable granularity, a meaning-preserving Source-to-Contract projection, complete applicability expansion and a sound named verifier/runner trust boundary, `AcceptedDeliveryTerminal` must imply that no declared observable drift remains. Implementation may drift, fail or require rework, but every declared non-Result requirement, exact applicability cell and AC must remain traceable and every unsatisfied, unverifiable, insufficiently evidenced, stale or externally pending item must block or explicitly qualify complete delivery. In particular, unclassified Source, an omitted architecture obligation, Control field/relation, population-universe member, wrong target/condition/input/state/journey, proxy target, presence text, degradation path, fixed input, self-reported boundary effect, weak semantic oracle or internal entrypoint must never substitute for declared behavior. Findings should localize repair through Source Item, Stage, Outcome, Claim, applicability, Assertion, Check, Evidence Capability, execution target, Binding and owner boundary.
21
-
22
- For selected design resources, one design-specific objective is that Agent implementation, acceptance and testing fully conform to every material UI/UX Fact explicitly expressed within declared scope and conditions. Open Design can produce source-rich, implementation-readable resources, but capability alone is not a guarantee: formal Web/App authoring must derive the complete scoped Expected Fact Universe before generation; acquire a canonical entry and exact dependency closure; and freeze an Inspector manifest proving `Expected Fact Universe = Canonical Resource Facts = Handoff Indexed Facts`. The atomic identity is `subject × target × condition × variation × property`, including component instances/Anatomy Parts/relations, all applicable condition and variation axes, exact standard/custom properties, explicit N/A/exclusions, design-system lineage, dynamic populations and assets. Product Control and eight-dimension roll-ups are not the Fact ceiling; sampling, truncation, broad labels and default-page inference cannot close it. The validated `design-resource-handoff-v1` remains the residual scope/applicability/semantic adapter rather than a copy of CSS values: canonical resources own exact values, while immutable located digests, Fact Cells, Fact × required-method proof obligations, comparator/tolerance/mask, Oracle/environment and sensitivity policy project downstream. Preserve each Fact through Context-reachable targets, Source/Control/Claim authority, one independent Assertion per method, exact per-condition `fact_expectations`, and one current-snapshot `fact_results` row with attributable actual observation/environment/comparison/verdict. An exact target requires full-target layout and pixel Facts per condition. Deliberately partial input remains a constraint or blocking unresolved; incomplete acquisition/Census, missing or mismatched Facts/proofs, unsupported evidence, blockers or stale identities remain blocking. Neither provider success, file hashes nor handoff preflight proves production conformance.
23
-
24
- For non-UI meaning, complete and accurate Source defaults to the finest independently decidable semantic Fact granularity expressed, logically entailed, explicitly delegated or preserved by authoritative repository evidence. This covers product/business semantics and technical/backend/architecture semantics: goals and scope; actors, roles, tenants and entitlements; business rules and calculations; entities, fields and relations; commands, queries, workflows, state machines and time; validation, outputs/errors, APIs/protocols/events/jobs; persistence, transactions, consistency, concurrency and idempotency; faults, retries, degradation, recovery and backup; configuration, compatibility, migration and rollout; performance, capacity, reliability and cost; security, privacy, safety and compliance; observability, deployment and operations; integrations, localization, commercial rules, hardware, AI/ML and custom domains. A paragraph, Requirement, Product Control, broad state label or current implementation is never the semantic ceiling. Inventory every material input and give every applicable subject/relation/population, condition value/combination and atomic property a stable identity, typed expected predicate, owner, Source locator/digest, provenance and sensitivity. The standard catalog is a floor; discovered domain-specific families, properties, axes and proof methods extend it.
25
-
26
- One Source-embedded `semantic-fact-manifest-v1` is the task-local canonical index; durable meaning remains in its existing owning Context and exact values remain Source, never copied into Contract. It freezes a complete Inspector Census, explicit N/A/exclusion basis, non-sampling/non-truncation counts/digests, Fact Cells/Facts, dynamic populations, every Fact × required-method obligation, comparator/parameters/tolerance/mask, Oracle/environment and blockers. Require exact conservation: `Expected Semantic Facts = Source Indexed Facts = Contract Indexed Facts`, and `Fact × required-method obligations = Contract proof bindings = current Final-Gate semantic_fact results`. Every current result carries attributable actual observation/environment, frozen comparison authority, Oracle and pass/fail verdict; proof reaches the furthest independently failing boundary. Aggregate strings, representative/pairwise samples, default paths, implementation-generated expectations, ungrounded N/A, proxy-only/self-reported results and one broad pass Boolean cannot close atomic rows. Any material Source hidden as supporting-only, or any missing, extra, duplicate, unresolved, unreadable, unmapped, unimplemented, unexecuted, stale, failed, authority-drifted, reused or indistinguishable identity blocks Authority Lock or Final Gate. Genuine external authority stays a typed External Confirmation. This adds no second plan, value authority, Gate, state or implementation-order rule.
27
-
28
- Shared Engineering Quality stays thin around those semantic authorities. Before implementation, the universal Architecture Deliberation also routes triggered quality attributes or records a concrete preservation basis; during implementation, owner/boundary/failure/resource guardrails constrain correctness without prescribing order or feedback cadence; Final Gate is the sole Long-Task Engineering Quality Conformance carrier. Every material independently falsifiable invariant uses existing Source-backed technical obligations/global constraints/forbidden shortcuts, owner/path/Bindings, project-owned Checks and an independent Assertion when functional behavior could pass separately. A performance claim requires a workload, metric, baseline or budget, environment, comparator/tolerance and real benchmark/probe. Final Gate proves exactly that declared project-check-bound set—not overall code quality. Exact expected semantics remain in Semantic Facts or selected design, and no quality Boolean, matrix, Source aspect, Claim/risk kind, Contract field, second Gate, state or Receipt is added.
29
-
30
- Only fresh evidence from the complete current final snapshot may create machine acceptance. Exactly fresh `machine_accepted` with no pending External Confirmation is `AcceptedDeliveryTerminal` and may support the full declared-observable no-drift conclusion. Otherwise report the task as unfinished or qualified. `machine_accepted_external_pending` means machine-verifiable authority passed while named external confirmation remains; it proves only the declared machine scope and is not full delivery completion. Machine acceptance has no direct native-Goal effect. Never substitute prose, progress, historical tests, Receipts, one exit code or Agent judgment for the Final Gate.
31
-
32
- Anti-Degradation Assurance requires current-implementation Context to match the indexed code/runtime and protects the controlling purpose, enabling key logic, two jointly necessary implementation responsibilities, theorem boundary and adjacent `F = Implementation Freedom Boundary` from implicit weakening. `F` is an efficiency/anti-process-bloat invariant, not a third responsibility or no-drift theorem premise: within declared Source/Contract, architecture, security, forbidden-shortcut, irreversible-effect and external-action boundaries, the current Goal owns implementation order, methods, local feedback cadence and optional one-agent or multi-agent/subagent execution. Harness must not add a development phase/method permission Gate, per-edit verification mandate, agent allocator/scheduler, delegation proof or persistent delegation state. Replacing any protected invariant requires an explicit project-owner design-purpose decision and replacement proof; a new development-stage constraint must additionally identify a distinct path that final proof or a lighter project-owned check cannot cover and have positive net ROI. Agent inference, coordinated edits or cost alone do not authorize it. Mechanism changes use a two-stage hard gate. First prove `Coverage_new ⊇ Coverage_old`, `FalseNegative_new ⊆ FalseNegative_old`, and that Authority, fail-closed behavior and complete-current-final-snapshot proof cannot be bypassed. If non-degradation cannot be proved, preserve the current formal acceptance path. Only after that gate passes may positive net ROI compare incremental anti-degradation or purpose benefit with every incremental Authoring, Runtime, State, Recovery, maintenance, test, process, introduction and migration cost. No cost reduction compensates for weaker drift interception; positive net ROI permits consideration but never overrides the first gate. This creates no second Authority, Gate or state.
33
-
34
- ## Progressive Reference Loading
35
-
36
- Read only the reference needed for the current activity; these files are guidance, not new artifacts or authority:
37
-
38
- - When inputs are raw, mixed, attachment-heavy, incomplete or need synthesis/refinement while the Contract Draft is being mapped, read [`references/source-authoring.md`](references/source-authoring.md) alongside the Contract-authoring reference. Do not wait for a separate Source-authoring phase before opening the Draft.
39
- - Before creating or structurally revising Source markers, Outcomes, requirements, controls, obligations, architecture boundaries, paths, Bindings, Assertions or risk, read [`references/contract-authoring.md`](references/contract-authoring.md).
40
- - Before creating or repairing Checks, runners, Observations, proof surfaces, Playwright/structured evidence, Counterfactuals, Population or environment probes, read [`references/evidence-design.md`](references/evidence-design.md).
41
- - Before Preflight, Compile, protected revision, resume, targeted verify, Final Gate, Stop, close or abandon, read [`references/authority-lifecycle.md`](references/authority-lifecycle.md).
42
-
43
- Do not copy reference detail into another plan or state file. The same `delivery-contract.yaml`, active authority and current workspace remain the only lifecycle surfaces.
44
-
45
- ## Contract Draft And Outcome Decomposition
46
-
47
- Every input enters the same non-authoritative `delivery-contract.yaml` Draft immediately. Before the first successful formal Compile, continuously revise that Source-bound Draft while real Source inventory, provenance, refinement, markers, repository binding and mapping converge. It need not be completed in one response; keep reading Source, repository and relevant Context and feed Preflight findings back into that same Draft. Draft authoring, Preflight, Compile, rolling execution, targeted verification and Final Gate are one `long-task-workflow` lifecycle. Do not create a Source-authoring phase, standalone Contract Draft Skill, Draft Receipt, Authoring State, draft schema/CLI/runtime state or second plan.
48
-
49
- A Draft Outcome is an Outcome in that pre-Authority-Lock Draft, not a new schema field or runtime entity. Decompose only vertical, independently observable, decidable and target-verifiable results whose dependencies and owner boundary can be stated; one Outcome belongs to one declared Stage and does not span materially different success paths. Declare the ordered Stage DAG and one gate Outcome per Stage in the same Contract. Use those boundaries to project an acceptance/verification-ready working set, bind target verification, localize failures, resume findings/next actions and stale local results precisely; never use them to restrict which in-scope implementation edit may happen next.
50
-
51
- `depends_on` means acceptance and intermediate-proof readiness, not implementation permission. The gate Outcome transitively depends on the rest of its Stage, later Stage Outcomes depend on prerequisite gate Outcomes, and every multi-Outcome gate proves cross-surface consistency. The current Goal derives a temporary advisory Rolling Frontier from Stage and Outcome status, but may implement, inspect or repair any in-scope Outcome in the order current code reality favors. Do not persist a Stage Receipt, scheduler, Worker queue, mandatory implementation DAG, model route or process tree. Never split for response/YAML/file length, implementation layer, module/file count, Agent capacity, Worker assignment or desired parallelism.
52
-
53
- > Outcome decomposes execution and diagnosis, not completion authority.
54
-
55
- ## Entry And Authoring Loop
56
-
57
- 1. Read the user request or external initial proposal, selected design resources and minimum controlling Context. Collect the architecture owners, extension points, boundaries and risk-triggered engineering-quality attributes needed for the shared deliberation before deciding `Context Delta`.
58
- - For material production UI, read the Contract-authoring visual guidance before Compile. When selected resources arrive as an implementation handoff, require one marked `design-resource-handoff-v1` in `task.source_paths` and run `ty-context design-resource preflight <handoff.md>`. Require its canonical Fact manifest, frozen Inspector Census, complete standard/custom axes and property catalog, exact `subject × target × condition × variation × property` Fact Cells, all property-required proofs and exact manifest↔handoff equality; incomplete resource/dependency/Census closure, aggregate state labels, sampling/truncation, ambiguous condition profiles, unsupported evidence, unresolvable located digests, unresolved lineage/conflicts/blockers, missing exact-target layout/pixel Facts or stale identities are blocking. Traverse affected surface/control/target keys from owning Context through `DESIGN.md`, then open every affected selected `exact-target` or `constraint` as Context-reachable ordinary Source. Confirm selection basis, readable immutable identity/digest, declared surface/condition/variation/property coverage and editable upstream owner/locator/update route. A registry or handoff index mention is not consumption. Missing, stale, unreadable, truncated or conflicting resources remain `decision_required`; if only the editable upstream is unavailable, the immutable target may guide implementation but requested resource edits remain a manual/external boundary. An unconfigured starter, candidate, style-only rule or inspiration-only reference is incomplete design authority unless Source explicitly scopes the result as prototype/non-fidelity or supplies a selected target before implementation. When Controls exist, bind them through Product `surface_bindings` to the required production target, existing route/component Bindings and a root-entry journey; each selected target's identity/conditions/files, complete Fact/proof set, canonical per-Fact expectations, covered Source Claims/root Assertion, per-method independent Assertions and blocker lineage must match the handoff before typed evidence can prove it.
59
- - If the user is asking to generate or iterate standalone design resources before Contract authoring rather than execute this delivery, use `design-resource-authoring` instead. Its result may later return as ordinary Source; it creates no Contract Draft or Authority.
60
- 2. If a valid active binding exists, run `ty-context long-task resume <workdir>`, directly load the installed package-managed `long-task-workflow` Skill and read the lifecycle reference. This recovery path does not depend on implicit invocation.
61
- 3. Start one complete Delivery Contract Draft for the whole selected delivery immediately. If inputs are not self-contained, apply the Source-authoring reference inside this same Draft loop: inventory every proposal/resource/attachment, refine the writable real Source, preserve traceable provenance and resolve or retain genuine decisions while mapping target profile, Stages, Outcomes and repository evidence. Conversation-only material becomes exactly one project-native Markdown Source. Source completeness is a Preflight/Compile convergence requirement, not an earlier internal stage. For non-UI scope, expand the exact semantic universe before implementation: classify every material input; disposition every standard and discovered custom family; enumerate stable subjects, relations, populations, axes, atomic values/combinations and properties; and derive every Fact and required proof obligation without sampling or aggregation.
62
- 4. Preserve at least one real `source_path`. Wrap every material Source item in its original Markdown with non-rendering `ty-source-item:start/end` markers without rewriting direct text; marked Source Item keys and `source_claim` keys are exactly equal. Every delivery declares at least one `technical_obligation` Source Item with `aspect=architecture` and maps it to an independently provable architecture obligation. Embed exactly one schema-valid `semantic-fact-manifest-v1` across declared Source and point root `semantic_fact_manifest` to its immutable identity; every Outcome projects exactly its Facts and proof obligations through `semantic_fact_bindings`. Ordinary Material Source Items must be `non_ui_material` and contribute Fact lineage unless a validated design handoff independently owns them as `ui_design`; supporting/excluded inputs require exact basis and cannot hide delivery meaning. `ty-source-background:start/end` is restricted to text-free Markdown anchors/horizontal rules (`reason=markdown-structure`) or fixed-field `ty-source-provenance` comments (`reason=provenance`); text-bearing headings, free-form provenance and arbitrary explanatory prose are material or unclassified, never background. Leave the strict formal blocks to their parsers. Every other non-empty line is unclassified and blocking. Never label requirement, acceptance, technical, risk or decision meaning as background. Newly delegated meaning must first be written into real Material Source with provenance before its corresponding Draft meaning can pass Preflight/Compile.
63
- 5. An ordinary prose proposal, legacy Source Plan or externally authored design resource remains valid Source and does not need to match a recommended structure. Preserve stable semantic keys and Markdown anchors where practical. Selected resources retain their stable resource/surface/control/state/target keys, declared applicability, source profile/entry/dependency set, provider/project/run provenance, typed locators, immutable digest/snapshot and editable upstream owner/locator/update route. Candidates authorize no fidelity Claim. Changing an adopted resource produces a new immutable version and updates the owning reference rather than overwriting the locked baseline.
64
- 6. Continue reading repository, Source and Context and revise the same Draft. A request to synthesize, refine, complete, implement or use judgment delegates plan-level authoring, but it does not invent the user's tradeoff priorities. Before comparative research or a material product, technical, architecture or provider selection, identify the criteria that could change the research scope, candidate set or recommendation. Infer them only from the user's words, Source, Context or controlling constraints. If quality versus cost, speed, reliability, privacy, lock-in, operational burden or another material priority is unknown or ambiguous, stop before that research or selection and ask one concise targeted clarification. Do not impose a questionnaire, re-ask known preferences or interrupt minor reversible choices whose recommendation would not change.
65
- 7. Once the material preference envelope is clear, decide what research is needed. Use current authoritative or primary evidence for external capability, pricing, quota, license, compatibility, region, security posture or support claims. When one recommendation is then defensible, record it in real Source with the authoring instruction, preference/evidence basis and exact added meaning instead of pausing for approval. Append the delegated item without rewriting the user's original text when ordinary prose is the Source. Return only when authoritative requirements conflict, the user explicitly reserves the choice, a material preference remains unknown, critical semantics have no defensible recommendation or no falsifiable acceptance standard can be formed.
66
- 8. Contract expansion remains limited to meaning-preserving structural decomposition, evidence-backed repository binding and choices first recorded as delegated real Source. Never place a new product rule, default, threshold, recovery behavior, permission or platform/data scope only in Contract YAML. Default plan delegation authorizes meaning, not action: payment, contracting, production deployment or publication, destructive production mutation, real permission grants, sensitive-data transmission and required legal/security/human approval remain named external confirmations. Any conflicting, user-reserved, missing-preference or unsupported semantic remains `decision_required`.
67
- 9. Before formal Compile and the first implementation edit, complete the shared `Architecture Deliberation` once and surface concise repository-bound conclusions rather than private reasoning. Cover the current owner/extension point/source of truth, dependencies and lifecycle, selected and rejected alternatives, a plausible future-change challenge, touched debt and its disposition, forbidden shortcuts, project-owned Checks and each triggered quality attribute or concrete preservation basis. Correctness/invariants and maintainability/changeability always receive at least preservation; reliability/resource lifecycle, concurrency/consistency, performance/capacity/cost, security/privacy/safety, compatibility/migration/rollout and operability/observability/testability activate only when material. Even a preservation result names concrete owners and why no new or worsened debt is introduced. Put durable conclusions in owning Context and material falsifiable delivery conclusions in real marked Source plus existing Contract fields, then decide `Context Delta: none|required`. A material scope, owner, Context, design, quality-applicability or debt-disposition change before implementation stales and refreshes the deliberation.
68
- 10. Close every real Control's 22 canonical fields through `field_coverage` and its Outcome's cross-Control meaning through `control_relation_closure`; use `specified`, explicit `not_applicable` or blocking `unresolved`, and give the closure exact applicability refs even when no Controls apply. Independently close the semantic manifest: exact Source/context input inventory and digests; all standard/custom family, unit, relation, population, axis/value/combination, property, Fact Cell, Fact, proof, Oracle, environment and blocker Census identities; complete generation counts/digests; and exact Source→Fact→Claim/applicability→proof binding equality. Each machine proof maps to one single-Fact Assertion and typed `semantic_fact` capability; each external proof maps to an impact-complete External Confirmation. Declare only actual applicability profiles, each with an atomic, duplicate-free dimension assignment plus exact target, journey, Given condition/input/state refs and ordered When refs. Every Claim lists all applicable profiles; every Claim-bearing Assertion proves one Claim in one matching profile and all required proof surfaces. Declare each execution target's runtime capabilities and require the production family, cold-start and production-root capabilities where applicable. Give every Assertion the minimum all-of Evidence Capabilities that can actually prove its Claim. Every behavioral Claim-bearing Assertion also needs a same-Check claim-local `replace_json_value` or `replace_text` wrong-semantic witness and a claimless target-runtime liveness Assertion that remains passing; whole-file replacement is compatibility-only and cannot prove semantic binding. Population declares a universe Binding whose carriers are Check inputs and proves exact universe = eligible = observed plus valid exclusions. Separate required success and degradation Checks. Type every external confirmation with impacted Claim refs and target-blocking effect. For selected design targets, keep resource-integrity Checks distinct from root-bound implementation conformance, freeze the validated handoff and target resources, preserve exact condition equality, map every covered handoff Source Item into separate attributable Assertions, bind each verification method to its own `design_method` evidence with exact per-condition `fact_refs`, distinct record and primary-observation paths plus a unique current primary digest for every condition, require the cell union to equal the complete target fact set, and declare current actual/comparison artifacts. Preserve every blocker's required target capabilities; use a machine Claim only on the exact capability-qualified target, otherwise keep a target-blocking External Confirmation. Playwright must attach both declared cell artifacts in every project instance. Use `context_snapshot_mode: full`. Run read-only `ty-context long-task preflight <workdir>`, repair every semantic manifest, handoff, Contract and `decision_required` error in the same Draft, then formally Compile only when ready.
69
- 11. When the first Compile returns `execution_model_checkpoint.required: true`, obey its terminal-turn boundary. Unless an earlier user message explicitly states this task's current-model or switch-and-resume strategy, do no product implementation, file edit, build or test after that result; end the current turn and ask the user to choose `continue_current_model` or switch models and then resume the active Long-Task. Generic “continue”, “resume”, “finish” or “continue the Goal” language does not satisfy the checkpoint. Later revisions return `required: false` and do not repeat it.
70
-
71
- Engineering quality uses the existing authority model, not a new stage, Gate or field. The visible deliberation makes the checkpoint reviewable but does not machine-prove subjective quality. Encode every material falsifiable architecture or quality invariant as a Source-backed technical obligation/global constraint/forbidden shortcut plus owner/path/Binding boundaries, a project-owned executable Check and a separate Assertion when functional acceptance could pass independently. Never substitute a broad quality Boolean, functional pass or prose review. An unverifiable preference remains task-local, durable Context or `decision_required`; it must not be promoted into false proof.
72
-
73
- ## Rolling Execution
74
-
75
- After Authority Lock and the one-time execution-model checkpoint are satisfied, the current Goal chooses implementation order, local planning, tools, repair hypotheses and whether one or multiple platform-native agents/subagents are useful. It may work across Outcome or Stage boundaries when that is the most efficient implementation path. Multiple-agent execution is optional, never a Harness allocation rule: agent reports are non-authoritative and Harness stores no delegation state. The derived Frontier is only an acceptance/verification and diagnosis projection: work in a later Stage cannot make an unpassed earlier gate accepted, and no implementation choice may silently change Product, Technical or Acceptance authority. All proof-bearing changes converge into the selected verification workspace.
76
-
77
- Re-evaluate `Context Delta` whenever implementation or repair discovers a durable fact. Controlling Context changes always use Authority Revision; they require a user decision only when mapped Claims, targets, proof obligations or another decision boundary changes. Graph-derived, non-explicit `implementation-index` and `archive` are Supporting Context in referenced mode and may auto-revise when only navigation/background changed. Full snapshot mode treats every selected Context file as controlling.
78
-
79
- If rolling implementation materially changes scope, ownership, dependency direction, the selected design, quality-attribute applicability or a debt disposition, refresh the Architecture Deliberation and express any authority change through marked Source/Context plus protected revision before continuing. This is refinement of the same checkpoint, not a second workflow stage.
80
-
81
- Use `verify --explain [--outcome/--check]` when execution cost is unclear; it previews declared main and Counterfactual runner invocations without executing or writing Progress. Use targeted `verify --outcome/--check` for optional feedback and repair when its expected localization value exceeds its cost. Progress is repair evidence only and never acceptance authority. Keep precise findings attached to the owning Source item, Claim, Assertion, Check, Binding and owner path. Do not add another model-switch pause or turn delegation into a Harness scheduler, state or proof source.
82
-
83
- When the Contract declares a target-runtime Check because a proxy can pass while the target fails independently, bind it to the earliest owning Outcome and exact target even if implementation happens in another order. Every required target is proved separately from its root; Browser evidence requires Playwright and Native/Desktop evidence requires the project binary. For material UI, a useful early feedback run inspects a runnable vertical slice through the production shell/navigation entry, not only a deep link or detached route. The first useful runnable boundary and later coalesced changes are recommended, not mandatory, targeted-feedback points. `progress_stale` is a freshness fact: refresh the Check only before an intermediate decision relies on that Progress. Continuing implementation or entering Final Gate needs no targeted refresh because Final Gate ignores Progress and reruns all Checks. Use the cheapest reliable target Check and do not mandate a full environment rebuild per Outcome or per edit. This is optional rolling feedback, not acceptance, an implementation gate, a trigger queue or per-target progress state.
84
-
85
- When implementation discovers a blocker or missing Contract paths, first classify the revision. Difficulty or delay alone never reclassifies machine-verifiable scope as external and never removes Source; a real scope, Product, Acceptance or machine/external boundary change must first be explicit marked Source. Keep exact revision identity, old-Authority continuity, compare-and-swap adoption, evidence invalidation and the complete Final Gate for every path:
86
-
87
- 1. machine-proven monotonic strengthening auto-adopts;
88
- 2. locked-semantics-preserving Source/Context snapshot refresh, bounded runner/input/environment repair, repo-bound scope expansion, risk strengthening and machine-proven equivalent Counterfactual coverage auto-adopt as mechanically bounded repair;
89
- 3. a scope-only candidate may additionally use `ty-context long-task diagnose-revision <workdir> [--outcome <key>] [--check <key>]` to exercise only existing active Check identities with unchanged runner/verifier authority;
90
- 4. Product/Source Claim/target/external-confirmation change, lost scenario/Claim/Evidence Capability/failure interception, forbidden or owner-Context removal, runner type/effect change, verifier-kernel change and every unknown reason remain preview-only and require the exact user-decision identity; risk downgrade is rejected.
91
-
92
- Candidate diagnostics are transient: they authorize no acceptance and write no pending/user-decision state, Active Authority, cache, Progress or Receipt. Keep related edits in the same `delivery-contract.yaml`; do not compile each intermediate candidate merely to obtain an identity. When the stable candidate is ready, run ordinary `compile --revise` once. If it needs a decision, first present the self-contained `pending_authority_revision.decision_brief`, which explains Authority Revision, separates `user_decision_reasons` from mechanically bounded changes, names material changes and affected Outcomes, and states reject/previous-Authority, adoption, no-completion and Final-Gate effects. If an explicit current-task instruction already covers every listed decision reason exactly, mechanically relay that existing decision through the exact approval command without asking again; generic continue/resume/finish, blanket authorization, recommendation, partial coverage or Agent inference never qualifies. Otherwise ask once for that stable exact identity. The executing Agent never originates its own weakening decision. Adoption is not delivery completion: discard invalidated evidence, run `status` or `resume`, and return to rolling implementation or repair under the revised Authority before Final Gate.
93
-
94
- ## Live Final Authority
95
-
96
- Complete Context, implementation and project tests, create a clean candidate commit, then run `ty-context long-task final-gate <workdir>`.
97
-
98
- Final Gate recompiles Source authority, captures semantic and raw Contract protected-input identity, validates active task/revision/compiled/worktree identity, creates one Git-tree snapshot and reruns every required Global and Outcome Check. It requires exactly one current typed semantic result for every and only every compiled Fact × machine-method obligation, preserving actual observation/environment, frozen expected/comparison/tolerance/mask/Oracle authority and passing verdict; external obligations remain named confirmations. It then recompiles again and requires unchanged Contract/fragments, Source semantic manifest, Controlling Context, verifier, runner and verification/workdir inputs, plus unchanged workspace/tree and Active Authority, before acceptance. It derives Stage results and target qualification from that run; it does not trust targeted Progress as a Stage pass. A target-runtime Check must exercise its exact target in that current Gate execution; rerunning a reader for a historical or tracked status report is not live target proof. Design-resource integrity, an isolated route or `visual_render` cannot replace required root-bound `design_conformance`, and unresolved semantic or design blockers remain blocking. Final Gate, Stop and close never trust historical Progress, Receipt or compiled cache.
99
-
100
- Final Gate is the Long-Task path's sole `Engineering Quality Conformance` and `Architecture Conformance` carrier. It reruns the declared architecture/quality obligations, constraints and forbidden shortcuts, owner/path/Binding boundaries, independent Assertions and project-owned Checks on that same snapshot. It blocks the represented scope escape, bypass, duplicate authority, second source of truth, wrong dependency direction, undeclared boundary/lifecycle change, silent failure, unsupported performance claim or new/worsened debt. It proves only those declared falsifiable invariants, never overall code quality. Do not also run the default Workflow's Contract Conformance closure. Any later candidate or authority change invalidates the Gate and uses the existing freshness path again.
101
-
102
- Machine acceptance covers only declared machine authority. Preserve every pending external confirmation through `final-gate`, `status`, `resume`, `stop-check`, the package-owned Stop Hook and `close`; accepted output identifies `acceptance_scope: declared_machine_authority` and `native_goal_effect: none`, while `closed_scope: machine_authority` means only Authority cleanup. Do not invent external-confirmation or native-Goal tracking state.
103
-
104
- Before invoking platform-native Goal completion, perform one veto-only conformance review: compare the current Goal and user instructions with accepted marked Source, and check for pending revisions, unresolved blockers or omitted requirements. Any mismatch keeps the Goal active and returns to Source/Contract repair. A clean review does not add acceptance proof and never lets Agent judgment replace Final Gate.
105
-
106
- ## Handoff
107
-
108
- Report implementation, effective risk, Architecture Deliberation and Engineering Quality/Architecture Conformance status, Claim Coverage, Stage frontier/results, declared target profile, exact `target_state`, Live Gate result, acceptance scope, every pending external confirmation, Context status and blockers. Use verifier terms exactly: `progress_passing` means targeted repair evidence, `progress_stale` is a freshness fact rather than a current pass or immediate rerun command, `final_workflow_status: null` means unfinished, `authority_revision_adopted` means return to rolling execution, and `machine_accepted_external_pending` must retain its named confirmations and never be summarized as `AcceptedDeliveryTerminal` or full no-drift delivery. Contract target states are only `implementation_complete`, `target_profile_usable` and `production_release_ready`; terminal failure uses `not_accepted` or `blocked_external`. Never shorten targeted progress to “Outcome complete” or invent per-platform progress/status. State the theorem boundary honestly: undeclared or inaccurate Source cannot be discovered mechanically; the named project oracle must be semantically sound; the supported direct-literal verifier dependency graph is frozen while other declared verification inputs, indirect runtime access, installed package/runtime behavior, Harness verifier and Git metadata form the trusted computing boundary; Final Gate proves only its declared project-check-bound quality set; the visible checkpoint cannot prove private reasoning or universal future-proofing; native-Goal/model selection belongs to the host/user; and internal platform delegation is not observed.
4
+ ---
5
+
6
+ # Single-Goal Long-Task Workflow
7
+
8
+ ## Boundaries
9
+
10
+ Use one currently selected host execution Goal, one repository, one selected verification workspace, one complete Contract and one Final Gate. This workflow never creates, invokes or manages a scheduler, agent runtime, App Server, branch/worktree fan-out, merge, push, PR, deployment, legacy orchestration chain, matrix, verdict or second Contract plan. The parent Goal owns Source, Contract, Authority, architecture, Context writeback, integration, current-candidate checks, formal verification, Final Gate, close and completion. Harness never allocates, schedules, retries or recovers delegated workers; their reports are not Progress, Evidence or proof, and every result must converge into the selected verification workspace before verification counts. Never activate from task size alone.
11
+
12
+ That Goal is host/user-selected; Harness does not create, persist or reconnect a Goal identifier. Compaction may continue inside it; a later physical Goal/session restores semantic state through `resume`, not a prior Turn. With a valid binding, run `ty-context long-task resume <workdir>`, then directly load the installed `long-task-workflow` Skill; recovery needs no implicit invocation.
13
+
14
+ The host/user owns model selection. Exactly one unconditional terminal-turn checkpoint follows the first Authority Lock before implementation. Harness neither switches nor verifies the model, persists checkpoint/acknowledgement/route state, nor creates a model scheduler, automatic switch or native-Goal completion state. Do not otherwise pause a healthy Goal solely to change models.
15
+
16
+ A Codex-root `long-task` install may expose optional fixed package-owned `long_task_implementation` with child multi-agent disabled. It is static, stateless, non-Authority and post-checkpoint—not a checkpoint option, model route or runtime. Install proves no discovery or selection. If unavailable/invalid/colliding or not exactly selectable, the parent implements; never substitute a generic child or add dynamic tiers, retry or scheduling.
17
+
18
+ `long-task-delivery-v2` is the only active Contract schema. `delivery-contract.yaml` is the one root authoring file. New authoring uses inline Outcomes; existing `outcome_files` are physical compatibility only. Legacy split-delivery commands are non-executing.
19
+
20
+ ## Controlling Objective
21
+
22
+ Prevent false completion inside declared authority. Given complete and accurate Source, a meaning-preserving Contract projection, complete applicability and the admitted-observer boundary, `AcceptedDeliveryTerminal` implies no declared machine-observable drift remains. Machine completion requires package-admitted Actual and Harness-owned comparison; unsupported proof remains blocking External Confirmation. Implementation may drift or require rework, but every declared requirement, Fact, proof obligation and independently falsifiable AC stays traceable, and every unproved item blocks or qualifies completion.
23
+
24
+ Complete Source is not a prose or current-code ceiling. Material non-UI meaning uses the finest independently decidable standard and custom semantic Facts plus every required proof method. For selected design resources, Agent implementation, acceptance and testing fully conform to every material Fact in declared scope and conditions; formal input therefore uses complete canonical acquisition, Census, atomic Fact/proof closure and exact production-target evidence. Deliberately partial design input remains an explicitly scoped constraint or blocking unresolved input; incomplete implementation-source acquisition is blocking, and an exact target requires layout and pixel Facts for every declared condition. `UI symbolic V2 is explicit opt-in; V1 remains the default.` Non-UI symbolic admission remains out of scope; machine-observer and verifier/runner trust-boundary closure is mandatory rather than deferred Provider/P0 work. Read the Source, Contract and Evidence references for the exact V1/V2 authoring and proof rules.
25
+
26
+ Only fresh evidence from the complete current final snapshot may create machine acceptance. Exactly fresh `machine_accepted` with no pending External Confirmation is `AcceptedDeliveryTerminal`; `machine_accepted_external_pending` proves only declared machine scope. Progress is repair evidence only and never acceptance authority. Final Gate is the sole Long-Task Engineering Quality Conformance and Architecture Conformance carrier, and it proves only the declared, falsifiable, project-check-bound set—not overall code quality. This adds no quality Boolean, matrix, Source aspect, Claim/risk kind, Contract field, second Gate, state or Receipt, and no separate default Contract Conformance closure runs.
27
+
28
+ Anti-Degradation Assurance preserves coverage, false-negative resistance, fail-closed Authority and final-snapshot proof before cost. Purpose/invariant replacement requires project-owner design-purpose decision and replacement proof. `F = Implementation Freedom Boundary` keeps order, methods and feedback Goal-owned within Source/Contract, architecture, safety, forbidden shortcuts and external actions. After the checkpoint, one ephemeral Delegation Suitability judgment may use one or more `long_task_implementation` instances only when the host explicitly selects that exact custom agent and independent benefit exceeds coordination cost. Generic/built-in/null/unknown roles, task names, prompt imitation and model-only selection never qualify. If unavailable or an exposed spawned type differs, never rely on/retry a generic child; the parent executes or independently redoes the packet. Prefer read-heavy exploration/entrypoint location, independent diagnosis and log/test analysis, disjoint-path implementation/targeted verification and bounded repetitive work. Parallel writes require disjoint owner/path/source-of-truth scope; shared Contract/Context/configuration and coupled work stays in the parent. Add no development phase/method Gate, fixed count/Outcome mapping, agent allocator/scheduler, retry, queue, DAG, registry, delegation proof or persistent delegation state.
29
+
30
+ Each worker receives only its bounded packet. It may inspect named Source/Contract/Context and implement/check locally, but never author/revise Source, Contract, Authority or Context; create Progress/Evidence/Receipt/Final Gate; run lifecycle commands; choose models; spawn/retry/schedule; create branches/worktrees; or claim acceptance/completion. Active `PreToolUse` denies non-exact creation; exact `SubagentStart` reinforces it without proving trust or acceptance. The parent reviews and integrates every report (advisory only), resolves overlaps, writes Context and runs current-candidate/formal verification.
31
+
32
+ ## Progressive Reference Loading
33
+
34
+ Read the reference for the current activity completely. These four one-level references are detailed guidance, not new artifacts, stages or authority:
35
+
36
+ - For raw, mixed, attachment-heavy, incomplete or conversation-only inputs, read [`references/source-authoring.md`](references/source-authoring.md) alongside Contract authoring. It owns Source inventory, synthesis/refinement, provenance, preference/research decisions, complete semantic input expansion, selected-resource intake and marker convergence inside the same Draft loop.
37
+ - Before creating or structurally revising Source markers, Outcomes, requirements, Controls, obligations, applicability, architecture boundaries, paths, Bindings, Assertions or risk, read [`references/contract-authoring.md`](references/contract-authoring.md). It owns the exact Contract projection and structural closure rules, including selected-design V1/V2 authoring.
38
+ - Before creating or repairing Checks, runners, Observations, proof surfaces, Counterfactuals, Population/environment probes or selected-design evidence, read [`references/evidence-design.md`](references/evidence-design.md). It owns exact execution evidence, sensitivity and Oracle boundaries.
39
+ - Before Preflight, Compile, the one-time model checkpoint, protected revision, resume, targeted verify, Final Gate, Stop, close or abandon, read [`references/authority-lifecycle.md`](references/authority-lifecycle.md). It owns command and lifecycle detail.
40
+
41
+ Do not copy reference detail into another Skill, plan or state file. The same `delivery-contract.yaml`, active authority and current workspace remain the only lifecycle surfaces.
42
+
43
+ ## Contract Draft And Outcome Decomposition
44
+
45
+ Every external initial proposal, selected design resource, ordinary planning document or other material input enters the same non-authoritative `delivery-contract.yaml` Draft immediately. Inventory, Source-quality synthesis/refinement, provenance, markers, repository binding and Contract mapping converge in one `long-task-workflow` lifecycle and need not be completed in one response. Conversation-only material becomes exactly one project-native Markdown Source. Do not create a Source-authoring phase, standalone Contract Draft Skill, Draft Receipt, Authoring State, draft schema/CLI/runtime state, handoff or second plan.
46
+
47
+ A Draft Outcome is an Outcome before Authority Lock, not a new schema field or runtime entity. Decompose only vertical, independently observable, decidable and target-verifiable results whose dependencies and owner boundary can be stated. `depends_on` and Stage gates express acceptance and intermediate-proof readiness, never implementation permission. Do not split for response/YAML/file length, implementation layer, module/file count, Agent capacity, Worker assignment or desired parallelism.
48
+
49
+ > Outcome decomposes execution and diagnosis, not completion authority.
50
+
51
+ ## Lifecycle Summary
52
+
53
+ 1. Read the request, real Source, relevant Context, repository owners and selected design resources. Before formal Compile and the first implementation edit, surface one repository-bound `Architecture Deliberation`: owner/extension point/source of truth, dependencies and lifecycle, selected and rejected alternatives, future-change challenge, debt disposition, forbidden shortcuts, project-owned Checks and triggered quality attributes or concrete preservation. Put durable conclusions in owning Context and material falsifiable delivery conclusions in real marked Source plus existing Contract fields. Decide `Context Delta: none|required`.
54
+ 2. Open the one Contract Draft immediately. When inputs need Source repair, read Source authoring and Contract authoring together; preserve at least one real `source_path`, complete all required semantic/design closure and repair every `decision_required` item without inventing product meaning.
55
+ 3. Run read-only `ty-context long-task preflight <workdir>`, repair the same Draft, then run formal Compile only when Source, Context, Contract, repository scope and proof bindings are ready. Compile creates the first Authority Lock; Preflight creates no Authority, Progress, Receipt or state.
56
+ 4. When the first Compile returns `execution_model_checkpoint.required: true`, always obey its terminal-turn boundary. Do no product implementation, file edit, build or test after that result, regardless of any earlier textual model strategy. End the turn and tell a Chinese-speaking user exactly `处理好模型更换之后,请发送【继续】。`; use `After handling the model change, send [continue].` in English. Harness cannot observe or verify the model change. A later Compile returns `required: false` and never repeats the pause.
57
+ 5. After continuation, apply the Delegation Suitability judgment above and begin Goal-owned rolling implementation. Delegate independent bounded packets only through explicit exact `long_task_implementation`; otherwise the parent executes without a generic substitute or retry. Keep non-independent work in the parent. Re-evaluate Context Delta and Architecture Deliberation when durable facts, scope, ownership, dependency direction, selected design, quality applicability or debt disposition materially changes.
58
+ 6. Use targeted verification only when its expected localization value exceeds cost. If authority changes, keep the same Draft and follow protected revision; mechanically bounded repairs may auto-adopt, while semantic weakening or unknown change requires the exact user decision. Adoption returns to rolling implementation and is never completion.
59
+ 7. Complete Context, implementation and project tests, create the clean candidate required by the lifecycle reference, then run the one source-recompiled current-snapshot Final Gate. Stop/close and any native Goal completion remain subject to the exact lifecycle and veto rules in the Authority reference.
60
+
61
+ ## Rolling Execution
62
+
63
+ After Authority Lock and the one-time terminal-turn checkpoint, the parent Goal chooses implementation order, local planning, tools and repair hypotheses, then applies the bounded independence/benefit/coordination test above. Qualifying disjoint packets should be delegated proactively; a packet may cross Outcome or Stage boundaries when its code owner remains coherent, because those boundaries control acceptance readiness rather than edit permission. The profile is optional and can be absent. The parent retains every authority, architecture, Context, integration and formal-verification owner. Delegated reports are advisory, Harness stores no delegation state and all proof-bearing changes converge into the selected verification workspace.
64
+
65
+ The derived Frontier is only an acceptance/verification and diagnosis projection. Use `verify --explain [--outcome/--check]` for a read-only cost preview and targeted `verify --outcome/--check` for optional feedback. `progress_stale` is a freshness fact; refresh only before an intermediate decision relies on that Progress. Continuing implementation and entering Final Gate need no targeted refresh because Final Gate ignores Progress and reruns all required Checks. Do not add another model-switch pause, trigger queue, implementation gate, per-edit rebuild rule or per-platform progress state.
66
+
67
+ When implementation discovers a blocker, classify it under the existing protected-revision rules. Difficulty or delay never makes machine-verifiable scope external and never removes Source. Keep exact revision identity, old-Authority continuity, compare-and-swap adoption, evidence invalidation and the complete Final Gate; use the lifecycle reference for diagnosis, decision transport, approval and adoption.
68
+
69
+ ## Final Authority And Handoff
70
+
71
+ Final Gate recompiles Source authority, freezes and rechecks the complete protected current snapshot, reruns every declared Check and sensitivity control and rejects any protected-input, workspace/tree or Active Authority drift. It never trusts historical Progress, Receipt, compiled cache, delegated report or Agent judgment. Before invoking native Goal completion, perform the required veto-only comparison of current user/Goal meaning with accepted marked Source; mismatch returns to Source/Contract repair and creates no second Gate or proof.
72
+
73
+ Report implementation/risk, Architecture and Engineering Quality Conformance, Claim Coverage, Stage/target/Gate results, acceptance scope, pending External Confirmations, Context and blockers. Use verifier terms and state boundaries honestly: undeclared/inaccurate Source and unsound project Oracles are not mechanically repaired; Final Gate proves only declared machine authority and its project-check-bound quality set; the host/user owns the native Goal/model; worker injection and reports are not acceptance inputs. The observer remains Level 3; `observed_lifecycle_*` facts cannot replace complete total-cost ROI or the independent audit required for Level 4.
@@ -1,6 +1,6 @@
1
1
  interface:
2
2
  display_name: "Long-Task Workflow"
3
3
  short_description: "Run one Delivery Contract in the current native Goal"
4
- default_prompt: "Use $long-task-workflow to prepare, execute, resume, verify, or close one Canonical Delivery Contract in the current workspace."
4
+ default_prompt: "Use $long-task-workflow for one Canonical Delivery Contract. After the first-Authority-Lock checkpoint, proactively delegate independent bounded packets only to the exact custom agent long_task_implementation, using multiple instances for disjoint workstreams when beneficial. If the host cannot explicitly select that custom agent, do not spawn a generic substitute; execute in the parent. Keep Source, Contract, Authority, Context, integration and formal verification in the parent Goal."
5
5
  policy:
6
6
  allow_implicit_invocation: false
@@ -1,78 +1,80 @@
1
- # Authority Lifecycle Reference
2
-
3
- Read this before Preflight, Compile, revision, resume, targeted verify, Final Gate, Stop, close or abandon.
4
-
5
- ## Preflight And Compile
6
-
7
- Run `ty-context long-task preflight <workdir>` before first formal Compile. Resolve every `error` and `decision_required` diagnostic and review warnings. Preflight is read-only: it creates no Active Authority, initial base, marker, cache, Progress, Receipt or pending revision, runs no project Check and persists no success record.
8
-
1
+ # Authority Lifecycle Reference
2
+
3
+ Read this before Preflight, Compile, revision, resume, targeted verify, Final Gate, Stop, close or abandon.
4
+
5
+ ## Preflight And Compile
6
+
7
+ Run `ty-context long-task preflight <workdir>` before first formal Compile. Resolve every `error` and `decision_required` diagnostic and review warnings. Preflight is read-only: it creates no Active Authority, initial base, marker, cache, Progress, Receipt or pending revision, runs no project Check and persists no success record.
8
+
9
9
  Preflight and Compile call the same activation-safety validator. Skipping Preflight bypasses no closed-grammar Source/background continuity, semantic-manifest input/Census/family/unit/relation/population/condition/property/Fact/proof set closure, architecture Source obligation, Control field/relation closure, atomic applicability dimensions, criterion, Claim/all-of-surface, Population universe binding, Stage closure/cross-surface gate, required-target/root/capability/runner binding, scenario/journey separation, capability adequacy, typed external impact, per-Fact semantic proof binding, per-method selected-design artifact binding, bounded Product Conformance, adapter/Observation, risk, owner/path/Binding, recursively frozen verifier dependencies, narrow semantic Counterfactual/liveness or sensitivity rule.
10
-
11
- The same workspace classifier also runs before activation and during verification. Before first lock it classifies `HEAD`-relative current paths; later it classifies immutable-`initial_task_base` changes. Protected authority, declared expected change and allowed support remain distinct from forbidden or unclassified paths, which block activation. During first enable, protection covers only exact files present in the current package asset tree for configured managed destinations plus the exact harness config/hook files; managed directory roots and broad `.codex/**` are never implicitly allowed.
12
-
13
- Preflight keeps every independently discovered diagnostic. When a structural duplicate makes the same Claim ambiguous or repeated, only that pair receives stable `diagnostic_id`, `repair_group`, `repair_priority` and `blocked_by` metadata so the structural blocker is repaired first. Independent findings keep their compact existing shape; no finding is hidden, reclassified or treated as resolved, and no repair state or authority is created.
14
-
15
- The first successful `ty-context long-task compile <workdir>` is Authority Lock and freezes the immutable initial base and complete compiled authority snapshot in Git common-dir, bound to the worktree marker by task id, revision and compiled identity.
16
-
17
- Its JSON result includes `execution_model_checkpoint.required: true`, `turn_boundary: end_current_turn`, the blocked implementation actions and explicit-choice semantics. Unless the user already stated an explicit task-specific current-model or switch-and-resume strategy, do no product implementation, file edit, build or test after that result; end the turn and ask for the choice. Generic continue/resume/finish/continue-goal language does not satisfy the checkpoint. Later Compile revisions return `required: false`; no checkpoint file, acknowledgement state, model route or automatic model switch is created.
18
-
19
- ## Protected Revision
20
-
21
- After Authority Lock, every candidate compares against active authority. `authority_changed` does not by itself mean `user_decision_required`:
22
-
23
- 1. proven monotonic evidence strengthening—including added capabilities while preserving every existing Assertion meaning—and proven tightening auto-revise;
24
- 2. mechanically bounded repair may auto-revise when compiled user-facing meaning and proof obligations stay fixed: raw Source/Context snapshot updates with unchanged Claims/targets, operational Runner or verification-input repair, risk strengthening and machine-proven equivalent Counterfactual Claim/assertion-failure coverage;
25
- 3. repo-bound owner/expected-change/allowed-support or Binding-carrier expansion may auto-revise; `diagnose-revision` may exercise existing active Check identities without creating state before final Compile; or
26
- 4. Product/Source Claim/target/external-confirmation change, lost scenario/Claim/Evidence Capability/failure interception, forbidden or owner-Context removal, runner type/effect change, verifier-kernel change and every unknown reason fails closed for the exact revision identity and is never candidate-executed.
27
-
28
- Automatic adoption never means “unprotected”: exact identity, active-Authority compare-and-swap, affected-evidence invalidation and the complete source-recompiled Final Gate remain mandatory. Risk downgrade is still rejected.
29
-
30
- `diagnose-revision` recompiles the same `delivery-contract.yaml` in memory, creates only a disposable workspace snapshot when class 2 is proven, and returns transient repair results with `acceptance_authorized: false`. It writes no pending/approval state, authority/marker, cache, Progress or Receipt. Repeated edits therefore accumulate only in the one existing Contract authoring file, not a pending Draft authority or candidate state plane.
31
-
32
- Ordinary `compile --revise` is the only operation that may create the one pending decision. It binds a deterministic concise change summary into the revision identity and distinguishes `user_decision_reasons` from `mechanically_bounded_reasons`. Compile/status/resume derive the same self-contained `decision_brief` from that canonical summary. The brief explains what Authority Revision is, why this one needs a decision, material changes, affected Outcomes, previous-Authority/reject behavior, the no-completion effect and mandatory Final Gate.
33
-
34
- Present that brief before asking for the exact identity. First compare every listed decision reason with explicit instructions in the current task: if one task-specific instruction already covers all of them exactly, mechanically relay that existing user decision through the exact approval command without asking again. This is decision transport, not Agent approval. A generic continue/resume/finish, blanket “approve later revisions”, recommendation, partial coverage or Agent inference never qualifies. The executing Agent never originates its own weakening decision.
35
-
36
- During repair, use stateless diagnosis and ordinary edits; do not invoke decision-producing Compile for intermediate candidates. Withdrawn or replaced identities therefore generate no question. When the final blocking candidate is stable, ask at most once. If it later changes, its identity changes and any old approval is rejected. No instruction ledger, standing approval or candidate state is created.
37
-
38
- The previous Authority remains active until exact approval and compare-and-swap adoption. Adoption reports `delivery_completed_by_this_event: false`, invalidates affected evidence and returns to rolling implementation or repair under the revised Authority; the complete source-recompiled Final Gate remains mandatory.
39
-
40
- Every path-bearing field uses canonical grammar. Internal `.`/`..`, control characters, empty segments, absolute/drive/UNC paths and unsupported glob syntax fail closed.
41
-
10
+
11
+ The same workspace classifier also runs before activation and during verification. Before first lock it classifies `HEAD`-relative current paths; later it classifies immutable-`initial_task_base` changes. Protected authority, declared expected change and allowed support remain distinct from forbidden or unclassified paths, which block activation. During first enable, protection covers only exact files present in the current package asset tree for configured managed destinations plus the exact harness config/hook files; managed directory roots and broad `.codex/**` are never implicitly allowed.
12
+
13
+ Preflight keeps every independently discovered diagnostic. When a structural duplicate makes the same Claim ambiguous or repeated, only that pair receives stable `diagnostic_id`, `repair_group`, `repair_priority` and `blocked_by` metadata so the structural blocker is repaired first. Independent findings keep their compact existing shape; no finding is hidden, reclassified or treated as resolved, and no repair state or authority is created.
14
+
15
+ The first successful `ty-context long-task compile <workdir>` is Authority Lock and freezes the immutable initial base and complete compiled authority snapshot in Git common-dir, bound to the worktree marker by task id, revision and compiled identity.
16
+
17
+ Its JSON result includes `execution_model_checkpoint.required: true`, `action: change_model_in_host_then_continue`, `resume_token: continue`, `turn_boundary: end_current_turn`, the blocked implementation actions and explicit model non-observability. Always do no product implementation, file edit, build or test after that result, even when an earlier message stated a model strategy. End the turn and tell a Chinese-speaking user exactly `处理好模型更换之后,请发送【继续】。`; use `After handling the model change, send [continue].` in English. Harness cannot observe or verify the host model change, and the continuation is not an acknowledgement record. Later Compile revisions return `required: false`; no checkpoint file, acknowledgement state, model route or automatic model switch is created.
18
+
19
+ The optional Codex `long_task_implementation` custom agent is available only as a post-checkpoint rolling implementation affordance. Its fixed package-owned configuration is not a checkpoint option and cannot acknowledge, satisfy or replace the host boundary. It writes no workflow state and owns no Source, Contract, Authority, Context writeback, Progress, Evidence, Receipt or Final Gate; if the exact profile selector or Codex custom-agent support is unavailable, the parent Goal continues directly without a generic substitute and formal acceptance is unchanged. The main Skill owns the complete Delegation Suitability and parent/worker policy.
20
+
21
+ ## Protected Revision
22
+
23
+ After Authority Lock, every candidate compares against active authority. `authority_changed` does not by itself mean `user_decision_required`:
24
+
25
+ 1. proven monotonic evidence strengthening—including added capabilities while preserving every existing Assertion meaning—and proven tightening auto-revise;
26
+ 2. mechanically bounded repair may auto-revise when compiled user-facing meaning and proof obligations stay fixed: raw Source/Context snapshot updates with unchanged Claims/targets, operational Runner or verification-input repair, risk strengthening and machine-proven equivalent Counterfactual Claim/assertion-failure coverage;
27
+ 3. repo-bound owner/expected-change/allowed-support or Binding-carrier expansion may auto-revise; `diagnose-revision` may exercise existing active Check identities without creating state before final Compile; or
28
+ 4. Product/Source Claim/target/external-confirmation change, lost scenario/Claim/Evidence Capability/failure interception, forbidden or owner-Context removal, runner type/effect change, verifier-kernel change and every unknown reason fails closed for the exact revision identity and is never candidate-executed.
29
+
30
+ Automatic adoption never means “unprotected”: exact identity, active-Authority compare-and-swap, affected-evidence invalidation and the complete source-recompiled Final Gate remain mandatory. Risk downgrade is still rejected.
31
+
32
+ `diagnose-revision` recompiles the same `delivery-contract.yaml` in memory, creates only a disposable workspace snapshot when class 2 is proven, and returns transient repair results with `acceptance_authorized: false`. It writes no pending/approval state, authority/marker, cache, Progress or Receipt. Repeated edits therefore accumulate only in the one existing Contract authoring file, not a pending Draft authority or candidate state plane.
33
+
34
+ Ordinary `compile --revise` is the only operation that may create the one pending decision. It binds a deterministic concise change summary into the revision identity and distinguishes `user_decision_reasons` from `mechanically_bounded_reasons`. Compile/status/resume derive the same self-contained `decision_brief` from that canonical summary. The brief explains what Authority Revision is, why this one needs a decision, material changes, affected Outcomes, previous-Authority/reject behavior, the no-completion effect and mandatory Final Gate.
35
+
36
+ Present that brief before asking for the exact identity. First compare every listed decision reason with explicit instructions in the current task: if one task-specific instruction already covers all of them exactly, mechanically relay that existing user decision through the exact approval command without asking again. This is decision transport, not Agent approval. A generic continue/resume/finish, blanket “approve later revisions”, recommendation, partial coverage or Agent inference never qualifies. The executing Agent never originates its own weakening decision.
37
+
38
+ During repair, use stateless diagnosis and ordinary edits; do not invoke decision-producing Compile for intermediate candidates. Withdrawn or replaced identities therefore generate no question. When the final blocking candidate is stable, ask at most once. If it later changes, its identity changes and any old approval is rejected. No instruction ledger, standing approval or candidate state is created.
39
+
40
+ The previous Authority remains active until exact approval and compare-and-swap adoption. Adoption reports `delivery_completed_by_this_event: false`, invalidates affected evidence and returns to rolling implementation or repair under the revised Authority; the complete source-recompiled Final Gate remains mandatory.
41
+
42
+ Every path-bearing field uses canonical grammar. Internal `.`/`..`, control characters, empty segments, absolute/drive/UNC paths and unsupported glob syntax fail closed.
43
+
42
44
  Controlling Context includes core Context, explicit `context_refs`, verification/deployment Context and every selected Context file. `context_snapshot_mode: full` is mandatory; legacy referenced-mode Contracts require semantic migration rather than silently retaining a partial authority snapshot.
43
-
45
+
44
46
  A selected design target, its exact/constraint interpretation, an authored token source or any applicable Control semantic is product/verification authority, not generated evidence. External design resources are ordinary Context-reachable Source: a candidate or unresolved selection cannot authorize fidelity work, while a selected exact target still requires downstream UI Authority Closure, stable key, readable immutable identity/digest, declared Fact universe, editable upstream/update route and Contract adoption. Open every affected exact target/constraint during authoring and repair; a registry mention alone is not consumption. Adding or changing its selected resource, selection basis, immutable identity, condition/variation/property/Fact/proof universe, expected located digest, comparator/tolerance/mask, Oracle/environment, sensitivity policy or acceptance-affecting token/prototype fixture after Authority Lock follows Authority Revision and returns to rolling implementation. Never silently overwrite an adopted baseline; a candidate/planned target, implementation screenshot or historical diff cannot authorize fidelity work or preserve affected Progress by itself.
45
-
46
- `context.toml` retrieval guidance (`triggers`, `read_when`, `read_policy`, default selection and unselected nodes) is excluded from the selected delivery-authority projection. Selected area ownership, role/dependency structure and selected Context contents remain protected revision material. Retrieval-only edits may preserve scoped Progress, but a changed final Git tree still invalidates historical final acceptance and must pass the Live Final Gate again.
47
-
47
+
48
+ `context.toml` retrieval guidance (`triggers`, `read_when`, `read_policy`, default selection and unselected nodes) is excluded from the selected delivery-authority projection. Selected area ownership, role/dependency structure and selected Context contents remain protected revision material. Retrieval-only edits may preserve scoped Progress, but a changed final Git tree still invalidates historical final acceptance and must pass the Live Final Gate again.
49
+
48
50
  ## Targeted Verification And Recovery
49
51
 
50
- Implementation remains Goal-owned throughout rolling execution. The Goal may use one agent or multiple platform-native agents/subagents when their expected benefit exceeds coordination cost, but Harness allocates and records none of them. Delegated reports are not Progress or proof, and every proof-bearing result must converge into the selected verification workspace. Stage/Outcome readiness, `progress_stale` and targeted feedback never become agent allocation, edit permission, a method Gate or a scheduler.
52
+ Implementation remains parent-Goal-owned throughout rolling execution. Apply the complete suitability and worker policy in the main Skill; Harness allocates and records no worker. Delegated reports are not Progress, Evidence or proof, and every proof-bearing result must converge into the selected verification workspace. Stage/Outcome readiness, `progress_stale` and targeted feedback never become agent allocation, edit permission, a method Gate or a scheduler.
51
53
 
52
54
  `verify --explain [--outcome/--check]` is a read-only execution preview. It groups declared Main Raw Executions, lists applicable Counterfactual runner invocations and bounded declared retry-attempt counts, but runs no command, writes no Progress, predicts no duration/internal subprocess count and creates no proof.
53
-
54
- Before an expensive first targeted run, use the preview to review selected Check count, deduplicated Main executions, Counterfactual mutations and retry bounds. If the expanded plan reveals an obsolete carrier, unnecessarily broad invalidation surface or repeated expensive runner, repair the same Contract Draft/Authority through the normal revision path. The preview cannot see build systems or subprocesses hidden inside a project runner.
55
-
56
- `verify --outcome/--check` runs scoped current-snapshot checks for repair and rechecks active identity before writing Progress. A Counterfactual finding is projected into the owning Main Check, changes an otherwise passed Check to `invalid_evidence`, clears Claim proofs and remains recoverable through `status`/`resume`. Global Checks use the same record without a new Global Outcome state.
57
-
58
- For a declared target-runtime Check, the earliest useful runnable boundary and later coalesced relevant changes are recommended targeted-feedback points only when their expected localization value exceeds cost. The owning Outcome binds proof; it does not gate implementation order. `progress_stale` is a fact about evidence freshness, not an immediate execution instruction. Refresh the declared Check only before an intermediate decision relies on its Progress. Continuing implementation and entering Final Gate require no targeted refresh because Final Gate ignores Progress and reruns all Checks. Do not create a per-edit/per-Outcome rebuild rule, implementation gate, trigger queue or platform state. These runs remain `acceptance_authorized: false`.
59
-
60
- Do not add a second executing `diagnose-check` mode merely to avoid Progress: it would still pay the project runner's cost and create a competing execution path. Use project-owned fast feedback while editing, the read-only preview for declared cost shape, targeted verify at a useful stability boundary and the complete Final Gate for acceptance.
61
-
62
- Progress freshness binds Outcome authority, applicability, runner, verification inputs, Controlling Context and implementation inputs. Retry defaults to none; one retry is allowed only for explicit `transient_once`, idempotent, read-only/test-sandbox work.
63
-
64
- Status, Progress, Receipts and workdir compiled output are audit/recovery projections only. Development-period authority state is `manual_required` and never migrated.
65
-
66
- Report their exact meaning: `progress_passing` is current targeted repair evidence rather than “Outcome complete”; `progress_stale` is a freshness fact rather than a current pass or immediate rerun command; `final_workflow_status: null` means the Goal is unfinished. `status`/`resume` derive `ready_stages`, `ready_outcomes` and Stage status from current Progress; they do not persist a Stage pass. `target_state` remains `not_accepted` until a fresh Final Gate accepts, becomes `blocked_external` for a target blocker, or names the Contract's `implementation_complete`, `target_profile_usable` or `production_release_ready` state after machine acceptance. Do not invent per-platform progress/status.
67
-
68
- ## Final Gate And Terminal Paths
69
-
55
+
56
+ Before an expensive first targeted run, use the preview to review selected Check count, deduplicated Main executions, Counterfactual mutations and retry bounds. If the expanded plan reveals an obsolete carrier, unnecessarily broad invalidation surface or repeated expensive runner, repair the same Contract Draft/Authority through the normal revision path. The preview cannot see build systems or subprocesses hidden inside a project runner.
57
+
58
+ `verify --outcome/--check` runs scoped current-snapshot checks for repair and rechecks active identity before writing Progress. A Counterfactual finding is projected into the owning Main Check, changes an otherwise passed Check to `invalid_evidence`, clears Claim proofs and remains recoverable through `status`/`resume`. Global Checks use the same record without a new Global Outcome state.
59
+
60
+ For a declared target-runtime Check, the earliest useful runnable boundary and later coalesced relevant changes are recommended targeted-feedback points only when their expected localization value exceeds cost. The owning Outcome binds proof; it does not gate implementation order. `progress_stale` is a fact about evidence freshness, not an immediate execution instruction. Refresh the declared Check only before an intermediate decision relies on its Progress. Continuing implementation and entering Final Gate require no targeted refresh because Final Gate ignores Progress and reruns all Checks. Do not create a per-edit/per-Outcome rebuild rule, implementation gate, trigger queue or platform state. These runs remain `acceptance_authorized: false`.
61
+
62
+ Do not add a second executing `diagnose-check` mode merely to avoid Progress: it would still pay the project runner's cost and create a competing execution path. Use project-owned fast feedback while editing, the read-only preview for declared cost shape, targeted verify at a useful stability boundary and the complete Final Gate for acceptance.
63
+
64
+ Progress freshness binds Outcome authority, applicability, runner, verification inputs, Controlling Context and implementation inputs. Retry defaults to none; one retry is allowed only for explicit `transient_once`, idempotent, read-only/test-sandbox work.
65
+
66
+ Status, Progress, Receipts and workdir compiled output are audit/recovery projections only. Development-period authority state is `manual_required` and never migrated.
67
+
68
+ Report their exact meaning: `progress_passing` is current targeted repair evidence rather than “Outcome complete”; `progress_stale` is a freshness fact rather than a current pass or immediate rerun command; `final_workflow_status: null` means the Goal is unfinished. `status`/`resume` derive `ready_stages`, `ready_outcomes` and Stage status from current Progress; they do not persist a Stage pass. `target_state` remains `not_accepted` until a fresh Final Gate accepts, becomes `blocked_external` for a target blocker, or names the Contract's `implementation_complete`, `target_profile_usable` or `production_release_ready` state after machine acceptance. Do not invent per-platform progress/status.
69
+
70
+ ## Final Gate And Terminal Paths
71
+
70
72
  Before Final Gate, complete Context/code/tests and create a clean candidate commit. Final Gate first verifies the accepted compiled authority is still fresh, then recompiles Source authority and records semantic plus raw protected-input identity for the Contract and fragments, the Source-embedded semantic manifest, every Source file, full Controlling Context, verifier/runner, recursively frozen local verifier dependencies, `verification_inputs` and workdir inputs. It validates the common-dir record/marker, creates one Git-tree snapshot and reruns every Check and sensitivity control. Non-UI semantic evidence must reproduce exactly every compiled machine Fact × method expectation with one attributable actual observation/environment/comparison/verdict under frozen expected/tolerance/mask/Oracle authority; selected-design method evidence must reproduce its exact compiled `fact_results` universe; every verdict passes, while named external obligations remain pending rather than fabricated. After execution it recompiles and re-hashes the same full protected set; any change returns `protected_inputs_changed_during_final_gate`, while an Active Authority race returns `active_authority_changed_during_final_gate`. Only unchanged protected inputs, workspace/tree and Authority may be accepted. It is the sole Long-Task `Engineering Quality Conformance`/`Architecture Conformance` carrier and the sole non-UI semantic and selected-design closure carrier: material independently falsifiable deliberation conclusions must already be declared through existing Source-backed obligations/constraints/forbidden shortcuts, owners/paths/Bindings, project-owned Checks and separate Assertions when functional behavior can pass independently. It proves exactly that declared project-check-bound engineering-quality set, not overall code quality, and no separate default Contract Conformance closure runs. A target-runtime Check must exercise its exact target again in that Final Gate execution; rereading historical status does not become live proof merely because the reader reran. The Receipt reports the target profile/state and every Stage as `passed`, `failed`, `blocked_external` or `blocked_dependency`.
71
-
72
- Commit, verifier migration, clear and abandon share one active-state lock. Stop/close clear only the identity actually accepted through CAS and preserve `machine_accepted_external_pending` plus every named external confirmation in output. Final Gate/Stop/close identify `acceptance_scope: declared_machine_authority` and `native_goal_effect: none`; close additionally identifies `closed_scope: machine_authority`. The Stop Hook emits the same scope as one non-blocking message for either accepted machine status. A stale Receipt exposes no accepted workflow status.
73
-
74
- Before platform-native Goal completion, compare current Goal/user meaning with accepted marked Source and check for a pending revision, unresolved blocker or omitted requirement. This review may only veto completion and direct Source/Contract repair; it is not a second acceptance Gate and cannot create proof.
75
-
76
- For invalid, mismatched, unrecoverable or stale-lock continuity, use only `ty-context long-task abandon <workdir> --force-corrupt-state`; it preserves authored Contract, Source, Context and Git content.
77
-
73
+
74
+ Commit, verifier migration, clear and abandon share one active-state lock. Stop/close clear only the identity actually accepted through CAS and preserve `machine_accepted_external_pending` plus every named external confirmation in output. Final Gate/Stop/close identify `acceptance_scope: declared_machine_authority` and `native_goal_effect: none`; close additionally identifies `closed_scope: machine_authority`. The Stop Hook emits the same scope as one non-blocking message for either accepted machine status. A stale Receipt exposes no accepted workflow status.
75
+
76
+ Before platform-native Goal completion, compare current Goal/user meaning with accepted marked Source and check for a pending revision, unresolved blocker or omitted requirement. This review may only veto completion and direct Source/Contract repair; it is not a second acceptance Gate and cannot create proof.
77
+
78
+ For invalid, mismatched, unrecoverable or stale-lock continuity, use only `ty-context long-task abandon <workdir> --force-corrupt-state`; it preserves authored Contract, Source, Context and Git content.
79
+
78
80
  An older `long-task-delivery-v2` Contract that lacks the Source `semantic-fact-manifest-v1`, root manifest identity, exact Outcome Fact/proof bindings, typed per-Fact results, Stage, required-target capabilities, full Context mode, atomic applicability dimensions, scenario, journey, success/degradation, Population universe binding, Control-relation applicability, per-method design record/primary-observation artifacts, canonical design `fact_expectations`, blocker-required capabilities, narrow semantic witnesses or typed external-impact fields is a manual migration. `upgrade --check` reports `long-task-v2-semantic-drift-authority`, and parsing lists missing field paths. Re-author the semantic universe and those meanings from Source, controlling Context and any current validated handoff; never infer them from old Progress/Receipts or import historical passing evidence as acceptance. Reclassify every Check path explicitly: implementation/runtime material belongs in `input_paths`, `expected_output_paths` or `artifact_globs`; Oracle/config/data inputs belong in `verification_inputs`. Supported direct-literal local Oracle dependencies are frozen recursively, while non-literal loaders fail closed and indirect runtime access remains declared Oracle TCB.