Skip to content

chore: llm-ready readme validation and docs in npm tarball - #123

Open
dgaponov wants to merge 4 commits into
mainfrom
chore/readme-llm-ready
Open

dgaponov wants to merge 4 commits into
mainfrom
chore/readme-llm-ready

Conversation

@dgaponov

Copy link
Copy Markdown

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

2. LLM-ready README

  • Adds a ## For AI agents block (positioning + When to use / When not to use with pointers to neighbor packages + Common pitfalls / hallucination traps).
  • Fills any missing required sections (## Install, ## Usage, ## License) so the README passes gravity-readme --package.
  • For component packages: component READMEs are fixed to the component contract (one-sentence description, ## Properties, code example).

3. Docs in the npm tarball (buildDocs)

  • Adds scripts/build-docs.mjs calling buildDocs() 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 from node_modules/<pkg>/<out>/docs/.
  • Wired into the build pipeline (gulp copy-docs task / appended to the build npm script).
  • @gravity-ui/readme-validator added to devDependencies.

4. Docs pointer

  • Appends a ## Documentation for AI agents section pointing at the bundled node_modules/<pkg>/<out>/docs/INDEX.md.

Verification

  • gravity-readme --package README.md → ✓ (0 errors).
  • npm pack --dry-run confirms the generated docs tree ships in the tarball.
  • See the shared VALIDATION-REPORT.md for per-repo baseline→after details.

Notes

  • No runtime/code changes — docs and build-pipeline only.
  • The ## For AI agents block is the last human-facing section; the docs pointer sits after it (it correctly closes the agent block for the validator).

Repo-specific: promoted plain-text Installation:/Basic usage: to ## Install/## Usage; docs/ guides bundled to dist/docs (3 files).

ZCode added 3 commits July 23, 2026 00:10
…nse + For AI agents block

- Add .github/workflows/validate-readme.yml (gravity-ui/readme-validator@v1)
- Promote plain-text 'Installation:' -> ## Install and 'Basic usage:' -> ## Usage
- Add ## License section
- Add ## For AI agents block (positioning, when to use/not vs nodekit, common pitfalls)
- Passes gravity-readme --package
- Add scripts/build-docs.mjs: builds cleaned README + docs/ guides into dist/docs
- Append 'npm run build:docs' to the build script (also runs via prepublishOnly)
- Add 'build:docs' npm script + @gravity-ui/readme-validator devDependency
- Verified: INDEX.md + guides land in dist/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.
@dgaponov
dgaponov requested review from DakEnviy and resure as code owners July 23, 2026 18:59
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.
@dgaponov dgaponov changed the title chore(expresskit): LLM-ready README validation + docs in npm tarball chore: llm-ready readme validation and docs in npm tarball Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant