cacti
cacti copied to clipboard
feat(tools): add cleanup-audit PoC for Cacti cleanup initiative
Summary
Submits a small proof-of-concept under tools/cleanup-audit/ aligned with the maintainer-led "Cacti Cleanup" initiative announced in the root README.md.
audit-packages.ts (~150 LOC, ESM TypeScript, no new dependencies) walks every Lerna workspace and emits a baseline audit:
- README presence + stub detection (< 2 KB)
- Missing
docs/docs/cactus/packages/<name>.mdpage - Namespace classification (
cactus-*vscacti-*vs weaver) @deprecated/TODO/FIXMEdensity insrc/- Combined
cleanupScorefor prioritization
Outputs audit.json + audit.md under tools/cleanup-audit/out/. Mirrors the conventions of tools/sort-package-json.ts.
First-run baseline
| Metric | Value |
|---|---|
| Workspaces audited | 72 |
| Missing READMEs | 10 |
| Stub READMEs (< 2 KB) | 20 |
| Missing per-package doc pages | 60/72 |
cactus-* namespace |
54 |
cacti-* namespace |
14 |
Why
The cleanup initiative has six goals but no machine-readable progress measure. This PoC turns those goals into numbers a maintainer can track week-over-week.
Test plan
- [x]
yarn ts-node --esm tools/cleanup-audit/audit-packages.tsruns clean - [x] Generates
tools/cleanup-audit/out/{audit.json,audit.md} - [x] Detects all 72 Lerna workspaces
- [x] Correctly flags existing
@deprecatedmarkers (e.g.,cactus-core/.../stringify-big-int-replacer.ts) - [x] No new dependencies — uses
fs-extra+globbyalready at root - [x] DCO sign-off