project-tiny-context-harness 0.8.10 → 0.8.12

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 (279) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +490 -472
  3. package/assets/README.md +762 -749
  4. package/assets/README.zh-CN.md +446 -431
  5. package/assets/agents/.gitkeep +1 -1
  6. package/assets/agents/AGENTS_CORE.md +17 -23
  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 +64 -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 +52 -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 +119 -119
  30. package/assets/skills/design-resource-authoring/references/resource-selection.md +158 -181
  31. package/assets/skills/design-system-authoring/SKILL.md +57 -57
  32. package/assets/skills/design-system-authoring/agents/openai.yaml +6 -6
  33. package/assets/skills/design-system-authoring/references/authority-adoption.md +48 -48
  34. package/assets/skills/design-system-authoring/references/open-design-design-system-provider.md +110 -110
  35. package/assets/skills/long-task-workflow/SKILL.md +71 -106
  36. package/assets/skills/long-task-workflow/agents/openai.yaml +1 -1
  37. package/assets/skills/long-task-workflow/references/authority-lifecycle.md +71 -69
  38. package/assets/skills/long-task-workflow/references/contract-authoring.md +98 -94
  39. package/assets/skills/long-task-workflow/references/evidence-design.md +67 -63
  40. package/assets/skills/long-task-workflow/references/source-authoring.md +90 -90
  41. package/assets/tools/validate_context.py +442 -442
  42. package/dist/commands/design-resource.js +9 -2
  43. package/dist/commands/enable.js +2 -0
  44. package/dist/commands/index.js +1 -1
  45. package/dist/commands/long-task-revision.js +8 -7
  46. package/dist/commands/sync.js +2 -0
  47. package/dist/index.d.ts +3 -4
  48. package/dist/index.js +2 -1
  49. package/dist/lib/compact-authoring-support.d.ts +22 -0
  50. package/dist/lib/compact-authoring-support.js +143 -0
  51. package/dist/lib/compact-shared-structure-authoring.d.ts +5 -0
  52. package/dist/lib/compact-shared-structure-authoring.js +9 -0
  53. package/dist/lib/compact-shared-structure-types.d.ts +61 -0
  54. package/dist/lib/compact-shared-structure-types.js +1 -0
  55. package/dist/lib/compact-shared-structure-validation.d.ts +2 -0
  56. package/dist/lib/compact-shared-structure-validation.js +159 -0
  57. package/dist/lib/compact-shared-structures.d.ts +3 -0
  58. package/dist/lib/compact-shared-structures.js +204 -0
  59. package/dist/lib/design-resource-fact-enums.d.ts +4 -0
  60. package/dist/lib/design-resource-fact-enums.js +12 -0
  61. package/dist/lib/design-resource-fact-manifest-shape-evidence.js +2 -2
  62. package/dist/lib/design-resource-fact-manifest-validation.d.ts +2 -1
  63. package/dist/lib/design-resource-fact-policy.d.ts +2 -2
  64. package/dist/lib/design-resource-fact-types.d.ts +2 -2
  65. package/dist/lib/design-resource-handoff-bundle-draft.d.ts +11 -0
  66. package/dist/lib/design-resource-handoff-bundle-draft.js +40 -0
  67. package/dist/lib/design-resource-handoff-bundle.js +4 -28
  68. package/dist/lib/design-resource-handoff-input-types.d.ts +14 -0
  69. package/dist/lib/design-resource-handoff-input-types.js +1 -0
  70. package/dist/lib/design-resource-handoff-manifest-projection.d.ts +2 -1
  71. package/dist/lib/design-resource-handoff-parser.d.ts +2 -2
  72. package/dist/lib/design-resource-handoff-parser.js +2 -2
  73. package/dist/lib/design-resource-handoff-shape.d.ts +4 -1
  74. package/dist/lib/design-resource-handoff-shape.js +10 -0
  75. package/dist/lib/design-resource-handoff-snapshot.d.ts +1 -1
  76. package/dist/lib/design-resource-handoff-snapshot.js +4 -0
  77. package/dist/lib/design-resource-handoff-types.d.ts +0 -10
  78. package/dist/lib/design-resource-handoff-validation.d.ts +6 -2
  79. package/dist/lib/design-resource-handoff-validation.js +11 -0
  80. package/dist/lib/design-resource-handoff-web-dependency-validation.d.ts +4 -2
  81. package/dist/lib/design-resource-symbolic-applicability-authority.d.ts +7 -0
  82. package/dist/lib/design-resource-symbolic-applicability-authority.js +19 -0
  83. package/dist/lib/design-resource-symbolic-applicability-policy.d.ts +12 -0
  84. package/dist/lib/design-resource-symbolic-applicability-policy.js +79 -0
  85. package/dist/lib/design-resource-symbolic-applicability-profiles.d.ts +8 -0
  86. package/dist/lib/design-resource-symbolic-applicability-profiles.js +55 -0
  87. package/dist/lib/design-resource-symbolic-applicability-shape.d.ts +2 -0
  88. package/dist/lib/design-resource-symbolic-applicability-shape.js +76 -0
  89. package/dist/lib/design-resource-symbolic-applicability-validation.d.ts +7 -0
  90. package/dist/lib/design-resource-symbolic-applicability-validation.js +128 -0
  91. package/dist/lib/design-resource-symbolic-compilation.d.ts +3 -0
  92. package/dist/lib/design-resource-symbolic-compilation.js +13 -0
  93. package/dist/lib/design-resource-symbolic-denotation.d.ts +3 -0
  94. package/dist/lib/design-resource-symbolic-denotation.js +167 -0
  95. package/dist/lib/design-resource-symbolic-disposition-validation.d.ts +4 -0
  96. package/dist/lib/design-resource-symbolic-disposition-validation.js +28 -0
  97. package/dist/lib/design-resource-symbolic-fact-policy.d.ts +12 -0
  98. package/dist/lib/design-resource-symbolic-fact-policy.js +12 -0
  99. package/dist/lib/design-resource-symbolic-fact-shape.d.ts +3 -0
  100. package/dist/lib/design-resource-symbolic-fact-shape.js +138 -0
  101. package/dist/lib/design-resource-symbolic-fact-types.d.ts +213 -0
  102. package/dist/lib/design-resource-symbolic-fact-types.js +1 -0
  103. package/dist/lib/design-resource-symbolic-fact-validation.d.ts +3 -0
  104. package/dist/lib/design-resource-symbolic-fact-validation.js +86 -0
  105. package/dist/lib/design-resource-symbolic-indexes.d.ts +23 -0
  106. package/dist/lib/design-resource-symbolic-indexes.js +54 -0
  107. package/dist/lib/design-resource-symbolic-manifest-shape.d.ts +3 -0
  108. package/dist/lib/design-resource-symbolic-manifest-shape.js +155 -0
  109. package/dist/lib/design-resource-symbolic-manifest-validation.d.ts +6 -0
  110. package/dist/lib/design-resource-symbolic-manifest-validation.js +132 -0
  111. package/dist/lib/design-resource-symbolic-noninterference-artifact.d.ts +33 -0
  112. package/dist/lib/design-resource-symbolic-noninterference-artifact.js +110 -0
  113. package/dist/lib/design-resource-symbolic-noninterference-equivalence.d.ts +3 -0
  114. package/dist/lib/design-resource-symbolic-noninterference-equivalence.js +77 -0
  115. package/dist/lib/design-resource-symbolic-noninterference-recompute.d.ts +4 -0
  116. package/dist/lib/design-resource-symbolic-noninterference-recompute.js +146 -0
  117. package/dist/lib/design-resource-symbolic-noninterference-scope.d.ts +7 -0
  118. package/dist/lib/design-resource-symbolic-noninterference-scope.js +49 -0
  119. package/dist/lib/design-resource-symbolic-noninterference-shape.d.ts +2 -0
  120. package/dist/lib/design-resource-symbolic-noninterference-shape.js +152 -0
  121. package/dist/lib/design-resource-symbolic-noninterference-types.d.ts +103 -0
  122. package/dist/lib/design-resource-symbolic-noninterference-types.js +1 -0
  123. package/dist/lib/design-resource-symbolic-noninterference-validation.d.ts +5 -0
  124. package/dist/lib/design-resource-symbolic-noninterference-validation.js +62 -0
  125. package/dist/lib/design-resource-symbolic-oracle-fingerprint.d.ts +1 -0
  126. package/dist/lib/design-resource-symbolic-oracle-fingerprint.js +47 -0
  127. package/dist/lib/design-resource-symbolic-predicate-shape.d.ts +6 -0
  128. package/dist/lib/design-resource-symbolic-predicate-shape.js +123 -0
  129. package/dist/lib/design-resource-symbolic-production-closure.d.ts +4 -0
  130. package/dist/lib/design-resource-symbolic-production-closure.js +144 -0
  131. package/dist/lib/design-resource-symbolic-proof-authority-validation.d.ts +10 -0
  132. package/dist/lib/design-resource-symbolic-proof-authority-validation.js +68 -0
  133. package/dist/lib/design-resource-symbolic-proof-validation.d.ts +10 -0
  134. package/dist/lib/design-resource-symbolic-proof-validation.js +89 -0
  135. package/dist/lib/design-resource-symbolic-region-validation.d.ts +19 -0
  136. package/dist/lib/design-resource-symbolic-region-validation.js +146 -0
  137. package/dist/lib/design-resource-symbolic-resource-validation.d.ts +5 -0
  138. package/dist/lib/design-resource-symbolic-resource-validation.js +90 -0
  139. package/dist/lib/design-resource-symbolic-rule-shape.d.ts +27 -0
  140. package/dist/lib/design-resource-symbolic-rule-shape.js +158 -0
  141. package/dist/lib/design-resource-symbolic-safety-validation.d.ts +6 -0
  142. package/dist/lib/design-resource-symbolic-safety-validation.js +29 -0
  143. package/dist/lib/design-resource-symbolic-source-ir-evaluation.d.ts +19 -0
  144. package/dist/lib/design-resource-symbolic-source-ir-evaluation.js +74 -0
  145. package/dist/lib/design-resource-symbolic-source-ir-evidence.d.ts +44 -0
  146. package/dist/lib/design-resource-symbolic-source-ir-evidence.js +88 -0
  147. package/dist/lib/design-resource-symbolic-source-ir-oracle.d.ts +13 -0
  148. package/dist/lib/design-resource-symbolic-source-ir-oracle.js +96 -0
  149. package/dist/lib/design-resource-symbolic-source-ir-proof.d.ts +14 -0
  150. package/dist/lib/design-resource-symbolic-source-ir-proof.js +98 -0
  151. package/dist/lib/design-resource-symbolic-source-ir-shape.d.ts +2 -0
  152. package/dist/lib/design-resource-symbolic-source-ir-shape.js +38 -0
  153. package/dist/lib/design-resource-symbolic-source-ir-types.d.ts +17 -0
  154. package/dist/lib/design-resource-symbolic-source-ir-types.js +2 -0
  155. package/dist/lib/design-resource-symbolic-static-dependency-validation.d.ts +2 -0
  156. package/dist/lib/design-resource-symbolic-static-dependency-validation.js +83 -0
  157. package/dist/lib/design-resource-symbolic-structural-closure-validation.d.ts +6 -0
  158. package/dist/lib/design-resource-symbolic-structural-closure-validation.js +79 -0
  159. package/dist/lib/design-resource-symbolic-validation-support.d.ts +29 -0
  160. package/dist/lib/design-resource-symbolic-validation-support.js +111 -0
  161. package/dist/lib/design-resource-v1-capacity-header.d.ts +8 -0
  162. package/dist/lib/design-resource-v1-capacity-header.js +231 -0
  163. package/dist/lib/design-resource-v1-capacity.d.ts +5 -0
  164. package/dist/lib/design-resource-v1-capacity.js +45 -0
  165. package/dist/lib/init.js +1 -0
  166. package/dist/lib/long-task-activation-validation.js +2 -2
  167. package/dist/lib/long-task-authority-policy.d.ts +3 -0
  168. package/dist/lib/long-task-authority-policy.js +3 -0
  169. package/dist/lib/long-task-codex-agent-profile.d.ts +42 -0
  170. package/dist/lib/long-task-codex-agent-profile.js +276 -0
  171. package/dist/lib/long-task-compact-authoring-projections.d.ts +12 -0
  172. package/dist/lib/long-task-compact-authoring-projections.js +67 -0
  173. package/dist/lib/long-task-compact-authoring.d.ts +3 -0
  174. package/dist/lib/long-task-compact-authoring.js +173 -0
  175. package/dist/lib/long-task-compact-carrier.d.ts +7 -0
  176. package/dist/lib/long-task-compact-carrier.js +132 -0
  177. package/dist/lib/long-task-compact-parser.d.ts +14 -0
  178. package/dist/lib/long-task-compact-parser.js +123 -0
  179. package/dist/lib/long-task-compact-primitives.d.ts +22 -0
  180. package/dist/lib/long-task-compact-primitives.js +132 -0
  181. package/dist/lib/long-task-compact-projections.d.ts +4 -0
  182. package/dist/lib/long-task-compact-projections.js +153 -0
  183. package/dist/lib/long-task-compact-structure-targets.d.ts +2 -0
  184. package/dist/lib/long-task-compact-structure-targets.js +90 -0
  185. package/dist/lib/long-task-counterfactual-sandbox.d.ts +1 -1
  186. package/dist/lib/long-task-counterfactual-sandbox.js +7 -5
  187. package/dist/lib/long-task-delivery-parser.d.ts +1 -0
  188. package/dist/lib/long-task-delivery-parser.js +38 -6
  189. package/dist/lib/long-task-design-resource-handoff.d.ts +2 -1
  190. package/dist/lib/long-task-design-resource-handoff.js +71 -11
  191. package/dist/lib/long-task-design-resource-method-binding.d.ts +8 -1
  192. package/dist/lib/long-task-design-resource-method-binding.js +150 -0
  193. package/dist/lib/long-task-evidence-capability-codec.js +256 -34
  194. package/dist/lib/long-task-evidence-capability-policy.js +28 -0
  195. package/dist/lib/long-task-evidence-capability-runtime.js +271 -63
  196. package/dist/lib/long-task-evidence-capability-types.d.ts +70 -2
  197. package/dist/lib/long-task-evidence-v2.d.ts +1 -1
  198. package/dist/lib/long-task-evidence-v2.js +5 -5
  199. package/dist/lib/long-task-hook-install.d.ts +19 -2
  200. package/dist/lib/long-task-hook-install.js +288 -91
  201. package/dist/lib/long-task-playwright-capability-records.d.ts +2 -0
  202. package/dist/lib/long-task-playwright-capability-records.js +74 -2
  203. package/dist/lib/long-task-runner-freeze.d.ts +1 -1
  204. package/dist/lib/long-task-runner-freeze.js +4 -2
  205. package/dist/lib/long-task-semantic-contract-types.d.ts +1 -1
  206. package/dist/lib/long-task-semantic-fact-binding-types.d.ts +8 -0
  207. package/dist/lib/long-task-semantic-fact-closure.js +4 -1
  208. package/dist/lib/long-task-semantic-fact-contract-closure.d.ts +1 -1
  209. package/dist/lib/long-task-semantic-fact-contract-closure.js +15 -3
  210. package/dist/lib/long-task-semantic-fact-contract-facts.d.ts +1 -1
  211. package/dist/lib/long-task-semantic-fact-contract-facts.js +4 -1
  212. package/dist/lib/long-task-semantic-fact-contract-proofs.d.ts +1 -1
  213. package/dist/lib/long-task-semantic-fact-contract-proofs.js +12 -3
  214. package/dist/lib/long-task-semantic-fact-evidence.d.ts +5 -1
  215. package/dist/lib/long-task-semantic-fact-evidence.js +47 -4
  216. package/dist/lib/long-task-semantic-fact-shape.js +17 -6
  217. package/dist/lib/long-task-shape-primitives.d.ts +1 -1
  218. package/dist/lib/long-task-shape-primitives.js +1 -0
  219. package/dist/lib/long-task-source-item-parser.d.ts +2 -2
  220. package/dist/lib/long-task-source-item-parser.js +20 -11
  221. package/dist/lib/long-task-ui-design-policy.js +64 -4
  222. package/dist/lib/long-task-ui-surface-shape.js +195 -0
  223. package/dist/lib/long-task-ui-surface-types.d.ts +53 -0
  224. package/dist/lib/long-task-verifier-v2.js +1 -1
  225. package/dist/lib/long-task-worker-selection.d.ts +2 -0
  226. package/dist/lib/long-task-worker-selection.js +7 -0
  227. package/dist/lib/long-task-workspace-scope.js +3 -1
  228. package/dist/lib/long-task-workspace.js +11 -1
  229. package/dist/lib/migrations.js +58 -0
  230. package/dist/lib/profiles.js +0 -1
  231. package/dist/lib/semantic-fact-compact-authoring.d.ts +2 -0
  232. package/dist/lib/semantic-fact-compact-authoring.js +160 -0
  233. package/dist/lib/semantic-fact-compact-capacity.d.ts +9 -0
  234. package/dist/lib/semantic-fact-compact-capacity.js +40 -0
  235. package/dist/lib/semantic-fact-compact-carrier.d.ts +16 -0
  236. package/dist/lib/semantic-fact-compact-carrier.js +146 -0
  237. package/dist/lib/semantic-fact-compact-parser.d.ts +17 -0
  238. package/dist/lib/semantic-fact-compact-parser.js +168 -0
  239. package/dist/lib/semantic-fact-compact-revision.d.ts +11 -0
  240. package/dist/lib/semantic-fact-compact-revision.js +64 -0
  241. package/dist/lib/semantic-fact-compact-support.d.ts +23 -0
  242. package/dist/lib/semantic-fact-compact-support.js +159 -0
  243. package/dist/lib/semantic-fact-policy-census.d.ts +1 -0
  244. package/dist/lib/semantic-fact-policy-census.js +43 -0
  245. package/dist/lib/semantic-fact-proof-shape.d.ts +1 -1
  246. package/dist/lib/semantic-fact-property-shape.d.ts +1 -1
  247. package/dist/lib/semantic-fact-source-parser.d.ts +5 -0
  248. package/dist/lib/semantic-fact-source-parser.js +47 -6
  249. package/dist/lib/structural-closure-cost.d.ts +79 -0
  250. package/dist/lib/structural-closure-cost.js +91 -0
  251. package/dist/lib/symbolic-denotation-dag-builder.d.ts +25 -0
  252. package/dist/lib/symbolic-denotation-dag-builder.js +176 -0
  253. package/dist/lib/symbolic-denotation-domain-validation.d.ts +3 -0
  254. package/dist/lib/symbolic-denotation-domain-validation.js +56 -0
  255. package/dist/lib/symbolic-denotation-engine.d.ts +32 -0
  256. package/dist/lib/symbolic-denotation-engine.js +140 -0
  257. package/dist/lib/symbolic-denotation-public.d.ts +11 -0
  258. package/dist/lib/symbolic-denotation-public.js +12 -0
  259. package/dist/lib/symbolic-denotation-runtime.d.ts +20 -0
  260. package/dist/lib/symbolic-denotation-runtime.js +90 -0
  261. package/dist/lib/symbolic-denotation-support.d.ts +11 -0
  262. package/dist/lib/symbolic-denotation-support.js +49 -0
  263. package/dist/lib/symbolic-denotation-types.d.ts +133 -0
  264. package/dist/lib/symbolic-denotation-types.js +18 -0
  265. package/dist/lib/symbolic-denotation-validation.d.ts +6 -0
  266. package/dist/lib/symbolic-denotation-validation.js +126 -0
  267. package/dist/lib/sync-engine.d.ts +1 -0
  268. package/dist/lib/sync-engine.js +4 -1
  269. package/dist/lib/upgrade.js +1 -0
  270. package/dist/long-task-hook.js +40 -1
  271. package/dist/public-types.d.ts +8 -0
  272. package/dist/public-types.js +1 -0
  273. package/dist/schemas/design-resource-symbolic-noninterference-artifact-v2.schema.json +289 -0
  274. package/dist/schemas/design-resource-symbolic-source-ir-v1.schema.json +130 -0
  275. package/dist/schemas/long-task-delivery-v2/long-task-delivery-v2.schema.json +390 -5
  276. package/migrations/README.md +15 -15
  277. package/package.json +2 -2
  278. package/source-mappings.yaml +28 -25
  279. package/assets/skills/source-plan-authoring/SKILL.md +0 -14
@@ -1,69 +1,69 @@
1
- # Source-Bound Draft Input Reference
2
-
3
- Read this alongside `contract-authoring.md` when raw, mixed, attachment-heavy or incomplete inputs need Source-quality repair while the same Contract Draft is being mapped. Inputs enter the Draft immediately; this reference is neither an earlier Source-authoring phase nor a standalone Source Plan stage or second lifecycle.
4
-
5
- ## Objective and boundary
6
-
7
- Preserve every material user, product, technical, visual and acceptance constraint from the initial/revised proposal and supplied resources. Add only traceable necessary derivations, defensible delegated choices and evidence-backed repository facts. Make the real Source understandable without the original conversation before Preflight/Compile, while allowing Draft decomposition and repository binding to proceed incrementally.
8
-
9
- Do not create a Source Plan schema, CLI, Preflight, Compile, Receipt, cache, authority, state or internal Source-authoring stage. Contract YAML cannot become the sole owner of a choice or missing semantic. Do not let current implementation silently redefine intent. A pre-existing Source Plan is simply one possible input.
10
-
11
- ## Input inventory
12
-
13
- 1. Assign every proposal, selected design resource, screenshot, document, diagram, table and other attachment a stable input ID.
14
- 2. Inspect all pages/frames/screens/tables/visible states; never silently sample a multi-part artifact. Every non-empty line in a declared Markdown Source file must ultimately belong to exactly one Material Source Item, one keyed and reasoned non-authoritative `ty-source-background:start/end` block, or the one validated `design-resource-handoff-v1` formal block.
1
+ # Source-Bound Draft Input Reference
2
+
3
+ Read this alongside `contract-authoring.md` when raw, mixed, attachment-heavy or incomplete inputs need Source-quality repair while the same Contract Draft is being mapped. Inputs enter the Draft immediately; this reference is neither an earlier Source-authoring phase nor a standalone Source Plan stage or second lifecycle.
4
+
5
+ ## Objective and boundary
6
+
7
+ Preserve every material user, product, technical, visual and acceptance constraint from the initial/revised proposal and supplied resources. Add only traceable necessary derivations, defensible delegated choices and evidence-backed repository facts. Make the real Source understandable without the original conversation before Preflight/Compile, while allowing Draft decomposition and repository binding to proceed incrementally.
8
+
9
+ Do not create a Source Plan schema, CLI, Preflight, Compile, Receipt, cache, authority, state or internal Source-authoring stage. Contract YAML cannot become the sole owner of a choice or missing semantic. Do not let current implementation silently redefine intent. A pre-existing Source Plan is simply one possible input.
10
+
11
+ ## Input inventory
12
+
13
+ 1. Assign every proposal, selected design resource, screenshot, document, diagram, table and other attachment a stable input ID.
14
+ 2. Inspect all pages/frames/screens/tables/visible states; never silently sample a multi-part artifact. Every non-empty line in a declared Markdown Source file must ultimately belong to exactly one Material Source Item, one keyed and reasoned non-authoritative `ty-source-background:start/end` block, or the one validated `design-resource-handoff-v1` formal block.
15
15
  3. Classify each input as user instruction, product requirement, technical constraint, existing proposal, selected target, repository/Context evidence, constraint, inspiration or background. Background is a closed grammar: `markdown-structure` contains only text-free anchors or horizontal rules, and `provenance` contains only `ty-source-provenance input=<key> mode=<direct|derived|delegated|evidence-backed> [source=<key>] [sha256=<64-lowercase-hex>]` comments; non-direct modes require `source`. Text-bearing headings, free-form provenance and explanatory prose are material or unclassified even when intended as non-authoritative; background must never hide a qualifier, requirement, acceptance fact, architecture meaning, design meaning or other delivery authority.
16
- 4. For visual resources, preserve selection basis, classification (`exact-target`, `constraint` or `inspiration`), stable resource/surface/control/state/target keys, declared platform/viewport/mode/state/content applicability, source profile/canonical entry/dependency set, provider/project/run/entry provenance and immutable digest/snapshot, plus typed locators. A mutable link, metadata-only response, partial file set or prose locator is incomplete. Unselected candidates authorize no fidelity.
17
- 5. Record incorporated meaning and every unreadable, conflicting or intentionally unused part. Higher authority and user-stated precedence win; unresolved conflicts remain decisions.
18
-
19
- ## Preference and research gate
20
-
21
- Before comparative research or a material product, technical, architecture or provider selection, identify decision-changing criteria such as fidelity versus cost, delivery speed, reliability/support, privacy/compliance, lock-in/control, operational burden, platform scope and extensibility.
22
-
23
- Infer preferences only from user words, Source, Context or controlling constraints. If an unknown preference would materially change research or recommendation, ask one concise targeted clarification before proceeding. Do not impose a questionnaire, re-ask known preferences or pause for minor reversible choices with the same defensible recommendation.
24
-
25
- Use current primary/authoritative evidence for changing external facts. Record source, scope and retrieval date. Preference clarification authorizes plan meaning, not payment, contracting, deployment/publication, destructive production mutation, permission grants, sensitive-data transmission or required legal/security/human approval; those remain typed external confirmations.
26
-
27
- ## Working strategies, not phases
28
-
29
- Choose locally as needed while revising the same Draft; do not expose these as lifecycle stages or ask the user to choose:
30
-
31
- - **refinement:** preserve and complete a substantially developed proposal;
32
- - **synthesis:** build coherent Source from a goal plus mixed inputs;
33
- - **hybrid:** use one proposal as backbone and fill gaps from other inputs.
34
-
35
- A short request is sufficient when roles, goal and reference authority are recoverable. Reuse an authorized writable proposal as the real Source. If the delivery exists only in conversation, materialize exactly one project-native Markdown Source according to repository convention. Do not create a parallel planning artifact.
36
-
37
- ## Semantic authoring
38
-
39
- For every material item, preserve one origin:
40
-
41
- - `direct`: stated by user or controlling input, with all qualifiers;
42
- - `derived`: unavoidable for completeness/falsifiability, identifies `Derived From`, states why necessary and changes no user capability, business rule or scope;
43
- - `delegated`: a defensible choice requested by instructions to synthesize/refine/use judgment, records `Delegated By`, preference/evidence basis and exact added meaning;
44
- - `evidence-backed`: repository/Context fact with exact source and no promotion of incidental code shape to product intent;
45
- - `decision_required`: conflicting authority, explicitly user-reserved choice, missing material preference or no defensible recommendation.
46
-
47
- High impact or several options is not itself a reason to pause when criteria support one recommendation. Keep real high-risk actions as external confirmations. Never introduce a requirement for the first time only inside acceptance criteria.
48
-
49
- ## Structure and stable keys
50
-
51
- Use stable semantic lowercase-kebab keys and Markdown anchors where practical. Preserve keys when wording changes but meaning does not; never renumber for ordering or reuse a retired key for new meaning.
52
-
53
- Define vertical Outcomes only when observable results are independently decidable and later verifiable. Do not split by response length, frontend/backend layer, module count, agent capacity or desired parallelism; do not merge distinct results merely for brevity.
54
-
16
+ 4. For visual resources, preserve selection basis, classification (`exact-target`, `constraint` or `inspiration`), stable resource/surface/control/state/target keys, declared platform/viewport/mode/state/content applicability, source profile/canonical entry/dependency set, provider/project/run/entry provenance and immutable digest/snapshot, plus typed locators. A mutable link, metadata-only response, partial file set or prose locator is incomplete. Unselected candidates authorize no fidelity.
17
+ 5. Record incorporated meaning and every unreadable, conflicting or intentionally unused part. Higher authority and user-stated precedence win; unresolved conflicts remain decisions.
18
+
19
+ ## Preference and research gate
20
+
21
+ Before comparative research or a material product, technical, architecture or provider selection, identify decision-changing criteria such as fidelity versus cost, delivery speed, reliability/support, privacy/compliance, lock-in/control, operational burden, platform scope and extensibility.
22
+
23
+ Infer preferences only from user words, Source, Context or controlling constraints. If an unknown preference would materially change research or recommendation, ask one concise targeted clarification before proceeding. Do not impose a questionnaire, re-ask known preferences or pause for minor reversible choices with the same defensible recommendation.
24
+
25
+ Use current primary/authoritative evidence for changing external facts. Record source, scope and retrieval date. Preference clarification authorizes plan meaning, not payment, contracting, deployment/publication, destructive production mutation, permission grants, sensitive-data transmission or required legal/security/human approval; those remain typed external confirmations.
26
+
27
+ ## Working strategies, not phases
28
+
29
+ Choose locally as needed while revising the same Draft; do not expose these as lifecycle stages or ask the user to choose:
30
+
31
+ - **refinement:** preserve and complete a substantially developed proposal;
32
+ - **synthesis:** build coherent Source from a goal plus mixed inputs;
33
+ - **hybrid:** use one proposal as backbone and fill gaps from other inputs.
34
+
35
+ A short request is sufficient when roles, goal and reference authority are recoverable. Reuse an authorized writable proposal as the real Source. If the delivery exists only in conversation, materialize exactly one project-native Markdown Source according to repository convention. Do not create a parallel planning artifact.
36
+
37
+ ## Semantic authoring
38
+
39
+ For every material item, preserve one origin:
40
+
41
+ - `direct`: stated by user or controlling input, with all qualifiers;
42
+ - `derived`: unavoidable for completeness/falsifiability, identifies `Derived From`, states why necessary and changes no user capability, business rule or scope;
43
+ - `delegated`: a defensible choice requested by instructions to synthesize/refine/use judgment, records `Delegated By`, preference/evidence basis and exact added meaning;
44
+ - `evidence-backed`: repository/Context fact with exact source and no promotion of incidental code shape to product intent;
45
+ - `decision_required`: conflicting authority, explicitly user-reserved choice, missing material preference or no defensible recommendation.
46
+
47
+ High impact or several options is not itself a reason to pause when criteria support one recommendation. Keep real high-risk actions as external confirmations. Never introduce a requirement for the first time only inside acceptance criteria.
48
+
49
+ ## Structure and stable keys
50
+
51
+ Use stable semantic lowercase-kebab keys and Markdown anchors where practical. Preserve keys when wording changes but meaning does not; never renumber for ordering or reuse a retired key for new meaning.
52
+
53
+ Define vertical Outcomes only when observable results are independently decidable and later verifiable. Do not split by response length, frontend/backend layer, module count, agent capacity or desired parallelism; do not merge distinct results merely for brevity.
54
+
55
55
  Use only applicable semantic types:
56
-
57
- - result/Outcome;
58
- - Requirement (`REQ`);
59
- - user-visible Control (`CTRL`);
60
- - technical obligation (`OBL`);
61
- - explicitly non-completing meaning (`NCOMP`);
62
- - acceptance scenario (`AC`);
63
- - global non-goal/constraint and forbidden shortcut;
64
- - risk with exact Fact, Affected Outcome, Basis and Consequence;
65
- - external confirmation (`EXT`);
66
- - genuine decision (`DEC`);
56
+
57
+ - result/Outcome;
58
+ - Requirement (`REQ`);
59
+ - user-visible Control (`CTRL`);
60
+ - technical obligation (`OBL`);
61
+ - explicitly non-completing meaning (`NCOMP`);
62
+ - acceptance scenario (`AC`);
63
+ - global non-goal/constraint and forbidden shortcut;
64
+ - risk with exact Fact, Affected Outcome, Basis and Consequence;
65
+ - external confirmation (`EXT`);
66
+ - genuine decision (`DEC`);
67
67
  - advisory implementation hint (`HINT`), which is not a material requirement.
68
68
 
69
69
  ## Non-UI semantic completeness
@@ -83,41 +83,41 @@ Before implementation and formal Compile:
83
83
  This expansion cannot invent a real product/legal/security/commercial/safety choice. A defensible delegated choice must first become traceable Material Source; an unsupported or user-reserved choice remains a blocker or typed External Confirmation. The named Inspector/Oracle is an explicit trusted-computing boundary, and custom extensions are mandatory when the standard catalog cannot observe the domain.
84
84
 
85
85
  ## UI and control completeness
86
-
86
+
87
87
  For each in-scope surface, record purpose, entry/exit/navigation, regions/overlays and included Control keys. For every real material interactive Control, close every canonical field independently:
88
-
89
- `surface`, `region`, `location`, `control type`, `label/content`, `user task`, `visibility`, `availability`, `trigger`, `input`, `validation`, `default`, `interaction`, `navigation/result`, `loading`, `empty`, `success`, `failure`, `recovery`, `permission`, `feedback` and `accessibility`.
90
-
88
+
89
+ `surface`, `region`, `location`, `control type`, `label/content`, `user task`, `visibility`, `availability`, `trigger`, `input`, `validation`, `default`, `interaction`, `navigation/result`, `loading`, `empty`, `success`, `failure`, `recovery`, `permission`, `feedback` and `accessibility`.
90
+
91
91
  For each field record concrete `specified` meaning, an explicit justified `not_applicable` statement, or blocking `unresolved`; omission is not non-applicability. Also preserve every material cross-Control and system relation—including shared state, ordering/dependency, mutual exclusion, navigation, permission, recovery, validation and feedback chains—and explicitly close the Outcome as `not_applicable` only when no such relation exists. Each specified or not-applicable fact, including relation closure, must name its actual target, atomic condition/input/state dimensions and Given/When journey applicability.
92
-
93
- Do not invent controls for a non-interface delivery. A coarse frame or configured design system does not supply unshown states. Selected design resources and product/technical Source remain parallel: visuals cannot invent business/data/permission/algorithmic rules.
94
-
92
+
93
+ Do not invent controls for a non-interface delivery. A coarse frame or configured design system does not supply unshown states. Selected design resources and product/technical Source remain parallel: visuals cannot invent business/data/permission/algorithmic rules.
94
+
95
95
  For every selected exact/constraint target, preserve the declared platform/viewport/mode/state/content conditions and identify which surface and Control keys it governs. A formal Web/App handoff also preserves its canonical Fact-manifest identity, frozen Inspector/Census and the exact handoff projection of condition axes/combinations, subject hierarchy, subject-local variations, atomic properties, Fact Cells/Facts, proof obligations, Oracles/environments, design-system lineage, assets and blockers. Product Controls and eight UI/UX dimensions are semantic/roll-up owners, not the Fact ceiling. Do not collapse a component instance or Anatomy Part into its family, several states into `all-states`, several conditions into one label, or several property/method obligations into one broad visual claim. Canonical resources retain exact values; Source and Contract retain stable Fact identities and located-digest/comparison authority rather than copied CSS.
96
96
 
97
97
  Before Compile, confirm the formal handoff already proves `Expected Fact Universe = Canonical Resource Facts = Handoff Indexed Facts`, including explicit N/A/exclusion basis and non-sampling/non-truncation. Each covered Fact has all property-required verification methods, and each exact target condition has full-target layout and pixel Facts. Separately record any design-resource acceptance blocker supplied by the Source, including its exact Source items, verification methods and non-empty runtime-observation `required_capabilities`. Do not weaken a physical-device, sensor, camera, orientation, haptic, assistive-technology, pixel-density, safe-area or other target-local need into a generic browser/runtime label merely because the proxy is available. File identity, hashes, provider/export success, registry membership, Census counts and preflight are integrity/input-closure facts only; they do not state that a production owner, real-user journey or rendered interaction conforms.
98
-
99
- ## Acceptance and risk
100
-
101
- Each AC has exactly one Given/When/Then scenario, names the REQ/CTRL/OBL/NCOMP meaning it accepts and introduces no undeclared product semantics. Keep representative/sample/framework checks distinct from full-population claims and partial delivery distinct from completion.
102
-
103
- Use the Runtime's exact risk Fact names when marking risk. Data migration is `data_migration`; a weakly observable critical path is separate `critical_user_path` and `weak_observability` facts; preserve `multi_repository_change` in Source so Contract compilation can reject unsupported delivery honestly.
104
-
105
- ## Preflight/Compile convergence audit
106
-
107
- Before Preflight/Compile confirm:
108
-
109
- 1. Every material original statement and qualifier is preserved.
98
+
99
+ ## Acceptance and risk
100
+
101
+ Each AC has exactly one Given/When/Then scenario, names the REQ/CTRL/OBL/NCOMP meaning it accepts and introduces no undeclared product semantics. Keep representative/sample/framework checks distinct from full-population claims and partial delivery distinct from completion.
102
+
103
+ Use the Runtime's exact risk Fact names when marking risk. Data migration is `data_migration`; a weakly observable critical path is separate `critical_user_path` and `weak_observability` facts; preserve `multi_repository_change` in Source so Contract compilation can reject unsupported delivery honestly.
104
+
105
+ ## Preflight/Compile convergence audit
106
+
107
+ Before Preflight/Compile confirm:
108
+
109
+ 1. Every material original statement and qualifier is preserved.
110
110
  2. Every supplied input is incorporated or has an explicit unreadable/unused/conflict disposition, and every non-empty Source line is owned by a Material Item, closed-grammar structure/provenance background block or validated formal block.
111
- 3. Distinct requirements and independently decidable Outcomes were not collapsed.
112
- 4. Every real Control has all 22 canonical fields closed as specified, justified not applicable or unresolved; every material cross-Control/shared-state/navigation/permission/recovery relation is specified or the Outcome explicitly declares that no such relation exists.
113
- 5. Every REQ, specified/not-applicable CTRL field and Control relation has exact applicability plus acceptance, external confirmation, decision or explicit exception; unresolved coverage blocks.
114
- 6. Derived/delegated/evidence-backed items have traceable basis and no hidden product expansion.
115
- 7. Non-goals, forbidden shortcuts, risks and recovery are concrete.
116
- 8. No unsupported number, threshold, metric or external claim appears.
111
+ 3. Distinct requirements and independently decidable Outcomes were not collapsed.
112
+ 4. Every real Control has all 22 canonical fields closed as specified, justified not applicable or unresolved; every material cross-Control/shared-state/navigation/permission/recovery relation is specified or the Outcome explicitly declares that no such relation exists.
113
+ 5. Every REQ, specified/not-applicable CTRL field and Control relation has exact applicability plus acceptance, external confirmation, decision or explicit exception; unresolved coverage blocks.
114
+ 6. Derived/delegated/evidence-backed items have traceable basis and no hidden product expansion.
115
+ 7. Non-goals, forbidden shortcuts, risks and recovery are concrete.
116
+ 8. No unsupported number, threshold, metric or external claim appears.
117
117
  9. Selected design resources retain stable identity and exact declared coverage; formal Web/App handoffs retain manifest-backed atomic Fact/proof universes with no aggregate, sampled or truncated coverage; candidates remain non-authoritative.
118
118
  10. Every material UI Fact and Control can be mapped to a production target/owner, real-user entry journey and independently attributable acceptance route, while every declared design blocker has an explicit machine or target-blocking external-confirmation disposition. Removing one from scope requires an explicit Source revision; Contract prose cannot waive it.
119
119
  11. The Source is self-contained enough to own every mapped Draft semantic and names every still-required external artifact.
120
120
  12. At least one marked `technical_obligation` carries `aspect=architecture`, preserves the selected owner/dependency/debt conclusion, and maps to an independently falsifiable architecture obligation rather than only a Result Claim.
121
121
  13. The one `semantic-fact-manifest-v1` exactly inventories all material non-UI inputs and complete standard/custom family, unit/relation/population, condition, property, Fact and proof-obligation universes; every ordinary Material Source Item contributes exact Fact lineage, all generation collections have complete count/digest closure, and no aggregate/sample/ungrounded N/A/unresolved row is hidden.
122
-
122
+
123
123
  Complete non-rendering `ty-source-item:start/end` markers in the real Markdown Source without rewriting direct text, wrap only recognized Markdown structure or structured provenance in uniquely keyed and reasoned `ty-source-background:start/end` blocks, retain at most one schema-valid `design-resource-handoff-v1` formal block, and finish the corresponding Contract mapping in the same loop. Unclassified text, arbitrary prose inside background, a background block used to hide material meaning, unresolved Control coverage or missing applicability blocks Preflight/Compile. Neither markers nor this audit delay opening the Draft.