Repository navigation
docs: ship version-matched API docs and llms.txt in the npm package - #20
Merged
Merged
Conversation
Add docs/API.md covering every public export, ship it with llms.txt, CHANGELOG.md and src/ so agents read node_modules/@vllnt/logger/ instead of guessing. llms.txt links shipped files relatively and adds an Ecosystem line. README gains a coding-agents note, Related packages and the vllnt oss footer. package.json sets homepage and keywords. tests/package.test.ts fails when a required file is missing from the npm pack list, an internal file ships, an llms.txt relative link does not resolve, or an export is missing from docs/API.md. publish.yml path filters include the shipped docs so docs-only changes reach canary.
Require each export to have its own heading or type line in its entry-point section of docs/API.md, and fail on documented names that are no longer exported. Check README relative links as well as llms.txt. Document the posthog-node capture wrapper and example placeholders, and complete the changelog entry.
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.
Ship version-matched Markdown docs inside the npm tarball, so coding agents read
node_modules/@vllnt/logger/instead of guessing from memory. The pattern is ported fromvllnt/convex-bucketsand adapted to this package, which is not a Convex component.What changes
docs/API.md: every public export of the 4 entry points, with signature, behaviour and one example each. It was checked againstsrc/and the built tarball.package.jsonfiles: nowdist,src,docs/API.md,CHANGELOG.mdandllms.txt.src/ships because it is about 440 readable lines with TSDoc, and the tests live intests/. The PR also setshomepagetohttps://oss.vllnt.com/packages/loggerand adds 8 keywords.llms.txt(maintained by hand, no generator):./docs/API.md,./README.md,./CHANGELOG.md,./LICENSE)https://oss.vllnt.com/llms.txt@vllnt/analyticsand@vllnt/convex-events, each with when to use it instead. No published@vllntpackage depends on@vllnt/loggertoday.@vllnt/convex-helpersonly lists a planned tracing subpath that would use it, so it is left out.CHANGELOG.md: an "Added" entry under[0.1.3] - Unreleased. The version is unchanged.publish.yml: path filters now includedocs/**,README.md,CHANGELOG.md,llms.txtandLICENSE, so a docs-only change still publishes a canary. This is the only workflow change.CANARY_ENABLEDgate:git grep -i canary_enabledfinds nothing, so the gate check is not applicable and nothing changed.AGENTS.mdandCONTRIBUTING.md: small updates so the contributor instructions match the new shipped files. Neither file ships.tests/package.test.ts(runs inpnpm test, so it runs in CI). It fails when:npm packlistllms.txtor README does not resolve inside the tarballdocs/API.mdsection, either missing or staleVerification
pnpm lint,check-types,buildandtestpass (65 tests).scripts/check-package-contents.shandscripts/privacy-denylist.share clean.main'spackage.json(files: ["dist"]) fails 10 of 19. Each of these also fails it on its own:llms.txtlink at an unshipped filedist/, which is publish.yml's test-before-build order: 18 pass and 1 is skipped (the exports-target check), so the canary quality job cannot break.check-package-contents.shstill runs after the build there.pnpm pack, 22 files):CHANGELOG.md,LICENSE,README.md,dist/*,docs/API.md,llms.txt,package.jsonandsrc/*.ts. NoAGENTS.md, tests, specs or scripts.node_modules/@vllnt/logger/{docs/API.md,llms.txt,CHANGELOG.md,src/}are present, every relativellms.txtlink resolves, all 4 entry points import, and the documented behaviours checked out at runtime.Independent review (Claude Opus 5.5, effort high, review-only subagents)
CHANGES NEEDEDon the first pass.test: check API.md per entry point and README links.CLEAN.@vllnt/analytics. Done.CLEAN.clientanddistinctIdare not in the placeholder list; the entry-point table is not tested; README links with an#anchorwould fail the link test.