chore(chartkit): LLM-ready README validation + docs in npm tarball - #912
Merged
Conversation
added 3 commits
July 23, 2026 00:11
…AI agents block - Add .github/workflows/validate-readme.yml (gravity-ui/readme-validator@v1) - Rename ## Get started -> ## Getting started (validator-accepted Usage alias; fix TOC anchor) - Add ## License section - Add ## For AI agents block (positioning, when to use/not vs charts/yagr/dashkit, common pitfalls) - Passes gravity-readme --package
- Add scripts/build-docs.mjs: builds cleaned README + docs/ guides into build/docs - Add gulp 'copy-docs' task to the build series - Add 'build:docs' npm script + @gravity-ui/readme-validator devDependency - Verified: INDEX.md + guides/testing.md land in build/docs and ship in the tarball
Append a pointer to the agent-readable docs bundled in the npm tarball (node_modules/<pkg>/<out>/docs/INDEX.md) at the end of the README.
Contributor
|
Preview is ready. |
Contributor
Coverage Report
File CoverageNo changed files found. |
Contributor
|
🎭 Tests Report is ready. |
The uikit-style validate-components job (type: component, paths: src/components/*/ README.md) was copied from the template but this repo has no component READMEs, so it is dead weight (and its paths entry spuriously widens the PR trigger). Keep only validate-package.
korvin89
previously approved these changes
Jul 23, 2026
…cs.mjs)
Call buildDocs() directly in the gulp task via require('@gravity-ui/readme-validator')
instead of spawning a node process that runs scripts/build-docs.mjs. Remove the now-
unused script. 'build:docs' now runs 'gulp copy-docs'.
korvin89
approved these changes
Jul 23, 2026
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.
Part of DATAUI-3745 — AI/LLM-ready documentation for Gravity UI. This PR brings the LLM-ready README contract + docs-in-npm bundling to this package, per the
ai-adoption-plan(README validation,docs-in-npm,readme-template).What's included
1. README validation workflow
.github/workflows/validate-readme.ymlusinggravity-ui/readme-validator@v1(mirrorsuikit's workflow). Runs on PRs touchingREADME.mdand component READMEs.2. LLM-ready README
## For AI agentsblock (positioning +When to use/When not to usewith pointers to neighbor packages +Common pitfalls/ hallucination traps).## Install,## Usage,## License) so the README passesgravity-readme --package.## Properties, code example).3. Docs in the npm tarball (
buildDocs)scripts/build-docs.mjscallingbuildDocs()from@gravity-ui/readme-validator— at build time it copies the cleaned README + guides into<outDir>/docs/so an agent in a consumer project reads docs matching the installed version fromnode_modules/<pkg>/<out>/docs/.copy-docstask / appended to thebuildnpm script).@gravity-ui/readme-validatoradded todevDependencies.4. Docs pointer
## Documentation for AI agentssection pointing at the bundlednode_modules/<pkg>/<out>/docs/INDEX.md.Verification
gravity-readme --package README.md→ ✓ (0 errors).npm pack --dry-runconfirms the generated docs tree ships in the tarball.VALIDATION-REPORT.mdfor per-repo baseline→after details.Notes
## For AI agentsblock is the last human-facing section; the docs pointer sits after it (it correctly closes the agent block for the validator).Repo-specific: renamed
## Get started→## Getting started(validator Usage alias);docs/guides bundled tobuild/docs(2 files).