@afokapu/atdd-bun 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/HOOK_AUDIT.md +22 -0
- package/PLANNER_PORT.md +55 -0
- package/README.md +256 -0
- package/bunfig.toml +2 -0
- package/conventions/coder.bun/coder.bun.boundaries-http-client.convention.yaml +43 -0
- package/conventions/coder.bun/coder.bun.commons-application-no-integration.convention.yaml +40 -0
- package/conventions/coder.bun/coder.bun.commons-cross-feature-imports-in.convention.yaml +39 -0
- package/conventions/coder.bun/coder.bun.commons-domain-no-framework-import.convention.yaml +40 -0
- package/conventions/coder.bun/coder.bun.commons-domain-no-outbound.convention.yaml +41 -0
- package/conventions/coder.bun/coder.bun.complexity-cyclomatic.convention.yaml +51 -0
- package/conventions/coder.bun/coder.bun.complexity-length.convention.yaml +43 -0
- package/conventions/coder.bun/coder.bun.complexity-nesting.convention.yaml +49 -0
- package/conventions/coder.bun/coder.bun.composition-consumer.convention.yaml +40 -0
- package/conventions/coder.bun/coder.bun.composition-root.convention.yaml +42 -0
- package/conventions/coder.bun/coder.bun.dead-code-reachability.convention.yaml +49 -0
- package/conventions/coder.bun/coder.bun.design-hierarchy-import.convention.yaml +42 -0
- package/conventions/coder.bun/coder.bun.dto-mapper.convention.yaml +38 -0
- package/conventions/coder.bun/coder.bun.dto-placement.convention.yaml +39 -0
- package/conventions/coder.bun/coder.bun.dto-purity.convention.yaml +40 -0
- package/conventions/coder.bun/coder.bun.duplication-intra-layer.convention.yaml +47 -0
- package/conventions/coder.bun/coder.bun.error-response-bare-string.convention.yaml +47 -0
- package/conventions/coder.bun/coder.bun.error-response-code-format.convention.yaml +46 -0
- package/conventions/coder.bun/coder.bun.green-header-order.convention.yaml +61 -0
- package/conventions/coder.bun/coder.bun.green-header-purpose.convention.yaml +55 -0
- package/conventions/coder.bun/coder.bun.green-header-runtime.convention.yaml +56 -0
- package/conventions/coder.bun/coder.bun.green-header-tested-by.convention.yaml +63 -0
- package/conventions/coder.bun/coder.bun.green-urn-layer.convention.yaml +53 -0
- package/conventions/coder.bun/coder.bun.green-urn-marker.convention.yaml +67 -0
- package/conventions/coder.bun/coder.bun.green-urn-name-matches.convention.yaml +57 -0
- package/conventions/coder.bun/coder.bun.green-urn-pattern.convention.yaml +56 -0
- package/conventions/coder.bun/coder.bun.green-urn-side.convention.yaml +54 -0
- package/conventions/coder.bun/coder.bun.green-urn-wagon-feature.convention.yaml +56 -0
- package/conventions/coder.bun/coder.bun.interlocking-bilateral-binding.convention.yaml +132 -0
- package/conventions/coder.bun/coder.bun.interlocking-delegates-to-trainrunner.convention.yaml +56 -0
- package/conventions/coder.bun/coder.bun.interlocking-does-not-carry-cargo.convention.yaml +53 -0
- package/conventions/coder.bun/coder.bun.interlocking-resolution-model-exists.convention.yaml +61 -0
- package/conventions/coder.bun/coder.bun.interlocking-runner-exists.convention.yaml +64 -0
- package/conventions/coder.bun/coder.bun.journey-runner-boundary.convention.yaml +55 -0
- package/conventions/coder.bun/coder.bun.layer-naming.convention.yaml +41 -0
- package/conventions/coder.bun/coder.bun.logging-console.convention.yaml +47 -0
- package/conventions/coder.bun/coder.bun.logging-structured.convention.yaml +49 -0
- package/conventions/coder.bun/coder.bun.quality-comments.convention.yaml +44 -0
- package/conventions/coder.bun/coder.bun.quality-mi.convention.yaml +47 -0
- package/conventions/coder.bun/coder.bun.runtime-executes-the-declaration.convention.yaml +104 -0
- package/conventions/coder.bun/coder.bun.runtime-server-is-bun-serve.convention.yaml +64 -0
- package/conventions/coder.bun/coder.bun.runtime-single-lockfile.convention.yaml +56 -0
- package/conventions/coder.bun/coder.bun.runtime-typecheck-enforced.convention.yaml +91 -0
- package/conventions/coder.bun/coder.bun.security-hardcoded-secret.convention.yaml +50 -0
- package/conventions/coder.bun/coder.bun.security-missing-auth.convention.yaml +53 -0
- package/conventions/coder.bun/coder.bun.security-sql-injection.convention.yaml +54 -0
- package/conventions/coder.bun/coder.bun.station-master-interlocking-routing.convention.yaml +62 -0
- package/conventions/coder.bun/coder.bun.station-master-journey-routing.convention.yaml +49 -0
- package/conventions/coder.bun/coder.bun.wagon-honours-its-contract.convention.yaml +64 -0
- package/conventions/coder.htmx/coder.htmx.fragment-escapes-interpolation.convention.yaml +72 -0
- package/conventions/coder.htmx/coder.htmx.swap-no-inline-handler.convention.yaml +59 -0
- package/conventions/coder.htmx/coder.htmx.swap-oob-carries-id.convention.yaml +56 -0
- package/conventions/coder.htmx/coder.htmx.verb-destructive-confirms.convention.yaml +56 -0
- package/conventions/coder.htmx/coder.htmx.verb-endpoint-is-routed.convention.yaml +73 -0
- package/conventions/coder.htmx/coder.htmx.verb-endpoint-same-origin.convention.yaml +58 -0
- package/conventions/coder.htmx/coder.htmx.verb-mutation-signals-progress.convention.yaml +59 -0
- package/conventions/planner.docs/planner.docs.adr-registry-derived.convention.yaml +83 -0
- package/conventions/planner.docs/planner.docs.area-index-required.convention.yaml +67 -0
- package/conventions/planner.docs/planner.docs.artifact-path-shape.convention.yaml +82 -0
- package/conventions/planner.docs/planner.docs.asciidoc-only.convention.yaml +71 -0
- package/conventions/planner.docs/planner.docs.doc-id-unique.convention.yaml +65 -0
- package/conventions/planner.docs/planner.docs.graph-target-resolves.convention.yaml +87 -0
- package/conventions/planner.docs/planner.docs.identity-required.convention.yaml +68 -0
- package/conventions/planner.docs/planner.docs.reference-integrity.convention.yaml +74 -0
- package/conventions/planner.docs/planner.docs.undeclared-change.convention.yaml +80 -0
- package/conventions/tester.bun/tester.bun.acceptance-binding-declared.convention.yaml +49 -0
- package/conventions/tester.bun/tester.bun.acceptance-covers-tag-well-formed.convention.yaml +50 -0
- package/conventions/tester.bun/tester.bun.acceptance-resolves-to-declared.convention.yaml +61 -0
- package/conventions/tester.bun/tester.bun.interlocking-production-runner-used.convention.yaml +76 -0
- package/conventions/tester.bun/tester.bun.interlocking-route-coverage.convention.yaml +66 -0
- package/conventions/tester.bun/tester.bun.interlocking-smoke-coverage-for-station-master.convention.yaml +76 -0
- package/conventions/tester.bun/tester.bun.interlocking-trace-binds-declared-route.convention.yaml +74 -0
- package/conventions/tester.bun/tester.bun.interlocking-train-sequence-is-exercised.convention.yaml +77 -0
- package/conventions/tester.bun/tester.bun.red-behavioral-assertion.convention.yaml +51 -0
- package/conventions/tester.bun/tester.bun.red-fails-first.convention.yaml +52 -0
- package/conventions/tester.bun/tester.bun.routing-runtime-family.convention.yaml +41 -0
- package/conventions/tester.bun/tester.bun.security-auth.convention.yaml +46 -0
- package/conventions/tester.bun/tester.bun.security-input.convention.yaml +45 -0
- package/conventions/tester.bun/tester.bun.smoke-no-collaborator-substitution.convention.yaml +45 -0
- package/conventions/tester.bun/tester.bun.smoke-observable-assertion.convention.yaml +54 -0
- package/conventions/tester.bun/tester.bun.telemetry-emit.convention.yaml +46 -0
- package/conventions/tester.bun/tester.bun.test-carries-urn-identity.convention.yaml +51 -0
- package/conventions/tester.bun/tester.bun.test-imports-bun-test.convention.yaml +55 -0
- package/conventions/tester.bun/tester.bun.test-isolation-no-live-state.convention.yaml +50 -0
- package/conventions/tester.bun/tester.bun.test-no-self-skip.convention.yaml +46 -0
- package/conventions/tester.bun/tester.bun.test-phase-declared.convention.yaml +45 -0
- package/conventions/tester.htmx/tester.htmx.fragment-asserts-returned-markup.convention.yaml +52 -0
- package/conventions/tester.htmx/tester.htmx.swap-oob-asserts-destination-id.convention.yaml +48 -0
- package/conventions/tester.htmx/tester.htmx.verb-endpoint-coverage.convention.yaml +54 -0
- package/conventions/traceability/traceability.plan.executable-acceptance-has-test.convention.yaml +2 -0
- package/conventions/traceability/traceability.source.tested-by-present.convention.yaml +2 -0
- package/conventions/traceability/traceability.source.tested-by-resolves.convention.yaml +2 -0
- package/conventions/traceability/traceability.test.binding-resolves.convention.yaml +2 -0
- package/detectors/atdd_traceability_closure/atdd.implementation.yaml +8 -0
- package/detectors/atdd_traceability_closure/detect.mjs +84 -0
- package/detectors/atdd_traceability_closure/fixtures/clean/plan/orders/E001.yaml +4 -0
- package/detectors/atdd_traceability_closure/fixtures/clean/src/order.ts +4 -0
- package/detectors/atdd_traceability_closure/fixtures/clean/test/order.test.ts +4 -0
- package/detectors/atdd_traceability_closure/fixtures/dirty/plan/orders/E001.yaml +6 -0
- package/detectors/atdd_traceability_closure/fixtures/dirty/src/missing-test.ts +2 -0
- package/detectors/atdd_traceability_closure/fixtures/dirty/src/unknown-test.ts +4 -0
- package/detectors/atdd_traceability_closure/fixtures/dirty/test/bad-binding.test.ts +4 -0
- package/detectors/atdd_traceability_closure/fixtures/dirty/test/no-binding.test.ts +3 -0
- package/detectors/bun_clean_architecture_detector/atdd.implementation.yaml +42 -0
- package/detectors/bun_clean_architecture_detector/checks/_map.json +14 -0
- package/detectors/bun_clean_architecture_detector/checks/a_boundaries_http_client.mjs +36 -0
- package/detectors/bun_clean_architecture_detector/checks/a_commons_application_no_integration.mjs +37 -0
- package/detectors/bun_clean_architecture_detector/checks/a_commons_cross_feature.mjs +41 -0
- package/detectors/bun_clean_architecture_detector/checks/a_commons_domain_no_outbound.mjs +40 -0
- package/detectors/bun_clean_architecture_detector/checks/a_composition_consumer.mjs +33 -0
- package/detectors/bun_clean_architecture_detector/checks/a_composition_root.mjs +35 -0
- package/detectors/bun_clean_architecture_detector/checks/a_domain_no_framework.mjs +47 -0
- package/detectors/bun_clean_architecture_detector/checks/a_dto_mapper.mjs +31 -0
- package/detectors/bun_clean_architecture_detector/checks/a_dto_placement.mjs +30 -0
- package/detectors/bun_clean_architecture_detector/checks/a_dto_purity.mjs +59 -0
- package/detectors/bun_clean_architecture_detector/checks/a_hierarchy_import.mjs +48 -0
- package/detectors/bun_clean_architecture_detector/checks/a_layer_naming.mjs +41 -0
- package/detectors/bun_clean_architecture_detector/detect.mjs +46 -0
- package/detectors/bun_clean_architecture_detector/fixtures/clean/contracts/order.ts +5 -0
- package/detectors/bun_clean_architecture_detector/fixtures/clean/features/orders/application/place.ts +3 -0
- package/detectors/bun_clean_architecture_detector/fixtures/clean/features/orders/composition.ts +4 -0
- package/detectors/bun_clean_architecture_detector/fixtures/clean/features/orders/domain/total.ts +2 -0
- package/detectors/bun_clean_architecture_detector/fixtures/clean/features/orders/integration/order-mapper.ts +3 -0
- package/detectors/bun_clean_architecture_detector/fixtures/clean/features/orders/presentation/api.ts +3 -0
- package/detectors/bun_clean_architecture_detector/fixtures/dirty/commons/application/flow.ts +2 -0
- package/detectors/bun_clean_architecture_detector/fixtures/dirty/commons/domain/billing/rules.ts +1 -0
- package/detectors/bun_clean_architecture_detector/fixtures/dirty/commons/domain/orders/rules.ts +5 -0
- package/detectors/bun_clean_architecture_detector/fixtures/dirty/commons/integration/http.ts +1 -0
- package/detectors/bun_clean_architecture_detector/fixtures/dirty/features/billing/application/pay.ts +2 -0
- package/detectors/bun_clean_architecture_detector/fixtures/dirty/features/billing/domain/rules.ts +2 -0
- package/detectors/bun_clean_architecture_detector/fixtures/dirty/features/billing/helper.ts +1 -0
- package/detectors/bun_clean_architecture_detector/fixtures/dirty/features/billing/integration/client.ts +1 -0
- package/detectors/bun_clean_architecture_detector/fixtures/dirty/features/billing/presentation/api.ts +2 -0
- package/detectors/bun_fullstack_detector/atdd.implementation.yaml +23 -0
- package/detectors/bun_fullstack_detector/checks/_map.json +5 -0
- package/detectors/bun_fullstack_detector/checks/bun_runtime_server_is_bun_serve.mjs +39 -0
- package/detectors/bun_fullstack_detector/checks/bun_runtime_single_lockfile.mjs +40 -0
- package/detectors/bun_fullstack_detector/checks/bun_runtime_typecheck_enforced.mjs +133 -0
- package/detectors/bun_fullstack_detector/detect.mjs +46 -0
- package/detectors/bun_fullstack_detector/fixtures/clean/bun_runtime_server_is_bun_serve/server.ts +7 -0
- package/detectors/bun_fullstack_detector/fixtures/clean/bun_runtime_single_lockfile/bun.lock +1 -0
- package/detectors/bun_fullstack_detector/fixtures/clean/bun_runtime_typecheck_enforced/package.json +5 -0
- package/detectors/bun_fullstack_detector/fixtures/clean/bun_runtime_typecheck_enforced/server.ts +3 -0
- package/detectors/bun_fullstack_detector/fixtures/clean/bun_runtime_typecheck_enforced/tsconfig.json +1 -0
- package/detectors/bun_fullstack_detector/fixtures/dirty/bun_runtime_server_is_bun_serve/server.ts +5 -0
- package/detectors/bun_fullstack_detector/fixtures/dirty/bun_runtime_single_lockfile/bun.lock +1 -0
- package/detectors/bun_fullstack_detector/fixtures/dirty/bun_runtime_single_lockfile/package-lock.json +1 -0
- package/detectors/bun_fullstack_detector/fixtures/dirty/bun_runtime_typecheck_enforced/package.json +4 -0
- package/detectors/bun_fullstack_detector/fixtures/dirty/bun_runtime_typecheck_enforced/packages/second/index.ts +8 -0
- package/detectors/bun_fullstack_detector/fixtures/dirty/bun_runtime_typecheck_enforced/packages/second/package.json +1 -0
- package/detectors/bun_fullstack_detector/fixtures/dirty/bun_runtime_typecheck_enforced/server.ts +3 -0
- package/detectors/bun_fullstack_detector/fixtures/dirty/bun_runtime_typecheck_enforced/tsconfig.json +1 -0
- package/detectors/bun_green_traceability_detector/atdd.implementation.yaml +35 -0
- package/detectors/bun_green_traceability_detector/checks/_map.json +12 -0
- package/detectors/bun_green_traceability_detector/checks/green_header_order.mjs +24 -0
- package/detectors/bun_green_traceability_detector/checks/green_header_purpose.mjs +18 -0
- package/detectors/bun_green_traceability_detector/checks/green_header_runtime.mjs +25 -0
- package/detectors/bun_green_traceability_detector/checks/green_header_tested_by.mjs +15 -0
- package/detectors/bun_green_traceability_detector/checks/green_urn_layer.mjs +17 -0
- package/detectors/bun_green_traceability_detector/checks/green_urn_marker.mjs +18 -0
- package/detectors/bun_green_traceability_detector/checks/green_urn_name_matches.mjs +26 -0
- package/detectors/bun_green_traceability_detector/checks/green_urn_pattern.mjs +17 -0
- package/detectors/bun_green_traceability_detector/checks/green_urn_side.mjs +20 -0
- package/detectors/bun_green_traceability_detector/checks/green_urn_wagon_feature.mjs +20 -0
- package/detectors/bun_green_traceability_detector/detect.mjs +46 -0
- package/detectors/bun_green_traceability_detector/fixtures/clean/green_header_order/OrderPanel.html +7 -0
- package/detectors/bun_green_traceability_detector/fixtures/clean/green_header_order/OrderRow.ts +7 -0
- package/detectors/bun_green_traceability_detector/fixtures/clean/green_header_purpose/OrderPanel.html +7 -0
- package/detectors/bun_green_traceability_detector/fixtures/clean/green_header_purpose/OrderRow.ts +7 -0
- package/detectors/bun_green_traceability_detector/fixtures/clean/green_header_runtime/OrderPanel.html +7 -0
- package/detectors/bun_green_traceability_detector/fixtures/clean/green_header_runtime/OrderRow.ts +7 -0
- package/detectors/bun_green_traceability_detector/fixtures/clean/green_header_tested_by/OrderPanel.html +7 -0
- package/detectors/bun_green_traceability_detector/fixtures/clean/green_header_tested_by/OrderRow.ts +7 -0
- package/detectors/bun_green_traceability_detector/fixtures/clean/green_urn_layer/OrderPanel.html +7 -0
- package/detectors/bun_green_traceability_detector/fixtures/clean/green_urn_layer/OrderRow.ts +7 -0
- package/detectors/bun_green_traceability_detector/fixtures/clean/green_urn_marker/OrderPanel.html +7 -0
- package/detectors/bun_green_traceability_detector/fixtures/clean/green_urn_marker/OrderRow.ts +7 -0
- package/detectors/bun_green_traceability_detector/fixtures/clean/green_urn_name_matches/OrderPanel.html +7 -0
- package/detectors/bun_green_traceability_detector/fixtures/clean/green_urn_name_matches/OrderRow.ts +7 -0
- package/detectors/bun_green_traceability_detector/fixtures/clean/green_urn_pattern/OrderPanel.html +7 -0
- package/detectors/bun_green_traceability_detector/fixtures/clean/green_urn_pattern/OrderRow.ts +7 -0
- package/detectors/bun_green_traceability_detector/fixtures/clean/green_urn_side/OrderPanel.html +7 -0
- package/detectors/bun_green_traceability_detector/fixtures/clean/green_urn_side/OrderRow.ts +7 -0
- package/detectors/bun_green_traceability_detector/fixtures/clean/green_urn_wagon_feature/OrderPanel.html +7 -0
- package/detectors/bun_green_traceability_detector/fixtures/clean/green_urn_wagon_feature/OrderRow.ts +7 -0
- package/detectors/bun_green_traceability_detector/fixtures/dirty/green_header_order/OrderRow.ts +6 -0
- package/detectors/bun_green_traceability_detector/fixtures/dirty/green_header_purpose/OrderRow.ts +5 -0
- package/detectors/bun_green_traceability_detector/fixtures/dirty/green_header_runtime/OrderRow.ts +6 -0
- package/detectors/bun_green_traceability_detector/fixtures/dirty/green_header_tested_by/OrderPanel.html +5 -0
- package/detectors/bun_green_traceability_detector/fixtures/dirty/green_urn_layer/OrderRow.ts +6 -0
- package/detectors/bun_green_traceability_detector/fixtures/dirty/green_urn_marker/OrderRow.ts +3 -0
- package/detectors/bun_green_traceability_detector/fixtures/dirty/green_urn_name_matches/OrderRow.ts +6 -0
- package/detectors/bun_green_traceability_detector/fixtures/dirty/green_urn_pattern/OrderRow.ts +6 -0
- package/detectors/bun_green_traceability_detector/fixtures/dirty/green_urn_side/OrderRow.ts +6 -0
- package/detectors/bun_green_traceability_detector/fixtures/dirty/green_urn_wagon_feature/OrderRow.ts +6 -0
- package/detectors/bun_green_traceability_detector/urn_header.mjs +191 -0
- package/detectors/bun_interlocking_binding/atdd.implementation.yaml +31 -0
- package/detectors/bun_interlocking_binding/checks/interlocking_runtime_executes.mjs +168 -0
- package/detectors/bun_interlocking_binding/detect.mjs +608 -0
- package/detectors/bun_interlocking_binding/fixtures/clean/e2e/interlockings/match-resolution/trace.test.ts +10 -0
- package/detectors/bun_interlocking_binding/fixtures/clean/plan/_trains/_interlockings/match-resolution.yaml +51 -0
- package/detectors/bun_interlocking_binding/fixtures/clean/plan/_trains/train:match:match-resolution-standard.yaml +4 -0
- package/detectors/bun_interlocking_binding/fixtures/clean/plan/_trains/train:match:match-resolution-timeout.yaml +4 -0
- package/detectors/bun_interlocking_binding/fixtures/clean/server.ts +19 -0
- package/detectors/bun_interlocking_binding/fixtures/clean/src/trains/interlocking.ts +66 -0
- package/detectors/bun_interlocking_binding/fixtures/clean/src/trains/runner.ts +7 -0
- package/detectors/bun_interlocking_binding/fixtures/clean_flow_style_actions/e2e/interlockings/match-resolution/trace.test.ts +10 -0
- package/detectors/bun_interlocking_binding/fixtures/clean_flow_style_actions/plan/_trains/_interlockings/match-resolution.yaml +57 -0
- package/detectors/bun_interlocking_binding/fixtures/clean_flow_style_actions/plan/_trains/train:match:match-resolution-standard.yaml +4 -0
- package/detectors/bun_interlocking_binding/fixtures/clean_flow_style_actions/plan/_trains/train:match:match-resolution-timeout.yaml +4 -0
- package/detectors/bun_interlocking_binding/fixtures/clean_flow_style_actions/server.ts +19 -0
- package/detectors/bun_interlocking_binding/fixtures/clean_flow_style_actions/src/trains/interlocking.ts +28 -0
- package/detectors/bun_interlocking_binding/fixtures/clean_flow_style_actions/src/trains/runner.ts +7 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty/e2e/interlockings/match-resolution/trace.test.ts +10 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty/plan/_trains/_interlockings/match-resolution.yaml +51 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty/plan/_trains/train:match:match-resolution-standard.yaml +4 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty/plan/_trains/train:match:match-resolution-timeout.yaml +4 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty/server.ts +19 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty/src/trains/interlocking.ts +28 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty/src/trains/runner.ts +7 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty_parallel_field/e2e/interlockings/match-resolution/trace.test.ts +10 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty_parallel_field/plan/_trains/_interlockings/match-resolution.yaml +54 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty_parallel_field/plan/_trains/train:match:match-resolution-standard.yaml +4 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty_parallel_field/plan/_trains/train:match:match-resolution-timeout.yaml +4 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty_parallel_field/server.ts +19 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty_parallel_field/src/trains/interlocking.ts +28 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty_parallel_field/src/trains/runner.ts +7 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty_station_missing/e2e/interlockings/match-resolution/trace.test.ts +10 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty_station_missing/plan/_trains/_interlockings/match-resolution.yaml +51 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty_station_missing/plan/_trains/train:match:match-resolution-standard.yaml +4 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty_station_missing/plan/_trains/train:match:match-resolution-timeout.yaml +4 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty_station_missing/server.ts +19 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty_station_missing/src/trains/interlocking.ts +28 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty_station_missing/src/trains/runner.ts +7 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty_trace_unbound/e2e/interlockings/match-resolution/trace.test.ts +19 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty_trace_unbound/plan/_trains/_interlockings/match-resolution.yaml +51 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty_trace_unbound/plan/_trains/train:match:match-resolution-standard.yaml +4 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty_trace_unbound/plan/_trains/train:match:match-resolution-timeout.yaml +4 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty_trace_unbound/server.ts +19 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty_trace_unbound/src/trains/interlocking.ts +28 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty_trace_unbound/src/trains/runner.ts +7 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty_transcribed_runtime/e2e/interlockings/match-resolution/trace.test.ts +10 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty_transcribed_runtime/plan/_trains/_interlockings/match-resolution.yaml +51 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty_transcribed_runtime/plan/_trains/train:match:match-resolution-standard.yaml +4 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty_transcribed_runtime/plan/_trains/train:match:match-resolution-timeout.yaml +4 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty_transcribed_runtime/server.ts +19 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty_transcribed_runtime/src/trains/interlocking.ts +30 -0
- package/detectors/bun_interlocking_binding/fixtures/dirty_transcribed_runtime/src/trains/runner.ts +7 -0
- package/detectors/bun_interlocking_coverage/_shared/interlocking.mjs +389 -0
- package/detectors/bun_interlocking_coverage/atdd.implementation.yaml +27 -0
- package/detectors/bun_interlocking_coverage/checks/_map.json +7 -0
- package/detectors/bun_interlocking_coverage/checks/interlocking_production_runner.mjs +82 -0
- package/detectors/bun_interlocking_coverage/checks/interlocking_route_coverage.mjs +58 -0
- package/detectors/bun_interlocking_coverage/checks/interlocking_smoke_coverage.mjs +68 -0
- package/detectors/bun_interlocking_coverage/checks/interlocking_trace_binds.mjs +64 -0
- package/detectors/bun_interlocking_coverage/checks/interlocking_train_sequence.mjs +110 -0
- package/detectors/bun_interlocking_coverage/detect.mjs +46 -0
- package/detectors/bun_interlocking_coverage/fixtures/clean/interlocking_production_runner/e2e/interlockings/match-resolution/routes.test.ts +21 -0
- package/detectors/bun_interlocking_coverage/fixtures/clean/interlocking_production_runner/e2e/interlockings/match-resolution/trace.test.ts +17 -0
- package/detectors/bun_interlocking_coverage/fixtures/clean/interlocking_production_runner/e2e/smoke/resolve-match.smoke.test.ts +13 -0
- package/detectors/bun_interlocking_coverage/fixtures/clean/interlocking_production_runner/plan/_trains/_interlockings/match-resolution.yaml +51 -0
- package/detectors/bun_interlocking_coverage/fixtures/clean/interlocking_route_coverage/e2e/interlockings/match-resolution/routes.test.ts +21 -0
- package/detectors/bun_interlocking_coverage/fixtures/clean/interlocking_route_coverage/e2e/interlockings/match-resolution/trace.test.ts +17 -0
- package/detectors/bun_interlocking_coverage/fixtures/clean/interlocking_route_coverage/e2e/smoke/resolve-match.smoke.test.ts +13 -0
- package/detectors/bun_interlocking_coverage/fixtures/clean/interlocking_route_coverage/plan/_trains/_interlockings/match-resolution.yaml +51 -0
- package/detectors/bun_interlocking_coverage/fixtures/clean/interlocking_smoke_coverage/e2e/interlockings/match-resolution/routes.test.ts +21 -0
- package/detectors/bun_interlocking_coverage/fixtures/clean/interlocking_smoke_coverage/e2e/interlockings/match-resolution/trace.test.ts +17 -0
- package/detectors/bun_interlocking_coverage/fixtures/clean/interlocking_smoke_coverage/e2e/smoke/resolve-match.smoke.test.ts +13 -0
- package/detectors/bun_interlocking_coverage/fixtures/clean/interlocking_smoke_coverage/plan/_trains/_interlockings/match-resolution.yaml +51 -0
- package/detectors/bun_interlocking_coverage/fixtures/clean/interlocking_smoke_coverage_module/e2e/interlockings/match-resolution/routes.test.ts +21 -0
- package/detectors/bun_interlocking_coverage/fixtures/clean/interlocking_smoke_coverage_module/e2e/interlockings/match-resolution/trace.test.ts +17 -0
- package/detectors/bun_interlocking_coverage/fixtures/clean/interlocking_smoke_coverage_module/e2e/smoke/resolve-match.smoke.test.ts +19 -0
- package/detectors/bun_interlocking_coverage/fixtures/clean/interlocking_smoke_coverage_module/plan/_trains/_interlockings/match-resolution.yaml +51 -0
- package/detectors/bun_interlocking_coverage/fixtures/clean/interlocking_trace_binds/e2e/interlockings/match-resolution/routes.test.ts +21 -0
- package/detectors/bun_interlocking_coverage/fixtures/clean/interlocking_trace_binds/e2e/interlockings/match-resolution/trace.test.ts +17 -0
- package/detectors/bun_interlocking_coverage/fixtures/clean/interlocking_trace_binds/e2e/smoke/resolve-match.smoke.test.ts +13 -0
- package/detectors/bun_interlocking_coverage/fixtures/clean/interlocking_trace_binds/plan/_trains/_interlockings/match-resolution.yaml +51 -0
- package/detectors/bun_interlocking_coverage/fixtures/dirty/interlocking_production_runner/e2e/interlockings/match-resolution/routes.test.ts +23 -0
- package/detectors/bun_interlocking_coverage/fixtures/dirty/interlocking_production_runner/e2e/interlockings/match-resolution/trace.test.ts +17 -0
- package/detectors/bun_interlocking_coverage/fixtures/dirty/interlocking_production_runner/e2e/smoke/resolve-match.smoke.test.ts +13 -0
- package/detectors/bun_interlocking_coverage/fixtures/dirty/interlocking_production_runner/plan/_trains/_interlockings/match-resolution.yaml +51 -0
- package/detectors/bun_interlocking_coverage/fixtures/dirty/interlocking_route_coverage/e2e/interlockings/match-resolution/routes.test.ts +12 -0
- package/detectors/bun_interlocking_coverage/fixtures/dirty/interlocking_route_coverage/e2e/interlockings/match-resolution/trace.test.ts +17 -0
- package/detectors/bun_interlocking_coverage/fixtures/dirty/interlocking_route_coverage/e2e/smoke/resolve-match.smoke.test.ts +13 -0
- package/detectors/bun_interlocking_coverage/fixtures/dirty/interlocking_route_coverage/plan/_trains/_interlockings/match-resolution.yaml +51 -0
- package/detectors/bun_interlocking_coverage/fixtures/dirty/interlocking_smoke_coverage/e2e/interlockings/match-resolution/routes.test.ts +21 -0
- package/detectors/bun_interlocking_coverage/fixtures/dirty/interlocking_smoke_coverage/e2e/interlockings/match-resolution/trace.test.ts +17 -0
- package/detectors/bun_interlocking_coverage/fixtures/dirty/interlocking_smoke_coverage/plan/_trains/_interlockings/match-resolution.yaml +51 -0
- package/detectors/bun_interlocking_coverage/fixtures/dirty/interlocking_trace_binds/e2e/interlockings/match-resolution/routes.test.ts +21 -0
- package/detectors/bun_interlocking_coverage/fixtures/dirty/interlocking_trace_binds/e2e/interlockings/match-resolution/trace.test.ts +13 -0
- package/detectors/bun_interlocking_coverage/fixtures/dirty/interlocking_trace_binds/e2e/smoke/resolve-match.smoke.test.ts +13 -0
- package/detectors/bun_interlocking_coverage/fixtures/dirty/interlocking_trace_binds/plan/_trains/_interlockings/match-resolution.yaml +51 -0
- package/detectors/bun_interlocking_coverage/fixtures/dirty/interlocking_train_sequence/e2e/interlockings/match-resolution/routes.test.ts +16 -0
- package/detectors/bun_interlocking_coverage/fixtures/dirty/interlocking_train_sequence/plan/_trains/_interlockings/match-resolution.yaml +51 -0
- package/detectors/bun_interlocking_coverage/fixtures/dirty/interlocking_train_sequence/plan/_trains/train:match:match-resolution-standard.yaml +8 -0
- package/detectors/bun_interlocking_coverage/fixtures/dirty/interlocking_train_sequence/plan/_trains/train:match:match-resolution-timeout.yaml +5 -0
- package/detectors/bun_interlocking_infrastructure/_shared/interlocking.mjs +477 -0
- package/detectors/bun_interlocking_infrastructure/atdd.implementation.yaml +32 -0
- package/detectors/bun_interlocking_infrastructure/checks/_map.json +10 -0
- package/detectors/bun_interlocking_infrastructure/checks/interlocking_delegates.mjs +70 -0
- package/detectors/bun_interlocking_infrastructure/checks/interlocking_no_cargo.mjs +62 -0
- package/detectors/bun_interlocking_infrastructure/checks/interlocking_resolution_model.mjs +64 -0
- package/detectors/bun_interlocking_infrastructure/checks/interlocking_runner_exists.mjs +73 -0
- package/detectors/bun_interlocking_infrastructure/checks/interlocking_station_routing.mjs +62 -0
- package/detectors/bun_interlocking_infrastructure/checks/journey_runner_boundary.mjs +153 -0
- package/detectors/bun_interlocking_infrastructure/checks/journey_station_routing.mjs +119 -0
- package/detectors/bun_interlocking_infrastructure/checks/wagon_contract_honoured.mjs +149 -0
- package/detectors/bun_interlocking_infrastructure/detect.mjs +46 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/clean/interlocking_delegates/server.ts +22 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/clean/interlocking_delegates/src/match/wagon.ts +6 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/clean/interlocking_delegates/src/trains/interlocking.ts +41 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/clean/interlocking_delegates/src/trains/runner.ts +28 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/clean/interlocking_no_cargo/server.ts +22 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/clean/interlocking_no_cargo/src/match/wagon.ts +6 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/clean/interlocking_no_cargo/src/trains/interlocking.ts +41 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/clean/interlocking_no_cargo/src/trains/runner.ts +28 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/clean/interlocking_resolution_model/server.ts +22 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/clean/interlocking_resolution_model/src/match/wagon.ts +6 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/clean/interlocking_resolution_model/src/trains/interlocking.ts +41 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/clean/interlocking_resolution_model/src/trains/runner.ts +28 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/clean/interlocking_runner_exists/server.ts +22 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/clean/interlocking_runner_exists/src/match/wagon.ts +6 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/clean/interlocking_runner_exists/src/trains/interlocking.ts +41 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/clean/interlocking_runner_exists/src/trains/runner.ts +28 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/clean/interlocking_station_routing/server.ts +22 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/clean/interlocking_station_routing/src/match/wagon.ts +6 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/clean/interlocking_station_routing/src/trains/interlocking.ts +41 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/clean/interlocking_station_routing/src/trains/runner.ts +28 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/clean/journey_runner_boundary/plan/_journeys/example.yaml +16 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/clean/journey_runner_boundary/src/trains/journey.ts +15 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/clean/journey_station_routing/plan/_journeys/public.yaml +16 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/clean/journey_station_routing/server.ts +13 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/clean/journey_station_routing/src/trains/journey.ts +14 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/clean/wagon_contract_honoured/plan/orders/_orders.yaml +17 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/clean/wagon_contract_honoured/src/orders/wagon.ts +15 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/dirty/interlocking_delegates/server.ts +22 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/dirty/interlocking_delegates/src/match/wagon.ts +6 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/dirty/interlocking_delegates/src/trains/interlocking.ts +49 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/dirty/interlocking_delegates/src/trains/runner.ts +28 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/dirty/interlocking_no_cargo/server.ts +22 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/dirty/interlocking_no_cargo/src/match/wagon.ts +11 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/dirty/interlocking_no_cargo/src/trains/interlocking.ts +42 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/dirty/interlocking_no_cargo/src/trains/runner.ts +28 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/dirty/interlocking_resolution_model/server.ts +22 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/dirty/interlocking_resolution_model/src/match/wagon.ts +6 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/dirty/interlocking_resolution_model/src/trains/interlocking.ts +21 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/dirty/interlocking_resolution_model/src/trains/runner.ts +28 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/dirty/interlocking_runner_exists/server.ts +22 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/dirty/interlocking_runner_exists/src/match/wagon.ts +6 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/dirty/interlocking_runner_exists/src/trains/interlocking.ts +16 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/dirty/interlocking_runner_exists/src/trains/runner.ts +28 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/dirty/interlocking_station_routing/server.ts +19 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/dirty/interlocking_station_routing/src/match/wagon.ts +6 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/dirty/interlocking_station_routing/src/trains/interlocking.ts +41 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/dirty/interlocking_station_routing/src/trains/runner.ts +28 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/dirty/journey_runner_boundary/plan/_journeys/example.yaml +16 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/dirty/journey_runner_boundary/src/trains/journey.ts +14 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/dirty/journey_station_routing/plan/_journeys/public.yaml +16 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/dirty/journey_station_routing/server.ts +10 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/dirty/journey_station_routing/src/trains/journey.ts +14 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/dirty/wagon_contract_honoured/plan/orders/_orders.yaml +17 -0
- package/detectors/bun_interlocking_infrastructure/fixtures/dirty/wagon_contract_honoured/src/orders/wagon.ts +13 -0
- package/detectors/bun_security_hygiene_detector/atdd.implementation.yaml +33 -0
- package/detectors/bun_security_hygiene_detector/checks/_map.json +9 -0
- package/detectors/bun_security_hygiene_detector/checks/err_bare_string.mjs +38 -0
- package/detectors/bun_security_hygiene_detector/checks/err_code_format.mjs +36 -0
- package/detectors/bun_security_hygiene_detector/checks/log_console.mjs +33 -0
- package/detectors/bun_security_hygiene_detector/checks/log_structured.mjs +36 -0
- package/detectors/bun_security_hygiene_detector/checks/sec_hardcoded_secret.mjs +43 -0
- package/detectors/bun_security_hygiene_detector/checks/sec_missing_auth.mjs +63 -0
- package/detectors/bun_security_hygiene_detector/checks/sec_sql_injection.mjs +56 -0
- package/detectors/bun_security_hygiene_detector/detect.mjs +46 -0
- package/detectors/bun_security_hygiene_detector/fixtures/clean/server.ts +24 -0
- package/detectors/bun_security_hygiene_detector/fixtures/dirty/db.ts +6 -0
- package/detectors/bun_security_hygiene_detector/fixtures/dirty/errors.ts +6 -0
- package/detectors/bun_security_hygiene_detector/fixtures/dirty/logging.ts +4 -0
- package/detectors/bun_security_hygiene_detector/fixtures/dirty/routes.ts +10 -0
- package/detectors/bun_security_hygiene_detector/fixtures/dirty/secrets.ts +3 -0
- package/detectors/bun_tester_discipline_detector/atdd.implementation.yaml +46 -0
- package/detectors/bun_tester_discipline_detector/checks/_map.json +18 -0
- package/detectors/bun_tester_discipline_detector/checks/t_acceptance_binding.mjs +19 -0
- package/detectors/bun_tester_discipline_detector/checks/t_acceptance_covers_tag.mjs +25 -0
- package/detectors/bun_tester_discipline_detector/checks/t_acceptance_resolves.mjs +106 -0
- package/detectors/bun_tester_discipline_detector/checks/t_isolation_no_live_state.mjs +40 -0
- package/detectors/bun_tester_discipline_detector/checks/t_red_behavioral.mjs +35 -0
- package/detectors/bun_tester_discipline_detector/checks/t_red_fails_first.mjs +30 -0
- package/detectors/bun_tester_discipline_detector/checks/t_routing_runtime.mjs +22 -0
- package/detectors/bun_tester_discipline_detector/checks/t_security_auth.mjs +26 -0
- package/detectors/bun_tester_discipline_detector/checks/t_security_input.mjs +25 -0
- package/detectors/bun_tester_discipline_detector/checks/t_smoke_no_substitution.mjs +25 -0
- package/detectors/bun_tester_discipline_detector/checks/t_smoke_observable.mjs +28 -0
- package/detectors/bun_tester_discipline_detector/checks/t_telemetry_emit.mjs +27 -0
- package/detectors/bun_tester_discipline_detector/checks/t_test_imports_bun_test.mjs +31 -0
- package/detectors/bun_tester_discipline_detector/checks/t_test_no_self_skip.mjs +34 -0
- package/detectors/bun_tester_discipline_detector/checks/t_test_phase_declared.mjs +21 -0
- package/detectors/bun_tester_discipline_detector/checks/t_urn_identity.mjs +18 -0
- package/detectors/bun_tester_discipline_detector/detect.mjs +46 -0
- package/detectors/bun_tester_discipline_detector/fixtures/clean/audit.sec.test.ts +15 -0
- package/detectors/bun_tester_discipline_detector/fixtures/clean/checkout.red.test.ts +16 -0
- package/detectors/bun_tester_discipline_detector/fixtures/clean/emit.telemetry.test.ts +15 -0
- package/detectors/bun_tester_discipline_detector/fixtures/clean/marked.red.test.ts +14 -0
- package/detectors/bun_tester_discipline_detector/fixtures/clean/orders.smoke.test.ts +16 -0
- package/detectors/bun_tester_discipline_detector/fixtures/clean/payload.input.test.ts +13 -0
- package/detectors/bun_tester_discipline_detector/fixtures/clean/plan/orders/E001.yaml +9 -0
- package/detectors/bun_tester_discipline_detector/fixtures/clean/plan/orders/E002.yaml +9 -0
- package/detectors/bun_tester_discipline_detector/fixtures/clean/plan/orders/E020.yaml +9 -0
- package/detectors/bun_tester_discipline_detector/fixtures/clean/plan/orders/E021.yaml +9 -0
- package/detectors/bun_tester_discipline_detector/fixtures/clean/plan/orders/E022.yaml +9 -0
- package/detectors/bun_tester_discipline_detector/fixtures/clean/plan/orders/E023.yaml +9 -0
- package/detectors/bun_tester_discipline_detector/fixtures/dirty/badcovers.test.ts +7 -0
- package/detectors/bun_tester_discipline_detector/fixtures/dirty/badphase.test.ts +6 -0
- package/detectors/bun_tester_discipline_detector/fixtures/dirty/foreign_harness.test.ts +6 -0
- package/detectors/bun_tester_discipline_detector/fixtures/dirty/happy.auth.test.ts +9 -0
- package/detectors/bun_tester_discipline_detector/fixtures/dirty/happy.input.test.ts +9 -0
- package/detectors/bun_tester_discipline_detector/fixtures/dirty/internal.smoke.test.ts +10 -0
- package/detectors/bun_tester_discipline_detector/fixtures/dirty/no_header.test.ts +2 -0
- package/detectors/bun_tester_discipline_detector/fixtures/dirty/plan/orders/E004.yaml +9 -0
- package/detectors/bun_tester_discipline_detector/fixtures/dirty/plan/orders/E005.yaml +9 -0
- package/detectors/bun_tester_discipline_detector/fixtures/dirty/plan/orders/E006.yaml +9 -0
- package/detectors/bun_tester_discipline_detector/fixtures/dirty/plan/orders/E007.yaml +9 -0
- package/detectors/bun_tester_discipline_detector/fixtures/dirty/plan/orders/E008.yaml +9 -0
- package/detectors/bun_tester_discipline_detector/fixtures/dirty/plan/orders/E009.yaml +9 -0
- package/detectors/bun_tester_discipline_detector/fixtures/dirty/plan/orders/E010.yaml +9 -0
- package/detectors/bun_tester_discipline_detector/fixtures/dirty/plan/orders/E024.yaml +9 -0
- package/detectors/bun_tester_discipline_detector/fixtures/dirty/plan/orders/E025.yaml +9 -0
- package/detectors/bun_tester_discipline_detector/fixtures/dirty/plan/orders/E026.yaml +9 -0
- package/detectors/bun_tester_discipline_detector/fixtures/dirty/plan/orders/E027.yaml +9 -0
- package/detectors/bun_tester_discipline_detector/fixtures/dirty/plan/orders/E028.yaml +9 -0
- package/detectors/bun_tester_discipline_detector/fixtures/dirty/plan/orders/E030.yaml +9 -0
- package/detectors/bun_tester_discipline_detector/fixtures/dirty/polluting.test.ts +11 -0
- package/detectors/bun_tester_discipline_detector/fixtures/dirty/quiet.telemetry.test.ts +9 -0
- package/detectors/bun_tester_discipline_detector/fixtures/dirty/skipped.test.ts +6 -0
- package/detectors/bun_tester_discipline_detector/fixtures/dirty/substituted.smoke.test.ts +13 -0
- package/detectors/bun_tester_discipline_detector/fixtures/dirty/unbound.test.ts +5 -0
- package/detectors/bun_tester_discipline_detector/fixtures/dirty/unmarked.red.test.ts +7 -0
- package/detectors/bun_tester_discipline_detector/fixtures/dirty/unresolvable_binding.test.ts +17 -0
- package/detectors/bun_tester_discipline_detector/fixtures/dirty/vacuous.red.test.ts +7 -0
- package/detectors/bun_tester_discipline_detector/fixtures/dirty/wrongruntime.test.ts +7 -0
- package/detectors/bun_tester_discipline_detector/test_header.mjs +160 -0
- package/detectors/bun_ts_metrics_detector/atdd.implementation.yaml +34 -0
- package/detectors/bun_ts_metrics_detector/checks/_map.json +9 -0
- package/detectors/bun_ts_metrics_detector/checks/ts_complexity_cyclomatic.mjs +36 -0
- package/detectors/bun_ts_metrics_detector/checks/ts_complexity_length.mjs +36 -0
- package/detectors/bun_ts_metrics_detector/checks/ts_complexity_nesting.mjs +36 -0
- package/detectors/bun_ts_metrics_detector/checks/ts_dead_code.mjs +58 -0
- package/detectors/bun_ts_metrics_detector/checks/ts_duplication.mjs +70 -0
- package/detectors/bun_ts_metrics_detector/checks/ts_quality_comments.mjs +30 -0
- package/detectors/bun_ts_metrics_detector/checks/ts_quality_mi.mjs +30 -0
- package/detectors/bun_ts_metrics_detector/detect.mjs +46 -0
- package/detectors/bun_ts_metrics_detector/fixtures/clean/domain/label.ts +6 -0
- package/detectors/bun_ts_metrics_detector/fixtures/clean/domain/total.ts +8 -0
- package/detectors/bun_ts_metrics_detector/fixtures/clean/index.ts +7 -0
- package/detectors/bun_ts_metrics_detector/fixtures/dirty/bare.ts +2 -0
- package/detectors/bun_ts_metrics_detector/fixtures/dirty/big.ts +600 -0
- package/detectors/bun_ts_metrics_detector/fixtures/dirty/consumer.ts +2 -0
- package/detectors/bun_ts_metrics_detector/fixtures/dirty/domain/a.ts +9 -0
- package/detectors/bun_ts_metrics_detector/fixtures/dirty/domain/b.ts +9 -0
- package/detectors/bun_ts_metrics_detector/fixtures/dirty/gnarly.ts +22 -0
- package/detectors/bun_ts_metrics_detector/fixtures/dirty/index.ts +8 -0
- package/detectors/bun_ts_metrics_detector/fixtures/dirty/long.ts +64 -0
- package/detectors/bun_ts_metrics_detector/fixtures/dirty/orphan.ts +1 -0
- package/detectors/bun_ts_metrics_detector/fixtures/dirty/typed.ts +1 -0
- package/detectors/bun_ts_metrics_detector/ts_metrics.mjs +310 -0
- package/detectors/htmx_hypermedia_detector/atdd.implementation.yaml +28 -0
- package/detectors/htmx_hypermedia_detector/checks/_map.json +9 -0
- package/detectors/htmx_hypermedia_detector/checks/htmx_fragment_escapes_interpolation.mjs +66 -0
- package/detectors/htmx_hypermedia_detector/checks/htmx_swap_no_inline_handler.mjs +40 -0
- package/detectors/htmx_hypermedia_detector/checks/htmx_swap_oob_carries_id.mjs +37 -0
- package/detectors/htmx_hypermedia_detector/checks/htmx_verb_destructive_confirms.mjs +36 -0
- package/detectors/htmx_hypermedia_detector/checks/htmx_verb_endpoint_is_routed.mjs +133 -0
- package/detectors/htmx_hypermedia_detector/checks/htmx_verb_endpoint_same_origin.mjs +33 -0
- package/detectors/htmx_hypermedia_detector/checks/htmx_verb_mutation_signals_progress.mjs +43 -0
- package/detectors/htmx_hypermedia_detector/detect.mjs +46 -0
- package/detectors/htmx_hypermedia_detector/fixtures/clean/htmx_fragment_escapes_interpolation/render.ts +6 -0
- package/detectors/htmx_hypermedia_detector/fixtures/clean/htmx_swap_no_inline_handler/row.html +1 -0
- package/detectors/htmx_hypermedia_detector/fixtures/clean/htmx_swap_oob_carries_id/fragment.html +1 -0
- package/detectors/htmx_hypermedia_detector/fixtures/clean/htmx_verb_destructive_confirms/delete.html +1 -0
- package/detectors/htmx_hypermedia_detector/fixtures/clean/htmx_verb_endpoint_is_routed/server.ts +10 -0
- package/detectors/htmx_hypermedia_detector/fixtures/clean/htmx_verb_endpoint_is_routed/src/OrderRow.ts +7 -0
- package/detectors/htmx_hypermedia_detector/fixtures/clean/htmx_verb_endpoint_same_origin/panel.html +3 -0
- package/detectors/htmx_hypermedia_detector/fixtures/clean/htmx_verb_mutation_signals_progress/form.html +4 -0
- package/detectors/htmx_hypermedia_detector/fixtures/dirty/htmx_fragment_escapes_interpolation/render.ts +3 -0
- package/detectors/htmx_hypermedia_detector/fixtures/dirty/htmx_swap_no_inline_handler/row.html +1 -0
- package/detectors/htmx_hypermedia_detector/fixtures/dirty/htmx_swap_oob_carries_id/fragment.html +1 -0
- package/detectors/htmx_hypermedia_detector/fixtures/dirty/htmx_verb_destructive_confirms/delete.html +1 -0
- package/detectors/htmx_hypermedia_detector/fixtures/dirty/htmx_verb_endpoint_is_routed/server.ts +10 -0
- package/detectors/htmx_hypermedia_detector/fixtures/dirty/htmx_verb_endpoint_is_routed/src/OrderRow.ts +9 -0
- package/detectors/htmx_hypermedia_detector/fixtures/dirty/htmx_verb_endpoint_same_origin/panel.html +3 -0
- package/detectors/htmx_hypermedia_detector/fixtures/dirty/htmx_verb_mutation_signals_progress/form.html +3 -0
- package/detectors/htmx_tester_detector/atdd.implementation.yaml +21 -0
- package/detectors/htmx_tester_detector/checks/_map.json +5 -0
- package/detectors/htmx_tester_detector/checks/t_fragment_asserts_returned_markup.mjs +40 -0
- package/detectors/htmx_tester_detector/checks/t_swap_oob_asserts_destination_id.mjs +38 -0
- package/detectors/htmx_tester_detector/checks/t_verb_endpoint_coverage.mjs +59 -0
- package/detectors/htmx_tester_detector/detect.mjs +46 -0
- package/detectors/htmx_tester_detector/fixtures/clean/orders.test.ts +23 -0
- package/detectors/htmx_tester_detector/fixtures/clean/panel.html +7 -0
- package/detectors/htmx_tester_detector/fixtures/dirty/orders.test.ts +20 -0
- package/detectors/htmx_tester_detector/fixtures/dirty/panel.html +7 -0
- package/detectors/htmx_tester_detector/fixtures/dirty/statusonly.test.ts +9 -0
- package/detectors/htmx_tester_detector/test_header.mjs +4 -0
- package/detectors/planner_docs_capability/README.md +34 -0
- package/detectors/planner_docs_capability/atdd.implementation.yaml +57 -0
- package/detectors/planner_docs_capability/detect.mjs +10 -0
- package/detectors/planner_docs_capability/fixtures/clean/docs/architecture/decisions/adr-20260906-001-shared-control-root.adoc +8 -0
- package/detectors/planner_docs_capability/fixtures/clean/docs/architecture/decisions/index.adoc +7 -0
- package/detectors/planner_docs_capability/fixtures/clean/docs/architecture/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/clean/docs/architecture/shared-control-root.adoc +8 -0
- package/detectors/planner_docs_capability/fixtures/clean/docs/architecture/state-store.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/clean/docs/archive/2025-control-root.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/clean/docs/archive/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/clean/docs/delivery/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/clean/docs/dist/index.md +1 -0
- package/detectors/planner_docs_capability/fixtures/clean/docs/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/clean/docs/purpose/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/clean/docs/purpose/worktrees.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty/docs/architecture/decisions/adr-20260906-001-shared-control-root.adoc +8 -0
- package/detectors/planner_docs_capability/fixtures/dirty/docs/architecture/decisions/index.adoc +7 -0
- package/detectors/planner_docs_capability/fixtures/dirty/docs/architecture/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty/docs/architecture/notes.md +3 -0
- package/detectors/planner_docs_capability/fixtures/dirty/docs/architecture/shared-control-root.adoc +8 -0
- package/detectors/planner_docs_capability/fixtures/dirty/docs/architecture/state-store.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty/docs/archive/2025-control-root.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty/docs/archive/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty/docs/delivery/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty/docs/dist/index.md +1 -0
- package/detectors/planner_docs_capability/fixtures/dirty/docs/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty/docs/purpose/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty/docs/purpose/worktrees.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_adr_registry/docs/architecture/decisions/adr-20260906-001-shared-control-root.adoc +8 -0
- package/detectors/planner_docs_capability/fixtures/dirty_adr_registry/docs/architecture/decisions/adr-20260906-002-documentation-system.adoc +8 -0
- package/detectors/planner_docs_capability/fixtures/dirty_adr_registry/docs/architecture/decisions/index.adoc +7 -0
- package/detectors/planner_docs_capability/fixtures/dirty_adr_registry/docs/architecture/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_adr_registry/docs/architecture/shared-control-root.adoc +8 -0
- package/detectors/planner_docs_capability/fixtures/dirty_adr_registry/docs/architecture/state-store.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_adr_registry/docs/archive/2025-control-root.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_adr_registry/docs/archive/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_adr_registry/docs/delivery/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_adr_registry/docs/dist/index.md +1 -0
- package/detectors/planner_docs_capability/fixtures/dirty_adr_registry/docs/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_adr_registry/docs/purpose/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_adr_registry/docs/purpose/worktrees.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_duplicate_id/docs/architecture/decisions/adr-20260906-001-shared-control-root.adoc +8 -0
- package/detectors/planner_docs_capability/fixtures/dirty_duplicate_id/docs/architecture/decisions/index.adoc +7 -0
- package/detectors/planner_docs_capability/fixtures/dirty_duplicate_id/docs/architecture/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_duplicate_id/docs/architecture/shared-control-root.adoc +8 -0
- package/detectors/planner_docs_capability/fixtures/dirty_duplicate_id/docs/architecture/state-store.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_duplicate_id/docs/archive/2025-control-root.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_duplicate_id/docs/archive/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_duplicate_id/docs/delivery/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_duplicate_id/docs/delivery/worktrees.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_duplicate_id/docs/dist/index.md +1 -0
- package/detectors/planner_docs_capability/fixtures/dirty_duplicate_id/docs/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_duplicate_id/docs/purpose/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_duplicate_id/docs/purpose/worktrees.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_identity/docs/architecture/decisions/adr-20260906-001-shared-control-root.adoc +8 -0
- package/detectors/planner_docs_capability/fixtures/dirty_identity/docs/architecture/decisions/index.adoc +7 -0
- package/detectors/planner_docs_capability/fixtures/dirty_identity/docs/architecture/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_identity/docs/architecture/shared-control-root.adoc +8 -0
- package/detectors/planner_docs_capability/fixtures/dirty_identity/docs/architecture/state-store.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_identity/docs/archive/2025-control-root.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_identity/docs/archive/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_identity/docs/delivery/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_identity/docs/delivery/release.adoc +3 -0
- package/detectors/planner_docs_capability/fixtures/dirty_identity/docs/dist/index.md +1 -0
- package/detectors/planner_docs_capability/fixtures/dirty_identity/docs/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_identity/docs/purpose/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_identity/docs/purpose/worktrees.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_markdown/docs/architecture/decisions/adr-20260906-001-shared-control-root.adoc +8 -0
- package/detectors/planner_docs_capability/fixtures/dirty_markdown/docs/architecture/decisions/index.adoc +7 -0
- package/detectors/planner_docs_capability/fixtures/dirty_markdown/docs/architecture/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_markdown/docs/architecture/notes.md +3 -0
- package/detectors/planner_docs_capability/fixtures/dirty_markdown/docs/architecture/shared-control-root.adoc +8 -0
- package/detectors/planner_docs_capability/fixtures/dirty_markdown/docs/architecture/state-store.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_markdown/docs/archive/2025-control-root.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_markdown/docs/archive/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_markdown/docs/delivery/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_markdown/docs/dist/index.md +1 -0
- package/detectors/planner_docs_capability/fixtures/dirty_markdown/docs/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_markdown/docs/purpose/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_markdown/docs/purpose/worktrees.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_missing_index/docs/architecture/decisions/adr-20260906-001-shared-control-root.adoc +8 -0
- package/detectors/planner_docs_capability/fixtures/dirty_missing_index/docs/architecture/decisions/index.adoc +7 -0
- package/detectors/planner_docs_capability/fixtures/dirty_missing_index/docs/architecture/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_missing_index/docs/architecture/shared-control-root.adoc +8 -0
- package/detectors/planner_docs_capability/fixtures/dirty_missing_index/docs/architecture/state-store.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_missing_index/docs/archive/2025-control-root.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_missing_index/docs/archive/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_missing_index/docs/delivery/release.adoc +10 -0
- package/detectors/planner_docs_capability/fixtures/dirty_missing_index/docs/dist/index.md +1 -0
- package/detectors/planner_docs_capability/fixtures/dirty_missing_index/docs/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_missing_index/docs/purpose/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_missing_index/docs/purpose/worktrees.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_unresolved_edge/docs/architecture/decisions/adr-20260906-001-shared-control-root.adoc +8 -0
- package/detectors/planner_docs_capability/fixtures/dirty_unresolved_edge/docs/architecture/decisions/index.adoc +7 -0
- package/detectors/planner_docs_capability/fixtures/dirty_unresolved_edge/docs/architecture/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_unresolved_edge/docs/architecture/shared-control-root.adoc +8 -0
- package/detectors/planner_docs_capability/fixtures/dirty_unresolved_edge/docs/architecture/state-store.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_unresolved_edge/docs/archive/2025-control-root.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_unresolved_edge/docs/archive/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_unresolved_edge/docs/delivery/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_unresolved_edge/docs/dist/index.md +1 -0
- package/detectors/planner_docs_capability/fixtures/dirty_unresolved_edge/docs/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_unresolved_edge/docs/purpose/index.adoc +5 -0
- package/detectors/planner_docs_capability/fixtures/dirty_unresolved_edge/docs/purpose/worktrees.adoc +5 -0
- package/detectors/planner_plan_integrity/atdd.implementation.yaml +18 -0
- package/detectors/planner_plan_integrity/detect.mjs +23 -0
- package/detectors/planner_plan_integrity/fixtures/clean/README.md +1 -0
- package/detectors/planner_plan_integrity/fixtures/dirty/plan/broken.yaml +1 -0
- package/detectors/planner_schema_validation/atdd.implementation.yaml +20 -0
- package/detectors/planner_schema_validation/detect.mjs +9 -0
- package/detectors/planner_schema_validation/fixtures/clean/contracts/_contracts.yaml +6 -0
- package/detectors/planner_schema_validation/fixtures/clean/contracts/orders/placed.schema.json +4 -0
- package/detectors/planner_schema_validation/fixtures/clean/plan/_themes.yaml +3 -0
- package/detectors/planner_schema_validation/fixtures/clean/plan/_trains/orders.yaml +11 -0
- package/detectors/planner_schema_validation/fixtures/clean/plan/orders/_orders.yaml +16 -0
- package/detectors/planner_schema_validation/fixtures/dirty/contracts/_contracts.yaml +3 -0
- package/detectors/planner_schema_validation/fixtures/dirty/plan/_themes.yaml +2 -0
- package/detectors/planner_schema_validation/fixtures/dirty/plan/_trains/orders.yaml +11 -0
- package/detectors/planner_static_validators/atdd.implementation.yaml +36 -0
- package/detectors/planner_static_validators/detect.mjs +9 -0
- package/detectors/planner_static_validators/fixtures/clean/contracts/_contracts.yaml +6 -0
- package/detectors/planner_static_validators/fixtures/clean/contracts/orders/placed.schema.json +4 -0
- package/detectors/planner_static_validators/fixtures/clean/plan/_themes.yaml +3 -0
- package/detectors/planner_static_validators/fixtures/clean/plan/orders/E001.yaml +10 -0
- package/detectors/planner_static_validators/fixtures/clean/plan/orders/_orders.yaml +19 -0
- package/detectors/planner_static_validators/fixtures/clean/plan/orders/features/place-order.yaml +4 -0
- package/detectors/planner_static_validators/fixtures/dirty/plan/_journeys/broken.yaml +22 -0
- package/detectors/planner_static_validators/fixtures/dirty/plan/_themes.yaml +3 -0
- package/detectors/planner_static_validators/fixtures/dirty/plan/_trains/_interlockings/journey-a.yaml +4 -0
- package/detectors/planner_static_validators/fixtures/dirty/plan/_trains/journey-a.yaml +7 -0
- package/detectors/planner_static_validators/fixtures/dirty/plan/_trains/probe/legacy.yaml +3 -0
- package/detectors/planner_static_validators/fixtures/dirty/plan/_trains/probe/orphan.yaml +3 -0
- package/detectors/planner_static_validators/fixtures/dirty/plan/_trains.yaml +5 -0
- package/detectors/planner_static_validators/fixtures/dirty/plan/also_dup/_also_dup.yaml +15 -0
- package/detectors/planner_static_validators/fixtures/dirty/plan/dup/E001.yaml +3 -0
- package/detectors/planner_static_validators/fixtures/dirty/plan/dup/_dup.yaml +27 -0
- package/detectors/planner_static_validators/fixtures/dirty/plan/dup/features/bad.yaml +2 -0
- package/lib/imports.mjs +83 -0
- package/lib/scan.mjs +246 -0
- package/package.json +35 -0
- package/planner-nodes/ENFORCEMENT_SCOPE.yaml +117 -0
- package/planner-nodes/nodes/planner.acceptance.abstract-fields-required.convention.yaml +44 -0
- package/planner-nodes/nodes/planner.acceptance.authoring-guidelines.convention.yaml +29 -0
- package/planner-nodes/nodes/planner.acceptance.boundary-kind-vocabulary.convention.yaml +38 -0
- package/planner-nodes/nodes/planner.acceptance.execution-kind.convention.yaml +30 -0
- package/planner-nodes/nodes/planner.acceptance.extraction-no-inference.convention.yaml +23 -0
- package/planner-nodes/nodes/planner.acceptance.generator-prompts.convention.yaml +34 -0
- package/planner-nodes/nodes/planner.acceptance.given-when-then-structure.convention.yaml +53 -0
- package/planner-nodes/nodes/planner.acceptance.harness-vocabulary.convention.yaml +99 -0
- package/planner-nodes/nodes/planner.acceptance.harness.convention.yaml +36 -0
- package/planner-nodes/nodes/planner.acceptance.hermetic-fake-contract.convention.yaml +35 -0
- package/planner-nodes/nodes/planner.acceptance.id-pattern.convention.yaml +34 -0
- package/planner-nodes/nodes/planner.acceptance.max-per-wmbt.convention.yaml +29 -0
- package/planner-nodes/nodes/planner.acceptance.plane-keywords.convention.yaml +87 -0
- package/planner-nodes/nodes/planner.acceptance.route-construction.convention.yaml +55 -0
- package/planner-nodes/nodes/planner.acceptance.signal-telemetry-naming.convention.yaml +61 -0
- package/planner-nodes/nodes/planner.acceptance.urn-generation.convention.yaml +39 -0
- package/planner-nodes/nodes/planner.acceptance.well-formed.convention.yaml +57 -0
- package/planner-nodes/nodes/planner.appendix.llm-guidelines.convention.yaml +81 -0
- package/planner-nodes/nodes/planner.appendix.naming-pattern.convention.yaml +45 -0
- package/planner-nodes/nodes/planner.appendix.storage.convention.yaml +44 -0
- package/planner-nodes/nodes/planner.appendix.structure.convention.yaml +17 -0
- package/planner-nodes/nodes/planner.appendix.types.convention.yaml +123 -0
- package/planner-nodes/nodes/planner.artifact-naming.anti-patterns.convention.yaml +31 -0
- package/planner-nodes/nodes/planner.artifact-naming.cardinality-from-aspect.convention.yaml +32 -0
- package/planner-nodes/nodes/planner.artifact-naming.colon-for-hierarchy.convention.yaml +25 -0
- package/planner-nodes/nodes/planner.artifact-naming.contract-file-mapping.convention.yaml +26 -0
- package/planner-nodes/nodes/planner.artifact-naming.depth-guidelines.convention.yaml +27 -0
- package/planner-nodes/nodes/planner.artifact-naming.dot-for-variant.convention.yaml +25 -0
- package/planner-nodes/nodes/planner.artifact-naming.logical-physical-mapping.convention.yaml +36 -0
- package/planner-nodes/nodes/planner.artifact-naming.migration-guide.convention.yaml +29 -0
- package/planner-nodes/nodes/planner.artifact-naming.naming-pattern.convention.yaml +44 -0
- package/planner-nodes/nodes/planner.artifact-naming.path-mirrors-identity.convention.yaml +40 -0
- package/planner-nodes/nodes/planner.artifact-naming.planner-artifacts-use-stable.convention.yaml +28 -0
- package/planner-nodes/nodes/planner.artifact-naming.pluralization.convention.yaml +27 -0
- package/planner-nodes/nodes/planner.artifact-naming.schema-identifier.convention.yaml +31 -0
- package/planner-nodes/nodes/planner.artifact-naming.separator-semantics.convention.yaml +42 -0
- package/planner-nodes/nodes/planner.artifact-naming.theme-first-identity.convention.yaml +39 -0
- package/planner-nodes/nodes/planner.artifact-naming.urn-structure.convention.yaml +26 -0
- package/planner-nodes/nodes/planner.artifact-naming.validation-rules.convention.yaml +33 -0
- package/planner-nodes/nodes/planner.artifact-naming.verb-object-corpus-drift.convention.yaml +49 -0
- package/planner-nodes/nodes/planner.artifact.definition.convention.yaml +30 -0
- package/planner-nodes/nodes/planner.component.artifact-derivation.convention.yaml +139 -0
- package/planner-nodes/nodes/planner.component.business-focus.convention.yaml +65 -0
- package/planner-nodes/nodes/planner.component.count-limit.convention.yaml +64 -0
- package/planner-nodes/nodes/planner.component.derivation.convention.yaml +117 -0
- package/planner-nodes/nodes/planner.component.io-alignment.convention.yaml +65 -0
- package/planner-nodes/nodes/planner.component.layer-assignment.convention.yaml +83 -0
- package/planner-nodes/nodes/planner.component.layer-consistency.convention.yaml +91 -0
- package/planner-nodes/nodes/planner.component.method-limit.convention.yaml +35 -0
- package/planner-nodes/nodes/planner.component.structure.convention.yaml +77 -0
- package/planner-nodes/nodes/planner.component.type-catalog.convention.yaml +436 -0
- package/planner-nodes/nodes/planner.component.urn.convention.yaml +86 -0
- package/planner-nodes/nodes/planner.contract.registry-coherence.convention.yaml +36 -0
- package/planner-nodes/nodes/planner.convention.remedy-must-be-followable.convention.yaml +92 -0
- package/planner-nodes/nodes/planner.coverage.bidirectional-coverage-between-trains.convention.yaml +33 -0
- package/planner-nodes/nodes/planner.coverage.bidirectional-coverage-between-wagons.convention.yaml +33 -0
- package/planner-nodes/nodes/planner.coverage.coverage-graph.convention.yaml +31 -0
- package/planner-nodes/nodes/planner.coverage.every-wmbt-must-be.convention.yaml +29 -0
- package/planner-nodes/nodes/planner.coverage.every-wmbt-must-have.convention.yaml +33 -0
- package/planner-nodes/nodes/planner.coverage.exception-handling.convention.yaml +32 -0
- package/planner-nodes/nodes/planner.criteria.defaults.convention.yaml +30 -0
- package/planner-nodes/nodes/planner.criteria.harness-templates.convention.yaml +159 -0
- package/planner-nodes/nodes/planner.criteria.metric-mapping.convention.yaml +136 -0
- package/planner-nodes/nodes/planner.criteria.plane-keywords.convention.yaml +53 -0
- package/planner-nodes/nodes/planner.criteria.sequence-routing.convention.yaml +26 -0
- package/planner-nodes/nodes/planner.criteria.shape.convention.yaml +27 -0
- package/planner-nodes/nodes/planner.decomposition.canonical-steps.convention.yaml +14 -0
- package/planner-nodes/nodes/planner.decomposition.document-trouble-obligation.convention.yaml +12 -0
- package/planner-nodes/nodes/planner.decomposition.domain-vs-technology.convention.yaml +13 -0
- package/planner-nodes/nodes/planner.decomposition.jtbd-vs-odi-grammar.convention.yaml +18 -0
- package/planner-nodes/nodes/planner.decomposition.keep-pivot-kill.convention.yaml +23 -0
- package/planner-nodes/nodes/planner.decomposition.local-scope.convention.yaml +15 -0
- package/planner-nodes/nodes/planner.decomposition.natural-language-normalization.convention.yaml +12 -0
- package/planner-nodes/nodes/planner.decomposition.train-journey.convention.yaml +13 -0
- package/planner-nodes/nodes/planner.decomposition.wagon-rationale.convention.yaml +12 -0
- package/planner-nodes/nodes/planner.definition.anchor-required.convention.yaml +34 -0
- package/planner-nodes/nodes/planner.feature.artifact-seeded-naming.convention.yaml +30 -0
- package/planner-nodes/nodes/planner.feature.definition.convention.yaml +27 -0
- package/planner-nodes/nodes/planner.feature.estimation.convention.yaml +29 -0
- package/planner-nodes/nodes/planner.feature.feedback-loop-close-the-loop.convention.yaml +33 -0
- package/planner-nodes/nodes/planner.feature.feedback-loop-kind.convention.yaml +30 -0
- package/planner-nodes/nodes/planner.feature.feedback-loop-suppression.convention.yaml +23 -0
- package/planner-nodes/nodes/planner.feature.footprint-scoring.convention.yaml +119 -0
- package/planner-nodes/nodes/planner.feature.grouping-strategy.convention.yaml +37 -0
- package/planner-nodes/nodes/planner.feature.hard-limits.convention.yaml +29 -0
- package/planner-nodes/nodes/planner.feature.name-is-verb-object.convention.yaml +40 -0
- package/planner-nodes/nodes/planner.feature.shape.convention.yaml +27 -0
- package/planner-nodes/nodes/planner.feature.size-max-rule.convention.yaml +41 -0
- package/planner-nodes/nodes/planner.feature.urn-naming.convention.yaml +29 -0
- package/planner-nodes/nodes/planner.feature.validation-rules.convention.yaml +28 -0
- package/planner-nodes/nodes/planner.feature.verb-selection-by-artifact-type.convention.yaml +264 -0
- package/planner-nodes/nodes/planner.feature.wagon-link.convention.yaml +27 -0
- package/planner-nodes/nodes/planner.interface.api-mapping.convention.yaml +70 -0
- package/planner-nodes/nodes/planner.interface.artifact-transformation.convention.yaml +103 -0
- package/planner-nodes/nodes/planner.interface.contract-urn.convention.yaml +119 -0
- package/planner-nodes/nodes/planner.interface.naming-patterns.convention.yaml +73 -0
- package/planner-nodes/nodes/planner.interface.orphan-detection.convention.yaml +46 -0
- package/planner-nodes/nodes/planner.interface.ownership-rules.convention.yaml +54 -0
- package/planner-nodes/nodes/planner.interface.structure-rules.convention.yaml +112 -0
- package/planner-nodes/nodes/planner.interface.tests-subdirectory.convention.yaml +61 -0
- package/planner-nodes/nodes/planner.interlocking.definition.convention.yaml +36 -0
- package/planner-nodes/nodes/planner.interlocking.registry-mirrors-document.convention.yaml +38 -0
- package/planner-nodes/nodes/planner.issue-body.dependency-entries-must-be-classified.convention.yaml +21 -0
- package/planner-nodes/nodes/planner.issue-body.graph-context-required.convention.yaml +21 -0
- package/planner-nodes/nodes/planner.journey.continuation-closure.convention.yaml +51 -0
- package/planner-nodes/nodes/planner.journey.definition.convention.yaml +39 -0
- package/planner-nodes/nodes/planner.plan.confirm-before-author.convention.yaml +28 -0
- package/planner-nodes/nodes/planner.plan.confirm-binds-an-issue.convention.yaml +39 -0
- package/planner-nodes/nodes/planner.plan.confirm-requires-interlocking-sanity.convention.yaml +30 -0
- package/planner-nodes/nodes/planner.plan.granularity-completeness.convention.yaml +38 -0
- package/planner-nodes/nodes/planner.plan.session-lifecycle.convention.yaml +23 -0
- package/planner-nodes/nodes/planner.plan.spec-is-schema-valid.convention.yaml +61 -0
- package/planner-nodes/nodes/planner.relationship.no-orphan-nodes.convention.yaml +32 -0
- package/planner-nodes/nodes/planner.smoke.feedback-loop-close-the-loop.convention.yaml +39 -0
- package/planner-nodes/nodes/planner.smoke.synthetic-fixture-bypass.convention.yaml +44 -0
- package/planner-nodes/nodes/planner.steps.architecture-routing.convention.yaml +109 -0
- package/planner-nodes/nodes/planner.steps.jtbd-taxonomy.convention.yaml +227 -0
- package/planner-nodes/nodes/planner.steps.linguistic-patterns.convention.yaml +81 -0
- package/planner-nodes/nodes/planner.steps.sequence.convention.yaml +17 -0
- package/planner-nodes/nodes/planner.subject.invariants.convention.yaml +34 -0
- package/planner-nodes/nodes/planner.theme.definition.convention.yaml +23 -0
- package/planner-nodes/nodes/planner.theme.must-be-canonical.convention.yaml +38 -0
- package/planner-nodes/nodes/planner.theme.theme-zero-mandatory.convention.yaml +39 -0
- package/planner-nodes/nodes/planner.theme.urn-namespace-matches.convention.yaml +34 -0
- package/planner-nodes/nodes/planner.train.acceptance-commit-failures-covered.convention.yaml +10 -0
- package/planner-nodes/nodes/planner.train.acceptances.convention.yaml +85 -0
- package/planner-nodes/nodes/planner.train.artifact-flow.convention.yaml +31 -0
- package/planner-nodes/nodes/planner.train.categories.convention.yaml +34 -0
- package/planner-nodes/nodes/planner.train.definition.convention.yaml +34 -0
- package/planner-nodes/nodes/planner.train.dependencies.convention.yaml +28 -0
- package/planner-nodes/nodes/planner.train.dispatch-composite-key-exceptional.convention.yaml +17 -0
- package/planner-nodes/nodes/planner.train.dispatch-map-is-registry.convention.yaml +17 -0
- package/planner-nodes/nodes/planner.train.family-matches-terminal-contract.convention.yaml +17 -0
- package/planner-nodes/nodes/planner.train.family.convention.yaml +17 -0
- package/planner-nodes/nodes/planner.train.initial-cargo-inputs-declared.convention.yaml +10 -0
- package/planner-nodes/nodes/planner.train.interlocking-does-not-carry-cargo.convention.yaml +28 -0
- package/planner-nodes/nodes/planner.train.interlocking-entrypoint-shape.convention.yaml +30 -0
- package/planner-nodes/nodes/planner.train.interlocking-fragment-acceptance-binding.convention.yaml +30 -0
- package/planner-nodes/nodes/planner.train.interlocking-guard-coverage.convention.yaml +29 -0
- package/planner-nodes/nodes/planner.train.interlocking-guard-grammar.convention.yaml +31 -0
- package/planner-nodes/nodes/planner.train.interlocking-home.convention.yaml +29 -0
- package/planner-nodes/nodes/planner.train.interlocking-message-payload-typed.convention.yaml +28 -0
- package/planner-nodes/nodes/planner.train.interlocking-payload-contract-body-required.convention.yaml +28 -0
- package/planner-nodes/nodes/planner.train.interlocking-payload-contract-registered.convention.yaml +31 -0
- package/planner-nodes/nodes/planner.train.interlocking-projection-equivalence.convention.yaml +32 -0
- package/planner-nodes/nodes/planner.train.interlocking-route-category-matches-train-id.convention.yaml +32 -0
- package/planner-nodes/nodes/planner.train.interlocking-route-resolution-deterministic.convention.yaml +30 -0
- package/planner-nodes/nodes/planner.train.interlocking-structural-residual-explicit.convention.yaml +30 -0
- package/planner-nodes/nodes/planner.train.interlocking-wmbt-surface-or-residual.convention.yaml +30 -0
- package/planner-nodes/nodes/planner.train.linearity.convention.yaml +28 -0
- package/planner-nodes/nodes/planner.train.naming.convention.yaml +26 -0
- package/planner-nodes/nodes/planner.train.participants.convention.yaml +27 -0
- package/planner-nodes/nodes/planner.train.production-implementation.convention.yaml +24 -0
- package/planner-nodes/nodes/planner.train.registry-coherence.convention.yaml +69 -0
- package/planner-nodes/nodes/planner.train.registry.convention.yaml +39 -0
- package/planner-nodes/nodes/planner.train.route-category-assessment.convention.yaml +43 -0
- package/planner-nodes/nodes/planner.train.route-space-admission.convention.yaml +41 -0
- package/planner-nodes/nodes/planner.train.scope.convention.yaml +38 -0
- package/planner-nodes/nodes/planner.train.sequence.convention.yaml +34 -0
- package/planner-nodes/nodes/planner.train.terminal-contract.convention.yaml +10 -0
- package/planner-nodes/nodes/planner.train.theme-alignment.convention.yaml +25 -0
- package/planner-nodes/nodes/planner.train.theme-orchestrator-urn.convention.yaml +27 -0
- package/planner-nodes/nodes/planner.train.theme-ranges.convention.yaml +28 -0
- package/planner-nodes/nodes/planner.train.validation-rules.convention.yaml +31 -0
- package/planner-nodes/nodes/planner.train.variation-strategies.convention.yaml +26 -0
- package/planner-nodes/nodes/planner.wagon.artifact-contracts.convention.yaml +29 -0
- package/planner-nodes/nodes/planner.wagon.complexity-model.convention.yaml +33 -0
- package/planner-nodes/nodes/planner.wagon.coupling-complexity.convention.yaml +32 -0
- package/planner-nodes/nodes/planner.wagon.definition.convention.yaml +30 -0
- package/planner-nodes/nodes/planner.wagon.features-format.convention.yaml +28 -0
- package/planner-nodes/nodes/planner.wagon.features.convention.yaml +27 -0
- package/planner-nodes/nodes/planner.wagon.logical-vs-filesystem-naming.convention.yaml +34 -0
- package/planner-nodes/nodes/planner.wagon.name-is-verb-object.convention.yaml +39 -0
- package/planner-nodes/nodes/planner.wagon.no-consume-cycle.convention.yaml +30 -0
- package/planner-nodes/nodes/planner.wagon.produce-consume-artifacts.convention.yaml +46 -0
- package/planner-nodes/nodes/planner.wagon.refinement-extraction.convention.yaml +49 -0
- package/planner-nodes/nodes/planner.wagon.semantic-coherence.convention.yaml +30 -0
- package/planner-nodes/nodes/planner.wagon.separability.convention.yaml +33 -0
- package/planner-nodes/nodes/planner.wagon.slug-dirname-conversion.convention.yaml +26 -0
- package/planner-nodes/nodes/planner.wagon.telemetry-filesystem.convention.yaml +52 -0
- package/planner-nodes/nodes/planner.wagon.urn-naming.convention.yaml +28 -0
- package/planner-nodes/nodes/planner.wagon.urn.convention.yaml +29 -0
- package/planner-nodes/nodes/planner.wmbt.context-clarifier.convention.yaml +24 -0
- package/planner-nodes/nodes/planner.wmbt.definition.convention.yaml +29 -0
- package/planner-nodes/nodes/planner.wmbt.dimension-selection.convention.yaml +37 -0
- package/planner-nodes/nodes/planner.wmbt.direction-selection.convention.yaml +41 -0
- package/planner-nodes/nodes/planner.wmbt.filename-pattern.convention.yaml +27 -0
- package/planner-nodes/nodes/planner.wmbt.lens-selection.convention.yaml +44 -0
- package/planner-nodes/nodes/planner.wmbt.must-have-smoke-acceptance.convention.yaml +55 -0
- package/planner-nodes/nodes/planner.wmbt.object-of-control.convention.yaml +26 -0
- package/planner-nodes/nodes/planner.wmbt.shape.convention.yaml +29 -0
- package/planner-nodes/nodes/planner.wmbt.splitting-rules.convention.yaml +37 -0
- package/planner-nodes/nodes/planner.wmbt.statement-template.convention.yaml +23 -0
- package/planner-nodes/nodes/planner.wmbt.step-code-vocabulary.convention.yaml +31 -0
- package/planner-nodes/nodes/planner.wmbt.urn-naming.convention.yaml +31 -0
- package/planner-schemas/acceptance.schema.json +396 -0
- package/planner-schemas/appendix.schema.json +78 -0
- package/planner-schemas/author/convention-node.schema.json +134 -0
- package/planner-schemas/author/gate.schema.json +36 -0
- package/planner-schemas/author/issue.schema.json +72 -0
- package/planner-schemas/author/relationship.schema.json +19 -0
- package/planner-schemas/author/scope.schema.json +28 -0
- package/planner-schemas/binding-lock.schema.json +38 -0
- package/planner-schemas/component.schema.json +114 -0
- package/planner-schemas/contract-registry.schema.json +47 -0
- package/planner-schemas/feature.schema.json +208 -0
- package/planner-schemas/journey.schema.json +225 -0
- package/planner-schemas/registry-index.schema.json +54 -0
- package/planner-schemas/substrate-lock.schema.json +41 -0
- package/planner-schemas/substrate.schema.json +38 -0
- package/planner-schemas/theme-registry.schema.json +28 -0
- package/planner-schemas/train-interlocking-registry.schema.json +49 -0
- package/planner-schemas/train-interlocking.schema.json +459 -0
- package/planner-schemas/train.schema.json +361 -0
- package/planner-schemas/wagon.schema.json +283 -0
- package/planner-schemas/wmbt.schema.json +68 -0
- package/src/ci.ts +9 -0
- package/src/cli.ts +91 -0
- package/src/docs-capability.ts +156 -0
- package/src/enforce.ts +103 -0
- package/src/hooks.ts +48 -0
- package/src/index.ts +13 -0
- package/src/planner-kernel.ts +112 -0
- package/src/planner-schema-validator.ts +101 -0
- package/src/planner-validators.ts +288 -0
- package/src/register.ts +8 -0
- package/src/release.ts +9 -0
- package/src/setup.ts +15 -0
- package/templates/github/atdd-bun-release.yml +16 -0
- package/templates/github/atdd-bun.yml +26 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
schema_version: 1.1.0
|
|
2
|
+
rule_id: coder.bun.interlocking-does-not-carry-cargo
|
|
3
|
+
kind: rule
|
|
4
|
+
status: active
|
|
5
|
+
name: Cargo stays inside TrainRunner execution; interlocking does not carry it and wagons stay clean (Bun)
|
|
6
|
+
statement: >-
|
|
7
|
+
Cargo is the artifact data plane carried by TrainRunner between wagons inside a selected train. An
|
|
8
|
+
`InterlockingRunner` MUST NOT reference or mutate Cargo, MUST NOT store `artifact_urn -> artifact_data`
|
|
9
|
+
runtime values, and MUST NOT route on mid-train Cargo state; and Bun wagons (`src/<wagon>/wagon.ts`)
|
|
10
|
+
MUST NOT import interlocking code. This is the Bun-stack realization of the agnostic core obligation
|
|
11
|
+
`coder.train.interlocking-does-not-carry-cargo` (core afokapu/atdd#1251); the JS detector that enforces
|
|
12
|
+
it is the atdd.workspace.bun implementation referenced below.
|
|
13
|
+
implementation:
|
|
14
|
+
type: validator
|
|
15
|
+
ref: coder.bun.interlocking-does-not-carry-cargo
|
|
16
|
+
content:
|
|
17
|
+
summary: >-
|
|
18
|
+
An agnostic "Cargo boundary" obligation, rendered for the Bun application. The JS realization scans
|
|
19
|
+
each InterlockingRunner-defining module under `src/trains/**` and flags a `Cargo` reference, a
|
|
20
|
+
`cargo[...] = ...` mutation, or an `artifact_urn` literal; and scans each `src/<wagon>/wagon.ts`
|
|
21
|
+
and flags an import of interlocking code. Member of the `bun_interlocking_infrastructure` FAMILY
|
|
22
|
+
detector (checks/interlocking_no_cargo.mjs).
|
|
23
|
+
normative_text: |
|
|
24
|
+
Core runtime spec afokapu/atdd#1251 — Cargo boundary. Allowed: the interlocking reads the initial
|
|
25
|
+
action/inputs/state before execution and a completed TrainResult only at a declared route boundary;
|
|
26
|
+
TrainRunner passes Cargo between wagons; wagons read and return artifact objects. Forbidden: the
|
|
27
|
+
interlocking reads or mutates Cargo during train execution, stores artifact_urn -> artifact_data
|
|
28
|
+
values, or routes on mid-train Cargo state; Cargo selecting train variants; wagons importing
|
|
29
|
+
interlocking code. WHICH modules are scanned and HOW the Cargo touches are recognized is the
|
|
30
|
+
per-stack detector's concern (comments are masked; a string `artifact_urn` literal is still detected).
|
|
31
|
+
fix_hint: |
|
|
32
|
+
Keep Cargo inside TrainRunner. The InterlockingRunner reads only initial action/inputs/state and a
|
|
33
|
+
declared-boundary TrainResult; it never references Cargo, mutates a cargo mapping, or stores
|
|
34
|
+
artifact_urn values. Wagons import their own dependencies, never InterlockingRunner. This rule is
|
|
35
|
+
`strict`: a newly introduced Cargo touch (or a wagon importing interlocking) is not suppressible and
|
|
36
|
+
fails CI.
|
|
37
|
+
exceptions:
|
|
38
|
+
- The production `TrainRunner` module legitimately constructs and carries Cargo; only
|
|
39
|
+
InterlockingRunner-defining modules are scanned for Cargo bleed.
|
|
40
|
+
metadata:
|
|
41
|
+
aliases:
|
|
42
|
+
- BUN-INTERLOCKING-NO-CARGO-001
|
|
43
|
+
severity: 4
|
|
44
|
+
disposition: strict
|
|
45
|
+
introduced_in: 0.1.0
|
|
46
|
+
core_design_refs:
|
|
47
|
+
- afokapu/atdd#1246
|
|
48
|
+
- afokapu/atdd#1251
|
|
49
|
+
terms:
|
|
50
|
+
- term_id: cargo_boundary
|
|
51
|
+
text: >-
|
|
52
|
+
the rule that Cargo (artifact data plane) stays inside TrainRunner execution; the InterlockingRunner
|
|
53
|
+
must not reference/mutate Cargo or store artifact_urn values, and wagons must not import it.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
schema_version: 1.1.0
|
|
2
|
+
rule_id: coder.bun.interlocking-resolution-model-exists
|
|
3
|
+
kind: rule
|
|
4
|
+
status: active
|
|
5
|
+
name: Interlocking route resolution returns structured metadata, not a bare trainId (Bun)
|
|
6
|
+
statement: >-
|
|
7
|
+
An `InterlockingRunner.resolveTrain(...)` MUST resolve a structured `InterlockingResolution` model
|
|
8
|
+
carrying the route metadata — not a bare `trainId` string. The model MUST define the fields
|
|
9
|
+
`interlockingId`, `routeId`, `trainId`, `trainPath`, `category`, `guardId`, `resolutionStrategy`, and
|
|
10
|
+
`reason`. This is the Bun-stack realization of the agnostic core obligation
|
|
11
|
+
`coder.train.interlocking-resolution-model-exists` (core afokapu/atdd#1251); the JS detector that
|
|
12
|
+
enforces it is the atdd.workspace.bun implementation referenced below.
|
|
13
|
+
implementation:
|
|
14
|
+
type: validator
|
|
15
|
+
ref: coder.bun.interlocking-resolution-model-exists
|
|
16
|
+
content:
|
|
17
|
+
summary: >-
|
|
18
|
+
An agnostic "structured route resolution" obligation, rendered for the Bun application. The JS
|
|
19
|
+
realization scans `src/trains/**/*.ts`: when an `InterlockingRunner` exposes `resolveTrain`, an
|
|
20
|
+
`InterlockingResolution` type/interface/class defining the eight required fields MUST exist;
|
|
21
|
+
otherwise the route is resolved as a bare trainId. Member of the `bun_interlocking_infrastructure`
|
|
22
|
+
FAMILY detector (checks/interlocking_resolution_model.mjs).
|
|
23
|
+
normative_text: |
|
|
24
|
+
Core runtime spec afokapu/atdd#1251 suggests the resolution model. For the Bun/TS stack:
|
|
25
|
+
|
|
26
|
+
export interface InterlockingResolution {
|
|
27
|
+
interlockingId: string; routeId: string; trainId: string; trainPath: string;
|
|
28
|
+
category: string; guardId: string; resolutionStrategy: string; reason: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
A bare trainId string loses the routeId, guardId, category, resolutionStrategy, trainPath, and
|
|
32
|
+
the human-readable reason needed for trace and projection equivalence. Category agreement is
|
|
33
|
+
judged against the target train's `category` FIELD, never a digit parsed out of the identity
|
|
34
|
+
validation. WHICH runtime files are inspected and HOW the model fields are recognized is the
|
|
35
|
+
per-stack detector's concern (Bun: collecting the InterlockingResolution property names).
|
|
36
|
+
fix_hint: |
|
|
37
|
+
Define the structured model and return it from resolveTrain:
|
|
38
|
+
|
|
39
|
+
return {
|
|
40
|
+
interlockingId, routeId, trainId, trainPath,
|
|
41
|
+
category, guardId, resolutionStrategy, reason,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
This rule is `strict`: a resolveTrain backed only by a bare trainId is not suppressible and fails CI.
|
|
45
|
+
exceptions:
|
|
46
|
+
- Applies only when an `InterlockingRunner` with a `resolveTrain` method is present (a missing
|
|
47
|
+
runner/method is the separate `coder.bun.interlocking-runner-exists` concern).
|
|
48
|
+
metadata:
|
|
49
|
+
aliases:
|
|
50
|
+
- BUN-INTERLOCKING-RESOLUTION-MODEL-001
|
|
51
|
+
severity: 4
|
|
52
|
+
disposition: strict
|
|
53
|
+
introduced_in: 0.1.0
|
|
54
|
+
core_design_refs:
|
|
55
|
+
- afokapu/atdd#1246
|
|
56
|
+
- afokapu/atdd#1251
|
|
57
|
+
terms:
|
|
58
|
+
- term_id: interlocking_resolution_model
|
|
59
|
+
text: >-
|
|
60
|
+
the `InterlockingResolution` structure returned by resolveTrain, carrying interlockingId, routeId,
|
|
61
|
+
trainId, trainPath, category, guardId, resolutionStrategy, reason.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
schema_version: 1.1.0
|
|
2
|
+
rule_id: coder.bun.interlocking-runner-exists
|
|
3
|
+
kind: rule
|
|
4
|
+
status: active
|
|
5
|
+
name: InterlockingRunner route-control layer exists with a resolveTrain entry point (Bun)
|
|
6
|
+
statement: >-
|
|
7
|
+
When a consumer Bun application declares guarded interlocking routes (a `JOURNEY_MAP` entry that is an
|
|
8
|
+
`{interlockingId, path}` route object in the Station Master composition root `server.ts`), the
|
|
9
|
+
consumer runtime MUST ship an `InterlockingRunner` route-control layer — a `class InterlockingRunner`
|
|
10
|
+
defined under `src/trains/**` that exposes a `resolveTrain(...)` entry point. This is the
|
|
11
|
+
Bun-stack realization of the agnostic core obligation `coder.train.interlocking-runner-exists`
|
|
12
|
+
(core afokapu/atdd#1251, Part of #1246); the zero-dependency JS detector that enforces it is the
|
|
13
|
+
atdd.workspace.bun implementation referenced below.
|
|
14
|
+
implementation:
|
|
15
|
+
type: validator
|
|
16
|
+
ref: coder.bun.interlocking-runner-exists
|
|
17
|
+
content:
|
|
18
|
+
summary: >-
|
|
19
|
+
An agnostic "the InterlockingRunner runtime exists" obligation, rendered for the Bun application. The
|
|
20
|
+
JS realization scans the consumer's `src/trains/**/*.ts` runtime and flags a consumer that
|
|
21
|
+
declares an interlocking route (a JOURNEY_MAP route object) but ships no `InterlockingRunner` class,
|
|
22
|
+
or ships one that lacks a `resolveTrain` method. Member of the `bun_interlocking_infrastructure`
|
|
23
|
+
FAMILY detector (checks/interlocking_runner_exists.mjs).
|
|
24
|
+
normative_text: |
|
|
25
|
+
Core runtime spec afokapu/atdd#1251: an interlocking is executable only as a route-control component.
|
|
26
|
+
Its entry point is `InterlockingRunner.resolveTrain(action, inputs, state)`, which evaluates guarded
|
|
27
|
+
routes and resolves exactly one admissible train before delegation. A Bun consumer that declares
|
|
28
|
+
interlocking routes without this class — or with a class that has no resolveTrain — has no
|
|
29
|
+
route-control layer at all. WHICH runtime files are inspected and HOW the class/method are recognized
|
|
30
|
+
is the per-stack detector's concern (Bun: a regex-over-source scan of the `src/trains/**`
|
|
31
|
+
selector plus the `server.ts` JOURNEY_MAP).
|
|
32
|
+
fix_hint: |
|
|
33
|
+
Add the route-control layer:
|
|
34
|
+
|
|
35
|
+
// src/trains/interlocking.ts
|
|
36
|
+
export class InterlockingRunner {
|
|
37
|
+
constructor(private readonly interlockingYamlPath: string) {}
|
|
38
|
+
resolveTrain(action: string, inputs: Record<string, unknown>, state?: unknown): InterlockingResolution { ... }
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
This rule is `strict`: a newly introduced interlocking route without an InterlockingRunner +
|
|
42
|
+
resolveTrain is not suppressible and fails CI.
|
|
43
|
+
exceptions:
|
|
44
|
+
- A pure direct-train consumer (no interlocking route object in JOURNEY_MAP and no InterlockingRunner
|
|
45
|
+
class) carries no obligation and is not flagged.
|
|
46
|
+
- Generated and vendored trees (`_generated/`, `node_modules/`, `dist/`, `build/`, `.next/`) are never scanned.
|
|
47
|
+
metadata:
|
|
48
|
+
aliases:
|
|
49
|
+
- BUN-INTERLOCKING-RUNNER-EXISTS-001
|
|
50
|
+
severity: 4
|
|
51
|
+
disposition: strict
|
|
52
|
+
introduced_in: 0.1.0
|
|
53
|
+
core_design_refs:
|
|
54
|
+
- afokapu/atdd#1246
|
|
55
|
+
- afokapu/atdd#1251
|
|
56
|
+
terms:
|
|
57
|
+
- term_id: interlocking_runner
|
|
58
|
+
text: >-
|
|
59
|
+
a `class InterlockingRunner` under `src/trains/` exposing `resolveTrain(...)`; the route-control
|
|
60
|
+
component that selects one admissible train and delegates execution to TrainRunner.
|
|
61
|
+
- term_id: journey_map
|
|
62
|
+
text: >-
|
|
63
|
+
the `JOURNEY_MAP` action->route mapping in `server.ts`; values are either a direct trainId
|
|
64
|
+
string or an `{interlockingId, path}` route object.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
schema_version: 1.1.0
|
|
2
|
+
rule_id: coder.bun.journey-runner-boundary
|
|
3
|
+
kind: rule
|
|
4
|
+
status: active
|
|
5
|
+
name: JourneyRunner composes interlockings without executing trains or wagons (Bun)
|
|
6
|
+
statement: >-
|
|
7
|
+
A Bun consumer that declares one or more journey topology documents under plan/_journeys/ MUST ship
|
|
8
|
+
a JourneyRunner under src/trains/**. JourneyRunner is the continuation-control layer above
|
|
9
|
+
InterlockingRunner: it MUST read and parse the declared journey topology, MUST reference
|
|
10
|
+
InterlockingRunner for routing decisions, MUST NOT construct an InterlockingRunner from a hardcoded
|
|
11
|
+
literal path, and MUST NOT bypass
|
|
12
|
+
that boundary by referencing TrainRunner directly, importing wagon modules, calling runTrain(...),
|
|
13
|
+
looping over train.sequence as an executor, or carrying/mutating Cargo. InterlockingRunner continues
|
|
14
|
+
to select exactly one train and delegate that train to TrainRunner; JourneyRunner only decides which
|
|
15
|
+
interlocking is entered next according to the declared journey topology.
|
|
16
|
+
implementation:
|
|
17
|
+
type: validator
|
|
18
|
+
ref: coder.bun.journey-runner-boundary
|
|
19
|
+
content:
|
|
20
|
+
summary: >-
|
|
21
|
+
Enforces the Bun runtime boundary introduced by planner journey topology. Presence of
|
|
22
|
+
plan/_journeys/**/*.yaml enables the obligation. The family detector looks for class
|
|
23
|
+
JourneyRunner under src/trains/**, requires evidence that the runtime reads and parses a journey
|
|
24
|
+
declaration, requires it to reference InterlockingRunner, rejects literal InterlockingRunner
|
|
25
|
+
construction, and rejects direct TrainRunner/wagon/Cargo execution patterns.
|
|
26
|
+
normative_text: |
|
|
27
|
+
The intended call model is:
|
|
28
|
+
|
|
29
|
+
Station Master
|
|
30
|
+
-> JourneyRunner
|
|
31
|
+
-> InterlockingRunner.resolve/execute(...)
|
|
32
|
+
-> TrainRunner.execute(selectedTrainId, ...)
|
|
33
|
+
-> inspect declared continuation/terminal
|
|
34
|
+
-> next InterlockingRunner ...
|
|
35
|
+
|
|
36
|
+
JourneyRunner owns continuation control, never the train step loop. InterlockingRunner owns local
|
|
37
|
+
route selection, never cross-interlocking topology. TrainRunner remains the only wagon-step executor.
|
|
38
|
+
fix_hint: |
|
|
39
|
+
Add a JourneyRunner under src/trains/ that reads the supplied journey declaration and delegates
|
|
40
|
+
each routing decision to InterlockingRunner using declaration-derived values. Remove literal
|
|
41
|
+
InterlockingRunner paths, direct TrainRunner calls, wagon imports, Cargo handling, runTrain(...)
|
|
42
|
+
calls, and train.sequence executor loops from JourneyRunner.
|
|
43
|
+
exceptions:
|
|
44
|
+
- Consumers with no plan/_journeys topology carry no JourneyRunner obligation.
|
|
45
|
+
metadata:
|
|
46
|
+
aliases:
|
|
47
|
+
- BUN-JOURNEY-RUNNER-BOUNDARY-001
|
|
48
|
+
severity: 4
|
|
49
|
+
disposition: strict
|
|
50
|
+
introduced_in: 0.1.0
|
|
51
|
+
terms:
|
|
52
|
+
- term_id: journey_runner
|
|
53
|
+
text: the runtime continuation-control layer that traverses declared journey topology between interlockings.
|
|
54
|
+
- term_id: boundary
|
|
55
|
+
text: JourneyRunner -> InterlockingRunner -> TrainRunner; each layer owns only its declared responsibility.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
schema_version: 1.1.0
|
|
2
|
+
rule_id: coder.bun.layer-naming
|
|
3
|
+
kind: rule
|
|
4
|
+
status: active
|
|
5
|
+
name: Feature modules name their architectural layer
|
|
6
|
+
statement: >-
|
|
7
|
+
A module inside a `features/` or `wagons/` tree MUST name its architectural layer — either by filename
|
|
8
|
+
(`domain.ts`, `application.ts`, `api.ts`, …) or by living in a directory named for the layer. Bun
|
|
9
|
+
realization mirroring `coder.convex.layer-naming`; core obligation `coder.backend.code-is-organized`.
|
|
10
|
+
terms:
|
|
11
|
+
- term_id: layer_declaration
|
|
12
|
+
text: >-
|
|
13
|
+
how a module names its layer: either the filename (domain.ts, api.ts) or a directory named
|
|
14
|
+
for the layer. Both accepted, because a nested Bun repo is idiomatic.
|
|
15
|
+
- term_id: feature_tree
|
|
16
|
+
text: >-
|
|
17
|
+
a path under `features/` or `wagons/` — the only place this rule applies.
|
|
18
|
+
content:
|
|
19
|
+
summary: >-
|
|
20
|
+
Flags a feature-tree module whose path carries no layer directory and whose basename is not a layer
|
|
21
|
+
filename.
|
|
22
|
+
normative_text: |
|
|
23
|
+
ADDED TO THE MIRROR, and worth flagging: the Convex sibling accepts only the FILENAME form, because its function tree is flat. A full-stack Bun repo commonly nests (`features/orders/domain/total.ts`), so accepting only filenames would refuse the idiomatic layout. This realization accepts BOTH.
|
|
24
|
+
The obligation is unchanged: a reader should know a file's role before opening it, and the layering rules need something to read.
|
|
25
|
+
fix_hint: |
|
|
26
|
+
Either rename the file to its layer, or move it into the layer directory it belongs to.
|
|
27
|
+
exceptions:
|
|
28
|
+
- Test files and vendored/build directories are never scanned.
|
|
29
|
+
- Bare npm specifiers resolve outside the project graph and are not layer-checked.
|
|
30
|
+
- A file carrying no layer segment is outside these rules rather than in violation of them.
|
|
31
|
+
metadata:
|
|
32
|
+
aliases:
|
|
33
|
+
# Mirrored rule-for-rule from coder.convex.layer-naming
|
|
34
|
+
# Core obligation: coder.backend.code-is-organized
|
|
35
|
+
- BUN-LAYER-NAMING-001
|
|
36
|
+
severity: 2
|
|
37
|
+
disposition: suppress-and-clean
|
|
38
|
+
introduced_in: 0.1.0
|
|
39
|
+
implementation:
|
|
40
|
+
type: validator
|
|
41
|
+
ref: bun_clean_architecture_detector
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
schema_version: 1.1.0
|
|
2
|
+
rule_id: coder.bun.logging-console
|
|
3
|
+
kind: rule
|
|
4
|
+
status: active
|
|
5
|
+
name: No console logging in application source
|
|
6
|
+
statement: >-
|
|
7
|
+
Application source MUST NOT call `console.log` / `info` / `warn` / `error` / `debug` / `trace` / `dir`.
|
|
8
|
+
Stack-neutral obligation, RE-REALIZED for Bun: the python-pytest sibling walks the AST for a bare
|
|
9
|
+
`print(...)`; the Bun equivalent is `console.*`. Realized by `bun_security_hygiene_detector` (core alias
|
|
10
|
+
LOGGING-PRINT-001).
|
|
11
|
+
terms:
|
|
12
|
+
- term_id: unlevelled_output
|
|
13
|
+
text: >-
|
|
14
|
+
a `console.*` call: no level, no timestamp, no request correlation. In a full-stack app the
|
|
15
|
+
same module may write to the operator's stdout or the user's devtools.
|
|
16
|
+
- term_id: structured_logger
|
|
17
|
+
text: >-
|
|
18
|
+
the project logger that owns levels, timestamps and correlation.
|
|
19
|
+
content:
|
|
20
|
+
summary: >-
|
|
21
|
+
Scans source with strings and comments MASKED, so `console.log` inside a comment or a string literal
|
|
22
|
+
never trips the rule.
|
|
23
|
+
normative_text: |
|
|
24
|
+
The obligation is the same as the Python one but the consequence is sharper. A Bun server writes `console.log` straight to stdout with no level, no timestamp and no request correlation, so production logs become a single unfilterable stream — and in a full-stack app the same module may run on the server AND in the browser, where `console` output reaches the user's devtools instead of the operator's.
|
|
25
|
+
`console.error` is included: it is still unlevelled and uncorrelated, and being on stderr does not make it queryable.
|
|
26
|
+
fix_hint: |
|
|
27
|
+
Route through the logger, which owns levels, timestamps and correlation:
|
|
28
|
+
|
|
29
|
+
console.log("processing", order.id); // wrong
|
|
30
|
+
logger.info("processing order", { orderId: order.id }); // right
|
|
31
|
+
exceptions:
|
|
32
|
+
- Occurrences inside comments or string literals are masked and never flagged.
|
|
33
|
+
- Test files and vendored/build directories are excluded.
|
|
34
|
+
- A CLI whose stdout IS its user interface should scope itself out via the consumer scope map.
|
|
35
|
+
metadata:
|
|
36
|
+
aliases:
|
|
37
|
+
# LOGGING-PRINT-001 is the SHARED core alias, also carried by the agnostic node and its
|
|
38
|
+
# python-pytest realization.
|
|
39
|
+
- LOGGING-PRINT-001
|
|
40
|
+
severity: 2
|
|
41
|
+
# RE-REALIZED, not ported: the python-pytest sibling inspects a Python
|
|
42
|
+
# AST for constructs this stack does not have. Same obligation, new detector.
|
|
43
|
+
disposition: strict
|
|
44
|
+
introduced_in: 0.1.0
|
|
45
|
+
implementation:
|
|
46
|
+
type: validator
|
|
47
|
+
ref: bun_security_hygiene_detector
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
schema_version: 1.1.0
|
|
2
|
+
rule_id: coder.bun.logging-structured
|
|
3
|
+
kind: rule
|
|
4
|
+
status: active
|
|
5
|
+
name: Log calls carry a structured context object
|
|
6
|
+
statement: >-
|
|
7
|
+
A logger call MUST NOT pass only a bare string; it MUST carry a context object. Stack-neutral
|
|
8
|
+
obligation, RE-REALIZED for Bun: the receiver names and log methods carry over from the python-pytest
|
|
9
|
+
sibling `coder.logging.structured`, but the argument shape does not — a JS logger takes a context OBJECT
|
|
10
|
+
where the Python one takes `extra=` or kwargs. Realized by `bun_security_hygiene_detector` (core alias
|
|
11
|
+
LOGGING-STRUCTURED-001).
|
|
12
|
+
terms:
|
|
13
|
+
- term_id: context_object
|
|
14
|
+
text: >-
|
|
15
|
+
the second argument carrying the fields a line will be searched by. A JS logger takes an
|
|
16
|
+
object where a Python one takes `extra=`.
|
|
17
|
+
- term_id: bare_string_log
|
|
18
|
+
text: >-
|
|
19
|
+
a logger call whose only argument is a string literal. Greppable and nothing more, at the
|
|
20
|
+
one moment it matters.
|
|
21
|
+
content:
|
|
22
|
+
summary: >-
|
|
23
|
+
Flags a call on a logger receiver (`logger` / `log` / `_logger` / `_log` / `LOG`) whose sole argument
|
|
24
|
+
is a string literal.
|
|
25
|
+
normative_text: |
|
|
26
|
+
A log line's value is realised at exactly one moment: when someone is searching for it during an incident. A bare string can only be grepped; a line carrying `{ orderId, userId }` can be filtered, grouped and joined to a trace.
|
|
27
|
+
The rule asks only that SOME context is attached — it cannot judge whether the right fields were chosen. The useful discipline is to ask what you would filter by at 3am and put that in the object.
|
|
28
|
+
fix_hint: |
|
|
29
|
+
Attach the fields the line would be searched by:
|
|
30
|
+
|
|
31
|
+
logger.info("order processed"); // wrong
|
|
32
|
+
logger.info("order processed", { orderId, userId, ms }); // right
|
|
33
|
+
exceptions:
|
|
34
|
+
- A call already passing a second argument is not flagged.
|
|
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
|
+
metadata:
|
|
38
|
+
aliases:
|
|
39
|
+
# LOGGING-STRUCTURED-001 is the SHARED core alias, also carried by the agnostic node and its
|
|
40
|
+
# python-pytest realization.
|
|
41
|
+
- LOGGING-STRUCTURED-001
|
|
42
|
+
severity: 2
|
|
43
|
+
# RE-REALIZED, not ported: the python-pytest sibling inspects a Python
|
|
44
|
+
# AST for constructs this stack does not have. Same obligation, new detector.
|
|
45
|
+
disposition: suppress-and-clean
|
|
46
|
+
introduced_in: 0.1.0
|
|
47
|
+
implementation:
|
|
48
|
+
type: validator
|
|
49
|
+
ref: bun_security_hygiene_detector
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
schema_version: 1.1.0
|
|
2
|
+
rule_id: coder.bun.quality-comments
|
|
3
|
+
kind: rule
|
|
4
|
+
status: active
|
|
5
|
+
name: TypeScript files carry at least a 10% comment ratio
|
|
6
|
+
statement: >-
|
|
7
|
+
Every TypeScript/TSX file MUST have a comment ratio of at least 10% of non-blank lines. Stack-neutral
|
|
8
|
+
obligation, NATIVE BUN detector transcribed from the python-pytest sibling `coder.refactor.quality-
|
|
9
|
+
comments-typescript` and verified numerically identical. Realized by `bun_ts_metrics_detector` (core
|
|
10
|
+
alias REFACTOR-QUALITY-COMMENTS-TS-001).
|
|
11
|
+
terms:
|
|
12
|
+
- term_id: comment_ratio
|
|
13
|
+
text: >-
|
|
14
|
+
comment lines over non-blank lines, counting line comments, block comments and `*`
|
|
15
|
+
continuations.
|
|
16
|
+
- term_id: floor_against_absence
|
|
17
|
+
text: >-
|
|
18
|
+
what this rule is. It cannot tell a good comment from a bad one; it catches the file that
|
|
19
|
+
documents nothing.
|
|
20
|
+
content:
|
|
21
|
+
summary: >-
|
|
22
|
+
Counts line comments, block comments and continuation lines beginning `*` against all non-blank lines.
|
|
23
|
+
normative_text: |
|
|
24
|
+
A ratio is a blunt instrument for a quality that is not quantitative, and it is used here for one narrow reason: a file with NO comments at all is common and is almost always a file whose non-obvious decisions were never written down. Ten percent is low enough that any file with a real header and a few explanatory lines clears it.
|
|
25
|
+
The rule cannot tell a good comment from a bad one. It is a floor against absence, not a measure of quality, and it should not be read as encouragement to restate code in prose.
|
|
26
|
+
fix_hint: |
|
|
27
|
+
Explain the decisions the code cannot state: why this approach over the obvious one, what invariant the block maintains, which upstream constraint forces the shape. In a Bun + htmx file the GREEN header already contributes several lines toward the ratio.
|
|
28
|
+
exceptions:
|
|
29
|
+
- Blank lines are excluded from both numerator and denominator.
|
|
30
|
+
- Continuation lines beginning `*` inside a block comment count as comment lines.
|
|
31
|
+
- Test files and vendored/build directories are outside the scan.
|
|
32
|
+
metadata:
|
|
33
|
+
aliases:
|
|
34
|
+
# REFACTOR-QUALITY-COMMENTS-TS-001 is the SHARED core alias, also carried by the agnostic node and by
|
|
35
|
+
# its python-pytest realization. One obligation, two detectors, two runtimes.
|
|
36
|
+
- REFACTOR-QUALITY-COMMENTS-TS-001
|
|
37
|
+
severity: 2
|
|
38
|
+
# `strict`, matching the python-pytest sibling exactly. A repo adopting this on an
|
|
39
|
+
# existing codebase records a ratchet baseline rather than lowering the threshold.
|
|
40
|
+
disposition: strict
|
|
41
|
+
introduced_in: 0.1.0
|
|
42
|
+
implementation:
|
|
43
|
+
type: validator
|
|
44
|
+
ref: bun_ts_metrics_detector
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
schema_version: 1.1.0
|
|
2
|
+
rule_id: coder.bun.quality-mi
|
|
3
|
+
kind: rule
|
|
4
|
+
status: active
|
|
5
|
+
name: TypeScript files keep a maintainability index of at least 20
|
|
6
|
+
statement: >-
|
|
7
|
+
Every TypeScript/TSX file MUST score at least 20 on the approximate SEI maintainability index. Stack-
|
|
8
|
+
neutral obligation, NATIVE BUN detector transcribed from the python-pytest sibling
|
|
9
|
+
`coder.refactor.quality-mi-typescript` — the Halstead volume, the log terms and the comment term are the
|
|
10
|
+
same formula, verified identical to ten decimal places. Realized by `bun_ts_metrics_detector` (core
|
|
11
|
+
alias REFACTOR-QUALITY-MI-TS-001).
|
|
12
|
+
terms:
|
|
13
|
+
- term_id: maintainability_index
|
|
14
|
+
text: >-
|
|
15
|
+
the approximate SEI composite: 171 - 5.2*ln(V) - 0.23*avgCC - 16.2*ln(LOC) +
|
|
16
|
+
50*sin(sqrt(2.4*CM)), clamped to 0..100.
|
|
17
|
+
- term_id: halstead_volume
|
|
18
|
+
text: >-
|
|
19
|
+
V — a regex-approximated operator/operand count standing in for the file's information
|
|
20
|
+
content. No AST, no external library.
|
|
21
|
+
content:
|
|
22
|
+
summary: >-
|
|
23
|
+
MI = 171 - 5.2*ln(V) - 0.23*avgCC - 16.2*ln(LOC) + 50*sin(sqrt(2.4*CM)), clamped to 0..100, where V is
|
|
24
|
+
a regex-approximated Halstead volume, avgCC the average decision density per function, and CM the
|
|
25
|
+
comment ratio. No AST, no external library.
|
|
26
|
+
normative_text: |
|
|
27
|
+
MI is a composite, and that is the point: a file can pass every per-function threshold and still be unmaintainable through sheer accumulated size and operator density. MI is the only rule here that judges the FILE rather than its parts.
|
|
28
|
+
It is an approximation and is treated as one — the threshold of 20 is set low enough that a score below it indicates a file nobody should be asked to modify, not a file that is merely imperfect.
|
|
29
|
+
fix_hint: |
|
|
30
|
+
Split the file. MI falls fastest with the log of line count, so extracting a cohesive half into its own module raises both halves at once. Adding comments also raises the score, but comment density is a weaker term than size and should not be used as the remedy.
|
|
31
|
+
exceptions:
|
|
32
|
+
- Files that produce zero code lines after comment stripping score 100 and never fail.
|
|
33
|
+
- The score is clamped to the 0..100 range.
|
|
34
|
+
- Test files and vendored/build directories are outside the scan.
|
|
35
|
+
metadata:
|
|
36
|
+
aliases:
|
|
37
|
+
# REFACTOR-QUALITY-MI-TS-001 is the SHARED core alias, also carried by the agnostic node and by
|
|
38
|
+
# its python-pytest realization. One obligation, two detectors, two runtimes.
|
|
39
|
+
- REFACTOR-QUALITY-MI-TS-001
|
|
40
|
+
severity: 2
|
|
41
|
+
# `strict`, matching the python-pytest sibling exactly. A repo adopting this on an
|
|
42
|
+
# existing codebase records a ratchet baseline rather than lowering the threshold.
|
|
43
|
+
disposition: strict
|
|
44
|
+
introduced_in: 0.1.0
|
|
45
|
+
implementation:
|
|
46
|
+
type: validator
|
|
47
|
+
ref: bun_ts_metrics_detector
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
schema_version: 1.1.0
|
|
2
|
+
rule_id: coder.bun.runtime-executes-the-declaration
|
|
3
|
+
kind: rule
|
|
4
|
+
# DRAFT, and the word is load-bearing. The obligation is authored and its validator
|
|
5
|
+
# exists and is tested, but it is realized by `scan_execution()` which the gated
|
|
6
|
+
# `scan_root()` deliberately does not call. Shipping it `active` would claim an
|
|
7
|
+
# enforcement that never runs — a rule that says it checks and does not. It becomes
|
|
8
|
+
# `active` in the same change that wires the check into the gate.
|
|
9
|
+
status: active
|
|
10
|
+
name: The runtime executes the declared route space rather than transcribing it
|
|
11
|
+
statement: >-
|
|
12
|
+
A consumer that declares guarded interlocking routes MUST have a runtime that READS the
|
|
13
|
+
declaration it is given. An `InterlockingRunner` constructed with an interlocking YAML path MUST
|
|
14
|
+
load that path and resolve from what it read; a `TrainRunner` MUST take the wagon order from the
|
|
15
|
+
train definition. A runtime that stores the path and returns hardcoded values satisfies every
|
|
16
|
+
text-level rule in this package and is not executing the plan — it is transcribing it.
|
|
17
|
+
terms:
|
|
18
|
+
- term_id: loads_the_declaration
|
|
19
|
+
text: >-
|
|
20
|
+
some module under the runtime selector reads a file — `yaml.safe_load`, `json.load`,
|
|
21
|
+
`open(...)`, `.read_text(...)`. Checked across the whole runtime surface rather than per
|
|
22
|
+
module, because a correct implementation may delegate loading to a sibling loader.
|
|
23
|
+
- term_id: transcription
|
|
24
|
+
text: >-
|
|
25
|
+
a runtime whose resolution fields and wagon order are literals that happen to match the
|
|
26
|
+
declaration. It agrees with the plan at the moment it is written and cannot disagree
|
|
27
|
+
detectably afterwards, because nothing compares them at runtime.
|
|
28
|
+
- term_id: unreachable_route
|
|
29
|
+
text: >-
|
|
30
|
+
a declared `route_id` that appears nowhere in a runtime which does not load the declaration.
|
|
31
|
+
A data-driven runtime serves every declared route by construction and mentions none of them as
|
|
32
|
+
literals, so this is only ever evaluated against a transcribing runtime.
|
|
33
|
+
- term_id: disposition_rationale
|
|
34
|
+
text: >-
|
|
35
|
+
advisory because NO consumer satisfies it today, including this package's own fixtures until
|
|
36
|
+
the commit that introduced this node. The measurement below was TAKEN, not recalled.
|
|
37
|
+
values:
|
|
38
|
+
measured_2026_09_07: >-
|
|
39
|
+
A Bun consumer was built from scratch in this stack's idiom to establish the read
|
|
40
|
+
vocabulary, because the python heuristic (yaml.safe_load / read_text) matches NOTHING a
|
|
41
|
+
compliant Bun runtime does — porting it blind would have reported every Bun consumer as
|
|
42
|
+
plan-blind. Verified: the compliant consumer is silent, a transcribing one fires naming the
|
|
43
|
+
literals it restated, and a query-loading one that reads nothing and states nothing stays
|
|
44
|
+
silent.
|
|
45
|
+
measurement_target: a Bun consumer repo built for the experiment
|
|
46
|
+
escalate_when: >-
|
|
47
|
+
Consumer runtimes load their declarations and the check has been wired into
|
|
48
|
+
gates/interlocking-binding.gate.yaml. Enabling it is a GATE change; the detector is staged
|
|
49
|
+
(`scan_execution`) and deliberately not called from `scan_root`.
|
|
50
|
+
content:
|
|
51
|
+
summary: >-
|
|
52
|
+
The obligation that makes "the train YAML is the source of truth" true of the RUNTIME and not
|
|
53
|
+
merely of the text. Every other rule in this package closes a correspondence between literals
|
|
54
|
+
in the code and literals in the plan; none asks whether the code ever reads it.
|
|
55
|
+
normative_text: |
|
|
56
|
+
FOUND BY RUNNING THIS PACKAGE AGAINST A REAL CONSUMER, which is the only way it could have been
|
|
57
|
+
found. A consumer whose InterlockingRunner stored `interlocking_yaml_path` and returned a
|
|
58
|
+
hardcoded InterlockingResolution, and whose TrainRunner kept a literal train_id -> wagons map,
|
|
59
|
+
was fully compliant. Three divergences between plan and runtime were then introduced:
|
|
60
|
+
|
|
61
|
+
a declared route the runtime cannot resolve -> nothing fired
|
|
62
|
+
a wagon sequence contradicting the runtime -> nothing fired
|
|
63
|
+
the entire plan/ directory deleted -> only bilateral binding, because the
|
|
64
|
+
runtime's literals became undeclared
|
|
65
|
+
|
|
66
|
+
The application kept dispatching in all three cases. That is the definition of a plan that is
|
|
67
|
+
not executable.
|
|
68
|
+
|
|
69
|
+
WHY A TRANSCRIBING RUNTIME IS WORSE THAN AN ABSENT ONE. An absent runtime fails loudly the
|
|
70
|
+
first time anything runs. A transcribing one agrees with the declaration on the day it is
|
|
71
|
+
written and diverges silently ever after — the plan is edited, the runtime is not, and every
|
|
72
|
+
check still passes because each still contains the same literals it always did.
|
|
73
|
+
fix_hint: |
|
|
74
|
+
Load the declaration and resolve from it:
|
|
75
|
+
|
|
76
|
+
def _declaration(self):
|
|
77
|
+
return yaml.safe_load(Path(self._path).read_text(encoding="utf-8")) or {}
|
|
78
|
+
|
|
79
|
+
def route_by_id(self, route_id):
|
|
80
|
+
for route in self._declaration().get("routes") or []:
|
|
81
|
+
if route.get("route_id") == route_id:
|
|
82
|
+
return _Route(route)
|
|
83
|
+
|
|
84
|
+
Resolve through a `route_by_id`-style accessor rather than filtering inline: bilateral
|
|
85
|
+
binding's provenance scan traces a resolution kwarg back through such an accessor to the
|
|
86
|
+
loaded route space, and cannot trace an inline filter — which it reports as undecidable
|
|
87
|
+
rather than passing silently.
|
|
88
|
+
exceptions:
|
|
89
|
+
- A consumer that declares no interlocking route space carries no obligation.
|
|
90
|
+
- A runtime that loads the declaration is never checked for route literals; it serves every
|
|
91
|
+
declared route by construction, and flagging the absent literal would punish the correct
|
|
92
|
+
implementation for being correct.
|
|
93
|
+
metadata:
|
|
94
|
+
aliases:
|
|
95
|
+
- BUN-RUNTIME-EXECUTES-001
|
|
96
|
+
severity: 2
|
|
97
|
+
disposition: advisory
|
|
98
|
+
introduced_in: 0.1.0
|
|
99
|
+
core_design_refs:
|
|
100
|
+
- afokapu/atdd#1248
|
|
101
|
+
- afokapu/atdd#1251
|
|
102
|
+
implementation:
|
|
103
|
+
type: validator
|
|
104
|
+
ref: coder.bun.runtime-executes-the-declaration
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
schema_version: 1.1.0
|
|
2
|
+
rule_id: coder.bun.runtime-server-is-bun-serve
|
|
3
|
+
kind: rule
|
|
4
|
+
status: active
|
|
5
|
+
name: The HTTP server is Bun.serve, not a node-compat framework
|
|
6
|
+
statement: >-
|
|
7
|
+
A full-stack Bun application MUST serve HTTP with `Bun.serve` and MUST NOT construct a server with
|
|
8
|
+
Express, Fastify, Koa or `node:http`/`node:https` `createServer`. `Bun.serve` is the only server in
|
|
9
|
+
this stack with access to Bun's native routing, WebSocket upgrade, streaming and `HTMLRewriter` —
|
|
10
|
+
the last of which is how htmx fragments are transformed server-side. This is the Bun-stack
|
|
11
|
+
realization of the agnostic "the application uses its runtime's native primitives rather than a
|
|
12
|
+
compatibility shim" obligation, enforced by the `bun_fullstack_detector` family implementation on
|
|
13
|
+
`atdd.workspace.bun`.
|
|
14
|
+
terms:
|
|
15
|
+
- term_id: foreign_server
|
|
16
|
+
text: >-
|
|
17
|
+
`express()`, `fastify(`, `new Koa(`, `http.createServer(`, `https.createServer(` or a bare
|
|
18
|
+
`createServer(` — any construction that puts a node-compat HTTP server in front of the app.
|
|
19
|
+
- term_id: node_compat_path
|
|
20
|
+
text: >-
|
|
21
|
+
Bun's Node.js compatibility layer. It works, which is exactly why this drift is silent: the app
|
|
22
|
+
runs, the tests pass, and the stack has quietly become "Node with a faster interpreter".
|
|
23
|
+
content:
|
|
24
|
+
summary: >-
|
|
25
|
+
A "the server is Bun.serve" obligation. The realization is a zero-dependency Bun detector that
|
|
26
|
+
scans source with strings and comments MASKED (so a framework name inside a migration note or an
|
|
27
|
+
error message never trips it) and flags any foreign server construction.
|
|
28
|
+
normative_text: |
|
|
29
|
+
This is not a taste rule, and it is the load-bearing one for the stack decision itself. Running
|
|
30
|
+
Express under Bun keeps the entire npm middleware dependency surface, forfeits the native
|
|
31
|
+
primitives, and — most consequentially — invalidates the deployment story that motivated the move:
|
|
32
|
+
`bun run server.ts`, no bundle step, no `node_modules` at runtime. Once one route is served by a
|
|
33
|
+
foreign framework, the middleware ecosystem follows it, and the migration silently stops halfway.
|
|
34
|
+
For htmx specifically the cost is concrete rather than philosophical: `HTMLRewriter` is a streaming
|
|
35
|
+
HTML transformer available only through the Bun server, and it is the natural place to assemble and
|
|
36
|
+
post-process fragments.
|
|
37
|
+
fix_hint: |
|
|
38
|
+
Replace the framework server with the native one:
|
|
39
|
+
|
|
40
|
+
const app = express(); // ✗ node-compat path
|
|
41
|
+
app.get("/orders", (req, res) => …);
|
|
42
|
+
app.listen(3000);
|
|
43
|
+
|
|
44
|
+
Bun.serve({ // ✓ native
|
|
45
|
+
port: 3000,
|
|
46
|
+
routes: { "/orders": (req) => new Response(renderOrders(), htmlHeaders) },
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
Middleware becomes plain function composition around the handler. `strict` — the rule exists to
|
|
50
|
+
hold the stack decision, so it is not suppressible.
|
|
51
|
+
exceptions:
|
|
52
|
+
- A `createServer(` call that is not an HTTP server (a test double, an unrelated factory) is a known
|
|
53
|
+
imprecision of the name-based match; rename it or scope it out via the consumer scope map.
|
|
54
|
+
- Test files are excluded — spinning a throwaway server in a test is not an application server.
|
|
55
|
+
- Names appearing inside strings or comments are masked and never flagged.
|
|
56
|
+
metadata:
|
|
57
|
+
aliases:
|
|
58
|
+
- BUN-NATIVE-SERVER-001
|
|
59
|
+
severity: 2
|
|
60
|
+
disposition: strict
|
|
61
|
+
introduced_in: 0.1.0
|
|
62
|
+
implementation:
|
|
63
|
+
type: validator
|
|
64
|
+
ref: bun_fullstack_detector
|