Repository navigation
Description
Summary
A post-use audit of /code-metrics:audit-size (plugin 0.1.8) on this repository, interviewed and locked in a Brief that is pasted into the fixing pull request's body, found one performance defect, one coverage gap, and a handful of report and positioning issues. All are in the plugin; none need a schema change.
Findings
- The dispatcher spends 34 of 35 seconds not measuring. A whole-tree
audit-size.sh --allon this repo (3,854 files) takes 35.6s wall. The bundled line counter accounts for 0.1s. The rest is per-file bash scaffolding shared by every audit skill: the binary sniff inscripts/dispatch.shruns twohead | wc | trpipelines per file (21.8s), andscripts/detect-lanes.shspawns atrsubshell per file to lowercase the extension (12.0s). A Python pass over the same list sniffs every file in 0.06s. - Two thirds of the tree is invisible to
audit-size. 2,547 of 3,854 files belong to no lane (1,507 markdown, 769 JSON, 113 PowerShell, 39 YAML, 13 SVG) and are counted inscope.filesbut never measured. Lines per file has no language dependency; bothsccand the bundled counter count any text file. - An empty change scope is a dead end. A branch with no diff prints "Measured nothing" with no hint that explicit paths or
--allwiden the scope; the hint lives only in the skill body. - The description disowns
--all. It says "for a repo-wide dashboard this is the wrong tool (it measures a change)" while--allis documented in the README and covered by the test suite. - The Measures table is not ordered by size. Rows sort by over-reference count, then filename, so an
--allrun here shows the 77 files over 1000 lines and then 123 alphabetical ones under the 200-row cap, and the cap line does not say what it kept. Functions: 0appears in every file-lines summary, where no function rows can exist.- The 1000-line provenance sentence differs across three surfaces (the report string in
config-defaults.json, the SKILL.md body, and the description). The three agree in substance and drift in wording.
Agreed fix (one PR, 0.1.9)
- Binary sniff moves to one Python invocation over the scoped file list; lane detection uses
${ext,,}. Target:--allon this repo under 5s. - A catch-all
otherlane served byfile_linesonly; every other measure reportsn/afor it;lanes.other.enabled: falseopts out. --allpositioned as a first-class scope;changestays the default; the "wrong tool" clause leaves the description.- The renderer sorts by the primary measure's value in its threshold direction and the cap line names the key.
- Empty change scope names the base and says how to widen;
Functions:is omitted when no function rows exist; one provenance sentence forsize.file_lines, cited in the same words everywhere.
Out of scope, on purpose: the 1000 default and the 500 alternative, iso-8.2.115 mode, installing scc, a Python rewrite of scope resolution, named lanes per text format, and any finding or gate (ADR 0003).
Verification
The acceptance criteria and their results are in the Brief pasted into the fixing pull request's body. The existing suites (audit-size.test.sh, dispatch.test.sh, detect-lanes.test.sh, the collector Python tests) stay green and gain cases for the new behaviour.
Activity
feat(code-metrics): measure every text file, order by size, and cut a…
chore(code-metrics): exclude lockfiles and changelogs from this repo'…