cacti icon indicating copy to clipboard operation
cacti copied to clipboard

feat(tools): add cleanup-audit PoC for Cacti cleanup initiative

Open mn-ram opened this issue 6 months ago • 0 comments

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>.md page
  • Namespace classification (cactus-* vs cacti-* vs weaver)
  • @deprecated / TODO / FIXME density in src/
  • Combined cleanupScore for 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.ts runs clean
  • [x] Generates tools/cleanup-audit/out/{audit.json,audit.md}
  • [x] Detects all 72 Lerna workspaces
  • [x] Correctly flags existing @deprecated markers (e.g., cactus-core/.../stringify-big-int-replacer.ts)
  • [x] No new dependencies — uses fs-extra + globby already at root
  • [x] DCO sign-off

mn-ram avatar May 04 '26 20:05 mn-ram