Add docs maintenance agent: AGENTS.md, skills, and rule files - #846
Open
brandonjackson wants to merge 31 commits into
Open
brandonjackson wants to merge 31 commits into
brandonjackson wants to merge 31 commits into
Conversation
Adds the orchestrator (AGENTS.md) and seven self-contained skill files under .agents/skills/ for linting, accuracy verification, fresh-user evaluation, gap analysis, translation, corrections capture, and screenshot triage. Seeds glossary.yml with product terms that must never be translated and spelling variants lint should flag. Adds empty style-exceptions.yml and translation-rules.yml with schema comments. Stops ignoring /i18n so machine translations can be committed alongside the English source, per the translation architecture in AGENTS.md. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CntaKNYyBkumpWvm5mTJa7
Keeps every rule from the spec; drops long command snippets, exhaustive path tables, and repeated output templates so the files are easier to read and maintain. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CntaKNYyBkumpWvm5mTJa7
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CntaKNYyBkumpWvm5mTJa7
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CntaKNYyBkumpWvm5mTJa7
The three rule files stay and are maintained by humans directly. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CntaKNYyBkumpWvm5mTJa7
… glossary check, exempt from file cap Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CntaKNYyBkumpWvm5mTJa7
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CntaKNYyBkumpWvm5mTJa7
Starts from a product PR and finds the docs pages that need updating. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CntaKNYyBkumpWvm5mTJa7
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CntaKNYyBkumpWvm5mTJa7
Commit SHAs made on a branch dangle after a squash merge. A git blob hash is the same wherever the file lives and still lets a reviewer recover the English they approved. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CntaKNYyBkumpWvm5mTJa7
…cation map Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CntaKNYyBkumpWvm5mTJa7
…rch invocations, separate ease from impact Based on a test run against the CLI section. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CntaKNYyBkumpWvm5mTJa7
brandonjackson
marked this pull request as draft
September 4, 2026 14:39
Defaults to every release in the last month across the product repos and reads changelogs before diffs. A single PR remains an optional narrower input. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CntaKNYyBkumpWvm5mTJa7
brandonjackson
pushed a commit
that referenced
this pull request
Sep 4, 2026
…ranslate skill Brings AGENTS.md, the agent skills, and the rule files (glossary.yml, translation-rules.yml, style-exceptions.yml) onto this branch so the Spanish translations can be produced under the translate skill rather than audited against it after the fact. Merged rather than copied so the files keep one history: when #846 lands, this branch's diff against main shows only the i18n work. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0191JhrXtWiHnUGwfwesiq7T
3 tasks
- translate: run a full `yarn build`, not a single-locale build, which reports every correct /es/ link as broken - translate: articles and blog posts are not translated either - lint: convert relative .md links to site-absolute paths, per house style; they break the build once one end is translated - .gitignore: point at the translate skill, which is where i18n/ being tracked is actually described Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DwEcZH8y5VxFiBW6oZ1Ly3
brandonjackson
marked this pull request as ready for review
September 24, 2026 11:33
Fold accuracy check, fresh-user evaluation, gap analysis, and the what-changed part of release review into a single identify-gaps skill that returns a Must / Should / Could change report without editing. Add an update-content skill that applies a report or direct instructions, with a light tidy pass in place of lint. Release review is now just the plumbing that builds a list of shipped changes and hands it to identify-gaps. Remove lint, screenshot triage, and style-exceptions.yml. Translation is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014z5Y9vFQSL1as9VQrMvQux
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014z5Y9vFQSL1as9VQrMvQux
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014z5Y9vFQSL1as9VQrMvQux
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014z5Y9vFQSL1as9VQrMvQux
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014z5Y9vFQSL1as9VQrMvQux
Move each skill into .agents/skills/<name>/SKILL.md with a name and a description that says when to use it, so agents can find and load them instead of relying on AGENTS.md to point at flat files. Link .claude/skills to the same folder so Claude Code finds them too. update-content and translate open PRs, so they set disable-model-invocation and only run when someone asks for them by name. Handoffs from other skills read their SKILL.md directly. Update paths in AGENTS.md, the skills, glossary.yml, translation-rules.yml, and .gitignore.
Machine and needs-review pages were retranslated on every run, even when translation_source_hash still matched the English. That gave a ~94-file PR per locale with no real changes, and overwrote reviewers' work in progress. Now any page whose hash matches is skipped, whatever its status. Exception: if glossary.yml or translation-rules.yml was committed after the translation, machine pages are retranslated anyway so they pick up the new rules.
yarn build fails on a fresh clone: adaptors/packages/ is gitignored and only created by generate-adaptors, and onBrokenLinks is 'throw'. update-content now runs generate-library and generate-adaptors first, as test-deploy.yml does. Add a house style rule for blank lines around admonition markers. Without them, Prettier merges the text into the :::tip line and Docusaurus shows it as the title.
Tested on Docusaurus 3.10.1 with es enabled. Absolute links get the locale added at build time, so the hand-added /es/ prefix did nothing in a full build and broke yarn build --locale es. Keep them unchanged. Relative .md links break when the target page has no translation yet, so write those as full /documentation/ paths, using the slug where a page sets one. Build the locale after the same generate steps CI runs.
Docusaurus only reads translated docs from i18n/<locale>/docusaurus-plugin-content-docs/current/ and silently ignores them anywhere else. Sidebar labels come from sidebars-main.js, so new entries need write-translations and a translation in current.json, as the Spanish PoC (#848) did.
Lightning's UI is English only (priv/gettext has just en/errors.po), so a translated button name points readers at a button that does not exist. Say so in the skill, and replace the translation-rules.yml example that assumed French UI strings with a real French rule.
Nothing looked for pages breaking the house style since lint was removed, so relative links, weak alt text, and glossary variants were only fixed by chance. Report them as Could change, grouped by rule. Point glossary.yml's comments at this check instead of lint.
Kit's changesets changelogs have no dates, so take them from the release tags. Lightning lists a release's changes under its -pre heading and leaves the final one empty (e.g. 2.18.2), so read the -pre entries and report them under the final version.
It said both "do not touch the file" and "open a PR with the diff". Leave the page out of the translation PR and open a separate one for the reviewer. Update translation_source_hash in that PR, or the same diff is proposed on every run after it merges.
Agents are often told not to write model names into repo files, so translation_model was unreliable (the Spanish PoC left it out). The PR description is permanent and git log leads to it. Also drop "per section" from the PR rule, left over from when the default scope was one section, to match AGENTS.md.
lmac-1
approved these changes
Sep 24, 2026
lmac-1
left a comment
Collaborator
There was a problem hiding this comment.
This is a great start, thank you! I went through it, checked a few assumptions against the code and a test build, and pushed some changes straight to the branch:
Structure
- Each skill is now a folder with a
SKILL.mdand front matter (name, and a description of when to use it), so agents can find them. .claude/skillslinks to.agents/skills, so Claude Code finds them too.- update-content and translate only run when asked for by name, since they open PRs.
Skills
- translate: skips pages whose English hasn't changed; keeps links as in the English (tested); exact save folder; app labels stay English; clearer rule for approved pages; model goes in the PR, not the page; builds the whole site like CI (building one locale reports every
/es/link as broken) - update-content: builds like CI
- identify-gaps: checks the house style again
- release-review: kit dates from tags, reads Lightning
-preentries
Rules
AGENTS.md: blank lines around:::tipand other admonitions, so Prettier doesn't break themglossary.yml: removed Kafka from triggers (Lightning only has webhook and cron now)
Still to do, happy for these to be follow-ups:
-
AGENTS.md: onlyadaptors/library/jobs/auto/is generated; the rest ofadaptors/library/is hand-written -
AGENTS.md: can the agent editarticles/? - Prettier: add as a dependency, reformat
docs/in its own PR (tracking in #866) - #848: update it to match the new translate rules
- Relative links clean-up (tracked in #867)
- Language guidance (e.g. only use US English)
This branch has not been deployed
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.
Short Description
Adds an
AGENTS.mdand four short skills under.agents/skills/so an LLM agent can review, update, and translate the docs. Also addsglossary.yml(a seed list) andtranslation-rules.yml(empty, with a schema comment).Where to focus review: translation. The other three skills are short and high level on purpose, and they only ever touch English pages through a normal PR. The translation workflow is where the real decisions are.
Details
The skills
The default scope is the whole site. A user can narrow it to a sidebar category, a folder, or a single page. Update content stops at 20 changed files and lists any remaining work in the PR for the next run.
Lint's core checks now live in the House style section of
AGENTS.md(glossary terms, site-absolute links, front matter titles, alt text) and in identify gaps (dead external links, orphan pages). Internal links are covered byyarn build, which already fails on broken links.Translation (please look closely)
translation_source_hashis the content hash of the English file (git hash-object), not a commit SHA. This repo squash-merges, so a hash pointing at a branch commit would stop resolving as soon as the PR lands. A content hash is the same wherever the file lives, and a reviewer can recover the English they approved withgit cat-file -p <hash>.machine,needs-review, orhuman-reviewed. The agent never editshuman-reviewedpages. When their English changes, it proposes a diff in a separate PR instead.translate: falsestay in English in every locale. The seed goes a little beyond the original spec (dataclip, Canvas, Inspector, CLI, project, state, operation, collection, sandbox), based on terms already used acrossdocs/. It's easy to trim.yarn build.yarn build --locale <x>builds the locale at the site root, which makes every correct/es/...link show up as broken (learned from the i18n PoC).Things to look at carefully
.gitignoreno longer ignores/i18n. The old rule contradicted keeping translations in the repo. There's noi18n/directory yet, so nothing changes until the translate skill runs.docusaurus.config.jshas noi18nblock, and I haven't added one: enabling locales changes whatyarn buildproduces and deploys. The translate skill treats a missing locale as a blocking question. I'd suggest the first real translation PR enables the locale alongside the first translated content.No existing docs pages were modified.
AI Usage
You can read more details in our
Responsible AI Policy
🤖 Generated with Claude Code
https://claude.ai/code/session_014z5Y9vFQSL1as9VQrMvQux