Repository navigation
feat: ship version-matched agent docs in the npm package (#21) - #53
Merged
Merged
Conversation
docs/generated/ (llms.txt, one Markdown reference per component, the manifest and its schema) joins package.json#files at the same path, so a consumer's agent reads node_modules/@robomous/ui-core/docs/generated/llms.txt for the version it installed, and llms.txt's relative links still resolve. ./llms.txt and ./components.manifest.json are added to the exports map; the existing entries are unchanged. Measured cost: the tarball grows from 125,126 B to 369,043 B (563 KB to 1.86 MB unpacked, 57 files), mostly demo sources and prop tables. The packed-consumer test now checks that every reference ships, that every llms.txt link resolves inside the package, that the packed manifest's version matches package.json, that both exports resolve, and that nothing else under docs/ is packed. The README tells consumers how to point their AGENTS.md at the docs; CONTRIBUTING records the decision and the cost. Closes #21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ships the generated agent docs inside the npm package, so a consumer's coding agent reads the docs for the version it installed.
Closes #21.
Decision
docs/generated/inpackage.json#files, same path as the repollms.txt(components/<slug>.md,components.manifest.json) resolve unchanged insidenode_modules, and agents read files by pathexports./llms.txtand./components.manifest.json, for tools that resolve module specifiers. Existing entries are untouchedThe Robomous agent skills (#23, #24) are for contributors to this repo, so they are not shipped to consumers. That is deferred unless a consumer use case appears.
Measured cost (
npm pack --dry-run)docs/generated/)Most of the increase is the demo sources inside the 54 references and the manifest's prop tables. I recorded the number in CONTRIBUTING.
Freshness at publish
release.ymlrunspnpm verify, which runsdocs:check. That includesmanifest:checkandagents:check, so a staledocs/generated/, such as a version bump withoutpnpm docs:agents, fails the release beforenpm publish. CONTRIBUTING Releasing says to runpnpm docs:agentsafter the bump.Tests (
tests/package/consumer.test.ts, now 14)docs/generated/underdocs/. Anything else (docs/architecture,docs/superpowers,docs/adr…) still fails it.llms.txt, the manifest, its schema and a reference for everysrc/components/*.tsx. The packed manifest'spackageandversionmatchpackage.json. Every relative link inllms.txtlands on a file inside the installed package.import.meta.resolve("@robomous/ui-core/llms.txt")and…/components.manifest.jsonresolve, from the consumer, to those installed files.Testing evidence
pnpm format:check✓pnpm lint✓pnpm test: 228 passedpnpm docs:check: generated docs current, 0 errors, 62 pagespnpm test:package: 14 passedDocs
AGENTS.md/CLAUDE.md.Public API / dependency changes
Two additive
exportsentries, anddocs/generatedinfiles. No runtime dependency change.