@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.
- package/README.md +85 -3
- package/conventions/coder.bun/coder.bun.complexity-cyclomatic.convention.yaml +1 -3
- package/conventions/coder.bun/coder.bun.complexity-length.convention.yaml +1 -2
- package/conventions/coder.bun/coder.bun.complexity-nesting.convention.yaml +1 -2
- package/conventions/coder.bun/coder.bun.dead-code-reachability.convention.yaml +1 -2
- package/conventions/coder.bun/coder.bun.design-token-color.convention.yaml +1 -1
- package/conventions/coder.bun/coder.bun.design-token-hardcoded.convention.yaml +1 -1
- package/conventions/coder.bun/coder.bun.dto-mapper.convention.yaml +2 -1
- package/conventions/coder.bun/coder.bun.dto-placement.convention.yaml +2 -1
- package/conventions/coder.bun/coder.bun.dto-purity.convention.yaml +2 -1
- package/conventions/coder.bun/coder.bun.duplication-intra-layer.convention.yaml +1 -2
- package/conventions/coder.bun/coder.bun.green-header-order.convention.yaml +2 -11
- package/conventions/coder.bun/coder.bun.green-header-purpose.convention.yaml +2 -11
- package/conventions/coder.bun/coder.bun.green-header-runtime.convention.yaml +2 -11
- package/conventions/coder.bun/coder.bun.green-header-tested-by.convention.yaml +2 -11
- package/conventions/coder.bun/coder.bun.green-urn-layer.convention.yaml +2 -11
- package/conventions/coder.bun/coder.bun.green-urn-marker.convention.yaml +2 -12
- package/conventions/coder.bun/coder.bun.green-urn-name-matches.convention.yaml +3 -12
- package/conventions/coder.bun/coder.bun.green-urn-pattern.convention.yaml +2 -11
- package/conventions/coder.bun/coder.bun.green-urn-side.convention.yaml +2 -11
- package/conventions/coder.bun/coder.bun.green-urn-wagon-feature.convention.yaml +2 -11
- package/conventions/coder.bun/coder.bun.layer-naming.convention.yaml +2 -1
- package/conventions/coder.bun/coder.bun.logging-structured.convention.yaml +2 -4
- package/conventions/coder.bun/coder.bun.quality-comments.convention.yaml +1 -2
- package/conventions/coder.bun/coder.bun.quality-mi.convention.yaml +1 -2
- package/conventions/coder.bun/coder.bun.responsive-breakpoints-declared.convention.yaml +31 -0
- package/conventions/coder.bun/coder.bun.responsive-no-fixed-width.convention.yaml +30 -0
- package/conventions/coder.bun/coder.bun.responsive-viewport-meta.convention.yaml +31 -0
- package/conventions/coder.bun/coder.bun.runtime-executes-the-declaration.convention.yaml +2 -18
- package/conventions/coder.bun/coder.bun.runtime-typecheck-enforced.convention.yaml +2 -15
- package/conventions/coder.htmx/coder.htmx.swap-no-inline-handler.convention.yaml +3 -3
- package/conventions/coder.htmx/coder.htmx.verb-endpoint-is-routed.convention.yaml +2 -2
- package/conventions/coder.htmx/coder.htmx.verb-mutation-signals-progress.convention.yaml +3 -2
- package/conventions/planner.docs/planner.docs.adr-registry-derived.convention.yaml +2 -12
- package/conventions/planner.docs/planner.docs.area-index-required.convention.yaml +2 -12
- package/conventions/planner.docs/planner.docs.artifact-path-shape.convention.yaml +2 -12
- package/conventions/planner.docs/planner.docs.asciidoc-only.convention.yaml +2 -13
- package/conventions/planner.docs/planner.docs.doc-id-unique.convention.yaml +2 -12
- package/conventions/planner.docs/planner.docs.graph-target-resolves.convention.yaml +2 -12
- package/conventions/planner.docs/planner.docs.identity-required.convention.yaml +2 -12
- package/conventions/planner.docs/planner.docs.reference-integrity.convention.yaml +2 -12
- package/conventions/planner.docs/planner.docs.undeclared-change.convention.yaml +2 -12
- package/conventions/tester.bun/tester.bun.acceptance-binding-declared.convention.yaml +2 -6
- package/conventions/tester.bun/tester.bun.acceptance-covers-tag-well-formed.convention.yaml +1 -5
- package/conventions/tester.bun/tester.bun.interlocking-train-sequence-is-exercised.convention.yaml +2 -14
- package/conventions/tester.bun/tester.bun.red-behavioral-assertion.convention.yaml +1 -5
- package/conventions/tester.bun/tester.bun.routing-runtime-family.convention.yaml +2 -1
- package/conventions/tester.bun/tester.bun.smoke-no-collaborator-substitution.convention.yaml +2 -7
- package/conventions/tester.bun/tester.bun.smoke-observable-assertion.convention.yaml +2 -7
- package/conventions/tester.bun/tester.bun.telemetry-emit.convention.yaml +2 -1
- package/conventions/tester.bun/tester.bun.test-carries-urn-identity.convention.yaml +2 -6
- package/conventions/tester.bun/tester.bun.test-isolation-no-live-state.convention.yaml +1 -5
- package/conventions/tester.bun/tester.bun.test-no-self-skip.convention.yaml +1 -5
- package/conventions/tester.bun/tester.bun.test-phase-declared.convention.yaml +2 -6
- package/conventions/tester.htmx/tester.htmx.a11y-harness.convention.yaml +32 -0
- package/conventions/tester.htmx/tester.htmx.covered-train-is-routed.convention.yaml +30 -0
- package/conventions/tester.htmx/tester.htmx.e2e-binds-declared-subject.convention.yaml +31 -0
- package/conventions/tester.htmx/tester.htmx.e2e-spec-naming.convention.yaml +32 -0
- package/conventions/tester.htmx/tester.htmx.exposed-journey-e2e-coverage.convention.yaml +31 -0
- package/conventions/tester.htmx/tester.htmx.fragment-asserts-returned-markup.convention.yaml +2 -6
- package/conventions/tester.htmx/tester.htmx.journey-binding-header.convention.yaml +32 -0
- package/conventions/tester.htmx/tester.htmx.journey-layer-assembly.convention.yaml +29 -0
- package/conventions/tester.htmx/tester.htmx.journey-no-acceptance-marker.convention.yaml +29 -0
- package/conventions/tester.htmx/tester.htmx.journey-urn-format.convention.yaml +32 -0
- package/conventions/tester.htmx/tester.htmx.presentation-smoke-coverage.convention.yaml +31 -0
- package/conventions/tester.htmx/tester.htmx.responsive-harness.convention.yaml +33 -0
- package/conventions/tester.htmx/tester.htmx.responsive-journey-coverage.convention.yaml +30 -0
- package/conventions/tester.htmx/tester.htmx.swap-oob-asserts-destination-id.convention.yaml +2 -1
- package/conventions/tester.htmx/tester.htmx.train-e2e-coverage.convention.yaml +32 -0
- package/conventions/tester.htmx/tester.htmx.verb-endpoint-coverage.convention.yaml +2 -1
- package/conventions/tester.htmx/tester.htmx.visual-harness.convention.yaml +28 -0
- package/conventions/traceability/traceability.plan.executable-acceptance-has-test.convention.yaml +5 -0
- package/conventions/traceability/traceability.source.tested-by-present.convention.yaml +5 -0
- package/conventions/traceability/traceability.source.tested-by-resolves.convention.yaml +5 -0
- package/conventions/traceability/traceability.test.binding-resolves.convention.yaml +5 -0
- package/detectors/atdd_topology/atdd.implementation.yaml +13 -0
- package/detectors/atdd_topology/detect.mjs +171 -0
- package/detectors/atdd_topology/fixtures/clean/atdd-bun.yaml +2 -0
- package/detectors/atdd_topology/fixtures/clean/e2e/interlockings/checkout/nominal.routes.test.ts +4 -0
- package/detectors/atdd_topology/fixtures/clean/e2e/journeys/checkout.journey.test.ts +4 -0
- package/detectors/atdd_topology/fixtures/clean/implementation/orders/features/place-order/domain/order.ts +4 -0
- package/detectors/atdd_topology/fixtures/clean/plan/_journeys/checkout.yaml +4 -0
- package/detectors/atdd_topology/fixtures/clean/plan/_trains/_interlockings/checkout.yaml +4 -0
- package/detectors/atdd_topology/fixtures/clean/plan/_trains/checkout.yaml +1 -0
- package/detectors/atdd_topology/fixtures/clean/plan/orders/E001.yaml +6 -0
- package/detectors/atdd_topology/fixtures/clean/plan/orders/_orders.yaml +5 -0
- package/detectors/atdd_topology/fixtures/clean/plan/orders/place-order.yaml +3 -0
- package/detectors/atdd_topology/fixtures/clean/tests/wagons/orders/features/place-order/unit/order.test.ts +4 -0
- package/detectors/atdd_topology/fixtures/dirty/plan/_journeys/checkout.yaml +3 -0
- package/detectors/atdd_topology/fixtures/dirty/plan/orders/E001.yaml +4 -0
- package/detectors/atdd_topology/fixtures/dirty/plan/orders/_orders.yaml +4 -0
- package/detectors/atdd_topology/fixtures/dirty/plan/orders/features/place-order.yaml +3 -0
- package/detectors/atdd_topology/fixtures/dirty/src/wagons/orders/features/place-order/domain/forged.ts +2 -0
- package/detectors/atdd_topology/fixtures/dirty/src/wagons/orders/features/place-order/domain/order.ts +2 -0
- package/detectors/atdd_topology/fixtures/dirty/tests/wagons/orders/features/place-order/unit/order.test.ts +4 -0
- package/detectors/atdd_traceability_closure/detect.mjs +5 -2
- package/detectors/bun_green_traceability_detector/urn_header.mjs +2 -1
- package/detectors/bun_interlocking_binding/checks/interlocking_runtime_executes.mjs +3 -2
- package/detectors/bun_interlocking_binding/detect.mjs +6 -5
- package/detectors/bun_interlocking_coverage/_shared/interlocking.mjs +4 -3
- package/detectors/bun_interlocking_coverage/checks/interlocking_train_sequence.mjs +2 -2
- package/detectors/bun_interlocking_infrastructure/_shared/interlocking.mjs +2 -1
- package/detectors/bun_interlocking_infrastructure/checks/journey_runner_boundary.mjs +3 -2
- package/detectors/bun_interlocking_infrastructure/checks/journey_station_routing.mjs +2 -1
- package/detectors/bun_interlocking_infrastructure/checks/wagon_contract_honoured.mjs +3 -2
- package/detectors/bun_responsive_detector/atdd.implementation.yaml +18 -0
- package/detectors/bun_responsive_detector/checks/_map.json +5 -0
- package/detectors/bun_responsive_detector/checks/_responsive.mjs +20 -0
- package/detectors/bun_responsive_detector/checks/responsive_breakpoints_declared.mjs +21 -0
- package/detectors/bun_responsive_detector/checks/responsive_no_fixed_width.mjs +13 -0
- package/detectors/bun_responsive_detector/checks/responsive_viewport_meta.mjs +20 -0
- package/detectors/bun_responsive_detector/detect.mjs +46 -0
- package/detectors/bun_responsive_detector/fixtures/clean/public/index.html +9 -0
- package/detectors/bun_responsive_detector/fixtures/clean/src/app.css +13 -0
- package/detectors/bun_responsive_detector/fixtures/clean/src/document.ts +7 -0
- package/detectors/bun_responsive_detector/fixtures/clean/src/fragment.html +1 -0
- package/detectors/bun_responsive_detector/fixtures/clean/src/head.ts +1 -0
- package/detectors/bun_responsive_detector/fixtures/clean/src/layout.tsx +8 -0
- package/detectors/bun_responsive_detector/fixtures/clean/src/range.css +3 -0
- package/detectors/bun_responsive_detector/fixtures/clean/src/viewport-expression.tsx +5 -0
- package/detectors/bun_responsive_detector/fixtures/dirty/public/fixed-viewport.html +5 -0
- package/detectors/bun_responsive_detector/fixtures/dirty/public/no-meta.html +5 -0
- package/detectors/bun_responsive_detector/fixtures/dirty/public/no-zoom.html +5 -0
- package/detectors/bun_responsive_detector/fixtures/dirty/public/scale.html +5 -0
- package/detectors/bun_responsive_detector/fixtures/dirty/src/app.css +4 -0
- package/detectors/bun_responsive_detector/fixtures/dirty/src/render.ts +2 -0
- package/detectors/bun_responsive_detector/fixtures/dirty/src/units.css +3 -0
- package/detectors/bun_responsive_detector/fixtures/dirty/src/wide.tsx +3 -0
- package/detectors/bun_tester_discipline_detector/checks/t_acceptance_resolves.mjs +7 -6
- package/detectors/htmx_e2e_detector/atdd.implementation.yaml +40 -0
- package/detectors/htmx_e2e_detector/checks/_e2e.mjs +98 -0
- package/detectors/htmx_e2e_detector/checks/_map.json +16 -0
- package/detectors/htmx_e2e_detector/checks/a11y_harness.mjs +21 -0
- package/detectors/htmx_e2e_detector/checks/covered_train_is_routed.mjs +6 -0
- package/detectors/htmx_e2e_detector/checks/e2e_binds_declared_subject.mjs +11 -0
- package/detectors/htmx_e2e_detector/checks/e2e_spec_naming.mjs +6 -0
- package/detectors/htmx_e2e_detector/checks/exposed_journey_e2e_coverage.mjs +7 -0
- package/detectors/htmx_e2e_detector/checks/journey_binding_header.mjs +13 -0
- package/detectors/htmx_e2e_detector/checks/journey_layer_assembly.mjs +11 -0
- package/detectors/htmx_e2e_detector/checks/journey_no_acceptance_marker.mjs +6 -0
- package/detectors/htmx_e2e_detector/checks/journey_urn_format.mjs +18 -0
- package/detectors/htmx_e2e_detector/checks/presentation_smoke_coverage.mjs +15 -0
- package/detectors/htmx_e2e_detector/checks/responsive_harness.mjs +30 -0
- package/detectors/htmx_e2e_detector/checks/responsive_journey_coverage.mjs +7 -0
- package/detectors/htmx_e2e_detector/checks/train_e2e_coverage.mjs +7 -0
- package/detectors/htmx_e2e_detector/checks/visual_harness.mjs +7 -0
- package/detectors/htmx_e2e_detector/detect.mjs +46 -0
- package/detectors/htmx_e2e_detector/fixtures/clean/e2e/buy-alias.a11y.e2e.ts +12 -0
- package/detectors/htmx_e2e_detector/fixtures/clean/e2e/buy-inline.responsive.e2e.ts +11 -0
- package/detectors/htmx_e2e_detector/fixtures/clean/e2e/buy.a11y.e2e.ts +12 -0
- package/detectors/htmx_e2e_detector/fixtures/clean/e2e/buy.responsive.e2e.ts +14 -0
- package/detectors/htmx_e2e_detector/fixtures/clean/e2e/buy.visual.e2e.ts +10 -0
- package/detectors/htmx_e2e_detector/fixtures/clean/e2e/checkout-buy.smoke.e2e.ts +10 -0
- package/detectors/htmx_e2e_detector/fixtures/clean/e2e/crlf.e2e.ts +10 -0
- package/detectors/htmx_e2e_detector/fixtures/clean/e2e/place-order.e2e.ts +10 -0
- package/detectors/htmx_e2e_detector/fixtures/clean/e2e/reject-empty-cart.e2e.ts +10 -0
- package/detectors/htmx_e2e_detector/fixtures/clean/e2e/support/fixtures.ts +3 -0
- package/detectors/htmx_e2e_detector/fixtures/clean/e2e/take-payment.e2e.ts +10 -0
- package/detectors/htmx_e2e_detector/fixtures/clean/plan/_journeys/buy.yaml +19 -0
- package/detectors/htmx_e2e_detector/fixtures/clean/plan/_journeys/settle.yaml +14 -0
- package/detectors/htmx_e2e_detector/fixtures/clean/plan/_trains/_interlockings/checkout.yaml +21 -0
- package/detectors/htmx_e2e_detector/fixtures/clean/plan/_trains/_interlockings/payment.yaml +16 -0
- package/detectors/htmx_e2e_detector/fixtures/clean/plan/_trains/_interlockings/settlement.yaml +16 -0
- package/detectors/htmx_e2e_detector/fixtures/clean/plan/_trains/orders/place-order.yaml +11 -0
- package/detectors/htmx_e2e_detector/fixtures/clean/plan/_trains/orders/reject-empty-cart.yaml +11 -0
- package/detectors/htmx_e2e_detector/fixtures/clean/plan/_trains/orders/settle-ledger.yaml +11 -0
- package/detectors/htmx_e2e_detector/fixtures/clean/plan/_trains/orders/take-payment.yaml +11 -0
- package/detectors/htmx_e2e_detector/fixtures/clean/playwright.config.ts +3 -0
- package/detectors/htmx_e2e_detector/fixtures/clean/src/wagons/checkout/presentation/cart.tsx +3 -0
- package/detectors/htmx_e2e_detector/fixtures/clean/tests/urn-parser.test.ts +7 -0
- package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/acceptance.e2e.ts +6 -0
- package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/bad-id.e2e.ts +10 -0
- package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/bad-urn.e2e.ts +10 -0
- package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/both.e2e.ts +6 -0
- package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/buy.a11y.e2e.ts +10 -0
- package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/buy.responsive.e2e.ts +11 -0
- package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/buy.visual.e2e.ts +10 -0
- package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/covered.e2e.ts +10 -0
- package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/first-only.responsive.e2e.ts +13 -0
- package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/ghost.e2e.ts +10 -0
- package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/misnamed.spec.ts +10 -0
- package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/no-binding.e2e.ts +4 -0
- package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/no-layer.e2e.ts +4 -0
- package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/no-urn.e2e.ts +4 -0
- package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/tautology.a11y.e2e.ts +11 -0
- package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/two-trains.e2e.ts +6 -0
- package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/unrouted.e2e.ts +10 -0
- package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/wrong-layer.e2e.ts +5 -0
- package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/wrong-urn.e2e.ts +10 -0
- package/detectors/htmx_e2e_detector/fixtures/dirty/plan/_journeys/browse.yaml +16 -0
- package/detectors/htmx_e2e_detector/fixtures/dirty/plan/_journeys/buy.yaml +16 -0
- package/detectors/htmx_e2e_detector/fixtures/dirty/plan/_trains/_interlockings/checkout.yaml +21 -0
- package/detectors/htmx_e2e_detector/fixtures/dirty/plan/_trains/orders/covered.yaml +11 -0
- package/detectors/htmx_e2e_detector/fixtures/dirty/plan/_trains/orders/uncovered.yaml +11 -0
- package/detectors/htmx_e2e_detector/fixtures/dirty/plan/_trains/orders/unrouted.yaml +11 -0
- package/detectors/htmx_e2e_detector/fixtures/dirty/src/wagons/billing/presentation/invoice.tsx +3 -0
- package/integrity.json +208 -79
- package/lib/frontend.mjs +17 -0
- package/lib/scan.mjs +6 -2
- package/package.json +5 -1
- package/planner-nodes/ENFORCEMENT_SCOPE.yaml +18 -1
- package/relationships.yaml +4782 -4506
- package/src/enforce.ts +10 -7
- package/src/hooks.ts +2 -1
- package/src/index.ts +2 -0
- package/src/planner-kernel.ts +2 -1
- package/src/planner-schema-validator.ts +12 -10
- package/src/planner-validators.ts +16 -15
- 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
|
|
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
|
|
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
|
-
#
|
|
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
|
-
#
|
|
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
|
-
#
|
|
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
|
-
#
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
#
|
|
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
|
-
#
|
|
48
|
-
|
|
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
|
-
#
|
|
42
|
-
|
|
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
|
-
#
|
|
43
|
-
|
|
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
|
-
#
|
|
50
|
-
|
|
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
|
-
#
|
|
40
|
-
|
|
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
|
-
#
|
|
54
|
-
|
|
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
|
-
#
|
|
44
|
-
|
|
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
|
-
#
|
|
43
|
-
|
|
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
|
-
#
|
|
41
|
-
|
|
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
|
-
#
|
|
43
|
-
|
|
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
|
-
|
|
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
|
-
#
|
|
44
|
-
|
|
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
|
-
#
|
|
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
|
-
#
|
|
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
|