@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,47 @@
1
+ # Templates
2
+
3
+ One template per document kind. A template is the skeleton a human copies and, inside it, one fenced
4
+ `json template-contract` block that `scripts/validate-templates.mjs` enforces on every file the
5
+ template applies to and on that file's `.vi.md` mirror. The contract is the authority; the skeleton
6
+ is how a person reads it.
7
+
8
+ | Template | Applies to | Enforces |
9
+ | --- | --- | --- |
10
+ | `ui-composition.template.md` | `knowledge/ui/composition/*.md` | title; only rule sections `PREFIX-n — …`, each with one `Case \| When \| Assert` table; closing section |
11
+ | `ui-presentation.template.md` | `knowledge/ui/presentation/*.md` | title; Scale or Catalog, Owner with its table, free frame sections, of which `<Topic> Common already owns` is generated by `scripts/generate-presentation-owned.mjs` rather than written, rules with one `Case \| When \| Owner \| Render` table; closing section |
12
+ | `ui-proof.template.md` | `knowledge/ui/proof/*.md` | title; only rule sections, each with one `Case \| When \| Observe` table; closing section |
13
+ | `grammars.template.md` | `knowledge/grammars/*/*.md` | title; any sections; every rule section carries one `Case \| Rule \| Common owner \| Core realization` table |
14
+ | `patterns.template.md` | `knowledge/patterns/*/*.md` | title; any sections; every rule section carries one `Case \| When \| Write` table |
15
+ | `kinds/changes.contract.json` + `kinds/changes.skeleton.md` | `response/changes.md` inside a session branch; `templates/changes.example.md` is its enforced example | title; Binding table, Files table, What the next step must know |
16
+ | `operator.template.md` | `operators/*/operator.md` | title `# <operator.id>`; Job, free law sections, Context, Inputs, Requirements, Steps, Outputs, Stops, Next, each with its table; `scripts/validate-operator.mjs` then checks the tables against each other, `errors/`, and `templates/kinds` |
17
+ | `kinds/<kind>.contract.json` | markdown files inside a session branch (`response/response.md`, `critique/response/critique.md`) | pure JSON, checked against `kinds/contract.schema.json`: title regex, ordered sections, each table's header, row count, required rows, cell regexes; `kinds/<kind>.skeleton.md` is the copyable skeleton and must itself pass the contract; `scripts/validate-response.mjs` loads contracts by kind |
18
+ | `kinds/<kind>.schema.json` | `response/data/<name>.json` inside a session branch | JSON Schema of one machine kind |
19
+ | `step/request.schema.json`, `step/response.schema.json` | `request/request.json` and `response/response.json` of every branch and nested exchange | the two gates shared by every operator; `scripts/validate-request.mjs` runs before an agent, `scripts/validate-response.mjs` after |
20
+ | `kinds/` artifact kinds | files an operator declares with type `artifact` (`alternatives`, `direction-image`, `resolved-tree`, `screenshot`, `sheet`, `article`, `image`, `image-prompt`, `track`) | no contract or schema on purpose: the validators check that the file exists and is pointed to; the operator's own `validate.mjs` may inspect it |
21
+
22
+ ## Contract vocabulary
23
+
24
+ - `applies`: globs relative to `.claude`; `*` stays inside one path segment. `INDEX.md` files are never
25
+ claimed: they are reading indexes, not documents of a kind.
26
+ - `title`: a regular expression the first line must match, one per language.
27
+ - `sections`: the ordered `##` headings a document must carry. `{ "free": true }` marks a zone where a
28
+ document may add its own sections; outside a free zone an extra section is an error. A section may
29
+ carry `table`, the exact header row that must open it.
30
+ - A section with a `table` may also carry `minRows` / `exactRows` (how many data rows), `rows` (first-column
31
+ values that must appear, backticks ignored), and `cell` (`{ "<Column>": "<regex>" }`, every data row's
32
+ cell under that column must match; a column absent from this language's header is skipped). A kind
33
+ contract under `kinds/` is single-language JSON: `title`, `heading` and `table` are plain strings.
34
+ - `rules`: `heading` is the regular expression of a rule section, `table` the one header row each rule
35
+ must carry (exactly one table per rule), `closing` the section that must come last, `required`
36
+ whether the document must publish at least one rule. Rule and closing headings are excluded from
37
+ the `sections` walk.
38
+ - Every `.md` a template claims must have a same-stem `.vi.md`, checked against the `vi` form of the
39
+ same contract. The mirror is a human reading copy, never runtime authority.
40
+
41
+ ## Changing a template
42
+
43
+ Change the contract, run `node scripts/validate-templates.mjs`, and bring every document it names
44
+ into conformance in the same commit. A template that the tree does not satisfy is not published.
45
+ `scripts/validate-templates.spec.mjs` proves the validator itself on a synthetic tree: conforming
46
+ documents pass, and a missing section, a wrong order, a wrong table header, an extra table under a
47
+ rule, and a missing mirror each fail with the line that names them.
@@ -0,0 +1,45 @@
1
+ # Khuôn
2
+
3
+ Mỗi loại tài liệu một khuôn. Khuôn là bộ xương mà người viết chép lại, và bên trong nó có đúng một
4
+ khối fenced `json template-contract` mà `scripts/validate-templates.mjs` ép lên mọi file khuôn đó áp
5
+ vào, cùng bản `.vi.md` của file ấy. Hợp đồng là thẩm quyền; bộ xương là cách người đọc hiểu nó.
6
+
7
+ | Khuôn | Áp vào | Ép gì |
8
+ | --- | --- | --- |
9
+ | `ui-composition.template.md` | `knowledge/ui/composition/*.md` | tiêu đề; chỉ các mục rule `PREFIX-n — …`, mỗi mục một bảng `Case \| Dùng khi \| Khẳng định`; mục đóng |
10
+ | `ui-presentation.template.md` | `knowledge/ui/presentation/*.md` | tiêu đề; Thang giá trị hoặc Danh mục, Owner kèm bảng, mục khung tự do — trong đó `<Topic> Common already owns` do `scripts/generate-presentation-owned.mjs` sinh ra chứ không viết tay — rule với một bảng `Case \| Dùng khi \| Owner \| Render`; mục đóng |
11
+ | `ui-proof.template.md` | `knowledge/ui/proof/*.md` | tiêu đề; chỉ các mục rule, mỗi mục một bảng `Case \| Dùng khi \| Quan sát`; mục đóng |
12
+ | `grammars.template.md` | `knowledge/grammars/*/*.md` | tiêu đề; mục tuỳ ý; mọi mục rule mang một bảng `Case \| Luật \| Owner của Common \| Core hiện thực` |
13
+ | `patterns.template.md` | `knowledge/patterns/*/*.md` | tiêu đề; mục tuỳ ý; mọi mục rule mang một bảng `Case \| Dùng khi \| Viết` |
14
+ | `kinds/changes.contract.json` + `kinds/changes.skeleton.md` | `response/changes.md` trong một nhánh của phiên; `templates/changes.example.md` là ví dụ được ép | tiêu đề; bảng Binding, bảng Files, Bước kế tiếp cần biết gì |
15
+ | `operator.template.md` | `operators/*/operator.md` | tiêu đề `# <operator.id>`; Việc, các mục luật tự do, Context, Đầu vào, Yêu cầu, Các bước, Đầu ra, Dừng, Kế tiếp, mỗi mục một bảng; `scripts/validate-operator.mjs` sau đó đối chiếu các bảng với nhau, với `errors/` và với `templates/kinds` |
16
+ | `kinds/<kind>.contract.json` | file markdown trong một nhánh của phiên (`response/response.md`, `critique/response/critique.md`) | JSON thuần, kiểm bằng `kinds/contract.schema.json`: regex tiêu đề, mục theo thứ tự, header từng bảng, số dòng, dòng bắt buộc, regex ô; `kinds/<kind>.skeleton.md` là bộ xương để chép và tự nó phải qua hợp đồng; `scripts/validate-response.mjs` nạp hợp đồng theo kind |
17
+ | `kinds/<kind>.schema.json` | `response/data/<name>.json` trong một nhánh của phiên | JSON Schema của một kind máy |
18
+ | `step/request.schema.json`, `step/response.schema.json` | `request/request.json` và `response/response.json` của mọi nhánh và mọi cuộc trao đổi lồng | hai gate dùng chung cho mọi operator; `scripts/validate-request.mjs` chạy trước agent, `scripts/validate-response.mjs` chạy sau |
19
+ | `kinds/` kind artifact | file mà operator khai kiểu `artifact` (`alternatives`, `direction-image`, `resolved-tree`, `screenshot`, `sheet`, `article`, `image`, `image-prompt`, `track`) | cố ý không có hợp đồng hay schema: validator chỉ kiểm file tồn tại và được trỏ tới; `validate.mjs` của operator có thể soi thêm |
20
+
21
+ ## Từ vựng của hợp đồng
22
+
23
+ - `applies`: glob tính từ `.claude`; `*` không vượt qua dấu `/`. File `INDEX.md` không bao giờ bị
24
+ nhận: chúng là chỉ mục để đọc, không phải tài liệu của một loại.
25
+ - `title`: biểu thức chính quy mà dòng đầu phải khớp, mỗi ngôn ngữ một cái.
26
+ - `sections`: các heading `##` phải có, theo thứ tự. `{ "free": true }` đánh dấu vùng tài liệu được
27
+ thêm mục riêng; ngoài vùng tự do, một mục thừa là lỗi. Một mục có thể mang `table`, đúng dòng
28
+ header bảng phải mở đầu mục đó.
29
+ - Mục có `table` còn có thể mang `minRows` / `exactRows` (số dòng dữ liệu), `rows` (giá trị cột đầu phải
30
+ xuất hiện, bỏ qua dấu backtick) và `cell` (`{ "<Cột>": "<regex>" }`, ô dưới cột đó ở mọi dòng phải khớp;
31
+ cột không có trong header của ngôn ngữ này thì bỏ qua). Hợp đồng kind dưới `kinds/` là JSON một ngôn ngữ:
32
+ `title`, `heading` và `table` là chuỗi trơn.
33
+ - `rules`: `heading` là biểu thức của mục rule, `table` là dòng header duy nhất mỗi rule phải mang
34
+ (đúng một bảng cho mỗi rule), `closing` là mục phải đứng cuối, `required` là tài liệu có bắt buộc
35
+ publish ít nhất một rule không. Heading rule và heading đóng không tham gia bước duyệt `sections`.
36
+ - Mọi `.md` mà khuôn nhận phải có `.vi.md` cùng gốc, được kiểm theo dạng `vi` của cùng hợp đồng. Bản
37
+ mirror là bản đọc cho người, không bao giờ là thẩm quyền lúc chạy.
38
+
39
+ ## Đổi khuôn
40
+
41
+ Đổi hợp đồng, chạy `node scripts/validate-templates.mjs`, và đưa mọi tài liệu nó gọi tên về đúng
42
+ khuôn trong cùng một commit. Khuôn mà cây không thoả thì chưa được publish.
43
+ `scripts/validate-templates.spec.mjs` chứng minh chính validator trên một cây giả: tài liệu đúng khuôn
44
+ thì qua; thiếu mục, sai thứ tự, sai header bảng, thừa bảng dưới một rule, thiếu bản mirror đều bị chặn
45
+ kèm số dòng.
@@ -0,0 +1,27 @@
1
+ # changes — frontend.source.apply step-5/parallel-1
2
+
3
+ `frontend.source.apply` projected the resolved tree for the subscriptions route onto two declared paths of
4
+ the frontend checkout, bound to the direction decided in `step-3/parallel-1` and the presentation
5
+ resolved in `step-4/parallel-1`. Nothing outside the declared write set was touched.
6
+
7
+ ## Binding
8
+
9
+ | Field | Value |
10
+ | --- | --- |
11
+ | Operator | `frontend.source.apply` |
12
+ | Step | `step-5/parallel-1` |
13
+ | Checkout | `@workspaces/fe` at `14e0c20…` → `uncommitted` |
14
+ | Predecessor | `step-4/parallel-1/response/response.md` |
15
+
16
+ ## Files
17
+
18
+ | Path | Change | Why | Claims |
19
+ | --- | --- | --- | --- |
20
+ | `src/blocks/commerce/ProSubscriptionBlock/index.tsx` | modified | resolved tree replaces the app-owned gap and padding classes with the rules the resolution selected | GAP-3, PADDING-4 |
21
+ | `src/blocks/commerce/ProSubscriptionBlock/PlanCard.tsx` | created | new leaf the direction introduced for one plan | SURFACE-2, TONE-1 |
22
+
23
+ ## What the next step must know
24
+
25
+ - Gates to run: `lint`, `typecheck`, `test:unit` for `src/blocks/commerce/**`.
26
+ - Surfaces to observe: `/subscriptions` at mobile and desktop, light and dark.
27
+ - Not changed on purpose: `src/blocks/commerce/ProSubscriptionBlock/index.stories.tsx` stays until the story audit runs after `frontend.surface.audit`.
@@ -0,0 +1,34 @@
1
+ # StarCi Core — <Topic>
2
+
3
+ One or two paragraphs: which universal rules this file maps onto the live Core family, and that
4
+ every owner named below is read from `packages/grammar/src`.
5
+
6
+ ## <Section, optional, repeatable>
7
+
8
+ Prose sections are allowed: family DNA, consumption, the component matrix, states. A file that
9
+ publishes rules follows the rule shape below for each of them.
10
+
11
+ ## PREFIX-1 — <what the rule governs>
12
+
13
+ One line: the universal meaning of the rule.
14
+
15
+ | Case | Rule | Common owner | Core realization |
16
+ | --- | --- | --- | --- |
17
+ | Case 1 | The situation. | The exact Common renderer, slot, or prop. | What Core does for it, or `gap` with one clause on what is missing. |
18
+
19
+ Source: `packages/grammar/src/…`
20
+
21
+ ```json template-contract
22
+ {
23
+ "kind": "grammars",
24
+ "applies": ["knowledge/grammars/*/*.md"],
25
+ "title": { "en": "^# .+$", "vi": "^# .+$" },
26
+ "sections": [{ "free": true }],
27
+ "rules": {
28
+ "heading": "^## [A-Z][A-Z0-9-]*-\\d+ — .+$",
29
+ "table": { "en": "| Case | Rule | Common owner | Core realization |", "vi": "| Case | Luật | Owner của Common | Core hiện thực |" },
30
+ "closing": null,
31
+ "required": false
32
+ }
33
+ }
34
+ ```
@@ -0,0 +1,14 @@
1
+ {
2
+ "kind": "architecture-decision",
3
+ "title": "^# architecture-decision — [a-z0-9][a-z0-9-]*$",
4
+ "sections": [
5
+ { "heading": "^## Decision$", "table": "| Field | Value |", "rows": ["Objective", "Decision id", "Selected alternative", "Selection policy"], "cell": { "Value": "\\S" } },
6
+ { "heading": "^## Current state$", "table": "| Boundary | Responsibility | Stores | Evidence |", "minRows": 1, "cell": { "Evidence": "\\S" } },
7
+ { "heading": "^## Alternatives$", "table": "| Alternative | Status | Assessment | Rejected because |", "minRows": 1, "cell": { "Status": "^(selected|rejected)$" } },
8
+ { "heading": "^## Boundaries$", "table": "| Boundary | Responsibility | Owner | Interfaces | Owns data |", "minRows": 1, "cell": { "Owns data": "^(yes|no)$" } },
9
+ { "heading": "^## Data ownership$", "table": "| Store | Owning boundary | Writers | Readers | Migrators | Transaction scope | Backup | Restore |" },
10
+ { "heading": "^## Stack delta$", "table": "| Component | Status | Justification | Evidence | Compatibility |", "minRows": 1, "cell": { "Status": "^(existing|added|replaced|removed|replaced-candidate)$", "Justification": "^(measured-constraint|observed-evidence|requirement-fit|—)$" } },
11
+ { "heading": "^## Handoff$", "table": "| Item | Kind | Detail |", "minRows": 1, "cell": { "Kind": "^(invariant|risk|contract|migration|rollback|proof|unknown)$" } },
12
+ { "heading": "^## Fallbacks taken$", "table": "| Code | Action |", "cell": { "Code": "^`[A-Z][A-Z0-9_]+`$" } }
13
+ ]
14
+ }
@@ -0,0 +1,52 @@
1
+ # architecture-decision — decision-id
2
+
3
+ ## Decision
4
+
5
+ | Field | Value |
6
+ | --- | --- |
7
+ | Objective | the objective as the person stated it |
8
+ | Decision id | `decision-id` |
9
+ | Selected alternative | `alternative-id` |
10
+ | Selection policy | `automatic` |
11
+
12
+ ## Current state
13
+
14
+ | Boundary | Responsibility | Stores | Evidence |
15
+ | --- | --- | --- | --- |
16
+ | `boundary-id` | what it does today | `store-id` or — | `path:line@head` |
17
+
18
+ ## Alternatives
19
+
20
+ | Alternative | Status | Assessment | Rejected because |
21
+ | --- | --- | --- | --- |
22
+ | `alternative-id` | selected | one cell per trade-off axis, in the order the person named them | — |
23
+
24
+ ## Boundaries
25
+
26
+ | Boundary | Responsibility | Owner | Interfaces | Owns data |
27
+ | --- | --- | --- | --- | --- |
28
+ | `boundary-id` | what it will do | team or service | the contracts it exposes | yes |
29
+
30
+ ## Data ownership
31
+
32
+ | Store | Owning boundary | Writers | Readers | Migrators | Transaction scope | Backup | Restore |
33
+ | --- | --- | --- | --- | --- | --- | --- | --- |
34
+ | `store-id` | `boundary-id` | `boundary-id` | `other-boundary` | `boundary-id` | per request | nightly snapshot | tested restore path |
35
+
36
+ ## Stack delta
37
+
38
+ | Component | Status | Justification | Evidence | Compatibility |
39
+ | --- | --- | --- | --- | --- |
40
+ | `component-id` | existing | measured-constraint | `path@head` | 5/5 verified, or the axes still unknown |
41
+
42
+ ## Handoff
43
+
44
+ | Item | Kind | Detail |
45
+ | --- | --- | --- |
46
+ | one line each | invariant | what must stay true; contracts are named, implementation files never |
47
+
48
+ ## Fallbacks taken
49
+
50
+ | Code | Action |
51
+ | --- | --- |
52
+ | `CODE` | what the fallback did; no rows when none was taken |
@@ -0,0 +1,10 @@
1
+ {
2
+ "kind": "backend-source-application",
3
+ "title": "^# backend-source-application — [a-z0-9][a-z0-9-]*$",
4
+ "sections": [
5
+ { "heading": "^## Binding$", "table": "| Field | Value |", "rows": ["Outcome", "Feature", "Contract fingerprint", "Base", "Branch", "Commit"], "cell": { "Value": "\\S" } },
6
+ { "heading": "^## Operations$", "table": "| Operation | Transport | Writer | Transaction | Idempotency | Decisions |", "minRows": 1, "cell": { "Transport": "^(graphql-mutation|graphql-query|rest|worker|cron|event-consumer)$", "Transaction": "^(single-transaction|per-item|read-only|none)$", "Idempotency": "^(none|natural-key|request-token|event-id)$", "Decisions": "^BA-[0-9]+(?:, BA-[0-9]+)*$" } },
7
+ { "heading": "^## Changes$", "table": "| Path | Change | Operation | Before | After |", "minRows": 1, "cell": { "Change": "^(added|modified|deleted)$", "Before": "^(sha256:[0-9a-f]{64}|—)$", "After": "^(sha256:[0-9a-f]{64}|—)$" } },
8
+ { "heading": "^## Findings$", "table": "| Code | Operation | File | Statement |", "cell": { "Code": "^`(PATTERN_BOUND|NEW_CONVENTION_REFUSED|SNAPSHOT_REVALIDATED|MIGRATION_INCLUDED|EXCEPTION_IDENTITY_REUSED|BUSINESS_QUESTION_RAISED)`$", "Statement": "\\S" } }
9
+ ]
10
+ }
@@ -0,0 +1,34 @@
1
+ # backend-source-application — outcome-id
2
+
3
+ One paragraph: which outcome was implemented, inside which frozen contract, and what measured that
4
+ the contract was filled rather than widened. Written by `backend.source.apply` as `response/response.md`;
5
+ the conformance and proof records that measure it live beside it in `response/data/`, one file each.
6
+
7
+ ## Binding
8
+
9
+ | Field | Value |
10
+ | --- | --- |
11
+ | Outcome | the one thing implemented, as the person stated it |
12
+ | Feature | `feature-id` |
13
+ | Contract fingerprint | `sha256:0000000000000000000000000000000000000000000000000000000000000000` |
14
+ | Base | `0000000000000000000000000000000000000000` |
15
+ | Branch | `session/s-0000` |
16
+ | Commit | `1111111111111111111111111111111111111111` |
17
+
18
+ ## Operations
19
+
20
+ | Operation | Transport | Writer | Transaction | Idempotency | Decisions |
21
+ | --- | --- | --- | --- | --- | --- |
22
+ | `operation-id` | graphql-mutation | `src/features/api/core/graphql/mutations/handler.ts` | single-transaction | request-token | BA-1 |
23
+
24
+ ## Changes
25
+
26
+ | Path | Change | Operation | Before | After |
27
+ | --- | --- | --- | --- | --- |
28
+ | `src/features/api/core/graphql/mutations/handler.ts` | added | `operation-id` | — | sha256:1111111111111111111111111111111111111111111111111111111111111111 |
29
+
30
+ ## Findings
31
+
32
+ | Code | Operation | File | Statement |
33
+ | --- | --- | --- | --- |
34
+ | `PATTERN_BOUND` | `operation-id` | `src/features/api/core/graphql/mutations/handler.ts` | the sibling family this aspect mirrors |
@@ -0,0 +1,13 @@
1
+ {
2
+ "kind": "business-promise-authority",
3
+ "title": "^# business-promise-authority — [a-z0-9][a-z0-9-]*$",
4
+ "sections": [
5
+ { "heading": "^## Binding$", "table": "| Field | Value |", "rows": ["Feature", "Mode", "Target state", "Head", "Claims fingerprint", "Coverage fingerprint"], "cell": { "Value": "\\S" } },
6
+ { "heading": "^## Promise$", "table": "| Field | Value |", "rows": ["Promise", "Actor", "Eligibility"], "cell": { "Value": "\\S" } },
7
+ { "heading": "^## Lineage$", "table": "| Field | Value |", "rows": ["Previous head", "Previous state", "Transition"], "cell": { "Value": "\\S" } },
8
+ { "heading": "^## Cited claims$", "table": "| Claim | Kind | Role | Source | Lines | Head |", "minRows": 1, "cell": { "Claim": "^`[a-z0-9][a-z0-9-]*`$", "Kind": "^(fact|intent|example|unknown|contradiction)$", "Lines": "^\\d+-\\d+$" } },
9
+ { "heading": "^## Coverage$", "table": "| Dimension | Disposition | Statement | Consumers |", "cell": { "Dimension": "^`[a-z0-9][a-z0-9-]*`$", "Disposition": "^(preserve|replace|retire|defer|not-applicable)$", "Statement": "\\S" } },
10
+ { "heading": "^## Reconciliation$", "table": "| Dimension | Delivered evidence | Discrepancy |" },
11
+ { "heading": "^## Findings$", "table": "| Code | Severity | Dimension | Statement |", "cell": { "Code": "^`[A-Z][A-Z0-9_]*`$", "Severity": "^(info|warning|error)$" } }
12
+ ]
13
+ }
@@ -0,0 +1,67 @@
1
+ # business-promise-authority — feature-id
2
+
3
+ One paragraph: which promise was decided, for which feature, and against which evidence. Written by
4
+ `business.decide` as `response/response.md`; read by `backend.source.apply`, `quality.verify` and
5
+ `uat.verify`, which correlate against the same coverage fingerprint rather than a paraphrase of it.
6
+
7
+ ## Binding
8
+
9
+ | Field | Value |
10
+ | --- | --- |
11
+ | Feature | `feature-id` |
12
+ | Mode | model |
13
+ | Target state | pending |
14
+ | Head | `.worktrees/businesses/features/feature-id` |
15
+ | Claims fingerprint | `sha256:0000000000000000000000000000000000000000000000000000000000000000` |
16
+ | Coverage fingerprint | `sha256:0000000000000000000000000000000000000000000000000000000000000000` |
17
+
18
+ ## Promise
19
+
20
+ | Field | Value |
21
+ | --- | --- |
22
+ | Promise | one sentence: what the product promises, from fact claims only |
23
+ | Actor | one sentence: who the promise is made to |
24
+ | Eligibility | one sentence: what makes that actor eligible |
25
+
26
+ ## Lineage
27
+
28
+ | Field | Value |
29
+ | --- | --- |
30
+ | Previous head | — on a first publication, otherwise the head this one replaces |
31
+ | Previous state | — on a first publication, otherwise pending, in-progress, implemented or rejected |
32
+ | Transition | absent->pending |
33
+
34
+ ## Cited claims
35
+
36
+ | Claim | Kind | Role | Source | Lines | Head |
37
+ | --- | --- | --- | --- | --- | --- |
38
+ | `claim-id` | fact | what the claim observes | `src/path.ts` | 10-24 | `0000000000000000000000000000000000000000` |
39
+
40
+ ## Coverage
41
+
42
+ | Dimension | Disposition | Statement | Consumers |
43
+ | --- | --- | --- | --- |
44
+ | `actor-eligibility` | preserve | who may hold the promise and why | `consumer-id` |
45
+ | `offer-entry` | preserve | where the promise is offered | — |
46
+ | `read-entry` | preserve | where the promise is read | — |
47
+ | `purchase-side-effect` | preserve | what the purchase changes | — |
48
+ | `settlement` | preserve | how the purchase settles | — |
49
+ | `idempotency` | preserve | what a repeated call does | — |
50
+ | `entitlement-consumer` | preserve | which guards read the entitlement | — |
51
+ | `denial` | preserve | how the promise is denied when it does not hold | — |
52
+ | `renewal` | defer | postponed to a named owner | — |
53
+ | `refund` | not-applicable | no refund path exists for this promise | — |
54
+ | `legacy-create` | retire | the legacy creation path is closed | — |
55
+ | `legacy-read` | preserve | already-purchased rights stay readable | — |
56
+ | `legacy-settle` | preserve | pending legacy settlement still completes | — |
57
+
58
+ ## Reconciliation
59
+
60
+ | Dimension | Delivered evidence | Discrepancy |
61
+ | --- | --- | --- |
62
+
63
+ ## Findings
64
+
65
+ | Code | Severity | Dimension | Statement |
66
+ | --- | --- | --- | --- |
67
+ | `LEGACY_COEXISTENCE` | info | `legacy-create` | what was observed but not enforced |
@@ -0,0 +1,33 @@
1
+ {
2
+ "$id": "kind:capture",
3
+ "type": "object",
4
+ "additionalProperties": false,
5
+ "required": ["matrixId", "viewport", "scheme", "state", "nodes"],
6
+ "properties": {
7
+ "matrixId": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$" },
8
+ "viewport": {
9
+ "type": "array",
10
+ "minItems": 2,
11
+ "maxItems": 2,
12
+ "items": { "type": "integer", "minimum": 240 }
13
+ },
14
+ "scheme": { "enum": ["light", "dark"] },
15
+ "state": { "type": "string", "minLength": 1 },
16
+ "nodes": {
17
+ "type": "array",
18
+ "minItems": 1,
19
+ "maxItems": 512,
20
+ "items": {
21
+ "type": "object",
22
+ "additionalProperties": false,
23
+ "required": ["path", "owner", "claims", "measured"],
24
+ "properties": {
25
+ "path": { "type": "string", "minLength": 1 },
26
+ "owner": { "enum": ["app", "grammar"] },
27
+ "claims": { "type": "array", "maxItems": 32, "items": { "type": "string", "pattern": "^[A-Z][A-Z0-9-]*-[0-9]+$" } },
28
+ "measured": { "type": "object", "additionalProperties": { "type": "string", "minLength": 1 } }
29
+ }
30
+ }
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "kind": "changes",
3
+ "example": "templates/changes.example.md",
4
+ "title": "^# changes — [a-z]+(?:\\.[a-z]+)+ step-\\d+/parallel-\\d+$",
5
+ "sections": [
6
+ { "heading": "^## Binding$", "table": "| Field | Value |", "rows": ["Operator", "Step", "Checkout", "Predecessor"], "cell": { "Value": "\\S" } },
7
+ { "heading": "^## Files$", "table": "| Path | Change | Why | Claims |", "minRows": 1, "cell": { "Change": "^(created|modified|deleted|unchanged)$" } },
8
+ { "heading": "^## What the next step must know$" }
9
+ ]
10
+ }
@@ -0,0 +1,26 @@
1
+ # changes — operator.id step-1/parallel-1
2
+
3
+ One paragraph: what this step changed, in which checkout, at which head. Written by the step that
4
+ wrote source (`backend.source.apply`, `frontend.source.apply`) as `response/changes.md`; read unchanged by the
5
+ next steps (`quality.verify`, `frontend.surface.audit`, `git.publish`) through their `request.json` inputs.
6
+
7
+ ## Binding
8
+
9
+ | Field | Value |
10
+ | --- | --- |
11
+ | Operator | `operator.id` |
12
+ | Step | `step-1/parallel-1` |
13
+ | Checkout | `@workspaces/role` at `head before` → `head after, or uncommitted` |
14
+ | Predecessor | `step-1/parallel-1/response/response.md` of the step whose decision this change applies |
15
+
16
+ ## Files
17
+
18
+ | Path | Change | Why | Claims |
19
+ | --- | --- | --- | --- |
20
+ | `checkout-relative/path.tsx` | created | the decision this file carries | rule ids written into it, or — |
21
+
22
+ ## What the next step must know
23
+
24
+ - Gates to run: the gate names the checkout pins for these paths.
25
+ - Surfaces to observe: the routes or blocks whose rendered output changed.
26
+ - Not changed on purpose: paths a reader might expect, and why they stayed.
@@ -0,0 +1,44 @@
1
+ {
2
+ "$id": "kind:checks",
3
+ "type": "object",
4
+ "additionalProperties": false,
5
+ "required": ["serviceRef", "serviceKind", "requiredCheckNames", "checks", "findings"],
6
+ "properties": {
7
+ "serviceRef": { "type": "string", "minLength": 1 },
8
+ "serviceKind": { "enum": ["observability", "sonar", "tunnel"] },
9
+ "requiredCheckNames": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/$defs/checkName" } },
10
+ "checks": {
11
+ "type": "array",
12
+ "minItems": 1,
13
+ "items": {
14
+ "type": "object",
15
+ "additionalProperties": false,
16
+ "required": ["name", "resourceRef", "status", "evidenceRef"],
17
+ "properties": {
18
+ "name": { "$ref": "#/$defs/checkName" },
19
+ "resourceRef": { "type": "string", "minLength": 1 },
20
+ "status": { "enum": ["passed", "failed"] },
21
+ "evidenceRef": { "type": "string", "minLength": 1 }
22
+ }
23
+ }
24
+ },
25
+ "findings": {
26
+ "type": "array",
27
+ "items": {
28
+ "type": "object",
29
+ "additionalProperties": false,
30
+ "required": ["code", "resourceRef", "port", "holderRef", "statement"],
31
+ "properties": {
32
+ "code": { "enum": ["SHARED_SERVICE_INVENTORIED", "PORT_COORDINATION_REQUIRED", "ALREADY_CONVERGED", "PARTIAL_MUTATION", "PRODUCT_DEPLOYMENT_DECLINED"] },
33
+ "resourceRef": { "type": "string", "minLength": 1 },
34
+ "port": { "oneOf": [{ "type": "integer", "minimum": 1, "maximum": 65535 }, { "type": "null" }] },
35
+ "holderRef": { "oneOf": [{ "type": "string", "minLength": 1 }, { "type": "null" }] },
36
+ "statement": { "type": "string", "minLength": 1 }
37
+ }
38
+ }
39
+ }
40
+ },
41
+ "$defs": {
42
+ "checkName": { "enum": ["service-health", "target-boundary", "label-boundary", "remote-write-delivery", "sample-ordering", "retry-backoff", "sensitive-data-filter", "service-available", "project-exists", "source-revision", "profile-assigned", "gate-assigned", "enforcement-active", "dns-target", "tunnel-route", "tls", "public-https"] }
43
+ }
44
+ }
@@ -0,0 +1,165 @@
1
+ {
2
+ "$id": "kind:claims",
3
+ "title": "Every observation the decision rests on, separated by role and bound to the source that shows it.",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "featureId",
8
+ "sourceHead",
9
+ "fingerprint",
10
+ "claims"
11
+ ],
12
+ "properties": {
13
+ "featureId": {
14
+ "$ref": "#/$defs/identifier"
15
+ },
16
+ "sourceHead": {
17
+ "$ref": "#/$defs/sourceHead"
18
+ },
19
+ "fingerprint": {
20
+ "$ref": "#/$defs/fingerprint"
21
+ },
22
+ "claims": {
23
+ "type": "array",
24
+ "minItems": 1,
25
+ "maxItems": 256,
26
+ "items": {
27
+ "$ref": "#/$defs/claim"
28
+ }
29
+ }
30
+ },
31
+ "$defs": {
32
+ "identifier": {
33
+ "type": "string",
34
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
35
+ },
36
+ "fingerprint": {
37
+ "type": "string",
38
+ "pattern": "^sha256:[0-9a-f]{64}$"
39
+ },
40
+ "sourceHead": {
41
+ "type": "string",
42
+ "pattern": "^[0-9a-f]{40,64}$"
43
+ },
44
+ "claim": {
45
+ "type": "object",
46
+ "additionalProperties": false,
47
+ "required": [
48
+ "claimId",
49
+ "kind",
50
+ "role"
51
+ ],
52
+ "properties": {
53
+ "claimId": {
54
+ "$ref": "#/$defs/identifier"
55
+ },
56
+ "kind": {
57
+ "enum": [
58
+ "fact",
59
+ "intent",
60
+ "example",
61
+ "unknown",
62
+ "contradiction"
63
+ ]
64
+ },
65
+ "role": {
66
+ "type": "string",
67
+ "minLength": 1,
68
+ "maxLength": 256
69
+ },
70
+ "path": {
71
+ "type": "string",
72
+ "minLength": 1,
73
+ "maxLength": 1024
74
+ },
75
+ "lineStart": {
76
+ "type": "integer",
77
+ "minimum": 1
78
+ },
79
+ "lineEnd": {
80
+ "type": "integer",
81
+ "minimum": 1
82
+ },
83
+ "sourceHead": {
84
+ "oneOf": [
85
+ {
86
+ "$ref": "#/$defs/sourceHead"
87
+ },
88
+ {
89
+ "type": "null"
90
+ }
91
+ ]
92
+ },
93
+ "statement": {
94
+ "type": "string",
95
+ "minLength": 1,
96
+ "maxLength": 4096,
97
+ "description": "The person's words, for an intent or unknown claim that no source line shows yet"
98
+ },
99
+ "source": {
100
+ "type": "string",
101
+ "pattern": "^request/request\\.json#requirements\\.[a-zA-Z]+$",
102
+ "description": "Where a statement came from: the request field that carried it"
103
+ }
104
+ },
105
+ "allOf": [
106
+ {
107
+ "if": {
108
+ "properties": {
109
+ "kind": {
110
+ "enum": [
111
+ "fact",
112
+ "example",
113
+ "contradiction"
114
+ ]
115
+ }
116
+ },
117
+ "required": [
118
+ "kind"
119
+ ]
120
+ },
121
+ "then": {
122
+ "required": [
123
+ "path",
124
+ "lineStart",
125
+ "lineEnd",
126
+ "sourceHead"
127
+ ]
128
+ }
129
+ },
130
+ {
131
+ "if": {
132
+ "properties": {
133
+ "kind": {
134
+ "enum": [
135
+ "intent",
136
+ "unknown"
137
+ ]
138
+ }
139
+ },
140
+ "required": [
141
+ "kind"
142
+ ]
143
+ },
144
+ "then": {
145
+ "anyOf": [
146
+ {
147
+ "required": [
148
+ "path",
149
+ "lineStart",
150
+ "lineEnd"
151
+ ]
152
+ },
153
+ {
154
+ "required": [
155
+ "statement",
156
+ "source"
157
+ ]
158
+ }
159
+ ]
160
+ }
161
+ }
162
+ ]
163
+ }
164
+ }
165
+ }