-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfig.yaml
More file actions
1569 lines (1519 loc) · 40.4 KB
/
Copy pathconfig.yaml
File metadata and controls
1569 lines (1519 loc) · 40.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# SPDX-FileCopyrightText: 2026 Blackcat Informatics® Inc. <paudley@blackcat.ca>
# SPDX-License-Identifier: AGPL-3.0-only
version: 1
project:
name: coding-ethos
review_context: Shared ETHOS generation and enforcement tooling.
ethos_candidates:
- ETHOS.md
- coding-ethos/ETHOS.md
gemini:
enabled: false
model: gemini-2.5-flash
model_overrides: {}
service_tier: standard
service_tier_overrides: {}
thinking_budget_overrides: {}
repo_name: coding-ethos
repo_context: shared repository automation and engineering tooling
max_retries: 3
timeout_seconds: 900
initial_backoff_seconds: 1.0
max_concurrent_api_calls: 10
disable_safety_filters: true
cache:
enabled: true
ttl_seconds: 604800
dirname: gemini-cache
api_enabled: true
api_ttl_seconds: 3600
modal_allowlist_files: []
style:
python_version: "3.13"
line_length: 88
bundle:
local_bin_dirname: coding-ethos-hooks
bundle_dir_candidates:
- pre-commit
- coding-ethos/pre-commit
consumer_override_candidates:
- repo_config.yaml
- repo_config.yml
- coding-ethos.repo.yaml
- coding-ethos.repo.yml
- coding-ethos.pre-commit.yaml
- coding-ethos.pre-commit.yml
sandbox:
read_write_paths:
- .coding-ethos/cache/
- .pytest_cache/
- .mypy_cache/
- .ruff_cache/
- .uv-cache/
- .venv/
- __pycache__/
proxy:
# Opt-in HTTPS-interception gate for the agent API proxy. "off" disables
# interception and never provisions a CA; "required" requests interception
# but still demands the CODE_ETHOS_AGENT_PROXY_INTERCEPT runtime opt-in.
interception:
mode: "off"
hooks:
output_format: auto
success_output: silent
parallel_groups: true
tool_timeout_seconds: 900
fail_severity_levels:
- error
- fatal
- critical
warn_severity_levels:
- warning
- warn
similarity:
enabled: true
minhash_size: 128
shingle_size: 5
lsh_bands: 16
lsh_rows: 8
min_symbol_lines: 5
exact_normalized: true
candidate_threshold: 0.7
structural_threshold: 0.8
max_matches: 10
generated_config:
ci:
github_actions:
enabled: true
coding_ethos_path: .
gate_command: make check
sarif_category: .github/workflows/ci.yml:policy
standalone_triggers: false
timeout_minutes: 30
gitlab:
enabled: true
coding_ethos_path: .
gate_command: make check
test_command: uv run pytest
build_command: uv build
package_check_command: uvx twine check dist/*
syntax:
file_syntax:
enabled: true
extensions:
- .json
- .toml
- .yaml
- .yml
merge_conflict:
enabled: true
markers:
- '<<<<<<<'
- '======='
- '>>>>>>>'
- '|||||||'
policy:
expressions:
- id: hook.changed_file_scope
scope: file
severity: block
mode: block
protected: true
allow_override: false
allow_severity_weaken: false
tools: []
hook_events: []
lint_scopes:
- files
- staged
- smoke
- full
principle_ids:
- static-analysis-is-the-first-line-of-defense
- validation-at-the-gate
- functional-testing-is-the-proof
skill_id: managed-toolchain
message: >-
Hook-stage path-sensitive checks must scope to changed files before
running.
advice: >-
Use hook-provided file lists in pre-commit and pre-push command
implementations before invoking whole-surface or configured-path
runners.
when: >-
hook_commands.exists(command,
command.command_function &&
command.runs_path_sensitive_check &&
!command.changed_file_scope_before_run)
evidence_maps:
- source: ruff
codes:
- PLC0415
policy_id: python.conditional_imports
skill_id: conditional-imports
principle_ids:
- no-conditional-imports
- fail-fast-fail-hard-overview
confidence: high
meaning: >-
Import executes away from module scope, usually inside runtime control
flow, hiding a required dependency or masking cyclic design pressure.
advice:
summary: >-
Move required imports to module scope. If that exposes a cycle, fix
the design instead of hiding the dependency.
steps:
- Declare the dependency as required.
- Import it at module scope.
- >-
Use SOLID boundaries to split responsibilities when modules depend
on each other.
- >-
In Python, introduce a Protocol in a neutral module when two
concrete implementations would otherwise import each other.
- >-
Replace lazy, conditional, or fallback import paths with explicit
startup validation.
rerun:
- make pre-commit
- make check
- source: mypy
message_substrings:
- Cannot resolve import cycle
- import cycle
policy_id: python.import_cycles
skill_id: conditional-imports
principle_ids:
- protocol-first-design
- solid-is-law
confidence: medium
meaning: >-
Concrete modules depend on each other strongly enough that the type
checker sees an import cycle.
advice:
summary: Break the concrete dependency cycle with an explicit interface.
steps:
- Identify the two modules that import each other.
- Move the shared contract into a neutral module.
- >-
In Python, model that contract with a Protocol when behavior is
required.
- >-
Depend on the Protocol or smaller interface instead of the concrete
implementation.
rerun:
- make pre-commit
- make check
- source: pyright
message_substrings:
- Import cycle detected
- Import cycles detected
policy_id: python.import_cycles
skill_id: conditional-imports
principle_ids:
- protocol-first-design
- solid-is-law
confidence: medium
meaning: >-
Concrete modules depend on each other strongly enough that the type
checker sees an import cycle.
advice:
summary: Break the concrete dependency cycle with an explicit interface.
steps:
- Identify the two modules that import each other.
- Move the shared contract into a neutral module.
- >-
In Python, model that contract with a Protocol when behavior is
required.
- >-
Depend on the Protocol or smaller interface instead of the concrete
implementation.
rerun:
- make pre-commit
- make check
- source: pylint
codes:
- cyclic-import
- R0401
policy_id: python.import_cycles
skill_id: conditional-imports
principle_ids:
- protocol-first-design
- solid-is-law
confidence: high
meaning: Pylint found a concrete module import cycle.
advice:
summary: Break the concrete dependency cycle with an explicit interface.
steps:
- Identify the two modules that import each other.
- Move the shared contract into a neutral module.
- >-
In Python, model that contract with a Protocol when behavior is
required.
- >-
Depend on the Protocol or smaller interface instead of the concrete
implementation.
rerun:
- make pre-commit
- make check
- source: mypy
codes:
- no-any-return
policy_id: python.optional_returns
skill_id: lint-remediation
principle_ids:
- no-optional-types-for-required-dependencies
- static-analysis-is-the-first-line-of-defense
confidence: medium
meaning: A required return path is leaking Any instead of a precise type.
advice:
summary: Replace Any return flow with an explicit required type.
steps:
- Identify the source of Any.
- Add the missing annotation or typed adapter at the boundary.
- Keep required dependencies non-optional.
rerun:
- make pre-commit
- make check
- source: shellcheck
codes:
- SC*
policy_id: shell.static_analysis
skill_id: lint-remediation
principle_ids:
- static-analysis-is-the-first-line-of-defense
- linting-as-code-quality-enforcement
confidence: medium
meaning: Shellcheck found shell behavior that is fragile or ambiguous.
advice:
summary: Fix the shell script structure instead of suppressing ShellCheck.
steps:
- Quote expansions and make data flow explicit.
- Prefer arrays and checked commands over stringly shell assembly.
- Keep shell behavior deterministic under strict mode.
rerun:
- make pre-commit
- source: yamllint
codes:
- indentation
- truthy
policy_id: yaml.config_clarity
skill_id: lint-remediation
principle_ids:
- validation-at-the-gate
- documentation-as-contract
confidence: medium
meaning: YAML structure or scalar spelling is ambiguous for configuration.
advice:
summary: Make YAML configuration explicit and parser-stable.
steps:
- Fix indentation to match the intended structure.
- Quote ambiguous scalars when the value is meant to be a string.
- Keep configuration readable enough to review in diffs.
rerun:
- make pre-commit
- source: hadolint
codes:
- DL*
policy_id: docker.reproducible_builds
skill_id: lint-remediation
principle_ids:
- security-by-design
- evidence-based-engineering-and-decision-quality
confidence: medium
meaning: >-
Dockerfile instructions are weakening reproducibility or container
safety.
advice:
summary: Make the container build deterministic and least-privilege.
steps:
- Pin package versions where practical.
- Avoid broad shell pipelines that hide failures.
- Prefer explicit users, trusted sources, and minimal layers.
rerun:
- make pre-commit
- source: actionlint
codes:
- "*"
policy_id: workflow.validation
skill_id: lint-remediation
principle_ids:
- validation-at-the-gate
- testing-as-specification
confidence: high
meaning: GitHub Actions workflow syntax or expression behavior is invalid.
advice:
summary: Fix workflow definitions before relying on CI as a quality gate.
steps:
- Validate expressions, job wiring, and event-specific context.
- Keep workflow behavior explicit instead of depending on runtime surprises.
- Re-run the workflow hook locally before pushing.
rerun:
- make pre-commit
- source: golangci-lint
codes:
- errcheck
- gosec
- staticcheck
- revive
policy_id: go.static_analysis
skill_id: lint-remediation
principle_ids:
- static-analysis-is-the-first-line-of-defense
- linting-as-code-quality-enforcement
confidence: high
meaning: Go static analysis found correctness, security, or maintainability risk.
advice:
summary: Fix the Go issue structurally and keep golangci-lint blocking.
steps:
- Handle errors explicitly.
- Remove suspicious or insecure constructs instead of suppressing them.
- Prefer a small refactor over weakening lint coverage.
rerun:
- make pre-commit
- make check
- source: eslint
codes:
- fatal
- no-undef
- no-unused-vars
policy_id: javascript.static_analysis
skill_id: lint-remediation
principle_ids:
- static-analysis-is-the-first-line-of-defense
- linting-as-code-quality-enforcement
confidence: medium
meaning: >-
ESLint found a JavaScript or TypeScript correctness, syntax, or
maintainability issue that should be fixed structurally.
advice:
summary: >-
Fix the JavaScript or TypeScript issue without weakening lint coverage.
steps:
- Resolve syntax and undefined-symbol findings before relying on
runtime behavior.
- Remove unused code instead of hiding warnings behind broad disables.
- Keep ESLint execution routed through the managed coding-ethos wrapper.
rerun:
- make pre-commit
- source: tsc
codes:
- TS*
policy_id: typescript.static_analysis
skill_id: lint-remediation
principle_ids:
- static-analysis-is-the-first-line-of-defense
- linting-as-code-quality-enforcement
confidence: high
meaning: >-
TypeScript compiler diagnostics found a type, syntax, or project
contract problem that should be fixed before runtime.
advice:
summary: >-
Fix the TypeScript compiler diagnostic through the project type
contract.
steps:
- Keep tsc execution routed through the managed coding-ethos wrapper.
- Fix type declarations, imports, and tsconfig boundaries structurally.
- Do not bypass type checking with broad any casts or unchecked excludes.
rerun:
- make pre-commit
- source: kube-linter
codes:
- "*"
policy_id: kubernetes.manifest_security
skill_id: lint-remediation
principle_ids:
- static-analysis-is-the-first-line-of-defense
- linting-as-code-quality-enforcement
- security-by-design
confidence: high
meaning: >-
kube-linter found a Kubernetes manifest safety, least-privilege, or
resource-boundary issue that should be fixed before deployment.
advice:
summary: Fix the Kubernetes manifest finding structurally.
steps:
- >-
Keep kube-linter execution routed through the managed coding-ethos
wrapper.
- Prefer least-privilege pod security settings and explicit resource limits.
- >-
Do not silence manifest findings without documenting the
operational exception.
rerun:
- make pre-commit
- source: ruff
message_substrings:
- configuration or usage failed
- unexpected argument
- No such file or directory
policy_id: tool.managed_config
skill_id: managed-toolchain
principle_ids:
- static-analysis-is-the-first-line-of-defense
- validation-at-the-gate
- one-path-for-critical-operations
confidence: high
meaning: >-
Ruff failed before producing normal diagnostics, usually because the
invocation, target paths, managed binary, or generated config drifted
away from the coding-ethos runtime contract.
advice:
summary: Restore the managed coding-ethos toolchain path and rerun Ruff.
steps:
- Keep the caller's target paths, but execute Ruff through the captured
coding-ethos wrapper.
- Do not trust consumer-repo Ruff config or host binaries.
- Restore generated config drift with make -C coding-ethos fix-configs.
rerun:
- make pre-commit
- source: eslint
message_substrings:
- configuration or usage failed
- Cannot find module
- No files matching the pattern
- ESLint couldn't find
policy_id: tool.managed_config
skill_id: managed-toolchain
principle_ids:
- static-analysis-is-the-first-line-of-defense
- validation-at-the-gate
- one-path-for-critical-operations
confidence: high
meaning: >-
ESLint failed before producing normal diagnostics, usually because the
managed npm package, invocation, target paths, or config boundary drifted
away from the coding-ethos runtime contract.
advice:
summary: >-
Restore managed ESLint execution before interpreting JavaScript findings.
steps:
- Run ESLint through the coding-ethos capture wrapper.
- Do not fall back to host-global ESLint or unmanaged npm scripts.
- Rebuild the managed toolchain if the ESLint package or wrapper is missing.
rerun:
- make build
- make pre-commit
- source: tsc
message_substrings:
- configuration or usage failed
- Cannot find
- The specified path does not exist
policy_id: tool.managed_config
skill_id: managed-toolchain
principle_ids:
- static-analysis-is-the-first-line-of-defense
- validation-at-the-gate
- one-path-for-critical-operations
confidence: high
meaning: >-
tsc failed before producing normal project diagnostics, usually because
the managed npm package, invocation, or tsconfig boundary drifted away
from the coding-ethos runtime contract.
advice:
summary: >-
Restore managed tsc execution before interpreting TypeScript findings.
steps:
- Run tsc through the coding-ethos capture wrapper.
- Keep the project boundary explicit with tsconfig.json.
- >-
Rebuild the managed toolchain if the TypeScript package or wrapper
is missing.
rerun:
- make build
- make pre-commit
- source: kube-linter
message_substrings:
- configuration or usage failed
- failed to load config
- failed to parse
- no valid objects found
policy_id: tool.managed_config
skill_id: managed-toolchain
principle_ids:
- static-analysis-is-the-first-line-of-defense
- validation-at-the-gate
- one-path-for-critical-operations
confidence: high
meaning: >-
kube-linter failed before producing normal manifest diagnostics,
usually because the managed Go binary, invocation, or Kubernetes
manifest boundary drifted away from the coding-ethos runtime contract.
advice:
summary: >-
Restore managed kube-linter execution before interpreting manifest
findings.
steps:
- Run kube-linter through the coding-ethos capture wrapper.
- >-
Pass explicit Kubernetes manifest paths rather than relying on host
discovery.
- Rebuild the managed toolchain if the kube-linter binary is missing.
rerun:
- make build
- make pre-commit
- source: mypy
message_substrings:
- configuration or usage failed
- cannot read file
- No such file or directory
policy_id: tool.managed_config
skill_id: managed-toolchain
principle_ids:
- static-analysis-is-the-first-line-of-defense
- validation-at-the-gate
- one-path-for-critical-operations
confidence: high
meaning: >-
Mypy failed before producing normal diagnostics, usually because target
resolution, generated config, or managed execution context is wrong.
advice:
summary: Run mypy through the managed coding-ethos wrapper and config.
steps:
- Resolve target files relative to the caller as requested.
- Execute mypy from the coding-ethos managed environment and config.
- Restore generated config drift before trusting type-check output.
rerun:
- make pre-commit
- make check
- source: pyright
message_substrings:
- configuration or usage failed
- File or directory
- No such file or directory
policy_id: tool.managed_config
skill_id: managed-toolchain
principle_ids:
- static-analysis-is-the-first-line-of-defense
- validation-at-the-gate
- one-path-for-critical-operations
confidence: high
meaning: >-
Pyright failed before producing normal diagnostics, usually because the
managed project/config boundary or target resolution is wrong.
advice:
summary: Restore managed Pyright execution before interpreting results.
steps:
- Keep caller target intent but normalize paths through coding-ethos.
- Use the generated pyrightconfig from the coding-ethos checkout.
- Treat drifted generated configs as blocking infrastructure failures.
rerun:
- make pre-commit
- make check
- source: pylint
message_substrings:
- configuration or usage failed
- No such file or directory
policy_id: tool.managed_config
skill_id: managed-toolchain
principle_ids:
- static-analysis-is-the-first-line-of-defense
- validation-at-the-gate
- one-path-for-critical-operations
confidence: high
meaning: >-
Pylint failed before producing normal diagnostics, usually because
managed execution or generated config is not being used.
advice:
summary: Restore managed Pylint execution and generated config first.
steps:
- Run Pylint through the coding-ethos capture wrapper.
- Do not fall back to host or consumer-repo Pylint settings.
- Rebuild or restore generated configs before rerunning.
rerun:
- make pre-commit
git:
staged_admin_files:
basenames:
- .pre-commit-config.yaml
- pre-commit-config.yaml
- .importlinter
- importlinter
- .pylintrc
- pylintrc
- pyproject.toml
dirs:
- .pre-commit
- pre-commit
filesystem:
protected_path:
enabled: true
paths:
- .bandit.yml
- .pylintrc
- .sqlfluff
- .yamllint.yml
- coding-ethos-hooks/coding-ethos-git-hook
- coding-ethos-hooks/bin/coding-ethos-agent-hooks
- coding-ethos-hooks/bin/coding-ethos-git
- coding-ethos-hooks/bin/coding-ethos-git-hook
- coding-ethos-hooks/bin/coding-ethos-hook
- coding-ethos-hooks/bin/coding-ethos-lint
- coding-ethos-hooks/bin/coding-ethos-policy
- coding-ethos-hooks/lefthook
- mypy.ini
- pyrightconfig.json
- ruff.toml
- tombi.toml
protected_branch_write:
branches:
- main
- master
exempt_path_prefixes:
- .claude/
- docs/plans/
required_ignores:
enabled: true
paths:
- .claude/settings.local.json
- .coding-ethos/cache/
- .coding-ethos/code-intel.duckdb
- .coding-ethos/code-intel.duckdb.wal
- .coding-ethos/events/
- .coding-ethos/hook-runs/
- .coding-ethos/lint-runs/
- .coding-ethos/prune-runs/
- .coding-ethos/state/
- .gemini/settings.json
- .mcp.json
pii_scrubber:
enabled: true
patterns:
- '/(home|Users)/[A-Za-z0-9._-]+/'
- 'lbox-worktrees/[A-Za-z0-9._-]+'
- '/tmp/tmp\.[A-Za-z0-9._-]+'
literals: []
exempt_prefixes:
- .git/
license_header:
enabled: true
extensions:
- .go
- .py
- .sh
exempt_prefixes:
- .git/
exempt_basenames: []
required:
- 'SPDX-FileCopyrightText:'
- 'SPDX-License-Identifier:'
scan_lines: 5
shebangs:
enabled: true
large_files:
enabled: false
line_limits:
enabled: false
shell:
dangerous_command:
enabled: true
background_git:
enabled: true
github_admin:
enabled: true
best_practices:
enabled: true
require_common_for_prefixes:
- scripts/
forbidden_strings:
enabled: true
exempt_paths:
- config.yaml
- coding_ethos.yml
- go/internal/policy/**
- go/internal/redteam/**
- go/scripts/smoke_hook_edges.sh
file_strings:
- PLC0415
strings:
- /.claude/settings.json
- /.claude/settings.local.json
- ~/.claude/settings.json
- ~/.claude/settings.local.json
- /.codex/config.toml
- /.codex/hooks.json
- /.gemini/settings.json
- coding-ethos-hooks/coding-ethos-git-hook
- coding-ethos-hooks/bin/coding-ethos-agent-hooks
- coding-ethos-hooks/bin/coding-ethos-git
- coding-ethos-hooks/bin/coding-ethos-git-hook
- coding-ethos-hooks/bin/coding-ethos-hook
- coding-ethos-hooks/bin/coding-ethos-lint
- coding-ethos-hooks/bin/coding-ethos-policy
- coding-ethos-hooks/lefthook
- /coding-ethos/pre-commit/hooks/
- /coding-ethos/config.yaml
- /coding-ethos/ruff.toml
- /coding-ethos/.golangci.yml
- header must match
security:
private_key:
enabled: true
pattern: '-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----'
agent_advice:
reminders:
ambient_frequency_percent: 25
python:
source_paths:
- coding_ethos
- pre-commit/hooks
test_paths:
- tests
stub_paths: []
extra_paths:
- .
- pre-commit/hooks
venv_path: .
venv: .venv
comment_suppressions:
enabled: true
patterns:
- regex: '#\s*ruff:\s*noqa\b'
label: 'ruff: noqa (file-level)'
- regex: '#\s*mypy:\s*ignore-errors\b'
label: 'mypy: ignore-errors (file-level)'
- regex: '#\s*noqa\b'
label: 'noqa'
- regex: '#\s*type:\s*ignore\b'
label: 'type: ignore'
- regex: '#\s*pragma:\s*no\s*cover\b'
label: 'pragma: no cover'
- regex: '#\s*pylint:\s*disable'
label: 'pylint: disable'
- regex: '#\s*noinspection\b'
label: 'noinspection'
- regex: '#\s*fmt:\s*(off|on|skip)\b'
label: 'fmt: off/on/skip'
- regex: '#\s*isort:\s*(skip|skip_file)\b'
label: 'isort: skip'
- regex: '#\s*pyright:\s*ignore\b'
label: 'pyright: ignore'
module_docs:
enabled: true
source_docs_path: docs/SOURCE_DOCS.md
check_filenames:
- __init__.py
- conftest.py
excluded_dirs:
- .venv
- .lint-cache
- .mypy_cache
- .ruff_cache
- __pycache__
- node_modules
- .git
banned_doc_filenames:
- README.md
- readme.md
direct_imports:
enabled: true
packages:
- coding_ethos
util_centralization:
enabled: false
banned_modules: []
structured_logging:
enabled: true
methods:
- debug
- info
- warning
- error
- critical
logger_names:
- logger
- _logger
- log
- _log
exempt_kwargs:
- exc_info
- stack_info
- stacklevel
conditional_imports:
enabled: true
exception_names:
- ImportError
- ModuleNotFoundError
capability_prefix: HAS_
functional_idioms:
enabled: true
type_checking_imports:
enabled: true
type_checking_names:
- TYPE_CHECKING
future_import_name: annotations
catch_and_silence:
enabled: true
optional_returns:
enabled: true
exempt_method_names:
- __exit__
- __aexit__
security_patterns:
enabled: true
sql_keywords:
- SELECT
- INSERT
- UPDATE
- DELETE
- DROP
- CREATE
- ALTER
- TRUNCATE
- EXECUTE
- EXEC
secret_patterns:
- sk-
- pk-
- api_
- key_
- token_
- secret_
- password
- passwd
- credential
test_file_markers:
- tests
- conftest
- test_
- _test.py
min_getenv_args_with_default: 2
sql_centralization:
enabled: false
module_name: project.sql
central_paths: []
exempt_paths:
- tests
migration_markers:
- alembic
- migrations
min_string_length: 15
error_context_keywords:
- suggestion
- reason
- message
- match
- extra
manifest_validation:
enabled: false
candidate_paths:
- manifest.yaml
- coding-ethos/manifest.yaml
required_string_fields:
- version
required_list_sections:
symlinks:
required: true
required_string_fields:
- source
- target
repositories:
required: false
required_string_fields:
- name
- url
optional_string_fields:
- branch
plan_completion:
enabled: false
metadata_filename: metadata.yaml
root_markers:
- docs/plans/
completed_status_values:
- review
- complete
pytest_gate:
enabled: true
banned_markers:
- skip
- skipif
test_command:
- uv
- run
- --frozen
- pytest
- tests
- --strict-markers
file_docstrings:
enabled: true
min_sentences: 3
exempt_filenames:
- __init__.py
- conftest.py
docstring_coverage:
enabled: true
threshold: 90
command:
- coding-ethos-docstring-coverage
use_hook_project: true
verbose: true
ignore_init_method: true
ignore_init_module: true
ignore_magic: true
ignore_private: true
ignore_semiprivate: true
ignore_property_decorators: true
ignore_nested_functions: true
ignore_nested_classes: true
check_paths:
- coding_ethos
- pre-commit/hooks
exclude_patterns:
- __pycache__
- \.venv