@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,49 @@
|
|
|
1
|
+
schema_version: 1.1.0
|
|
2
|
+
rule_id: coder.bun.complexity-nesting
|
|
3
|
+
kind: rule
|
|
4
|
+
status: active
|
|
5
|
+
name: TypeScript function nesting depth stays at or below 4
|
|
6
|
+
statement: >-
|
|
7
|
+
Every TypeScript/TSX function MUST keep its maximum control-flow nesting depth at or below 4. Stack-
|
|
8
|
+
neutral obligation, NATIVE BUN detector transcribed from the python-pytest sibling
|
|
9
|
+
`coder.refactor.complexity-nesting-typescript` and verified numerically identical. Realized by
|
|
10
|
+
`bun_ts_metrics_detector` (core alias COMPLEXITY-NESTING-TS-001).
|
|
11
|
+
terms:
|
|
12
|
+
- term_id: control_depth
|
|
13
|
+
text: >-
|
|
14
|
+
the maximum brace depth reached on lines carrying a control keyword, measured relative to
|
|
15
|
+
the function's own base depth.
|
|
16
|
+
- term_id: guard_clause
|
|
17
|
+
text: >-
|
|
18
|
+
an inverted condition returning early. The usual way to remove a level without changing
|
|
19
|
+
behaviour.
|
|
20
|
+
content:
|
|
21
|
+
summary: >-
|
|
22
|
+
Depth is measured by brace balance on lines that also carry a control keyword (if / else / for / while
|
|
23
|
+
/ do / switch / try / catch / finally), relative to the function's own base depth.
|
|
24
|
+
normative_text: |
|
|
25
|
+
Nesting is the metric readers feel most directly: at depth five a reader must hold five simultaneous conditions to know whether a line executes, which is past what working memory does reliably.
|
|
26
|
+
It is also the most mechanically fixable — a guard clause or an extracted helper usually removes a level without changing behaviour, which is why the threshold is enforced rather than advised.
|
|
27
|
+
fix_hint: |
|
|
28
|
+
Flatten the control flow:
|
|
29
|
+
|
|
30
|
+
* invert conditions into early-return guard clauses,
|
|
31
|
+
* extract the innermost block into its own function,
|
|
32
|
+
* replace a nested loop with a single pass over a prepared collection.
|
|
33
|
+
exceptions:
|
|
34
|
+
- Functions with fewer than 3 code lines are not scored.
|
|
35
|
+
- Comment lines are ignored when measuring brace balance.
|
|
36
|
+
- Test files and vendored/build directories are outside the scan.
|
|
37
|
+
metadata:
|
|
38
|
+
aliases:
|
|
39
|
+
# COMPLEXITY-NESTING-TS-001 is the SHARED core alias, also carried by the agnostic node and by
|
|
40
|
+
# its python-pytest realization. One obligation, two detectors, two runtimes.
|
|
41
|
+
- COMPLEXITY-NESTING-TS-001
|
|
42
|
+
severity: 3
|
|
43
|
+
# `strict`, matching the python-pytest sibling exactly. A repo adopting this on an
|
|
44
|
+
# existing codebase records a ratchet baseline rather than lowering the threshold.
|
|
45
|
+
disposition: strict
|
|
46
|
+
introduced_in: 0.1.0
|
|
47
|
+
implementation:
|
|
48
|
+
type: validator
|
|
49
|
+
ref: bun_ts_metrics_detector
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
schema_version: 1.1.0
|
|
2
|
+
rule_id: coder.bun.composition-consumer
|
|
3
|
+
kind: rule
|
|
4
|
+
status: active
|
|
5
|
+
name: Consumer layers receive their collaborators
|
|
6
|
+
statement: >-
|
|
7
|
+
A module in the `presentation/` or `application/` layer MUST receive its collaborators by injection
|
|
8
|
+
rather than constructing them. Bun realization mirroring `coder.convex.composition-consumer`; core
|
|
9
|
+
obligation `coder.refactor.composition-consumer`.
|
|
10
|
+
terms:
|
|
11
|
+
- term_id: consumer_layer
|
|
12
|
+
text: >-
|
|
13
|
+
presentation or application — a layer that USES collaborators rather than assembling them.
|
|
14
|
+
- term_id: injection
|
|
15
|
+
text: >-
|
|
16
|
+
receiving a collaborator as a parameter or pre-wired. A consumer that builds its own cannot
|
|
17
|
+
be tested without them.
|
|
18
|
+
content:
|
|
19
|
+
summary: >-
|
|
20
|
+
Flags a `new <Collaborator>()` inside a consumer layer.
|
|
21
|
+
normative_text: |
|
|
22
|
+
The sibling of `composition-root`, and the half that makes the discipline pay. That rule says where wiring MAY happen; this one says consumers must accept what they are given.
|
|
23
|
+
A consumer that builds its own collaborators cannot be tested without them — which is exactly how a unit test acquires a database.
|
|
24
|
+
fix_hint: |
|
|
25
|
+
Take the collaborator as a parameter, and let the composition root supply it.
|
|
26
|
+
exceptions:
|
|
27
|
+
- Test files and vendored/build directories are never scanned.
|
|
28
|
+
- Bare npm specifiers resolve outside the project graph and are not layer-checked.
|
|
29
|
+
- A file carrying no layer segment is outside these rules rather than in violation of them.
|
|
30
|
+
metadata:
|
|
31
|
+
aliases:
|
|
32
|
+
# Mirrored rule-for-rule from coder.convex.composition-consumer
|
|
33
|
+
# Core obligation: coder.refactor.composition-consumer
|
|
34
|
+
- BUN-COMPOSITION-CONSUMER-001
|
|
35
|
+
severity: 3
|
|
36
|
+
disposition: strict
|
|
37
|
+
introduced_in: 0.1.0
|
|
38
|
+
implementation:
|
|
39
|
+
type: validator
|
|
40
|
+
ref: bun_clean_architecture_detector
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
schema_version: 1.1.0
|
|
2
|
+
rule_id: coder.bun.composition-root
|
|
3
|
+
kind: rule
|
|
4
|
+
status: active
|
|
5
|
+
name: Wiring is confined to a composition root
|
|
6
|
+
statement: >-
|
|
7
|
+
Instantiation of a feature's collaborators (`*Repository`, `*Client`, `*Service`, `*Adapter`,
|
|
8
|
+
`*Gateway`, `*Store`, `*Provider`, `*Factory`) MUST happen only in a composition root —
|
|
9
|
+
`composition.ts`, `wagon.ts`, `server.ts`, `index.ts`. Bun realization mirroring
|
|
10
|
+
`coder.convex.composition-root`; core obligation `coder.refactor.composition-root`.
|
|
11
|
+
terms:
|
|
12
|
+
- term_id: composition_root
|
|
13
|
+
text: >-
|
|
14
|
+
composition.ts, wagon.ts, server.ts or index.ts. server.ts counts because Bun.serve IS the
|
|
15
|
+
assembly point of a full-stack Bun app.
|
|
16
|
+
- term_id: collaborator
|
|
17
|
+
text: >-
|
|
18
|
+
a *Repository, *Client, *Service, *Adapter, *Gateway, *Store, *Provider or *Factory — the
|
|
19
|
+
things whose wiring must be confined.
|
|
20
|
+
content:
|
|
21
|
+
summary: >-
|
|
22
|
+
Flags a `new <Collaborator>()` outside a composition root, over string- and comment-masked source.
|
|
23
|
+
normative_text: |
|
|
24
|
+
`server.ts` is a root in this stack specifically because `Bun.serve` IS the assembly point of a full-stack Bun app — the place routes and their dependencies are wired. The Convex sibling has no equivalent because its function tree has no single entry.
|
|
25
|
+
Wiring scattered across a codebase is not a style problem: it is why a test cannot substitute anything, and why a second deployment shape becomes a rewrite.
|
|
26
|
+
fix_hint: |
|
|
27
|
+
Construct the collaborator in the composition root and pass it to whatever needs it.
|
|
28
|
+
exceptions:
|
|
29
|
+
- Test files and vendored/build directories are never scanned.
|
|
30
|
+
- Bare npm specifiers resolve outside the project graph and are not layer-checked.
|
|
31
|
+
- A file carrying no layer segment is outside these rules rather than in violation of them.
|
|
32
|
+
metadata:
|
|
33
|
+
aliases:
|
|
34
|
+
# Mirrored rule-for-rule from coder.convex.composition-root
|
|
35
|
+
# Core obligation: coder.refactor.composition-root
|
|
36
|
+
- BUN-COMPOSITION-ROOT-001
|
|
37
|
+
severity: 3
|
|
38
|
+
disposition: strict
|
|
39
|
+
introduced_in: 0.1.0
|
|
40
|
+
implementation:
|
|
41
|
+
type: validator
|
|
42
|
+
ref: bun_clean_architecture_detector
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
schema_version: 1.1.0
|
|
2
|
+
rule_id: coder.bun.dead-code-reachability
|
|
3
|
+
kind: rule
|
|
4
|
+
status: active
|
|
5
|
+
name: Every TypeScript file is reachable from a structural root
|
|
6
|
+
statement: >-
|
|
7
|
+
Every TypeScript/TSX file MUST be reachable, forwards or backwards, from a structural root (`index`,
|
|
8
|
+
`wagon`, `composition`, `main`, `app`) through the module import graph. Stack-neutral obligation, NATIVE
|
|
9
|
+
BUN detector; the traversal and root vocabulary are transcribed from the python-pytest sibling
|
|
10
|
+
`coder.dead-code.reachability-typescript`, but the import graph is built by Bun's in-process TypeScript
|
|
11
|
+
parser rather than by regex. Realized by `bun_ts_metrics_detector` (core alias DEAD-CODE-REACHABILITY-
|
|
12
|
+
TS-001).
|
|
13
|
+
terms:
|
|
14
|
+
- term_id: structural_root
|
|
15
|
+
text: >-
|
|
16
|
+
a file the graph is walked from: index, wagon, composition, main or app.
|
|
17
|
+
- term_id: type_only_import
|
|
18
|
+
text: >-
|
|
19
|
+
an `import type` edge. Erased at compile time, so it creates no runtime edge and cannot keep
|
|
20
|
+
a module alive — a distinction a regex cannot make and Bun's parser can.
|
|
21
|
+
content:
|
|
22
|
+
summary: >-
|
|
23
|
+
Builds the file import graph, walks it from the structural roots in both directions, and reports every
|
|
24
|
+
file in neither reachable set. Import specifiers resolve relative or through the `@/` alias; npm
|
|
25
|
+
specifiers are outside the graph.
|
|
26
|
+
normative_text: |
|
|
27
|
+
This rule is MORE ACCURATE than its Python sibling, and the difference is worth stating because it is the one place the port is not a transcription.
|
|
28
|
+
The Python detector reads imports with five regexes — the best a Python process can do without a TypeScript parser. A regex cannot distinguish `import type { T } from "./t"` from a value import, so a module whose only referrer is a TYPE import is counted as reachable. But a type-only import is erased at compile time and creates no runtime edge, so that module is dead and the regex reports it alive.
|
|
29
|
+
Bun ships a real TypeScript parser in-process, which returns the actual import records and omits type-only ones. Same obligation, measured correctly — and available only because the runtime is Bun. Verified on a fixture where the Python detector finds one dead file and this one finds two.
|
|
30
|
+
fix_hint: |
|
|
31
|
+
Either wire the file into the graph — import it from the module that should own it — or delete it. A file reachable only through a type import is a types module whose values have already been removed; move the type into the module that uses it.
|
|
32
|
+
exceptions:
|
|
33
|
+
- "`index.ts` / `index.tsx` are structural (like `__init__.py`) and are never reported."
|
|
34
|
+
- Test files are entrypoints, not dead code, and are excluded.
|
|
35
|
+
- A scan root containing no structural root is skipped rather than reporting every file as dead.
|
|
36
|
+
- npm/bare specifiers are outside the graph by construction.
|
|
37
|
+
metadata:
|
|
38
|
+
aliases:
|
|
39
|
+
# DEAD-CODE-REACHABILITY-TS-001 is the SHARED core alias, also carried by the agnostic node and by
|
|
40
|
+
# its python-pytest realization. One obligation, two detectors, two runtimes.
|
|
41
|
+
- DEAD-CODE-REACHABILITY-TS-001
|
|
42
|
+
severity: 2
|
|
43
|
+
# `strict`, matching the python-pytest sibling exactly. A repo adopting this on an
|
|
44
|
+
# existing codebase records a ratchet baseline rather than lowering the threshold.
|
|
45
|
+
disposition: strict
|
|
46
|
+
introduced_in: 0.1.0
|
|
47
|
+
implementation:
|
|
48
|
+
type: validator
|
|
49
|
+
ref: bun_ts_metrics_detector
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
schema_version: 1.1.0
|
|
2
|
+
rule_id: coder.bun.design-hierarchy-import
|
|
3
|
+
kind: rule
|
|
4
|
+
status: active
|
|
5
|
+
name: Imports point inward through the layer hierarchy
|
|
6
|
+
statement: >-
|
|
7
|
+
A module MUST import only inward: presentation -> application -> domain; integration -> application,
|
|
8
|
+
domain; assembly (the composition root) may reach any layer. Bun realization mirroring
|
|
9
|
+
`coder.convex.design-hierarchy-import`; core obligation `coder.backend.imports-respect-dependency-
|
|
10
|
+
allowed`.
|
|
11
|
+
terms:
|
|
12
|
+
- term_id: inward_import
|
|
13
|
+
text: >-
|
|
14
|
+
presentation -> application -> domain; integration -> application, domain. The permitted
|
|
15
|
+
direction.
|
|
16
|
+
- term_id: assembly_exemption
|
|
17
|
+
text: >-
|
|
18
|
+
the composition root's freedom to reach any layer. Something must know about everything;
|
|
19
|
+
confining that to one place is the point of having a root.
|
|
20
|
+
content:
|
|
21
|
+
summary: >-
|
|
22
|
+
Resolves each import to its target layer and flags an edge the hierarchy does not permit.
|
|
23
|
+
normative_text: |
|
|
24
|
+
This is the general rule the commons rules apply to one tree. It is stated separately because it governs FEATURE code as well, where most layering damage actually happens.
|
|
25
|
+
The assembly exemption is what makes the rest workable: something must be allowed to know about everything, and confining that to the composition root is the whole point of having one.
|
|
26
|
+
fix_hint: |
|
|
27
|
+
Depend inward, or invert the dependency with a port. If neither is possible the two modules probably belong in one layer.
|
|
28
|
+
exceptions:
|
|
29
|
+
- Test files and vendored/build directories are never scanned.
|
|
30
|
+
- Bare npm specifiers resolve outside the project graph and are not layer-checked.
|
|
31
|
+
- A file carrying no layer segment is outside these rules rather than in violation of them.
|
|
32
|
+
metadata:
|
|
33
|
+
aliases:
|
|
34
|
+
# Mirrored rule-for-rule from coder.convex.design-hierarchy-import
|
|
35
|
+
# Core obligation: coder.backend.imports-respect-dependency-allowed
|
|
36
|
+
- BUN-DESIGN-HIERARCHY-IMPORT-001
|
|
37
|
+
severity: 3
|
|
38
|
+
disposition: strict
|
|
39
|
+
introduced_in: 0.1.0
|
|
40
|
+
implementation:
|
|
41
|
+
type: validator
|
|
42
|
+
ref: bun_clean_architecture_detector
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
schema_version: 1.1.0
|
|
2
|
+
rule_id: coder.bun.dto-mapper
|
|
3
|
+
kind: rule
|
|
4
|
+
status: active
|
|
5
|
+
name: DTO mappers live in integration/
|
|
6
|
+
statement: >-
|
|
7
|
+
A function mapping between a DTO and a domain entity (`to*DTO`, `from*DTO`, `map*DTO*`) MUST live in the
|
|
8
|
+
`integration/` layer. Bun realization mirroring `coder.convex.dto-mapper`; core obligation
|
|
9
|
+
`coder.dto.mapper`.
|
|
10
|
+
terms:
|
|
11
|
+
- term_id: dto_mapper
|
|
12
|
+
text: >-
|
|
13
|
+
a function translating between a DTO and a domain entity: `to*DTO`, `from*DTO`, `map*DTO*`.
|
|
14
|
+
- term_id: translation_layer
|
|
15
|
+
text: >-
|
|
16
|
+
integration — where a boundary crossing legitimately sees both sides.
|
|
17
|
+
content:
|
|
18
|
+
summary: >-
|
|
19
|
+
Flags a DTO-mapper function declared in any layer other than integration.
|
|
20
|
+
normative_text: |
|
|
21
|
+
Mapping is translation across a boundary, which is precisely what the integration layer is for. A mapper in the domain drags the wire format inward; a mapper in presentation duplicates itself once a second caller appears.
|
|
22
|
+
fix_hint: |
|
|
23
|
+
Move the mapper to `integration/`, where both the DTO and the entity are legitimately visible.
|
|
24
|
+
exceptions:
|
|
25
|
+
- Test files and vendored/build directories are never scanned.
|
|
26
|
+
- Bare npm specifiers resolve outside the project graph and are not layer-checked.
|
|
27
|
+
- A file carrying no layer segment is outside these rules rather than in violation of them.
|
|
28
|
+
metadata:
|
|
29
|
+
aliases:
|
|
30
|
+
# Mirrored rule-for-rule from coder.convex.dto-mapper
|
|
31
|
+
# Core obligation: coder.dto.mapper
|
|
32
|
+
- BUN-DTO-MAPPER-001
|
|
33
|
+
severity: 3
|
|
34
|
+
disposition: advisory
|
|
35
|
+
introduced_in: 0.1.0
|
|
36
|
+
implementation:
|
|
37
|
+
type: validator
|
|
38
|
+
ref: bun_clean_architecture_detector
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
schema_version: 1.1.0
|
|
2
|
+
rule_id: coder.bun.dto-placement
|
|
3
|
+
kind: rule
|
|
4
|
+
status: active
|
|
5
|
+
name: DTOs are declared in contracts/
|
|
6
|
+
statement: >-
|
|
7
|
+
A `*DTO` type MUST be declared inside a `contracts/` module, not inside a feature's internal layer. Bun
|
|
8
|
+
realization mirroring `coder.convex.dto-placement`; core obligation `coder.dto.placement`.
|
|
9
|
+
terms:
|
|
10
|
+
- term_id: contracts_module
|
|
11
|
+
text: >-
|
|
12
|
+
a path segment `contracts` — where a boundary shape belongs, since it is owned by neither
|
|
13
|
+
side.
|
|
14
|
+
- term_id: private_type_leak
|
|
15
|
+
text: >-
|
|
16
|
+
a DTO declared inside one feature's layer that another feature imports anyway, running the
|
|
17
|
+
boundary through somebody's internals.
|
|
18
|
+
content:
|
|
19
|
+
summary: >-
|
|
20
|
+
Flags a `*DTO` declaration in a file whose path contains no `contracts` segment.
|
|
21
|
+
normative_text: |
|
|
22
|
+
A DTO belongs to the contract, not to either side of it. Declared inside one feature's layer it becomes that feature's private type that another feature imports anyway — and the boundary it was meant to define now runs through somebody's internals.
|
|
23
|
+
fix_hint: |
|
|
24
|
+
Move the type to `contracts/` and import it from both sides.
|
|
25
|
+
exceptions:
|
|
26
|
+
- Test files and vendored/build directories are never scanned.
|
|
27
|
+
- Bare npm specifiers resolve outside the project graph and are not layer-checked.
|
|
28
|
+
- A file carrying no layer segment is outside these rules rather than in violation of them.
|
|
29
|
+
metadata:
|
|
30
|
+
aliases:
|
|
31
|
+
# Mirrored rule-for-rule from coder.convex.dto-placement
|
|
32
|
+
# Core obligation: coder.dto.placement
|
|
33
|
+
- BUN-DTO-PLACEMENT-001
|
|
34
|
+
severity: 3
|
|
35
|
+
disposition: advisory
|
|
36
|
+
introduced_in: 0.1.0
|
|
37
|
+
implementation:
|
|
38
|
+
type: validator
|
|
39
|
+
ref: bun_clean_architecture_detector
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
schema_version: 1.1.0
|
|
2
|
+
rule_id: coder.bun.dto-purity
|
|
3
|
+
kind: rule
|
|
4
|
+
status: active
|
|
5
|
+
name: DTOs are pure immutable data
|
|
6
|
+
statement: >-
|
|
7
|
+
A `*DTO` type or interface MUST have no method members and no non-`readonly` fields. Bun realization
|
|
8
|
+
mirroring `coder.convex.dto-purity`; core obligation `coder.dto.purity`.
|
|
9
|
+
terms:
|
|
10
|
+
- term_id: dto
|
|
11
|
+
text: >-
|
|
12
|
+
a `*DTO` type or interface — the shape crossing a boundary.
|
|
13
|
+
- term_id: pure_data
|
|
14
|
+
text: >-
|
|
15
|
+
no method members, every field readonly. A method means behaviour crossed too; a mutable
|
|
16
|
+
field means the receiver can change what the sender said.
|
|
17
|
+
content:
|
|
18
|
+
summary: >-
|
|
19
|
+
Parses each `*DTO` declaration body, splits its members on `;`/newline/`,`, and flags method members
|
|
20
|
+
or non-readonly fields.
|
|
21
|
+
normative_text: |
|
|
22
|
+
A DTO is the shape crossing a boundary. A method on it means behaviour crossed too, and the two sides are now coupled to an implementation rather than to data. A mutable field means the receiver can change what the sender said.
|
|
23
|
+
Both faults look harmless in one file and become impossible to unpick once a second consumer exists.
|
|
24
|
+
fix_hint: |
|
|
25
|
+
Strip methods to free functions in the layer that needs them, and mark every field `readonly`.
|
|
26
|
+
exceptions:
|
|
27
|
+
- Test files and vendored/build directories are never scanned.
|
|
28
|
+
- Bare npm specifiers resolve outside the project graph and are not layer-checked.
|
|
29
|
+
- A file carrying no layer segment is outside these rules rather than in violation of them.
|
|
30
|
+
metadata:
|
|
31
|
+
aliases:
|
|
32
|
+
# Mirrored rule-for-rule from coder.convex.dto-purity
|
|
33
|
+
# Core obligation: coder.dto.purity
|
|
34
|
+
- BUN-DTO-PURITY-001
|
|
35
|
+
severity: 3
|
|
36
|
+
disposition: advisory
|
|
37
|
+
introduced_in: 0.1.0
|
|
38
|
+
implementation:
|
|
39
|
+
type: validator
|
|
40
|
+
ref: bun_clean_architecture_detector
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
schema_version: 1.1.0
|
|
2
|
+
rule_id: coder.bun.duplication-intra-layer
|
|
3
|
+
kind: rule
|
|
4
|
+
status: active
|
|
5
|
+
name: No duplicated code fragments within one architectural layer
|
|
6
|
+
statement: >-
|
|
7
|
+
No run of 7 or more non-trivial normalized lines may appear in two different TypeScript files of the
|
|
8
|
+
SAME architectural layer. Stack-neutral obligation, NATIVE BUN detector transcribed from the python-
|
|
9
|
+
pytest sibling `coder.duplication.no-intra-layer-code-typescript`, including the normalization table and
|
|
10
|
+
the sha256-prefix fingerprint. Realized by `bun_ts_metrics_detector` (core alias DUPLICATION-TS-001).
|
|
11
|
+
terms:
|
|
12
|
+
- term_id: normalized_fragment
|
|
13
|
+
text: >-
|
|
14
|
+
a window of 7 non-trivial lines with comments stripped, string literals folded to "S",
|
|
15
|
+
numbers to 0 and non-keyword identifiers to ID, so renaming a variable cannot hide a
|
|
16
|
+
duplicate.
|
|
17
|
+
- term_id: intra_layer
|
|
18
|
+
text: >-
|
|
19
|
+
within one architectural layer. The same shape in two different layers is usually two
|
|
20
|
+
obligations that happen to look alike.
|
|
21
|
+
content:
|
|
22
|
+
summary: >-
|
|
23
|
+
Each line is normalized — comments stripped, string literals folded to "S", numbers to 0, non-keyword
|
|
24
|
+
identifiers to ID — trivial lines dropped, then every sliding window of 7 lines is fingerprinted and
|
|
25
|
+
compared within a layer.
|
|
26
|
+
normative_text: |
|
|
27
|
+
Normalization is what makes the rule useful: because identifiers are folded, renaming a variable does not hide a duplicate, so the fingerprint tracks STRUCTURE rather than text.
|
|
28
|
+
The intra-layer restriction is equally deliberate. The same shape appearing in `domain/` and in `presentation/` is usually two different obligations that happen to look alike, and merging them couples layers that should move independently. Twice inside one layer is the shape that genuinely wanted extracting.
|
|
29
|
+
fix_hint: |
|
|
30
|
+
Extract the duplicated fragment into a shared function within that layer and call it from both sites. If the two copies are drifting apart on purpose, they are not duplicates — make the difference explicit so the normalized fingerprints stop matching.
|
|
31
|
+
exceptions:
|
|
32
|
+
- Test, spec, and `.d.ts` files are excluded, as are `index.ts` barrels and `__tests__` directories.
|
|
33
|
+
- Trivial lines (bare braces, closing punctuation) are not counted toward the 7.
|
|
34
|
+
- Files whose layer cannot be determined are compared only against each other.
|
|
35
|
+
metadata:
|
|
36
|
+
aliases:
|
|
37
|
+
# DUPLICATION-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
|
+
- DUPLICATION-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,47 @@
|
|
|
1
|
+
schema_version: 1.1.0
|
|
2
|
+
rule_id: coder.bun.error-response-bare-string
|
|
3
|
+
kind: rule
|
|
4
|
+
status: active
|
|
5
|
+
name: Error responses return a structured payload, not a bare string
|
|
6
|
+
statement: >-
|
|
7
|
+
A `Response` with a 4xx or 5xx status MUST NOT have a bare string literal as its body; it MUST carry a
|
|
8
|
+
structured payload with an error code. Stack-neutral obligation, RE-REALIZED for Bun: the python-pytest
|
|
9
|
+
sibling matches FastAPI's `HTTPException(detail="...")`, which does not exist here — a Bun error IS a
|
|
10
|
+
`Response` with a status. Realized by `bun_security_hygiene_detector` (core alias ERROR-BARE-
|
|
11
|
+
STRING-001).
|
|
12
|
+
terms:
|
|
13
|
+
- term_id: error_response
|
|
14
|
+
text: >-
|
|
15
|
+
a `Response` carrying a 4xx or 5xx status.
|
|
16
|
+
- term_id: rendered_verbatim
|
|
17
|
+
text: >-
|
|
18
|
+
what htmx does with a bare error string: swaps it into the live DOM, internal detail
|
|
19
|
+
included. The structured payload is also the boundary that stops leakage.
|
|
20
|
+
content:
|
|
21
|
+
summary: >-
|
|
22
|
+
Flags `new Response("<literal>", { status: 4xx|5xx })`.
|
|
23
|
+
normative_text: |
|
|
24
|
+
This obligation is sharper in an htmx application than in a JSON API, and the difference is the reason it is worth enforcing rather than advising.
|
|
25
|
+
htmx swaps the response body into the live DOM. A bare error string is therefore not merely unstructured data that a client must parse — it is markup RENDERED TO THE USER verbatim, including whatever internal detail it happens to carry (a stack frame, a table name, an upstream message). The structured payload is both the machine-readable contract and the boundary that stops internals leaking into the page.
|
|
26
|
+
fix_hint: |
|
|
27
|
+
Return a coded payload, and render a fragment for the user separately:
|
|
28
|
+
|
|
29
|
+
return new Response("order not found", { status: 404 }); // wrong
|
|
30
|
+
return Response.json({ error_code: "ORDER_NOT_FOUND" }, { status: 404 }); // right
|
|
31
|
+
exceptions:
|
|
32
|
+
- 2xx and 3xx responses are out of scope.
|
|
33
|
+
- A response whose body is a variable or a rendered fragment is not a bare literal.
|
|
34
|
+
- Test files are excluded.
|
|
35
|
+
metadata:
|
|
36
|
+
aliases:
|
|
37
|
+
# ERROR-BARE-STRING-001 is the SHARED core alias, also carried by the agnostic node and its
|
|
38
|
+
# python-pytest realization.
|
|
39
|
+
- ERROR-BARE-STRING-001
|
|
40
|
+
severity: 4
|
|
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,46 @@
|
|
|
1
|
+
schema_version: 1.1.0
|
|
2
|
+
rule_id: coder.bun.error-response-code-format
|
|
3
|
+
kind: rule
|
|
4
|
+
status: active
|
|
5
|
+
name: Error codes are UPPER_SNAKE_CASE
|
|
6
|
+
statement: >-
|
|
7
|
+
An `error_code` value MUST be UPPER_SNAKE_CASE. Stack-neutral obligation, and the second of only two
|
|
8
|
+
rules in this family that PORTS verbatim: the payload is JSON, so the pattern and the case test carry
|
|
9
|
+
over from the python-pytest sibling `coder.error-response.code-format` unchanged. Realized by
|
|
10
|
+
`bun_security_hygiene_detector` (core alias ERROR-CODE-FORMAT-001).
|
|
11
|
+
terms:
|
|
12
|
+
- term_id: error_code
|
|
13
|
+
text: >-
|
|
14
|
+
the machine key a client branches on. Once it does, the spelling is API surface.
|
|
15
|
+
- term_id: upper_snake_case
|
|
16
|
+
text: >-
|
|
17
|
+
`^[A-Z][A-Z0-9_]+$`. The convention itself is arbitrary; that it is uniform is not.
|
|
18
|
+
content:
|
|
19
|
+
summary: >-
|
|
20
|
+
Matches `"error_code": "<value>"` (and the `errorCode` spelling) and tests the value against
|
|
21
|
+
`^[A-Z][A-Z0-9_]+$`.
|
|
22
|
+
normative_text: |
|
|
23
|
+
An error code is a machine key, and the moment a client branches on it its spelling becomes API surface. An inconsistent set — `notFound` beside `NOT_FOUND` — produces two codes for one condition, and no amount of testing reconciles them because both are 'working'.
|
|
24
|
+
The case convention itself is arbitrary; that it is uniform is not.
|
|
25
|
+
fix_hint: |
|
|
26
|
+
Use UPPER_SNAKE_CASE consistently:
|
|
27
|
+
|
|
28
|
+
{ error_code: "orderNotFound" } // wrong
|
|
29
|
+
{ error_code: "ORDER_NOT_FOUND" } // right
|
|
30
|
+
exceptions:
|
|
31
|
+
- Only the `error_code` / `errorCode` key is checked; other string values are out of scope.
|
|
32
|
+
- Human-readable messages belong in a separate field and are not constrained.
|
|
33
|
+
- Test files are excluded.
|
|
34
|
+
metadata:
|
|
35
|
+
aliases:
|
|
36
|
+
# ERROR-CODE-FORMAT-001 is the SHARED core alias, also carried by the agnostic node and its
|
|
37
|
+
# python-pytest realization.
|
|
38
|
+
- ERROR-CODE-FORMAT-001
|
|
39
|
+
severity: 4
|
|
40
|
+
# PORTED verbatim from the python-pytest sibling — the pattern is
|
|
41
|
+
# language-neutral, so both providers produce the same findings.
|
|
42
|
+
disposition: strict
|
|
43
|
+
introduced_in: 0.1.0
|
|
44
|
+
implementation:
|
|
45
|
+
type: validator
|
|
46
|
+
ref: bun_security_hygiene_detector
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
schema_version: 1.1.0
|
|
2
|
+
rule_id: coder.bun.green-header-order
|
|
3
|
+
kind: rule
|
|
4
|
+
status: active
|
|
5
|
+
name: Header fields appear in the canonical order
|
|
6
|
+
statement: >-
|
|
7
|
+
Where present, header fields MUST appear as URN -> Tested-By -> Runtime -> Purpose. Stack-neutral
|
|
8
|
+
obligation, Bun-specific detector; realized by `bun_green_traceability_detector` (core alias GREEN-
|
|
9
|
+
HEADER-004).
|
|
10
|
+
terms:
|
|
11
|
+
- term_id: canonical_order
|
|
12
|
+
text: >-
|
|
13
|
+
URN -> Tested-By -> Runtime -> Purpose. Identity, then proof, then execution context, then
|
|
14
|
+
intent.
|
|
15
|
+
- term_id: present_field
|
|
16
|
+
text: >-
|
|
17
|
+
a header field the file actually carries. Absent fields are skipped so this rule never
|
|
18
|
+
double-reports what another rule owns.
|
|
19
|
+
content:
|
|
20
|
+
summary: >-
|
|
21
|
+
An "ordered header" obligation. The detector collects the line numbers of the fields that are present
|
|
22
|
+
and reports the first that appears before its predecessor. Absent fields are skipped — their absence
|
|
23
|
+
belongs to the field's own rule.
|
|
24
|
+
normative_text: |
|
|
25
|
+
The order is the same in Python, Vite and here, and its value is that a reader — human or tool — knows where to look without parsing. Identity first, then proof, then execution context, then intent: each field answers the question the previous one raises.
|
|
26
|
+
The rule judges only fields that are present, so it never double-reports a missing field that another rule already owns.
|
|
27
|
+
fix_hint: |
|
|
28
|
+
Order the fields URN -> Tested-By -> Runtime -> Purpose:
|
|
29
|
+
|
|
30
|
+
// URN: component:orders:checkout:OrderRow:backend:presentation
|
|
31
|
+
// Tested-By:
|
|
32
|
+
// - test:orders:checkout:E001-SMOKE-001-renders-row
|
|
33
|
+
// Runtime: bun
|
|
34
|
+
// Purpose: render one order row fragment for htmx to swap
|
|
35
|
+
exceptions:
|
|
36
|
+
- Files with no URN are skipped — there is nothing to order against.
|
|
37
|
+
- Fields that are absent are not considered; presence is each field's own rule.
|
|
38
|
+
- Other comment lines may be interleaved.
|
|
39
|
+
metadata:
|
|
40
|
+
aliases:
|
|
41
|
+
# GREEN-HEADER-004 is the SHARED core alias — the same one carried by the Python
|
|
42
|
+
# realization and by coder.vite.green-header-order. One obligation, three
|
|
43
|
+
# per-stack detectors, found through this alias.
|
|
44
|
+
- GREEN-HEADER-004
|
|
45
|
+
- BUN-GREEN-HEADER-ORDER-001
|
|
46
|
+
severity: 2
|
|
47
|
+
# DIVERGENCE FROM THE VITE/PYTHON REALIZATIONS, deliberate and reversible.
|
|
48
|
+
# Those two carry `documentation-only`, which core's coverage_report treats as
|
|
49
|
+
# never-fails-the-build — the right call when RETROFITTING a large existing
|
|
50
|
+
# codebase, where day-one enforcement would red every file at once.
|
|
51
|
+
# A new Bun + htmx repo has no such debt: headers can be present from the first
|
|
52
|
+
# file, and a traceability rule that cannot fail is a rule that will quietly not
|
|
53
|
+
# be adopted. `suppress-and-clean` fails on violation AND is ratchetable, so an
|
|
54
|
+
# existing repo adopting this can still `--record-ratchet` a baseline and be held
|
|
55
|
+
# flat rather than blocked. Change this one field back to `documentation-only`
|
|
56
|
+
# for exact Vite parity.
|
|
57
|
+
disposition: suppress-and-clean
|
|
58
|
+
introduced_in: 0.1.0
|
|
59
|
+
implementation:
|
|
60
|
+
type: validator
|
|
61
|
+
ref: bun_green_traceability_detector
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
schema_version: 1.1.0
|
|
2
|
+
rule_id: coder.bun.green-header-purpose
|
|
3
|
+
kind: rule
|
|
4
|
+
status: active
|
|
5
|
+
name: The header states the file's purpose in one line
|
|
6
|
+
statement: >-
|
|
7
|
+
Every implementation file MUST carry a `Purpose:` description of at most 80 characters. Stack-neutral
|
|
8
|
+
obligation, Bun-specific detector; realized by `bun_green_traceability_detector` (core alias GREEN-
|
|
9
|
+
HEADER-002).
|
|
10
|
+
terms:
|
|
11
|
+
- term_id: purpose_line
|
|
12
|
+
text: >-
|
|
13
|
+
a single `Purpose:` line of at most 80 characters stating the file's one job.
|
|
14
|
+
- term_id: length_cap
|
|
15
|
+
text: >-
|
|
16
|
+
the 80-character limit. It forces one job to be named, and a purpose that will not fit is
|
|
17
|
+
evidence the file has more than one.
|
|
18
|
+
content:
|
|
19
|
+
summary: >-
|
|
20
|
+
A "one-line purpose" obligation: present, and 80 characters or fewer.
|
|
21
|
+
normative_text: |
|
|
22
|
+
The 80-character cap is the whole rule. An unbounded field becomes a paragraph, a paragraph goes stale, and a stale paragraph is worse than no description because it is believed. A single line that must fit forces the author to name the file's one job — and a file whose job will not fit in 80 characters is usually a file doing more than one thing, which makes this a design signal as much as a documentation rule.
|
|
23
|
+
fix_hint: |
|
|
24
|
+
State the one job in a single line:
|
|
25
|
+
|
|
26
|
+
// Purpose: render one order row fragment for htmx to swap
|
|
27
|
+
|
|
28
|
+
If it will not fit, that is evidence the file has more than one responsibility; split it rather than expanding the line.
|
|
29
|
+
exceptions:
|
|
30
|
+
- Exactly 80 characters passes; 81 does not.
|
|
31
|
+
- A missing description is reported at the URN line.
|
|
32
|
+
- Test files are excluded.
|
|
33
|
+
metadata:
|
|
34
|
+
aliases:
|
|
35
|
+
# GREEN-HEADER-002 is the SHARED core alias — the same one carried by the Python
|
|
36
|
+
# realization and by coder.vite.green-header-purpose. One obligation, three
|
|
37
|
+
# per-stack detectors, found through this alias.
|
|
38
|
+
- GREEN-HEADER-002
|
|
39
|
+
- BUN-GREEN-HEADER-PURPOSE-001
|
|
40
|
+
severity: 2
|
|
41
|
+
# DIVERGENCE FROM THE VITE/PYTHON REALIZATIONS, deliberate and reversible.
|
|
42
|
+
# Those two carry `documentation-only`, which core's coverage_report treats as
|
|
43
|
+
# never-fails-the-build — the right call when RETROFITTING a large existing
|
|
44
|
+
# codebase, where day-one enforcement would red every file at once.
|
|
45
|
+
# A new Bun + htmx repo has no such debt: headers can be present from the first
|
|
46
|
+
# file, and a traceability rule that cannot fail is a rule that will quietly not
|
|
47
|
+
# be adopted. `suppress-and-clean` fails on violation AND is ratchetable, so an
|
|
48
|
+
# existing repo adopting this can still `--record-ratchet` a baseline and be held
|
|
49
|
+
# flat rather than blocked. Change this one field back to `documentation-only`
|
|
50
|
+
# for exact Vite parity.
|
|
51
|
+
disposition: suppress-and-clean
|
|
52
|
+
introduced_in: 0.1.0
|
|
53
|
+
implementation:
|
|
54
|
+
type: validator
|
|
55
|
+
ref: bun_green_traceability_detector
|