@afokapu/atdd-bun 0.4.0 → 0.6.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 (209) hide show
  1. package/README.md +85 -3
  2. package/conventions/coder.bun/coder.bun.complexity-cyclomatic.convention.yaml +1 -3
  3. package/conventions/coder.bun/coder.bun.complexity-length.convention.yaml +1 -2
  4. package/conventions/coder.bun/coder.bun.complexity-nesting.convention.yaml +1 -2
  5. package/conventions/coder.bun/coder.bun.dead-code-reachability.convention.yaml +1 -2
  6. package/conventions/coder.bun/coder.bun.design-token-color.convention.yaml +1 -1
  7. package/conventions/coder.bun/coder.bun.design-token-hardcoded.convention.yaml +1 -1
  8. package/conventions/coder.bun/coder.bun.dto-mapper.convention.yaml +2 -1
  9. package/conventions/coder.bun/coder.bun.dto-placement.convention.yaml +2 -1
  10. package/conventions/coder.bun/coder.bun.dto-purity.convention.yaml +2 -1
  11. package/conventions/coder.bun/coder.bun.duplication-intra-layer.convention.yaml +1 -2
  12. package/conventions/coder.bun/coder.bun.green-header-order.convention.yaml +2 -11
  13. package/conventions/coder.bun/coder.bun.green-header-purpose.convention.yaml +2 -11
  14. package/conventions/coder.bun/coder.bun.green-header-runtime.convention.yaml +2 -11
  15. package/conventions/coder.bun/coder.bun.green-header-tested-by.convention.yaml +2 -11
  16. package/conventions/coder.bun/coder.bun.green-urn-layer.convention.yaml +2 -11
  17. package/conventions/coder.bun/coder.bun.green-urn-marker.convention.yaml +2 -12
  18. package/conventions/coder.bun/coder.bun.green-urn-name-matches.convention.yaml +3 -12
  19. package/conventions/coder.bun/coder.bun.green-urn-pattern.convention.yaml +2 -11
  20. package/conventions/coder.bun/coder.bun.green-urn-side.convention.yaml +2 -11
  21. package/conventions/coder.bun/coder.bun.green-urn-wagon-feature.convention.yaml +2 -11
  22. package/conventions/coder.bun/coder.bun.layer-naming.convention.yaml +2 -1
  23. package/conventions/coder.bun/coder.bun.logging-structured.convention.yaml +2 -4
  24. package/conventions/coder.bun/coder.bun.quality-comments.convention.yaml +1 -2
  25. package/conventions/coder.bun/coder.bun.quality-mi.convention.yaml +1 -2
  26. package/conventions/coder.bun/coder.bun.responsive-breakpoints-declared.convention.yaml +31 -0
  27. package/conventions/coder.bun/coder.bun.responsive-no-fixed-width.convention.yaml +30 -0
  28. package/conventions/coder.bun/coder.bun.responsive-viewport-meta.convention.yaml +31 -0
  29. package/conventions/coder.bun/coder.bun.runtime-executes-the-declaration.convention.yaml +2 -18
  30. package/conventions/coder.bun/coder.bun.runtime-typecheck-enforced.convention.yaml +2 -15
  31. package/conventions/coder.htmx/coder.htmx.swap-no-inline-handler.convention.yaml +3 -3
  32. package/conventions/coder.htmx/coder.htmx.verb-endpoint-is-routed.convention.yaml +2 -2
  33. package/conventions/coder.htmx/coder.htmx.verb-mutation-signals-progress.convention.yaml +3 -2
  34. package/conventions/planner.docs/planner.docs.adr-registry-derived.convention.yaml +2 -12
  35. package/conventions/planner.docs/planner.docs.area-index-required.convention.yaml +2 -12
  36. package/conventions/planner.docs/planner.docs.artifact-path-shape.convention.yaml +2 -12
  37. package/conventions/planner.docs/planner.docs.asciidoc-only.convention.yaml +2 -13
  38. package/conventions/planner.docs/planner.docs.doc-id-unique.convention.yaml +2 -12
  39. package/conventions/planner.docs/planner.docs.graph-target-resolves.convention.yaml +2 -12
  40. package/conventions/planner.docs/planner.docs.identity-required.convention.yaml +2 -12
  41. package/conventions/planner.docs/planner.docs.reference-integrity.convention.yaml +2 -12
  42. package/conventions/planner.docs/planner.docs.undeclared-change.convention.yaml +2 -12
  43. package/conventions/tester.bun/tester.bun.acceptance-binding-declared.convention.yaml +2 -6
  44. package/conventions/tester.bun/tester.bun.acceptance-covers-tag-well-formed.convention.yaml +1 -5
  45. package/conventions/tester.bun/tester.bun.interlocking-train-sequence-is-exercised.convention.yaml +2 -14
  46. package/conventions/tester.bun/tester.bun.red-behavioral-assertion.convention.yaml +1 -5
  47. package/conventions/tester.bun/tester.bun.routing-runtime-family.convention.yaml +2 -1
  48. package/conventions/tester.bun/tester.bun.smoke-no-collaborator-substitution.convention.yaml +2 -7
  49. package/conventions/tester.bun/tester.bun.smoke-observable-assertion.convention.yaml +2 -7
  50. package/conventions/tester.bun/tester.bun.telemetry-emit.convention.yaml +2 -1
  51. package/conventions/tester.bun/tester.bun.test-carries-urn-identity.convention.yaml +2 -6
  52. package/conventions/tester.bun/tester.bun.test-isolation-no-live-state.convention.yaml +1 -5
  53. package/conventions/tester.bun/tester.bun.test-no-self-skip.convention.yaml +1 -5
  54. package/conventions/tester.bun/tester.bun.test-phase-declared.convention.yaml +2 -6
  55. package/conventions/tester.htmx/tester.htmx.a11y-harness.convention.yaml +32 -0
  56. package/conventions/tester.htmx/tester.htmx.covered-train-is-routed.convention.yaml +30 -0
  57. package/conventions/tester.htmx/tester.htmx.e2e-binds-declared-subject.convention.yaml +31 -0
  58. package/conventions/tester.htmx/tester.htmx.e2e-spec-naming.convention.yaml +32 -0
  59. package/conventions/tester.htmx/tester.htmx.exposed-journey-e2e-coverage.convention.yaml +31 -0
  60. package/conventions/tester.htmx/tester.htmx.fragment-asserts-returned-markup.convention.yaml +2 -6
  61. package/conventions/tester.htmx/tester.htmx.journey-binding-header.convention.yaml +32 -0
  62. package/conventions/tester.htmx/tester.htmx.journey-layer-assembly.convention.yaml +29 -0
  63. package/conventions/tester.htmx/tester.htmx.journey-no-acceptance-marker.convention.yaml +29 -0
  64. package/conventions/tester.htmx/tester.htmx.journey-urn-format.convention.yaml +32 -0
  65. package/conventions/tester.htmx/tester.htmx.presentation-smoke-coverage.convention.yaml +31 -0
  66. package/conventions/tester.htmx/tester.htmx.responsive-harness.convention.yaml +33 -0
  67. package/conventions/tester.htmx/tester.htmx.responsive-journey-coverage.convention.yaml +30 -0
  68. package/conventions/tester.htmx/tester.htmx.swap-oob-asserts-destination-id.convention.yaml +2 -1
  69. package/conventions/tester.htmx/tester.htmx.train-e2e-coverage.convention.yaml +32 -0
  70. package/conventions/tester.htmx/tester.htmx.verb-endpoint-coverage.convention.yaml +2 -1
  71. package/conventions/tester.htmx/tester.htmx.visual-harness.convention.yaml +28 -0
  72. package/conventions/traceability/traceability.plan.executable-acceptance-has-test.convention.yaml +5 -0
  73. package/conventions/traceability/traceability.source.tested-by-present.convention.yaml +5 -0
  74. package/conventions/traceability/traceability.source.tested-by-resolves.convention.yaml +5 -0
  75. package/conventions/traceability/traceability.test.binding-resolves.convention.yaml +5 -0
  76. package/detectors/atdd_topology/atdd.implementation.yaml +13 -0
  77. package/detectors/atdd_topology/detect.mjs +171 -0
  78. package/detectors/atdd_topology/fixtures/clean/atdd-bun.yaml +2 -0
  79. package/detectors/atdd_topology/fixtures/clean/e2e/interlockings/checkout/nominal.routes.test.ts +4 -0
  80. package/detectors/atdd_topology/fixtures/clean/e2e/journeys/checkout.journey.test.ts +4 -0
  81. package/detectors/atdd_topology/fixtures/clean/implementation/orders/features/place-order/domain/order.ts +4 -0
  82. package/detectors/atdd_topology/fixtures/clean/plan/_journeys/checkout.yaml +4 -0
  83. package/detectors/atdd_topology/fixtures/clean/plan/_trains/_interlockings/checkout.yaml +4 -0
  84. package/detectors/atdd_topology/fixtures/clean/plan/_trains/checkout.yaml +1 -0
  85. package/detectors/atdd_topology/fixtures/clean/plan/orders/E001.yaml +6 -0
  86. package/detectors/atdd_topology/fixtures/clean/plan/orders/_orders.yaml +5 -0
  87. package/detectors/atdd_topology/fixtures/clean/plan/orders/place-order.yaml +3 -0
  88. package/detectors/atdd_topology/fixtures/clean/tests/wagons/orders/features/place-order/unit/order.test.ts +4 -0
  89. package/detectors/atdd_topology/fixtures/dirty/plan/_journeys/checkout.yaml +3 -0
  90. package/detectors/atdd_topology/fixtures/dirty/plan/orders/E001.yaml +4 -0
  91. package/detectors/atdd_topology/fixtures/dirty/plan/orders/_orders.yaml +4 -0
  92. package/detectors/atdd_topology/fixtures/dirty/plan/orders/features/place-order.yaml +3 -0
  93. package/detectors/atdd_topology/fixtures/dirty/src/wagons/orders/features/place-order/domain/forged.ts +2 -0
  94. package/detectors/atdd_topology/fixtures/dirty/src/wagons/orders/features/place-order/domain/order.ts +2 -0
  95. package/detectors/atdd_topology/fixtures/dirty/tests/wagons/orders/features/place-order/unit/order.test.ts +4 -0
  96. package/detectors/atdd_traceability_closure/detect.mjs +5 -2
  97. package/detectors/bun_green_traceability_detector/urn_header.mjs +2 -1
  98. package/detectors/bun_interlocking_binding/checks/interlocking_runtime_executes.mjs +3 -2
  99. package/detectors/bun_interlocking_binding/detect.mjs +6 -5
  100. package/detectors/bun_interlocking_coverage/_shared/interlocking.mjs +4 -3
  101. package/detectors/bun_interlocking_coverage/checks/interlocking_train_sequence.mjs +2 -2
  102. package/detectors/bun_interlocking_infrastructure/_shared/interlocking.mjs +2 -1
  103. package/detectors/bun_interlocking_infrastructure/checks/journey_runner_boundary.mjs +3 -2
  104. package/detectors/bun_interlocking_infrastructure/checks/journey_station_routing.mjs +2 -1
  105. package/detectors/bun_interlocking_infrastructure/checks/wagon_contract_honoured.mjs +3 -2
  106. package/detectors/bun_responsive_detector/atdd.implementation.yaml +18 -0
  107. package/detectors/bun_responsive_detector/checks/_map.json +5 -0
  108. package/detectors/bun_responsive_detector/checks/_responsive.mjs +20 -0
  109. package/detectors/bun_responsive_detector/checks/responsive_breakpoints_declared.mjs +21 -0
  110. package/detectors/bun_responsive_detector/checks/responsive_no_fixed_width.mjs +13 -0
  111. package/detectors/bun_responsive_detector/checks/responsive_viewport_meta.mjs +20 -0
  112. package/detectors/bun_responsive_detector/detect.mjs +46 -0
  113. package/detectors/bun_responsive_detector/fixtures/clean/public/index.html +9 -0
  114. package/detectors/bun_responsive_detector/fixtures/clean/src/app.css +13 -0
  115. package/detectors/bun_responsive_detector/fixtures/clean/src/document.ts +7 -0
  116. package/detectors/bun_responsive_detector/fixtures/clean/src/fragment.html +1 -0
  117. package/detectors/bun_responsive_detector/fixtures/clean/src/head.ts +1 -0
  118. package/detectors/bun_responsive_detector/fixtures/clean/src/layout.tsx +8 -0
  119. package/detectors/bun_responsive_detector/fixtures/clean/src/range.css +3 -0
  120. package/detectors/bun_responsive_detector/fixtures/clean/src/viewport-expression.tsx +5 -0
  121. package/detectors/bun_responsive_detector/fixtures/dirty/public/fixed-viewport.html +5 -0
  122. package/detectors/bun_responsive_detector/fixtures/dirty/public/no-meta.html +5 -0
  123. package/detectors/bun_responsive_detector/fixtures/dirty/public/no-zoom.html +5 -0
  124. package/detectors/bun_responsive_detector/fixtures/dirty/public/scale.html +5 -0
  125. package/detectors/bun_responsive_detector/fixtures/dirty/src/app.css +4 -0
  126. package/detectors/bun_responsive_detector/fixtures/dirty/src/render.ts +2 -0
  127. package/detectors/bun_responsive_detector/fixtures/dirty/src/units.css +3 -0
  128. package/detectors/bun_responsive_detector/fixtures/dirty/src/wide.tsx +3 -0
  129. package/detectors/bun_tester_discipline_detector/checks/t_acceptance_resolves.mjs +7 -6
  130. package/detectors/htmx_e2e_detector/atdd.implementation.yaml +40 -0
  131. package/detectors/htmx_e2e_detector/checks/_e2e.mjs +98 -0
  132. package/detectors/htmx_e2e_detector/checks/_map.json +16 -0
  133. package/detectors/htmx_e2e_detector/checks/a11y_harness.mjs +21 -0
  134. package/detectors/htmx_e2e_detector/checks/covered_train_is_routed.mjs +6 -0
  135. package/detectors/htmx_e2e_detector/checks/e2e_binds_declared_subject.mjs +11 -0
  136. package/detectors/htmx_e2e_detector/checks/e2e_spec_naming.mjs +6 -0
  137. package/detectors/htmx_e2e_detector/checks/exposed_journey_e2e_coverage.mjs +7 -0
  138. package/detectors/htmx_e2e_detector/checks/journey_binding_header.mjs +13 -0
  139. package/detectors/htmx_e2e_detector/checks/journey_layer_assembly.mjs +11 -0
  140. package/detectors/htmx_e2e_detector/checks/journey_no_acceptance_marker.mjs +6 -0
  141. package/detectors/htmx_e2e_detector/checks/journey_urn_format.mjs +18 -0
  142. package/detectors/htmx_e2e_detector/checks/presentation_smoke_coverage.mjs +15 -0
  143. package/detectors/htmx_e2e_detector/checks/responsive_harness.mjs +30 -0
  144. package/detectors/htmx_e2e_detector/checks/responsive_journey_coverage.mjs +7 -0
  145. package/detectors/htmx_e2e_detector/checks/train_e2e_coverage.mjs +7 -0
  146. package/detectors/htmx_e2e_detector/checks/visual_harness.mjs +7 -0
  147. package/detectors/htmx_e2e_detector/detect.mjs +46 -0
  148. package/detectors/htmx_e2e_detector/fixtures/clean/e2e/buy-alias.a11y.e2e.ts +12 -0
  149. package/detectors/htmx_e2e_detector/fixtures/clean/e2e/buy-inline.responsive.e2e.ts +11 -0
  150. package/detectors/htmx_e2e_detector/fixtures/clean/e2e/buy.a11y.e2e.ts +12 -0
  151. package/detectors/htmx_e2e_detector/fixtures/clean/e2e/buy.responsive.e2e.ts +14 -0
  152. package/detectors/htmx_e2e_detector/fixtures/clean/e2e/buy.visual.e2e.ts +10 -0
  153. package/detectors/htmx_e2e_detector/fixtures/clean/e2e/checkout-buy.smoke.e2e.ts +10 -0
  154. package/detectors/htmx_e2e_detector/fixtures/clean/e2e/crlf.e2e.ts +10 -0
  155. package/detectors/htmx_e2e_detector/fixtures/clean/e2e/place-order.e2e.ts +10 -0
  156. package/detectors/htmx_e2e_detector/fixtures/clean/e2e/reject-empty-cart.e2e.ts +10 -0
  157. package/detectors/htmx_e2e_detector/fixtures/clean/e2e/support/fixtures.ts +3 -0
  158. package/detectors/htmx_e2e_detector/fixtures/clean/e2e/take-payment.e2e.ts +10 -0
  159. package/detectors/htmx_e2e_detector/fixtures/clean/plan/_journeys/buy.yaml +19 -0
  160. package/detectors/htmx_e2e_detector/fixtures/clean/plan/_journeys/settle.yaml +14 -0
  161. package/detectors/htmx_e2e_detector/fixtures/clean/plan/_trains/_interlockings/checkout.yaml +21 -0
  162. package/detectors/htmx_e2e_detector/fixtures/clean/plan/_trains/_interlockings/payment.yaml +16 -0
  163. package/detectors/htmx_e2e_detector/fixtures/clean/plan/_trains/_interlockings/settlement.yaml +16 -0
  164. package/detectors/htmx_e2e_detector/fixtures/clean/plan/_trains/orders/place-order.yaml +11 -0
  165. package/detectors/htmx_e2e_detector/fixtures/clean/plan/_trains/orders/reject-empty-cart.yaml +11 -0
  166. package/detectors/htmx_e2e_detector/fixtures/clean/plan/_trains/orders/settle-ledger.yaml +11 -0
  167. package/detectors/htmx_e2e_detector/fixtures/clean/plan/_trains/orders/take-payment.yaml +11 -0
  168. package/detectors/htmx_e2e_detector/fixtures/clean/playwright.config.ts +3 -0
  169. package/detectors/htmx_e2e_detector/fixtures/clean/src/wagons/checkout/presentation/cart.tsx +3 -0
  170. package/detectors/htmx_e2e_detector/fixtures/clean/tests/urn-parser.test.ts +7 -0
  171. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/acceptance.e2e.ts +6 -0
  172. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/bad-id.e2e.ts +10 -0
  173. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/bad-urn.e2e.ts +10 -0
  174. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/both.e2e.ts +6 -0
  175. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/buy.a11y.e2e.ts +10 -0
  176. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/buy.responsive.e2e.ts +11 -0
  177. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/buy.visual.e2e.ts +10 -0
  178. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/covered.e2e.ts +10 -0
  179. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/first-only.responsive.e2e.ts +13 -0
  180. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/ghost.e2e.ts +10 -0
  181. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/misnamed.spec.ts +10 -0
  182. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/no-binding.e2e.ts +4 -0
  183. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/no-layer.e2e.ts +4 -0
  184. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/no-urn.e2e.ts +4 -0
  185. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/tautology.a11y.e2e.ts +11 -0
  186. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/two-trains.e2e.ts +6 -0
  187. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/unrouted.e2e.ts +10 -0
  188. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/wrong-layer.e2e.ts +5 -0
  189. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/wrong-urn.e2e.ts +10 -0
  190. package/detectors/htmx_e2e_detector/fixtures/dirty/plan/_journeys/browse.yaml +16 -0
  191. package/detectors/htmx_e2e_detector/fixtures/dirty/plan/_journeys/buy.yaml +16 -0
  192. package/detectors/htmx_e2e_detector/fixtures/dirty/plan/_trains/_interlockings/checkout.yaml +21 -0
  193. package/detectors/htmx_e2e_detector/fixtures/dirty/plan/_trains/orders/covered.yaml +11 -0
  194. package/detectors/htmx_e2e_detector/fixtures/dirty/plan/_trains/orders/uncovered.yaml +11 -0
  195. package/detectors/htmx_e2e_detector/fixtures/dirty/plan/_trains/orders/unrouted.yaml +11 -0
  196. package/detectors/htmx_e2e_detector/fixtures/dirty/src/wagons/billing/presentation/invoice.tsx +3 -0
  197. package/integrity.json +208 -79
  198. package/lib/frontend.mjs +17 -0
  199. package/lib/scan.mjs +6 -2
  200. package/package.json +5 -1
  201. package/planner-nodes/ENFORCEMENT_SCOPE.yaml +18 -1
  202. package/relationships.yaml +4782 -4506
  203. package/src/enforce.ts +10 -7
  204. package/src/hooks.ts +2 -1
  205. package/src/index.ts +2 -0
  206. package/src/planner-kernel.ts +2 -1
  207. package/src/planner-schema-validator.ts +12 -10
  208. package/src/planner-validators.ts +16 -15
  209. package/src/topology.ts +40 -0
package/README.md CHANGED
@@ -97,12 +97,13 @@ name.
97
97
  | Profile | Use it when you need to check |
98
98
  |---|---|
99
99
  | `traceability` | plan acceptance, Bun test, and implementation closure |
100
+ | `topology` | feature decomposition and canonical plan, source, test, and E2E locations |
100
101
  | `planner` | plan parsing/graph integrity plus the explicitly scoped planner rules |
101
102
  | `docs` | the optional documentation capability and its declared artifacts, including the generated journey view |
102
103
  | `coder`, `tester`, `security`, `architecture`, `metrics`, `runtime` | Bun source and test conventions for that concern |
103
104
  | `interlocking` | declared train/interlocking binding, infrastructure, and coverage |
104
- | `htmx` | htmx-specific source and test conventions |
105
- | `design` | the design system: tokens ← primitives ← components ← templates, token-only colors, spacing, radii, and motion (also part of `coder`) |
105
+ | `htmx` | htmx-specific source and test conventions, including browser specs |
106
+ | `design` | the design system (tokens ← primitives ← components ← templates, token-only colors, spacing, radii, motion) and responsiveness (also part of `coder`) |
106
107
  | `all` | the complete package policy, normally used by CI |
107
108
 
108
109
  The package ships the canonical planner-node corpus as planning reference, but
@@ -123,6 +124,35 @@ carry Station Master actions; the Bun interlocking family checks those actions r
123
124
  Hooks, direct CLI use, and CI invoke this same profile and therefore share the
124
125
  same schema source.
125
126
 
127
+ ### Repository topology
128
+
129
+ The topology gate makes a feature a required plan artifact instead of an
130
+ optional label on a WMBT. Its default layout is:
131
+
132
+ ```text
133
+ plan/<wagon>/{_<wagon>,<feature>,<WMBT>}.yaml
134
+ src/wagons/<wagon>/features/<feature>/{domain,application,infrastructure,presentation}/
135
+ tests/wagons/<wagon>/features/<feature>/{unit,contract,integration}/
136
+ e2e/interlockings/<interlocking>/<route>.routes.test.ts
137
+ e2e/journeys/<journey>.journey.test.ts
138
+ ```
139
+
140
+ Each feature must be declared by exactly one wagon and each WMBT by exactly one
141
+ feature. Source and test headers must name the feature in their path; tests bind
142
+ with `Acceptance:`, while exposed journey E2E tests bind with `Train:`. The
143
+ component-URN `integration` layer maps to the `infrastructure/` directory.
144
+
145
+ Change the four roots for an existing repository in `atdd-bun.yaml`; the same
146
+ validation then follows the configured locations:
147
+
148
+ ```yaml
149
+ topology:
150
+ plan_root: plan
151
+ source_root: src/wagons
152
+ test_root: tests/wagons
153
+ e2e_root: e2e
154
+ ```
155
+
126
156
  ### Design system
127
157
 
128
158
  The `design` profile (also part of `coder`) is the Bun realization of the core
@@ -190,6 +220,55 @@ fails when any generated file is missing, stale, hand-edited, or extra. The
190
220
  generator refuses to overwrite a hand-written `index.adoc` unless you pass
191
221
  `--force`; use `--out <dir>` to preview elsewhere.
192
222
 
223
+ ### Every enforced rule is strict
224
+
225
+ atdd-bun fails on every finding: it has no advisory mode and no ratchet
226
+ baseline. Every convention with a validator is therefore `strict` (or `block`),
227
+ and `tests/dispositions.test.ts` fails on any that promises otherwise. For the
228
+ canonical planner nodes, which ship verbatim, the package states its own
229
+ `disposition: strict` in `planner-nodes/ENFORCEMENT_SCOPE.yaml`.
230
+
231
+ ### Browser specs (Playwright)
232
+
233
+ The `tester` and `htmx` profiles judge browser specs against the plan. A browser
234
+ spec is a `*.e2e.ts` file run by Playwright, never `*.spec.ts`, which `bun test`
235
+ would try to run itself. It binds to one plan subject and declares its layer
236
+ and test URN:
237
+
238
+ ```ts
239
+ import { expect, test } from "@playwright/test";
240
+
241
+ // Train: train:orders:place-order (or // Journey: journey:buy)
242
+ // Layer: assembly
243
+ // URN: test:train:orders:place-order:E2E-001-places-an-order
244
+ ```
245
+
246
+ The harness code in the URN (`E2E`, `SMOKE`, `A11Y`, `VIS`, `RESP`) says what
247
+ the spec must do: an `A11Y` spec runs `@axe-core/playwright` and asserts on its
248
+ violations, a `VIS` spec compares a screenshot, a `RESP` spec renders at every
249
+ declared viewport and asserts on `scrollWidth`. Coverage is read from `plan/`:
250
+ every train has a spec, every covered train is routed by an interlocking, every
251
+ exposed journey has an E2E or SMOKE spec and a RESP spec, and every presentation
252
+ component has a SMOKE spec naming its wagon. Route and Station Master coverage
253
+ remain `tester.bun` rules; browser specs count toward them.
254
+
255
+ ### Responsiveness
256
+
257
+ The `coder` and `design` profiles check the structural causes of screens that
258
+ break on small devices: every HTML document declares
259
+ `<meta name="viewport" content="width=device-width, initial-scale=1">` and
260
+ never blocks zoom; no `width`/`min-width` is wider than the smallest viewport;
261
+ and every `@media` width is a declared breakpoint (media queries cannot read
262
+ CSS variables, so breakpoints are declared once). The browser proof is the
263
+ `RESP` spec above. Both read the same settings:
264
+
265
+ ```yaml
266
+ # atdd-bun.yaml
267
+ frontend:
268
+ viewports: [375, 768, 1280] # default; RESP specs render at each, the smallest bounds fixed widths
269
+ breakpoints: [480, 768, 1024, 1280] # default; the only widths @media may use
270
+ ```
271
+
193
272
  ### Theme and contract registry
194
273
 
195
274
  Theme vocabulary belongs to the repository, not the package. When a plan uses
@@ -450,6 +529,9 @@ convention cannot land without its relationships.
450
529
 
451
530
  `bun test` runs the package’s real-Git fixtures and detector clean/dirty corpora.
452
531
  The suite proves that every declared convention output has a matching convention
453
- and a deliberate failing case; it also covers hook isolation, the declarative
532
+ and a deliberate failing case, and runs the frontend chain end to end: a Bun app
533
+ built from a plan, its browser specs accepted by the detectors and passing in
534
+ Chromium, and broken variants of the page failing both the static rules and the
535
+ browser (Chromium must be installed: `bunx playwright install chromium`); it also covers hook isolation, the declarative
454
536
  registry policy, CI generation, agent-skill installation, planner scope, release
455
537
  validation, and linked-worktree policy.
@@ -35,15 +35,13 @@ content:
35
35
  exceptions:
36
36
  - Functions with fewer than 3 code lines are not scored.
37
37
  - Test files and vendored/build directories are outside the scan.
38
- - Pre-existing counts are held flat by a ratchet baseline, not by lowering the threshold.
39
38
  metadata:
40
39
  aliases:
41
40
  # COMPLEXITY-CYCLOMATIC-TS-001 is the SHARED core alias, also carried by the agnostic node and by
42
41
  # its python-pytest realization. One obligation, two detectors, two runtimes.
43
42
  - COMPLEXITY-CYCLOMATIC-TS-001
44
43
  severity: 3
45
- # `strict`, matching the python-pytest sibling exactly. A repo adopting this on an
46
- # existing codebase records a ratchet baseline rather than lowering the threshold.
44
+ # strict: atdd-bun fails on every finding; it has no advisory mode and no ratchet baseline.
47
45
  disposition: strict
48
46
  introduced_in: 0.1.0
49
47
  implementation:
@@ -34,8 +34,7 @@ metadata:
34
34
  # its python-pytest realization. One obligation, two detectors, two runtimes.
35
35
  - COMPLEXITY-LENGTH-TS-001
36
36
  severity: 2
37
- # `strict`, matching the python-pytest sibling exactly. A repo adopting this on an
38
- # existing codebase records a ratchet baseline rather than lowering the threshold.
37
+ # strict: atdd-bun fails on every finding; it has no advisory mode and no ratchet baseline.
39
38
  disposition: strict
40
39
  introduced_in: 0.1.0
41
40
  implementation:
@@ -40,8 +40,7 @@ metadata:
40
40
  # its python-pytest realization. One obligation, two detectors, two runtimes.
41
41
  - COMPLEXITY-NESTING-TS-001
42
42
  severity: 3
43
- # `strict`, matching the python-pytest sibling exactly. A repo adopting this on an
44
- # existing codebase records a ratchet baseline rather than lowering the threshold.
43
+ # strict: atdd-bun fails on every finding; it has no advisory mode and no ratchet baseline.
45
44
  disposition: strict
46
45
  introduced_in: 0.1.0
47
46
  implementation:
@@ -40,8 +40,7 @@ metadata:
40
40
  # its python-pytest realization. One obligation, two detectors, two runtimes.
41
41
  - DEAD-CODE-REACHABILITY-TS-001
42
42
  severity: 2
43
- # `strict`, matching the python-pytest sibling exactly. A repo adopting this on an
44
- # existing codebase records a ratchet baseline rather than lowering the threshold.
43
+ # strict: atdd-bun fails on every finding; it has no advisory mode and no ratchet baseline.
45
44
  disposition: strict
46
45
  introduced_in: 0.1.0
47
46
  implementation:
@@ -23,7 +23,7 @@ content:
23
23
  fix_hint: 'Define the color once as a custom property in the tokens layer and reference it: `color: var(--danger)`.'
24
24
  exceptions:
25
25
  - Test files (`*.test.*`, `*.spec.*`) and vendored/build directories are never scanned.
26
- - Custom property definitions (`--danger: #b91c1c`) define tokens wherever they live and are not flagged.
26
+ - 'Custom property definitions (`--danger: #b91c1c`) define tokens wherever they live and are not flagged.'
27
27
  - The tokens/foundations layer is where raw colors are defined and is not scanned.
28
28
  - Named colors (`red`, `white`) and `currentColor`/`transparent` are not flagged.
29
29
  metadata:
@@ -25,7 +25,7 @@ content:
25
25
  exceptions:
26
26
  - Test files (`*.test.*`, `*.spec.*`) and vendored/build directories are never scanned.
27
27
  - 0 and 1px (hairline borders) are not design decisions and are allowed.
28
- - Custom property definitions (`--space-3: 12px`) define tokens wherever they live and are not flagged.
28
+ - 'Custom property definitions (`--space-3: 12px`) define tokens wherever they live and are not flagged.'
29
29
  - The tokens/foundations layer defines these values and is not scanned.
30
30
  - Widths, heights, and font sizes are out of scope for this rule.
31
31
  metadata:
@@ -31,7 +31,8 @@ metadata:
31
31
  # Core obligation: coder.dto.mapper
32
32
  - BUN-DTO-MAPPER-001
33
33
  severity: 3
34
- disposition: advisory
34
+ # strict: atdd-bun fails on every finding; it has no advisory mode and no ratchet baseline.
35
+ disposition: strict
35
36
  introduced_in: 0.1.0
36
37
  implementation:
37
38
  type: validator
@@ -32,7 +32,8 @@ metadata:
32
32
  # Core obligation: coder.dto.placement
33
33
  - BUN-DTO-PLACEMENT-001
34
34
  severity: 3
35
- disposition: advisory
35
+ # strict: atdd-bun fails on every finding; it has no advisory mode and no ratchet baseline.
36
+ disposition: strict
36
37
  introduced_in: 0.1.0
37
38
  implementation:
38
39
  type: validator
@@ -33,7 +33,8 @@ metadata:
33
33
  # Core obligation: coder.dto.purity
34
34
  - BUN-DTO-PURITY-001
35
35
  severity: 3
36
- disposition: advisory
36
+ # strict: atdd-bun fails on every finding; it has no advisory mode and no ratchet baseline.
37
+ disposition: strict
37
38
  introduced_in: 0.1.0
38
39
  implementation:
39
40
  type: validator
@@ -38,8 +38,7 @@ metadata:
38
38
  # its python-pytest realization. One obligation, two detectors, two runtimes.
39
39
  - DUPLICATION-TS-001
40
40
  severity: 2
41
- # `strict`, matching the python-pytest sibling exactly. A repo adopting this on an
42
- # existing codebase records a ratchet baseline rather than lowering the threshold.
41
+ # strict: atdd-bun fails on every finding; it has no advisory mode and no ratchet baseline.
43
42
  disposition: strict
44
43
  introduced_in: 0.1.0
45
44
  implementation:
@@ -44,17 +44,8 @@ metadata:
44
44
  - GREEN-HEADER-004
45
45
  - BUN-GREEN-HEADER-ORDER-001
46
46
  severity: 2
47
- # DIVERGENCE FROM THE VITE/PYTHON REALIZATIONS, deliberate and reversible.
48
- # Those two carry `documentation-only`, which core's coverage_report treats as
49
- # never-fails-the-build — the right call when RETROFITTING a large existing
50
- # codebase, where day-one enforcement would red every file at once.
51
- # A new Bun + htmx repo has no such debt: headers can be present from the first
52
- # file, and a traceability rule that cannot fail is a rule that will quietly not
53
- # be adopted. `suppress-and-clean` fails on violation AND is ratchetable, so an
54
- # existing repo adopting this can still `--record-ratchet` a baseline and be held
55
- # flat rather than blocked. Change this one field back to `documentation-only`
56
- # for exact Vite parity.
57
- disposition: suppress-and-clean
47
+ # strict: atdd-bun fails on every finding; it has no advisory mode and no ratchet baseline.
48
+ disposition: strict
58
49
  introduced_in: 0.1.0
59
50
  implementation:
60
51
  type: validator
@@ -38,17 +38,8 @@ metadata:
38
38
  - GREEN-HEADER-002
39
39
  - BUN-GREEN-HEADER-PURPOSE-001
40
40
  severity: 2
41
- # DIVERGENCE FROM THE VITE/PYTHON REALIZATIONS, deliberate and reversible.
42
- # Those two carry `documentation-only`, which core's coverage_report treats as
43
- # never-fails-the-build — the right call when RETROFITTING a large existing
44
- # codebase, where day-one enforcement would red every file at once.
45
- # A new Bun + htmx repo has no such debt: headers can be present from the first
46
- # file, and a traceability rule that cannot fail is a rule that will quietly not
47
- # be adopted. `suppress-and-clean` fails on violation AND is ratchetable, so an
48
- # existing repo adopting this can still `--record-ratchet` a baseline and be held
49
- # flat rather than blocked. Change this one field back to `documentation-only`
50
- # for exact Vite parity.
51
- disposition: suppress-and-clean
41
+ # strict: atdd-bun fails on every finding; it has no advisory mode and no ratchet baseline.
42
+ disposition: strict
52
43
  introduced_in: 0.1.0
53
44
  implementation:
54
45
  type: validator
@@ -39,17 +39,8 @@ metadata:
39
39
  - GREEN-HEADER-001
40
40
  - BUN-GREEN-HEADER-RUNTIME-001
41
41
  severity: 2
42
- # DIVERGENCE FROM THE VITE/PYTHON REALIZATIONS, deliberate and reversible.
43
- # Those two carry `documentation-only`, which core's coverage_report treats as
44
- # never-fails-the-build — the right call when RETROFITTING a large existing
45
- # codebase, where day-one enforcement would red every file at once.
46
- # A new Bun + htmx repo has no such debt: headers can be present from the first
47
- # file, and a traceability rule that cannot fail is a rule that will quietly not
48
- # be adopted. `suppress-and-clean` fails on violation AND is ratchetable, so an
49
- # existing repo adopting this can still `--record-ratchet` a baseline and be held
50
- # flat rather than blocked. Change this one field back to `documentation-only`
51
- # for exact Vite parity.
52
- disposition: suppress-and-clean
42
+ # strict: atdd-bun fails on every finding; it has no advisory mode and no ratchet baseline.
43
+ disposition: strict
53
44
  introduced_in: 0.1.0
54
45
  implementation:
55
46
  type: validator
@@ -46,17 +46,8 @@ metadata:
46
46
  - GREEN-HEADER-003
47
47
  - BUN-GREEN-HEADER-TESTED-BY-001
48
48
  severity: 2
49
- # DIVERGENCE FROM THE VITE/PYTHON REALIZATIONS, deliberate and reversible.
50
- # Those two carry `documentation-only`, which core's coverage_report treats as
51
- # never-fails-the-build — the right call when RETROFITTING a large existing
52
- # codebase, where day-one enforcement would red every file at once.
53
- # A new Bun + htmx repo has no such debt: headers can be present from the first
54
- # file, and a traceability rule that cannot fail is a rule that will quietly not
55
- # be adopted. `suppress-and-clean` fails on violation AND is ratchetable, so an
56
- # existing repo adopting this can still `--record-ratchet` a baseline and be held
57
- # flat rather than blocked. Change this one field back to `documentation-only`
58
- # for exact Vite parity.
59
- disposition: suppress-and-clean
49
+ # strict: atdd-bun fails on every finding; it has no advisory mode and no ratchet baseline.
50
+ disposition: strict
60
51
  introduced_in: 0.1.0
61
52
  implementation:
62
53
  type: validator
@@ -36,17 +36,8 @@ metadata:
36
36
  - GREEN-URN-006
37
37
  - BUN-GREEN-URN-LAYER-001
38
38
  severity: 3
39
- # DIVERGENCE FROM THE VITE/PYTHON REALIZATIONS, deliberate and reversible.
40
- # Those two carry `documentation-only`, which core's coverage_report treats as
41
- # never-fails-the-build — the right call when RETROFITTING a large existing
42
- # codebase, where day-one enforcement would red every file at once.
43
- # A new Bun + htmx repo has no such debt: headers can be present from the first
44
- # file, and a traceability rule that cannot fail is a rule that will quietly not
45
- # be adopted. `suppress-and-clean` fails on violation AND is ratchetable, so an
46
- # existing repo adopting this can still `--record-ratchet` a baseline and be held
47
- # flat rather than blocked. Change this one field back to `documentation-only`
48
- # for exact Vite parity.
49
- disposition: suppress-and-clean
39
+ # strict: atdd-bun fails on every finding; it has no advisory mode and no ratchet baseline.
40
+ disposition: strict
50
41
  introduced_in: 0.1.0
51
42
  implementation:
52
43
  type: validator
@@ -37,7 +37,6 @@ content:
37
37
  <!doctype html>
38
38
  <!-- URN: component:orders:checkout:OrderPanel:frontend:presentation -->
39
39
 
40
- Disposition is `documentation-only`, matching the Python and Vite realizations: a ratchet holds an existing repo flat while headers are backfilled.
41
40
  exceptions:
42
41
  - Test files (`*.test.*`, `*.spec.*`) are excluded — they are bound by their acceptance URNs instead.
43
42
  - Vendored and generated trees (`node_modules`, `dist`, `build`, `_generated`) are never scanned.
@@ -50,17 +49,8 @@ metadata:
50
49
  - GREEN-URN-001
51
50
  - BUN-GREEN-URN-MARKER-001
52
51
  severity: 3
53
- # DIVERGENCE FROM THE VITE/PYTHON REALIZATIONS, deliberate and reversible.
54
- # Those two carry `documentation-only`, which core's coverage_report treats as
55
- # never-fails-the-build — the right call when RETROFITTING a large existing
56
- # codebase, where day-one enforcement would red every file at once.
57
- # A new Bun + htmx repo has no such debt: headers can be present from the first
58
- # file, and a traceability rule that cannot fail is a rule that will quietly not
59
- # be adopted. `suppress-and-clean` fails on violation AND is ratchetable, so an
60
- # existing repo adopting this can still `--record-ratchet` a baseline and be held
61
- # flat rather than blocked. Change this one field back to `documentation-only`
62
- # for exact Vite parity.
63
- disposition: suppress-and-clean
52
+ # strict: atdd-bun fails on every finding; it has no advisory mode and no ratchet baseline.
53
+ disposition: strict
64
54
  introduced_in: 0.1.0
65
55
  implementation:
66
56
  type: validator
@@ -29,7 +29,7 @@ content:
29
29
  // URN: component:orders:checkout:SomethingElse:backend:presentation // ✗
30
30
  // URN: component:orders:checkout:OrderRow:backend:presentation // ✓
31
31
  exceptions:
32
- - Structural names are exempt: composition, wagon, entrypoint, http, index, schema, router, routes, server, layout, partial, fragment, middleware.
32
+ - 'Structural names are exempt: composition, wagon, entrypoint, http, index, schema, router, routes, server, layout, partial, fragment, middleware.'
33
33
  - Comparison ignores case and non-alphanumerics, so `order-row.ts` matches `OrderRow`.
34
34
  - URNs that are not six segments are skipped.
35
35
  metadata:
@@ -40,17 +40,8 @@ metadata:
40
40
  - GREEN-URN-004
41
41
  - BUN-GREEN-URN-NAME-MATCHES-001
42
42
  severity: 2
43
- # DIVERGENCE FROM THE VITE/PYTHON REALIZATIONS, deliberate and reversible.
44
- # Those two carry `documentation-only`, which core's coverage_report treats as
45
- # never-fails-the-build — the right call when RETROFITTING a large existing
46
- # codebase, where day-one enforcement would red every file at once.
47
- # A new Bun + htmx repo has no such debt: headers can be present from the first
48
- # file, and a traceability rule that cannot fail is a rule that will quietly not
49
- # be adopted. `suppress-and-clean` fails on violation AND is ratchetable, so an
50
- # existing repo adopting this can still `--record-ratchet` a baseline and be held
51
- # flat rather than blocked. Change this one field back to `documentation-only`
52
- # for exact Vite parity.
53
- disposition: suppress-and-clean
43
+ # strict: atdd-bun fails on every finding; it has no advisory mode and no ratchet baseline.
44
+ disposition: strict
54
45
  introduced_in: 0.1.0
55
46
  implementation:
56
47
  type: validator
@@ -39,17 +39,8 @@ metadata:
39
39
  - GREEN-URN-002
40
40
  - BUN-GREEN-URN-PATTERN-001
41
41
  severity: 3
42
- # DIVERGENCE FROM THE VITE/PYTHON REALIZATIONS, deliberate and reversible.
43
- # Those two carry `documentation-only`, which core's coverage_report treats as
44
- # never-fails-the-build — the right call when RETROFITTING a large existing
45
- # codebase, where day-one enforcement would red every file at once.
46
- # A new Bun + htmx repo has no such debt: headers can be present from the first
47
- # file, and a traceability rule that cannot fail is a rule that will quietly not
48
- # be adopted. `suppress-and-clean` fails on violation AND is ratchetable, so an
49
- # existing repo adopting this can still `--record-ratchet` a baseline and be held
50
- # flat rather than blocked. Change this one field back to `documentation-only`
51
- # for exact Vite parity.
52
- disposition: suppress-and-clean
42
+ # strict: atdd-bun fails on every finding; it has no advisory mode and no ratchet baseline.
43
+ disposition: strict
53
44
  introduced_in: 0.1.0
54
45
  implementation:
55
46
  type: validator
@@ -37,17 +37,8 @@ metadata:
37
37
  - GREEN-URN-005
38
38
  - BUN-GREEN-URN-SIDE-001
39
39
  severity: 3
40
- # DIVERGENCE FROM THE VITE/PYTHON REALIZATIONS, deliberate and reversible.
41
- # Those two carry `documentation-only`, which core's coverage_report treats as
42
- # never-fails-the-build — the right call when RETROFITTING a large existing
43
- # codebase, where day-one enforcement would red every file at once.
44
- # A new Bun + htmx repo has no such debt: headers can be present from the first
45
- # file, and a traceability rule that cannot fail is a rule that will quietly not
46
- # be adopted. `suppress-and-clean` fails on violation AND is ratchetable, so an
47
- # existing repo adopting this can still `--record-ratchet` a baseline and be held
48
- # flat rather than blocked. Change this one field back to `documentation-only`
49
- # for exact Vite parity.
50
- disposition: suppress-and-clean
40
+ # strict: atdd-bun fails on every finding; it has no advisory mode and no ratchet baseline.
41
+ disposition: strict
51
42
  introduced_in: 0.1.0
52
43
  implementation:
53
44
  type: validator
@@ -39,17 +39,8 @@ metadata:
39
39
  - GREEN-URN-003
40
40
  - BUN-GREEN-URN-WAGON-FEATURE-001
41
41
  severity: 3
42
- # DIVERGENCE FROM THE VITE/PYTHON REALIZATIONS, deliberate and reversible.
43
- # Those two carry `documentation-only`, which core's coverage_report treats as
44
- # never-fails-the-build — the right call when RETROFITTING a large existing
45
- # codebase, where day-one enforcement would red every file at once.
46
- # A new Bun + htmx repo has no such debt: headers can be present from the first
47
- # file, and a traceability rule that cannot fail is a rule that will quietly not
48
- # be adopted. `suppress-and-clean` fails on violation AND is ratchetable, so an
49
- # existing repo adopting this can still `--record-ratchet` a baseline and be held
50
- # flat rather than blocked. Change this one field back to `documentation-only`
51
- # for exact Vite parity.
52
- disposition: suppress-and-clean
42
+ # strict: atdd-bun fails on every finding; it has no advisory mode and no ratchet baseline.
43
+ disposition: strict
53
44
  introduced_in: 0.1.0
54
45
  implementation:
55
46
  type: validator
@@ -34,7 +34,8 @@ metadata:
34
34
  # Core obligation: coder.backend.code-is-organized
35
35
  - BUN-LAYER-NAMING-001
36
36
  severity: 2
37
- disposition: suppress-and-clean
37
+ # strict: atdd-bun fails on every finding; it has no advisory mode and no ratchet baseline.
38
+ disposition: strict
38
39
  introduced_in: 0.1.0
39
40
  implementation:
40
41
  type: validator
@@ -33,16 +33,14 @@ content:
33
33
  exceptions:
34
34
  - A call already passing a second argument is not flagged.
35
35
  - Non-logger receivers are out of scope.
36
- - Disposition is `suppress-and-clean`, matching the Python sibling: a ratchet holds existing lines flat.
37
36
  metadata:
38
37
  aliases:
39
38
  # LOGGING-STRUCTURED-001 is the SHARED core alias, also carried by the agnostic node and its
40
39
  # python-pytest realization.
41
40
  - LOGGING-STRUCTURED-001
42
41
  severity: 2
43
- # RE-REALIZED, not ported: the python-pytest sibling inspects a Python
44
- # AST for constructs this stack does not have. Same obligation, new detector.
45
- disposition: suppress-and-clean
42
+ # strict: atdd-bun fails on every finding; it has no advisory mode and no ratchet baseline.
43
+ disposition: strict
46
44
  introduced_in: 0.1.0
47
45
  implementation:
48
46
  type: validator
@@ -35,8 +35,7 @@ metadata:
35
35
  # its python-pytest realization. One obligation, two detectors, two runtimes.
36
36
  - REFACTOR-QUALITY-COMMENTS-TS-001
37
37
  severity: 2
38
- # `strict`, matching the python-pytest sibling exactly. A repo adopting this on an
39
- # existing codebase records a ratchet baseline rather than lowering the threshold.
38
+ # strict: atdd-bun fails on every finding; it has no advisory mode and no ratchet baseline.
40
39
  disposition: strict
41
40
  introduced_in: 0.1.0
42
41
  implementation:
@@ -38,8 +38,7 @@ metadata:
38
38
  # its python-pytest realization. One obligation, two detectors, two runtimes.
39
39
  - REFACTOR-QUALITY-MI-TS-001
40
40
  severity: 2
41
- # `strict`, matching the python-pytest sibling exactly. A repo adopting this on an
42
- # existing codebase records a ratchet baseline rather than lowering the threshold.
41
+ # strict: atdd-bun fails on every finding; it has no advisory mode and no ratchet baseline.
43
42
  disposition: strict
44
43
  introduced_in: 0.1.0
45
44
  implementation:
@@ -0,0 +1,31 @@
1
+ schema_version: 1.1.0
2
+ rule_id: coder.bun.responsive-breakpoints-declared
3
+ kind: rule
4
+ status: active
5
+ name: Media queries use only the declared breakpoints
6
+ statement: Every width condition in an `@media` query, `min-width`/`max-width` or the range syntax (`width >= 768px`,
7
+ `768px <= width`), MUST use one of the breakpoints declared under `frontend.breakpoints` in `atdd-bun.yaml` (default
8
+ 480, 768, 1024, 1280). A `max-width` within 1px below a breakpoint (`767px`, `767.98px`) counts as that breakpoint,
9
+ and `em`/`rem` convert at 16px. New in atdd-bun, strict.
10
+ terms:
11
+ - term_id: frontend_settings
12
+ text: '`atdd-bun.yaml` → `frontend.viewports` (the widths responsive specs render at; the smallest bounds fixed
13
+ widths) and `frontend.breakpoints` (the widths media queries may use).'
14
+ content:
15
+ summary: Media queries use only the declared breakpoints.
16
+ normative_text: CSS custom properties cannot be used in media queries, so breakpoints cannot be tokens. Declaring
17
+ them once and requiring every query to use them keeps layouts switching at the same widths everywhere instead
18
+ of at a new one per component.
19
+ fix_hint: 'Use `@media (min-width: 768px)`, or add the width to `frontend.breakpoints` if the design system really
20
+ needs it.'
21
+ exceptions:
22
+ - Vendored and generated trees (`node_modules`, `dist`, `build`, `_generated`) are never scanned.
23
+ metadata:
24
+ aliases:
25
+ - BUN-RESPONSIVE-RESPONSIVE-BREAKPOINTS-DECLARED-001
26
+ severity: 3
27
+ disposition: strict
28
+ introduced_in: 0.5.0
29
+ implementation:
30
+ type: validator
31
+ ref: bun_responsive_detector
@@ -0,0 +1,30 @@
1
+ schema_version: 1.1.0
2
+ rule_id: coder.bun.responsive-no-fixed-width
3
+ kind: rule
4
+ status: active
5
+ name: No width or min-width wider than the smallest viewport
6
+ statement: A `width` or `min-width` declaration, in a stylesheet, a `<style>` block, a `style` attribute or a JSX
7
+ `style` object, MUST NOT exceed (with `rem` and `em` counted at 16px) the smallest viewport declared under `frontend.viewports`
8
+ in `atdd-bun.yaml` (default 375px). New in atdd-bun, strict.
9
+ terms:
10
+ - term_id: frontend_settings
11
+ text: '`atdd-bun.yaml` → `frontend.viewports` (the widths responsive specs render at; the smallest bounds fixed
12
+ widths) and `frontend.breakpoints` (the widths media queries may use).'
13
+ content:
14
+ summary: No width or min-width wider than the smallest viewport.
15
+ normative_text: An element wider than the screen forces horizontal scrolling on every phone. Wide layouts are
16
+ expressed with `max-width`, percentages, or layouts that wrap.
17
+ fix_hint: 'Replace `width: 960px` with `width: 100%; max-width: 960px`.'
18
+ exceptions:
19
+ - Vendored and generated trees (`node_modules`, `dist`, `build`, `_generated`) are never scanned.
20
+ - '`max-width` is not judged; it is how wide layouts are meant to be bounded.'
21
+ - 'Custom property definitions (`--page: 1200px`) define tokens and are not judged.'
22
+ metadata:
23
+ aliases:
24
+ - BUN-RESPONSIVE-RESPONSIVE-NO-FIXED-WIDTH-001
25
+ severity: 3
26
+ disposition: strict
27
+ introduced_in: 0.5.0
28
+ implementation:
29
+ type: validator
30
+ ref: bun_responsive_detector
@@ -0,0 +1,31 @@
1
+ schema_version: 1.1.0
2
+ rule_id: coder.bun.responsive-viewport-meta
3
+ kind: rule
4
+ status: active
5
+ name: Every HTML document declares a device-width viewport and allows zoom
6
+ statement: Every full HTML document (an `.html`/`.htm` file, a `.tsx`/`.jsx` layout that renders `<html>`, or a
7
+ `.ts`/`.js` template that builds one) MUST declare `<meta name="viewport">` whose content sets `width=device-width`,
8
+ and MUST NOT block zoom with `user-scalable=no` or a `maximum-scale` below 2. New in atdd-bun, strict.
9
+ terms:
10
+ - term_id: frontend_settings
11
+ text: '`atdd-bun.yaml` → `frontend.viewports` (the widths responsive specs render at; the smallest bounds fixed
12
+ widths) and `frontend.breakpoints` (the widths media queries may use).'
13
+ content:
14
+ summary: Every HTML document declares a device-width viewport and allows zoom.
15
+ normative_text: Without a device-width viewport a phone renders the page as a zoomed-out desktop layout, whatever
16
+ the CSS says. Blocking zoom fails users who need to enlarge text, which is also an accessibility failure.
17
+ fix_hint: '`<meta name="viewport" content="width=device-width, initial-scale=1">`'
18
+ exceptions:
19
+ - Vendored and generated trees (`node_modules`, `dist`, `build`, `_generated`) are never scanned.
20
+ - HTML fragments that are not full documents (no `<html>`) are out of scope.
21
+ - A viewport `content` given as a JSX expression (`content={VIEWPORT}`) cannot be read statically; the meta's
22
+ presence is required, its value is not judged.
23
+ metadata:
24
+ aliases:
25
+ - BUN-RESPONSIVE-RESPONSIVE-VIEWPORT-META-001
26
+ severity: 3
27
+ disposition: strict
28
+ introduced_in: 0.5.0
29
+ implementation:
30
+ type: validator
31
+ ref: bun_responsive_detector