Skip to content

Commit 3a15bd9

Browse files
author
github-actions
committed
update MD by dispatch event pingcap/docs i18n-ja-release-8.5
1 parent 5561400 commit 3a15bd9

2 files changed

Lines changed: 151 additions & 0 deletions

File tree

  • markdown-pages/ja/tidb/release-8.5
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
name: docs-pr-metadata-guard
3+
description: Use when creating or editing pull requests in pingcap/docs so the PR template sections, version checkboxes, related-link fields, HTML comments, and description structure stay intact. Trigger on tasks involving PR creation, PR body updates, version selection, cherry-pick label decisions, or translating a PR from docs-cn.
4+
---
5+
6+
# Docs PR Metadata Guard
7+
8+
Use this skill for `pingcap/docs` GitHub pull request metadata work. The goal is to preserve the repository-required PR description structure while editing only the mutable fields.
9+
10+
Before changing a PR body, read `.github/pull_request_template.md`.
11+
12+
## Workflow
13+
14+
1. Write PR titles and descriptions in English.
15+
2. For a new PR, start from `.github/pull_request_template.md` instead of writing the body from scratch.
16+
- Copy the template into a local Markdown file and fill in the mutable fields.
17+
- Submit with `gh pr create --body-file <local-file>`, or use `gh pr create -T .github/pull_request_template.md` to let `gh` load the template as the starting body text (the `-T` / `--template` flag for `gh pr create` takes a file path).
18+
- Review the local file against the template before calling `gh`.
19+
3. Fill in the required sections with concrete information.
20+
- **What is changed, added or deleted? (Required)**: describe what changed and why in clear, specific language. Do not leave this blank or fill it with a generic placeholder.
21+
- **Which TiDB version(s) do your changes apply to? (Required)**: check at least one version checkbox. Follow the affected-version rules in `.agents/shared/repo-conventions.md`:
22+
- Default to `master` only for general improvements, wording fixes, missing-content additions, and corrections not tied to a specific released behavior.
23+
- Check the affected release branch(es) together with `master` when the change involves version-specific behavior, compatibility changes, changed defaults, or fixes in published docs.
24+
- **What is the related PR or file link(s)?**: fill in the translation source link under `This PR is translated from:` when the PR is a translation from `docs-cn`. Fill in other reference links such as product PRs, issues, or related doc PRs under `Other reference link(s):`.
25+
- **AI agent involvement**: when this section is present in the template, keep it intact. Check its checkbox only when the changes were primarily made by an AI agent on behalf of the PR author; otherwise leave it unchecked.
26+
- **Do your changes match any of the following descriptions?**: check all that apply. If the change needs different wording on another branch, check `Need modification after applied to another branch` and comment `/label version-specific-changes-required`.
27+
4. Choose the correct base branch.
28+
- Default to `master` for most documentation PRs.
29+
- Use `release-8.5` for TiDB Cloud documentation changes (see `.agents/shared/repo-conventions.md` for TiDB Cloud conventions).
30+
- Use a specific `release-X.Y` branch when the change is scoped to a single published version and does not apply to `master`.
31+
5. For an existing PR, update only the mutable sections.
32+
- Safe targets: the description text under "What is changed, added or deleted?", the version checkboxes, the related-link fields, and the description checkboxes.
33+
- Do not rename headings, reorder sections, or rewrite the template wholesale.
34+
6. Preserve hidden HTML comments exactly.
35+
- Keep `<!--Tell us what you did and why.-->` unchanged.
36+
- Keep `<!-- Fill in "x" in [] to tick the checkbox below.-->` unchanged.
37+
- Keep `<!--Reference link(s) will help reviewers review your PR quickly.-->` unchanged.
38+
- Keep `<!-- If yes, please comment "/label version-specific-changes-required" below to trigger the bot to add the label. -->` unchanged.
39+
- Do not delete or rewrite any template comment that explains contributor behavior or bot behavior.
40+
7. Preserve the "Tips for choosing the affected version(s)" guidance block.
41+
- The bold tips paragraph and the `CONTRIBUTING.md` link between the version heading and the checkboxes are part of the template structure. Do not delete, rewrite, or move them.
42+
8. Handle the first-time contributors' checklist correctly.
43+
- If the contributor is not a first-time contributor, remove the entire "First-time contributors' checklist" section as the template instructs.
44+
- If the contributor is a first-time contributor, keep the section and check the CLA checkbox after signing.
45+
9. Prefer file-based edits for GitHub metadata.
46+
- Materialize the intended PR body into a local Markdown file.
47+
- Review that file against the PR template before calling `gh`.
48+
10. After any PR body update, re-read the PR to verify the structure is intact.
49+
50+
## Version checkbox rules
51+
52+
The version checkboxes in the PR template follow a specific order from newest to oldest. When filling them in:
53+
54+
- Do not add or remove version lines. The template defines the canonical list.
55+
- Do not reorder the version lines.
56+
- Check only the versions where the change should apply.
57+
- If a version is not in the template list, do not invent a new checkbox line.
58+
59+
## Cherry-pick and label conventions
60+
61+
- When a change applies to multiple versions, prefer a single PR on the latest applicable branch and use cherry-pick labels for remaining maintained versions.
62+
- Cherry-pick labels follow the pattern `needs-cherry-pick-release-X.Y` (e.g. `needs-cherry-pick-release-8.5`, `needs-cherry-pick-release-7.5`). There is also `needs-cherry-pick-master` for cherry-picks to master.
63+
- If branch-specific wording differences are expected, check `Need modification after applied to another branch` and add the `requires-version-specific-changes` label so cherry-pick reviewers know follow-up edits are required.
64+
- Use the repository's cherry-pick label workflow. Do not invent a custom multi-branch process.
65+
- Common non-cherry-pick labels for PRs:
66+
- `type/bugfix`, `type/enhancement`, `type/refactor`, `type/compatibility-or-feature-change` for change type.
67+
- `area/*` labels (e.g. `area/tidb-cloud`, `area/planner`, `area/br`) for the documentation area.
68+
- `translation/from-docs-cn` when the PR is translated from a `docs-cn` PR.
69+
- `translation/welcome` to invite community translation; `translation/no-need` when translation is not needed.
70+
71+
## Quick checks
72+
73+
- The PR body contains the "What is changed, added or deleted? (Required)" heading with a non-empty description below it.
74+
- At least one version checkbox is checked under "Which TiDB version(s) do your changes apply to? (Required)".
75+
- The version checkbox section preserves the template's canonical version list and order.
76+
- The "Tips for choosing the affected version(s)" paragraph and the `CONTRIBUTING.md` link are present between the version heading and the checkboxes.
77+
- The related-link fields (`This PR is translated from:` and `Other reference link(s):`) are present, even if left at their default values.
78+
- The `AI agent involvement` section is present when defined by the template, and its checkbox accurately reflects whether an AI agent primarily made the changes on the PR author's behalf.
79+
- The "Do your changes match any of the following descriptions?" section is present with its checkboxes intact.
80+
- The first-time contributors' checklist is either correctly filled in or removed entirely as instructed.
81+
- The base branch matches the change scope: `master` by default, `release-8.5` for TiDB Cloud, or a specific `release-X.Y` for version-scoped fixes.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Repository Agents Guide
2+
3+
This repository is the source for the English TiDB documentation maintained in `pingcap/docs`.
4+
5+
Use this file as the entrypoint for agent work in this repository.
6+
7+
## Working approach
8+
9+
Before making changes:
10+
11+
1. Use `.agents/README.md` as the map of the repo-local AI guidance.
12+
2. Use a matching skill in `.agents/skills/` when the task is workflow-specific.
13+
3. Keep edits minimal and scoped to the requested task.
14+
4. Reuse existing wording, structure, and terminology unless there is a clear reason to change them.
15+
16+
When rules conflict, follow this priority order:
17+
18+
1. Direct user instructions
19+
2. Repository rules in this file
20+
3. Task-specific instructions in the selected skill
21+
4. General writing preferences
22+
23+
## Start here
24+
25+
Read `.agents/README.md` first when you need the current layout of repo-local AI guidance.
26+
27+
## Use the repo skills
28+
29+
Use the workflow-specific skills in `.agents/skills/` when they match the task:
30+
31+
- `docs-pr-metadata-guard`: guard PR template structure when creating or editing pull requests — version checkboxes, required sections, HTML comments, related-link fields, and cherry-pick conventions
32+
33+
If no existing skill matches the task, follow this file and keep the change narrowly scoped.
34+
35+
## Repository expectations
36+
37+
- Preserve the repository's Markdown, heading, list, link, and front matter conventions.
38+
- 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.
39+
- Reuse existing approved terminology and phrasing whenever possible.
40+
- Prefer consistency with surrounding documents over stylistic rewrites.
41+
- Respect the repository's version and branch rules.
42+
- Prefer existing scripts, workflows, and repository patterns over ad hoc reinvention.
43+
44+
## Content guardrails
45+
46+
- Do not change technical meaning unless the task explicitly requires it.
47+
- 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.
48+
- Do not expand the scope from a local fix into a broad rewrite unless the user asks for that.
49+
- Do not introduce new terminology when an established term already exists in the repository.
50+
51+
## Validation
52+
53+
When the task changes Markdown, run relevant checks when practical:
54+
55+
- `./scripts/markdownlint <files>`
56+
- `./scripts/verify-links.sh` for link-sensitive changes
57+
58+
If a full-repo check is too expensive for the task, validate only the files you changed.
59+
60+
## Commit and PR boundaries
61+
62+
- Do not commit, push, create branches, or open PRs unless the user explicitly asks for it.
63+
- Before any write action that affects Git history or GitHub state, make sure the requested scope is clear.
64+
- When reporting completed work, summarize changed files, key decisions, and any issues that still need human review.
65+
66+
## Scope discipline
67+
68+
Keep changes scoped to the requested task and avoid mutating unrelated files.
69+
70+
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.

0 commit comments

Comments
 (0)