edsger 0.82.0 → 0.84.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.
Files changed (113) hide show
  1. package/README.md +101 -2
  2. package/assets/README.md +31 -18
  3. package/assets/audit/base.yaml +187 -0
  4. package/assets/audit/csharp.yaml +46 -0
  5. package/assets/audit/dart.yaml +46 -0
  6. package/assets/audit/go.yaml +46 -0
  7. package/assets/audit/java.yaml +46 -0
  8. package/assets/audit/python.yaml +49 -0
  9. package/assets/audit/typescript.yaml +51 -0
  10. package/assets/audit-viewer/assets/audit--os0TXXZ.css +1 -0
  11. package/assets/audit-viewer/assets/audit-CSblYELs.js +2 -0
  12. package/assets/audit-viewer/audit.html +31 -0
  13. package/assets/audit-viewer-single.html +32 -0
  14. package/assets/diagrams/base.yaml +351 -0
  15. package/assets/diagrams/csharp.yaml +48 -0
  16. package/assets/diagrams/dart.yaml +41 -0
  17. package/assets/diagrams/go.yaml +44 -0
  18. package/assets/diagrams/java.yaml +43 -0
  19. package/assets/diagrams/python.yaml +41 -0
  20. package/assets/diagrams/typescript.yaml +45 -0
  21. package/assets/diagrams-viewer/assets/abnfDiagram-VRR7QNED-CWLpbgGU.js +1 -0
  22. package/assets/diagrams-viewer/assets/arc-B4VipCr_.js +1 -0
  23. package/assets/diagrams-viewer/assets/architectureDiagram-ZJ3FMSHR-BMDodQXV.js +36 -0
  24. package/assets/diagrams-viewer/assets/blockDiagram-677ZJIJ3-DbHoVVH-.js +132 -0
  25. package/assets/diagrams-viewer/assets/c4Diagram-LMCZKHZV-CyUEj98S.js +10 -0
  26. package/assets/diagrams-viewer/assets/channel-DWh7ErxY.js +1 -0
  27. package/assets/diagrams-viewer/assets/chunk-2Q5K7J3B-CWu0p0os.js +1 -0
  28. package/assets/diagrams-viewer/assets/chunk-32BRIVSS-BhVWSCoK.js +1 -0
  29. package/assets/diagrams-viewer/assets/chunk-5VM5RSS4-B_2wZBAn.js +15 -0
  30. package/assets/diagrams-viewer/assets/chunk-EX3LRPZG-D_MRgtfL.js +231 -0
  31. package/assets/diagrams-viewer/assets/chunk-JWPE2WC7-dsh1qiy0.js +1 -0
  32. package/assets/diagrams-viewer/assets/chunk-MOJQB5TN-BvLm4a6B.js +88 -0
  33. package/assets/diagrams-viewer/assets/chunk-RYQCIY6F-gJyPbIpx.js +1 -0
  34. package/assets/diagrams-viewer/assets/chunk-V7JOEXUC-BMvj0zJM.js +206 -0
  35. package/assets/diagrams-viewer/assets/chunk-VR4S4FIN-Di2iBUXs.js +1 -0
  36. package/assets/diagrams-viewer/assets/chunk-XXDRQBXY-Cfajbd4I.js +1 -0
  37. package/assets/diagrams-viewer/assets/classDiagram-OUVF2IWQ-winWhRce.js +1 -0
  38. package/assets/diagrams-viewer/assets/classDiagram-v2-EOCWNBFH-winWhRce.js +1 -0
  39. package/assets/diagrams-viewer/assets/cose-bilkent-JH36ORCC-ClE2EhTL.js +1 -0
  40. package/assets/diagrams-viewer/assets/cynefin-VYW2F7L2-nm5z0Jwc.js +178 -0
  41. package/assets/diagrams-viewer/assets/cynefinDiagram-TSTJHNR4-CGhnRh5V.js +62 -0
  42. package/assets/diagrams-viewer/assets/cytoscape.esm-CUqq0XTU.js +331 -0
  43. package/assets/diagrams-viewer/assets/dagre-VKFMJZFB-COlahHKk.js +4 -0
  44. package/assets/diagrams-viewer/assets/defaultLocale-DX6XiGOO.js +1 -0
  45. package/assets/diagrams-viewer/assets/diagram-FQU43EPY-DsUclBK0.js +3 -0
  46. package/assets/diagrams-viewer/assets/diagram-G47NLZAW-CnjT9SvX.js +24 -0
  47. package/assets/diagrams-viewer/assets/diagram-NH7WQ7WH-DiGoGOyA.js +24 -0
  48. package/assets/diagrams-viewer/assets/diagram-OA4YK3LP-qi8nz9qe.js +30 -0
  49. package/assets/diagrams-viewer/assets/diagram-WEI45ONY-BV3PGzwL.js +41 -0
  50. package/assets/diagrams-viewer/assets/diagrams-8nCc1utO.css +1 -0
  51. package/assets/diagrams-viewer/assets/diagrams-CF48btj0.js +314 -0
  52. package/assets/diagrams-viewer/assets/ebnfDiagram-CCIWWBDH-CtKWe-dh.js +1 -0
  53. package/assets/diagrams-viewer/assets/erDiagram-Q63AITRT-Aajee3Fz.js +85 -0
  54. package/assets/diagrams-viewer/assets/flowDiagram-23GEKE2U-N3Xe2K9t.js +156 -0
  55. package/assets/diagrams-viewer/assets/ganttDiagram-NO4QXBWP-Bjicdg8S.js +292 -0
  56. package/assets/diagrams-viewer/assets/gitGraphDiagram-IHSO6WYX-CacIXKIe.js +106 -0
  57. package/assets/diagrams-viewer/assets/graph-C2PyVmSI.js +1 -0
  58. package/assets/diagrams-viewer/assets/infoDiagram-FWYZ7A6U-CVmDapTx.js +2 -0
  59. package/assets/diagrams-viewer/assets/init-Gi6I4Gst.js +1 -0
  60. package/assets/diagrams-viewer/assets/ishikawaDiagram-FXEZZL3T-DMJf1YQN.js +70 -0
  61. package/assets/diagrams-viewer/assets/journeyDiagram-5HDEW3XC-Bk_U6MPk.js +139 -0
  62. package/assets/diagrams-viewer/assets/kanban-definition-HUTT4EX6-n05wGXiD.js +89 -0
  63. package/assets/diagrams-viewer/assets/katex-C5jXJg4s.js +257 -0
  64. package/assets/diagrams-viewer/assets/layout-HEHzrzvT.js +1 -0
  65. package/assets/diagrams-viewer/assets/linear-DD_zky65.js +1 -0
  66. package/assets/diagrams-viewer/assets/map-BQHxRNoK.js +1 -0
  67. package/assets/diagrams-viewer/assets/mindmap-definition-LN4V7U3C-BWt_I9vr.js +96 -0
  68. package/assets/diagrams-viewer/assets/ordinal-Cboi1Yqb.js +1 -0
  69. package/assets/diagrams-viewer/assets/pegDiagram-2B236MQR-CCZTIXBZ.js +1 -0
  70. package/assets/diagrams-viewer/assets/pieDiagram-ENE6RG2P-BmIQql1w.js +39 -0
  71. package/assets/diagrams-viewer/assets/quadrantDiagram-ABIIQ3AL-BPvOH5QN.js +7 -0
  72. package/assets/diagrams-viewer/assets/railroadDiagram-RFXS5EU6-DpgVbjSl.js +1 -0
  73. package/assets/diagrams-viewer/assets/requirementDiagram-TGXJPOKE-CDVpI3MH.js +84 -0
  74. package/assets/diagrams-viewer/assets/sankeyDiagram-HTMAVEWB-DU2J23Xy.js +40 -0
  75. package/assets/diagrams-viewer/assets/sequenceDiagram-DBY2YBRQ-BIVlCWU4.js +162 -0
  76. package/assets/diagrams-viewer/assets/sizeCapture-X5ZJPWSS-C9KxyKN2.js +1 -0
  77. package/assets/diagrams-viewer/assets/stateDiagram-2N3HPSRC-Ba5mRI9d.js +1 -0
  78. package/assets/diagrams-viewer/assets/stateDiagram-v2-6OUMAXLB-Dw-0OG6b.js +1 -0
  79. package/assets/diagrams-viewer/assets/swimlanes-5IMT3BWC-aOsD2O80.js +2 -0
  80. package/assets/diagrams-viewer/assets/swimlanesDiagram-G3AALYLV-KujklZml.js +8 -0
  81. package/assets/diagrams-viewer/assets/timeline-definition-FHXFAJF6-CmYd84Hc.js +120 -0
  82. package/assets/diagrams-viewer/assets/vennDiagram-L72KCM5P-CDiMK-z9.js +34 -0
  83. package/assets/diagrams-viewer/assets/wardleyDiagram-EHGQE667-BKLsv25u.js +78 -0
  84. package/assets/diagrams-viewer/assets/xychartDiagram-FW5EYKEG-Bpj6Ub-a.js +7 -0
  85. package/assets/diagrams-viewer/diagrams.html +31 -0
  86. package/assets/diagrams-viewer-single.html +3593 -0
  87. package/assets/manifest.yaml +13 -1
  88. package/assets/mindmap/base.yaml +115 -0
  89. package/assets/mindmap/csharp.yaml +32 -0
  90. package/assets/mindmap/dart.yaml +42 -0
  91. package/assets/mindmap/go.yaml +33 -0
  92. package/assets/mindmap/java.yaml +40 -0
  93. package/assets/mindmap/python.yaml +43 -0
  94. package/assets/mindmap/typescript.yaml +47 -0
  95. package/assets/mindmap-viewer/assets/mindmap-D7KMR9EM.css +1 -0
  96. package/assets/mindmap-viewer/assets/mindmap-Di5RM-4N.js +4 -0
  97. package/assets/mindmap-viewer/mindmap.html +31 -0
  98. package/assets/mindmap-viewer-single.html +34 -0
  99. package/assets/schema/audit.schema.json +66 -0
  100. package/assets/schema/diagrams.schema.json +100 -0
  101. package/assets/schema/mindmap.schema.json +69 -0
  102. package/assets/skills/audit/SKILL.md +76 -0
  103. package/assets/skills/diagram/SKILL.md +70 -0
  104. package/assets/skills/mindmap/SKILL.md +69 -0
  105. package/assets/viewer/assets/index-BFtGar9N.css +1 -0
  106. package/assets/viewer/assets/index-XOKyyudT.js +3 -0
  107. package/assets/viewer/index.html +19 -2
  108. package/assets/viewer-single.html +21 -4
  109. package/dist/index.js +1720 -318
  110. package/dist/index.js.map +1 -1
  111. package/package.json +2 -2
  112. package/assets/viewer/assets/index-C7hwGkuU.js +0 -3
  113. package/assets/viewer/assets/index-Dhc-7q5o.css +0 -1
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # edsger
2
2
 
3
- > Agentic CLI to **benchmark** repositories and **review** / **resolve** pull
4
- > requests against industrial-grade engineering standards.
3
+ > Agentic CLI to **benchmark** and **audit** repositories and **review** /
4
+ > **resolve** pull requests against industrial-grade engineering standards.
5
5
 
6
6
  `edsger` runs the [Claude Agent SDK](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk)
7
7
  over your code. The standards it applies (security, maintainability, testing,
@@ -40,6 +40,36 @@ Every run is archived under `.edsger/benchmark/runs/<timestamp>/` and appended t
40
40
  `.edsger/benchmark/history.jsonl`, so the JSON data is committable and the
41
41
  dashboard can show history and trends over time.
42
42
 
43
+ ### `edsger audit` — nitpick the whole repo
44
+
45
+ Comb through the repository hunting for anything **unprofessional, outdated,
46
+ fragile, or sloppy** — deprecated APIs, legacy patterns, swallowed errors, dead
47
+ code, dependency rot, missing tooling, and more — and write an organised,
48
+ evidence-backed issue report to `.edsger/audit/` (`report.md` + `report.json`).
49
+ `edsger review` is an alias.
50
+
51
+ ```bash
52
+ edsger audit # audit the current repo
53
+ edsger audit --serve # …and open the findings dashboard
54
+ edsger audit --focus "error handling" # concentrate the audit on one concern
55
+ edsger audit --only outdated,dependencies # restrict to specific dimension ids
56
+ edsger audit --fail-on high # CI gate: exit 2 on high/critical findings
57
+ edsger audit --json # also print JSON to stdout
58
+ edsger audit serve # browse existing findings (filter by severity/dimension)
59
+ edsger audit report --html audit.html # export a self-contained shareable viewer
60
+ ```
61
+
62
+ Findings are grouped by dimension (correctness, security, outdated patterns,
63
+ dependency health, error handling, craftsmanship, architecture, testing,
64
+ tooling, docs, performance — plus language-specific dimensions), sorted by
65
+ severity, each with the file/line evidence, why it matters, a concrete fix, and
66
+ an effort estimate. Repeated instances of the same issue are folded into one
67
+ finding listing all locations, and reports are capped at the standard's
68
+ `policy.maxFindings` (default 60, lowest severity dropped first) so they stay
69
+ readable. Low-effort fixes surface in a **Quick wins** section, and runs are
70
+ archived under `.edsger/audit/runs/<timestamp>/` with a `history.jsonl` trend
71
+ index, exactly like `benchmark`.
72
+
43
73
  ### `edsger serve` — dashboard (current, history, trends)
44
74
 
45
75
  Serve an interactive dashboard for the benchmark results in the current repo —
@@ -63,6 +93,75 @@ edsger report --html report.html # write a single shareable file
63
93
  edsger report --html report.html --open # …and open it
64
94
  ```
65
95
 
96
+ ### `edsger diagram` — generate diagrams from the code
97
+
98
+ Analyse the repository, decide which professional diagrams actually fit **this**
99
+ project (a library needs different diagrams than a microservice), and generate
100
+ each as renderable **Mermaid**. Writes to `.edsger/diagrams/` (`diagrams.md` +
101
+ `diagrams.json`, with each run archived under `runs/<timestamp>/`).
102
+
103
+ ```bash
104
+ edsger diagram # generate diagrams for the current repo
105
+ edsger diagram -C ./service # …for another directory
106
+ edsger diagram --serve # generate, then open the diagram dashboard
107
+ edsger diagram --only er-diagram,request-sequence # just specific diagrams
108
+ edsger diagram --json # also print JSON to stdout
109
+ ```
110
+
111
+ The agent detects the project's language(s), loads the matching diagram
112
+ **catalog** (from [edsger-assets](https://github.com/stevenzg/edsger-assets),
113
+ fully overridable), profiles the project, and emits diagrams grounded in real
114
+ files: **C4** system-context/container/component/deployment, **module dependency**
115
+ graphs, **class** & **domain models**, **ER** database schemas, **sequence**
116
+ flows, **function flowcharts**, **state machines**, **data-flow**, **CI/CD
117
+ pipelines**, and more — plus language-specific ones (React component trees, JPA
118
+ entity models, goroutine pipelines…).
119
+
120
+ The `diagrams.md` renders directly on GitHub. For an interactive, browsable view:
121
+
122
+ ```bash
123
+ edsger diagram serve # serve the diagram dashboard (renders Mermaid)
124
+ edsger diagram report --html diagrams.html # export a self-contained HTML file
125
+ ```
126
+
127
+ The dashboard renders every diagram as Mermaid with per-diagram **zoom**, a
128
+ **source/copy** toggle, and **SVG / PNG download**; each generated diagram also
129
+ gets a static Mermaid sanity check whose warnings surface in the CLI, in
130
+ `diagrams.md`, and on the card.
131
+
132
+ ### `edsger mindmap` — implementation mind map of the code
133
+
134
+ Analyse the repository and build an **implementation mind map**: an outline tree
135
+ whose root is the project and whose branches explain how the code is actually
136
+ implemented — entry points, core flows, module structure, domain model,
137
+ integrations — with every leaf citing the real files it describes. Writes to
138
+ `.edsger/mindmap/` (`mindmap.md` + `mindmap.json`, with each run archived under
139
+ `runs/<timestamp>/`).
140
+
141
+ ```bash
142
+ edsger mindmap # mind-map the current repo
143
+ edsger mindmap -C ./service # …another directory
144
+ edsger mindmap --serve # generate, then open the interactive viewer
145
+ edsger mindmap --focus "the auth subsystem" # concentrate the depth somewhere
146
+ edsger mindmap --json # also print JSON to stdout
147
+ ```
148
+
149
+ The agent detects the project's language(s), loads the matching mind-map
150
+ **standard** (from [edsger-assets](https://github.com/stevenzg/edsger-assets),
151
+ fully overridable), keeps only the branches this project's code supports, and
152
+ grows each into a faithful subtree. `mindmap.md` is a nested outline that reads
153
+ well on GitHub; for the interactive view:
154
+
155
+ ```bash
156
+ edsger mindmap serve # serve the mind-map viewer
157
+ edsger mindmap report --html mindmap.html # export a self-contained HTML file
158
+ ```
159
+
160
+ The viewer browses the tree **Workflowy-style**: collapse/expand any node, click
161
+ a bullet to zoom into that subtree (with a breadcrumb back up), navigate with
162
+ the keyboard (↑/↓/←/→, Enter to zoom, Esc to zoom out), and search across
163
+ titles, summaries, and file paths.
164
+
66
165
  ### `edsger pr-review <pr>` (requires `gh`)
67
166
 
68
167
  Review a pull request against the review standard. Previews by default; pass
package/assets/README.md CHANGED
@@ -8,6 +8,13 @@ This repository is the canonical source of truth for:
8
8
  maintainability, testing, documentation, delivery, and language-specific quality.
9
9
  - **PR review standards** (`review/`) — what a reviewer (human or agent) should look
10
10
  for when reviewing a pull request, and how findings are prioritised.
11
+ - **Diagram catalogs** (`diagrams/`) — the professional software diagrams (C4
12
+ architecture, ER, sequence, class, state, data-flow, deployment, and more), when
13
+ each applies to a project, and how to build it as renderable Mermaid.
14
+ - **Mind-map standards** (`mindmap/`) — how to build an implementation mind map
15
+ of a repository: an outline tree (entry points, core flows, module structure,
16
+ domain model, integrations) whose leaves cite the real files, browsable
17
+ Workflowy-style.
11
18
 
12
19
  The content here encodes widely accepted engineering best practices (OWASP, the
13
20
  Twelve-Factor App, Google Engineering Practices, SLSA, Keep a Changelog, Semantic
@@ -18,9 +25,10 @@ These standards can be consumed three ways:
18
25
 
19
26
  1. **The [`edsger`](https://www.npmjs.com/package/edsger) CLI** — bundles these
20
27
  assets and runs them with the Claude Agent SDK.
21
- 2. **As a Claude Code plugin** — `/benchmark`, `/pr-review`, `/pr-resolve` skills
22
- that work inside Claude Code with no CLI install (see below).
23
- 3. **Raw YAML** — point any tooling at the files in `benchmark/` and `review/`.
28
+ 2. **As a Claude Code plugin** — `/benchmark`, `/pr-review`, `/pr-resolve`, `/diagram`,
29
+ `/mindmap` skills that work inside Claude Code with no CLI install (see below).
30
+ 3. **Raw YAML** — point any tooling at the files in `benchmark/`, `review/`,
31
+ `diagrams/`, and `mindmap/`.
24
32
 
25
33
  ## Use inside Claude Code (no CLI install)
26
34
 
@@ -32,10 +40,10 @@ plugin to get the skills as slash commands:
32
40
  /plugin install edsger@edsger-assets
33
41
  ```
34
42
 
35
- Then run `/benchmark`, `/pr-review`, or `/pr-resolve`. The skills read the same
36
- rubric YAML from this repo (`${CLAUDE_PLUGIN_ROOT}/benchmark/...`) and prefer the
37
- `edsger` CLI when it is installed, falling back to running natively with Claude
38
- Code's own tools.
43
+ Then run `/benchmark`, `/pr-review`, `/pr-resolve`, `/diagram`, or `/mindmap`. The skills read
44
+ the same YAML from this repo (`${CLAUDE_PLUGIN_ROOT}/benchmark/...`,
45
+ `${CLAUDE_PLUGIN_ROOT}/diagrams/...`) and prefer the `edsger` CLI when it is
46
+ installed, falling back to running natively with Claude Code's own tools.
39
47
 
40
48
  ## Layout
41
49
 
@@ -44,15 +52,19 @@ edsger-assets/
44
52
  ├── .claude-plugin/ # Claude Code plugin + marketplace manifests
45
53
  │ ├── plugin.json
46
54
  │ └── marketplace.json
47
- ├── skills/ # Claude Code skills (/benchmark, /pr-review, /pr-resolve)
55
+ ├── skills/ # Claude Code skills (/benchmark, /pr-review, /pr-resolve, /diagram, /mindmap)
48
56
  │ ├── benchmark/SKILL.md
49
57
  │ ├── pr-review/SKILL.md
50
- └── pr-resolve/SKILL.md
58
+ ├── pr-resolve/SKILL.md
59
+ │ ├── diagram/SKILL.md
60
+ │ └── mindmap/SKILL.md
51
61
  ├── manifest.yaml # registry: versions, languages, default chains
52
62
  ├── languages.yaml # language detection heuristics (markers + globs)
53
63
  ├── schema/
54
64
  │ ├── benchmark.schema.json # JSON Schema for a benchmark rubric
55
- └── review.schema.json # JSON Schema for a review standard
65
+ ├── review.schema.json # JSON Schema for a review standard
66
+ │ ├── diagrams.schema.json # JSON Schema for a diagram catalog
67
+ │ └── mindmap.schema.json # JSON Schema for a mind-map standard
56
68
  ├── benchmark/
57
69
  │ ├── base.yaml # language-agnostic baseline (always applied)
58
70
  │ ├── typescript.yaml # overlays, merged on top of base
@@ -61,14 +73,15 @@ edsger-assets/
61
73
  │ ├── csharp.yaml
62
74
  │ ├── java.yaml
63
75
  │ └── dart.yaml
64
- └── review/
65
- ├── base.yaml
66
- ├── typescript.yaml
67
- ├── python.yaml
68
- ├── go.yaml
69
- ├── csharp.yaml
70
- ├── java.yaml
71
- └── dart.yaml
76
+ ├── review/
77
+ ├── base.yaml
78
+ │ └── … # language overlays
79
+ ├── diagrams/
80
+ ├── base.yaml # universal diagram catalog (C4, ER, sequence, flow, …)
81
+ │ └── … # language overlays (react tree, JPA model, goroutines, …)
82
+ └── mindmap/
83
+ ├── base.yaml # universal mind-map aspects (entry points, flows, modules, …)
84
+ └── … # language overlays (package surface, go layout, …)
72
85
  ```
73
86
 
74
87
  ## How standards are resolved
@@ -0,0 +1,187 @@
1
+ id: base
2
+ name: Universal Repository Audit Standard
3
+ version: 0.1.0
4
+ kind: audit
5
+ extends: null
6
+ appliesTo: ["*"]
7
+
8
+ # Tone for the whole audit: a demanding but fair staff engineer doing a deep
9
+ # professionalism pass over an existing codebase (not a diff).
10
+ guidance: >
11
+ Hunt for anything that separates this repository from truly professional,
12
+ industrial-grade work: sloppy or amateurish implementations, outdated or
13
+ deprecated patterns, hidden fragility, and neglected hygiene. Every finding
14
+ must cite concrete evidence (file paths, and lines where possible) and come
15
+ with an actionable fix. Prefer many precise, high-signal findings over vague
16
+ generalities — but do not invent problems where the code is genuinely fine.
17
+ When the same issue recurs across many files, consolidate it into ONE finding
18
+ whose detail lists the affected locations, rather than one finding per file.
19
+
20
+ policy:
21
+ # Keep reports readable: findings beyond this cap are dropped lowest-severity
22
+ # first (the report says how many were omitted).
23
+ maxFindings: 60
24
+
25
+ dimensions:
26
+ - id: correctness
27
+ title: Correctness & Robustness
28
+ defaultSeverity: high
29
+ guidance: >
30
+ Latent bugs and fragile logic that happen to work today: unhandled edge
31
+ cases (empty/null, boundaries, unicode, large inputs), off-by-one errors,
32
+ race conditions, order-dependent behaviour, silent data loss, and
33
+ incorrect assumptions about the environment (paths, locale, timezone,
34
+ line endings).
35
+ checklist:
36
+ - Edge cases (empty, null, boundary, huge input) are handled
37
+ - No time-of-check/time-of-use or ordering hazards
38
+ - Parsing/serialisation round-trips are safe
39
+ - No reliance on undefined or platform-specific behaviour
40
+
41
+ - id: security
42
+ title: Security & Secrets Hygiene
43
+ defaultSeverity: critical
44
+ guidance: >
45
+ Secrets committed to the repo or baked into defaults, injection risks
46
+ (command, SQL, path, template), unsafe deserialisation, missing
47
+ validation of untrusted input, world-readable temp files, disabled TLS
48
+ verification, and overly broad permissions. Also flag security-relevant
49
+ hygiene: no dependency audit in CI, no SECURITY.md for public projects.
50
+ checklist:
51
+ - No secrets, tokens, or private endpoints in code, config, or history-visible files
52
+ - Untrusted input is validated; shell/SQL/path construction is safe
53
+ - Crypto/TLS is not weakened (no verify=false, no home-rolled crypto)
54
+ references:
55
+ - "https://owasp.org/www-project-top-ten/"
56
+
57
+ - id: outdated
58
+ title: Outdated & Deprecated Patterns
59
+ defaultSeverity: medium
60
+ guidance: >
61
+ Code written against yesterday's ecosystem: deprecated APIs and language
62
+ constructs, EOL runtime/toolchain targets, legacy idioms with clearly
63
+ better modern replacements, polyfills or workarounds for long-fixed
64
+ issues, and documentation/tooling that references dead services. Modern
65
+ does not mean fashionable — flag only where the ecosystem has genuinely
66
+ moved on and the old pattern carries real cost (support, safety, DX).
67
+ checklist:
68
+ - No use of APIs the language/framework has deprecated
69
+ - Runtime/toolchain targets are supported (not end-of-life)
70
+ - No stale polyfills, shims, or workarounds for long-fixed bugs
71
+ - Idioms match the current, well-established ecosystem standard
72
+
73
+ - id: dependencies
74
+ title: Dependency Health
75
+ defaultSeverity: medium
76
+ guidance: >
77
+ The dependency tree as a liability: abandoned or unmaintained packages,
78
+ badly outdated majors, missing or uncommitted lockfiles, duplicated
79
+ libraries doing the same job, heavyweight dependencies used for one
80
+ function, and version ranges too loose for reproducible builds.
81
+ checklist:
82
+ - Lockfile exists, is committed, and matches the manifest
83
+ - No abandoned/unmaintained dependencies on critical paths
84
+ - No duplicate libraries covering the same concern
85
+ - Dependency count and weight are proportionate to the problem
86
+
87
+ - id: error-handling
88
+ title: Error Handling & Observability
89
+ defaultSeverity: high
90
+ guidance: >
91
+ Swallowed exceptions, catch-all handlers that hide failures, errors
92
+ logged and then ignored, missing exit codes in CLIs, user-facing messages
93
+ that leak internals or say nothing, debug prints left in production
94
+ paths, and absent or unstructured logging where operations would need it.
95
+ checklist:
96
+ - No silently swallowed errors or empty catch blocks
97
+ - Failure paths produce actionable messages and correct exit/status codes
98
+ - Debug/print statements are not left in production code paths
99
+ - Logging exists where diagnosing failures would otherwise be impossible
100
+
101
+ - id: craftsmanship
102
+ title: Code Craftsmanship
103
+ defaultSeverity: medium
104
+ guidance: >
105
+ The "unprofessional implementation" catch-all: dead code and commented-out
106
+ blocks, copy-pasted near-duplicates, magic numbers/strings, misleading or
107
+ lazy names (data2, temp, doStuff), functions doing five unrelated things,
108
+ inconsistent style within the repo, typos in identifiers and user-facing
109
+ text, TODO/FIXME rot with no owner or issue, and clever code where boring
110
+ code would do.
111
+ checklist:
112
+ - No dead code, commented-out blocks, or leftover scaffolding
113
+ - No copy-paste duplication that should be a shared helper
114
+ - Names communicate intent; magic values are named constants
115
+ - TODOs/FIXMEs are either actionable (linked) or removed
116
+
117
+ - id: architecture
118
+ title: Architecture & Structure
119
+ defaultSeverity: medium
120
+ guidance: >
121
+ Structure that will not scale with the project: god files/modules,
122
+ circular dependencies, business logic welded to I/O or UI, missing
123
+ layering where it is clearly needed, misplaced responsibilities,
124
+ configuration scattered across the codebase, and public surface area
125
+ exposed by accident.
126
+ checklist:
127
+ - Responsibilities are separated; no god modules or circular imports
128
+ - Core logic is separable from I/O, UI, and framework glue
129
+ - Configuration has a single, discoverable home
130
+ - Only intentional API surface is exported/public
131
+
132
+ - id: testing
133
+ title: Testing Discipline
134
+ defaultSeverity: high
135
+ guidance: >
136
+ Missing tests for core behaviour, tests that assert nothing meaningful
137
+ (snapshot dumps, expect(true)), non-deterministic tests (real time,
138
+ network, ordering), no failure-path coverage, tests not run in CI, and
139
+ test code held to a visibly lower standard than production code.
140
+ checklist:
141
+ - Core behaviour and failure paths are covered by meaningful assertions
142
+ - Tests are deterministic and independent of network/clock/ordering
143
+ - Tests run (and gate) in CI
144
+ - Test code is maintained to production standards
145
+
146
+ - id: tooling
147
+ title: Tooling & Delivery Hygiene
148
+ defaultSeverity: medium
149
+ guidance: >
150
+ The professional baseline around the code: formatter and linter present,
151
+ configured, and actually enforced; type checking on; CI that builds,
152
+ lints, and tests every change; sensible .gitignore (no build artifacts or
153
+ editor droppings committed); reproducible builds; and a release process
154
+ that is scripted rather than tribal knowledge.
155
+ checklist:
156
+ - Formatter + linter configured and enforced (locally and in CI)
157
+ - CI builds, lints, and tests every push/PR
158
+ - No build artifacts, caches, or editor files committed
159
+ - Versioning/release flow is scripted and documented
160
+
161
+ - id: docs
162
+ title: Documentation & Onboarding
163
+ defaultSeverity: low
164
+ guidance: >
165
+ Whether a competent stranger can use and contribute to this repo: README
166
+ that reflects reality (install, usage, examples that actually run),
167
+ documented configuration and environment variables, LICENSE present,
168
+ CHANGELOG maintained, and docs that have not drifted from the code.
169
+ checklist:
170
+ - README quick-start actually works as written
171
+ - Configuration/env vars are documented
172
+ - LICENSE exists; CHANGELOG (or releases) tracks user-facing change
173
+ - No documentation that contradicts current behaviour
174
+
175
+ - id: performance
176
+ title: Performance & Resource Waste
177
+ defaultSeverity: medium
178
+ guidance: >
179
+ Obvious waste, not micro-optimisation: accidental O(n^2) on unbounded
180
+ input, N+1 I/O patterns, whole-file/whole-table loads where streaming is
181
+ needed, unbounded caches or concurrency, synchronous blocking on hot
182
+ paths, and resources (handles, connections, watchers) that are never
183
+ released.
184
+ checklist:
185
+ - No accidentally quadratic work or N+1 I/O on unbounded data
186
+ - Memory and concurrency are bounded
187
+ - Resources are reliably released on all paths
@@ -0,0 +1,46 @@
1
+ id: csharp
2
+ name: C# / .NET Audit Overlay
3
+ version: 0.1.0
4
+ kind: audit
5
+ extends: base
6
+ appliesTo: [csharp]
7
+
8
+ dimensions:
9
+ - id: cs-legacy
10
+ title: Legacy .NET Patterns
11
+ defaultSeverity: medium
12
+ guidance: >
13
+ Framework-era habits in a modern .NET codebase: `WebClient` where
14
+ `HttpClient`/`IHttpClientFactory` is standard, `ArrayList` and other
15
+ non-generic collections, old-style verbose .csproj, `BinaryFormatter`,
16
+ and projects targeting out-of-support runtimes.
17
+ checklist:
18
+ - HttpClient (properly managed) instead of WebClient
19
+ - Generic collections; no BinaryFormatter
20
+ - SDK-style projects targeting supported runtimes
21
+
22
+ - id: cs-robustness
23
+ title: C# Robustness Idioms
24
+ defaultSeverity: high
25
+ guidance: >
26
+ Sync-over-async (`.Result`, `.Wait()`, `GetAwaiter().GetResult()`),
27
+ `async void` outside event handlers, undisposed `IDisposable`s,
28
+ exceptions swallowed by empty catches, and nullable reference types
29
+ disabled or ignored with `!` sprinkled everywhere.
30
+ checklist:
31
+ - No sync-over-async or async void on non-event paths
32
+ - IDisposables are disposed (using/await using)
33
+ - Nullable reference types enabled and respected
34
+
35
+ - id: cs-conventions
36
+ title: Solution & Style Hygiene
37
+ defaultSeverity: medium
38
+ guidance: >
39
+ The professional baseline: `.editorconfig` with real rules, analyzers
40
+ (Roslyn/StyleCop) enabled and warnings treated seriously, consistent
41
+ namespace-to-folder mapping, and central package management where the
42
+ solution has grown past a couple of projects.
43
+ checklist:
44
+ - .editorconfig + analyzers enforced, warnings not suppressed wholesale
45
+ - Namespaces match folder/project structure
46
+ - Package versions centrally managed in multi-project solutions
@@ -0,0 +1,46 @@
1
+ id: dart
2
+ name: Dart / Flutter Audit Overlay
3
+ version: 0.1.0
4
+ kind: audit
5
+ extends: base
6
+ appliesTo: [dart]
7
+
8
+ dimensions:
9
+ - id: dart-legacy
10
+ title: Legacy Dart / Flutter Patterns
11
+ defaultSeverity: medium
12
+ guidance: >
13
+ Pre-null-safety code or `// @dart=2.9` opt-outs, deprecated Flutter
14
+ widgets and theme APIs (e.g. long-removed button classes, textScaleFactor),
15
+ the retired `pedantic`/`effective_dart` lint packages instead of
16
+ `flutter_lints`/`lints`, and SDK constraints spanning EOL versions.
17
+ checklist:
18
+ - Sound null safety everywhere; no language-version opt-outs
19
+ - No deprecated widget/theme APIs
20
+ - Current lints package; supported SDK constraints
21
+
22
+ - id: dart-robustness
23
+ title: Dart Robustness Idioms
24
+ defaultSeverity: high
25
+ guidance: >
26
+ Un-awaited futures without `unawaited()`, `BuildContext` used across
27
+ async gaps, `setState` after dispose or as a state-management strategy
28
+ at scale, missing `dispose()` for controllers/streams, and blocking work
29
+ on the UI isolate.
30
+ checklist:
31
+ - Futures awaited or explicitly unawaited; no context-across-async-gap
32
+ - Controllers/streams/subscriptions are disposed
33
+ - Heavy work moved off the UI isolate
34
+
35
+ - id: dart-conventions
36
+ title: Project & Pub Hygiene
37
+ defaultSeverity: medium
38
+ guidance: >
39
+ analysis_options.yaml present with meaningful rules, `dart format`
40
+ enforced, pubspec dependencies tidy (no unused packages, sensible
41
+ constraints), and generated files (freezed, build_runner output) handled
42
+ consistently — either committed with a policy or reliably generated.
43
+ checklist:
44
+ - analysis_options with enforced lints; formatter clean
45
+ - pubspec constraints tidy; no unused dependencies
46
+ - Generated-file policy is consistent
@@ -0,0 +1,46 @@
1
+ id: go
2
+ name: Go Audit Overlay
3
+ version: 0.1.0
4
+ kind: audit
5
+ extends: base
6
+ appliesTo: [go]
7
+
8
+ dimensions:
9
+ - id: go-legacy
10
+ title: Legacy Go Patterns
11
+ defaultSeverity: medium
12
+ guidance: >
13
+ Pre-modules and pre-1.x idioms: `io/ioutil` (deprecated since 1.16),
14
+ `github.com/pkg/errors` where `fmt.Errorf("%w")` and `errors.Is/As` are
15
+ standard, vendored GOPATH-era layouts, `interface{}` where `any` or
16
+ generics fit, and toolchain/go directives pinned to unsupported versions.
17
+ checklist:
18
+ - No io/ioutil or other deprecated stdlib usage
19
+ - Error wrapping uses %w / errors.Is / errors.As
20
+ - go.mod targets a supported Go release
21
+
22
+ - id: go-robustness
23
+ title: Go Robustness Idioms
24
+ defaultSeverity: high
25
+ guidance: >
26
+ Discarded errors (`_ =` or plain ignored returns), `panic` in library
27
+ code, goroutines launched with no lifecycle or cancellation, missing
28
+ `context.Context` propagation on blocking/network paths, data races
29
+ around shared maps/slices, and `defer` misuse in loops.
30
+ checklist:
31
+ - Errors are handled or explicitly justified, never silently dropped
32
+ - No panics in library paths; goroutines have owners and cancellation
33
+ - context.Context flows through blocking and network calls
34
+
35
+ - id: go-idioms
36
+ title: Go Conventions & Layout
37
+ defaultSeverity: medium
38
+ guidance: >
39
+ Package names that stutter (`user.UserService`), kitchen-sink `util`
40
+ packages, exported identifiers without doc comments, interfaces declared
41
+ by the producer instead of the consumer, and repos missing the standard
42
+ professional baseline (gofmt enforced, go vet / staticcheck in CI).
43
+ checklist:
44
+ - Package and identifier naming follows Go conventions (no stutter)
45
+ - Exported API has doc comments
46
+ - gofmt + vet/staticcheck are enforced in CI
@@ -0,0 +1,46 @@
1
+ id: java
2
+ name: Java Audit Overlay
3
+ version: 0.1.0
4
+ kind: audit
5
+ extends: base
6
+ appliesTo: [java]
7
+
8
+ dimensions:
9
+ - id: java-legacy
10
+ title: Legacy Java Patterns
11
+ defaultSeverity: medium
12
+ guidance: >
13
+ APIs the platform has left behind: `java.util.Date`/`Calendar` where
14
+ `java.time` is standard, raw generic types, `Vector`/`Hashtable`,
15
+ hand-rolled resource handling instead of try-with-resources, `javax.*`
16
+ remnants in a Jakarta world, and builds targeting EOL JDKs.
17
+ checklist:
18
+ - java.time used instead of Date/Calendar
19
+ - No raw types or legacy synchronized collections without cause
20
+ - Build targets a supported (ideally LTS) JDK
21
+
22
+ - id: java-robustness
23
+ title: Java Robustness Idioms
24
+ defaultSeverity: high
25
+ guidance: >
26
+ Swallowed checked exceptions (catch–printStackTrace–continue),
27
+ `System.out` logging in production code, null-happy APIs where
28
+ `Optional` or explicit contracts belong, mutable static state, and
29
+ equals/hashCode contracts broken or missing on value types.
30
+ checklist:
31
+ - No swallowed exceptions or printStackTrace in production paths
32
+ - A real logging framework is used consistently
33
+ - Value types honour equals/hashCode; shared state is controlled
34
+
35
+ - id: java-build
36
+ title: Build & Dependency Hygiene
37
+ defaultSeverity: medium
38
+ guidance: >
39
+ Maven/Gradle professionalism: wrapper committed, dependency versions
40
+ managed centrally (BOM/catalog) rather than sprinkled, no SNAPSHOT
41
+ dependencies on release paths, and static analysis (ErrorProne,
42
+ SpotBugs, Checkstyle) wired into the build rather than aspirational.
43
+ checklist:
44
+ - Build wrapper is committed and CI uses it
45
+ - Versions are centrally managed; no stray SNAPSHOTs
46
+ - Static analysis runs as part of the build
@@ -0,0 +1,49 @@
1
+ id: python
2
+ name: Python Audit Overlay
3
+ version: 0.1.0
4
+ kind: audit
5
+ extends: base
6
+ appliesTo: [python]
7
+
8
+ dimensions:
9
+ - id: py-legacy
10
+ title: Legacy Python Patterns
11
+ defaultSeverity: medium
12
+ guidance: >
13
+ Python 2 ghosts and pre-modern idioms: `%` or `.format()` where
14
+ f-strings are standard, `os.path` gymnastics instead of `pathlib`,
15
+ `setup.py`/`setup.cfg` where `pyproject.toml` is expected, six/futures
16
+ compatibility shims, and support claims for EOL interpreter versions.
17
+ checklist:
18
+ - No Python 2 compatibility shims or EOL interpreter targets
19
+ - pyproject.toml is the packaging source of truth
20
+ - Modern idioms (f-strings, pathlib, dataclasses/enum) where they fit
21
+
22
+ - id: py-robustness
23
+ title: Python Robustness Idioms
24
+ defaultSeverity: high
25
+ guidance: >
26
+ Classic footguns: bare `except:` or `except Exception: pass`, mutable
27
+ default arguments, shadowing builtins, `assert` for runtime validation,
28
+ `print` debugging in library code, missing `if __name__ == "__main__"`
29
+ guards, and un-annotated public functions in a codebase that otherwise
30
+ uses type hints.
31
+ checklist:
32
+ - No bare/blanket excepts that swallow errors
33
+ - No mutable default arguments
34
+ - Type hints are present and consistent on public surfaces
35
+ - No print-debugging or asserts-as-validation in production paths
36
+
37
+ - id: py-packaging
38
+ title: Environment & Packaging Hygiene
39
+ defaultSeverity: medium
40
+ guidance: >
41
+ Reproducibility of the environment: dependencies pinned or locked
42
+ (uv/poetry/pip-tools), dev vs runtime dependencies separated, a single
43
+ obvious way to set the project up, and linters/formatters (ruff, black,
44
+ mypy) configured in pyproject rather than scattered dotfiles — or absent
45
+ entirely.
46
+ checklist:
47
+ - Dependencies are locked/pinned for reproducible installs
48
+ - Dev and runtime dependencies are separated
49
+ - Lint/format/type-check tooling is configured and enforced