@starci/skills 1.1.0

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 (321) hide show
  1. package/INDEX.md +74 -0
  2. package/INDEX.vi.md +75 -0
  3. package/README.md +44 -0
  4. package/README.vi.md +43 -0
  5. package/SKILL.md +135 -0
  6. package/SKILL.vi.md +128 -0
  7. package/alias/INDEX.md +104 -0
  8. package/alias/INDEX.vi.md +104 -0
  9. package/alias/alias.json +297 -0
  10. package/bin/starci-skills.mjs +219 -0
  11. package/knowledge/INDEX.md +22 -0
  12. package/knowledge/INDEX.vi.md +22 -0
  13. package/knowledge/grammars/starci/DNA.md +146 -0
  14. package/knowledge/grammars/starci/DNA.vi.md +146 -0
  15. package/knowledge/grammars/starci/INDEX.md +25 -0
  16. package/knowledge/grammars/starci/INDEX.vi.md +25 -0
  17. package/knowledge/grammars/starci/family.md +50 -0
  18. package/knowledge/grammars/starci/family.vi.md +50 -0
  19. package/knowledge/grammars/starci/idioms.md +120 -0
  20. package/knowledge/grammars/starci/idioms.vi.md +121 -0
  21. package/knowledge/grammars/starci/playbook.md +36 -0
  22. package/knowledge/grammars/starci/playbook.vi.md +35 -0
  23. package/knowledge/patterns/be/INDEX.md +29 -0
  24. package/knowledge/patterns/be/INDEX.vi.md +29 -0
  25. package/knowledge/patterns/be/comment.md +80 -0
  26. package/knowledge/patterns/be/comment.vi.md +80 -0
  27. package/knowledge/patterns/be/error.md +86 -0
  28. package/knowledge/patterns/be/error.vi.md +86 -0
  29. package/knowledge/patterns/be/folder.md +87 -0
  30. package/knowledge/patterns/be/folder.vi.md +86 -0
  31. package/knowledge/patterns/be/function.md +80 -0
  32. package/knowledge/patterns/be/function.vi.md +80 -0
  33. package/knowledge/patterns/be/imports.md +79 -0
  34. package/knowledge/patterns/be/imports.vi.md +79 -0
  35. package/knowledge/patterns/be/naming.md +87 -0
  36. package/knowledge/patterns/be/naming.vi.md +87 -0
  37. package/knowledge/patterns/be/test.md +79 -0
  38. package/knowledge/patterns/be/test.vi.md +79 -0
  39. package/knowledge/patterns/be/typing.md +73 -0
  40. package/knowledge/patterns/be/typing.vi.md +73 -0
  41. package/knowledge/patterns/fe/INDEX.md +29 -0
  42. package/knowledge/patterns/fe/INDEX.vi.md +29 -0
  43. package/knowledge/patterns/fe/comment.md +70 -0
  44. package/knowledge/patterns/fe/comment.vi.md +70 -0
  45. package/knowledge/patterns/fe/error.md +61 -0
  46. package/knowledge/patterns/fe/error.vi.md +61 -0
  47. package/knowledge/patterns/fe/folder.md +98 -0
  48. package/knowledge/patterns/fe/folder.vi.md +95 -0
  49. package/knowledge/patterns/fe/function.md +70 -0
  50. package/knowledge/patterns/fe/function.vi.md +70 -0
  51. package/knowledge/patterns/fe/imports.md +87 -0
  52. package/knowledge/patterns/fe/imports.vi.md +87 -0
  53. package/knowledge/patterns/fe/naming.md +77 -0
  54. package/knowledge/patterns/fe/naming.vi.md +77 -0
  55. package/knowledge/patterns/fe/test.md +73 -0
  56. package/knowledge/patterns/fe/test.vi.md +73 -0
  57. package/knowledge/patterns/fe/typing.md +67 -0
  58. package/knowledge/patterns/fe/typing.vi.md +67 -0
  59. package/knowledge/ui/INDEX.md +101 -0
  60. package/knowledge/ui/INDEX.vi.md +101 -0
  61. package/knowledge/ui/composition/INDEX.md +60 -0
  62. package/knowledge/ui/composition/INDEX.vi.md +63 -0
  63. package/knowledge/ui/composition/accent.md +73 -0
  64. package/knowledge/ui/composition/accent.vi.md +74 -0
  65. package/knowledge/ui/composition/action.md +55 -0
  66. package/knowledge/ui/composition/action.vi.md +56 -0
  67. package/knowledge/ui/composition/coverage.md +37 -0
  68. package/knowledge/ui/composition/coverage.vi.md +37 -0
  69. package/knowledge/ui/composition/cta.md +79 -0
  70. package/knowledge/ui/composition/cta.vi.md +79 -0
  71. package/knowledge/ui/composition/feedback.md +55 -0
  72. package/knowledge/ui/composition/feedback.vi.md +56 -0
  73. package/knowledge/ui/composition/hierarchy.md +83 -0
  74. package/knowledge/ui/composition/hierarchy.vi.md +82 -0
  75. package/knowledge/ui/composition/layout.md +91 -0
  76. package/knowledge/ui/composition/layout.vi.md +93 -0
  77. package/knowledge/ui/composition/responsive.md +67 -0
  78. package/knowledge/ui/composition/responsive.vi.md +67 -0
  79. package/knowledge/ui/composition/state.md +105 -0
  80. package/knowledge/ui/composition/state.vi.md +106 -0
  81. package/knowledge/ui/presentation/INDEX.md +94 -0
  82. package/knowledge/ui/presentation/INDEX.vi.md +69 -0
  83. package/knowledge/ui/presentation/boundary.md +170 -0
  84. package/knowledge/ui/presentation/boundary.vi.md +169 -0
  85. package/knowledge/ui/presentation/font.md +155 -0
  86. package/knowledge/ui/presentation/font.vi.md +156 -0
  87. package/knowledge/ui/presentation/gap.md +181 -0
  88. package/knowledge/ui/presentation/gap.vi.md +181 -0
  89. package/knowledge/ui/presentation/margin.md +168 -0
  90. package/knowledge/ui/presentation/margin.vi.md +171 -0
  91. package/knowledge/ui/presentation/measure.md +174 -0
  92. package/knowledge/ui/presentation/measure.vi.md +178 -0
  93. package/knowledge/ui/presentation/overflow.md +142 -0
  94. package/knowledge/ui/presentation/overflow.vi.md +142 -0
  95. package/knowledge/ui/presentation/padding.md +293 -0
  96. package/knowledge/ui/presentation/padding.vi.md +292 -0
  97. package/knowledge/ui/presentation/surface.md +166 -0
  98. package/knowledge/ui/presentation/surface.vi.md +166 -0
  99. package/knowledge/ui/presentation/text-flow.md +123 -0
  100. package/knowledge/ui/presentation/text-flow.vi.md +123 -0
  101. package/knowledge/ui/presentation/tone.md +114 -0
  102. package/knowledge/ui/presentation/tone.vi.md +113 -0
  103. package/knowledge/ui/proof/INDEX.md +55 -0
  104. package/knowledge/ui/proof/INDEX.vi.md +55 -0
  105. package/knowledge/ui/proof/accessibility.md +67 -0
  106. package/knowledge/ui/proof/accessibility.vi.md +68 -0
  107. package/knowledge/ui/proof/contrast.md +58 -0
  108. package/knowledge/ui/proof/contrast.vi.md +57 -0
  109. package/knowledge/ui/proof/focus.md +76 -0
  110. package/knowledge/ui/proof/focus.vi.md +76 -0
  111. package/knowledge/ui/proof/motion.md +63 -0
  112. package/knowledge/ui/proof/motion.vi.md +64 -0
  113. package/knowledge/ui/proof/render-truth.md +63 -0
  114. package/knowledge/ui/proof/render-truth.vi.md +63 -0
  115. package/operators/INDEX.md +199 -0
  116. package/operators/INDEX.vi.md +199 -0
  117. package/operators/architecture-decide/errors.json +115 -0
  118. package/operators/architecture-decide/operator.json +20 -0
  119. package/operators/architecture-decide/operator.md +133 -0
  120. package/operators/architecture-decide/operator.vi.md +130 -0
  121. package/operators/architecture-decide/self-test.mjs +221 -0
  122. package/operators/architecture-decide/validate.mjs +112 -0
  123. package/operators/backend-source-apply/errors.json +66 -0
  124. package/operators/backend-source-apply/operator.json +20 -0
  125. package/operators/backend-source-apply/operator.md +189 -0
  126. package/operators/backend-source-apply/operator.vi.md +185 -0
  127. package/operators/backend-source-apply/self-test.mjs +257 -0
  128. package/operators/backend-source-apply/validate.mjs +240 -0
  129. package/operators/business-decide/errors.json +78 -0
  130. package/operators/business-decide/operator.json +20 -0
  131. package/operators/business-decide/operator.md +176 -0
  132. package/operators/business-decide/operator.vi.md +174 -0
  133. package/operators/business-decide/self-test.mjs +225 -0
  134. package/operators/business-decide/validate.mjs +277 -0
  135. package/operators/content-generate/errors.json +106 -0
  136. package/operators/content-generate/operator.json +21 -0
  137. package/operators/content-generate/operator.md +155 -0
  138. package/operators/content-generate/operator.vi.md +155 -0
  139. package/operators/content-generate/self-test.mjs +288 -0
  140. package/operators/content-generate/validate.mjs +196 -0
  141. package/operators/errors.json +178 -0
  142. package/operators/frontend-direction-decide/errors.json +135 -0
  143. package/operators/frontend-direction-decide/operator.json +21 -0
  144. package/operators/frontend-direction-decide/operator.md +167 -0
  145. package/operators/frontend-direction-decide/operator.vi.md +167 -0
  146. package/operators/frontend-direction-decide/self-test.mjs +226 -0
  147. package/operators/frontend-direction-decide/validate.mjs +146 -0
  148. package/operators/frontend-presentation-resolve/errors.json +42 -0
  149. package/operators/frontend-presentation-resolve/operator.json +19 -0
  150. package/operators/frontend-presentation-resolve/operator.md +142 -0
  151. package/operators/frontend-presentation-resolve/operator.vi.md +140 -0
  152. package/operators/frontend-presentation-resolve/self-test.mjs +163 -0
  153. package/operators/frontend-presentation-resolve/validate.mjs +143 -0
  154. package/operators/frontend-source-apply/errors.json +30 -0
  155. package/operators/frontend-source-apply/operator.json +20 -0
  156. package/operators/frontend-source-apply/operator.md +127 -0
  157. package/operators/frontend-source-apply/operator.vi.md +126 -0
  158. package/operators/frontend-source-apply/self-test.mjs +214 -0
  159. package/operators/frontend-source-apply/validate.mjs +133 -0
  160. package/operators/frontend-surface-audit/errors.json +5 -0
  161. package/operators/frontend-surface-audit/operator.json +22 -0
  162. package/operators/frontend-surface-audit/operator.md +121 -0
  163. package/operators/frontend-surface-audit/operator.vi.md +121 -0
  164. package/operators/frontend-surface-audit/self-test.mjs +185 -0
  165. package/operators/frontend-surface-audit/validate.mjs +127 -0
  166. package/operators/git-publish/errors.json +54 -0
  167. package/operators/git-publish/operator.json +20 -0
  168. package/operators/git-publish/operator.md +180 -0
  169. package/operators/git-publish/operator.vi.md +178 -0
  170. package/operators/git-publish/self-test.mjs +177 -0
  171. package/operators/git-publish/validate.mjs +106 -0
  172. package/operators/platform-operate/errors.json +90 -0
  173. package/operators/platform-operate/operator.json +22 -0
  174. package/operators/platform-operate/operator.md +162 -0
  175. package/operators/platform-operate/operator.vi.md +160 -0
  176. package/operators/platform-operate/self-test.mjs +202 -0
  177. package/operators/platform-operate/validate.mjs +193 -0
  178. package/operators/quality-verify/errors.json +54 -0
  179. package/operators/quality-verify/operator.json +20 -0
  180. package/operators/quality-verify/operator.md +185 -0
  181. package/operators/quality-verify/operator.vi.md +177 -0
  182. package/operators/quality-verify/self-test.mjs +210 -0
  183. package/operators/quality-verify/validate.mjs +197 -0
  184. package/operators/release-deploy/errors.json +158 -0
  185. package/operators/release-deploy/operator.json +23 -0
  186. package/operators/release-deploy/operator.md +183 -0
  187. package/operators/release-deploy/operator.vi.md +181 -0
  188. package/operators/release-deploy/self-test.mjs +235 -0
  189. package/operators/release-deploy/validate.mjs +129 -0
  190. package/operators/uat-verify/errors.json +78 -0
  191. package/operators/uat-verify/operator.json +25 -0
  192. package/operators/uat-verify/operator.md +162 -0
  193. package/operators/uat-verify/operator.vi.md +161 -0
  194. package/operators/uat-verify/self-test.mjs +270 -0
  195. package/operators/uat-verify/validate.mjs +202 -0
  196. package/operators/workspace-bind/errors.json +90 -0
  197. package/operators/workspace-bind/operator.json +21 -0
  198. package/operators/workspace-bind/operator.md +148 -0
  199. package/operators/workspace-bind/operator.vi.md +148 -0
  200. package/operators/workspace-bind/self-test.mjs +205 -0
  201. package/operators/workspace-bind/validate.mjs +152 -0
  202. package/package.json +50 -0
  203. package/readiness/initialization/workspaces/commit-policy.json +91 -0
  204. package/readiness/initialization/workspaces/config.schema.json +35 -0
  205. package/readiness/initialization/workspaces/device-state.schema.json +54 -0
  206. package/readiness/initialization/workspaces/local-route.schema.json +206 -0
  207. package/readiness/initialization/workspaces/portable-route.schema.json +200 -0
  208. package/resources/INDEX.md +96 -0
  209. package/resources/INDEX.vi.md +99 -0
  210. package/resources/agents/profiles/claude.json +131 -0
  211. package/resources/agents/profiles/openai.json +131 -0
  212. package/resources/orchestrator.json +71 -0
  213. package/resources/tools.json +85 -0
  214. package/routing.json +272 -0
  215. package/scripts/alias-registry.mjs +31 -0
  216. package/scripts/device-state.mjs +497 -0
  217. package/scripts/device-state.spec.mjs +18 -0
  218. package/scripts/errors-registry.mjs +68 -0
  219. package/scripts/generate-alias-doc.mjs +66 -0
  220. package/scripts/generate-grammar-dna.mjs +387 -0
  221. package/scripts/generate-operators-index.mjs +95 -0
  222. package/scripts/generate-presentation-owned.mjs +681 -0
  223. package/scripts/install-cli.spec.mjs +74 -0
  224. package/scripts/json-schema.mjs +94 -0
  225. package/scripts/operator-md.mjs +96 -0
  226. package/scripts/run-operator-self-tests.mjs +36 -0
  227. package/scripts/validate-alias.mjs +165 -0
  228. package/scripts/validate-defaults.mjs +72 -0
  229. package/scripts/validate-knowledge-citations.mjs +90 -0
  230. package/scripts/validate-operator.mjs +125 -0
  231. package/scripts/validate-request.mjs +80 -0
  232. package/scripts/validate-resources.mjs +117 -0
  233. package/scripts/validate-response.mjs +141 -0
  234. package/scripts/validate-routing.mjs +91 -0
  235. package/scripts/validate-step.mjs +50 -0
  236. package/scripts/validate-templates.mjs +226 -0
  237. package/scripts/validate-templates.spec.mjs +144 -0
  238. package/scripts/validate-workflows.mjs +106 -0
  239. package/scripts/workspace-portable.mjs +389 -0
  240. package/scripts/workspace-portable.spec.mjs +246 -0
  241. package/templates/README.md +47 -0
  242. package/templates/README.vi.md +45 -0
  243. package/templates/changes.example.md +27 -0
  244. package/templates/grammars.template.md +34 -0
  245. package/templates/kinds/architecture-decision.contract.json +14 -0
  246. package/templates/kinds/architecture-decision.skeleton.md +52 -0
  247. package/templates/kinds/backend-source-application.contract.json +10 -0
  248. package/templates/kinds/backend-source-application.skeleton.md +34 -0
  249. package/templates/kinds/business-promise-authority.contract.json +13 -0
  250. package/templates/kinds/business-promise-authority.skeleton.md +67 -0
  251. package/templates/kinds/capture.schema.json +33 -0
  252. package/templates/kinds/changes.contract.json +10 -0
  253. package/templates/kinds/changes.skeleton.md +26 -0
  254. package/templates/kinds/checks.schema.json +44 -0
  255. package/templates/kinds/claims.schema.json +165 -0
  256. package/templates/kinds/conformance.schema.json +15 -0
  257. package/templates/kinds/content-brief.contract.json +12 -0
  258. package/templates/kinds/content-brief.skeleton.md +45 -0
  259. package/templates/kinds/content-generation-receipt.contract.json +11 -0
  260. package/templates/kinds/content-generation-receipt.skeleton.md +40 -0
  261. package/templates/kinds/content-review.contract.json +11 -0
  262. package/templates/kinds/content-review.skeleton.md +45 -0
  263. package/templates/kinds/contract.schema.json +28 -0
  264. package/templates/kinds/coverage-matrix.schema.json +86 -0
  265. package/templates/kinds/coverage.schema.json +62 -0
  266. package/templates/kinds/current-state.schema.json +40 -0
  267. package/templates/kinds/delta.schema.json +95 -0
  268. package/templates/kinds/e2e.schema.json +63 -0
  269. package/templates/kinds/frontend-direction-decision.contract.json +93 -0
  270. package/templates/kinds/frontend-direction-decision.skeleton.md +68 -0
  271. package/templates/kinds/frontend-presentation-resolution.contract.json +11 -0
  272. package/templates/kinds/frontend-presentation-resolution.skeleton.md +32 -0
  273. package/templates/kinds/frontend-source-application.contract.json +10 -0
  274. package/templates/kinds/frontend-source-application.skeleton.md +30 -0
  275. package/templates/kinds/frontend-surface-audit.contract.json +52 -0
  276. package/templates/kinds/frontend-surface-audit.skeleton.md +32 -0
  277. package/templates/kinds/gate-result.schema.json +64 -0
  278. package/templates/kinds/git-publication.contract.json +82 -0
  279. package/templates/kinds/git-publication.skeleton.md +61 -0
  280. package/templates/kinds/independent-critique.contract.json +9 -0
  281. package/templates/kinds/independent-critique.skeleton.md +28 -0
  282. package/templates/kinds/inventory.schema.json +35 -0
  283. package/templates/kinds/model.schema.json +99 -0
  284. package/templates/kinds/mutations.schema.json +65 -0
  285. package/templates/kinds/platform-operation-receipt.contract.json +76 -0
  286. package/templates/kinds/platform-operation-receipt.skeleton.md +54 -0
  287. package/templates/kinds/probes.schema.json +130 -0
  288. package/templates/kinds/proof.schema.json +17 -0
  289. package/templates/kinds/quality-verification.contract.json +87 -0
  290. package/templates/kinds/quality-verification.skeleton.md +58 -0
  291. package/templates/kinds/release-deployment.contract.json +85 -0
  292. package/templates/kinds/release-deployment.skeleton.md +67 -0
  293. package/templates/kinds/route.schema.json +293 -0
  294. package/templates/kinds/stack-model.schema.json +90 -0
  295. package/templates/kinds/uat-capture.schema.json +35 -0
  296. package/templates/kinds/uat-flow-verification.contract.json +11 -0
  297. package/templates/kinds/uat-flow-verification.skeleton.md +47 -0
  298. package/templates/kinds/uat-snapshot.schema.json +96 -0
  299. package/templates/kinds/uat-verdicts.schema.json +41 -0
  300. package/templates/kinds/ui-coverage.schema.json +77 -0
  301. package/templates/kinds/verdicts.schema.json +39 -0
  302. package/templates/kinds/workspace-route-binding.contract.json +12 -0
  303. package/templates/kinds/workspace-route-binding.skeleton.md +60 -0
  304. package/templates/kinds/writes.schema.json +37 -0
  305. package/templates/operator.template.md +73 -0
  306. package/templates/patterns.template.md +31 -0
  307. package/templates/step/request.schema.json +42 -0
  308. package/templates/step/response.schema.json +144 -0
  309. package/templates/ui-composition.template.md +36 -0
  310. package/templates/ui-presentation.template.md +57 -0
  311. package/templates/ui-proof.template.md +34 -0
  312. package/workflows/README.md +37 -0
  313. package/workflows/README.vi.md +37 -0
  314. package/workflows/backend-feature.json +59 -0
  315. package/workflows/content-unit.json +19 -0
  316. package/workflows/frontend-new-surface.json +81 -0
  317. package/workflows/frontend-reconstruct.json +67 -0
  318. package/workflows/frontend-refine.json +67 -0
  319. package/workflows/frontend-with-uat.json +78 -0
  320. package/workflows/full-feature.json +104 -0
  321. package/workflows/release.json +29 -0
@@ -0,0 +1,101 @@
1
+ # UI knowledge
2
+
3
+ This tree holds the universal UI law shared by every published Grammar family, split into three
4
+ groups by the operator that reads each one.
5
+ It owns 115 stable live X-n laws (36 in composition, 60 in presentation, 19 in proof), plus five
6
+ composition ids that are retired into COVERAGE-1 and never reused, together with observable
7
+ selection conditions, ownership decisions, deterministic verdicts, and audit vectors. It is not an implementation or consumer cookbook. It does not own business facts, page copy,
8
+ routes, permissions, artwork identity, product effects, or family material choices.
9
+
10
+ ## Runtime policy
11
+
12
+ - Canonical agent/runtime knowledge is the English `.md` file only.
13
+ - Same-stem `.vi.md` files are complete human-review mirrors. Never load, index, or cite them as runtime
14
+ authority.
15
+ - Grammar operators resolve the smallest relevant canonical file and rule ID. Individual files omit
16
+ per-topic routing metadata.
17
+ - Rule IDs are stable public knowledge addresses. Append the next sequential `PREFIX-n`; never
18
+ renumber, reuse, or silently change the meaning of an existing ID.
19
+ - Knowledge owns invariant decisions and audit vectors, not implementation status, migration plans,
20
+ workflows, operator DAGs, or task orchestration. Current capability/debt belongs in plans and audits.
21
+
22
+ ## Grammar binding
23
+
24
+ `@starci/grammar/common` is the public authority for props, semantics, renderer anatomy, state,
25
+ accessibility, composition, and universal implementation. A family-selected application imports
26
+ exactly the selected family stylesheet; that stylesheet imports Common. Direct
27
+ `@starci/grammar/common/styles.css` consumption is reserved for intentional familyless Common usage
28
+ and isolated test harnesses. An application must not import both paths for the same rendered tree.
29
+
30
+ A visual family is a props-compatible scoped overlay declared through `defineGrammarFamily`. It may
31
+ replace a known Common renderer with the exact compatible props or add a non-colliding extension;
32
+ its stylesheet is scoped by `data-grammar-family`. It must preserve Common meaning, state behavior,
33
+ accessibility, ownership, and substitutability.
34
+
35
+ Business/application code selects one family and supplies domain content, data, permissions,
36
+ handlers, and verified state. Application CSS may own page canvas, product layout/content/media, and
37
+ placement through public extension points. It must not reach through, rebuild, or override Common-owned
38
+ anatomy, spacing, semantics, state, focus, or variants. Family documents record overlay choices and conformance
39
+ evidence; they never duplicate or redefine these universal laws. A missing reusable capability is a
40
+ Common gap, not permission for product-local anatomy or a family-specific universal rule.
41
+
42
+ ## Groups
43
+
44
+ A topic lives with the operator that reads it. A topic no operator reads has no reason to exist.
45
+
46
+ | Group | Decides | Read by |
47
+ | --- | --- | --- |
48
+ | [`composition/`](composition/INDEX.md) | Constraints a direction must satisfy, after taste is decided in grammars | `frontend.direction.decide` |
49
+ | [`presentation/`](presentation/INDEX.md) | Which CSS value an app-owned boundary takes | `frontend.presentation.resolve` |
50
+ | [`proof/`](proof/INDEX.md) | What only becomes true once rendered | `frontend.surface.audit` |
51
+
52
+ The test that places a topic is whether reading source answers it. A spacing value is readable from a
53
+ class, so it is presentation. The number of dominant actions is settled before any tree exists, so it
54
+ is composition. Whether keyboard order matches visual order needs a running page, so it is proof.
55
+
56
+ Code conventions for the source that produces all of this live in [`patterns/`](../patterns/fe/INDEX.md).
57
+ Family realization lives in [`grammars/`](../grammars/starci/INDEX.md).
58
+
59
+ ## Rule binding architecture
60
+
61
+ Knowledge defines what a rule means; it does not hard-code which current DOM instance passes it. A
62
+ Common reusable exposes stable component, slot, and relationship anchors. A co-located or generated
63
+ binding registry maps those anchors to rules with at least:
64
+
65
+ - a stable binding ID and version;
66
+ - `ruleId`;
67
+ - exact target slot or between-slot relationship;
68
+ - the `when` variant, state, or composition selector;
69
+ - the expected owner anchor.
70
+
71
+ The registry never duplicates the rule's metric or behavior. Applications do not hand-author rule
72
+ arrays, and no markup can label itself as passing. The auditor resolves bindings from stable DOM
73
+ anchors, collects rendered evidence, and records rule IDs and findings in the audit result. Unknown
74
+ rule IDs, missing slots, stale anchors, and orphan bindings fail validation. DOM outside a registered
75
+ reusable may be selected by semantic inspection, but it cannot receive `PASS` without the same owner
76
+ and runtime evidence.
77
+
78
+ A contract claim is the one exception, and it is not a self-assessment. A rule-binding operator may
79
+ emit `data-contract` on a node it resolved, as a space-separated list of the identifiers that node
80
+ claims to satisfy. The claim states an intention so the auditor can contradict it: a node claiming
81
+ `GAP-4` while the computed gap is `1.5rem` is a finding, a node carrying spacing that claims nothing
82
+ is an unowned value, and a claimed identifier absent from published knowledge fails validation. A
83
+ claim never carries a verdict, score, or `PASS`, and a hand-written one is invalid because only the
84
+ operator's receipt makes it verifiable. Grammar emits the same claim on the elements that realize a
85
+ relationship it owns, the rows of each topic's "Common already owns" table, so a Grammar-internal
86
+ value is never an unowned value and the resolver never re-claims those nodes. The receipt remains the
87
+ durable record, so the attribute may be stripped from a production build without weakening any audit.
88
+
89
+ ## Canonical verdict model
90
+
91
+ Base verdicts are exactly: `PASS`, `COMMON_CAPABILITY_MISSING`, `COMMON_IMPLEMENTATION_GLITCH`,
92
+ `FAMILY_OVERRIDE_GLITCH`, `APP_REIMPLEMENTATION`, `APP_OVERRIDE`, `APP_WORKAROUND`, `PROOF_MISSING`.
93
+
94
+ Cause tags are exactly: `VALUE_DRIFT`, `VENDOR_LEAK`, `WRONG_OWNER`, `OFF_SCALE_VALUE`,
95
+ `DOUBLE_OWNER`, `PHYSICAL_SIDE_DRIFT`, `STATE_OR_VIEWPORT_DRIFT`.
96
+
97
+ Evaluate capability, isolated Common output, family delta, app delta, then owner/state evidence. One
98
+ finding contains one base verdict and zero or more cause tags. Multiple failed layers produce linked
99
+ findings; they are not collapsed into a composite base verdict or suppressed by first-match logic.
100
+ `PASS` is valid only when no failure finding exists.
101
+
@@ -0,0 +1,101 @@
1
+ # UI knowledge
2
+
3
+ Cây này chứa universal UI law dùng chung cho mọi Grammar family đã publish, chia thành ba nhóm theo
4
+ operator đọc từng law.
5
+ Nó sở hữu 115 law X-n ổn định đang sống (36 ở composition, 60 ở presentation, 19 ở proof), cộng
6
+ năm id composition đã nghỉ vào COVERAGE-1 và không bao giờ dùng lại, cùng với selection condition
7
+ quan sát được, ownership decision, deterministic verdict và audit vector. Đây không phải implementation hay consumer cookbook. Nó không sở hữu business fact, copy riêng của page, route, permission,
8
+ identity artwork, effect sản phẩm hay lựa chọn material của family.
9
+
10
+ ## Runtime policy
11
+
12
+ - Knowledge chuẩn cho agent/runtime chỉ là file `.md` tiếng Anh.
13
+ - File `.vi.md` cùng tên là bản mirror đầy đủ dành cho human review. Không bao giờ load, index hay
14
+ cite chúng như runtime authority.
15
+ - Grammar operator resolve file canonical nhỏ nhất liên quan cùng rule ID. Từng file không mang
16
+ routing metadata theo topic.
17
+ - Rule ID là địa chỉ ổn định, công khai. Chỉ được nối thêm `PREFIX-n` kế tiếp theo thứ tự; không bao
18
+ giờ đánh số lại, tái sử dụng, hay lặng lẽ đổi nghĩa một ID đã tồn tại.
19
+ - Knowledge sở hữu invariant decision và audit vector, không sở hữu implementation status, migration
20
+ plan, workflow, operator DAG hay task orchestration. Capability/debt hiện tại thuộc về plan và audit.
21
+
22
+ ## Grammar binding
23
+
24
+ `@starci/grammar/common` là authority công khai cho props, semantics, renderer anatomy, state,
25
+ accessibility, composition và universal implementation. Một application đã chọn family chỉ import
26
+ đúng stylesheet của family đó; stylesheet đó import Common. Import trực tiếp
27
+ `@starci/grammar/common/styles.css` chỉ dành cho trường hợp dùng Common không family có chủ đích và
28
+ cho test harness cô lập. Một application không được import cả hai đường cho cùng một cây đã render.
29
+
30
+ Một visual family là scoped overlay tương thích props, khai báo qua `defineGrammarFamily`. Nó có thể
31
+ thay một Common renderer đã biết bằng props tương thích chính xác, hoặc thêm extension không xung
32
+ đột; stylesheet của nó được scope bằng `data-grammar-family`. Nó phải giữ nguyên meaning, state
33
+ behavior, accessibility, ownership và substitutability của Common.
34
+
35
+ Business/application code chọn đúng một family và cung cấp domain content, data, permission, handler
36
+ và verified state. Application CSS được phép sở hữu page canvas, product layout/content/media và
37
+ placement thông qua extension point công khai. Nó không được reach-through, dựng lại hay override
38
+ anatomy, spacing, semantics, state, focus hay variant do Common sở hữu. Family document ghi lại lựa
39
+ chọn overlay và conformance evidence; chúng không bao giờ lặp lại hay định nghĩa lại những universal
40
+ law này. Một capability tái dùng còn thiếu là gap của Common, không phải giấy phép cho anatomy cục bộ
41
+ theo sản phẩm hay một universal rule riêng của family.
42
+
43
+ ## Ba nhóm
44
+
45
+ Một topic sống cùng operator đọc nó. Topic nào không operator nào đọc thì không có lý do tồn tại.
46
+
47
+ | Nhóm | Quyết định | Ai đọc |
48
+ | --- | --- | --- |
49
+ | [`composition/`](composition/INDEX.vi.md) | Ràng buộc mà một direction phải thoả, sau khi gu thẩm mỹ đã quyết ở grammars | `frontend.direction.decide` |
50
+ | [`presentation/`](presentation/INDEX.vi.md) | Ranh giới do app sở hữu lấy giá trị CSS nào | `frontend.presentation.resolve` |
51
+ | [`proof/`](proof/INDEX.vi.md) | Thứ chỉ đúng sau khi đã render | `frontend.surface.audit` |
52
+
53
+ Phép thử để xếp một topic là: đọc source có trả lời được không. Giá trị khoảng cách đọc được từ class
54
+ nên thuộc presentation. Số hành động trội đã chốt trước khi có cây nên thuộc composition. Thứ tự bàn
55
+ phím có khớp thứ tự nhìn thấy hay không thì phải chạy mới biết, nên thuộc proof.
56
+
57
+ Quy ước viết code sinh ra tất cả những thứ này nằm ở [`patterns/`](../patterns/fe/INDEX.vi.md), còn
58
+ phần hiện thực của từng họ nằm ở [`grammars/`](../grammars/starci/INDEX.vi.md).
59
+
60
+ ## Rule binding architecture
61
+
62
+ Knowledge định nghĩa một rule nghĩa là gì; nó không hard-code instance DOM hiện tại nào pass rule đó.
63
+ Một Common reusable expose stable anchor cho component, slot và relationship. Một binding registry
64
+ co-located hoặc generated map các anchor đó sang rule, với tối thiểu:
65
+
66
+ - một binding ID và version ổn định;
67
+ - `ruleId`;
68
+ - target slot hoặc between-slot relationship chính xác;
69
+ - `when` variant, state hoặc composition selector;
70
+ - expected owner anchor.
71
+
72
+ Registry không bao giờ lặp lại metric hay behavior của rule. Application không tự tay viết mảng rule,
73
+ và không markup nào tự gán nhãn pass cho chính nó. Auditor resolve binding từ stable DOM anchor, thu
74
+ thập rendered evidence, và ghi rule ID cùng finding vào audit result. Rule ID không rõ, slot thiếu,
75
+ anchor cũ và binding mồ côi đều fail validation. DOM nằm ngoài một reusable đã đăng ký có thể được
76
+ chọn bằng semantic inspection, nhưng không thể nhận `PASS` nếu thiếu cùng owner và runtime evidence.
77
+
78
+ Contract claim là ngoại lệ duy nhất, và nó không phải self-assessment. Một rule-binding operator có
79
+ thể emit `data-contract` trên node nó đã resolve, dưới dạng danh sách identifier cách nhau bằng
80
+ space mà node đó tuyên bố thoả mãn. Claim nêu ra một ý định để auditor có thể phản bác: một node claim
81
+ `GAP-4` trong khi gap tính ra là `1.5rem` là một finding, một node mang spacing mà không claim gì là
82
+ một giá trị vô chủ, và một identifier được claim nhưng không có trong knowledge đã publish thì fail
83
+ validation. Claim không bao giờ mang verdict, score hay `PASS`, và một claim viết tay là không hợp lệ
84
+ vì chỉ receipt của operator mới verify được. Grammar emit cùng một claim trên những element hiện thực
85
+ một relationship nó sở hữu, chính là các row trong bảng "Common already owns" của từng topic, nên một
86
+ giá trị nội bộ của Grammar không bao giờ là giá trị vô chủ và resolver không claim lại những node đó.
87
+ Receipt vẫn là bản ghi bền vững, nên attribute này có thể bị strip khỏi production build mà không làm
88
+ yếu bất kỳ audit nào.
89
+
90
+ ## Canonical verdict model
91
+
92
+ Base verdict chỉ gồm đúng: `PASS`, `COMMON_CAPABILITY_MISSING`, `COMMON_IMPLEMENTATION_GLITCH`,
93
+ `FAMILY_OVERRIDE_GLITCH`, `APP_REIMPLEMENTATION`, `APP_OVERRIDE`, `APP_WORKAROUND`, `PROOF_MISSING`.
94
+
95
+ Cause tag chỉ gồm đúng: `VALUE_DRIFT`, `VENDOR_LEAK`, `WRONG_OWNER`, `OFF_SCALE_VALUE`,
96
+ `DOUBLE_OWNER`, `PHYSICAL_SIDE_DRIFT`, `STATE_OR_VIEWPORT_DRIFT`.
97
+
98
+ Đánh giá theo thứ tự capability, output cô lập của Common, delta của family, delta của app, rồi mới
99
+ tới owner/state evidence. Một finding chứa đúng một base verdict và không hoặc nhiều cause tag. Nhiều
100
+ layer fail cùng lúc tạo ra các finding liên kết; chúng không bị gộp thành một base verdict tổng hợp
101
+ hay bị first-match logic che mất. `PASS` chỉ hợp lệ khi không tồn tại failure finding nào.
@@ -0,0 +1,60 @@
1
+ # UI composition
2
+
3
+ Composition is the decision layer that runs before any DOM exists:
4
+
5
+ ```text
6
+ business
7
+ -> composition decides regions, rank, actions, states and emphasis
8
+ -> presentation resolves CSS values on app-owned boundaries
9
+ -> rendered UI
10
+ ```
11
+
12
+ Every rule in this folder is consumed by the direction operator. That operator answers the questions
13
+ that must be settled while the page is still a description: which regions the page has, which
14
+ content outranks which, which action carries the decision, which conditions the feature can be in,
15
+ what the reader is told at each outcome, and where the scarce dominant emphasis is spent. These
16
+ topics belong together because each of them is a commitment made before rendering, and because they
17
+ constrain one another — a region without an anchor has no hierarchy to spend accent on, and a state
18
+ with no carrier has nothing for feedback to describe. Nothing here can be repaired by a later CSS
19
+ value, which is exactly why it is decided first.
20
+
21
+ ## Catalog
22
+
23
+ | Knowledge | What it decides | Rules |
24
+ | --- | --- | --- |
25
+ | [Layout](layout.md) | Which visible task regions exist, who owns their tracks and scrolling | LAYOUT-1 to LAYOUT-4 |
26
+ | [Hierarchy](hierarchy.md) | Which information rank each piece of meaning receives | HIERARCHY-1 to HIERARCHY-5 |
27
+ | [Responsive](responsive.md) | What survives as space changes, and which query owns the change | RESPONSIVE-1 to RESPONSIVE-4 |
28
+ | [CTA](cta.md) | Which action carries the decision, and what its emphasis promises | CTA-1 to CTA-5 |
29
+ | [Action](action.md) | What one activation does, and who owns the effect and the pending state | ACTION-1 to ACTION-3 |
30
+ | [State](state.md) | Which conditions exist, and which published carrier holds each one | STATE-1 to STATE-7 |
31
+ | [Feedback](feedback.md) | Who reports a failure, a correction, a recovery, and a result | FEEDBACK-1 to FEEDBACK-3 |
32
+ | [Accent](accent.md) | Where the scarce strongest emphasis is spent | ACCENT-1 to ACCENT-5 |
33
+ | [Coverage](coverage.md) | What the direction receipt must enumerate before it is emitted | COVERAGE-1 |
34
+
35
+ Five per-topic coverage rules were merged into COVERAGE-1, and a retired address is never reused:
36
+ retired are `ACTION-4`, `STATE-4`, `FEEDBACK-4`, `LAYOUT-5`, and `RESPONSIVE-5`.
37
+
38
+ ## Rule shape
39
+
40
+ `LAYOUT-1`, `STATE-5`, and the other `PREFIX-n` names are stable ordinal addresses within their
41
+ topic. The number is not a severity, a component variant, or a value on a scale.
42
+
43
+ Every rule carries its heading, one line naming what the rule governs, and one table:
44
+
45
+ | Case | When | Assert |
46
+ | --- | --- | --- |
47
+ | Case 1 | The concrete situation that reaches this rule. | A falsifiable statement about the direction receipt or the composed tree, in language the product can read. |
48
+
49
+ The `Assert` cell states a predicate the receipt or the composed tree either satisfies or fails, not
50
+ advice and not a class name. It may name a published component or prop where that is what must be
51
+ carried, but it never resolves a CSS value; that belongs to presentation. Taste and layout are
52
+ decided in `knowledge/grammars/starci`; these rules only say what a direction must satisfy.
53
+
54
+ A case that belongs to a neighbouring rule is not a table row. It goes on one line after the table,
55
+ as `Not this rule: <condition> is PREFIX-n`. Each file closes with a
56
+ `## What this file does not decide` section linking its siblings and the proof knowledge that
57
+ observes the result.
58
+
59
+ Component and prop names in these files resolve to `@starci/grammar/common`. An API that does not
60
+ exist there is not written into a rule; a required capability that is missing is recorded as a gap.
@@ -0,0 +1,63 @@
1
+ # UI composition
2
+
3
+ Composition là tầng quyết định chạy trước khi có bất kỳ cây DOM nào:
4
+
5
+ ```text
6
+ business
7
+ -> composition quyết định vùng, cấp độ, action, state và điểm nhấn
8
+ -> presentation chốt giá trị CSS trên boundary do app sở hữu
9
+ -> UI đã render
10
+ ```
11
+
12
+ Mọi rule trong folder này được operator direction tiêu thụ. Operator đó trả lời những câu hỏi phải
13
+ chốt xong khi trang vẫn còn là một bản mô tả: trang có những vùng nào, nội dung nào đứng trên nội
14
+ dung nào, action nào mang quyết định, tính năng có thể rơi vào những điều kiện nào, người đọc được
15
+ nói gì ở mỗi kết cục, và phần nhấn mạnh mạnh nhất vốn khan hiếm thì tiêu ở đâu. Những chủ đề này
16
+ nằm chung một chỗ vì mỗi cái đều là một cam kết đưa ra trước lúc render, và vì chúng ràng buộc lẫn
17
+ nhau: một vùng không có anchor thì chẳng có cấp độ nào để tiêu accent lên, còn một state không có
18
+ carrier thì feedback không có gì để mô tả. Không thứ gì ở đây sửa được bằng một giá trị CSS về sau,
19
+ và đó chính là lý do nó được quyết trước.
20
+
21
+ ## Danh mục
22
+
23
+ | Knowledge | Quyết định điều gì | Rule |
24
+ | --- | --- | --- |
25
+ | [Layout](layout.vi.md) | Trang có những vùng nhiệm vụ nào, ai sở hữu track và scroll của chúng | LAYOUT-1 đến LAYOUT-4 |
26
+ | [Hierarchy](hierarchy.vi.md) | Mỗi mảng ý nghĩa nhận cấp độ thông tin nào | HIERARCHY-1 đến HIERARCHY-5 |
27
+ | [Responsive](responsive.vi.md) | Cái gì sống sót khi không gian đổi, và query nào sở hữu thay đổi đó | RESPONSIVE-1 đến RESPONSIVE-4 |
28
+ | [CTA](cta.vi.md) | Action nào mang quyết định, và điểm nhấn của nó hứa điều gì | CTA-1 đến CTA-5 |
29
+ | [Action](action.vi.md) | Một lần kích hoạt làm gì, ai sở hữu hiệu ứng và trạng thái pending | ACTION-1 đến ACTION-3 |
30
+ | [State](state.vi.md) | Có những điều kiện nào, và carrier công khai nào giữ từng cái | STATE-1 đến STATE-7 |
31
+ | [Feedback](feedback.vi.md) | Ai báo lỗi, ai chỉ cách sửa, ai phục hồi, ai công bố kết quả | FEEDBACK-1 đến FEEDBACK-3 |
32
+ | [Accent](accent.vi.md) | Phần nhấn mạnh mạnh nhất và khan hiếm được tiêu ở đâu | ACCENT-1 đến ACCENT-5 |
33
+ | [Coverage](coverage.vi.md) | Receipt của direction phải liệt kê những gì trước khi được phát ra | COVERAGE-1 |
34
+
35
+ Năm rule phạm vi của từng chủ đề đã gộp vào COVERAGE-1, và một địa chỉ đã nghỉ thì không dùng lại:
36
+ đã nghỉ là `ACTION-4`, `STATE-4`, `FEEDBACK-4`, `LAYOUT-5` và `RESPONSIVE-5`.
37
+
38
+ ## Cấu trúc rule
39
+
40
+ `LAYOUT-1`, `STATE-5` và các tên `PREFIX-n` khác là địa chỉ thứ tự ổn định trong chủ đề của chúng.
41
+ Con số không phải mức độ nghiêm trọng, không phải variant của component, cũng không phải một vị trí
42
+ trên thang giá trị.
43
+
44
+ Mỗi rule gồm heading, một dòng gọi tên thứ mà rule chi phối, và đúng một bảng:
45
+
46
+ | Case | Dùng khi | Khẳng định |
47
+ | --- | --- | --- |
48
+ | Case 1 | Tình huống cụ thể dẫn tới rule này. | Một khẳng định phủ định được về receipt của direction hoặc về cây đã dựng, viết bằng ngôn ngữ mà phía sản phẩm đọc được. |
49
+
50
+ Ô `Khẳng định` nêu một mệnh đề mà receipt hoặc cây đã dựng hoặc thoả hoặc trượt, không phải lời
51
+ khuyên và không phải tên class. Nó có thể gọi tên một component hay prop công khai khi đó chính là
52
+ thứ phải được mang, nhưng nó không bao giờ chốt một giá trị CSS; phần đó thuộc về presentation. Bố
53
+ cục và gu thẩm mỹ được quyết trong `knowledge/grammars/starci`; các rule ở đây chỉ nói một direction
54
+ phải thoả điều gì.
55
+
56
+ Một case thuộc về rule hàng xóm thì không nằm trong bảng. Nó đứng thành một dòng ngay sau bảng, theo
57
+ dạng `Không phải rule này: <điều kiện> thuộc PREFIX-n`. Mỗi file khép lại bằng mục
58
+ `## File này không quyết định`, dẫn sang các file anh em và sang nhóm proof, nơi kết quả được quan
59
+ sát.
60
+
61
+ Tên component và tên prop trong các file này đều phải phân giải được về `@starci/grammar/common`.
62
+ Một API không tồn tại ở đó thì không được viết vào rule; một năng lực cần mà chưa có thì ghi nhận
63
+ thành capability gap.
@@ -0,0 +1,73 @@
1
+ # Accent composition
2
+
3
+ This file answers one question: the page has a small budget of strongest emphasis, so where is it
4
+ spent, and what does spending it there promise?
5
+
6
+ Accent is scarce by design. Every extra dominant treatment reduces what the previous one meant, so
7
+ the decision is about allocation, not about paint. Nothing in this file may change what the product
8
+ is claiming; accent only makes an existing claim easier to find.
9
+
10
+ ## ACCENT-1 — One dominant decision accent
11
+
12
+ Governs how many strongest treatments a decision region may hold.
13
+
14
+ | Case | When | Assert |
15
+ | --- | --- | --- |
16
+ | Case 1 | A decision region offers one clear next action | Exactly one dominant accent sits inside that decision owner, on `Button variant="primary"`, whether it carries `onPress` or `href` |
17
+ | Case 2 | Sibling actions share the region | Each sibling carries a weaker published variant that states its real consequence |
18
+ | Case 3 | Two peer choices genuinely carry equal consequence | Neither carries the dominant accent, and no paint breaks the tie |
19
+ | Case 4 | Separate regions each have their own next step | Each dominant accent is counted within its own decision owner, and none is counted twice |
20
+ | Case 5 | The count would change in a compact layout or a loading state | The count of dominant accents is identical in every state and at every width |
21
+
22
+ ## ACCENT-2 — Compact identity accent
23
+
24
+ Governs the small visual anchor that helps a reader scan peers.
25
+
26
+ | Case | When | Assert |
27
+ | --- | --- | --- |
28
+ | Case 1 | Peer features, rows, or sections need a compact anchor for scanning | `IconTile tone="accent"`, or `Icon` in its declared role, carries it, with a reviewed semantic glyph named in the receipt |
29
+ | Case 2 | The anchor sits beside a name | The visible text identity remains, and the mark never replaces it |
30
+ | Case 3 | The direction wants a different plate size or shape | The published geometry carries it, at `sm` 32 or `md` 40 nominal CSS pixels, and no coloured rounded square is rebuilt around an icon |
31
+ | Case 4 | The glyph would be the only identity for an unfamiliar feature | Every unfamiliar feature carries a name; no glyph is its sole identity |
32
+
33
+ ## ACCENT-3 — Selection, destination, and focus stay distinct
34
+
35
+ Governs three treatments that tend to collapse into one another.
36
+
37
+ | Case | When | Assert |
38
+ | --- | --- | --- |
39
+ | Case 1 | A region can hold a persistent selection, a destination, a command emphasis, and keyboard focus at once | Each of the four resolves to its own published owner and its own treatment |
40
+ | Case 2 | Selection is being expressed | Selection carries a non-colour cue and survives focus moving elsewhere |
41
+ | Case 3 | A destination sits inside body copy | It is identifiable as a destination at rest, before hover and before focus |
42
+ | Case 4 | Colour is removed, or the viewer is in forced colours | All three remain distinguishable, because none relies on fill alone |
43
+ | Case 5 | A brief hover is mistaken for selection | No transient cue carries a persistent value |
44
+
45
+ ## ACCENT-4 — Accent progress requires a real measurement
46
+
47
+ Governs the accent fill that reads as completion.
48
+
49
+ | Case | When | Assert |
50
+ | --- | --- | --- |
51
+ | Case 1 | Authority supplies a verified value from 0 to 100 | `Progress` carries a truthful `label` and that `value`, and the accent fill presents that measurement only |
52
+ | Case 2 | The value has not resolved | `isSkeleton` is bound, and no zero-length bar states a measurement nobody made |
53
+ | Case 3 | A bar, ring, or line is decorative, or expresses a ranking rather than completion | It carries no progress semantics at all |
54
+ | Case 4 | The fill is tempting to read as an outcome | The fill states a measurement, and a separate outcome owner states the outcome |
55
+
56
+ ## ACCENT-5 — Outcome and destructive authority are not accent
57
+
58
+ Governs the treatments accent must not stand in for.
59
+
60
+ | Case | When | Assert |
61
+ | --- | --- | --- |
62
+ | Case 1 | Content reports success, warning, danger, pending, or selection | `Badge`, a presentation-state owner, or the current-state owner carries it; the primary accent carries none of them |
63
+ | Case 2 | A final destructive CTA is required | A typed danger action treatment is required first, and while `ButtonVariant` publishes no danger value the receipt records that gap |
64
+ | Case 3 | Local red would bridge that gap today | No local red and no family repaint of `primary` appears against that action |
65
+ | Case 4 | An ordinary primary action looks consequential | Consequence and confirmation are named in the product decision, not inferred from the emphasis |
66
+
67
+ ## What this file does not decide
68
+
69
+ Which rank the content carries is [Hierarchy](hierarchy.md), and which action deserves the decision
70
+ emphasis is [CTA](cta.md). Which conditions the state owners can be in is [State](state.md).
71
+ Whether a distinction survives forced colours and reduced motion once rendered is
72
+ [Accessibility](../proof/accessibility.md) and [Motion](../proof/motion.md), and whether the
73
+ emphasis claims something authority never said is [Render truth](../proof/render-truth.md).
@@ -0,0 +1,74 @@
1
+ # Accent composition
2
+
3
+ File này trả lời đúng một câu hỏi: trang chỉ có một ngân sách nhỏ cho phần nhấn mạnh mạnh nhất, vậy
4
+ ngân sách đó tiêu ở đâu, và tiêu ở đó thì hứa điều gì.
5
+
6
+ Accent khan hiếm là do thiết kế. Mỗi treatment chủ đạo thêm vào lại làm giảm ý nghĩa của cái trước
7
+ đó, nên đây là quyết định về phân bổ chứ không phải về sơn phết. Không thứ gì trong file này được
8
+ đổi điều mà sản phẩm đang tuyên bố; accent chỉ làm cho một tuyên bố sẵn có dễ tìm hơn.
9
+
10
+ ## ACCENT-1 — Một điểm nhấn quyết định chủ đạo
11
+
12
+ Chi phối số treatment mạnh nhất mà một vùng quyết định được giữ.
13
+
14
+ | Case | Dùng khi | Khẳng định |
15
+ | --- | --- | --- |
16
+ | Case 1 | Một vùng quyết định có đúng một bước kế tiếp rõ ràng | Đúng một điểm nhấn chủ đạo nằm bên trong decision owner đó, trên `Button variant="primary"`, dù nó mang `onPress` hay `href` |
17
+ | Case 2 | Các action anh em cùng ở trong vùng | Mỗi action anh em mang một variant công khai yếu hơn, nói đúng hệ quả thật của nó |
18
+ | Case 3 | Hai lựa chọn ngang hàng thật sự mang hệ quả ngang nhau | Không cái nào mang điểm nhấn chủ đạo, và không phần sơn nào phá thế hoà |
19
+ | Case 4 | Nhiều vùng tách biệt, mỗi vùng có bước kế tiếp riêng | Mỗi điểm nhấn chủ đạo được đếm trong chính decision owner của nó, và không cái nào bị đếm hai lần |
20
+ | Case 5 | Con số đó sẽ đổi ở bố cục hẹp hoặc ở trạng thái đang tải | Số điểm nhấn chủ đạo trùng khít nhau ở mọi state và mọi bề rộng |
21
+
22
+ ## ACCENT-2 — Điểm nhấn định danh gọn
23
+
24
+ Chi phối cái mỏ neo thị giác nhỏ giúp người đọc quét qua các mục ngang hàng.
25
+
26
+ | Case | Dùng khi | Khẳng định |
27
+ | --- | --- | --- |
28
+ | Case 1 | Các tính năng, hàng hoặc section ngang hàng cần một mỏ neo gọn để quét | `IconTile tone="accent"`, hoặc `Icon` ở vai trò đã khai báo, mang nó, với glyph ngữ nghĩa đã duyệt được gọi tên trong receipt |
29
+ | Case 2 | Mỏ neo nằm cạnh một cái tên | Phần chữ nhìn thấy được ở lại, và dấu hiệu không bao giờ thay chỗ nó |
30
+ | Case 3 | Direction muốn một plate khác cỡ hoặc khác hình | Geometry đã công bố mang nó, ở `sm` 32 hoặc `md` 40 pixel CSS danh nghĩa, và không ô bo tròn có màu nào được dựng lại quanh một icon |
31
+ | Case 4 | Glyph sẽ là danh tính duy nhất của một tính năng xa lạ | Mọi tính năng xa lạ đều mang một cái tên; không glyph nào là danh tính duy nhất của nó |
32
+
33
+ ## ACCENT-3 — Selection, điểm đến và focus vẫn tách bạch
34
+
35
+ Chi phối ba treatment hay bị nhập lại thành một.
36
+
37
+ | Case | Dùng khi | Khẳng định |
38
+ | --- | --- | --- |
39
+ | Case 1 | Một vùng có thể cùng lúc mang selection bền, một điểm đến, một điểm nhấn câu lệnh và focus bàn phím | Cả bốn thứ đều phân giải về owner công khai riêng và treatment riêng của mình |
40
+ | Case 2 | Đang diễn đạt selection | Selection mang một dấu hiệu không dựa vào màu và sống sót khi focus dời đi chỗ khác |
41
+ | Case 3 | Một điểm đến nằm trong đoạn văn | Nó nhận ra được là điểm đến ngay lúc nghỉ, trước hover và trước focus |
42
+ | Case 4 | Màu bị bỏ đi, hoặc người xem ở chế độ forced colors | Cả ba vẫn phân biệt được, vì không cái nào chỉ dựa vào phần tô |
43
+ | Case 5 | Một cú hover thoáng qua bị nhầm là selection | Không dấu hiệu thoáng qua nào mang một giá trị bền |
44
+
45
+ ## ACCENT-4 — Accent cho tiến độ đòi một phép đo thật
46
+
47
+ Chi phối phần tô accent đọc lên như mức hoàn thành.
48
+
49
+ | Case | Dùng khi | Khẳng định |
50
+ | --- | --- | --- |
51
+ | Case 1 | Authority cấp một giá trị đã kiểm chứng từ 0 đến 100 | `Progress` mang `label` trung thực và đúng `value` đó, và phần tô accent chỉ trình bày phép đo ấy |
52
+ | Case 2 | Giá trị chưa giải quyết | `isSkeleton` được gắn, và không thanh dài bằng không nào nêu ra một phép đo không ai thực hiện |
53
+ | Case 3 | Một thanh, vòng hay đường chỉ để trang trí, hoặc diễn đạt thứ hạng chứ không phải mức hoàn thành | Nó không mang ngữ nghĩa progress nào cả |
54
+ | Case 4 | Phần tô rất dễ bị đọc thành một kết cục | Phần tô nêu một phép đo, và một owner kết cục riêng nêu kết cục |
55
+
56
+ ## ACCENT-5 — Kết cục và authority huỷ hoại không phải là accent
57
+
58
+ Chi phối những treatment mà accent không được đứng thay.
59
+
60
+ | Case | Dùng khi | Khẳng định |
61
+ | --- | --- | --- |
62
+ | Case 1 | Nội dung báo thành công, cảnh báo, nguy hiểm, đang chạy hoặc selection | `Badge`, một presentation-state owner, hoặc owner của trạng thái hiện hành mang nó; accent primary không mang thứ nào trong số đó |
63
+ | Case 2 | Cần một CTA huỷ hoại cuối cùng | Trước hết cần một treatment action danger có kiểu, và chừng nào `ButtonVariant` chưa công bố giá trị danger thì receipt ghi nhận gap đó |
64
+ | Case 3 | Màu đỏ cục bộ có thể lấp gap đó ngay hôm nay | Không màu đỏ cục bộ nào và không lần sơn lại `primary` của family nào đứng cạnh action đó |
65
+ | Case 4 | Một action primary bình thường trông có vẻ nặng hệ quả | Hệ quả và bước xác nhận được gọi tên trong quyết định sản phẩm, không suy ra từ phần nhấn mạnh |
66
+
67
+ ## File này không quyết định
68
+
69
+ Nội dung mang cấp độ nào thuộc [Hierarchy](hierarchy.vi.md), và action nào xứng đáng nhận điểm nhấn
70
+ quyết định thuộc [CTA](cta.vi.md). Các state owner có thể ở những điều kiện nào thuộc
71
+ [State](state.vi.md). Một khác biệt có sống sót qua forced colors và qua reduced motion sau khi
72
+ render không thuộc [Accessibility](../proof/accessibility.vi.md) và [Motion](../proof/motion.vi.md),
73
+ còn điểm nhấn có tuyên bố điều mà authority chưa từng nói không thuộc
74
+ [Render truth](../proof/render-truth.vi.md).
@@ -0,0 +1,55 @@
1
+ # Action composition
2
+
3
+ This file answers one question: when the reader activates something, what exactly happens, and who
4
+ owns it?
5
+
6
+ Action decisions come before the tree exists because they settle the count of owners and the count
7
+ of effects. A single activation reaching two handlers, or a command wearing anchor semantics, is a
8
+ composition mistake that no later styling can repair.
9
+
10
+ ## ACTION-1 — One activation, one effect
11
+
12
+ Governs how many things may respond to a single press.
13
+
14
+ | Case | When | Assert |
15
+ | --- | --- | --- |
16
+ | Case 1 | An activation changes application state | Exactly one node owns the effect, and it is `Button`, or `TextAction` where the command reads as text; no second node carries `onPress` for the same activation |
17
+ | Case 2 | The command participates in a form | The receipt names the chosen `Button.type`, so submit behaviour is stated rather than inherited from the enclosing form |
18
+ | Case 3 | The direction wants the whole row or container to be clickable too | The receipt names one owner for that activation; no clickable wrapper encloses a published command that owns the same effect |
19
+ | Case 4 | An ancestor or a document-level listener exists on the same path | No ancestor or document listener on that path responds to the same activation |
20
+
21
+ Not this rule: whether the surface itself is the action is STATE-5.
22
+
23
+ ## ACTION-2 — Pending belongs to the initiator
24
+
25
+ Governs which control shows that work is in flight.
26
+
27
+ | Case | When | Assert |
28
+ | --- | --- | --- |
29
+ | Case 1 | A command accepted work that has not settled | The node that initiated the work binds `isPending`; its label is unchanged, its busy state is exposed, and a second activation is refused |
30
+ | Case 2 | The work was started by the recovery action inside an empty or failed region | `EmptyNotice.isActionPending` carries it, and it resolves to the button that region owns |
31
+ | Case 3 | Other controls are visible while that work runs | No other node changes state for that work, and no page-wide lock or spinner stands in for the initiator's pending |
32
+ | Case 4 | The direction is tempted to swap in `isDisabled` for the duration | The receipt binds `isPending`, not `isDisabled`, for accepted work; disabled appears only where the work cannot start |
33
+ | Case 5 | The owner that needs pending publishes no pending prop | A `GRAMMAR_REQUIRED` gap naming that owner exists in the receipt, and no application-level pending substitute appears in the tree |
34
+
35
+ ## ACTION-3 — Consequence chooses the semantics
36
+
37
+ Governs the native element the reader operates.
38
+
39
+ | Case | When | Assert |
40
+ | --- | --- | --- |
41
+ | Case 1 | The consequence is following a real address | The node keeps `TextAction` with its `href` and stays an anchor under every appearance it is given |
42
+ | Case 2 | The consequence is a state change | The node is `Button` or `TextAction` and carries a real handler, not a destination |
43
+ | Case 3 | The direction wants to observe a follow before it happens | `TextAction.onFollow` is present only as an observer; the node still carries a real destination |
44
+ | Case 4 | An anchor is being used with a click handler and no destination | No such node exists in the tree; the command owner carries the effect instead |
45
+
46
+ Retired: ACTION-4 is retired into COVERAGE-1 and is not reused; the address stays spent.
47
+
48
+ ## What this file does not decide
49
+
50
+ Which action deserves emphasis and what its variant promises is [CTA](cta.md). Which surface is
51
+ itself an action, and which controlled values persist, is [State](state.md). What the reader is told
52
+ after the action settles is [Feedback](feedback.md). What the receipt must enumerate about these
53
+ actions is [Coverage](coverage.md). Whether the rendered target is named, sized, and visibly
54
+ focusable is [Accessibility](../proof/accessibility.md) and [Focus](../proof/focus.md), and whether
55
+ the resulting claim is true is [Render truth](../proof/render-truth.md).
@@ -0,0 +1,56 @@
1
+ # Action composition
2
+
3
+ File này trả lời đúng một câu hỏi: khi người đọc kích hoạt một thứ gì đó thì chính xác chuyện gì xảy
4
+ ra, và ai sở hữu chuyện đó.
5
+
6
+ Quyết định về action đến trước khi có cây DOM, vì chúng chốt số lượng owner và số lượng hiệu ứng.
7
+ Một lần kích hoạt chạm tới hai handler, hay một câu lệnh khoác ngữ nghĩa của anchor, đều là lỗi
8
+ composition mà không kiểu styling nào về sau sửa được.
9
+
10
+ ## ACTION-1 — Một lần kích hoạt, một hiệu ứng
11
+
12
+ Chi phối số thứ được phép phản hồi cho một lần bấm.
13
+
14
+ | Case | Dùng khi | Khẳng định |
15
+ | --- | --- | --- |
16
+ | Case 1 | Một lần kích hoạt thay đổi state của ứng dụng | Đúng một node sở hữu hiệu ứng, và node đó là `Button`, hoặc `TextAction` khi câu lệnh cần đọc như chữ; không node thứ hai nào mang `onPress` cho cùng lần kích hoạt |
17
+ | Case 2 | Câu lệnh tham gia vào một form | Receipt gọi tên `Button.type` đã chọn, nên hành vi submit được nêu ra chứ không thừa hưởng từ form bao ngoài |
18
+ | Case 3 | Direction muốn cả hàng hoặc cả container cũng bấm được | Receipt gọi tên đúng một owner cho lần kích hoạt đó; không wrapper bấm được nào bọc quanh một câu lệnh công khai đang giữ cùng hiệu ứng |
19
+ | Case 4 | Có listener ở cấp tổ tiên hoặc cấp document nằm trên cùng đường đi | Không listener tổ tiên hay listener cấp document nào trên đường đi đó phản hồi cùng lần kích hoạt |
20
+
21
+ Không phải rule này: bản thân surface có phải là action hay không thuộc STATE-5.
22
+
23
+ ## ACTION-2 — Pending thuộc về kẻ khởi động
24
+
25
+ Chi phối control nào hiển thị rằng việc đang chạy.
26
+
27
+ | Case | Dùng khi | Khẳng định |
28
+ | --- | --- | --- |
29
+ | Case 1 | Một câu lệnh đã nhận việc và việc chưa xong | Node đã khởi động việc mang `isPending`; nhãn của nó không đổi, trạng thái bận được để lộ, và lần kích hoạt thứ hai bị từ chối |
30
+ | Case 2 | Việc do action phục hồi bên trong một vùng rỗng hoặc vùng lỗi khởi động | `EmptyNotice.isActionPending` mang nó, và prop đó phân giải về đúng nút mà vùng đó sở hữu |
31
+ | Case 3 | Có những control khác đang hiển thị trong lúc việc chạy | Không node nào khác đổi state vì việc đó, và không khoá toàn trang hay spinner toàn cục nào đứng thay cho pending của kẻ khởi động |
32
+ | Case 4 | Direction bị cám dỗ tráo `isDisabled` vào trong khoảng thời gian đó | Receipt gắn `isPending` chứ không phải `isDisabled` cho việc đã nhận; disabled chỉ xuất hiện ở nơi việc chưa thể bắt đầu |
33
+ | Case 5 | Owner cần pending lại không công bố prop pending nào | Trong receipt có một gap `GRAMMAR_REQUIRED` gọi tên owner đó, và không có thứ thay thế pending cấp ứng dụng nào trong cây |
34
+
35
+ ## ACTION-3 — Hệ quả chọn ngữ nghĩa
36
+
37
+ Chi phối phần tử native mà người đọc thao tác.
38
+
39
+ | Case | Dùng khi | Khẳng định |
40
+ | --- | --- | --- |
41
+ | Case 1 | Hệ quả là đi tới một địa chỉ thật | Node giữ `TextAction` cùng `href` của nó và vẫn là anchor dưới mọi appearance được khoác lên |
42
+ | Case 2 | Hệ quả là một thay đổi state | Node là `Button` hoặc `TextAction` và mang handler thật, không mang điểm đến |
43
+ | Case 3 | Direction muốn quan sát một lần follow trước khi nó xảy ra | `TextAction.onFollow` chỉ có mặt với vai trò quan sát; node vẫn mang một điểm đến thật |
44
+ | Case 4 | Một anchor đang được dùng kèm click handler mà không có điểm đến | Không node nào như vậy tồn tại trong cây; owner của câu lệnh mang hiệu ứng thay cho nó |
45
+
46
+ Retired: ACTION-4 đã nghỉ, gộp vào COVERAGE-1, và số này không được dùng lại; địa chỉ đó coi như đã tiêu.
47
+
48
+ ## File này không quyết định
49
+
50
+ Action nào xứng đáng được nhấn mạnh và variant của nó hứa gì thuộc [CTA](cta.vi.md). Surface nào tự
51
+ nó là một action, và giá trị điều khiển nào bền vững, thuộc [State](state.vi.md). Người đọc được nói
52
+ gì sau khi action kết thúc thuộc [Feedback](feedback.vi.md). Receipt phải liệt kê những gì về các
53
+ action này thuộc [Coverage](coverage.vi.md). Mục tiêu sau khi render có tên, có kích thước và có
54
+ focus nhìn thấy được không thuộc [Accessibility](../proof/accessibility.vi.md) và
55
+ [Focus](../proof/focus.vi.md), còn tuyên bố sinh ra có đúng sự thật không thuộc
56
+ [Render truth](../proof/render-truth.vi.md).
@@ -0,0 +1,37 @@
1
+ # Coverage composition
2
+
3
+ This file answers one question: what must the direction receipt actually enumerate, so that a later
4
+ operator can exercise the direction instead of guessing at it?
5
+
6
+ Every other composition topic constrains one decision at a time. This one constrains the receipt as
7
+ a whole. Five topics each used to close with a coverage rule of their own, and five copies of one
8
+ idea drift apart. Those five are retired into the single rule below and their numbers are never
9
+ reused; retired are `ACTION-4`, `STATE-4`, `FEEDBACK-4`, `LAYOUT-5`, and `RESPONSIVE-5`. What the
10
+ enumeration is worth is decided elsewhere: layout and taste come from the idioms and the playbook in
11
+ `knowledge/grammars/starci`, and this rule only asserts that the receipt says enough for anyone to
12
+ check them.
13
+
14
+ ## COVERAGE-1 — What the receipt must enumerate
15
+
16
+ Governs the fields a decided `frontend-direction-decision.json` must carry before it may be emitted.
17
+
18
+ | Case | When | Assert |
19
+ | --- | --- | --- |
20
+ | Case 1 | The direction delivers any action | `coverage.actions[]` is non-empty, and every entry names its pointer route, its keyboard route, and every reachable named state of that action, enabled, disabled, pending, and settled, so no route and no state is left implicit |
21
+ | Case 2 | Any action accepts work that does not settle immediately | Every pending path in `coverage.actions[]` names its settlement, cancellation included; no entry declares a pending path whose settlement is absent |
22
+ | Case 3 | The direction declares regions | `coverage.regions[]` is non-empty and covers every entry in `regionModel`, and each entry names one idiom in `knowledge/grammars/starci/playbook.md` and one published composition; no region resolves to a bare arrangement |
23
+ | Case 4 | The composition changes shape as space changes | `coverage.responsive[]` is non-empty and every branch names exactly one owner, a published container query or a published viewport query; no branch names a device and none names two owners |
24
+ | Case 5 | The feature has more than one condition | `coverage.states[]` is non-empty, every entry names its meaning before its carrier, and no carrier appears against two meanings |
25
+ | Case 6 | A family or the application adds a delta over a published owner | Each layer is enumerated separately, so a doubled effect, a lost selected state, a lost compact trigger, or a duplicated announcement is attributable to the layer that introduced it |
26
+
27
+ Not this rule: taking the measurements, running the samples, and counting the announcements is the
28
+ audit operator's work; this rule only fixes what the receipt promised.
29
+
30
+ ## What this file does not decide
31
+
32
+ Which regions exist and who owns their tracks is [Layout](layout.md), and which branch survives a
33
+ reflow is [Responsive](responsive.md). Which conditions exist and which carrier holds each is
34
+ [State](state.md). What one activation does is [Action](action.md), and what the reader is told at
35
+ each outcome is [Feedback](feedback.md). Whether the enumerated paths actually hold once rendered is
36
+ [Focus](../proof/focus.md), [Accessibility](../proof/accessibility.md), and
37
+ [Render truth](../proof/render-truth.md).