@oddessentials/repo-standards 1.2.1 → 2.0.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.
@@ -35,6 +35,12 @@
35
35
  "id": "linting",
36
36
  "label": "Linting",
37
37
  "stack": {
38
+ "bazelHints": {
39
+ "commands": [
40
+ "bazel test //... --@io_bazel_rules_go//go/config:nogo=@//:nogo"
41
+ ],
42
+ "notes": "Use nogo for static analysis via rules_go. Configure nogo target with desired analyzers."
43
+ },
38
44
  "exampleConfigFiles": [
39
45
  ".golangci.yml",
40
46
  ".golangci.yaml"
@@ -64,6 +70,12 @@
64
70
  "id": "unit-test-runner",
65
71
  "label": "Unit Test Runner",
66
72
  "stack": {
73
+ "bazelHints": {
74
+ "commands": [
75
+ "bazel test //..."
76
+ ],
77
+ "notes": "rules_go go_test targets wrap 'go test' with Bazel's caching and hermeticity."
78
+ },
67
79
  "exampleConfigFiles": [
68
80
  "go.mod"
69
81
  ],
@@ -157,6 +169,12 @@
157
169
  "id": "unit-test-reporter",
158
170
  "label": "Unit Test Reporter / Coverage",
159
171
  "stack": {
172
+ "bazelHints": {
173
+ "commands": [
174
+ "bazel coverage //..."
175
+ ],
176
+ "notes": "rules_go supports coverage via bazel coverage. Use --combined_report=lcov for aggregated output."
177
+ },
160
178
  "exampleConfigFiles": [
161
179
  "go.mod"
162
180
  ],
@@ -178,6 +196,13 @@
178
196
  "id": "ci-quality-gates",
179
197
  "label": "CI Quality Gates",
180
198
  "stack": {
199
+ "bazelHints": {
200
+ "commands": [
201
+ "bazel build //...",
202
+ "bazel test //..."
203
+ ],
204
+ "notes": "rules_go go_binary and go_test targets provide hermetic builds and tests."
205
+ },
181
206
  "exampleConfigFiles": [
182
207
  ".github/workflows/*",
183
208
  "azure-pipelines.yml"
@@ -197,6 +222,12 @@
197
222
  "id": "code-formatter",
198
223
  "label": "Code Formatter",
199
224
  "stack": {
225
+ "bazelHints": {
226
+ "commands": [
227
+ "bazel run @go_sdk//:bin/gofmt -- -d ."
228
+ ],
229
+ "notes": "Run gofmt via the Bazel-managed Go SDK for hermetic formatting checks."
230
+ },
200
231
  "exampleConfigFiles": [],
201
232
  "exampleTools": [
202
233
  "gofmt",
@@ -238,6 +269,12 @@
238
269
  "id": "type-checking",
239
270
  "label": "Type Checking",
240
271
  "stack": {
272
+ "bazelHints": {
273
+ "commands": [
274
+ "bazel build //..."
275
+ ],
276
+ "notes": "Go type checking is inherent to compilation. bazel build with rules_go enforces type safety."
277
+ },
241
278
  "exampleConfigFiles": [
242
279
  "go.mod"
243
280
  ],
@@ -515,6 +552,43 @@
515
552
  "github-actions"
516
553
  ],
517
554
  "meta": {
555
+ "bazelIntegration": {
556
+ "advisoryNotice": "bazelHints are suggestions, not required execution paths. Consumers should prefer stack-native commands unless explicitly adopting Bazel.",
557
+ "ciContract": {
558
+ "configFlag": "--config=ci (define in .bazelrc)",
559
+ "deterministicFlags": [
560
+ "--nokeep_going",
561
+ "--test_output=errors"
562
+ ],
563
+ "remoteCache": "Optional; not required for CI",
564
+ "versionPinning": "Use .bazelversion file for Bazelisk"
565
+ },
566
+ "description": "Bazel build executor support for quality checks. All hints are ADVISORY—stack-native commands remain the default execution path.",
567
+ "detectionRules": {
568
+ "notes": "Detection uses repo-root markers only. Nested BUILD files do not trigger Bazel mode.",
569
+ "optionalMarkers": [
570
+ ".bazelrc",
571
+ ".bazelversion"
572
+ ],
573
+ "rootMarkers": [
574
+ "MODULE.bazel",
575
+ "WORKSPACE.bazel",
576
+ "WORKSPACE"
577
+ ]
578
+ },
579
+ "optOut": {
580
+ "configPath": "meta.bazelIntegration.enabled",
581
+ "description": "Set meta.bazelIntegration.enabled = false in repo config to disable Bazel hints"
582
+ },
583
+ "targetConventions": {
584
+ "build": "bazel build //...",
585
+ "coverage": "bazel coverage //...",
586
+ "description": "Recommended target naming (not assumed to exist). These are illustrative patterns; actual targets are repo-defined.",
587
+ "format": "bazel run //tools/format:check",
588
+ "lint": "//tools/lint:lint or bazel test //... with lint aspects",
589
+ "test": "bazel test //..."
590
+ }
591
+ },
518
592
  "complexityChecks": {
519
593
  "description": "When supported by the stack, run cyclomatic complexity or similar metrics in CI as a warning-only check initially.",
520
594
  "enabledByDefault": true
@@ -41,6 +41,12 @@
41
41
  "id": "linting",
42
42
  "label": "Linting",
43
43
  "stack": {
44
+ "bazelHints": {
45
+ "commands": [
46
+ "bazel test //... --@io_bazel_rules_go//go/config:nogo=@//:nogo"
47
+ ],
48
+ "notes": "Use nogo for static analysis via rules_go. Configure nogo target with desired analyzers."
49
+ },
44
50
  "exampleConfigFiles": [
45
51
  ".golangci.yml",
46
52
  ".golangci.yaml"
@@ -73,6 +79,12 @@
73
79
  "id": "unit-test-runner",
74
80
  "label": "Unit Test Runner",
75
81
  "stack": {
82
+ "bazelHints": {
83
+ "commands": [
84
+ "bazel test //..."
85
+ ],
86
+ "notes": "rules_go go_test targets wrap 'go test' with Bazel's caching and hermeticity."
87
+ },
76
88
  "exampleConfigFiles": [
77
89
  "go.mod"
78
90
  ],
@@ -178,6 +190,12 @@
178
190
  "id": "unit-test-reporter",
179
191
  "label": "Unit Test Reporter / Coverage",
180
192
  "stack": {
193
+ "bazelHints": {
194
+ "commands": [
195
+ "bazel coverage //..."
196
+ ],
197
+ "notes": "rules_go supports coverage via bazel coverage. Use --combined_report=lcov for aggregated output."
198
+ },
181
199
  "exampleConfigFiles": [
182
200
  "go.mod"
183
201
  ],
@@ -202,6 +220,13 @@
202
220
  "id": "ci-quality-gates",
203
221
  "label": "CI Quality Gates",
204
222
  "stack": {
223
+ "bazelHints": {
224
+ "commands": [
225
+ "bazel build //...",
226
+ "bazel test //..."
227
+ ],
228
+ "notes": "rules_go go_binary and go_test targets provide hermetic builds and tests."
229
+ },
205
230
  "exampleConfigFiles": [
206
231
  ".github/workflows/*",
207
232
  "azure-pipelines.yml"
@@ -224,6 +249,12 @@
224
249
  "id": "code-formatter",
225
250
  "label": "Code Formatter",
226
251
  "stack": {
252
+ "bazelHints": {
253
+ "commands": [
254
+ "bazel run @go_sdk//:bin/gofmt -- -d ."
255
+ ],
256
+ "notes": "Run gofmt via the Bazel-managed Go SDK for hermetic formatting checks."
257
+ },
227
258
  "exampleConfigFiles": [],
228
259
  "exampleTools": [
229
260
  "gofmt",
@@ -271,6 +302,12 @@
271
302
  "id": "type-checking",
272
303
  "label": "Type Checking",
273
304
  "stack": {
305
+ "bazelHints": {
306
+ "commands": [
307
+ "bazel build //..."
308
+ ],
309
+ "notes": "Go type checking is inherent to compilation. bazel build with rules_go enforces type safety."
310
+ },
274
311
  "exampleConfigFiles": [
275
312
  "go.mod"
276
313
  ],
@@ -584,6 +621,43 @@
584
621
  "github-actions"
585
622
  ],
586
623
  "meta": {
624
+ "bazelIntegration": {
625
+ "advisoryNotice": "bazelHints are suggestions, not required execution paths. Consumers should prefer stack-native commands unless explicitly adopting Bazel.",
626
+ "ciContract": {
627
+ "configFlag": "--config=ci (define in .bazelrc)",
628
+ "deterministicFlags": [
629
+ "--nokeep_going",
630
+ "--test_output=errors"
631
+ ],
632
+ "remoteCache": "Optional; not required for CI",
633
+ "versionPinning": "Use .bazelversion file for Bazelisk"
634
+ },
635
+ "description": "Bazel build executor support for quality checks. All hints are ADVISORY—stack-native commands remain the default execution path.",
636
+ "detectionRules": {
637
+ "notes": "Detection uses repo-root markers only. Nested BUILD files do not trigger Bazel mode.",
638
+ "optionalMarkers": [
639
+ ".bazelrc",
640
+ ".bazelversion"
641
+ ],
642
+ "rootMarkers": [
643
+ "MODULE.bazel",
644
+ "WORKSPACE.bazel",
645
+ "WORKSPACE"
646
+ ]
647
+ },
648
+ "optOut": {
649
+ "configPath": "meta.bazelIntegration.enabled",
650
+ "description": "Set meta.bazelIntegration.enabled = false in repo config to disable Bazel hints"
651
+ },
652
+ "targetConventions": {
653
+ "build": "bazel build //...",
654
+ "coverage": "bazel coverage //...",
655
+ "description": "Recommended target naming (not assumed to exist). These are illustrative patterns; actual targets are repo-defined.",
656
+ "format": "bazel run //tools/format:check",
657
+ "lint": "//tools/lint:lint or bazel test //... with lint aspects",
658
+ "test": "bazel test //..."
659
+ }
660
+ },
587
661
  "complexityChecks": {
588
662
  "description": "When supported by the stack, run cyclomatic complexity or similar metrics in CI as a warning-only check initially.",
589
663
  "enabledByDefault": true
@@ -118,6 +118,12 @@
118
118
  "label": "Linting",
119
119
  "stackHints": {
120
120
  "csharp-dotnet": {
121
+ "bazelHints": {
122
+ "commands": [
123
+ "bazel build //... --aspects=@rules_dotnet//dotnet:analyzers.bzl%analyzer_aspect"
124
+ ],
125
+ "notes": "Use rules_dotnet analyzer aspects for Roslyn-based linting in Bazel."
126
+ },
121
127
  "exampleConfigFiles": [
122
128
  ".editorconfig",
123
129
  "Directory.Build.props"
@@ -139,6 +145,12 @@
139
145
  "verification": ".editorconfig must exist to drive the .NET formatting and analysis tooling."
140
146
  },
141
147
  "go": {
148
+ "bazelHints": {
149
+ "commands": [
150
+ "bazel test //... --@io_bazel_rules_go//go/config:nogo=@//:nogo"
151
+ ],
152
+ "notes": "Use nogo for static analysis via rules_go. Configure nogo target with desired analyzers."
153
+ },
142
154
  "exampleConfigFiles": [
143
155
  ".golangci.yml",
144
156
  ".golangci.yaml"
@@ -158,6 +170,13 @@
158
170
  "verification": ".golangci.yml or .golangci.yaml indicates linting is configured. Run 'golangci-lint run' to verify."
159
171
  },
160
172
  "python": {
173
+ "bazelHints": {
174
+ "commands": [
175
+ "bazel test //...:ruff_test",
176
+ "bazel run //tools/lint:ruff -- check ."
177
+ ],
178
+ "notes": "Use rules_python with ruff wrapped as py_test or a custom run target."
179
+ },
161
180
  "exampleConfigFiles": [
162
181
  "pyproject.toml",
163
182
  ".flake8"
@@ -180,6 +199,12 @@
180
199
  "verification": "pyproject.toml (or ruff.toml / .flake8) signals that linting tools are configured for the repository."
181
200
  },
182
201
  "rust": {
202
+ "bazelHints": {
203
+ "commands": [
204
+ "bazel build //... --aspects=@rules_rust//rust:defs.bzl%clippy_aspect --output_groups=clippy_checks"
205
+ ],
206
+ "notes": "rules_rust includes clippy_aspect for Bazel-native Clippy linting on all Rust targets."
207
+ },
183
208
  "exampleConfigFiles": [
184
209
  "clippy.toml",
185
210
  ".clippy.toml"
@@ -199,6 +224,15 @@
199
224
  "verification": "Clippy is available via rustup component. Run 'cargo clippy' to verify linting is configured."
200
225
  },
201
226
  "typescript-js": {
227
+ "bazelHints": {
228
+ "commands": [
229
+ "bazel test //... --aspects=//tools:lint.bzl%eslint_aspect --output_groups=report"
230
+ ],
231
+ "notes": "Wrap eslint via aspect_rules_lint or a custom sh_test rule. Aspect-based linting runs on all source files.",
232
+ "recommendedTargets": [
233
+ "//tools/lint:lint"
234
+ ]
235
+ },
202
236
  "exampleConfigFiles": [
203
237
  ".eslintrc.*"
204
238
  ],
@@ -250,6 +284,12 @@
250
284
  "label": "Unit Test Runner",
251
285
  "stackHints": {
252
286
  "csharp-dotnet": {
287
+ "bazelHints": {
288
+ "commands": [
289
+ "bazel test //..."
290
+ ],
291
+ "notes": "Use rules_dotnet to define test targets for xUnit/NUnit/MSTest projects."
292
+ },
253
293
  "exampleConfigFiles": [
254
294
  "*.Tests.csproj"
255
295
  ],
@@ -265,6 +305,12 @@
265
305
  "verification": "Test projects are present in the solution; test configuration is defined."
266
306
  },
267
307
  "go": {
308
+ "bazelHints": {
309
+ "commands": [
310
+ "bazel test //..."
311
+ ],
312
+ "notes": "rules_go go_test targets wrap 'go test' with Bazel's caching and hermeticity."
313
+ },
268
314
  "exampleConfigFiles": [
269
315
  "go.mod"
270
316
  ],
@@ -279,6 +325,12 @@
279
325
  "verification": "Run 'go test ./...' to verify the test suite is configured and passing."
280
326
  },
281
327
  "python": {
328
+ "bazelHints": {
329
+ "commands": [
330
+ "bazel test //..."
331
+ ],
332
+ "notes": "Use rules_python py_test for pytest-based tests. Tests are hermetically isolated."
333
+ },
282
334
  "exampleConfigFiles": [
283
335
  "pytest.ini",
284
336
  "pyproject.toml"
@@ -298,6 +350,12 @@
298
350
  "verification": "Test framework configuration is present; tests/ directory or pytest configuration exists."
299
351
  },
300
352
  "rust": {
353
+ "bazelHints": {
354
+ "commands": [
355
+ "bazel test //..."
356
+ ],
357
+ "notes": "rules_rust rust_test targets run cargo test under Bazel's hermetic environment."
358
+ },
301
359
  "exampleConfigFiles": [
302
360
  "Cargo.toml"
303
361
  ],
@@ -314,6 +372,12 @@
314
372
  "verification": "Run 'cargo test' to verify the test suite is configured and passing."
315
373
  },
316
374
  "typescript-js": {
375
+ "bazelHints": {
376
+ "commands": [
377
+ "bazel test //..."
378
+ ],
379
+ "notes": "Bazel discovers and runs all test targets. Use rules_js for Jest/Vitest integration."
380
+ },
317
381
  "exampleConfigFiles": [
318
382
  "jest.config.*"
319
383
  ],
@@ -625,6 +689,12 @@
625
689
  "label": "Unit Test Reporter / Coverage",
626
690
  "stackHints": {
627
691
  "csharp-dotnet": {
692
+ "bazelHints": {
693
+ "commands": [
694
+ "bazel coverage //..."
695
+ ],
696
+ "notes": "Use rules_dotnet with coverage instrumentation enabled."
697
+ },
628
698
  "exampleConfigFiles": [
629
699
  "*.csproj"
630
700
  ],
@@ -636,6 +706,12 @@
636
706
  "verification": "Run the test suite with coverage enabled (for example, using coverlet or a similar tool) and verify that coverage reports are generated and used in CI to monitor thresholds."
637
707
  },
638
708
  "go": {
709
+ "bazelHints": {
710
+ "commands": [
711
+ "bazel coverage //..."
712
+ ],
713
+ "notes": "rules_go supports coverage via bazel coverage. Use --combined_report=lcov for aggregated output."
714
+ },
639
715
  "exampleConfigFiles": [
640
716
  "go.mod"
641
717
  ],
@@ -647,6 +723,12 @@
647
723
  "verification": "Run 'go test -cover ./...' and verify coverage reports are produced and thresholds monitored."
648
724
  },
649
725
  "python": {
726
+ "bazelHints": {
727
+ "commands": [
728
+ "bazel coverage //..."
729
+ ],
730
+ "notes": "Use rules_python py_test with coverage instrumentation. Combine with --combined_report=lcov."
731
+ },
650
732
  "exampleConfigFiles": [
651
733
  "pytest.ini",
652
734
  "pyproject.toml"
@@ -660,6 +742,12 @@
660
742
  "verification": "Run the unit tests with coverage (for example, pytest with pytest-cov) and confirm that coverage reports are generated and referenced in CI to enforce or track thresholds."
661
743
  },
662
744
  "rust": {
745
+ "bazelHints": {
746
+ "commands": [
747
+ "bazel coverage //..."
748
+ ],
749
+ "notes": "Bazel coverage with rules_rust requires LLVM instrumentation. May need additional toolchain configuration."
750
+ },
663
751
  "exampleConfigFiles": [
664
752
  "Cargo.toml"
665
753
  ],
@@ -672,6 +760,12 @@
672
760
  "verification": "Run 'cargo tarpaulin' or equivalent and verify coverage reports are generated and thresholds enforced."
673
761
  },
674
762
  "typescript-js": {
763
+ "bazelHints": {
764
+ "commands": [
765
+ "bazel coverage //..."
766
+ ],
767
+ "notes": "Bazel coverage collects coverage data from all test targets. Use --combined_report=lcov for aggregated reports."
768
+ },
675
769
  "exampleConfigFiles": [
676
770
  "jest.config.*"
677
771
  ],
@@ -707,6 +801,13 @@
707
801
  "label": "CI Quality Gates",
708
802
  "stackHints": {
709
803
  "csharp-dotnet": {
804
+ "bazelHints": {
805
+ "commands": [
806
+ "bazel build //...",
807
+ "bazel test //..."
808
+ ],
809
+ "notes": "Bazel handles all analysis, testing, and packaging via defined targets."
810
+ },
710
811
  "exampleConfigFiles": [
711
812
  ".github/workflows/*",
712
813
  "azure-pipelines.yml"
@@ -716,6 +817,13 @@
716
817
  "verification": "Open the CI configuration and verify there is a job or stage that runs analyzers, tests, build, and any required packaging or container checks before merging to main."
717
818
  },
718
819
  "go": {
820
+ "bazelHints": {
821
+ "commands": [
822
+ "bazel build //...",
823
+ "bazel test //..."
824
+ ],
825
+ "notes": "rules_go go_binary and go_test targets provide hermetic builds and tests."
826
+ },
719
827
  "exampleConfigFiles": [
720
828
  ".github/workflows/*",
721
829
  "azure-pipelines.yml"
@@ -725,6 +833,13 @@
725
833
  "verification": "Verify CI runs golangci-lint, go test, and go build before merging to main."
726
834
  },
727
835
  "python": {
836
+ "bazelHints": {
837
+ "commands": [
838
+ "bazel build //...",
839
+ "bazel test //..."
840
+ ],
841
+ "notes": "Bazel py_binary and py_test targets replace traditional Python tooling."
842
+ },
728
843
  "exampleConfigFiles": [
729
844
  ".github/workflows/*",
730
845
  "azure-pipelines.yml"
@@ -734,6 +849,13 @@
734
849
  "verification": "Open the CI configuration and verify there is a job or stage that runs linting, type checking (if used), tests, and any packaging or container checks before merging to main."
735
850
  },
736
851
  "rust": {
852
+ "bazelHints": {
853
+ "commands": [
854
+ "bazel build //...",
855
+ "bazel test //..."
856
+ ],
857
+ "notes": "rules_rust provides rust_library, rust_test, and clippy_aspect for complete CI."
858
+ },
737
859
  "exampleConfigFiles": [
738
860
  ".github/workflows/*",
739
861
  "azure-pipelines.yml"
@@ -743,6 +865,13 @@
743
865
  "verification": "Verify CI runs cargo clippy, cargo test, and cargo build before merging to main."
744
866
  },
745
867
  "typescript-js": {
868
+ "bazelHints": {
869
+ "commands": [
870
+ "bazel build //...",
871
+ "bazel test //..."
872
+ ],
873
+ "notes": "Replace npm run ci with Bazel commands. All quality gates run as Bazel targets."
874
+ },
746
875
  "exampleConfigFiles": [
747
876
  ".github/workflows/*",
748
877
  "azure-pipelines.yml"
@@ -776,6 +905,12 @@
776
905
  "label": "Code Formatter",
777
906
  "stackHints": {
778
907
  "csharp-dotnet": {
908
+ "bazelHints": {
909
+ "commands": [
910
+ "bazel run //tools/format:dotnet_format -- --verify-no-changes"
911
+ ],
912
+ "notes": "Wrap dotnet format as a Bazel run target."
913
+ },
779
914
  "exampleConfigFiles": [
780
915
  ".editorconfig"
781
916
  ],
@@ -786,6 +921,12 @@
786
921
  "verification": "Run the configured formatter or code style enforcement (for example, `dotnet format`) and confirm that code in the repository conforms to the defined rules."
787
922
  },
788
923
  "go": {
924
+ "bazelHints": {
925
+ "commands": [
926
+ "bazel run @go_sdk//:bin/gofmt -- -d ."
927
+ ],
928
+ "notes": "Run gofmt via the Bazel-managed Go SDK for hermetic formatting checks."
929
+ },
789
930
  "exampleConfigFiles": [],
790
931
  "exampleTools": [
791
932
  "gofmt",
@@ -795,6 +936,12 @@
795
936
  "verification": "Run 'gofmt -d .' or 'goimports -d .' and confirm no output indicates clean formatting."
796
937
  },
797
938
  "python": {
939
+ "bazelHints": {
940
+ "commands": [
941
+ "bazel run //tools/format:black -- --check ."
942
+ ],
943
+ "notes": "Wrap black as a py_binary run target for format checking."
944
+ },
798
945
  "exampleConfigFiles": [
799
946
  "pyproject.toml"
800
947
  ],
@@ -805,6 +952,12 @@
805
952
  "verification": "Run the configured formatter (for example, `black .` or `black --check .`) and confirm it reports clean formatting on committed code and auto-fixes as expected locally."
806
953
  },
807
954
  "rust": {
955
+ "bazelHints": {
956
+ "commands": [
957
+ "bazel build //... --aspects=@rules_rust//rust:defs.bzl%rustfmt_aspect --output_groups=rustfmt_checks"
958
+ ],
959
+ "notes": "rules_rust includes rustfmt_aspect for Bazel-native format checking."
960
+ },
808
961
  "exampleConfigFiles": [
809
962
  "rustfmt.toml",
810
963
  ".rustfmt.toml"
@@ -816,6 +969,13 @@
816
969
  "verification": "Run 'cargo fmt --check' and confirm it reports clean formatting. Use 'cargo fmt' to auto-fix."
817
970
  },
818
971
  "typescript-js": {
972
+ "bazelHints": {
973
+ "commands": [
974
+ "bazel run //tools/format:check",
975
+ "bazel test //...:format_test"
976
+ ],
977
+ "notes": "Wrap Prettier as a run target for formatting checks. Use aspect_rules_lint for format aspects."
978
+ },
819
979
  "exampleConfigFiles": [
820
980
  ".prettierrc.*",
821
981
  ".prettierignore"
@@ -930,6 +1090,12 @@
930
1090
  "label": "Type Checking",
931
1091
  "stackHints": {
932
1092
  "csharp-dotnet": {
1093
+ "bazelHints": {
1094
+ "commands": [
1095
+ "bazel build //..."
1096
+ ],
1097
+ "notes": "C# type errors surface during bazel build with rules_dotnet. No separate typecheck step needed."
1098
+ },
933
1099
  "exampleConfigFiles": [
934
1100
  ".editorconfig",
935
1101
  "Directory.Build.props",
@@ -951,6 +1117,12 @@
951
1117
  "verification": ".editorconfig must exist; Directory.Build.props is optional for shared build configuration."
952
1118
  },
953
1119
  "go": {
1120
+ "bazelHints": {
1121
+ "commands": [
1122
+ "bazel build //..."
1123
+ ],
1124
+ "notes": "Go type checking is inherent to compilation. bazel build with rules_go enforces type safety."
1125
+ },
954
1126
  "exampleConfigFiles": [
955
1127
  "go.mod"
956
1128
  ],
@@ -965,6 +1137,13 @@
965
1137
  "verification": "Run 'go build ./...' to verify type correctness. Use 'go vet ./...' for additional static analysis."
966
1138
  },
967
1139
  "python": {
1140
+ "bazelHints": {
1141
+ "commands": [
1142
+ "bazel test //...:mypy_test",
1143
+ "bazel run //tools/typecheck:mypy"
1144
+ ],
1145
+ "notes": "Wrap mypy as a py_test or run target for Bazel-based type checking."
1146
+ },
968
1147
  "exampleConfigFiles": [
969
1148
  "mypy.ini",
970
1149
  "pyproject.toml"
@@ -985,6 +1164,12 @@
985
1164
  "verification": "pyproject.toml (or mypy.ini) signals that mypy configuration is available for the repository."
986
1165
  },
987
1166
  "rust": {
1167
+ "bazelHints": {
1168
+ "commands": [
1169
+ "bazel build //..."
1170
+ ],
1171
+ "notes": "Rust type checking is inherent to compilation. bazel build with rules_rust enforces type safety."
1172
+ },
988
1173
  "exampleConfigFiles": [
989
1174
  "Cargo.toml"
990
1175
  ],
@@ -998,6 +1183,12 @@
998
1183
  "verification": "Run 'cargo check' or 'cargo build' to verify type correctness. All Rust code is type-checked by default."
999
1184
  },
1000
1185
  "typescript-js": {
1186
+ "bazelHints": {
1187
+ "commands": [
1188
+ "bazel build //..."
1189
+ ],
1190
+ "notes": "TypeScript type errors surface during bazel build with rules_ts. No separate typecheck step needed."
1191
+ },
1001
1192
  "exampleConfigFiles": [
1002
1193
  "tsconfig.json"
1003
1194
  ],
@@ -2043,6 +2234,43 @@
2043
2234
  "github-actions"
2044
2235
  ],
2045
2236
  "meta": {
2237
+ "bazelIntegration": {
2238
+ "advisoryNotice": "bazelHints are suggestions, not required execution paths. Consumers should prefer stack-native commands unless explicitly adopting Bazel.",
2239
+ "ciContract": {
2240
+ "configFlag": "--config=ci (define in .bazelrc)",
2241
+ "deterministicFlags": [
2242
+ "--nokeep_going",
2243
+ "--test_output=errors"
2244
+ ],
2245
+ "remoteCache": "Optional; not required for CI",
2246
+ "versionPinning": "Use .bazelversion file for Bazelisk"
2247
+ },
2248
+ "description": "Bazel build executor support for quality checks. All hints are ADVISORY—stack-native commands remain the default execution path.",
2249
+ "detectionRules": {
2250
+ "notes": "Detection uses repo-root markers only. Nested BUILD files do not trigger Bazel mode.",
2251
+ "optionalMarkers": [
2252
+ ".bazelrc",
2253
+ ".bazelversion"
2254
+ ],
2255
+ "rootMarkers": [
2256
+ "MODULE.bazel",
2257
+ "WORKSPACE.bazel",
2258
+ "WORKSPACE"
2259
+ ]
2260
+ },
2261
+ "optOut": {
2262
+ "configPath": "meta.bazelIntegration.enabled",
2263
+ "description": "Set meta.bazelIntegration.enabled = false in repo config to disable Bazel hints"
2264
+ },
2265
+ "targetConventions": {
2266
+ "build": "bazel build //...",
2267
+ "coverage": "bazel coverage //...",
2268
+ "description": "Recommended target naming (not assumed to exist). These are illustrative patterns; actual targets are repo-defined.",
2269
+ "format": "bazel run //tools/format:check",
2270
+ "lint": "//tools/lint:lint or bazel test //... with lint aspects",
2271
+ "test": "bazel test //..."
2272
+ }
2273
+ },
2046
2274
  "complexityChecks": {
2047
2275
  "description": "When supported by the stack, run cyclomatic complexity or similar metrics in CI as a warning-only check initially.",
2048
2276
  "enabledByDefault": true