@afokapu/atdd-bun 0.3.2 → 0.5.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/PLANNER_PORT.md +1 -1
- package/README.md +111 -4
- 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.journey-view-current.convention.yaml +53 -0
- 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/bun_green_traceability_detector/urn_header.mjs +2 -1
- 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/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/detectors/planner_docs_capability/atdd.implementation.yaml +2 -0
- package/detectors/planner_docs_capability/fixtures/clean/docs/purpose/journeys/index.adoc +170 -0
- package/detectors/planner_docs_capability/fixtures/clean/docs/purpose/journeys/svg/journey-buy.svg +61 -0
- package/detectors/planner_docs_capability/fixtures/clean/docs/purpose/journeys/svg/path-buy-nominal.svg +81 -0
- package/detectors/planner_docs_capability/fixtures/clean/docs/purpose/journeys/svg/train-orders-archive-order.svg +13 -0
- package/detectors/planner_docs_capability/fixtures/clean/docs/purpose/journeys/svg/train-orders-place-order.svg +31 -0
- package/detectors/planner_docs_capability/fixtures/clean/docs/purpose/journeys/svg/train-orders-reject-empty-cart.svg +22 -0
- package/detectors/planner_docs_capability/fixtures/clean/docs/purpose/journeys/svg/train-orders-retry-payment.svg +22 -0
- package/detectors/planner_docs_capability/fixtures/clean/docs/purpose/journeys/svg/train-orders-ship-order.svg +35 -0
- package/detectors/planner_docs_capability/fixtures/clean/docs/purpose/journeys/svg/train-orders-take-payment.svg +27 -0
- package/detectors/planner_docs_capability/fixtures/clean/plan/_journeys/buy.yaml +24 -0
- package/detectors/planner_docs_capability/fixtures/clean/plan/_themes.yaml +3 -0
- package/detectors/planner_docs_capability/fixtures/clean/plan/_trains/_interlockings/checkout.yaml +43 -0
- package/detectors/planner_docs_capability/fixtures/clean/plan/_trains/_interlockings/fulfilment.yaml +33 -0
- package/detectors/planner_docs_capability/fixtures/clean/plan/_trains/_interlockings/payment.yaml +43 -0
- package/detectors/planner_docs_capability/fixtures/clean/plan/_trains/_interlockings/returns.yaml +33 -0
- package/detectors/planner_docs_capability/fixtures/clean/plan/_trains/orders/archive-order.yaml +11 -0
- package/detectors/planner_docs_capability/fixtures/clean/plan/_trains/orders/place-order.yaml +21 -0
- package/detectors/planner_docs_capability/fixtures/clean/plan/_trains/orders/reject-empty-cart.yaml +16 -0
- package/detectors/planner_docs_capability/fixtures/clean/plan/_trains/orders/retry-payment.yaml +16 -0
- package/detectors/planner_docs_capability/fixtures/clean/plan/_trains/orders/ship-order.yaml +21 -0
- package/detectors/planner_docs_capability/fixtures/clean/plan/_trains/orders/take-payment.yaml +21 -0
- package/detectors/planner_docs_capability/fixtures/clean/plan/_trains/orders/unrouted-refund.yaml +11 -0
- package/detectors/planner_docs_capability/fixtures/dirty_journey_view/docs/index.adoc +3 -0
- package/detectors/planner_docs_capability/fixtures/dirty_journey_view/plan/_trains/_interlockings/fulfilment.yaml +33 -0
- package/detectors/planner_static_validators/atdd.implementation.yaml +2 -0
- package/detectors/planner_static_validators/fixtures/dirty/plan/_trains/_interlockings/uncomposed.yaml +4 -0
- package/integrity.json +207 -70
- package/lib/frontend.mjs +17 -0
- package/lib/scan.mjs +6 -2
- package/package.json +7 -2
- package/planner-nodes/ENFORCEMENT_SCOPE.yaml +25 -2
- package/planner-nodes/nodes/planner.journey.interlocking-composed.convention.yaml +43 -0
- package/relationships.yaml +4790 -0
- package/src/cli.ts +9 -0
- package/src/docs-capability.ts +10 -1
- package/src/enforce.ts +4 -4
- package/src/index.ts +2 -0
- package/src/journey-docs.ts +355 -0
- package/src/planner-validators.ts +29 -0
package/PLANNER_PORT.md
CHANGED
|
@@ -5,7 +5,7 @@ to port ATDD's full planner yet.
|
|
|
5
5
|
|
|
6
6
|
## Portable planner kernel
|
|
7
7
|
|
|
8
|
-
The package ships
|
|
8
|
+
The package ships 196 canonical convention nodes in `planner-nodes/` and
|
|
9
9
|
21 schemas in `planner-schemas/`. It does not ship Python validator files:
|
|
10
10
|
they are executable Python/pytest code, not portable package assets. Port each
|
|
11
11
|
selected validator into Bun/TypeScript before enabling it in a `planner` profile.
|
package/README.md
CHANGED
|
@@ -98,11 +98,11 @@ name.
|
|
|
98
98
|
|---|---|
|
|
99
99
|
| `traceability` | plan acceptance, Bun test, and implementation closure |
|
|
100
100
|
| `planner` | plan parsing/graph integrity plus the explicitly scoped planner rules |
|
|
101
|
-
| `docs` | the optional documentation capability and its declared artifacts |
|
|
101
|
+
| `docs` | the optional documentation capability and its declared artifacts, including the generated journey view |
|
|
102
102
|
| `coder`, `tester`, `security`, `architecture`, `metrics`, `runtime` | Bun source and test conventions for that concern |
|
|
103
103
|
| `interlocking` | declared train/interlocking binding, infrastructure, and coverage |
|
|
104
|
-
| `htmx` | htmx-specific source and test conventions |
|
|
105
|
-
| `design` | the design system
|
|
104
|
+
| `htmx` | htmx-specific source and test conventions, including browser specs |
|
|
105
|
+
| `design` | the design system (tokens ← primitives ← components ← templates, token-only colors, spacing, radii, motion) and responsiveness (also part of `coder`) |
|
|
106
106
|
| `all` | the complete package policy, normally used by CI |
|
|
107
107
|
|
|
108
108
|
The package ships the canonical planner-node corpus as planning reference, but
|
|
@@ -146,6 +146,99 @@ every exported component has a consumer. Defining a custom property
|
|
|
146
146
|
(`--accent: #0ea5e9`) is defining a token and is allowed anywhere. A repository
|
|
147
147
|
without a design directory is not judged by these rules.
|
|
148
148
|
|
|
149
|
+
### Journey documentation
|
|
150
|
+
|
|
151
|
+
A plan describes behaviour on three levels. A journey (`plan/_journeys/`) enters
|
|
152
|
+
at one interlocking and continues, through an artifact the selected train
|
|
153
|
+
produces, into the next one. An interlocking chooses one route by its guards.
|
|
154
|
+
A route runs one train, a linear sequence of handovers. Generate the view of all
|
|
155
|
+
three from `plan/`:
|
|
156
|
+
|
|
157
|
+
```sh
|
|
158
|
+
bun run atdd-bun docs journeys # writes docs/purpose/journeys/
|
|
159
|
+
bun run atdd-bun docs journeys --check # fails when the committed view differs from plan/
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
It writes `docs/purpose/journeys/index.adoc` and one SVG for each of:
|
|
163
|
+
|
|
164
|
+
- **journey map:** the entry action, each interlocking, the routes it chooses
|
|
165
|
+
and their guards, the trains they run, continuations (labelled with the
|
|
166
|
+
artifact that carries control) and terminal outcomes;
|
|
167
|
+
- **nominal path, end to end:** the journey's trains across all its
|
|
168
|
+
interlockings, joined into one sequence diagram;
|
|
169
|
+
- **train:** each routed train as its own sequence diagram, under its
|
|
170
|
+
interlocking's route table.
|
|
171
|
+
|
|
172
|
+
The page also tables every path with how it ends, and every **gap**: unreached
|
|
173
|
+
interlockings, routes with no continuation or outcome, unrouted trains,
|
|
174
|
+
unresolved guards. Participants are coloured by what they are (wagon, person,
|
|
175
|
+
outside system) and arrows by the boundary they cross. Diagrams are inlined
|
|
176
|
+
(`opts=inline`) and coloured with `var(--atdd-*, fallback)`, so a doc site can
|
|
177
|
+
theme them by defining `--atdd-ink`, `--atdd-paper`, `--atdd-wagon`,
|
|
178
|
+
`--atdd-person`, `--atdd-system`, `--atdd-nominal`, `--atdd-alternate`,
|
|
179
|
+
`--atdd-error`, `--atdd-exception`, and the like. The output carries no
|
|
180
|
+
timestamp and no package version, so it changes only when the plan does.
|
|
181
|
+
|
|
182
|
+
The planner requires the journey level itself: `planner.journey.interlocking-composed`
|
|
183
|
+
fails when a plan declares interlockings and no journey, or when an interlocking
|
|
184
|
+
is neither a journey's entrypoint nor reached by one of its continuations.
|
|
185
|
+
`planner.journey.continuation-closure` then checks each declared journey closes.
|
|
186
|
+
|
|
187
|
+
**Required.** In a repository with `docs/` whose plan has journeys or
|
|
188
|
+
interlockings, the `docs` profile's `planner.docs.journey-view-current` rule
|
|
189
|
+
fails when any generated file is missing, stale, hand-edited, or extra. The
|
|
190
|
+
generator refuses to overwrite a hand-written `index.adoc` unless you pass
|
|
191
|
+
`--force`; use `--out <dir>` to preview elsewhere.
|
|
192
|
+
|
|
193
|
+
### Every enforced rule is strict
|
|
194
|
+
|
|
195
|
+
atdd-bun fails on every finding: it has no advisory mode and no ratchet
|
|
196
|
+
baseline. Every convention with a validator is therefore `strict` (or `block`),
|
|
197
|
+
and `tests/dispositions.test.ts` fails on any that promises otherwise. For the
|
|
198
|
+
canonical planner nodes, which ship verbatim, the package states its own
|
|
199
|
+
`disposition: strict` in `planner-nodes/ENFORCEMENT_SCOPE.yaml`.
|
|
200
|
+
|
|
201
|
+
### Browser specs (Playwright)
|
|
202
|
+
|
|
203
|
+
The `tester` and `htmx` profiles judge browser specs against the plan. A browser
|
|
204
|
+
spec is a `*.e2e.ts` file run by Playwright, never `*.spec.ts`, which `bun test`
|
|
205
|
+
would try to run itself. It binds to one plan subject and declares its layer
|
|
206
|
+
and test URN:
|
|
207
|
+
|
|
208
|
+
```ts
|
|
209
|
+
import { expect, test } from "@playwright/test";
|
|
210
|
+
|
|
211
|
+
// Train: train:orders:place-order (or // Journey: journey:buy)
|
|
212
|
+
// Layer: assembly
|
|
213
|
+
// URN: test:train:orders:place-order:E2E-001-places-an-order
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
The harness code in the URN (`E2E`, `SMOKE`, `A11Y`, `VIS`, `RESP`) says what
|
|
217
|
+
the spec must do: an `A11Y` spec runs `@axe-core/playwright` and asserts on its
|
|
218
|
+
violations, a `VIS` spec compares a screenshot, a `RESP` spec renders at every
|
|
219
|
+
declared viewport and asserts on `scrollWidth`. Coverage is read from `plan/`:
|
|
220
|
+
every train has a spec, every covered train is routed by an interlocking, every
|
|
221
|
+
exposed journey has an E2E or SMOKE spec and a RESP spec, and every presentation
|
|
222
|
+
component has a SMOKE spec naming its wagon. Route and Station Master coverage
|
|
223
|
+
remain `tester.bun` rules; browser specs count toward them.
|
|
224
|
+
|
|
225
|
+
### Responsiveness
|
|
226
|
+
|
|
227
|
+
The `coder` and `design` profiles check the structural causes of screens that
|
|
228
|
+
break on small devices: every HTML document declares
|
|
229
|
+
`<meta name="viewport" content="width=device-width, initial-scale=1">` and
|
|
230
|
+
never blocks zoom; no `width`/`min-width` is wider than the smallest viewport;
|
|
231
|
+
and every `@media` width is a declared breakpoint (media queries cannot read
|
|
232
|
+
CSS variables, so breakpoints are declared once). The browser proof is the
|
|
233
|
+
`RESP` spec above. Both read the same settings:
|
|
234
|
+
|
|
235
|
+
```yaml
|
|
236
|
+
# atdd-bun.yaml
|
|
237
|
+
frontend:
|
|
238
|
+
viewports: [375, 768, 1280] # default; RESP specs render at each, the smallest bounds fixed widths
|
|
239
|
+
breakpoints: [480, 768, 1024, 1280] # default; the only widths @media may use
|
|
240
|
+
```
|
|
241
|
+
|
|
149
242
|
### Theme and contract registry
|
|
150
243
|
|
|
151
244
|
Theme vocabulary belongs to the repository, not the package. When a plan uses
|
|
@@ -391,10 +484,24 @@ It creates no tag, makes no network request, and does not publish anything.
|
|
|
391
484
|
The separate optional release workflow is where a repository may create a tag or
|
|
392
485
|
publish using its own credentials and registry configuration.
|
|
393
486
|
|
|
487
|
+
## Convention relationships
|
|
488
|
+
|
|
489
|
+
`relationships.yaml` relates every convention the package ships (`planner-nodes/`
|
|
490
|
+
and `conventions/`) to at least one other, as
|
|
491
|
+
`planner.relationship.no-orphan-nodes` requires. Edges that touch a shipped
|
|
492
|
+
convention are imported from the upstream ATDD graphs with their `origin`; the
|
|
493
|
+
package adds its own for the conventions it introduces. A test fails when any
|
|
494
|
+
shipped convention has no edge, when the node list drifts from the shipped
|
|
495
|
+
conventions, or when an edge breaks `relationship.schema.json`, so a new
|
|
496
|
+
convention cannot land without its relationships.
|
|
497
|
+
|
|
394
498
|
## Verification of this package
|
|
395
499
|
|
|
396
500
|
`bun test` runs the package’s real-Git fixtures and detector clean/dirty corpora.
|
|
397
501
|
The suite proves that every declared convention output has a matching convention
|
|
398
|
-
and a deliberate failing case
|
|
502
|
+
and a deliberate failing case, and runs the frontend chain end to end: a Bun app
|
|
503
|
+
built from a plan, its browser specs accepted by the detectors and passing in
|
|
504
|
+
Chromium, and broken variants of the page failing both the static rules and the
|
|
505
|
+
browser (Chromium must be installed: `bunx playwright install chromium`); it also covers hook isolation, the declarative
|
|
399
506
|
registry policy, CI generation, agent-skill installation, planner scope, release
|
|
400
507
|
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
|