Repository navigation
docs: add ai agent support (skill, guide, llms.txt) - #4804
Conversation
Review Summary by QodoAdd AI agent support and LLM-friendly documentation
WalkthroughsDescription• Add Agent Skills file teaching AI agents to use commitlint • Create AI agents guide with CLI primitives and setup instructions • Generate llms.txt files for LLM-friendly documentation access • Add vitepress-plugin-llms dependency for automatic doc generation Diagramflowchart LR
A["Agent Skills<br/>SKILL.md"] -->|teaches| B["AI Agents"]
C["AI Agents Guide<br/>ai-agents.md"] -->|instructs| B
D["vitepress-plugin-llms"] -->|generates| E["llms.txt<br/>llms-full.txt"]
B -->|reads config via| F["commitlint CLI"]
E -->|enables| G["LLM Access<br/>to Docs"]
File Changes1. docs/.vitepress/config.ts
|
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR adds AI-agent–consumable documentation artifacts to help coding agents discover and follow a repository’s commitlint rules (via resolved config introspection), and makes the docs site publish llms.txt/llms-full.txt outputs via a VitePress build plugin.
Changes:
- Add an Agent Skills file (
SKILL.md) describing how to detect commitlint, read resolved rules (--print-config json), validate via stdin, and self-correct from hook failures. - Add a new “AI agents” docs guide and link it into the Guides sidebar.
- Add
vitepress-plugin-llmsand wire it into the VitePress config so the docs build can emit LLM-friendly outputs.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| skills/committing-with-commitlint/SKILL.md | New agent skill describing commitlint-aware commit message workflow. |
| docs/guides/ai-agents.md | New guide page with skill install instructions and CLI primitives for agents. |
| docs/.vitepress/config.ts | Adds “AI agents” to Guides sidebar and enables vitepress-plugin-llms. |
| package.json | Adds vitepress-plugin-llms as a dev dependency. |
| pnpm-lock.yaml | Lockfile updates for the new VitePress plugin and its transitive deps. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
78b7fcc to
24ae207
Compare
Reword the absent-rule guidance so it does not attribute the conservative baseline to the Conventional Commits spec, document that config-conventional allows 100-char headers, and note the empty-rules failure when no config exists. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Problem
AI coding agents (Claude Code, Copilot, Cursor, …) now write a large share of commits in
repos that use commitlint. Today they interact with commitlint blindly: commit → hook
rejects → parse human-oriented terminal output → retry. Nothing teaches them to read the
repo's convention upfront, and nothing on commitlint.js.org is consumable by LLMs in a
structured way.
What this PR does
Three additions, zero new runtime code — documentation and build metadata only:
1. Agent skill —
skills/committing-with-commitlint/SKILL.mdA tool-neutral Agent Skills file that teaches AI agents to:
commitlint --print-config json(including how tointerpret
[severity, applicability, value]rule triples)✖ … [rule-name]hook rejections — and never bypass with--no-verifyThe skill hardcodes no convention — it teaches reading each repo's resolved config, so one
skill works in every repo. Every CLI command and output quoted in it was verified against
the actual v21.0.2 CLI.
2. Docs guide —
docs/guides/ai-agents.mdNew "AI agents" page in the Guides sidebar:
--print-config json, stdinlinting,
--last,--edit,--strictexit codes)3. llms.txt —
vitepress-plugin-llmsOne dev dependency + 2-line VitePress config change. The docs build (and the existing
Pages deploy workflow) now emits:
https://commitlint.js.org/llms.txt— page index for LLMshttps://commitlint.js.org/llms-full.txt— entire docs as one markdown file (~77 KB).mdtwin of every docs pageSo LLMs answering "how do I configure commitlint?" can read current docs instead of
hallucinating from training data.