feat(docs): report catalog coverage with docs.mjs --list - #21
Conversation
The skill described its own coverage in prose: `SKILL.md` named Spring Boot `3.3.0`-`3.x` and `4.0.8`+ and stated that framework, security and data were not published yet. The docs repository has since published 52 Spring Framework versions, so the description — the field that decides whether the skill is reached at all — made an entire published project invisible to the agent. Prose cannot track a repository that releases on its own schedule, so stop writing versions down and read them: - `summarizeCatalog` in the Library Layer answers "which versions exist" from the same catalog `lookupTag` resolves against, so a coverage report and a resolution can never disagree. - `docs.mjs --list [project]` exposes it. `--refresh` and `--no-fetch` are rejected there: the catalog is never cached, and accepting them would promise behaviour that does not exist. - `resolveDocs` and `listDocs` now share one `fetchCatalog`, so the catalog is parsed and validated in one place. - Versions sort naturally rather than in catalog order, which is a property of a generator in another repository. `SKILL.md` and `README.md` drop their version lists and point at the command, keeping only the two gaps that belong to upstream and will never close: Boot 3.2 and older predate the Antora component, and 3.x trees ship no generated appendix. Detection stays Boot-only and now says so — Framework arrives as a transitive dependency and is declared in no build file, so its version has to be asked for rather than guessed.
|
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| ErrorProne | 1 high |
| Security | 2 high |
🟢 Metrics 35 complexity · 0 duplication
Metric Results Complexity 35 Duplication 0
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Code Review
This pull request introduces a new --list option to the docs.ts script, allowing users to query and display the published projects and versions directly from the live catalog.json instead of relying on static documentation. It adds the listDocs and summarizeCatalog functions, implements natural version sorting so that versions like 3.5.10 correctly follow 3.5.9, and refactors the existing catalog fetching logic into a shared fetchCatalog helper. Comprehensive unit tests have been added to verify the new listing, argument parsing, and sorting behavior, and the user-facing documentation in README.md and SKILL.md has been updated accordingly. There are no review comments to assess, and I have no additional feedback to provide on these changes.
|
| tag reserved with no archive behind it yet. A failed resolution reports the same | ||
| thing in its `suggestion`, so the listing is only needed when nothing has been | ||
| looked up yet, such as answering "which versions do you have". |
There was a problem hiding this comment.
Misleading resolution guidance
This says a failed resolution provides the same coverage information as --list, but unknown-version failures only suggest opening an issue, while network, cache, and checksum failures provide unrelated suggestions or none. An agent following this guidance may skip --list and fail to discover the versions that are actually available.
Prompt To Fix With AI
This is a comment left during a code review.
Path: skills/spring-docs/SKILL.md
Line: 81-83
Comment:
**Misleading resolution guidance**
This says a failed resolution provides the same coverage information as `--list`, but unknown-version failures only suggest opening an issue, while network, cache, and checksum failures provide unrelated suggestions or none. An agent following this guidance may skip `--list` and fail to discover the versions that are actually available.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!




What
SKILL.mddescribed the skill's coverage in prose — Spring Boot3.3.0-3.xand4.0.8+, with "Other Spring projects (framework, security, data) are not published yet".pleaseai/spring-docshas since published 52 Spring Framework versions. Because the stale range lived in thedescriptionfield — the one that decides whether the skill is reached at all — an entire published project was invisible to the agent, not merely undocumented.Prose cannot track a repository that releases on its own schedule. This stops writing versions down and reads them instead.
Changes
summarizeCatalog(Library Layer, no I/O) — the counterpart tolookupTag: that one answers "can I have this version", this one answers "which versions exist". Same catalog, so a coverage report and a resolution can never disagree. Keepspublishedandunpublishedseparate, so a reserved tag with no archive is not counted as shipped.docs.mjs --list [project]— exposes it.--refresh/--no-fetchare rejected there: the catalog is never cached, and accepting them would promise behaviour that does not exist.fetchCatalog—resolveDocsandlistDocsparse and validate the catalog in one place. Existing failure wording is unchanged.3.5.10after3.5.9. The catalog arrives sorted today, but that is a property of a generator in another repository.SKILL.md/README.md— version lists removed, pointed at the command. Only the two gaps that belong to upstream remain: Boot 3.2 and older predate the Antora component, and 3.x trees ship no generated appendix.Verification
Against the live catalog:
The 5 failing tests are all in
scripts/lib/__tests__/library-layer-guard.test.tsand are pre-existing — each spawnseslintagainst a 5s test timeout, which this machine exceeds. Confirmed failing on a cleanmain(5 failures there too). Untouched; out of scope for this change.Follow-up (not in this PR)
Extending detection to Spring Framework is a design decision, not a doc fix: Framework is a transitive dependency of Boot, so the gap closes through BOM-based resolution of one declared Boot version into the component matrix, not through another build-file parser. Worth its own issue.
Summary by cubic
Replaces the stale hand-written version list in the skill description—which only named Spring Boot
3.3.0-3.xand4.0.8+, hiding the 52 published Framework versions—withdocs.mjs --list, which reads the catalog live so the agent sees everything the docs repo publishes.Changes
summarizeCatalogto the library layer to list published and unpublished versions from the same catalog used for resolution.--list [project];--refreshand--no-fetchare rejected because the catalog is never cached.resolveDocsandlistDocssharefetchCatalogfor parsing and validation.3.5.10after3.5.9).SKILL.mdandREADME.mdpoint at the command and keep only upstream gaps: pre-Antora Boot 3.2 and missing 3.x appendix.Written for commit 8420c3a. Summary will update on new commits.