Skip to content

add writing-doc-summaries skill#22664

Open
Oreoxmt wants to merge 5 commits intopingcap:masterfrom
Oreoxmt:writing-doc-summaries
Open

add writing-doc-summaries skill#22664
Oreoxmt wants to merge 5 commits intopingcap:masterfrom
Oreoxmt:writing-doc-summaries

Conversation

@Oreoxmt
Copy link
Copy Markdown
Collaborator

@Oreoxmt Oreoxmt commented Mar 31, 2026

First-time contributors' checklist

What is changed, added or deleted? (Required)

Which TiDB version(s) do your changes apply to? (Required)

Tips for choosing the affected version(s):

By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.

For details, see tips for choosing the affected versions.

  • master (the latest development version)
  • v9.0 (TiDB 9.0 versions)
  • v8.5 (TiDB 8.5 versions)
  • v8.1 (TiDB 8.1 versions)
  • v7.5 (TiDB 7.5 versions)
  • v7.1 (TiDB 7.1 versions)
  • v6.5 (TiDB 6.5 versions)
  • v6.1 (TiDB 6.1 versions)
  • v5.4 (TiDB 5.4 versions)

What is the related PR or file link(s)?

  • This PR is translated from:
  • Other reference link(s):

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Need modification after applied to another branch
  • Might cause conflicts after applied to another branch

@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot bot commented Mar 31, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kissmydb for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added missing-translation-status This PR does not have translation status info. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 31, 2026
@Oreoxmt Oreoxmt changed the title ai: add writing-doc-summaries skill add writing-doc-summaries skill Mar 31, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new AI skill, writing-doc-summaries, which provides guidelines and a workflow for generating SEO-friendly front matter summaries in Markdown files. The skill includes specific rules for character counts, opening verbs, and YAML formatting. Review feedback focused on maintaining terminology consistency by using "front matter" as two words, adhering to the repository's style guide for sentence-case headings, ensuring field names are wrapped in backticks, and adding a trailing newline to the new skill file.

.ai/AI-README.md Outdated

- `.ai/skills/review-doc-pr/`: review documentation PRs and Markdown diffs for factual accuracy, user usefulness, completeness, version fit, related-doc impact, links, and style
- `.ai/skills/create-or-update-zh-translation-pr/`: create a new docs translation PR or update an existing one by combining repo-local scripts with minimal-edit translation rules and incremental source-diff handling
- `.ai/skills/writing-doc-summaries/`: write or update the `summary` frontmatter field in a document following the repo's 115–145 character SEO-friendly sentence rules
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

Use "front matter" (two words) for consistency with line 15 of this file and general repository conventions.

Suggested change
- `.ai/skills/writing-doc-summaries/`: write or update the `summary` frontmatter field in a document following the repo's 115–145 character SEO-friendly sentence rules
- .ai/skills/writing-doc-summaries/`: write or update the `summary` front matter field in a document following the repo's 115–145 character SEO-friendly sentence rules


Write or improve the `summary` field in the YAML frontmatter of Markdown files in `pingcap/docs` and `pingcap/docs-cn`.

## frontmatter example
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

Use sentence case for headings and use "front matter" (two words) for consistency with the repository's README.

Suggested change
## frontmatter example
## Front matter example
References
  1. Use sentence case for headings (e.g., ## Configure the cluster). (link)

Comment on lines +115 to +116
- If frontmatter exists, update the `summary` line in place.
- If frontmatter is missing, add it at the top:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

Use "front matter" (two words) instead of "frontmatter" for consistency. Also, enclose the field name summary in backticks.

Suggested change
- If frontmatter exists, update the `summary` line in place.
- If frontmatter is missing, add it at the top:
- If front matter exists, update the `summary` line in place.
- If front matter is missing, add it at the top:
References
  1. Code snippets, command names, options, and paths should be in backticks. (link)

- Do not rewrite or reformat any other part of the document.

## Gut check

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

Add a newline at the end of the file to follow standard POSIX conventions.

Suggested change
Before applying: **would this make a TiDB user want to click through from search results?** If not, rewrite.

@Oreoxmt Oreoxmt self-assigned this Mar 31, 2026
@Oreoxmt Oreoxmt added the translation/no-need No need to translate this PR. label Mar 31, 2026
@ti-chi-bot ti-chi-bot bot removed the missing-translation-status This PR does not have translation status info. label Mar 31, 2026
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot bot commented Mar 31, 2026

@Oreoxmt: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-verify 534d72c link true /test pull-verify

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Copy link
Copy Markdown
Collaborator

@qiancai qiancai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rest LGTM

```yaml
---
title: Back up and Restore Data Using Dumpling and TiDB Lightning
summary: Learn how to use Dumpling and TiDB Lightning to back up and restore full data of TiDB.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This summary is below the 115-character minimum stated in Rule 1. Perhaps we could change the length range or update this example.

1. **Length**: 115-145 characters including spaces.
2. **Opening verb**: Start with an SEO-friendly verb phrase (see table below) that tells the reader what they will get from this document. Never start with the document title, a product name alone, or a noun phrase.
3. **Perspective**: Reader-focused — tell them what they will learn or do.
4. **No special leading characters**: Do not start with `>`, `*`, `#`, `-`, or `[`.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
4. **No special leading characters**: Do not start with `>`, `*`, `#`, `-`, or `[`.
4. **No special leading characters**: Do not start with `>`, `*`, `#`, `-`, or `[`. If the summary must begin with a special character, wrap the entire value in quotation marks.

**After** (introduces concept and explains why it matters):

```yaml
summary: Introduce the concept, principles, and implementation of metadata lock in TiDB, and learn how it prevents DDL and DML conflicts.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
summary: Introduce the concept, principles, and implementation of metadata lock in TiDB, and learn how it prevents DDL and DML conflicts.
summary: Learn about the concept, principles, and implementation of metadata lock in TiDB, and understand how it prevents DDL and DML conflicts.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reason: "Introduce" is document-focused (the document introduces something), while "learn how" is reader-focused (the reader learns). This switches perspective mid-sentence, which conflicts with Rule 3: "Reader-focused — tell them what they will learn or do."


Scan a few existing summaries in the same subdirectory first to match local conventions.

### Preferred patterns
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this skill is for both pingcap/docs and pingcap/docs-cn, we might also include some examples in Chinese?

## Summary rules

1. **Length**: 115-145 characters including spaces.
2. **Opening verb**: Start with an SEO-friendly verb phrase (see table below) that tells the reader what they will get from this document. Never start with the document title, a product name alone, or a noun phrase.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"See table below" is vague, as the table is several sections away under "## Opening verb guidance".


**Exceptions:**

- **SQL statement reference**: Use fixed template — `An overview of the usage of <STATEMENT> for the TiDB database`. No outcome clause needed.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. This summary is below the 115-character minimum stated in Rule 1.

@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot bot commented Apr 1, 2026

[LGTM Timeline notifier]

Timeline:

  • 2026-04-01 03:58:42.571638173 +0000 UTC m=+323927.776998250: ☑️ agreed by qiancai.

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-1-more-lgtm Indicates a PR needs 1 more LGTM. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. translation/no-need No need to translate this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants