repoctl usage MUST read the specifiers of the form @intellectual-frontiers/commons/<library>[/<subpath>] in the code files of the repository it is run on (.ts, .tsx, .mts, .js, .mjs, .cjs, .json5, leaving out node_modules, .git and build), and MUST give for each library the subpaths imported and the number of files that import it; a specifier that names no library of the package (a bare @intellectual-frontiers/commons) MUST be left out.
Enforced (check): .github: cd commons/repoctl && bun run verify — suite/usage.test.ts
It MUST read the libraries of the installed package from its sources (<package>/<library>/src/**/*.ts and what else a library carries beside them), the package being node_modules/@intellectual-frontiers/commons of the repository or the folder --package names, and MUST derive from them the imports of each library of another library of the package, the files of each and its size in bytes; a repository where the package is not installed MUST end with an environment problem that says where it looked and how to name the folder.
Enforced (check): .github: cd commons/repoctl && bun run verify — suite/usage.test.ts
The answer MUST be pure data of the two inputs (the imports of the consumer and the graph of the package) and MUST list: the libraries the repository imports directly with their subpaths; the libraries it reaches only through the imports of those (each with the library through which it is reached first); the libraries it never touches; and, for the package and for each of the three groups, the number of libraries and the bytes.
Enforced (check): .github: cd commons/repoctl && bun run verify — suite/usage.test.ts
The answer MUST be the same for the same inputs, in the order of the names of the libraries, and MUST be given as a table and, with --json, as one JSON document; a library the repository imports that the package does not hold MUST be a finding (E-USAGE-UNKNOWN) and MUST NOT be counted.
Enforced (check): .github: cd commons/repoctl && bun run verify — suite/usage.test.ts
What a consumer uses of a library below its subpath (a function, a type), the size of what an installed package adds of its dependencies, and any consumer repository other than the one it is run on.
Run on erga with the package installed, it reproduces the analysis made by hand: the libraries imported directly, those reached through them and those never touched, with their bytes.