This repository is the source for the English TiDB documentation maintained in pingcap/docs.
Use this file as the entrypoint for agent work in this repository.
Before making changes:
- Use
.ai/AI-README.mdas the map of the repo-local AI guidance. - Read the relevant shared guidance in
.ai/shared/. - Use a matching skill in
.ai/skills/when the task is workflow-specific. - Keep edits minimal and scoped to the requested task.
- Reuse existing wording, structure, and terminology unless there is a clear reason to change them.
When rules conflict, follow this priority order:
- Direct user instructions
- Repository rules in this file
- Task-specific instructions in the selected skill
- Shared guidance in
.ai/shared/ - General writing preferences
Read .ai/AI-README.md first when you need the current layout of repo-local AI guidance.
Then read the shared guidance in .ai/shared/ before making changes:
.ai/AI-README.md.ai/shared/repo-conventions.md.ai/shared/writing-style.md.ai/shared/translation-rules.mdwhen the task involves EN -> ZH translation.ai/shared/translation-terms.mdwhen the task involves terminology decisions for translation
Use resources/terms.md when additional product terminology context is needed.
Use the workflow-specific skills in .ai/skills/ when they match the task:
review-doc-pr: review Markdown diffs, doc PRs, wording, structure, factual accuracy, and possible cross-file impactcreate-or-update-zh-translation-pr: create or update an EN -> ZH translation PR that maps an English docs change or incremental source update topingcap/docs-cn, using the bundled scripts in.ai/skills/create-or-update-zh-translation-pr/scripts/when applicable
If no existing skill matches the task, follow this file plus the shared guidance and keep the change narrowly scoped.
- Prefer the existing templates in
resources/doc-templates/when creating new documents or reshaping existing ones. - Preserve the repository's Markdown, heading, list, link, and front matter conventions.
- Use lowercase file names and separate words with hyphens, for example,
x-y-z.md, unless the existing file path already follows a different required pattern. - Reuse existing approved terminology and phrasing whenever possible.
- Prefer consistency with surrounding documents over stylistic rewrites.
- Respect the repository's version and branch rules, including release branches and TiDB Cloud branch constraints.
- Prefer existing scripts, workflows, and repository patterns over ad hoc reinvention.
- When a selected skill includes bundled scripts, prefer those scripts over rewriting the same workflow inline.
- Do not change technical meaning unless the task explicitly requires it.
- Do not silently rewrite commands, code samples, configuration names, API fields, UI strings, or JSON unless they are part of the requested task or are clearly incorrect.
- Do not expand the scope from a local fix into a broad rewrite unless the user asks for that.
- Do not introduce new terminology when an established term already exists in the repository or shared terminology references.
- When editing translated-content workflows, preserve existing English source intent and terminology rather than paraphrasing freely.
When the task involves translation or translation review:
- Follow
.ai/shared/translation-rules.mdand.ai/shared/translation-terms.md. - For translation PR creation or update workflows, prefer the script-backed process in
.ai/skills/create-or-update-zh-translation-pr/. - Prefer updating the existing translation with the smallest necessary change instead of retranslating entire sections.
- Preserve structure, headings, lists, code blocks, links, and note/admonition semantics.
- Reuse existing translated terminology when it is still correct.
- Flag terminology uncertainty explicitly instead of guessing.
When the task changes Markdown, run relevant checks when practical:
./scripts/markdownlint <files>./scripts/verify-links.shfor link-sensitive changes
If a full-repo check is too expensive for the task, validate only the files you changed.
- Do not commit, push, create branches, or open PRs unless the user explicitly asks for it.
- Before any write action that affects Git history or GitHub state, make sure the requested scope is clear.
- When reporting completed work, summarize changed files, key decisions, and any issues that still need human review.
Keep changes scoped to the requested task and avoid mutating unrelated files.
When a requested change might affect other docs, note the possible cross-file impact and only update additional files when the user asks or the selected skill explicitly requires it.