Skip to content

chore(date-utils): LLM-ready README validation + docs in npm tarball#98

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

chore(date-utils): LLM-ready README validation + docs in npm tarball#98
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: only docs/diplodoc/pages guides bundled to build/docs (the typedoc+diplodoc docs/ sub-project is intentionally excluded).

ZCode added 3 commits July 23, 2026 00:04
- Add .github/workflows/validate-readme.yml (gravity-ui/readme-validator@v1)
- Add ## License section
- Add ## For AI agents block (positioning, when to use/not vs date-components, common pitfalls)
- Passes gravity-readme --package
- Add scripts/build-docs.mjs: builds cleaned README + the diplodoc user-facing guides
  (docs/diplodoc/pages) into build/docs. The docs/ typedoc+diplodoc sub-project (configs,
  build scripts, generated API docs) is intentionally excluded.
- 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 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.
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.
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.

2 participants