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,172 +1,49 @@
1
- ---
2
- name: context_uiux_design
3
- description: Use when the user explicitly asks to establish, adopt or repair durable UI/UX Design Authority, DESIGN.md, design-system governance, visual standards, stable interaction/surface Context, Impeccable review, visual polish, frontend redesign, or when material production UI lacks sufficient or consistent Design Authority in a Minimal Context Harness project. For standalone generation of low/high-fidelity wireframes, visual candidates, a design prototype or implementation resource handoff, use design-resource-authoring instead; do not trigger this Skill solely for resource generation, routine implementation with sufficient authority, local CSS fixes, UI bugs, explicit throwaway prototypes or generic mentions of design.
4
- ---
5
-
6
- # Context UIUX Design
7
-
8
- ## Package-Managed Boundary
9
-
10
- This Skill is generated by `ty-context sync` and owned by the Harness package. Do not edit the generated `context_uiux_design` Skill directly.
11
-
12
- Project-specific UI/UX and visual design rules belong in a separate project-local Skill under `<harnessRoot>/skills/uiux_design/SKILL.md`. When a project-local Skill and this package-managed Skill both apply, use the more specific project-local Skill as the primary instruction source while keeping durable conclusions in `project_context/**` and `DESIGN.md`. Keep the project-local Skill front matter `description` trigger keywords aligned with this package-managed Skill and the project `AGENTS.md` role-trigger rule; if the project adds or narrows trigger terms, update both places together so agent activation and Tiny Context guidance do not drift apart.
13
-
14
- ## 目标
15
-
16
- 帮助 agent 在开发工作流中审查、采纳或修复设计权威,把已经选定的界面、交互和视觉结论沉淀成可恢复的 Minimal Context 和 `DESIGN.md`,并保持实现与验证对齐。
17
-
18
- ## Design Context Depth / 设计上下文深度
19
-
20
- 按需使用而不是默认加载全部层级:全局体验原则;跨 surface Product Surface Contract;单屏 Screen Contract;可复用的 Control interaction Context;`DESIGN.md` 视觉系统/引用解释;项目原生 authored targets;verification Context。继续使用现有 `global`、`contract`、area/subdomain、`decision-rationale`、`verification` `implementation-index` 角色,不新增笼统 `design` `screen` 角色。
21
-
22
- 一项事实只有一个主要 owner:跨页面职责属于 Surface Context,稳定的单屏层级/交互属于 Screen/interaction Context,视觉 token/rationale 属于 `DESIGN.md`,具体构图属于 selected target,交付范围与证明属于当前任务或现有 Delivery Contract/verification。使用稳定 surface/control/target key 连接,不复制成彼此竞争的说明。
23
-
24
- ## Design Source Projection / 设计资源事实投影
25
-
26
- 消费已选资源时,先把每项 material fact 在内部分类为:已有 durable owner、需要更新 owner、task-local、out of scope decision required;不要持久化这张映射。
27
-
28
- - `surface_flow`:长期跨页面职责进入 Product Surface Context;稳定单屏层级/region/navigation 进入 Screen Contract;本次交付路径留在任务/Contract。
29
- - `visual_content`:长期视觉系统、token、组件族视觉规则和 rationale 进入 `DESIGN.md`;产品文案/信息语义进入 Screen/Control Context;精确构图、数值和条件差异留在 immutable target。
30
- - `component_control` 与 `state_interaction`:可复用的控件任务、可见性、输入/校验、状态、反馈、恢复、权限和导航语义进入 Screen/interaction Context;本次实现细节留在任务/Contract。
31
- - `motion`:系统级 motion/reduced-motion policy 进入 `DESIGN.md`;交互行为进入 Screen/Control Context;精确 timeline/easing/关键帧留在 target/handoff。
32
- - `adaptation_input` 与 `accessibility`:长期响应式、平台/input/focus/语义替代规则进入 Screen/Control Context;精确 condition/value 留在 target;可重复检查入口进入 verification Context。
33
- - `assets`:长期资产使用/归属政策进入 owning Context `DESIGN.md`;精确文件、字节和 digest 留在 target/handoff。
34
- - provider provenance、source profile/dependencies、coverage/applicability cells、typed locators、交付 blockers、Claims/Assertions/Progress/Final Gate 不是 durable UI/UX Context;只有它们暴露的稳定产品决定、风险或可重复验证路径才投影到对应 owner。
35
-
36
- 每个 adopted target 只能有一个 canonical adoption record。项目级、系统级或 component-family target 由 `DESIGN.md` 记录;单 screen/interaction target 由 owning Screen Contract 记录。canonical record 独占 interpretation、selection basis、immutable locator/digest、condition coverage 和 editable upstream owner/locator/update route;其他 Context、handoff 或 Contract 只保留 stable target key、canonical owner/anchor 与本层 applicability。handoff 的变化型 coverage index 不复制进 Context。
37
-
38
- ## External Design Resource Consumption / 外部设计资源消费
39
-
40
- - `design-resource-authoring` 可以按明确请求在上游动态委托 Open Design 产生 flow、低保真、候选方向、组件族/独特复杂控件状态、交互原型或实现级资源;它以明确输出/开发内容为上限,在范围内补齐材料性 UI/UX 含义但不要求逐控件一份稿,不复制 provider 的提示词/模板,也不把任何资源设为全局必选。
41
- - `design-system-authoring` 是另一个仅显式调用的冷启动/修复 Skill:它用 Open Design 生成或选择候选,经过明确或受托选择后,把结果采纳到 canonical `DESIGN.md`、唯一 token source/direction owning Context。缺少设计系统不会让本 Skill `design-resource-authoring` 自动调用它。
42
- - 本 Skill 不承担独立资源生产。只有进入默认开发流程或 Long-Task、需要采纳稳定结论时,本 Skill 才消费这些或其他外部设计 Source。
43
- - 如果上游交付是用于实现的已选资源,先要求一个通过 `ty-context design-resource preflight <handoff.md>` 的 `design-resource-handoff-v1`。正式 Web/App target 必须完整取得 canonical entry、依赖闭包和 frozen-Inspector Fact manifest,并证明 `Expected Fact Universe = Canonical Resource Facts = Handoff Indexed Facts`。作者端在生成前从需求、产品语义、设计系统和目标环境推导全集;原子身份是 `subject × target × condition × variation × property`,包含组件 instance/Anatomy Part/primitive/relation、动态 population、全部适用 condition/variation 组合、完整标准/自定义属性、显式 N/A/exclusion、每个 property 要求的 Fact × method proof、设计系统 lineage、资产和 blocker。Control 是产品交互语义单位,八个 UI/UX dimension 是 roll-up,都不是 UI Fact 粒度上限;默认页面、状态汇总字符串、抽样或截断都不能代替原子枚举。精确值只留在 canonical resource,handoff 用 typed located digest、comparator/tolerance/mask、Oracle/environment 和 sensitivity policy 投影而不复制 CSS。探索候选不需要此文件;provider/preflight 只证明相对于 named Inspector/Oracle TCB 的输入闭包,不等于采纳或生产验收。
44
- - 候选、灵感和未选定输出不是 Context readiness 或实现权威,不能写入 selected registry;选定目标仍必须完成 UI Authority Closure 和 `Context Delta`。
45
- - 消费时沿 owning Context 的 surface/control/target key 到 canonical adoption record,主动打开每个受影响的 selected `exact-target`/`constraint`,而不是把登记存在视为已消费。核对产品 Source、Screen/Control Context、token owner、不可变 adopted locator/digest、完整 Fact Cell/Fact/proof/resource closure、Inspector Census、条件/variation/property 集、设计系统 effective-value/conflict lineage 以及 editable upstream owner/locator/update route;`exact-target` 每个条件必须具备整目标 layout 与 pixel Facts,否则应保持 partial `constraint` 或阻断。按 Design Source Projection 只把长期稳定且无冲突的事实写入其唯一 owner,精确值仍留在 canonical resource,不要求统一 pack、目录或工具格式。
46
- - 缺失、不可读、过期或冲突的 adopted resource 对受影响 claim 一律 fail closed。若 immutable adopted target 可读而 editable upstream 不可用,可以继续理解/实现既有目标,但修改资源必须保留为明确人工/外部边界。更新经 upstream 完成后生成/批准新 immutable version 并更新 owning reference,不能静默覆盖旧基线。
47
- - 设计资源生成本身不改 `project_context/**`、`DESIGN.md` production code;定稿后只可一次性回改初始方案。设计系统采纳则由显式 `design-system-authoring` 完成。下游实现与验证仍由当前 Workflow Contract `long-task-workflow` 负责。
48
-
49
- ## 工作方式
50
-
51
- 1. 先读取 `project_context/global.md` 和 `project_context/context.toml`,按 default area、triggers、read_when 选择相关 context。
52
- 2. 如果项目存在 `DESIGN.md`,先读取其 Design Authority 状态、唯一 token 源/生成方向和由它 canonical owning 的项目/系统/component-family targets;screen-specific target 则跟随 pointer 读取 owning Screen Contract。仅当当前开发工作流经 UI Authority Closure 判断长期视觉体系需要采纳或修复时,按 Google `@google/design.md` 的格式创建或更新根目录 `DESIGN.md`;独立资源生成阶段不写入。
53
- 3. 读取已有外部设计资源或其他 selected Source。若有 implementation handoff,先运行共享 preflight,再主动打开 handoff 索引的 exact/constraint 资源和 canonical Fact manifest;不能用索引、Inspector `complete`、provider 成功或 hash 替代资源消费。按稳定 subject/target/condition/variation/property/Fact/Source-item key 应用 Design Source Projection,并为每个 adopted target 确认 exactly-one canonical owner。若当前请求只是生成资源,转到 `design-resource-authoring`;不要在本 Skill 内复制 provider 生成流程或另建交付格式。
54
- 4. 涉及 Product Surface(Web 页面、移动/桌面屏幕、游戏 UI/HUD/菜单、CLI/TUI 输出、扩展或设备界面)、前端布局、UI/UX、产品模块边界或信息放置时,把产品/页面定位检查作为前置动作:用户在这个 surface 要完成的判断、产品必须提供的信息/动作/反馈、不应常驻的信息、主层/下钻/运维/诊断/详情归属、布局和信息密度是否匹配任务。多 surface、多平台或多模块归属不清时,先读取相关 Context、搜索入口并结合已有 UI 代码/截图做信息架构 sweep,必要时使用 `context_surface_contract` 做 Surface Contract Check,再收窄到具体视觉或交互实现。该检查是下一步变更分类的输入;只有形成长期 surface 职责、信息架构、交互契约或模块边界结论时才更新 Context 或 `DESIGN.md`。
55
- - 若存在 Product Surface Contract,读取并对齐 primary user question、main allows/forbids、drilldown ownership、long-task state 和 verification。
56
- - 若缺失且本任务改变 durable surface responsibility,将唯一 `Context Delta` 设为 `required`,把界面职责写入 `project_context/**`;视觉 token、颜色、字体、间距、圆角和视觉 rationale 仍写入 `DESIGN.md`。
57
- 5. 涉及输入、选择、搜索、筛选、表单/配置、调度/时间窗口、预算/配额/限流或加载/空态/错误态等 UI 控件时,用“控件交互框架”检查控件语义、反馈状态、校验、错误预防、可供性和信息密度;这只是通用判断框架,不是固定控件处方。
58
- 6. 界面职责、流程归属和长期交互契约以 `project_context/**` 为准;`DESIGN.md` 负责视觉 token、视觉 rationale、唯一 authored token source/generation direction 和设计引用解释;versioned authored targets 保留在项目原生路径,代码与生成截图只说明当前实现状态。Context 决定“应该是什么”,代码和实现截图揭示“现在是什么”,代码不能静默重定义 Context。
59
- 7. 设计判断或第一处实现编辑前,执行 UI Authority Closure,并给出唯一长期事实判断 `Context Delta: none|required`。对 affected stable surface/control/target keys,在 agent 内部逐项判断 durable surface / IA / interaction / verification constraint 已被 Context / `DESIGN.md` 覆盖、需要先更新、仅属 task-local、显式 out-of-scope 或需要真实用户决策;不要创建 `plan.md`、Task Contract 文件或 Markdown 映射表。冲突的 controlling owners 必须修正 Source/Context/target 或保留 decision required,不能让当前实现或 YAML 静默决定。
60
- 8. 普通 UI bug、局部样式或 CSS 修复、测试修复或探索性 spike 不更新 Context,可先改代码;一旦形成长期交互或视觉结论,继续对齐或交付前必须回写 Context 或 `DESIGN.md`。不要把 Context 机械补成代码改动摘要。
61
- 9. 如果二者冲突,显式标记为实现漂移、缺失工作或 Context 过期。
62
- 10. 如果涉及已有 UI,优先结合代码入口、运行截图或用户提供的参考图来描述差异。
63
- 11. 当任务涉及设计稿、重做设计、视觉方案、设计系统、visual polish、frontend redesign 或 frontend styling,且存在可扫描的 UI 代码、页面文件、构建产物目录或本地/远程 URL 时,默认运行 `npx impeccable detect <target>`;实现前可用于识别既有视觉问题,实现后或交付前用于审查结果。没有可扫描目标、命令不可用或扫描失败时,说明原因并继续。
64
- 12. 需要长期沉淀时:
65
- - 项目级体验原则和屏幕清单写入 `global.md`。
66
- - 模块级 screen contract、state、interaction 和视觉约束写入对应 area / subdomain Context。
67
- - 颜色、字体、间距、圆角、组件视觉 token 和视觉 rationale 写入 `DESIGN.md`。
68
- - 新 UI context unit 可新增 `project_context/areas/<unit>.md`,并更新 `global.md#Context Index`;复杂项目同时更新 `project_context/context.toml`。
69
- - 如果 `upgrade` 自动把深层 `.md` 注册成 area,但语义上更像 foundation / contract / archive,后续应显式调整 manifest role;不要依赖自动迁移判断语义。
70
- 13. Context 只能声明设计验收入口或 smoke 入口,不能伪造“已验证通过”。
71
- 14. Verification / Deployment Role Context 只记录长期可复用的设计验证、smoke、部署或运行初始化路径事实:特殊准备、最短命令或路径、预期阶段 / 信号、可接受 warning、已排除的重复探索点。不要记录一次性测试日志、完整输出、临时 JSON、CI artifact、测试报告、release ledger、secret、token、cookie、device id、raw payload 或完整截图报告。
72
- 15. 收尾时做 `Contract Conformance` 和 Context drift check,只报告轻量状态:`Context: 已更新 ...` 或 `Context: 本次无长期事实变化`。Conformance 说明本次契约满足情况、未满足或延期项和截图 / 手动检查入口;一次性证据、截图结果、测试日志、任务契约和实现摘要不写入 Context。
73
-
74
- ## 内部执行约束与 Conformance
75
-
76
- - `Context Delta` 只能是 `none` 或 `required`。`required` 先更新 owning Context 或 `DESIGN.md`;`none` 按现有事实工作,不制造 Context 噪音。
77
- - Agent 内部计划应保持页面 / 组件任务、用户判断、主辅信息归属、动作层级、输入语义、loading / empty / no-results / stale / error / degraded / success 状态、布局稳定性、非目标与验收入口清晰。
78
- - 触及 Product Surface 时,同时保持 surface platform、primary user question、main allows/forbids、drilldown ownership、long-task state requirement 和 verification 清晰;字段、枚举、JSON 和截图仅是实现证据。
79
- - 当 Product Surface 粒度不足以支持 material screen 时,使用 `screen-contract.md` 的按需结构保持 entry/exit/shared state、information hierarchy、regions、fixed/scroll/overlay ownership、navigation/variants 和 material controls 清晰;局部样式修复不补建 Screen Contract。
80
- - 外部来源的重要约束在内部分类为 Context / `DESIGN.md` 已覆盖、已更新、task-local、显式 out-of-scope 或需要用户决策;存在未处理项时不能声称全量完成。
81
- - 默认流程不要求或验证固定 `plan.md`、Task Contract 文件、Source-to-Context 表、Context-to-Implementation 表、matrix、verdict 或 evidence ledger;可选 scratch 没有固定名称或权威。
82
- - `Contract Conformance` 直接检查 controlling Context / `DESIGN.md` 是否到达正确 surface、状态、交互与验证路径并避开 forbidden shortcut。实现偏差修实现;缺少长期事实则返回 `Context Delta: required`,先更新长期事实再对齐。
83
- - small code task、普通 UI bug、局部 CSS 修复、小重构、测试修复或探索性 spike 不创建额外流程 artifact。
84
-
85
- ## 信息呈现校准
86
-
87
- - 页面设计先回答:产品/页面定位是什么、要解决什么问题、用户需要什么、页面需要提供什么内容/能力/反馈;再决定元素放什么、放哪里、为什么。这是页面变更前置判断,不是实现后的视觉润色。常驻元素应证明它比位置、图标、状态、数据或交互提示更能省注意力。
88
- - 追求有效信息密度,而不是塞满页面。判断标准是更少无效 chrome、更少解释、更靠近真实内容和可执行动作;警惕用大标题、大容器、空卡片、假摘要或装饰区块制造仪式感。
89
- - 对返回、刷新、同步、关闭、搜索、展开/收起等熟悉动作,比较 icon-only、紧凑控件、文字按钮和图标+文字哪种最省注意力;如果使用 icon-only,必须保留 `aria-label`、`title`、tooltip 或 hover/focus 说明。动作不熟悉、风险高或需要区分多个相近命令时,文字通常更合适。
90
- - 常驻文字要克制。用户已经知道且不帮助行动的页面标题、面包屑、说明句或分区名,先判断是否可以删除,而不是先润色;必要解释可进入 tooltip、hover/focus 展开层、空态、详情页、帮助或 Context。
91
- - 空间应由内容价值支撑。内容少时布局可以收缩到内容附近;警惕保留一整行只有几个字的 header、空指标槽、空列表容器或没有真实数据支撑的摘要。
92
- - 信息架构按归属放置:真正跨页面的动作可放系统级 chrome,模块动作放模块内部,运维/连接/缓存/后台任务状态只在影响用户判断或行动时进入主工作面,低频系统解释放详情、日志、调试视图或文档。
93
- - 空态、加载态和错误态必须真实。不要用 fixture、看似真实的 fallback 行或“这里不展示示例数据”这类元说明遮住没有数据;筛选无结果、系统无数据和连接失败要视觉上可区分。
94
- - 页面稳定性是 UX 合同。滚动条出现、列表加载、tab 切换、虚拟列表高度变化、面板展开收起都不应导致布局跳动;需要时预留 `scrollbar-gutter`、稳定容器尺寸、固定关键控件尺寸和可预测的 loading skeleton。
95
- - 文案服务任务,不解释设计。主界面避免内部黑话、实现边界说明、生产/示例数据规则和后端来源说明;必要技术细节放到详情、日志、调试视图或运维区域。
96
-
97
- ## 控件交互框架
98
-
99
- - 当界面涉及输入、选择、搜索、筛选、表单/配置、调度/时间窗口、预算/配额/限流或状态反馈时,先判断控件承载的交互语义,而不是直接沿用后端字段形态。
100
- - 判断输入数据是自由文本、枚举、实体选择、时间/区间、数量/预算还是规则配置;不同语义需要不同的可供性、约束、校验和错误恢复。
101
- - 明确用户完成动作前后需要的反馈状态:loading、empty、no results、error、disabled、saving、success 和 validation feedback 应该支持用户判断下一步。
102
- - 检查控件是否给足单位、范围、默认值、示例、推荐值、风险/成本/影响提示;解释应靠近决策点,低频细节可以进 tooltip、详情或帮助。
103
- - 检查可见标签、helper text、错误文案和状态文案是否是用户语言,而不是内部字段、接口名或枚举名。
104
- - 自由输入不是禁用项,但要和错误成本匹配:当格式固定、错误代价高或反馈复杂时,应考虑更明确的约束、选择机制或校验反馈。
105
- - 不把本框架读成固定控件清单:搜索是否自动触发、时间是否用 picker、预算是否用 stepper,都应由数据规模、API 成本、用户任务、错误成本和项目组件体系决定。
106
-
107
- ## 视觉质量校准
108
-
109
- - 先判断界面 register:品牌页、营销页、作品集等让设计承载表达;产品工具、后台、dashboard、表单等让设计服务任务。品牌界面可以更强烈地使用图像、色彩和编排;产品界面优先可扫读、稳定组件、熟悉交互和任务效率。
110
- - 已有 UI 优先保持身份连续性:先找现有 token、组件库、全局 CSS、Tailwind config、截图或代表性页面;除非用户明确要求重设计,不要推翻已建立的字体、颜色、组件语言。
111
- - 绿色地设计视觉体系时,先说明场景和色彩策略,再选 token:谁在什么环境下使用、界面应该 restrained / committed / full palette / drenched 到什么程度。不要按品类套默认审美。
112
- - 做设计方案或视觉规范时,显式检查:文字对比度、65-75ch 正文行长、清晰字号层级、响应式边界、44px 触控目标、焦点态、hover/active/disabled/loading/error/success 状态、空态/错误态/长文本、reduced motion 和文本不溢出。
113
- - 避免常见 AI 视觉反模式:嵌套卡片、无意义玻璃拟态、紫蓝渐变或渐变文字、灰字压在彩色背景上、默认米色/奶油色大背景、过度圆角、边框加大模糊阴影的幽灵卡片、每段一个圆角 icon tile、每节重复小号全大写 eyebrow 或 `01 / 02 / 03` 标记、bounce/elastic easing、空泛营销 buzzword。
114
- - 视觉审查时先分清问题类型:a11y / responsive / theming / interaction / copy / performance / anti-pattern。把真正影响用户理解、操作或品牌信任的问题列为高优先级;少量纯审美偏好不要淹没关键问题。
115
- - Harness 默认携带 Impeccable CLI 能力;做设计稿、重做设计、视觉设计方案、设计系统方案、frontend redesign、visual polish 或既有 UI 视觉审查时,默认尝试运行 `npx impeccable detect <target>` 作为辅助证据,不必等待用户点名。其输出只能作为设计缺陷线索,不是 Harness gate,也不能替代人工截图检查、项目测试或 `validate-context`。
116
-
117
- ## Design Authority Readiness / 设计权威就绪
118
-
119
- Use this check before material production UI: a new or redesigned screen, primary layout/navigation/theme/component system, high-fidelity implementation or substantial visual polish. Routine implementation with sufficient authority, local style fixes and explicit throwaway prototypes stay on the lightweight path.
120
-
121
- Configured is system-level visual authority only, not surface implementation-ready status. `DESIGN.md` 被识别为 configured 只说明项目级视觉系统不是 starter,不表示任一页面已可高保真实现。affected surface 还必须拥有充分的 Screen/Control meaning、覆盖该 claim 的 selected target/constraints、唯一 token source 和项目可执行的验证路径;任何缺失都按 UI Authority Closure 路由,而不是伪造一个全局 readiness 状态。
122
-
123
- - Read the owning surface/interaction Context, `DESIGN.md`, the authored exact-value token source and generation direction, existing production components/routes and every affected selected exact/constraint resource through its immutable locator; also resolve its editable upstream/update route before authoring a resource change.
124
- - Classify each reference as `exact-target`, `constraint` or `inspiration`. Record the affected surface/route/component, project path or URI and relevant viewport/theme/mode/state. Exact targets authorize fidelity comparison only for those conditions; constraints authorize only their named rule; inspiration proves no reproduction claim.
125
- - Treat a missing `DESIGN.md`, its package starter with Design authority status: `unconfigured`, style-only prose, an inspiration-only set or conflicting references as insufficient authority for invented production layout.
126
- - If the user explicitly asks to initialize/generate/select/adopt the project design system, use the explicit-only `design-system-authoring`; never infer it from a missing starter. If the user explicitly delegates standalone resource generation, use `design-resource-authoring`. Style-bearing resources must stop on unconfigured authority and bind the adopted Open Design system; low-fidelity/IA/semantics-only resources remain lightweight. After final selection, resource authoring may reconcile accepted decisions into the initial proposal once, but this downstream Skill adopts durable target meaning only after UI Authority Closure.
127
- - Never use the implementation's own generated screenshot or diff as the target it claims to match. A target is selected Source; an implementation render is evidence. Baseline replacement requires deliberate review and cannot merely erase a failure.
128
- - Keep resource integrity and implementation conformance separate: a valid file hash, provider extraction/export, registry entry or resource count proves only acquisition/integrity, not that the production route/component renders or behaves like the selected target under the declared conditions.
129
- - Do not require Figma, a fixed `docs/design/**` tree, an image for every local change or a universal numeric pixel tolerance. For a selected `exact-target`, however, require project-owned condition-specific full-target layout and pixel comparison; if the resource or oracle cannot support that claim, classify it as a constraint or blocking gap. Use project-native design assets and the smallest authority sufficient for the claimed fidelity.
130
-
131
- ## Visual Delivery Coverage / 视觉交付覆盖
132
-
133
- For material design-system, redesign, high-fidelity implementation or visual-polish work, keep a task-local **Visual Coverage Set** before implementation and verification. When external design Source declares coverage, reconcile it with current delivery scope rather than creating competing authority. The downstream working set remains internal planning, not a required file, matrix, Context role, workflow artifact or completion authority.
134
-
135
- - Start from the complete set of combinations that authoritative Source, selected targets/constraints and applicable Control semantics declare across production surface/route/component, viewport, theme or product mode, interaction/state, content stress and accessibility/motion conditions. Risk-proportional reasoning may prioritize execution order or add exploratory combinations beyond that authority, but must never prune a declared/applicable combination or replace it with representative/pairwise sampling unless authoritative Source explicitly narrows the scope or a project-owned proof establishes equivalence. Do not invent a Cartesian product across dimensions outside declared scope, and never claim an unchecked combination.
136
- - Cover relevant states such as default, hover, focus, active, disabled, loading, empty/no-results, error, success and long/extreme content. Use the project's declared viewport, contrast, target-size, reduced-motion and localization rules rather than inventing universal thresholds.
137
- - Keep the authority split explicit: `project_context/**` owns durable surface/interaction responsibility and `DESIGN.md` owns durable visual-system semantics and rationale. Record one authored exact-value token source and one generation direction; generated CSS/theme/export files are implementation outputs, not competing authored truth. If `DESIGN.md` is not the machine-token source, name the project-native source it governs instead of hand-maintaining the same exact values twice.
138
- - Map every claimed fidelity combination to its selected `exact-target` or named `constraint`; do not let the Visual Coverage Set turn inspiration or missing authority into an implicit target.
139
- - Inspect production components or real product routes. A detached static kit, mock, poster, marketing specimen or generated showcase may guide design review, but it cannot be the only evidence for product UI behavior or fidelity.
140
- - For each selected combination, identify the cold-start real-user entry journey. A first useful runnable production slice is a recommended real-entry feedback point when early localization is worth its cost, not a prerequisite for expanding implementation; deep links remain supplemental when users normally enter through a shell or navigation owner. Always rerun the affected cold-start journey on the final candidate.
141
- - Render and inspect the declared coverage with project-owned browser/component tests plus screenshots or manual review as appropriate. Report the combinations actually checked and any omitted or external review explicitly. A screenshot baseline may be updated only through deliberate review; replacing it merely to erase a diff is not verification.
142
-
143
- ## 输出边界
144
-
145
- - 不默认创建 `.work_products/**`、UI/UX 独立文档、handoff matrix、review/test/release 文档。
146
- - 不要求 lifecycle phase、plan task、phase gate 或阶段 Skill。
147
- - 如果用户明确要求初始化/生成/选择/采纳项目设计系统,使用仅显式调用的 `design-system-authoring`;如果明确要求独立设计稿、mock、线框图、原型或 implementation resource/handoff,使用 `design-resource-authoring`。本 Skill 只在后续开发流程中采纳其他长期事实。
148
- - `DESIGN.md` 是视觉设计系统事实源;项目流程、模块契约和下一步动作仍以 `project_context/**` 为准。
149
- - 如果普通页面实现已经有充分 Design Authority,或用户只要求修复 UI bug、局部改 CSS、换颜色、明确的 throwaway prototype,或只是泛泛提到“设计 / design / user experience”,不需要触发本 Skill;durable 视觉体系/Context 采纳,或 material production UI 缺失/冲突的 Design Authority 才使用。明确要求设计资源产物但尚未进入采纳/实现流程时使用 `design-resource-authoring`。
150
-
151
- ## DESIGN.md 使用规则
152
-
153
- - 使用 Google `@google/design.md` 格式:YAML front matter 存 tokens,Markdown body 存设计理由。
154
- - 优先包含 `name`、`colors`、`typography`、`spacing`、`rounded` 和必要 `components` token。
155
- - 在 `Overview` 内维护 Design Authority 状态、唯一 authored token source/generation direction,以及仅由 `DESIGN.md` canonical owning 的项目/系统/component-family target records。每条 canonical record 记录 stable id、interpretation、selection basis、immutable path/URI + digest、condition coverage 和 editable upstream/update route。screen-specific target 只记录 stable id + owning Screen Contract anchor,不在两处重复完整 metadata。不要添加 Google schema 不支持的 front-matter keys。
156
- - Markdown section 顺序优先为:`Overview`、`Colors`、`Typography`、`Layout`、`Elevation & Depth`、`Shapes`、`Components`、`Do's and Don'ts`。
157
- - 写入或修改后,如本地可用,运行 `npx @google/design.md lint DESIGN.md` 检查结构;不要把 lint 结果写成“已通过”除非本轮真实执行。
158
- - 需要给工程消费 token 时,可用 `npx @google/design.md export --format css-tailwind DESIGN.md` 或 `json-tailwind` 生成临时输出。
159
-
160
- ## 建议沉淀位置
161
-
162
- - `global.md#UX / Screen Brief`:全局体验原则、主要屏幕、跨模块流程。
163
- - `areas/*.md#User / System Contract`:页面、组件、状态、交互和数据展示契约。
164
- - `areas/*.md#Key Constraints`:responsive、a11y、品牌/视觉边界、加载/空态/错误态约束。
165
- - role=`contract` Context:跨页面 / 跨域界面契约及其 durable rationale。
166
- - role=`decision-rationale` Context:更大或跨切面的稳定交互、信息架构或 surface ownership 取舍原因。
167
- - `areas/*/verification.md` 或 role=`verification` Context:UI smoke、截图验收、可访问性检查或项目自己的关键验证重复执行路径。
168
- - `areas/*/deployment.md` 或 role=`deployment` Context:前端部署、预览环境、运行拓扑或健康检查重复执行路径。
169
- - `project_context/context.toml`:复杂项目的产品域 area/context_unit、role、触发词、按需读取策略和可选边界规则。
170
- - `DESIGN.md`:视觉 identity、design tokens、组件视觉规则、do/don't、视觉 rationale、唯一 token source/generation direction,以及项目/系统/component-family target 的 canonical adoption records;screen-specific target 只保留 owner/anchor pointer。
171
-
172
- 不要编造 rationale;仅由当前代码或截图形态反推的理由、实现摘要、PR notes、命令输出、测试通过声明、截图审查、debug 过程和 agent reasoning 不进入 Context 或 `DESIGN.md`。
1
+ ---
2
+ name: context_uiux_design
3
+ description: Use when the user explicitly asks to establish, adopt or repair durable UI/UX Design Authority, DESIGN.md, design-system governance, visual tokens/rationale, adopted target interpretation, UI Authority Closure, selected-design alignment, or durable visual standards in a Minimal Context Harness project. Do not trigger for product/surface responsibility, design-resource generation, ordinary UI implementation, local CSS/UI fixes, copy edits, or an unselected visual exploration.
4
+ ---
5
+
6
+ # Context UI/UX Design
7
+
8
+ ## Ownership
9
+
10
+ Own durable Design Authority only: root `DESIGN.md`, visual identity and exact-value token source/generation direction, visual rationale, canonical adopted-target interpretation/selection basis, adoption records, UI Authority Closure and selected-design alignment.
11
+
12
+ This Skill does not own product goals/business rules/acceptance (`context_product_plan`), information/action/feedback and main/drilldown responsibility (`context_surface_contract`), resource generation (`design-resource-authoring`), implementation, or acceptance. Route rather than duplicate those owners.
13
+
14
+ Project-specific UI/UX rules may live in `<harnessRoot>/skills/uiux_design/SKILL.md`; durable facts remain in `DESIGN.md` and owning `project_context/**`. Active Long-Task retains its one Source/Contract lifecycle and Final Gate; this Skill contributes authority closure only.
15
+
16
+ ## UI Authority Closure
17
+
18
+ 1. Read core/default and owning surface/interaction Context, root `DESIGN.md`, its authored token source/generation direction, existing production route/components and every affected selected `exact-target` or `constraint` through its immutable locator. Run `ty-context design-resource preflight <handoff.md>` before treating a formal handoff as input.
19
+ 2. Classify references as `exact-target`, `constraint` or `inspiration`. Inspiration authorizes no reproduction claim. Provider success, a hash/index or an implementation screenshot proves neither selection nor fidelity.
20
+ 3. For every affected stable surface/control/target key, classify durable meaning as Context/`DESIGN.md` covered, requiring update, task-local, out of scope or decision-required. Conflicting, missing, stale, unreadable or unselected authority fails closed for the affected claim.
21
+ 4. Confirm exactly one canonical adoption record per adopted target:
22
+ - project/system/component-family targets are fully owned by `DESIGN.md`;
23
+ - screen/interaction targets are fully owned by the owning Screen Contract, with `DESIGN.md` keeping only the stable key and owner/anchor;
24
+ - the record preserves interpretation, selection basis, immutable path/URI and digest, applicable conditions and editable upstream owner/locator/update route.
25
+ 5. Never overwrite an adopted baseline. Create a new immutable version/digest, review it deliberately and update the unique canonical record. An implementation render/diff is evidence and cannot become the target it claims to match.
26
+ 6. Decide exactly one `Context Delta: none|required`. Durable visual-system, token, rationale, adopted interpretation, owner/anchor or verification-route change is `required`; ordinary UI/CSS fixes that preserve authority are `none`.
27
+ 7. Route unresolved surface placement to `context_surface_contract`; route any request to generate/iterate a wireframe, prototype, visual candidate, state study or handoff to `design-resource-authoring`. Do not invoke resource generation implicitly.
28
+
29
+ ## Selected-design alignment
30
+
31
+ For a selected implementation handoff, consume the actual canonical resource and its dependency/Fact closure; do not stop at an index or aggregate `complete` label. Preserve exact located values and design-system lineage through stable keys rather than duplicating them into Context.
32
+
33
+ An `exact-target` claim requires condition-specific full-target layout and pixel comparison through a project-owned Oracle; a named constraint requires proof of that constraint only. Validate affected state, viewport/platform, theme/mode, content stress, accessibility/input and motion conditions declared by Source. Never replace declared combinations with representative/pairwise sampling unless Source narrows scope or a project-owned complete equivalence proof exists.
34
+
35
+ Implementation conformance runs on the real production route/component and affected cold-start journey after the final change. Detached specimens and deep links are supplemental. Report conditions not established; resource integrity/preflight is not production conformance, and screenshot baseline replacement merely to erase a failure is forbidden.
36
+
37
+ ## DESIGN.md boundary
38
+
39
+ Use Google `@google/design.md` compatible structure: supported YAML tokens plus Markdown rationale. Maintain Design Authority status, one authored exact-value token source/generation direction and the canonical records owned at project/system/component-family scope. Do not add unsupported front-matter keys or duplicate exact values already owned by a project-native token source.
40
+
41
+ If available after a change, run `npx @google/design.md lint DESIGN.md`. Exported CSS/theme files are generated implementation outputs, not competing authored truth.
42
+
43
+ Missing/unconfigured authority blocks invented style-bearing production design. Only an explicit request to initialize/generate/select/adopt the project design system routes to `design-system-authoring`; local fixes and explicit non-fidelity prototypes remain lightweight.
44
+
45
+ ## Output
46
+
47
+ Report affected authority owners/keys, selected resource classification and condition coverage, immutable/editable provenance, closure/update decisions, implementation-alignment checks, unresolved claims and `Context: updated ...` or `Context: no durable fact change`.
48
+
49
+ Do not create a UI lifecycle, resource pack, Product Surface Contract, acceptance record, fixed plan/matrix, phase or second Authority/Gate. Do not write one-time screenshots, test logs, debug notes or implementation summaries into Context/`DESIGN.md`.
@@ -1,88 +1,54 @@
1
- ---
2
- name: design-resource-authoring
3
- description: Use when the user explicitly asks to generate, author, plan, commission, or iterate design resources; use Open Design; create a scoped wireframe, prototype, visual candidate, component/control state study, implementation handoff, or the design resources needed for an explicitly named development scope from raw drafts, product/technical plans, visual briefs, screenshots, or existing design resources; or asks to “生成设计资源”, “使用 Open Design”, “生成原型图”, “生成高保真/低保真设计”, “为开发准备设计资源”, or “先看一个控件/页面效果” in a Minimal Context Harness project. Do not trigger for generic design discussion, UX audits, ordinary UI implementation without an explicit resource request, local CSS fixes, durable Design Authority adoption, initial-proposal authoring itself, or Long-Task execution.
4
- ---
5
-
6
- # Design Resource Authoring
7
-
8
- Commission the smallest sufficient set of design resources for the explicitly requested output or development scope from live Open Design capabilities. “Smallest” governs artifact count and surrounding scope, never information granularity. For a formal selected Web/App implementation handoff, first derive the complete material in-scope Expected Fact Universe from requirements, product semantics, adopted design system, target platforms and observable conditions; then require canonical resources to express it and a frozen Inspector to enumerate it. The default identity is one atomic Fact Cell—not a Product Control, page, screenshot, broad dimension row or provider summary—and exact targets additionally require condition-specific full-target layout and pixel facts. This Skill is a thin task-local planner, provider adapter, iteration guide, final proposal reconciler and handoff layer; Open Design owns generation logic and Tiny Context owns neither its prompts nor runtime.
9
-
10
- ## Hard boundaries
11
-
12
- - A raw initial proposal is a valid input. Never require, invoke, regenerate or edit a Source Plan.
13
- - During candidate iteration, keep accepted/rejected/unresolved proposal effects in a task-local delta buffer. Only after a direction is final may this Skill reconcile the initial proposal once. Never continuously rewrite it.
14
- - Proposal reconciliation changes only the initial proposal: never mutate `project_context/**`, `DESIGN.md`, a Source Plan, Delivery Contract, production code or tests as a design-resource side effect.
15
- - Never make a prototype, wireframe, high-fidelity candidate, design-system slice, provider-native file, variant count or directory layout universally mandatory.
16
- - Treat the user's explicit output/development scope as the hard ceiling. Include only the surrounding context needed to design that slice.
17
- - Never require one artifact per control. Reuse selected component sources and group repeated controls by family; commission a dedicated study only for unique or complex uncovered meaning.
18
- - Do not confuse Product Control granularity with design-fact granularity. An image, text run, icon, component part, smaller visual primitive, layout relation, geometry/style/token/content/state/behavior fact remains independently material when the selected resource expresses it.
19
- - For a formal selected Web/App handoff, do not let initially generated output define its own obligation universe. Derive that universe before commissioning from scoped subjects, target conditions, subject-local variations and the atomic property catalog. A label such as `all-states`, one default page, representative screenshots, pairwise sampling or an Inspector `complete` Boolean cannot stand in for enumerated identities.
20
- - Artifact grouping and exact-value ownership remain separate: one HTML/CSS/JS/JSON/SVG source set may carry thousands of atomic facts. Exact values stay in that canonical source; the manifest, residual handoff and downstream Contract preserve typed locators, digests, comparison authority and Fact identities rather than copying CSS into a second value owner.
21
- - Never infer that a page frame or prototype covers states, responsiveness, accessibility or interaction it does not explicitly specify or demonstrate.
22
- - Exploration and unselected previews stay schema-free. Only a final selected implementation handoff requires the shared strict Markdown adapter; this is input preparation, not a resource pack or acceptance result.
23
- - Design resources may express user-visible interaction and presentation, but must not invent or become sole owner of business, data, permission or algorithmic rules.
24
- - Candidates are ordinary external Source. They do not select themselves, become `exact-target`, create Design Authority or prove acceptance.
25
- - Do not install or persistently configure MCP, plugins, authentication or disclosure paths without separate authorization.
26
- - Do not create a resource pack, provider registry, workflow state, Contract artifact, acceptance record or parallel authority lifecycle.
27
-
28
- ## Read the references
29
-
30
- 1. Always read [resource-selection.md](references/resource-selection.md) before deciding what to generate or whether the request is style-bearing.
31
- 2. Read [open-design-provider.md](references/open-design-provider.md) before capability discovery, Design Authority gating, provider execution, implementation-source acquisition or recovery.
32
- 3. Read [downstream-handoff.md](references/downstream-handoff.md) before final selection, initial-proposal reconciliation, handoff or downstream use. A simple unselected non-fidelity preview may stop before this reference.
33
-
34
- ## Core workflow
35
-
36
- 1. **Fix the scope ceiling.** Name in-scope surfaces, flows, regions, component families, unique controls, conditions, necessary context, exclusions and whether the intent is exploration, handoff or selected-source preparation.
37
- 2. **Inventory inputs.** Accept initial proposals, notes, product/technical plans, visual briefs, screenshots, references and existing resources. Preserve each role as exact target, constraint, inspiration, current-implementation evidence or background; report unreadable/unused material.
38
- 3. **Classify visual-style dependency.** Mark the commission `style-bearing` when it materially expresses visual fidelity, brand, typography/color/density, component visual treatment or a production-style prototype. Mark it `non-fidelity` for IA/flow topology, low-fidelity structure, semantics-only behavior/state studies or an explicitly non-fidelity prototype. Mixed work is style-bearing unless split into an independent non-fidelity commission.
39
- 4. **Apply the conditional Design Authority gate.** For style-bearing work, read `DESIGN.md` and its token source. If authority is unconfigured, stop before project/run creation and tell the user to explicitly invoke `$design-system-authoring`; do not invoke it automatically. A combined explicit request authorizes running that Skill first and then resuming this one. Non-fidelity work remains allowed.
40
- 5. **Derive the authoring obligation universe before generation.** For a formal selected Web/App handoff, start from requested Surfaces/flows, product semantics, adopted design-system snapshot and target platforms—not from whatever a first render happens to contain. Enumerate stable subjects and hierarchy for every Surface, region, overlay/system UI, component family and instance, Control, Anatomy Part/slot, primitive, text, icon, media, asset and typed multi-subject relation. Explicitly disposition every standard condition axis—platform/OS/device/form factor, exact viewport, orientation, density, Safe Area, window/fold/display/color modes, locale/language/script/direction/pseudo-localization, content/data stress, text scale, input/assistive technology, motion/transparency/contrast/bold text/button shapes, system UI/IME, permission/capability/connectivity/lifecycle—plus scoped custom axes. For each subject enumerate `variant × state × interaction_phase × presence_phase × instance_case`, including compound precedence, conditional/lazy/virtualized/portal population and exact exclusions. Apply the standard atomic property catalog across geometry, layout/scroll, typography/color/decoration/content/icon/media, interaction/navigation/motion/feedback, responsive, accessibility, assets/system and relations; add inspector-declared custom properties without weakening the standard set. The Expected Fact Universe is the exact applicable `subject × target × condition × variation × property` cell set. Every cell is covered or has an exact source/basis-backed `not_applicable`/`excluded_by_scope`; `decision_required`/`unavailable` remains blocking. Continuous widths, text pressure and animation expose breakpoints/ranges/interpolation/reflow/timeline rules rather than only sampled snapshots. Never truncate, sample, summarize the remainder or let aggregate strings such as `all-states` impersonate atomic identities.
41
- 6. **Discover live capabilities.** Inspect the current Open Design agent/model, skills, templates, design systems, plugins and export paths. Treat absent/non-enumerable capabilities honestly.
42
- 7. **Choose the minimum sufficient commission.** Give each considered resource `selected`, `optional`, `not-needed`, `unavailable` or `decision-required` with one reason. Ask only when a missing preference materially changes the commission.
43
- 8. **Bind and commission through Open Design.** For style-bearing work, create or verify the Open Design project with the adopted design-system ID and require `get_project.designSystemId` to match. Send the bounded product commission and the derived obligation universe through structured MCP: require the canonical implementation source to encode every applicable atomic value/behavior and require explicit dispositions for non-applicable, excluded or unresolved cells. Use documented fallbacks only when required; if the live provider cannot emit/read a required fact family, preserve that gap as blocking rather than silently narrowing the commission.
44
- 9. **Acquire complete canonical source and its independent Fact manifest.** For Web/App implementation handoff, require Open Design to emit a canonical machine-readable entry, the full locally resolvable dependency set and one `design-resource-observable-fact-manifest-v1` inside that closure—not only a screenshot, preview or prose spec. The manifest freezes the design-system snapshot; exact Inspector identity/version/digest or named external TCB, capabilities, input paths/digests, complete enumeration and dynamic-discovery policy; addressable resource/node/declaration/token/asset/relation/variant/state/interaction/dynamic-population Census; all condition and variation axes/combinations; subject hierarchy; property catalog; Fact Cells/Facts; value and design-system lineage; evidence; Fact × required-method proof obligations; comparator/tolerance/mask, Oracle and render-environment authority; asset bindings; blockers; and non-sampling/non-truncating collection counts/digests. Enumerate and retrieve every selected file without truncation, preserve exact bytes/digests, record one `implementation_web` or `implementation_app` source profile with `acquisition: complete`, and make all local source, token, SVG, font, image, media, worker and asset dependencies resolve inside that frozen set. Non-Web resources use the bounded `reference` profile and are not forced into HTML.
45
- 10. **Inspect, compare and iterate to exact closure.** Run the frozen Inspector over the frozen canonical entry/dependencies. Require every Census item to map to Facts/Fact Cells or a source/basis-backed `non_material` disposition, and require the manifest Fact universe to equal the precommission Expected Fact Universe. Exercise every required verification method with its method-compatible evidence, comparator, Oracle and environment; preserve design-system token/override/conflict lineage and exact asset consumers. Iterate the provider until `Expected Fact Universe = Canonical Resource Facts = Handoff Indexed Facts` can hold. Keep provider execution, artifact readiness and design suitability separate, and keep proposal effects only in the delta buffer while candidates remain unsettled.
46
- 11. **Finalize selection and reconcile once.** After explicit human selection or explicit delegated selection, preserve immutable identity and consolidate accepted, rejected and unresolved effects. Apply only accepted decisions once to a writable initial-proposal file; if it exists only in conversation, return one complete revised proposal. Preserve original intent/provenance and make reruns idempotent. Do not write unresolved or rejected choices as requirements.
47
- 12. **Compile the residual implementation handoff when requested.** Keep each canonical per-target `design-resource-observable-fact-manifest-v1` as the sole complete index for Inspector inputs/Census, axes and exclusions, conditions, subjects and variations, properties and lineage, Fact Cells/Facts, evidence/proofs, Oracles/environments, assets and blockers. Do not copy those collections into handoff YAML. For each target, author one small project-native Markdown draft with readable, target-attributed `ty-source-item` facts and exactly one fenced `design-resource-handoff-v1` block whose `representation` is `manifest_backed`. The block contains only residual scope/provenance, resource identities, that one target/profile, resource-fact closure, coverage and proposal binding. Shared meaning is atomized into uniquely keyed target-attributed Source facts without dropping its original predicate or provenance. Freeze the explicit canonical manifest path set and choose an actual UTF-8 byte ceiling before draft generation. Ensure the authorized output parent already exists, then call `ty-context design-resource bundle <draft-dir> <new-output-dir> --manifest <facts.json> [...] --max-handoff-bytes <bytes>`. The command rejects embedded/full-array drafts, multi-target drafts, over-budget descriptors, missing/extra/duplicate targets, manifest path/SHA drift, invalid collection count/identity digests, any normalized preflight failure and any existing final directory; it processes one target at a time in a same-volume temporary directory and publishes the complete target set with one atomic directory rename. Validation is an invariant check on the already compact representation, never a post-hoc splitting pass. On failure only the command-owned temporary directory is removed; drafts and existing/adopted handoffs remain unchanged. Do not author the older embedded V1 representation; it remains readable only for compatibility. Preflight hydrates the omitted collections directly from the declared canonical manifest snapshot and runs the same full semantic validator, so `Expected Fact Universe = Canonical Resource Facts = Handoff Indexed Facts` remains exact without duplicate YAML. File/model/parser/memory pressure never permits pruning, sampling, truncation, coarser Facts, implicit defaults or broader exclusions. If the truthful residual descriptor cannot meet the declared byte ceiling, treat the ceiling as incompatible and fail closed; never split a semantic target. Do not create these files for exploration.
48
- 13. **Return an intent-sized result.** Exploration shows the artifact promptly. An implementation handoff returns the atomically published handoff directory and every target/path mapping, selected immutable resources, stable-key coverage, manifest path/SHA plus collection count/identity-digest conservation, provenance, binding, limitations and successful bundle/preflight result. Include the reconciled initial proposal or its updated path when final selection occurred.
49
-
50
- ## Conditional Design Authority gate
51
-
52
- Unconfigured means `DESIGN.md` is missing, explicitly says `Design authority status: unconfigured`, remains a starter, contains only style prose/inspiration, or lacks one authored exact-value token source/generation direction. This gate applies only to style-bearing resource authoring; it is not a general project-init gate and configured system-level authority does not by itself prove surface-level implementation readiness.
53
-
54
- The stop message must state:
55
-
56
- ```text
57
- Style-bearing design resources require an adopted project design system. Explicitly invoke $design-system-authoring to generate/select/adopt one, then resume $design-resource-authoring. I will not initialize it automatically.
58
- ```
59
-
60
- ## Initial-proposal reconciliation
61
-
62
- The normal design-first loop is:
63
-
64
- ```text
65
- initial proposal
66
- -> bounded Open Design candidates
67
- -> feedback and iteration with a task-local delta buffer
68
- -> explicit or delegated final selection
69
- -> one consolidated, idempotent initial-proposal reconciliation
70
- -> revised proposal + selected immutable resources
71
- + canonical source-rich resource set
72
- -> validated residual design-resource-handoff-v1 (implementation intent only)
73
- -> default Goal execution or long-task-workflow
74
- ```
75
-
76
- Small requests may complete generation, selection and reconciliation in one turn; the invariant is one final semantic writeback, not an artificial pause. Reconciliation may clarify product information, controls/states, interaction and visual constraints supported by the selected resource. It preserves original requirements and records selected resource keys/locators/digests without turning provider output into product authority. If selection never occurs, return candidates and the buffered delta only; do not rewrite.
77
-
78
- ## Stop and route elsewhere
79
-
80
- - Route explicit design-system initialization/adoption to `design-system-authoring`.
81
- - Route broader durable UI/UX authority repair during development to `context_uiux_design`.
82
- - Route ordinary implementation with sufficient authority to the default Workflow Contract and current native Goal.
83
- - Route a complete explicit Single-Goal delivery, using the revised proposal plus selected resources, to `long-task-workflow`.
84
- - If no new resource is justified, say so instead of generating filler.
85
-
86
- ## Completion response
87
-
88
- Report scope, necessary context/exclusions, style dependency and gate result; selected/omitted/unavailable resources; visible artifacts/typed locators; provider, project/run and design-system binding status; review and selection basis; immutable provenance; implementation source profile, entry/dependency closure and acquisition completeness when applicable; material applicability/coverage and unresolved decisions; proposal reconciliation status/path; and forbidden inferences. For implementation intent, report the published directory, every target-to-handoff mapping, canonical manifest path/SHA and collection count/identity-digest conservation, and successful bundle/preflight result; never call a failing, unresolved or incomplete target set ready.
1
+ ---
2
+ name: design-resource-authoring
3
+ description: Use when the user explicitly asks to generate, author, commission, iterate or recover design resources; use Open Design; create a scoped wireframe, prototype, visual candidate, component/control state study or implementation handoff; or asks to 生成设计资源, 使用 Open Design, 生成原型图, 生成高保真/低保真设计, 为开发准备设计资源, 恢复设计资源任务, or 先看一个控件/页面效果 in a Minimal Context Harness project. Do not trigger for generic design discussion, UX audits, ordinary UI implementation, local CSS fixes, durable Design Authority adoption, initial product-proposal authoring or Long-Task execution.
4
+ ---
5
+
6
+ # Design Resource Authoring
7
+
8
+ Commission the smallest sufficient resource set for the user's explicit output/development scope. “Smallest” limits artifact count and surrounding scope, never material information granularity. Open Design or another selected provider owns generation; this Skill owns task-local scoping, provider adaptation, iteration, selection reconciliation and handoff preparation—not provider prompts/runtime, Design Authority, product meaning or acceptance.
9
+
10
+ ## Hard boundaries
11
+
12
+ - A raw proposal, plan, brief, screenshot or existing resource is valid input. Never require or create a special intermediary planning format, and never rewrite caller-owned Source except for the one explicitly selected proposal reconciliation.
13
+ - The explicit output/development scope is a hard ceiling. Necessary surrounding context may orient the slice but cannot expand it.
14
+ - Candidates are ordinary external Source. They do not select themselves, become `exact-target`, update `DESIGN.md`/Context or prove implementation acceptance.
15
+ - Keep candidate effects in a task-local buffer. Only after explicit selection or explicitly delegated selection may accepted decisions be reconciled once and idempotently into the initial proposal; never write rejected/unresolved meaning as accepted.
16
+ - Never mutate `project_context/**`, `DESIGN.md`, a Delivery Contract, production code or tests as a resource-authoring side effect.
17
+ - Do not require a prototype, fidelity pair, provider-native file, fixed directory, variant count, resource pack or one artifact per control. Reuse selected component families and group repeated controls.
18
+ - Visual resources may express user-visible interaction/presentation but cannot invent or become sole owner of business, data, permission or algorithmic rules.
19
+ - Do not install/configure MCP, plugins, authentication or disclosure paths without separate authorization. Create no provider registry, global workflow state, authority lifecycle, scheduler or acceptance record.
20
+
21
+ ## Progressive references
22
+
23
+ 1. Always read [resource-selection.md](references/resource-selection.md) to fix the scope ceiling, intent, input roles, style dependency and minimum commission.
24
+ 2. Read [open-design-provider.md](references/open-design-provider.md) only before live capability discovery, provider execution, Design Authority binding, source acquisition or recovery.
25
+ 3. Read [downstream-handoff.md](references/downstream-handoff.md) only when selection, proposal reconciliation or downstream handoff is material. A simple unselected preview may stop without it.
26
+ 4. Read [formal-selected-web-app-handoff.md](references/formal-selected-web-app-handoff.md) completely only for an explicitly final selected Web/App implementation handoff. Exploration, unselected previews, reference-only resources and non-Web/App commissions never load this reference.
27
+
28
+ For simple-preview overhead accounting, the requested preview is neither additional Provider generation nor an added tool action.
29
+
30
+ ## Workflow
31
+
32
+ 1. Name in-scope surfaces/flows/regions/component families/unique controls, conditions, necessary context, exclusions and intent: `exploration`, `handoff` or `selected-source-preparation`.
33
+ 2. Inventory every input as `exact-target`, `constraint`, `inspiration`, current-implementation evidence or background. Report unreadable/unused material.
34
+ 3. Classify the commission `style-bearing` or `non-fidelity`. Style-bearing means high fidelity/brand/visual direction/typography/color/density/component treatment/production-style prototype. IA/flow topology, low-fidelity structure and semantics-only state studies are non-fidelity.
35
+ 4. For style-bearing work, read configured Design Authority and its exact-value token source. If unconfigured, stop before provider project/run creation and route the user to explicit `$design-system-authoring`; never invoke it automatically. Non-fidelity work remains allowed.
36
+ A combined explicit request authorizes running `$design-system-authoring` first and then resuming this Skill.
37
+ 5. Discover only the live provider capabilities needed by the bounded commission. For a formal generation, major revision or critical regeneration, apply the provider reference's `highest_available_capability + highest_supported_reasoning_effort` policy and fail closed when eligible candidates cannot be authoritatively ranked; never infer rank from price, name, release date or list order, and never claim an effective model/effort the run cannot confirm. Give every considered resource one disposition—`selected`, `optional`, `not-needed`, `unavailable` or `decision-required`—with a reason. Ask only when a missing preference materially changes the result.
38
+ 6. Bind style-bearing provider work to the adopted design-system identity, send only the scoped product/resource commission and keep provider execution, model-selection verification, artifact readiness, design suitability, final selection and authority adoption distinct.
39
+ 7. Iterate within scope. Exploration returns a visible candidate after minimal sanity review. Do not burden it with handoff schema, hashes, complete Fact closure or downstream validation.
40
+ 8. After final selection, preserve immutable identity and editable-upstream provenance; reconcile accepted proposal effects once. If an implementation handoff was requested, use the applicable downstream reference—and the formal reference only for selected Web/App targets.
41
+
42
+ ## Conditional Design Authority stop
43
+
44
+ Unconfigured includes a missing `DESIGN.md`, the starter/status `unconfigured`, style-only prose/inspiration or no authored exact-value token source/generation direction. Say:
45
+
46
+ ```text
47
+ Style-bearing design resources require an adopted project design system. Explicitly invoke $design-system-authoring to generate/select/adopt one, then resume $design-resource-authoring. I will not initialize it automatically.
48
+ ```
49
+
50
+ ## Routing and output
51
+
52
+ Route durable system adoption/repair to `context_uiux_design`, surface responsibility to `context_surface_contract`, ordinary implementation to the default Workflow Contract/current Goal, and machine-assurance delivery to an explicitly selected/resumed `long-task-workflow`.
53
+
54
+ Report intent-sized results: scope/context/exclusions, style gate, input roles, resource dispositions, provider/binding status, visible artifacts/locators, selection basis, immutable/editable provenance, limitations/decision gaps and proposal-reconciliation status. A formal handoff additionally reports exactly what its dedicated reference requires. Never call a failing, unresolved, incomplete or unselected result ready.