edsger 0.83.0 → 0.85.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/README.md +102 -2
- package/assets/README.md +29 -10
- package/assets/audit/base.yaml +187 -0
- package/assets/audit/csharp.yaml +46 -0
- package/assets/audit/dart.yaml +46 -0
- package/assets/audit/go.yaml +46 -0
- package/assets/audit/java.yaml +46 -0
- package/assets/audit/python.yaml +49 -0
- package/assets/audit/typescript.yaml +51 -0
- package/assets/audit-viewer/assets/audit--os0TXXZ.css +1 -0
- package/assets/audit-viewer/assets/audit-CSblYELs.js +2 -0
- package/assets/audit-viewer/audit.html +31 -0
- package/assets/audit-viewer-single.html +32 -0
- package/assets/diagrams-viewer/assets/{abnfDiagram-VRR7QNED-BuBTl7CD.js → abnfDiagram-VRR7QNED-CWLpbgGU.js} +1 -1
- package/assets/diagrams-viewer/assets/{arc-OMyuAfpK.js → arc-B4VipCr_.js} +1 -1
- package/assets/diagrams-viewer/assets/{architectureDiagram-ZJ3FMSHR-BtZuD4Oc.js → architectureDiagram-ZJ3FMSHR-BMDodQXV.js} +1 -1
- package/assets/diagrams-viewer/assets/{blockDiagram-677ZJIJ3-BXUV3Kw8.js → blockDiagram-677ZJIJ3-DbHoVVH-.js} +1 -1
- package/assets/diagrams-viewer/assets/{c4Diagram-LMCZKHZV-CB6FLms7.js → c4Diagram-LMCZKHZV-CyUEj98S.js} +1 -1
- package/assets/diagrams-viewer/assets/channel-DWh7ErxY.js +1 -0
- package/assets/diagrams-viewer/assets/{chunk-2Q5K7J3B-mPN4SRuj.js → chunk-2Q5K7J3B-CWu0p0os.js} +1 -1
- package/assets/diagrams-viewer/assets/{chunk-32BRIVSS-DVv1-dcH.js → chunk-32BRIVSS-BhVWSCoK.js} +1 -1
- package/assets/diagrams-viewer/assets/{chunk-5VM5RSS4-CV1HWp5i.js → chunk-5VM5RSS4-B_2wZBAn.js} +1 -1
- package/assets/diagrams-viewer/assets/{chunk-EX3LRPZG-Dka-2CXP.js → chunk-EX3LRPZG-D_MRgtfL.js} +1 -1
- package/assets/diagrams-viewer/assets/{chunk-JWPE2WC7-D18DLD3z.js → chunk-JWPE2WC7-dsh1qiy0.js} +1 -1
- package/assets/diagrams-viewer/assets/{chunk-MOJQB5TN-DZ8recee.js → chunk-MOJQB5TN-BvLm4a6B.js} +1 -1
- package/assets/diagrams-viewer/assets/{chunk-RYQCIY6F-D-T7U7G_.js → chunk-RYQCIY6F-gJyPbIpx.js} +1 -1
- package/assets/diagrams-viewer/assets/{chunk-V7JOEXUC-CycRbumY.js → chunk-V7JOEXUC-BMvj0zJM.js} +1 -1
- package/assets/diagrams-viewer/assets/{chunk-VR4S4FIN-CgtEJekm.js → chunk-VR4S4FIN-Di2iBUXs.js} +1 -1
- package/assets/diagrams-viewer/assets/{chunk-XXDRQBXY-N1fSDz2n.js → chunk-XXDRQBXY-Cfajbd4I.js} +1 -1
- package/assets/diagrams-viewer/assets/classDiagram-OUVF2IWQ-winWhRce.js +1 -0
- package/assets/diagrams-viewer/assets/classDiagram-v2-EOCWNBFH-winWhRce.js +1 -0
- package/assets/diagrams-viewer/assets/{cose-bilkent-JH36ORCC-x2DnNSLL.js → cose-bilkent-JH36ORCC-ClE2EhTL.js} +1 -1
- package/assets/diagrams-viewer/assets/{cynefin-VYW2F7L2-CWCJCs-i.js → cynefin-VYW2F7L2-nm5z0Jwc.js} +1 -1
- package/assets/diagrams-viewer/assets/{cynefinDiagram-TSTJHNR4-mn39JWqG.js → cynefinDiagram-TSTJHNR4-CGhnRh5V.js} +1 -1
- package/assets/diagrams-viewer/assets/{dagre-VKFMJZFB-iOjB5Pax.js → dagre-VKFMJZFB-COlahHKk.js} +1 -1
- package/assets/diagrams-viewer/assets/{diagram-FQU43EPY-DIFXEG6K.js → diagram-FQU43EPY-DsUclBK0.js} +1 -1
- package/assets/diagrams-viewer/assets/{diagram-G47NLZAW-CUFys0Kk.js → diagram-G47NLZAW-CnjT9SvX.js} +1 -1
- package/assets/diagrams-viewer/assets/{diagram-NH7WQ7WH-ByXjnNJR.js → diagram-NH7WQ7WH-DiGoGOyA.js} +1 -1
- package/assets/diagrams-viewer/assets/{diagram-OA4YK3LP-B7VCnnms.js → diagram-OA4YK3LP-qi8nz9qe.js} +1 -1
- package/assets/diagrams-viewer/assets/{diagram-WEI45ONY-DdmQeP2M.js → diagram-WEI45ONY-BV3PGzwL.js} +1 -1
- package/assets/diagrams-viewer/assets/diagrams-8nCc1utO.css +1 -0
- package/assets/diagrams-viewer/assets/{diagrams-DFlErBCY.js → diagrams-CF48btj0.js} +100 -100
- package/assets/diagrams-viewer/assets/{ebnfDiagram-CCIWWBDH-B54UVMil.js → ebnfDiagram-CCIWWBDH-CtKWe-dh.js} +1 -1
- package/assets/diagrams-viewer/assets/{erDiagram-Q63AITRT-zkOgYlyz.js → erDiagram-Q63AITRT-Aajee3Fz.js} +1 -1
- package/assets/diagrams-viewer/assets/{flowDiagram-23GEKE2U-CCNIfraz.js → flowDiagram-23GEKE2U-N3Xe2K9t.js} +1 -1
- package/assets/diagrams-viewer/assets/{ganttDiagram-NO4QXBWP-DCn2zVSV.js → ganttDiagram-NO4QXBWP-Bjicdg8S.js} +1 -1
- package/assets/diagrams-viewer/assets/{gitGraphDiagram-IHSO6WYX-lB6SW9xm.js → gitGraphDiagram-IHSO6WYX-CacIXKIe.js} +1 -1
- package/assets/diagrams-viewer/assets/{infoDiagram-FWYZ7A6U-CvGfGSmH.js → infoDiagram-FWYZ7A6U-CVmDapTx.js} +1 -1
- package/assets/diagrams-viewer/assets/{ishikawaDiagram-FXEZZL3T-DnwhjgE5.js → ishikawaDiagram-FXEZZL3T-DMJf1YQN.js} +1 -1
- package/assets/diagrams-viewer/assets/{journeyDiagram-5HDEW3XC-C8LVhqZM.js → journeyDiagram-5HDEW3XC-Bk_U6MPk.js} +1 -1
- package/assets/diagrams-viewer/assets/{kanban-definition-HUTT4EX6-PYOrsIQc.js → kanban-definition-HUTT4EX6-n05wGXiD.js} +1 -1
- package/assets/diagrams-viewer/assets/{linear-CIU4B3PA.js → linear-DD_zky65.js} +1 -1
- package/assets/diagrams-viewer/assets/{mindmap-definition-LN4V7U3C-B-HjOMSw.js → mindmap-definition-LN4V7U3C-BWt_I9vr.js} +1 -1
- package/assets/diagrams-viewer/assets/{pegDiagram-2B236MQR-dAvsUVxy.js → pegDiagram-2B236MQR-CCZTIXBZ.js} +1 -1
- package/assets/diagrams-viewer/assets/{pieDiagram-ENE6RG2P-W-6EgmyD.js → pieDiagram-ENE6RG2P-BmIQql1w.js} +1 -1
- package/assets/diagrams-viewer/assets/{quadrantDiagram-ABIIQ3AL-SlUlWOO8.js → quadrantDiagram-ABIIQ3AL-BPvOH5QN.js} +1 -1
- package/assets/diagrams-viewer/assets/{railroadDiagram-RFXS5EU6-KjtAtTVy.js → railroadDiagram-RFXS5EU6-DpgVbjSl.js} +1 -1
- package/assets/diagrams-viewer/assets/{requirementDiagram-TGXJPOKE-DZtlwaER.js → requirementDiagram-TGXJPOKE-CDVpI3MH.js} +1 -1
- package/assets/diagrams-viewer/assets/{sankeyDiagram-HTMAVEWB-1Ae4oRc3.js → sankeyDiagram-HTMAVEWB-DU2J23Xy.js} +1 -1
- package/assets/diagrams-viewer/assets/{sequenceDiagram-DBY2YBRQ-DU-x0cLP.js → sequenceDiagram-DBY2YBRQ-BIVlCWU4.js} +1 -1
- package/assets/diagrams-viewer/assets/{sizeCapture-X5ZJPWSS-Cemh16BZ.js → sizeCapture-X5ZJPWSS-C9KxyKN2.js} +1 -1
- package/assets/diagrams-viewer/assets/{stateDiagram-2N3HPSRC-CtfrA6gP.js → stateDiagram-2N3HPSRC-Ba5mRI9d.js} +1 -1
- package/assets/diagrams-viewer/assets/stateDiagram-v2-6OUMAXLB-Dw-0OG6b.js +1 -0
- package/assets/diagrams-viewer/assets/{swimlanes-5IMT3BWC-BkZY9GJ7.js → swimlanes-5IMT3BWC-aOsD2O80.js} +2 -2
- package/assets/diagrams-viewer/assets/swimlanesDiagram-G3AALYLV-KujklZml.js +8 -0
- package/assets/diagrams-viewer/assets/{timeline-definition-FHXFAJF6-DikyXYB3.js → timeline-definition-FHXFAJF6-CmYd84Hc.js} +1 -1
- package/assets/diagrams-viewer/assets/{vennDiagram-L72KCM5P-C_7veK57.js → vennDiagram-L72KCM5P-CDiMK-z9.js} +1 -1
- package/assets/diagrams-viewer/assets/{wardleyDiagram-EHGQE667-Das_YJGv.js → wardleyDiagram-EHGQE667-BKLsv25u.js} +1 -1
- package/assets/diagrams-viewer/assets/{xychartDiagram-FW5EYKEG-B5fwef3a.js → xychartDiagram-FW5EYKEG-Bpj6Ub-a.js} +1 -1
- package/assets/diagrams-viewer/diagrams.html +19 -2
- package/assets/diagrams-viewer-single.html +382 -365
- package/assets/manifest.yaml +13 -1
- package/assets/mindmap/base.yaml +115 -0
- package/assets/mindmap/csharp.yaml +32 -0
- package/assets/mindmap/dart.yaml +42 -0
- package/assets/mindmap/go.yaml +33 -0
- package/assets/mindmap/java.yaml +40 -0
- package/assets/mindmap/python.yaml +43 -0
- package/assets/mindmap/typescript.yaml +47 -0
- package/assets/mindmap-viewer/assets/mindmap-C50Y8qu4.js +4 -0
- package/assets/mindmap-viewer/assets/mindmap-D7KMR9EM.css +1 -0
- package/assets/mindmap-viewer/mindmap.html +31 -0
- package/assets/mindmap-viewer-single.html +34 -0
- package/assets/schema/audit.schema.json +66 -0
- package/assets/schema/mindmap.schema.json +69 -0
- package/assets/schema/testcases.schema.json +69 -0
- package/assets/skills/audit/SKILL.md +76 -0
- package/assets/skills/mindmap/SKILL.md +69 -0
- package/assets/skills/testcases/SKILL.md +73 -0
- package/assets/testcases/base.yaml +147 -0
- package/assets/testcases-viewer/assets/testcases-DaNbQxip.js +2 -0
- package/assets/testcases-viewer/assets/testcases-f2mIbfYU.css +1 -0
- package/assets/testcases-viewer/testcases.html +31 -0
- package/assets/testcases-viewer-single.html +32 -0
- package/assets/viewer/assets/index-BFtGar9N.css +1 -0
- package/assets/viewer/assets/index-XOKyyudT.js +3 -0
- package/assets/viewer/index.html +19 -2
- package/assets/viewer-single.html +21 -4
- package/dist/index.js +1961 -564
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/assets/diagrams-viewer/assets/channel-DfIqGUHQ.js +0 -1
- package/assets/diagrams-viewer/assets/classDiagram-OUVF2IWQ-D7S3taPH.js +0 -1
- package/assets/diagrams-viewer/assets/classDiagram-v2-EOCWNBFH-D7S3taPH.js +0 -1
- package/assets/diagrams-viewer/assets/diagrams-hdYg_gGB.css +0 -1
- package/assets/diagrams-viewer/assets/stateDiagram-v2-6OUMAXLB-BU13FASH.js +0 -1
- package/assets/diagrams-viewer/assets/swimlanesDiagram-G3AALYLV-03GXtgC-.js +0 -8
- package/assets/viewer/assets/index-C7hwGkuU.js +0 -3
- 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** /
|
|
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 —
|
|
@@ -99,6 +129,76 @@ The dashboard renders every diagram as Mermaid with per-diagram **zoom**, a
|
|
|
99
129
|
gets a static Mermaid sanity check whose warnings surface in the CLI, in
|
|
100
130
|
`diagrams.md`, and on the card.
|
|
101
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
|
+
|
|
165
|
+
### `edsger testcases` — manual test-case plan for the repo
|
|
166
|
+
|
|
167
|
+
Analyse the repository and derive a **manual test-case plan**: an outline tree
|
|
168
|
+
whose root is the project, whose branches are the areas a human tester should
|
|
169
|
+
exercise — core flows, inputs & edge cases, errors & recovery, data integrity,
|
|
170
|
+
integrations, configuration — and whose leaves are concrete test cases
|
|
171
|
+
(preconditions, exact steps, one expected result, a priority) that a tester who
|
|
172
|
+
has never read the code can execute. These are **not** automated code tests.
|
|
173
|
+
Writes to `.edsger/testcases/` (`testcases.md` + `testcases.json`, with each run
|
|
174
|
+
archived under `runs/<timestamp>/`).
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
edsger testcases # derive a test plan for the current repo
|
|
178
|
+
edsger testcases -C ./service # …another directory
|
|
179
|
+
edsger testcases --serve # generate, then open the interactive viewer
|
|
180
|
+
edsger testcases --focus "the export feature" # concentrate the depth somewhere
|
|
181
|
+
edsger testcases --json # also print JSON to stdout
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
The agent detects the project's language(s), loads the matching test-case
|
|
185
|
+
**standard** (from [edsger-assets](https://github.com/stevenzg/edsger-assets),
|
|
186
|
+
fully overridable), keeps only the test areas this project's code supports, and
|
|
187
|
+
grounds every case in real behaviour — commands, flags, routes, screens, and
|
|
188
|
+
error branches — citing the files that implement it. `testcases.md` is a nested
|
|
189
|
+
Markdown checklist a tester can tick off; for the interactive view:
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
edsger testcases serve # serve the test-case viewer
|
|
193
|
+
edsger testcases report --html testcases.html # export a self-contained HTML file
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
The viewer browses the plan **Workflowy-style** like the mind map —
|
|
197
|
+
collapse/expand, zoom with breadcrumbs, keyboard navigation, search — plus
|
|
198
|
+
test-case extras: **priority badges** with a filter (critical/high/medium/low),
|
|
199
|
+
per-branch case counts, and expandable case details showing preconditions,
|
|
200
|
+
numbered steps, and the expected result.
|
|
201
|
+
|
|
102
202
|
### `edsger pr-review <pr>` (requires `gh`)
|
|
103
203
|
|
|
104
204
|
Review a pull request against the review standard. Previews by default; pass
|
package/assets/README.md
CHANGED
|
@@ -11,6 +11,15 @@ This repository is the canonical source of truth for:
|
|
|
11
11
|
- **Diagram catalogs** (`diagrams/`) — the professional software diagrams (C4
|
|
12
12
|
architecture, ER, sequence, class, state, data-flow, deployment, and more), when
|
|
13
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.
|
|
18
|
+
- **Manual test-case standards** (`testcases/`) — how to derive a manual
|
|
19
|
+
test-case plan from a repository: an outline tree of test areas (core flows,
|
|
20
|
+
inputs & edge cases, errors & recovery, data integrity, integrations) whose
|
|
21
|
+
leaves are concrete test cases (preconditions, steps, expected result) a
|
|
22
|
+
human tester can execute, browsable Workflowy-style.
|
|
14
23
|
|
|
15
24
|
The content here encodes widely accepted engineering best practices (OWASP, the
|
|
16
25
|
Twelve-Factor App, Google Engineering Practices, SLSA, Keep a Changelog, Semantic
|
|
@@ -21,9 +30,10 @@ These standards can be consumed three ways:
|
|
|
21
30
|
|
|
22
31
|
1. **The [`edsger`](https://www.npmjs.com/package/edsger) CLI** — bundles these
|
|
23
32
|
assets and runs them with the Claude Agent SDK.
|
|
24
|
-
2. **As a Claude Code plugin** — `/benchmark`, `/pr-review`, `/pr-resolve`, `/diagram
|
|
25
|
-
skills that work inside Claude Code with no CLI install (see below).
|
|
26
|
-
3. **Raw YAML** — point any tooling at the files in `benchmark/`, `review/`,
|
|
33
|
+
2. **As a Claude Code plugin** — `/benchmark`, `/pr-review`, `/pr-resolve`, `/diagram`,
|
|
34
|
+
`/mindmap`, `/testcases` skills that work inside Claude Code with no CLI install (see below).
|
|
35
|
+
3. **Raw YAML** — point any tooling at the files in `benchmark/`, `review/`,
|
|
36
|
+
`diagrams/`, `mindmap/`, and `testcases/`.
|
|
27
37
|
|
|
28
38
|
## Use inside Claude Code (no CLI install)
|
|
29
39
|
|
|
@@ -35,7 +45,7 @@ plugin to get the skills as slash commands:
|
|
|
35
45
|
/plugin install edsger@edsger-assets
|
|
36
46
|
```
|
|
37
47
|
|
|
38
|
-
Then run `/benchmark`, `/pr-review`, `/pr-resolve`, or `/
|
|
48
|
+
Then run `/benchmark`, `/pr-review`, `/pr-resolve`, `/diagram`, `/mindmap`, or `/testcases`. The skills read
|
|
39
49
|
the same YAML from this repo (`${CLAUDE_PLUGIN_ROOT}/benchmark/...`,
|
|
40
50
|
`${CLAUDE_PLUGIN_ROOT}/diagrams/...`) and prefer the `edsger` CLI when it is
|
|
41
51
|
installed, falling back to running natively with Claude Code's own tools.
|
|
@@ -47,17 +57,21 @@ edsger-assets/
|
|
|
47
57
|
├── .claude-plugin/ # Claude Code plugin + marketplace manifests
|
|
48
58
|
│ ├── plugin.json
|
|
49
59
|
│ └── marketplace.json
|
|
50
|
-
├── skills/ # Claude Code skills (/benchmark, /pr-review, /pr-resolve, /diagram)
|
|
60
|
+
├── skills/ # Claude Code skills (/benchmark, /pr-review, /pr-resolve, /diagram, /mindmap, /testcases)
|
|
51
61
|
│ ├── benchmark/SKILL.md
|
|
52
62
|
│ ├── pr-review/SKILL.md
|
|
53
63
|
│ ├── pr-resolve/SKILL.md
|
|
54
|
-
│
|
|
64
|
+
│ ├── diagram/SKILL.md
|
|
65
|
+
│ ├── mindmap/SKILL.md
|
|
66
|
+
│ └── testcases/SKILL.md
|
|
55
67
|
├── manifest.yaml # registry: versions, languages, default chains
|
|
56
68
|
├── languages.yaml # language detection heuristics (markers + globs)
|
|
57
69
|
├── schema/
|
|
58
70
|
│ ├── benchmark.schema.json # JSON Schema for a benchmark rubric
|
|
59
71
|
│ ├── review.schema.json # JSON Schema for a review standard
|
|
60
|
-
│
|
|
72
|
+
│ ├── diagrams.schema.json # JSON Schema for a diagram catalog
|
|
73
|
+
│ ├── mindmap.schema.json # JSON Schema for a mind-map standard
|
|
74
|
+
│ └── testcases.schema.json # JSON Schema for a manual test-case standard
|
|
61
75
|
├── benchmark/
|
|
62
76
|
│ ├── base.yaml # language-agnostic baseline (always applied)
|
|
63
77
|
│ ├── typescript.yaml # overlays, merged on top of base
|
|
@@ -69,9 +83,14 @@ edsger-assets/
|
|
|
69
83
|
├── review/
|
|
70
84
|
│ ├── base.yaml
|
|
71
85
|
│ └── … # language overlays
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
86
|
+
├── diagrams/
|
|
87
|
+
│ ├── base.yaml # universal diagram catalog (C4, ER, sequence, flow, …)
|
|
88
|
+
│ └── … # language overlays (react tree, JPA model, goroutines, …)
|
|
89
|
+
├── mindmap/
|
|
90
|
+
│ ├── base.yaml # universal mind-map aspects (entry points, flows, modules, …)
|
|
91
|
+
│ └── … # language overlays (package surface, go layout, …)
|
|
92
|
+
└── testcases/
|
|
93
|
+
└── base.yaml # universal manual-test areas (core flows, edge cases, errors, …)
|
|
75
94
|
```
|
|
76
95
|
|
|
77
96
|
## 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
|