@agentvibes/guardrails 0.2.8 → 0.3.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 (255) hide show
  1. package/README.md +252 -5
  2. package/candidates/README.md +13 -13
  3. package/candidates/r10-as-cast.yml +4 -4
  4. package/candidates/r1d-scattered-numeric-const-in-component.yml +3 -3
  5. package/candidates/r2-helper-fn-in-tsx.yml +3 -3
  6. package/candidates/r3-hooks-outside-layout.yml +4 -4
  7. package/candidates/r6-jsx-comment-smell.yml +2 -2
  8. package/candidates/r7-raw-hsl-outside-tokens.yml +3 -3
  9. package/candidates/r8-inline-style-prop.yml +2 -2
  10. package/candidates/r9-optional-store-arg.yml +2 -2
  11. package/dist/astGrep.js +4 -2
  12. package/dist/astGrep.js.map +1 -1
  13. package/dist/cli.js +89 -6
  14. package/dist/cli.js.map +1 -1
  15. package/dist/cliArgsTest.d.ts +1 -0
  16. package/dist/cliArgsTest.js +44 -0
  17. package/dist/cliArgsTest.js.map +1 -0
  18. package/dist/doctor.d.ts +1 -1
  19. package/dist/doctor.js +58 -6
  20. package/dist/doctor.js.map +1 -1
  21. package/dist/fileSloc.d.ts +28 -0
  22. package/dist/fileSloc.js +72 -0
  23. package/dist/fileSloc.js.map +1 -0
  24. package/dist/fileSlocBaseline.d.ts +78 -0
  25. package/dist/fileSlocBaseline.js +173 -0
  26. package/dist/fileSlocBaseline.js.map +1 -0
  27. package/dist/fileSlocGate.d.ts +17 -0
  28. package/dist/fileSlocGate.js +75 -0
  29. package/dist/fileSlocGate.js.map +1 -0
  30. package/dist/fileSlocTest.d.ts +1 -0
  31. package/dist/fileSlocTest.js +172 -0
  32. package/dist/fileSlocTest.js.map +1 -0
  33. package/dist/fileWalk.js +1 -1
  34. package/dist/fileWalk.js.map +1 -1
  35. package/dist/findings.d.ts +1 -1
  36. package/dist/gateRed.d.ts +1 -1
  37. package/dist/gateRed.js +1 -0
  38. package/dist/gateRed.js.map +1 -1
  39. package/dist/gitDiff.d.ts +6 -0
  40. package/dist/gitDiff.js +25 -0
  41. package/dist/gitDiff.js.map +1 -1
  42. package/dist/hookStop.d.ts +2 -1
  43. package/dist/hookStop.js +7 -1
  44. package/dist/hookStop.js.map +1 -1
  45. package/dist/hookStopTest.d.ts +1 -1
  46. package/dist/hookStopTest.js +1 -0
  47. package/dist/hookStopTest.js.map +1 -1
  48. package/dist/init.js +1 -1
  49. package/dist/init.js.map +1 -1
  50. package/dist/initTest.d.ts +1 -1
  51. package/dist/initTest.js +2 -1
  52. package/dist/initTest.js.map +1 -1
  53. package/dist/iterateTest.d.ts +1 -1
  54. package/dist/iterateTest.js +1 -0
  55. package/dist/iterateTest.js.map +1 -1
  56. package/dist/jsxSuppress.js +1 -1
  57. package/dist/jsxSuppress.js.map +1 -1
  58. package/dist/jsxSuppressTest.d.ts +1 -1
  59. package/dist/jsxSuppressTest.js +4 -2
  60. package/dist/jsxSuppressTest.js.map +1 -1
  61. package/dist/leaksRed.d.ts +1 -1
  62. package/dist/leaksRed.js +1 -0
  63. package/dist/leaksRed.js.map +1 -1
  64. package/dist/metrics.d.ts +9 -0
  65. package/dist/metrics.js +96 -7
  66. package/dist/metrics.js.map +1 -1
  67. package/dist/metricsBaseline.js +1 -1
  68. package/dist/metricsBaseline.js.map +1 -1
  69. package/dist/metricsCollect.js +2 -45
  70. package/dist/metricsCollect.js.map +1 -1
  71. package/dist/metricsCycle.d.ts +1 -1
  72. package/dist/metricsCycle.js +1 -0
  73. package/dist/metricsCycle.js.map +1 -1
  74. package/dist/metricsTypes.d.ts +1 -1
  75. package/dist/overrideDeclarations.d.ts +35 -0
  76. package/dist/overrideDeclarations.js +94 -0
  77. package/dist/overrideDeclarations.js.map +1 -0
  78. package/dist/overrides.d.ts +35 -0
  79. package/dist/overrides.js +284 -0
  80. package/dist/overrides.js.map +1 -0
  81. package/dist/overridesTest.d.ts +1 -0
  82. package/dist/overridesTest.js +183 -0
  83. package/dist/overridesTest.js.map +1 -0
  84. package/dist/pipeOutputTest.d.ts +1 -1
  85. package/dist/pipeOutputTest.js +2 -1
  86. package/dist/pipeOutputTest.js.map +1 -1
  87. package/dist/presetDrift.d.ts +8 -0
  88. package/dist/presetDrift.js +91 -34
  89. package/dist/presetDrift.js.map +1 -1
  90. package/dist/presetDriftTest.d.ts +1 -1
  91. package/dist/presetDriftTest.js +3 -3
  92. package/dist/presetDriftTest.js.map +1 -1
  93. package/dist/record/config.d.ts +17 -0
  94. package/dist/record/config.js +83 -0
  95. package/dist/record/config.js.map +1 -0
  96. package/dist/record/index.d.ts +69 -0
  97. package/dist/record/index.js +8 -0
  98. package/dist/record/index.js.map +1 -0
  99. package/dist/record/record.d.ts +56 -0
  100. package/dist/record/record.js +111 -0
  101. package/dist/record/record.js.map +1 -0
  102. package/dist/record/repoKey.d.ts +8 -0
  103. package/dist/record/repoKey.js +70 -0
  104. package/dist/record/repoKey.js.map +1 -0
  105. package/dist/record/repoMetrics.d.ts +14 -0
  106. package/dist/record/repoMetrics.js +124 -0
  107. package/dist/record/repoMetrics.js.map +1 -0
  108. package/dist/record/runRecord.d.ts +60 -0
  109. package/dist/record/runRecord.js +2 -0
  110. package/dist/record/runRecord.js.map +1 -0
  111. package/dist/record/schema.d.ts +31 -0
  112. package/dist/record/schema.js +201 -0
  113. package/dist/record/schema.js.map +1 -0
  114. package/dist/record/writer.d.ts +22 -0
  115. package/dist/record/writer.js +341 -0
  116. package/dist/record/writer.js.map +1 -0
  117. package/dist/recordTest.d.ts +1 -0
  118. package/dist/recordTest.js +422 -0
  119. package/dist/recordTest.js.map +1 -0
  120. package/dist/renameDiffTest.d.ts +1 -1
  121. package/dist/renameDiffTest.js +2 -1
  122. package/dist/renameDiffTest.js.map +1 -1
  123. package/dist/repoRules.js +1 -1
  124. package/dist/repoRules.js.map +1 -1
  125. package/dist/repoRulesTest.d.ts +1 -1
  126. package/dist/repoRulesTest.js +2 -1
  127. package/dist/repoRulesTest.js.map +1 -1
  128. package/dist/screenScope.js +4 -5
  129. package/dist/screenScope.js.map +1 -1
  130. package/dist/screenScopeTest.d.ts +1 -1
  131. package/dist/screenScopeTest.js +2 -1
  132. package/dist/screenScopeTest.js.map +1 -1
  133. package/dist/severityTest.d.ts +1 -1
  134. package/dist/severityTest.js +1 -0
  135. package/dist/severityTest.js.map +1 -1
  136. package/dist/siblingCloneTest.js +12 -12
  137. package/dist/siblingCloneTest.js.map +1 -1
  138. package/dist/snapshot.d.ts +2 -0
  139. package/dist/snapshot.js +118 -0
  140. package/dist/snapshot.js.map +1 -0
  141. package/dist/snapshotTest.d.ts +1 -0
  142. package/dist/snapshotTest.js +194 -0
  143. package/dist/snapshotTest.js.map +1 -0
  144. package/dist/structure.js +2 -2
  145. package/dist/structure.js.map +1 -1
  146. package/dist/testIsolation.d.ts +1 -0
  147. package/dist/testIsolation.js +7 -0
  148. package/dist/testIsolation.js.map +1 -0
  149. package/dist/testPaths.d.ts +4 -0
  150. package/dist/testPaths.js +9 -0
  151. package/dist/testPaths.js.map +1 -0
  152. package/dist/testRules.js +3 -3
  153. package/dist/testRules.js.map +1 -1
  154. package/dist/time.d.ts +22 -0
  155. package/dist/time.js +77 -0
  156. package/dist/time.js.map +1 -0
  157. package/dist/timeTest.d.ts +1 -0
  158. package/dist/timeTest.js +103 -0
  159. package/dist/timeTest.js.map +1 -0
  160. package/dist/tomlTable.d.ts +1 -1
  161. package/dist/tomlTable.js +6 -3
  162. package/dist/tomlTable.js.map +1 -1
  163. package/dist/toolResolve.d.ts +6 -0
  164. package/dist/toolResolve.js +18 -0
  165. package/dist/toolResolve.js.map +1 -1
  166. package/dist/twinCoverageTest.js +1 -2
  167. package/dist/twinCoverageTest.js.map +1 -1
  168. package/dist/verify.d.ts +2 -1
  169. package/dist/verify.js +33 -5
  170. package/dist/verify.js.map +1 -1
  171. package/dist/verifyDiff.d.ts +3 -2
  172. package/dist/verifyDiff.js +58 -8
  173. package/dist/verifyDiff.js.map +1 -1
  174. package/dist/wiring.d.ts +31 -0
  175. package/dist/wiring.js +262 -0
  176. package/dist/wiring.js.map +1 -0
  177. package/dist/wiringTest.d.ts +1 -0
  178. package/dist/wiringTest.js +127 -0
  179. package/dist/wiringTest.js.map +1 -0
  180. package/package.json +18 -6
  181. package/rules/__fixtures__/demo-mode-by-default/bad.ts +1 -1
  182. package/rules/__fixtures__/demo-mode-by-default/bad.tsx +1 -1
  183. package/rules/__fixtures__/direct-store-import/bad.tsx +1 -1
  184. package/rules/__fixtures__/direct-store-import/good.tsx +2 -2
  185. package/rules/__fixtures__/discriminator-ternary/bad.tsx +1 -1
  186. package/rules/__fixtures__/discriminator-ternary/good.tsx +1 -1
  187. package/rules/__fixtures__/inline-map-row/bad.tsx +1 -1
  188. package/rules/__fixtures__/inline-map-row/good.tsx +1 -1
  189. package/rules/__fixtures__/missing-observer/bad.tsx +2 -2
  190. package/rules/__fixtures__/missing-observer/good.tsx +2 -2
  191. package/rules/__fixtures__/no-local-kit-clone/bad.ts +2 -2
  192. package/rules/__fixtures__/no-local-kit-clone/bad.tsx +2 -2
  193. package/rules/__fixtures__/state-loading-boolean-shape/good.ts +1 -1
  194. package/rules/__fixtures__/state-loading-boolean-shape/good.tsx +1 -1
  195. package/rules/__fixtures__/store-async-method/good.ts +1 -1
  196. package/rules/__fixtures__/store-async-method/good.tsx +1 -1
  197. package/rules/__fixtures__/store-context-provider/bad.ts +1 -1
  198. package/rules/__fixtures__/store-delegation-getter/bad.ts +1 -1
  199. package/rules/__fixtures__/store-delegation-getter/bad.tsx +1 -1
  200. package/rules/__fixtures__/store-delegation-getter/good.ts +3 -3
  201. package/rules/__fixtures__/store-delegation-getter/good.tsx +3 -3
  202. package/rules/__fixtures__/store-no-runinaction/bad.ts +1 -1
  203. package/rules/__fixtures__/store-no-runinaction/bad.tsx +1 -1
  204. package/rules/__fixtures__/store-no-runinaction/good.ts +1 -1
  205. package/rules/__fixtures__/store-no-runinaction/good.tsx +1 -1
  206. package/rules/__fixtures__/ts-pattern-dangling-match/bad.ts +1 -1
  207. package/rules/__fixtures__/ts-pattern-dangling-match/good.ts +2 -2
  208. package/rules/__fixtures__/ui-imports-app-store/src/ui/good.tsx +1 -1
  209. package/rules/__fixtures__/view-imports-store/good.view.tsx +1 -1
  210. package/rules/as-any-escape-tsx.yml +2 -2
  211. package/rules/as-any-escape.yml +2 -2
  212. package/rules/catch-empty-tsx.yml +3 -3
  213. package/rules/catch-empty.yml +3 -3
  214. package/rules/demo-mode-by-default-ts.yml +6 -7
  215. package/rules/demo-mode-by-default.yml +6 -7
  216. package/rules/direct-store-import.yml +15 -16
  217. package/rules/discriminator-ternary-ts.yml +1 -1
  218. package/rules/discriminator-ternary.yml +3 -3
  219. package/rules/hardcoded-url-in-component-ts.yml +1 -1
  220. package/rules/hardcoded-url-in-component.yml +5 -5
  221. package/rules/inline-map-row.yml +7 -7
  222. package/rules/instanceof-map-set-tsx.yml +2 -2
  223. package/rules/instanceof-map-set.yml +2 -2
  224. package/rules/kind-if-without-match-tsx.yml +1 -1
  225. package/rules/literal-union-in-component-tsx.yml +2 -2
  226. package/rules/literal-union-in-component.yml +7 -7
  227. package/rules/match-bool-to-null-ts.yml +1 -1
  228. package/rules/missing-observer.yml +5 -5
  229. package/rules/no-local-kit-clone-tsx.yml +2 -2
  230. package/rules/no-local-kit-clone.yml +2 -2
  231. package/rules/non-exhaustive-match-tsx.yml +4 -7
  232. package/rules/non-exhaustive-match.yml +2 -2
  233. package/rules/page-store-bare-usememo-tsx.yml +1 -1
  234. package/rules/page-store-bare-usememo.yml +1 -1
  235. package/rules/screen-file-styling.yml +3 -3
  236. package/rules/silent-default-return-tsx.yml +1 -1
  237. package/rules/store-async-method-tsx.yml +1 -1
  238. package/rules/store-async-method.yml +1 -1
  239. package/rules/store-context-provider-tsx.yml +3 -3
  240. package/rules/store-context-provider.yml +5 -5
  241. package/rules/store-delegation-getter-tsx.yml +2 -2
  242. package/rules/store-delegation-getter.yml +2 -2
  243. package/rules/store-no-runinaction-tsx.yml +2 -2
  244. package/rules/store-no-runinaction.yml +2 -2
  245. package/rules/store-no-setinterval-poll-tsx.yml +1 -1
  246. package/rules/store-no-setinterval-poll.yml +1 -1
  247. package/rules/ts-pattern-dangling-match-tsx.yml +4 -4
  248. package/rules/ts-pattern-dangling-match.yml +4 -4
  249. package/rules/ui-imports-app-store-ts.yml +2 -2
  250. package/rules/ui-imports-app-store.yml +1 -1
  251. package/rules/view-file-logic.yml +5 -5
  252. package/rules/view-imports-store.yml +4 -5
  253. package/rules/zod-optional-nullable-tsx.yml +2 -2
  254. package/rules/zod-optional-nullable.yml +2 -2
  255. package/structure/rules/component-decl.yml +1 -1
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # `discriminator-ternary` is `language: tsx`, so it reads `.tsx` and never `.ts` — ast-grep's
4
4
  # languages are disjoint. What it matches needs no JSX, so it can sit in a plain
5
- # `.ts` file just as well. Added by is-760b0b4b (owner's answer: option 1а).
5
+ # `.ts` file just as well. The `.ts` twin closes that gap.
6
6
  #
7
7
  # Keep this file's `severity`, `files`, `ignores`, `utils` and `rule:`
8
8
  # blocks IDENTICAL to `discriminator-ternary.yml` (`.tsx` globs spelled `.ts`),
@@ -1,8 +1,8 @@
1
- # PROMOTED to canon in wave 2 from PPA `r4-ternary-on-discriminator` (rule-triage).
1
+ # PROMOTED to canon in wave 2 from the source app `r4-ternary-on-discriminator` (rule-triage).
2
2
  #
3
- # The only one of the 11 PPA R-rules that was actually firing (18 hits in the
3
+ # The only one of the 11 source-app R-rules that was actually firing (18 hits in the
4
4
  # audit), and the triage question was whether it duplicates something canon
5
- # already has. Measured on tg-gallery + observatory, it does not — the three
5
+ # already has. Measured on two consumer apps, it does not — the three
6
6
  # rules partition the space cleanly:
7
7
  #
8
8
  # kind-if-without-match 27 hits `if` on a discriminator
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # `hardcoded-url-in-component` is `language: tsx`, so it reads `.tsx` and never `.ts` — ast-grep's
4
4
  # languages are disjoint. What it matches needs no JSX, so it can sit in a plain
5
- # `.ts` file just as well. Added by is-760b0b4b (owner's answer: option 1а).
5
+ # `.ts` file just as well. The `.ts` twin closes that gap.
6
6
  #
7
7
  # Keep this file's `severity`, `files`, `ignores`, `utils` and `rule:`
8
8
  # blocks IDENTICAL to `hardcoded-url-in-component.yml` (`.tsx` globs spelled `.ts`);
@@ -1,15 +1,15 @@
1
- # PROMOTED to canon in wave 2 from PPA `r1a-hardcoded-url-in-component` (rule-triage).
1
+ # PROMOTED to canon in wave 2 from the source app `r1a-hardcoded-url-in-component` (rule-triage).
2
2
  #
3
3
  # Promoted because it enforces a rule that is already house-wide rather than
4
- # PPA-local: CLAUDE.md's "No localhost" section — every service URL comes from
4
+ # Source-app-local: the "No localhost" convention — every service URL comes from
5
5
  # the dev CLI, never a literal, and the legacy proxy zone is retired for new
6
6
  # code. A URL baked into a component is also the thing that
7
7
  # makes a component un-reusable and un-testable, which is the same boundary
8
8
  # `ui-imports-app-store` guards from the other side.
9
9
  #
10
- # Only 2 hits across tg-gallery + observatory — a clean ratchet on new code
11
- # rather than a cleanup campaign. The PPA original pointed at
12
- # `apps/ppa/lib/constants/urls.ts`; the message below states the destination
10
+ # Only 2 hits across two consumer apps — a clean ratchet on new code
11
+ # rather than a cleanup campaign. The source app original pointed at
12
+ # `apps/<app>/lib/constants/urls.ts`; the message below states the destination
13
13
  # generically.
14
14
  id: hardcoded-url-in-component
15
15
  language: tsx
@@ -1,12 +1,12 @@
1
1
  # ── G1, rule 2 of 3: per-row observer extraction ───────────────────────
2
2
  #
3
- # The MobX list rule from CLAUDE.md: mapping an observable collection with the
3
+ # The house MobX list rule: mapping an observable collection with the
4
4
  # row body written inline makes the PARENT track every field every row reads, so
5
5
  # one item's change invalidates the whole list. Extracting the row into its own
6
6
  # `observer` component localises the invalidation.
7
7
  #
8
8
  # The report's audit found this rule already obeyed everywhere it looked (131
9
- # `*Row.tsx` files in merkle alone) — so it lands as a ratchet on new code, not
9
+ # `*Row.tsx` files in one monorepo alone) — so it lands as a ratchet on new code, not
10
10
  # as a cleanup campaign.
11
11
  #
12
12
  # Threshold: the mapped element must contain TWO OR MORE nested JSX elements
@@ -44,7 +44,7 @@ message: |
44
44
  Extract the body into its own `observer` component and pass the item down:
45
45
  {items.map(t => <TaskRow key={t.id} task={t} />)}
46
46
  The parent then re-renders only on insert, remove and reorder; each row
47
- re-renders on its own fields. See CLAUDE.md "MobX lists" and the
47
+ re-renders on its own fields. See the house "MobX lists" convention and the
48
48
  mobx-components skill.
49
49
  Doesn't apply when the mapped children are pure data — constants or plain
50
50
  props rather than observables.
@@ -74,11 +74,11 @@ rule:
74
74
  # convenience — it is the rule's own rationale made into its scope: the
75
75
  # defect is that the PARENT'S reactive scope tracks every field every row
76
76
  # reads, and a component with no reactive scope has no such defect. It is
77
- # also the only syntactically decidable form of CLAUDE.md's carve-out
77
+ # also the only syntactically decidable form of the house carve-out
78
78
  # ("when the rendered children are pure data … the rule doesn't apply").
79
79
  #
80
80
  # Measured, not assumed: without this clause the rule fired 50 times in
81
- # byoklab/components — a UI library and its examples/docs site, which
81
+ # a UI library and its examples/docs site, which
82
82
  # contain no MobX whatsoever — where every hit was a false positive at
83
83
  # `error` severity. With it, 0 there.
84
84
  #
@@ -94,10 +94,10 @@ rule:
94
94
  - inside:
95
95
  stopBy: end
96
96
  kind: jsx_expression
97
- # CLAUDE.md's own carve-out: "When the rendered children are pure data
97
+ # The house convention's own carve-out: "When the rendered children are pure data
98
98
  # (constants, plain props, not MobX observables), the rule doesn't
99
99
  # apply." A literal array is the one case that is provably constant —
100
- # observatory's SessionInfoSkeleton maps `[1, 2, 3, 4]` to draw four
100
+ # a session-viewer app's SessionInfoSkeleton maps `[1, 2, 3, 4]` to draw four
101
101
  # placeholder cards, which no amount of extraction improves.
102
102
  - not:
103
103
  has:
@@ -1,5 +1,5 @@
1
- # ── rule body adopted from faceless-photo-lib `no-instanceof-map-set` (wave 2 triage) ──
2
- # The two rules were duplicates; the faceless implementation is strictly better,
1
+ # ── rule body adopted from a consumer repo's `no-instanceof-map-set` (wave 2 triage) ──
2
+ # The two rules were duplicates; the consumer's implementation is strictly better,
3
3
  # so the canon id keeps its message and takes that body. Why it is better here:
4
4
  # the old patterns named only Map and Set; WeakMap and WeakSet have exactly the
5
5
  # same cross-realm failure and were invisible.
@@ -1,5 +1,5 @@
1
- # ── rule body adopted from faceless-photo-lib `no-instanceof-map-set` (wave 2 triage) ──
2
- # The two rules were duplicates; the faceless implementation is strictly better,
1
+ # ── rule body adopted from a consumer repo's `no-instanceof-map-set` (wave 2 triage) ──
2
+ # The two rules were duplicates; the consumer's implementation is strictly better,
3
3
  # so the canon id keeps its message and takes that body. Why it is better here:
4
4
  # the old patterns named only Map and Set; WeakMap and WeakSet have exactly the
5
5
  # same cross-realm failure and were invisible.
@@ -8,7 +8,7 @@
8
8
  # way to say "both languages", so a twin id per language is the only option.
9
9
  #
10
10
  # Measured 2026-09-06 across the same five repos: 29 findings in `.tsx`
11
- # (SiteCraft 1, faceless 2, observatory 6, tg-gallery 2, merkle-substrate 18).
11
+ # (per repo: 1, 2, 6, 2, 18).
12
12
  # `if (x.kind === …)` branching lives in components at least as often as in
13
13
  # plain modules, which is precisely where the union grows a variant unnoticed.
14
14
  #
@@ -8,7 +8,7 @@
8
8
  # way to say "both languages", so a twin id per language is the only option.
9
9
  #
10
10
  # Measured 2026-09-06 across the same five repos: 41 findings in `.tsx`
11
- # (SiteCraft 1, faceless 7, observatory 9, tg-gallery 6, merkle-substrate 18).
11
+ # (per repo: 1, 7, 9, 6, 18).
12
12
  # This twin restores intent rather than extending it: the `files:` globs below
13
13
  # already list `**/components/**/*.tsx` and `**/screens/**/*.tsx`, and under
14
14
  # `language: typescript` those three lines could never match anything. The rule
@@ -43,7 +43,7 @@ message: |
43
43
  - a shared module as a typed constant + alias when it is purely lexical
44
44
  (file kinds, palette names) with no state attached.
45
45
  Component prop types then consume the shared type instead of restating it.
46
- See the mobx-models skill and report §8.
46
+ See the mobx-models skill.
47
47
  Suppressing this one needs the id you see above — `ast-grep-ignore: literal-union-in-component-tsx`.
48
48
  `literal-union-in-component` is a DIFFERENT rule (the .ts arm) and does not cover it.
49
49
  rule:
@@ -1,12 +1,12 @@
1
- # PROMOTED to canon in wave 2 from PPA `r14-literal-union-in-component` (rule-triage).
1
+ # PROMOTED to canon in wave 2 from the source app `r14-literal-union-in-component` (rule-triage).
2
2
  #
3
- # Generic, not PPA-specific: the house store layout already states it — report §8
4
- # puts «string-literal union'ы вроде `type Tab = "tasks" | "habits"`, которым
5
- # запрещено жить в файлах компонентов» in the `ui/` tier of the four-level model.
6
- # The PPA original hard-coded `apps/ppa/components/**` and `apps/ppa/app/**`;
3
+ # Generic, not specific to the source app: the house store layout already states it:
4
+ # string-literal unions such as `type Tab = "tasks" | "habits"` may not live
5
+ # in component files of the `ui/` tier of the four-level model.
6
+ # The source app original hard-coded `apps/<app>/components/**` and `apps/<app>/app/**`;
7
7
  # the globs below are the same intent stated for any repo.
8
8
  #
9
- # 23 hits across tg-gallery + observatory with the PPA globs stripped, so it is
9
+ # 23 hits across two consumer apps with the source app globs stripped, so it is
10
10
  # a live rule elsewhere and not a local house style.
11
11
  id: literal-union-in-component
12
12
  language: typescript
@@ -35,7 +35,7 @@ message: |
35
35
  - a shared module as a typed constant + alias when it is purely lexical
36
36
  (file kinds, palette names) with no state attached.
37
37
  Component prop types then consume the shared type instead of restating it.
38
- See the mobx-models skill and report §8.
38
+ See the mobx-models skill.
39
39
  rule:
40
40
  all:
41
41
  - kind: type_alias_declaration
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # `match-bool-to-null` is `language: tsx`, so it reads `.tsx` and never `.ts` — ast-grep's
4
4
  # languages are disjoint. What it matches needs no JSX, so it can sit in a plain
5
- # `.ts` file just as well. Added by is-760b0b4b (owner's answer: option 1а).
5
+ # `.ts` file just as well. The `.ts` twin closes that gap.
6
6
  #
7
7
  # Keep this file's `severity`, `files`, `ignores`, `utils` and `rule:`
8
8
  # blocks IDENTICAL to `match-bool-to-null.yml` (`.tsx` globs spelled `.ts`);
@@ -26,7 +26,7 @@
26
26
  #
27
27
  # Known false-positive class, accepted at warning tier: a `use…Store` hook can
28
28
  # return non-observable services next to the stores — `const { platform } =
29
- # useStore()` in tg-gallery's ShareButton pulls a platform adapter, and a
29
+ # useStore()` in a gallery app's ShareButton pulls a platform adapter, and a
30
30
  # component reading only that does not strictly need the wrap. Wrapping it is
31
31
  # harmless; the rule does not distinguish.
32
32
  id: missing-observer
@@ -55,7 +55,7 @@ utils:
55
55
  # Every name a store hook can introduce, in the three spellings the park uses.
56
56
  # Binding these is what lets the rule tell `ui.groupBy` (a plain `UIManifest`
57
57
  # prop) apart from `uiStore.x` (the store) — without it the rule fires on any
58
- # dotted value in the markup, which is how observatory's deliberately-plain
58
+ # dotted value in the markup, which is how a session-viewer app's deliberately-plain
59
59
  # `RichEntityListView` got flagged for rendering `groupBy={ui.groupBy}`.
60
60
  store-binding:
61
61
  any:
@@ -97,8 +97,8 @@ utils:
97
97
  #
98
98
  # Stated as an exclusion of the two deferred positions rather than as "appears
99
99
  # inside JSX", because real components mostly do NOT dereference the store in
100
- # the markup: tg-gallery's GalleryView reads `const layoutType =
101
- # themeStore.layout.type` and `match(galleryStore.detailState)`, observatory's
100
+ # the markup: a gallery app's GalleryView reads `const layoutType =
101
+ # themeStore.layout.type` and `match(galleryStore.detailState)`, a session-viewer app's
102
102
  # SessionsTreeSection reads `data.sessions.filter(...)` — all render reads,
103
103
  # none of them inside a JSX expression. An "inside JSX" test missed every one.
104
104
  # The test is structural: a read sitting inside a NESTED function is deferred,
@@ -152,7 +152,7 @@ rule:
152
152
  matches: jsx-node
153
153
  # The component must RENDER a field off something the store gave it. Both
154
154
  # halves matter: a component that pulls a store only to call an action from
155
- # a handler needs no wrap (observatory writes two of those on purpose), and
155
+ # a handler needs no wrap (a session-viewer app writes two of those on purpose), and
156
156
  # a dotted value in the markup means nothing unless the dotted thing came
157
157
  # from a store. `$SLICE` ties the two clauses together.
158
158
  - any:
@@ -34,7 +34,7 @@
34
34
  # `Resource` must carry type parameters to match. Without that the rule hits
35
35
  # `interface Resource { name; url; type; description }` in VolumePhotography — a
36
36
  # page listing conference links, nothing to do with async state.
37
- # CARVE-OUT 1 IS NOW A REPO DECLARATION, not only a glob (is-086a90ac).
37
+ # CARVE-OUT 1 IS NOW A REPO DECLARATION, not only a glob.
38
38
  # `@agentvibes/kit` exists since 2026-09 and lives in its own repo, where verify
39
39
  # sees its files as `src/resource/resource.ts` — neither `**/packages/kit/**`
40
40
  # nor `**/agentvibes-kit/**` matches that, and no path glob can tell that tree
@@ -44,7 +44,7 @@
44
44
  # kit_source = "^src/"
45
45
  #
46
46
  # together with the `appliesTo: not-kit-source` marker below. Same mechanism
47
- # `[verify] screens` uses (is-7067a0b8): the repo states a fact about itself,
47
+ # `[verify] screens` uses: the repo states a fact about itself,
48
48
  # the canon says which rules stand down for it. The globs stay for monorepos
49
49
  # that vendor the kit under `packages/kit/`.
50
50
  #
@@ -23,7 +23,7 @@
23
23
  # `Resource` must carry type parameters to match. Without that the rule hits
24
24
  # `interface Resource { name; url; type; description }` in VolumePhotography — a
25
25
  # page listing conference links, nothing to do with async state.
26
- # CARVE-OUT 1 IS NOW A REPO DECLARATION, not only a glob (is-086a90ac).
26
+ # CARVE-OUT 1 IS NOW A REPO DECLARATION, not only a glob.
27
27
  # `@agentvibes/kit` exists since 2026-09 and lives in its own repo, where verify
28
28
  # sees its files as `src/resource/resource.ts` — neither `**/packages/kit/**`
29
29
  # nor `**/agentvibes-kit/**` matches that, and no path glob can tell that tree
@@ -33,7 +33,7 @@
33
33
  # kit_source = "^src/"
34
34
  #
35
35
  # together with the `appliesTo: not-kit-source` marker below. Same mechanism
36
- # `[verify] screens` uses (is-7067a0b8): the repo states a fact about itself,
36
+ # `[verify] screens` uses: the repo states a fact about itself,
37
37
  # the canon says which rules stand down for it. The globs stay for monorepos
38
38
  # that vendor the kit under `packages/kit/`.
39
39
  #
@@ -7,13 +7,10 @@
7
7
  # out once in `catch-empty-tsx.yml`; the short version is that ast-grep has no
8
8
  # way to say "both languages", so a twin id per language is the only option.
9
9
  #
10
- # Measured 2026-09-06 across the five repos that consume guardrails
11
- # (SiteCraftMonorepo 40, faceless-photo-lib 28, agent-session-observatory 18,
12
- # tg-gallery 47, merkle-substrate 52): 185 `.otherwise()` chains in `.tsx` the
13
- # `.ts` arm never saw. Adding them was the owner's call — decision D4 in
14
- # doc-e4526f1a parks the question of banning `.otherwise()` outright, so the
15
- # owner was asked whether to surface the .tsx half before D4 lands and answered
16
- # «1» (add the twin now, severity warning) on 2026-09-06, is-8385d5dd.
10
+ # Measured 2026-09-06 across five repos that consume guardrails: 185
11
+ # `.otherwise()` chains in `.tsx` that the `.ts` arm never saw. The twin ships
12
+ # at severity warning; whether to ban `.otherwise()` outright is a separate,
13
+ # open question.
17
14
  #
18
15
  # Keep this file's `rule:` block IDENTICAL to `non-exhaustive-match.yml`.
19
16
  #
@@ -1,5 +1,5 @@
1
- # ── rule body adopted from faceless-photo-lib `ts-pattern-prefer-exhaustive` (wave 2 triage) ──
2
- # The two rules were duplicates; the faceless implementation is strictly better,
1
+ # ── rule body adopted from a consumer repo's `ts-pattern-prefer-exhaustive` (wave 2 triage) ──
2
+ # The two rules were duplicates; the consumer's implementation is strictly better,
3
3
  # so the canon id keeps its message and takes that body. Why it is better here:
4
4
  # the old `pattern: $X.otherwise($$$)` fired on ANY `.otherwise()` method, not just
5
5
  # a ts-pattern chain — a false-positive class. Anchoring to a `match()` chain
@@ -30,7 +30,7 @@ message: |
30
30
  It ships in `@agentvibes/kit/react`. Pass dependencies to the constructor
31
31
  explicitly so the store stays testable with `new GalleryPageStore(fake, "x")`
32
32
  and no render at all.
33
- See the simple-components skill (§store access) and report §8.
33
+ See the simple-components skill (§store access).
34
34
  rule:
35
35
  all:
36
36
  - kind: call_expression
@@ -26,7 +26,7 @@ message: |
26
26
  It ships in `@agentvibes/kit/react`. Pass dependencies to the constructor
27
27
  explicitly so the store stays testable with `new GalleryPageStore(fake, "x")`
28
28
  and no render at all.
29
- See the simple-components skill (§store access) and report §8.
29
+ See the simple-components skill (§store access).
30
30
  rule:
31
31
  all:
32
32
  - kind: call_expression
@@ -1,6 +1,6 @@
1
1
  # ── simple-components, rule 4 of 4 ─────────────────────────────────────
2
2
  #
3
- # The logic half of the two-tier split (decision D8, report §9): a screen picks
3
+ # The logic half of the two-tier split: a screen picks
4
4
  # the models, matches the state and composes views. It carries no styling.
5
5
  #
6
6
  # Scoped to `**/*.screen.tsx` and nothing else, deliberately. The contract says
@@ -10,7 +10,7 @@
10
10
  # one filename the convention makes explicit, so it is the one place the rule can
11
11
  # be right without a manifest.
12
12
  #
13
- # WARNING TIER: same reason as `view-file-logic` — D8 is recommendation-tier.
13
+ # WARNING TIER: same reason as `view-file-logic` — the two-tier split is recommendation-tier.
14
14
  id: screen-file-styling
15
15
  language: tsx
16
16
  severity: warning
@@ -22,7 +22,7 @@ message: |
22
22
  on a second job and starts growing the layout it should have delegated.
23
23
  Move the markup into a `*.view.tsx` (or a shared UI primitive) and let the
24
24
  screen pass it data.
25
- See the simple-components skill (§two-tier) and report §9.
25
+ See the simple-components skill (§two-tier).
26
26
  rule:
27
27
  all:
28
28
  - kind: jsx_attribute
@@ -8,7 +8,7 @@
8
8
  # way to say "both languages", so a twin id per language is the only option.
9
9
  #
10
10
  # Measured 2026-09-06 across the same five repos: 24 findings in `.tsx`
11
- # (SiteCraft 3, faceless 0, observatory 9, tg-gallery 0, merkle-substrate 12).
11
+ # (per repo: 3, 0, 9, 0, 12).
12
12
  #
13
13
  # Keep this file's `rule:` block IDENTICAL to `silent-default-return.yml`.
14
14
  #
@@ -48,7 +48,7 @@ utils:
48
48
  kind: identifier
49
49
  regex: '^runInAction$'
50
50
  # An observable MUTATION — which is the whole defect. Without this clause the
51
- # rule fires on any async method, and in SiteCraft 10 of its 12 hits were
51
+ # rule fires on any async method, and in a site-builder repo 10 of its 12 hits were
52
52
  # private I/O helpers (`walkDir`, `collectAllFiles`, `uploadFile`) that await
53
53
  # a filesystem and never touch a field. Those have no action coverage to lose,
54
54
  # so at warning tier they were pure noise.
@@ -38,7 +38,7 @@ utils:
38
38
  kind: identifier
39
39
  regex: '^runInAction$'
40
40
  # An observable MUTATION — which is the whole defect. Without this clause the
41
- # rule fires on any async method, and in SiteCraft 10 of its 12 hits were
41
+ # rule fires on any async method, and in a site-builder repo 10 of its 12 hits were
42
42
  # private I/O helpers (`walkDir`, `collectAllFiles`, `uploadFile`) that await
43
43
  # a filesystem and never touch a field. Those have no action coverage to lose,
44
44
  # so at warning tier they were pure noise.
@@ -1,5 +1,5 @@
1
1
  # ADOPTION NOTE (canon promotion): brownfield-heavy — ~48-105 whole-tree hits
2
- # per useStore-era repo (tg-gallery/observatory/ppa). Run it DIFF-SCOPED
2
+ # per useStore-era repo (three consumer apps). Run it DIFF-SCOPED
3
3
  # (verify-diff / hook) until a repo's useStore migration campaign lands;
4
4
  # whole-tree `verify` output will be loud there by design, not by accident.
5
5
  # ── simple-components, rule 1 of 4 — the .tsx half ─────────────────────
@@ -17,7 +17,7 @@ ignores:
17
17
  - '**/*.spec.tsx'
18
18
  - '**/__tests__/**'
19
19
  message: |
20
- A store reached through React context. Decision D1: MobX already gives every
20
+ A store reached through React context. Rule: MobX already gives every
21
21
  component a live channel to the data — a second one buys nothing and costs a
22
22
  provider, a null-check and a hook on every file that reads state.
23
23
  Do instead:
@@ -29,7 +29,7 @@ message: |
29
29
  - everything below a screen receives `model={...}` as a prop.
30
30
  Tests stop needing a provider at all: `new XxxStore(fakeDeps)` directly, and
31
31
  `*.view.tsx` files mount with nothing around them.
32
- See the simple-components skill (§store access) and report §8.
32
+ See the simple-components skill (§store access).
33
33
  rule:
34
34
  any:
35
35
  - all:
@@ -1,15 +1,15 @@
1
1
  # ADOPTION NOTE (canon promotion): brownfield-heavy — ~48-105 whole-tree hits
2
- # per useStore-era repo (tg-gallery/observatory/ppa). Run it DIFF-SCOPED
2
+ # per useStore-era repo (three consumer apps). Run it DIFF-SCOPED
3
3
  # (verify-diff / hook) until a repo's useStore migration campaign lands;
4
4
  # whole-tree `verify` output will be loud there by design, not by accident.
5
5
  # ── simple-components, rule 1 of 4 ─────────────────────────────────────
6
6
  #
7
- # Decision D1: a MobX project has NO store context. One module-level `rootStore`,
7
+ # Rule: a MobX project has NO store context. One module-level `rootStore`,
8
8
  # imported at screen level only; everything below gets models through props.
9
9
  #
10
10
  # The canon rule `direct-store-import` covers the other half — where a store
11
11
  # import is legal. Nothing in the canon bans the context CHANNEL itself, which is
12
- # what this rule is for. Audit basis (report §8): all four store-bearing apps
12
+ # what this rule is for. Audit basis: all four store-bearing apps
13
13
  # route through a `useStore()` context hook (215/97/69/46 call sites) and not one
14
14
  # of them uses it for anything context is needed for: in one of them the provider
15
15
  # hands out a module-level singleton unconditionally, and its own tests bypass
@@ -27,7 +27,7 @@ ignores:
27
27
  - '**/*.spec.ts'
28
28
  - '**/__tests__/**'
29
29
  message: |
30
- A store reached through React context. Decision D1: MobX already gives every
30
+ A store reached through React context. Rule: MobX already gives every
31
31
  component a live channel to the data — a second one buys nothing and costs a
32
32
  provider, a null-check and a hook on every file that reads state.
33
33
  Do instead:
@@ -39,7 +39,7 @@ message: |
39
39
  - everything below a screen receives `model={...}` as a prop.
40
40
  Tests stop needing a provider at all: `new XxxStore(fakeDeps)` directly, and
41
41
  `*.view.tsx` files mount with nothing around them.
42
- See the simple-components skill (§store access) and report §8.
42
+ See the simple-components skill (§store access).
43
43
  rule:
44
44
  any:
45
45
  # `useStore()` — the call...
@@ -19,10 +19,10 @@
19
19
  # THE NEGATIVE IS THE WHOLE DESIGN OF THIS RULE. The identical shape,
20
20
  # `return this.data.x`, is the house data-wrapper pattern and is completely
21
21
  # legal: a `Model` class holding a plain record and exposing its fields as
22
- # observable getters. Measured across SiteCraft, observatory, byok and metro,
22
+ # observable getters. Measured across four consumer repos,
23
23
  # single-line `return this.X.y` getters break down as:
24
24
  #
25
- # 89 × this.data.* byok Model, metro domain stores — LEGAL
25
+ # 89 × this.data.* a model class, domain stores — LEGAL
26
26
  # 2 × this.connectionStore.* — the real store→store alias
27
27
  #
28
28
  # So the discriminator is the intermediate NAME, and the rule matches only
@@ -8,10 +8,10 @@
8
8
  # THE NEGATIVE IS THE WHOLE DESIGN OF THIS RULE. The identical shape,
9
9
  # `return this.data.x`, is the house data-wrapper pattern and is completely
10
10
  # legal: a `Model` class holding a plain record and exposing its fields as
11
- # observable getters. Measured across SiteCraft, observatory, byok and metro,
11
+ # observable getters. Measured across four consumer repos,
12
12
  # single-line `return this.X.y` getters break down as:
13
13
  #
14
- # 89 × this.data.* byok Model, metro domain stores — LEGAL
14
+ # 89 × this.data.* a model class, domain stores — LEGAL
15
15
  # 2 × this.connectionStore.* — the real store→store alias
16
16
  #
17
17
  # So the discriminator is the intermediate NAME, and the rule matches only
@@ -24,7 +24,7 @@
24
24
  #
25
25
  # Note the callee is matched as an identifier rather than with
26
26
  # `pattern: makeAutoObservable($$$)`. A pattern does not match a call carrying
27
- # explicit type arguments, and SiteCraft writes
27
+ # explicit type arguments, and a site-builder repo writes
28
28
  # `makeAutoObservable<this, '_buildTimer' | 'buildManager'>(this, {…})` — which
29
29
  # silently cost the whole of project.store.ts, 7 real call sites, until the
30
30
  # count came up short against the grep.
@@ -33,7 +33,7 @@ language: tsx
33
33
  severity: error
34
34
  ignores:
35
35
  # A test may drive a store's state directly to set up a scenario; that is the
36
- # sanctioned way to test a store without a render. All 6 of tg-gallery's
36
+ # sanctioned way to test a store without a render. All 6 of a gallery app's
37
37
  # runInAction sites are tests, which is why the report counts it as 0.
38
38
  - '**/*.test.tsx'
39
39
  - '**/*.spec.tsx'
@@ -13,7 +13,7 @@
13
13
  #
14
14
  # Note the callee is matched as an identifier rather than with
15
15
  # `pattern: makeAutoObservable($$$)`. A pattern does not match a call carrying
16
- # explicit type arguments, and SiteCraft writes
16
+ # explicit type arguments, and a site-builder repo writes
17
17
  # `makeAutoObservable<this, '_buildTimer' | 'buildManager'>(this, {…})` — which
18
18
  # silently cost the whole of project.store.ts, 7 real call sites, until the
19
19
  # count came up short against the grep.
@@ -22,7 +22,7 @@ language: typescript
22
22
  severity: error
23
23
  ignores:
24
24
  # A test may drive a store's state directly to set up a scenario; that is the
25
- # sanctioned way to test a store without a render. All 6 of tg-gallery's
25
+ # sanctioned way to test a store without a render. All 6 of a gallery app's
26
26
  # runInAction sites are tests, which is why the report counts it as 0.
27
27
  - '**/*.test.ts'
28
28
  - '**/*.spec.ts'
@@ -49,7 +49,7 @@ message: |
49
49
  with progress and no notion of revalidation) legitimately ticks on a timer.
50
50
  There is no manifest glob for that yet, so mark those with a reason:
51
51
  // ast-grep-ignore: store-no-setinterval-poll -- progress tick for a render job
52
- See report §14 and the mobx-models skill.
52
+ See the mobx-models skill.
53
53
  rule:
54
54
  all:
55
55
  - kind: call_expression
@@ -38,7 +38,7 @@ message: |
38
38
  with progress and no notion of revalidation) legitimately ticks on a timer.
39
39
  There is no manifest glob for that yet, so mark those with a reason:
40
40
  // ast-grep-ignore: store-no-setinterval-poll -- progress tick for a render job
41
- See report §14 and the mobx-models skill.
41
+ See the mobx-models skill.
42
42
  rule:
43
43
  all:
44
44
  - kind: call_expression
@@ -1,10 +1,10 @@
1
- # PROMOTED to canon in wave 2 from faceless-photo-lib/.ast-grep (rule-triage).
1
+ # PROMOTED to canon in wave 2 from a consumer repo's .ast-grep (rule-triage).
2
2
  # No canon equivalent existed: `non-exhaustive-match` is about PREFERRING
3
- # `.exhaustive()` over `.otherwise()`, which is a style call the owner has
4
- # explicitly deferred (decision #4). This is the different, non-negotiable
3
+ # `.exhaustive()` over `.otherwise()`, which is a style question
4
+ # that is deliberately left open. This is the different, non-negotiable
5
5
  # half — a chain with NO terminator evaluates to a builder object, so every
6
6
  # arm body is dead code and the truthy builder keeps the caller compiling.
7
- # Verified on real code: took a terminated chain out of observatory, deleted
7
+ # Verified on real code: took a terminated chain out of a consumer app, deleted
8
8
  # `.exhaustive()` -> fires; left it -> silent; a dangling chain nested in a
9
9
  # callback of an OUTER terminated chain -> fires on the inner one only;
10
10
  # `"abc".match(/b/)` -> silent.
@@ -1,10 +1,10 @@
1
- # PROMOTED to canon in wave 2 from faceless-photo-lib/.ast-grep (rule-triage).
1
+ # PROMOTED to canon in wave 2 from a consumer repo's .ast-grep (rule-triage).
2
2
  # No canon equivalent existed: `non-exhaustive-match` is about PREFERRING
3
- # `.exhaustive()` over `.otherwise()`, which is a style call the owner has
4
- # explicitly deferred (decision #4). This is the different, non-negotiable
3
+ # `.exhaustive()` over `.otherwise()`, which is a style question
4
+ # that is deliberately left open. This is the different, non-negotiable
5
5
  # half — a chain with NO terminator evaluates to a builder object, so every
6
6
  # arm body is dead code and the truthy builder keeps the caller compiling.
7
- # Verified on real code: took a terminated chain out of observatory, deleted
7
+ # Verified on real code: took a terminated chain out of a consumer app, deleted
8
8
  # `.exhaustive()` -> fires; left it -> silent; a dangling chain nested in a
9
9
  # callback of an OUTER terminated chain -> fires on the inner one only;
10
10
  # `"abc".match(/b/)` -> silent.
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # `ui-imports-app-store` is `language: tsx`, so it reads `.tsx` and never `.ts` — ast-grep's
4
4
  # languages are disjoint. What it matches needs no JSX, so it can sit in a plain
5
- # `.ts` file just as well. Added by is-760b0b4b (owner's answer: option 1а).
5
+ # `.ts` file just as well. The `.ts` twin closes that gap.
6
6
  #
7
7
  # Keep this file's `severity`, `files`, `ignores`, `utils` and `rule:`
8
8
  # blocks IDENTICAL to `ui-imports-app-store.yml` (`.tsx` globs spelled `.ts`);
@@ -52,7 +52,7 @@ rule:
52
52
  stopBy: end
53
53
  kind: string_fragment
54
54
  regex: '(^|/)stores?(/|$)'
55
- # X7 (report §2): the view-model pattern this rule exists to protect tells a
55
+ # The view-model pattern this rule exists to protect tells a
56
56
  # UI component to type itself against `IXxxModel` — which lives in the store
57
57
  # module. Firing at `error` on that import made the rule contradict the
58
58
  # pattern it enforces, so a compliant component could not be written without
@@ -40,7 +40,7 @@ rule:
40
40
  stopBy: end
41
41
  kind: string_fragment
42
42
  regex: '(^|/)stores?(/|$)'
43
- # X7 (report §2): the view-model pattern this rule exists to protect tells a
43
+ # The view-model pattern this rule exists to protect tells a
44
44
  # UI component to type itself against `IXxxModel` — which lives in the store
45
45
  # module. Firing at `error` on that import made the rule contradict the
46
46
  # pattern it enforces, so a compliant component could not be written without
@@ -1,18 +1,18 @@
1
1
  # ── simple-components, rule 3 of 4 ─────────────────────────────────────
2
2
  #
3
- # The view half of the two-tier split (decision D8, report §9): a `*.view.tsx`
3
+ # The view half of the two-tier split: a `*.view.tsx`
4
4
  # is props in, JSX out. No hooks, no `match`, no ternary, no data transformation.
5
5
  # That contract is what makes a view the file a cheap model writes without
6
6
  # getting it wrong, and what lets its test mount it with nothing around it.
7
7
  #
8
- # WARNING TIER ON PURPOSE. D8 ships the split as a recommendation first, with a
8
+ # WARNING TIER ON PURPOSE. The two-tier split ships as a recommendation first, with a
9
9
  # ratchet on the share of view files — not as a hard gate. Raising this to error
10
- # would decide a question the owner deliberately parked. The store half of the
10
+ # would decide a question that is deliberately left open. The store half of the
11
11
  # same contract is the canon's `view-imports-store` (error), which is a narrower
12
12
  # claim: no store access anywhere in the app's view files.
13
13
  #
14
14
  # `useTheme` / `useTokens` / `useStyles` / `useColorScheme` are exempt: the house
15
- # styling idiom is RN inline objects read from a theme hook (report §10), so
15
+ # styling idiom is RN inline objects read from a theme hook, so
16
16
  # banning that hook would ban styling from the file that owns styling.
17
17
  id: view-file-logic
18
18
  language: tsx
@@ -28,7 +28,7 @@ message: |
28
28
  is the same branch, laundered.
29
29
  Exempt: `useTheme` / `useTokens` / `useStyles` / `useColorScheme` — styling is
30
30
  what a view owns.
31
- See the simple-components skill (§two-tier) and report §9.
31
+ See the simple-components skill (§two-tier).
32
32
  rule:
33
33
  any:
34
34
  # Any hook call that is not a styling hook.