project-tiny-context-harness 0.8.4 → 0.8.5

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 (252) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +393 -371
  3. package/assets/README.md +573 -526
  4. package/assets/README.zh-CN.md +333 -311
  5. package/assets/agents/.gitkeep +1 -1
  6. package/assets/agents/AGENTS_CORE.md +44 -25
  7. package/assets/context_templates/architecture.md +28 -28
  8. package/assets/context_templates/area.md +34 -34
  9. package/assets/context_templates/context.toml +30 -30
  10. package/assets/context_templates/deployment.md +35 -35
  11. package/assets/context_templates/global.md +57 -57
  12. package/assets/context_templates/product-surface-contract.md +70 -70
  13. package/assets/context_templates/screen-contract.md +189 -189
  14. package/assets/context_templates/verification.md +32 -32
  15. package/assets/github/.gitkeep +1 -1
  16. package/assets/github/harness.yml +39 -39
  17. package/assets/make/.gitkeep +1 -1
  18. package/assets/make/ty-context.mk +48 -48
  19. package/assets/skills/context_development_engineer/SKILL.md +148 -125
  20. package/assets/skills/context_full_project_export/SKILL.md +28 -28
  21. package/assets/skills/context_harness_upgrade/SKILL.md +60 -60
  22. package/assets/skills/context_product_plan/SKILL.md +99 -79
  23. package/assets/skills/context_surface_contract/SKILL.md +191 -191
  24. package/assets/skills/context_uiux_design/SKILL.md +171 -171
  25. package/assets/skills/design-resource-authoring/SKILL.md +86 -84
  26. package/assets/skills/design-resource-authoring/references/downstream-handoff.md +138 -123
  27. package/assets/skills/design-resource-authoring/references/open-design-provider.md +132 -127
  28. package/assets/skills/design-resource-authoring/references/resource-selection.md +181 -154
  29. package/assets/skills/design-system-authoring/SKILL.md +57 -57
  30. package/assets/skills/design-system-authoring/agents/openai.yaml +6 -6
  31. package/assets/skills/design-system-authoring/references/authority-adoption.md +48 -48
  32. package/assets/skills/design-system-authoring/references/open-design-design-system-provider.md +110 -110
  33. package/assets/skills/long-task-workflow/SKILL.md +98 -92
  34. package/assets/skills/long-task-workflow/agents/openai.yaml +3 -1
  35. package/assets/skills/long-task-workflow/references/authority-lifecycle.md +72 -72
  36. package/assets/skills/long-task-workflow/references/contract-authoring.md +122 -101
  37. package/assets/skills/long-task-workflow/references/evidence-design.md +82 -61
  38. package/assets/skills/long-task-workflow/references/source-authoring.md +109 -90
  39. package/assets/skills/source-plan-authoring/SKILL.md +14 -14
  40. package/assets/tools/validate_context.py +442 -442
  41. package/dist/commands/long-task-authoring.js +27 -2
  42. package/dist/lib/context-templates.js +1 -1
  43. package/dist/lib/design-resource-fact-enums.d.ts +20 -0
  44. package/dist/lib/design-resource-fact-enums.js +170 -0
  45. package/dist/lib/design-resource-fact-locator-extractors.d.ts +8 -0
  46. package/dist/lib/design-resource-fact-locator-extractors.js +108 -0
  47. package/dist/lib/design-resource-fact-locator-resolver.d.ts +3 -0
  48. package/dist/lib/design-resource-fact-locator-resolver.js +112 -0
  49. package/dist/lib/design-resource-fact-locator-validation.d.ts +5 -0
  50. package/dist/lib/design-resource-fact-locator-validation.js +16 -0
  51. package/dist/lib/design-resource-fact-manifest-catalog.d.ts +4 -0
  52. package/dist/lib/design-resource-fact-manifest-catalog.js +249 -0
  53. package/dist/lib/design-resource-fact-manifest-model.d.ts +91 -0
  54. package/dist/lib/design-resource-fact-manifest-model.js +21 -0
  55. package/dist/lib/design-resource-fact-manifest-shape-axes.d.ts +6 -0
  56. package/dist/lib/design-resource-fact-manifest-shape-axes.js +159 -0
  57. package/dist/lib/design-resource-fact-manifest-shape-evidence.d.ts +4 -0
  58. package/dist/lib/design-resource-fact-manifest-shape-evidence.js +59 -0
  59. package/dist/lib/design-resource-fact-manifest-shape-facts.d.ts +4 -0
  60. package/dist/lib/design-resource-fact-manifest-shape-facts.js +109 -0
  61. package/dist/lib/design-resource-fact-manifest-shape-inspector.d.ts +5 -0
  62. package/dist/lib/design-resource-fact-manifest-shape-inspector.js +144 -0
  63. package/dist/lib/design-resource-fact-manifest-shape.d.ts +7 -0
  64. package/dist/lib/design-resource-fact-manifest-shape.js +75 -0
  65. package/dist/lib/design-resource-fact-manifest-types.d.ts +3 -0
  66. package/dist/lib/design-resource-fact-manifest-types.js +3 -0
  67. package/dist/lib/design-resource-fact-manifest-universe.d.ts +5 -0
  68. package/dist/lib/design-resource-fact-manifest-universe.js +50 -0
  69. package/dist/lib/design-resource-fact-manifest-validation.d.ts +3 -0
  70. package/dist/lib/design-resource-fact-manifest-validation.js +106 -0
  71. package/dist/lib/design-resource-fact-policy.d.ts +18 -0
  72. package/dist/lib/design-resource-fact-policy.js +72 -1
  73. package/dist/lib/design-resource-fact-property-methods.d.ts +3 -0
  74. package/dist/lib/design-resource-fact-property-methods.js +158 -0
  75. package/dist/lib/design-resource-fact-shape-primitives.d.ts +3 -0
  76. package/dist/lib/design-resource-fact-shape-primitives.js +18 -0
  77. package/dist/lib/design-resource-fact-types.d.ts +164 -0
  78. package/dist/lib/design-resource-fact-types.js +1 -0
  79. package/dist/lib/design-resource-fact-universe-assets.d.ts +4 -0
  80. package/dist/lib/design-resource-fact-universe-assets.js +71 -0
  81. package/dist/lib/design-resource-fact-universe-catalog.d.ts +4 -0
  82. package/dist/lib/design-resource-fact-universe-catalog.js +151 -0
  83. package/dist/lib/design-resource-fact-universe-conditions.d.ts +2 -0
  84. package/dist/lib/design-resource-fact-universe-conditions.js +92 -0
  85. package/dist/lib/design-resource-fact-universe-facts.d.ts +4 -0
  86. package/dist/lib/design-resource-fact-universe-facts.js +108 -0
  87. package/dist/lib/design-resource-fact-universe-helpers.d.ts +30 -0
  88. package/dist/lib/design-resource-fact-universe-helpers.js +167 -0
  89. package/dist/lib/design-resource-fact-universe-inspector.d.ts +7 -0
  90. package/dist/lib/design-resource-fact-universe-inspector.js +119 -0
  91. package/dist/lib/design-resource-fact-universe-proof.d.ts +4 -0
  92. package/dist/lib/design-resource-fact-universe-proof.js +113 -0
  93. package/dist/lib/design-resource-fact-universe-subjects.d.ts +5 -0
  94. package/dist/lib/design-resource-fact-universe-subjects.js +97 -0
  95. package/dist/lib/design-resource-fact-universe-variations.d.ts +2 -0
  96. package/dist/lib/design-resource-fact-universe-variations.js +75 -0
  97. package/dist/lib/design-resource-fact-value-validation.d.ts +2 -0
  98. package/dist/lib/design-resource-fact-value-validation.js +80 -0
  99. package/dist/lib/design-resource-handoff-file-primitives.js +2 -0
  100. package/dist/lib/design-resource-handoff-file-validation.js +13 -100
  101. package/dist/lib/design-resource-handoff-policy.d.ts +1 -0
  102. package/dist/lib/design-resource-handoff-policy.js +118 -11
  103. package/dist/lib/design-resource-handoff-shape-evidence.js +46 -3
  104. package/dist/lib/design-resource-handoff-shape-primitives.d.ts +5 -0
  105. package/dist/lib/design-resource-handoff-shape-primitives.js +28 -0
  106. package/dist/lib/design-resource-handoff-shape-structure.js +143 -22
  107. package/dist/lib/design-resource-handoff-shape.js +25 -0
  108. package/dist/lib/design-resource-handoff-types.d.ts +97 -21
  109. package/dist/lib/design-resource-handoff-types.js +22 -0
  110. package/dist/lib/design-resource-handoff-validation-coverage.d.ts +1 -1
  111. package/dist/lib/design-resource-handoff-validation-coverage.js +145 -118
  112. package/dist/lib/design-resource-handoff-validation-fact-cells.d.ts +2 -0
  113. package/dist/lib/design-resource-handoff-validation-fact-cells.js +60 -0
  114. package/dist/lib/design-resource-handoff-validation-fact-records.d.ts +2 -0
  115. package/dist/lib/design-resource-handoff-validation-fact-records.js +90 -0
  116. package/dist/lib/design-resource-handoff-validation-facts.js +10 -94
  117. package/dist/lib/design-resource-handoff-validation-proofs.d.ts +2 -0
  118. package/dist/lib/design-resource-handoff-validation-proofs.js +67 -0
  119. package/dist/lib/design-resource-handoff-validation-resource-closure.d.ts +3 -0
  120. package/dist/lib/design-resource-handoff-validation-resource-closure.js +88 -0
  121. package/dist/lib/design-resource-handoff-validation-structure.js +43 -14
  122. package/dist/lib/design-resource-handoff-validation.js +32 -0
  123. package/dist/lib/design-resource-handoff-web-dependency-validation.d.ts +2 -1
  124. package/dist/lib/design-resource-handoff-web-dependency-validation.js +67 -7
  125. package/dist/lib/execution-target-capabilities.d.ts +1 -1
  126. package/dist/lib/execution-target-capabilities.js +14 -0
  127. package/dist/lib/long-task-activation-validation.js +6 -2
  128. package/dist/lib/long-task-applicability-shape.js +3 -3
  129. package/dist/lib/long-task-authoring-authority-preview.js +1 -0
  130. package/dist/lib/long-task-authority-policy.d.ts +1 -0
  131. package/dist/lib/long-task-authority-policy.js +1 -0
  132. package/dist/lib/long-task-authority.js +13 -0
  133. package/dist/lib/long-task-claim-definitions.js +13 -1
  134. package/dist/lib/long-task-claims.js +23 -1
  135. package/dist/lib/long-task-contract-types.d.ts +3 -0
  136. package/dist/lib/long-task-delivery-compiler.js +1 -0
  137. package/dist/lib/long-task-delivery-parser.js +11 -1
  138. package/dist/lib/long-task-delivery-types.d.ts +1 -0
  139. package/dist/lib/long-task-delivery-types.js +1 -0
  140. package/dist/lib/long-task-delivery-validation.js +17 -0
  141. package/dist/lib/long-task-design-resource-handoff.js +62 -38
  142. package/dist/lib/long-task-design-target-capabilities.d.ts +14 -0
  143. package/dist/lib/long-task-design-target-capabilities.js +126 -0
  144. package/dist/lib/long-task-evidence-capability-codec.d.ts +94 -0
  145. package/dist/lib/long-task-evidence-capability-codec.js +395 -22
  146. package/dist/lib/long-task-evidence-capability-policy.js +18 -0
  147. package/dist/lib/long-task-evidence-capability-runtime.js +78 -0
  148. package/dist/lib/long-task-evidence-capability-types.d.ts +114 -1
  149. package/dist/lib/long-task-outcome-parser.js +4 -0
  150. package/dist/lib/long-task-playwright-capability-records.d.ts +5 -0
  151. package/dist/lib/long-task-playwright-capability-records.js +146 -0
  152. package/dist/lib/long-task-playwright-case-evidence.d.ts +3 -2
  153. package/dist/lib/long-task-playwright-case-evidence.js +10 -79
  154. package/dist/lib/long-task-playwright-case-primitives.d.ts +28 -0
  155. package/dist/lib/long-task-playwright-case-primitives.js +143 -0
  156. package/dist/lib/long-task-playwright-evidence.d.ts +1 -1
  157. package/dist/lib/long-task-playwright-evidence.js +10 -75
  158. package/dist/lib/long-task-runner-freeze.d.ts +2 -2
  159. package/dist/lib/long-task-runner-freeze.js +15 -1
  160. package/dist/lib/long-task-runtime-types.d.ts +4 -1
  161. package/dist/lib/long-task-semantic-contract-types.d.ts +1 -1
  162. package/dist/lib/long-task-semantic-drift-migration.js +2 -2
  163. package/dist/lib/long-task-semantic-fact-binding-types.d.ts +57 -0
  164. package/dist/lib/long-task-semantic-fact-binding-types.js +1 -0
  165. package/dist/lib/long-task-semantic-fact-closure-primitives.d.ts +5 -0
  166. package/dist/lib/long-task-semantic-fact-closure-primitives.js +43 -0
  167. package/dist/lib/long-task-semantic-fact-closure.d.ts +13 -0
  168. package/dist/lib/long-task-semantic-fact-closure.js +48 -0
  169. package/dist/lib/long-task-semantic-fact-contract-closure.d.ts +4 -0
  170. package/dist/lib/long-task-semantic-fact-contract-closure.js +24 -0
  171. package/dist/lib/long-task-semantic-fact-contract-facts.d.ts +4 -0
  172. package/dist/lib/long-task-semantic-fact-contract-facts.js +30 -0
  173. package/dist/lib/long-task-semantic-fact-contract-proofs.d.ts +4 -0
  174. package/dist/lib/long-task-semantic-fact-contract-proofs.js +97 -0
  175. package/dist/lib/long-task-semantic-fact-evidence.d.ts +21 -0
  176. package/dist/lib/long-task-semantic-fact-evidence.js +165 -0
  177. package/dist/lib/long-task-semantic-fact-input-closure.d.ts +4 -0
  178. package/dist/lib/long-task-semantic-fact-input-closure.js +101 -0
  179. package/dist/lib/long-task-semantic-fact-provenance-closure.d.ts +4 -0
  180. package/dist/lib/long-task-semantic-fact-provenance-closure.js +140 -0
  181. package/dist/lib/long-task-semantic-fact-shape.d.ts +3 -0
  182. package/dist/lib/long-task-semantic-fact-shape.js +89 -0
  183. package/dist/lib/long-task-semantic-fact-value-closure.d.ts +3 -0
  184. package/dist/lib/long-task-semantic-fact-value-closure.js +110 -0
  185. package/dist/lib/long-task-shape-primitives.d.ts +2 -1
  186. package/dist/lib/long-task-shape-primitives.js +7 -0
  187. package/dist/lib/long-task-source-item-parser.js +25 -6
  188. package/dist/lib/long-task-source-target-continuity.js +4 -1
  189. package/dist/lib/long-task-source-target-index.d.ts +1 -1
  190. package/dist/lib/long-task-source-target-index.js +5 -1
  191. package/dist/lib/long-task-ui-design-policy.js +8 -4
  192. package/dist/lib/long-task-ui-surface-shape.js +83 -1
  193. package/dist/lib/long-task-ui-surface-types.d.ts +29 -0
  194. package/dist/lib/modularity.js +7 -1
  195. package/dist/lib/semantic-fact-base-types.d.ts +14 -0
  196. package/dist/lib/semantic-fact-base-types.js +1 -0
  197. package/dist/lib/semantic-fact-catalog.d.ts +8 -0
  198. package/dist/lib/semantic-fact-catalog.js +191 -0
  199. package/dist/lib/semantic-fact-condition-shape.d.ts +48 -0
  200. package/dist/lib/semantic-fact-condition-shape.js +111 -0
  201. package/dist/lib/semantic-fact-input-shape.d.ts +34 -0
  202. package/dist/lib/semantic-fact-input-shape.js +111 -0
  203. package/dist/lib/semantic-fact-inventory-types.d.ts +147 -0
  204. package/dist/lib/semantic-fact-inventory-types.js +1 -0
  205. package/dist/lib/semantic-fact-manifest-shape.d.ts +4 -0
  206. package/dist/lib/semantic-fact-manifest-shape.js +135 -0
  207. package/dist/lib/semantic-fact-manifest-types.d.ts +58 -0
  208. package/dist/lib/semantic-fact-manifest-types.js +19 -0
  209. package/dist/lib/semantic-fact-policy-authority.d.ts +8 -0
  210. package/dist/lib/semantic-fact-policy-authority.js +79 -0
  211. package/dist/lib/semantic-fact-policy-census.d.ts +2 -0
  212. package/dist/lib/semantic-fact-policy-census.js +80 -0
  213. package/dist/lib/semantic-fact-policy-condition-references.d.ts +7 -0
  214. package/dist/lib/semantic-fact-policy-condition-references.js +19 -0
  215. package/dist/lib/semantic-fact-policy-conditions.d.ts +2 -0
  216. package/dist/lib/semantic-fact-policy-conditions.js +105 -0
  217. package/dist/lib/semantic-fact-policy-facts.d.ts +3 -0
  218. package/dist/lib/semantic-fact-policy-facts.js +73 -0
  219. package/dist/lib/semantic-fact-policy-primitives.d.ts +26 -0
  220. package/dist/lib/semantic-fact-policy-primitives.js +169 -0
  221. package/dist/lib/semantic-fact-policy-proofs.d.ts +2 -0
  222. package/dist/lib/semantic-fact-policy-proofs.js +75 -0
  223. package/dist/lib/semantic-fact-policy-properties.d.ts +3 -0
  224. package/dist/lib/semantic-fact-policy-properties.js +84 -0
  225. package/dist/lib/semantic-fact-policy-units.d.ts +4 -0
  226. package/dist/lib/semantic-fact-policy-units.js +103 -0
  227. package/dist/lib/semantic-fact-policy.d.ts +17 -0
  228. package/dist/lib/semantic-fact-policy.js +41 -0
  229. package/dist/lib/semantic-fact-proof-shape.d.ts +51 -0
  230. package/dist/lib/semantic-fact-proof-shape.js +121 -0
  231. package/dist/lib/semantic-fact-proof-types.d.ts +74 -0
  232. package/dist/lib/semantic-fact-proof-types.js +1 -0
  233. package/dist/lib/semantic-fact-property-shape.d.ts +29 -0
  234. package/dist/lib/semantic-fact-property-shape.js +77 -0
  235. package/dist/lib/semantic-fact-shape-constants.d.ts +3 -0
  236. package/dist/lib/semantic-fact-shape-constants.js +38 -0
  237. package/dist/lib/semantic-fact-shape-primitives.d.ts +15 -0
  238. package/dist/lib/semantic-fact-shape-primitives.js +68 -0
  239. package/dist/lib/semantic-fact-source-parser.d.ts +9 -0
  240. package/dist/lib/semantic-fact-source-parser.js +46 -0
  241. package/dist/lib/semantic-fact-support-shape.d.ts +21 -0
  242. package/dist/lib/semantic-fact-support-shape.js +59 -0
  243. package/dist/lib/semantic-fact-types.d.ts +5 -0
  244. package/dist/lib/semantic-fact-types.js +5 -0
  245. package/dist/lib/semantic-fact-unit-shape.d.ts +34 -0
  246. package/dist/lib/semantic-fact-unit-shape.js +89 -0
  247. package/dist/lib/semantic-fact-value-shape.d.ts +12 -0
  248. package/dist/lib/semantic-fact-value-shape.js +39 -0
  249. package/dist/schemas/long-task-delivery-v2/long-task-delivery-v2.schema.json +1339 -131
  250. package/migrations/README.md +15 -15
  251. package/package.json +84 -84
  252. package/source-mappings.yaml +25 -25
@@ -1,70 +1,70 @@
1
- # Product Surface Contract
2
-
3
- ## Purpose
4
-
5
- This Context records durable responsibilities for user-facing Product Surfaces in this project or product domain.
6
-
7
- Write only project-specific facts that should guide future implementation. Do not copy generic platform rules, one-off audit notes, screenshots, test logs, implementation summaries, visual tokens or secrets into this file.
8
-
9
- ## Surfaces
10
-
11
- ### `<surface name>`
12
-
13
- - Surface:
14
- - Surface Platform:
15
- - Owning Product Domain:
16
- - Primary User Question:
17
- - Surface Type:
18
- - Main Surface Allows:
19
- - Main Surface Forbids:
20
- - Drilldown Ownership:
21
- - Long Task State Requirement:
22
- - Design Rationale:
23
- - Empty / Loading / Stale / Unavailable:
24
- - Security / Redaction:
25
- - Verification:
26
-
27
- ## Cross-Surface Rules
28
-
29
- - `<durable project-specific rule>`
30
-
31
- ## Screen Contract Routing
32
-
33
- Keep this file at cross-surface responsibility depth. When one material screen needs durable entry/exit/shared-state, information hierarchy, semantic region order, fixed/scroll/overlay ownership, navigation, variants, material controls or design-target references, create an on-demand Screen Contract from `screen-contract.md` using an existing area/subdomain role (or `contract` only for a true cross-area interface).
34
-
35
- Link by stable surface/control/target keys. Do not duplicate the Screen Contract here, copy exact visual tokens from `DESIGN.md`, or embed authored target binaries and test evidence.
36
-
37
- ## Registration Example
38
-
39
- Use the existing `contract` role for cross-surface or cross-area contracts:
40
-
41
- ```toml
42
- [[context]]
43
- path = "project_context/areas/product-surface-contracts.md"
44
- role = "contract"
45
- triggers = ["surface", "screen", "ui", "ux", "web", "app", "mobile", "desktop", "game", "cli", "tui", "页面", "界面", "屏幕", "产品接触面", "信息架构", "页面职责", "界面职责", "product surface"]
46
- read_policy = "on-demand"
47
- ```
48
-
49
- If using front matter in a Context Markdown file, use `context_role: contract`; do not use `role = "contract"` in Markdown front matter.
50
-
51
- ## Maintenance Rules
52
-
53
- Update this Context when:
54
-
55
- - A surface responsibility changes.
56
- - Main/drilldown ownership changes.
57
- - A durable long-task state contract is introduced.
58
- - A durable main/drilldown/diagnostic ownership rationale, rejected alternative or tradeoff will guide future changes.
59
- - A repeated UI/product rule becomes reusable.
60
- - A platform-specific interaction rule becomes stable.
61
- - Cross-surface ownership changes which Screen Contract owns a detail.
62
-
63
- Do not update this Context for:
64
-
65
- - CSS-only fixes.
66
- - One-off screenshot observations.
67
- - Temporary audit notes.
68
- - Test logs.
69
- - Local implementation summaries.
70
- - PR notes, command output, screenshot review notes, debug history, agent reasoning or rationale inferred only from current code shape.
1
+ # Product Surface Contract
2
+
3
+ ## Purpose
4
+
5
+ This Context records durable responsibilities for user-facing Product Surfaces in this project or product domain.
6
+
7
+ Write only project-specific facts that should guide future implementation. Do not copy generic platform rules, one-off audit notes, screenshots, test logs, implementation summaries, visual tokens or secrets into this file.
8
+
9
+ ## Surfaces
10
+
11
+ ### `<surface name>`
12
+
13
+ - Surface:
14
+ - Surface Platform:
15
+ - Owning Product Domain:
16
+ - Primary User Question:
17
+ - Surface Type:
18
+ - Main Surface Allows:
19
+ - Main Surface Forbids:
20
+ - Drilldown Ownership:
21
+ - Long Task State Requirement:
22
+ - Design Rationale:
23
+ - Empty / Loading / Stale / Unavailable:
24
+ - Security / Redaction:
25
+ - Verification:
26
+
27
+ ## Cross-Surface Rules
28
+
29
+ - `<durable project-specific rule>`
30
+
31
+ ## Screen Contract Routing
32
+
33
+ Keep this file at cross-surface responsibility depth. When one material screen needs durable entry/exit/shared-state, information hierarchy, semantic region order, fixed/scroll/overlay ownership, navigation, variants, material controls or design-target references, create an on-demand Screen Contract from `screen-contract.md` using an existing area/subdomain role (or `contract` only for a true cross-area interface).
34
+
35
+ Link by stable surface/control/target keys. Do not duplicate the Screen Contract here, copy exact visual tokens from `DESIGN.md`, or embed authored target binaries and test evidence.
36
+
37
+ ## Registration Example
38
+
39
+ Use the existing `contract` role for cross-surface or cross-area contracts:
40
+
41
+ ```toml
42
+ [[context]]
43
+ path = "project_context/areas/product-surface-contracts.md"
44
+ role = "contract"
45
+ triggers = ["surface", "screen", "ui", "ux", "web", "app", "mobile", "desktop", "game", "cli", "tui", "页面", "界面", "屏幕", "产品接触面", "信息架构", "页面职责", "界面职责", "product surface"]
46
+ read_policy = "on-demand"
47
+ ```
48
+
49
+ If using front matter in a Context Markdown file, use `context_role: contract`; do not use `role = "contract"` in Markdown front matter.
50
+
51
+ ## Maintenance Rules
52
+
53
+ Update this Context when:
54
+
55
+ - A surface responsibility changes.
56
+ - Main/drilldown ownership changes.
57
+ - A durable long-task state contract is introduced.
58
+ - A durable main/drilldown/diagnostic ownership rationale, rejected alternative or tradeoff will guide future changes.
59
+ - A repeated UI/product rule becomes reusable.
60
+ - A platform-specific interaction rule becomes stable.
61
+ - Cross-surface ownership changes which Screen Contract owns a detail.
62
+
63
+ Do not update this Context for:
64
+
65
+ - CSS-only fixes.
66
+ - One-off screenshot observations.
67
+ - Temporary audit notes.
68
+ - Test logs.
69
+ - Local implementation summaries.
70
+ - PR notes, command output, screenshot review notes, debug history, agent reasoning or rationale inferred only from current code shape.
@@ -1,189 +1,189 @@
1
- # Screen Contract
2
-
3
- ## Purpose
4
-
5
- This optional on-demand Context records durable responsibility, information hierarchy and interaction semantics for one user-facing screen/surface when a Product Surface Contract is too coarse for future implementation and verification.
6
-
7
- A screen may be a Web route, mobile screen, desktop window, game HUD/menu scene, CLI/TUI view, extension panel, kiosk or embedded-device interface. Use only the relevant sections. Do not create a Screen Contract for a semantics-preserving CSS/style fix, one-off UI bug or explicit throwaway prototype.
8
-
9
- Write project-specific facts only. Do not copy visual token values, binary targets, implementation screenshots, test logs, raw payloads, implementation summaries or secrets into this file.
10
-
11
- ## Authority Boundary
12
-
13
- - Product Surface Contract owns cross-surface responsibility, main/drilldown placement and shared invariants.
14
- - This Screen Contract owns stable screen hierarchy, regions, state/navigation behavior, durable material-control semantics and canonical adoption records for one-screen/interaction-specific targets.
15
- - `DESIGN.md` owns visual-system semantics, the authored token source/generation direction and canonical adoption records for project/system/component-family targets.
16
- - Versioned authored design targets own their declared concrete composition for named viewport/mode/state/content conditions.
17
- - Verification Context owns repeatable proof paths. Code is current implementation evidence, not silent design authority.
18
-
19
- If these owners conflict, update the stale owner or retain a genuine decision. Do not resolve a conflict from file order, current code shape or an implementation-generated screenshot.
20
-
21
- ## Screen Identity
22
-
23
- - Surface Key:
24
- - Surface / Route / Command:
25
- - Platform:
26
- - Owning Product Domain:
27
- - Primary User Question:
28
- - In-Scope User Tasks:
29
- - Explicit Non-Goals:
30
-
31
- ## Entry, Exit And Shared State
32
-
33
- - Entry Context / Preconditions:
34
- - Entry Points / Deep Links:
35
- - Inherited Shared State:
36
- - Locally Editable State:
37
- - Committed State Changes:
38
- - Exit Outcomes / Destinations:
39
- - Back / Cancel / Interruption Behavior:
40
- - Focus / Selection Restoration:
41
-
42
- ## Information Hierarchy
43
-
44
- Record semantic order and responsibility, not pixel coordinates.
45
-
46
- 1. Primary judgment:
47
- 2. Primary action:
48
- 3. Supporting information:
49
- 4. Secondary actions:
50
- 5. Drilldown / evidence / diagnostics:
51
- 6. Information forbidden from permanent main-surface placement:
52
-
53
- ## Layout Contract
54
-
55
- ### Regions
56
-
57
- | Region Key | Order | Responsibility | Fixed / Scroll / Overlay | Visibility Conditions |
58
- |---|---:|---|---|---|
59
- | `<region-key>` | 1 | | | |
60
-
61
- ### Spatial And Container Ownership
62
-
63
- - Safe-area / system-chrome ownership:
64
- - Fixed or sticky elements:
65
- - Scroll owner and restoration:
66
- - Overlay / modal / sheet owner:
67
- - Map / canvas / media visible-area contract:
68
- - Keyboard / input-method behavior:
69
- - Gesture competition / pointer ownership:
70
-
71
- ## Control Inventory
72
-
73
- Each material control has a stable semantic key. Fill only applicable fields; do not add generic filler for non-applicable states.
74
-
75
- ### `<control-key>`
76
-
77
- - Surface:
78
- - Region:
79
- - Location:
80
- - Control Type:
81
- - Label / Content:
82
- - User Task:
83
- - Visibility:
84
- - Availability:
85
- - Trigger:
86
- - Input:
87
- - Validation:
88
- - Default Value / Restored State:
89
- - Interaction / Commit / Cancel:
90
- - Navigation / Result:
91
- - Loading State:
92
- - Empty / No-Result State:
93
- - Success State:
94
- - Failure / Degraded State:
95
- - Recovery / Retry / Interruption:
96
- - Permission / Denial Path:
97
- - Feedback:
98
- - Accessibility / Keyboard / Focus / Motion Alternative:
99
-
100
- ## Screen State Variants
101
-
102
- Describe composition or responsibility changes, not one-off screenshots.
103
-
104
- - Initial / loading:
105
- - Empty / no results:
106
- - Partial / stale / degraded:
107
- - Error / unavailable:
108
- - Permission denied:
109
- - Disabled / saving / mutating:
110
- - Success / confirmation:
111
- - Offline / recovery when applicable:
112
-
113
- ## Responsive, Mode And Content Variants
114
-
115
- - Viewport / size-class boundaries:
116
- - Orientation / window-resize behavior:
117
- - Theme / product-mode differences:
118
- - Text scaling / localization / long-content behavior:
119
- - Reduced motion / contrast / input-mode differences:
120
- - Other explicitly unsupported combinations:
121
-
122
- ## Navigation And Interaction Contract
123
-
124
- - Forward navigation and committed state:
125
- - Back / system-back / predictive-back behavior:
126
- - Deep-link behavior:
127
- - Modal / sheet / popover lifecycle:
128
- - Gesture ownership and accessible alternative:
129
- - Cancellation, interruption and recovery:
130
- - Cross-surface state/version consistency:
131
-
132
- ## Design Target References
133
-
134
- Reference project-native targets; do not embed binary content. Every adopted target has exactly one canonical adoption record. Use this Screen Contract as the canonical owner only for a one-screen/interaction-specific target. For a project/system/component-family target owned by `DESIGN.md`, fill only its stable ID, `DESIGN.md` anchor and this screen's local applicability; do not repeat the full record.
135
-
136
- | Target ID | Canonical Owner / Anchor | Interpretation | Immutable Adopted Path / URI + Digest | Editable Upstream / Owner / Update Route | Declared Condition Coverage | Selection Basis | Local Applicability |
137
- |---|---|---|---|---|---|---|---|
138
- | `<stable-target-id>` | `this Screen Contract#...` / `DESIGN.md#...` | `exact-target` / `constraint` / `inspiration` | | | | | |
139
-
140
- The canonical record owns interpretation, selection basis, immutable locator/digest, declared condition coverage and editable upstream/update route. Leave those fields pointer-only when this Screen Contract is not the canonical owner. An `exact-target` authorizes fidelity comparison only for its declared conditions. A `constraint` governs only its named rule. `inspiration` does not authorize reproduction. For an adopted exact target/constraint, the immutable locator must be readable and the editable upstream/update route must be verified or explicitly marked as a manual/external boundary. Relevant work opens the resource rather than treating this row as consumption. Update upstream and register a new immutable version/digest in the canonical record; never overwrite the adopted baseline. An implementation screenshot cannot register itself as its own target.
141
-
142
- ### Selected Implementation Handoff
143
-
144
- - Handoff Source Path:
145
- - Handoff Scope Key:
146
- - Affected Subject / Target Keys:
147
- - Durable Owner / Update Boundary:
148
-
149
- Fill this pointer only when selected implementation resources use a validated `design-resource-handoff-v1`. The handoff remains ordinary Source and owns its strict subject-by-eight-dimension condition/evidence/verification index; do not duplicate that changing index into Context. This Screen Contract owns durable screen/control meaning and makes the handoff/targets reachable. Consumers must rerun shared preflight and open affected exact/constraint resources; neither this pointer nor a successful digest proves implementation conformance.
150
-
151
- ## Verification
152
-
153
- - Semantic / information-hierarchy check:
154
- - Control behavior / state check:
155
- - Visual target / layout check:
156
- - Accessibility / focus / motion check:
157
- - Cross-surface shared-state check:
158
- - Target-runtime / native-device check:
159
- - Human or external confirmation boundary:
160
- - Known unproved combinations:
161
-
162
- ## Stable Design Rationale
163
-
164
- - Decision:
165
- - Reason:
166
- - Rejected alternative when still decision-relevant:
167
- - Tradeoff that must guide future changes:
168
-
169
- Do not invent rationale from current implementation shape. Record a rejected alternative or tradeoff only when it is durable enough to constrain future screen decisions.
170
-
171
- ## Registration Example
172
-
173
- Use an existing role. A screen owned by one domain normally uses `subdomain` (or the owning `area` file when small); use `contract` only when the screen itself is a cross-area interface.
174
-
175
- ```toml
176
- [[context]]
177
- path = "project_context/areas/<area>/screens/<screen>.md"
178
- role = "subdomain"
179
- triggers = ["<surface-key>", "<route>", "<screen name>", "<material control key>"]
180
- read_policy = "on-demand"
181
- ```
182
-
183
- Do not introduce `screen`, `design`, `surface-contract` or another custom role.
184
-
185
- ## Maintenance Rules
186
-
187
- Update this Context when durable screen responsibility, hierarchy, region ownership, navigation/shared-state behavior, responsive/mode semantics or reusable material-control behavior changes.
188
-
189
- Do not update it for CSS-only fixes, one-off screenshot findings, generated diffs, temporary audit notes, test logs, command output, implementation summaries, PR notes or rationale inferred only from current code.
1
+ # Screen Contract
2
+
3
+ ## Purpose
4
+
5
+ This optional on-demand Context records durable responsibility, information hierarchy and interaction semantics for one user-facing screen/surface when a Product Surface Contract is too coarse for future implementation and verification.
6
+
7
+ A screen may be a Web route, mobile screen, desktop window, game HUD/menu scene, CLI/TUI view, extension panel, kiosk or embedded-device interface. Use only the relevant sections. Do not create a Screen Contract for a semantics-preserving CSS/style fix, one-off UI bug or explicit throwaway prototype.
8
+
9
+ Write project-specific facts only. Do not copy visual token values, binary targets, implementation screenshots, test logs, raw payloads, implementation summaries or secrets into this file.
10
+
11
+ ## Authority Boundary
12
+
13
+ - Product Surface Contract owns cross-surface responsibility, main/drilldown placement and shared invariants.
14
+ - This Screen Contract owns stable screen hierarchy, regions, state/navigation behavior, durable material-control semantics and canonical adoption records for one-screen/interaction-specific targets.
15
+ - `DESIGN.md` owns visual-system semantics, the authored token source/generation direction and canonical adoption records for project/system/component-family targets.
16
+ - Versioned authored design targets own their declared concrete composition for named viewport/mode/state/content conditions.
17
+ - Verification Context owns repeatable proof paths. Code is current implementation evidence, not silent design authority.
18
+
19
+ If these owners conflict, update the stale owner or retain a genuine decision. Do not resolve a conflict from file order, current code shape or an implementation-generated screenshot.
20
+
21
+ ## Screen Identity
22
+
23
+ - Surface Key:
24
+ - Surface / Route / Command:
25
+ - Platform:
26
+ - Owning Product Domain:
27
+ - Primary User Question:
28
+ - In-Scope User Tasks:
29
+ - Explicit Non-Goals:
30
+
31
+ ## Entry, Exit And Shared State
32
+
33
+ - Entry Context / Preconditions:
34
+ - Entry Points / Deep Links:
35
+ - Inherited Shared State:
36
+ - Locally Editable State:
37
+ - Committed State Changes:
38
+ - Exit Outcomes / Destinations:
39
+ - Back / Cancel / Interruption Behavior:
40
+ - Focus / Selection Restoration:
41
+
42
+ ## Information Hierarchy
43
+
44
+ Record semantic order and responsibility, not pixel coordinates.
45
+
46
+ 1. Primary judgment:
47
+ 2. Primary action:
48
+ 3. Supporting information:
49
+ 4. Secondary actions:
50
+ 5. Drilldown / evidence / diagnostics:
51
+ 6. Information forbidden from permanent main-surface placement:
52
+
53
+ ## Layout Contract
54
+
55
+ ### Regions
56
+
57
+ | Region Key | Order | Responsibility | Fixed / Scroll / Overlay | Visibility Conditions |
58
+ |---|---:|---|---|---|
59
+ | `<region-key>` | 1 | | | |
60
+
61
+ ### Spatial And Container Ownership
62
+
63
+ - Safe-area / system-chrome ownership:
64
+ - Fixed or sticky elements:
65
+ - Scroll owner and restoration:
66
+ - Overlay / modal / sheet owner:
67
+ - Map / canvas / media visible-area contract:
68
+ - Keyboard / input-method behavior:
69
+ - Gesture competition / pointer ownership:
70
+
71
+ ## Control Inventory
72
+
73
+ Each material control has a stable semantic key. Fill only applicable fields; do not add generic filler for non-applicable states.
74
+
75
+ ### `<control-key>`
76
+
77
+ - Surface:
78
+ - Region:
79
+ - Location:
80
+ - Control Type:
81
+ - Label / Content:
82
+ - User Task:
83
+ - Visibility:
84
+ - Availability:
85
+ - Trigger:
86
+ - Input:
87
+ - Validation:
88
+ - Default Value / Restored State:
89
+ - Interaction / Commit / Cancel:
90
+ - Navigation / Result:
91
+ - Loading State:
92
+ - Empty / No-Result State:
93
+ - Success State:
94
+ - Failure / Degraded State:
95
+ - Recovery / Retry / Interruption:
96
+ - Permission / Denial Path:
97
+ - Feedback:
98
+ - Accessibility / Keyboard / Focus / Motion Alternative:
99
+
100
+ ## Screen State Variants
101
+
102
+ Describe composition or responsibility changes, not one-off screenshots.
103
+
104
+ - Initial / loading:
105
+ - Empty / no results:
106
+ - Partial / stale / degraded:
107
+ - Error / unavailable:
108
+ - Permission denied:
109
+ - Disabled / saving / mutating:
110
+ - Success / confirmation:
111
+ - Offline / recovery when applicable:
112
+
113
+ ## Responsive, Mode And Content Variants
114
+
115
+ - Viewport / size-class boundaries:
116
+ - Orientation / window-resize behavior:
117
+ - Theme / product-mode differences:
118
+ - Text scaling / localization / long-content behavior:
119
+ - Reduced motion / contrast / input-mode differences:
120
+ - Other explicitly unsupported combinations:
121
+
122
+ ## Navigation And Interaction Contract
123
+
124
+ - Forward navigation and committed state:
125
+ - Back / system-back / predictive-back behavior:
126
+ - Deep-link behavior:
127
+ - Modal / sheet / popover lifecycle:
128
+ - Gesture ownership and accessible alternative:
129
+ - Cancellation, interruption and recovery:
130
+ - Cross-surface state/version consistency:
131
+
132
+ ## Design Target References
133
+
134
+ Reference project-native targets; do not embed binary content. Every adopted target has exactly one canonical adoption record. Use this Screen Contract as the canonical owner only for a one-screen/interaction-specific target. For a project/system/component-family target owned by `DESIGN.md`, fill only its stable ID, `DESIGN.md` anchor and this screen's local applicability; do not repeat the full record.
135
+
136
+ | Target ID | Canonical Owner / Anchor | Interpretation | Immutable Adopted Path / URI + Digest | Editable Upstream / Owner / Update Route | Declared Condition Coverage | Selection Basis | Local Applicability |
137
+ |---|---|---|---|---|---|---|---|
138
+ | `<stable-target-id>` | `this Screen Contract#...` / `DESIGN.md#...` | `exact-target` / `constraint` / `inspiration` | | | | | |
139
+
140
+ The canonical record owns interpretation, selection basis, immutable locator/digest, declared condition coverage and editable upstream/update route. Leave those fields pointer-only when this Screen Contract is not the canonical owner. An `exact-target` authorizes fidelity comparison only for its declared conditions. A `constraint` governs only its named rule. `inspiration` does not authorize reproduction. For an adopted exact target/constraint, the immutable locator must be readable and the editable upstream/update route must be verified or explicitly marked as a manual/external boundary. Relevant work opens the resource rather than treating this row as consumption. Update upstream and register a new immutable version/digest in the canonical record; never overwrite the adopted baseline. An implementation screenshot cannot register itself as its own target.
141
+
142
+ ### Selected Implementation Handoff
143
+
144
+ - Handoff Source Path:
145
+ - Handoff Scope Key:
146
+ - Affected Subject / Target Keys:
147
+ - Durable Owner / Update Boundary:
148
+
149
+ Fill this pointer only when selected implementation resources use a validated `design-resource-handoff-v1`. The handoff remains ordinary Source and owns its strict subject-by-eight-dimension condition/evidence/verification index; do not duplicate that changing index into Context. This Screen Contract owns durable screen/control meaning and makes the handoff/targets reachable. Consumers must rerun shared preflight and open affected exact/constraint resources; neither this pointer nor a successful digest proves implementation conformance.
150
+
151
+ ## Verification
152
+
153
+ - Semantic / information-hierarchy check:
154
+ - Control behavior / state check:
155
+ - Visual target / layout check:
156
+ - Accessibility / focus / motion check:
157
+ - Cross-surface shared-state check:
158
+ - Target-runtime / native-device check:
159
+ - Human or external confirmation boundary:
160
+ - Known unproved combinations:
161
+
162
+ ## Stable Design Rationale
163
+
164
+ - Decision:
165
+ - Reason:
166
+ - Rejected alternative when still decision-relevant:
167
+ - Tradeoff that must guide future changes:
168
+
169
+ Do not invent rationale from current implementation shape. Record a rejected alternative or tradeoff only when it is durable enough to constrain future screen decisions.
170
+
171
+ ## Registration Example
172
+
173
+ Use an existing role. A screen owned by one domain normally uses `subdomain` (or the owning `area` file when small); use `contract` only when the screen itself is a cross-area interface.
174
+
175
+ ```toml
176
+ [[context]]
177
+ path = "project_context/areas/<area>/screens/<screen>.md"
178
+ role = "subdomain"
179
+ triggers = ["<surface-key>", "<route>", "<screen name>", "<material control key>"]
180
+ read_policy = "on-demand"
181
+ ```
182
+
183
+ Do not introduce `screen`, `design`, `surface-contract` or another custom role.
184
+
185
+ ## Maintenance Rules
186
+
187
+ Update this Context when durable screen responsibility, hierarchy, region ownership, navigation/shared-state behavior, responsive/mode semantics or reusable material-control behavior changes.
188
+
189
+ Do not update it for CSS-only fixes, one-off screenshot findings, generated diffs, temporary audit notes, test logs, command output, implementation summaries, PR notes or rationale inferred only from current code.
@@ -1,32 +1,32 @@
1
- # Verification Context: main
2
-
3
- This role Context records critical repeat-execution paths for the owning area. Keep it minimal: enough for a future agent to rerun verification without rediscovering setup, not a test report.
4
-
5
- ## Owner
6
-
7
- - Owning area: `main`.
8
-
9
- ## Verification Paths
10
-
11
- - `npm test` or the shortest project-specific test, smoke, CI, probe or validation command.
12
- - Verification paths are reusable execution instances, not independent definitions of the verification target. For capability, metric or acceptance claims, first use the owning module's design Context to decide what claim should be proven, then choose the command or probe.
13
-
14
- ## Required Preparation
15
-
16
- - List only durable setup such as services, env files, fixtures, local runtimes or external dependencies needed before rerun.
17
-
18
- ## Expected Signals
19
-
20
- - Name the stage, health check, status, artifact shape or observable signal that means the path reached the intended point.
21
-
22
- ## Acceptable Warnings
23
-
24
- - List warnings that are expected and should not trigger repeated investigation.
25
-
26
- ## Excluded Dead Ends
27
-
28
- - List previously ruled-out commands, providers, endpoints or setup paths only when remembering them prevents repeated wasted work.
29
-
30
- ## Forbidden Content
31
-
32
- - Do not record one-off logs, full command output, temporary JSON, CI artifacts, test reports, secrets, tokens, cookies, device ids, raw payloads or pass/fail claims.
1
+ # Verification Context: main
2
+
3
+ This role Context records critical repeat-execution paths for the owning area. Keep it minimal: enough for a future agent to rerun verification without rediscovering setup, not a test report.
4
+
5
+ ## Owner
6
+
7
+ - Owning area: `main`.
8
+
9
+ ## Verification Paths
10
+
11
+ - `npm test` or the shortest project-specific test, smoke, CI, probe or validation command.
12
+ - Verification paths are reusable execution instances, not independent definitions of the verification target. For capability, metric or acceptance claims, first use the owning module's design Context to decide what claim should be proven, then choose the command or probe.
13
+
14
+ ## Required Preparation
15
+
16
+ - List only durable setup such as services, env files, fixtures, local runtimes or external dependencies needed before rerun.
17
+
18
+ ## Expected Signals
19
+
20
+ - Name the stage, health check, status, artifact shape or observable signal that means the path reached the intended point.
21
+
22
+ ## Acceptable Warnings
23
+
24
+ - List warnings that are expected and should not trigger repeated investigation.
25
+
26
+ ## Excluded Dead Ends
27
+
28
+ - List previously ruled-out commands, providers, endpoints or setup paths only when remembering them prevents repeated wasted work.
29
+
30
+ ## Forbidden Content
31
+
32
+ - Do not record one-off logs, full command output, temporary JSON, CI artifacts, test reports, secrets, tokens, cookies, device ids, raw payloads or pass/fail claims.
@@ -1 +1 @@
1
-
1
+