Skip to content

AGENTS: extract issue/PR guidelines into a dedicated skill and clean up structure#66739

Open
joechenrh wants to merge 5 commits intopingcap:masterfrom
joechenrh:update-agent-md
Open

AGENTS: extract issue/PR guidelines into a dedicated skill and clean up structure#66739
joechenrh wants to merge 5 commits intopingcap:masterfrom
joechenrh:update-agent-md

Conversation

@joechenrh
Copy link
Copy Markdown
Contributor

@joechenrh joechenrh commented Mar 6, 2026

What problem does this PR solve?

Issue Number: ref #63847

Problem Summary:

AGENTS.md is loaded into every agent conversation regardless of task. The issue/PR writing guidance (labeling rules, description style, good/bad examples) is only useful when an agent is actually creating or reviewing issues and PRs — a small fraction of sessions. Including it unconditionally wastes context tokens and makes AGENTS.md harder to scan for the structural rules that apply to every task.

What changed and how does it work?

Detailed issue/PR guidance now lives in .agents/skills/github-workflow/SKILL.md so it loads on demand instead of every session. AGENTS.md retains only the hard mechanical rules (title format, Issue Number: line, HTML comments) with a pointer to the skill. Specifically:

  • Created .agents/skills/github-workflow/SKILL.md with full issue rules, PR requirements, labeling guidance, and description writing examples.
  • Slimmed "Issue and PR Rules" in AGENTS.md to mechanical rules only, with a pointer to the skill.
  • Promoted ### Skills to a top-level ## Skills section (was incorrectly nested under Quick Decision Matrix).
  • Added a "Creating issues or PRs" row to the Quick Decision Matrix.
  • Removed duplicate "Issues and PRs MUST be written in English" rule from "Docs and command snippets".
  • Fixed a leading space on the "Before finishing" matrix row.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

None

Summary by CodeRabbit

  • Documentation
    • Reorganized and reformatted contributor guidance for clarity, consolidating issue and PR rules into a streamlined set of requirements (language, templates, title/description conventions, and HTML comment usage).
    • Added a new guide on creating issues and pull requests, covering templates, labeling, reproducible reports, clear PR summaries, and best practices.
    • Adjusted headings, formatting, and included a migration note for skills-related guidance to improve readability.

Signed-off-by: Ruihao Chen <joechenrh@gmail.com>
@pantheon-ai
Copy link
Copy Markdown

pantheon-ai bot commented Mar 6, 2026

Review Complete

Findings: 0 issues
Posted: 0
Duplicates/Skipped: 0

ℹ️ Learn more details on Pantheon AI.

@ti-chi-bot ti-chi-bot bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 6, 2026
@tiprow
Copy link
Copy Markdown

tiprow bot commented Mar 6, 2026

Hi @joechenrh. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

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.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 6, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 3bdb87a2-4bcf-42cb-bb34-8416a23deb94

📥 Commits

Reviewing files that changed from the base of the PR and between cc82475 and d3f2a5e.

📒 Files selected for processing (1)
  • .agents/skills/github-workflow/SKILL.md

📝 Walkthrough

Walkthrough

Updated documentation: AGENTS.md reorganizes and condenses issue and PR guidance and formatting; adds a new skill document at .agents/skills/github-workflow/SKILL.md with detailed Issue Rules, PR Requirements, and guidance for writing clear issues and PRs. (≤50 words)

Changes

Cohort / File(s) Summary
AGENTS doc update
AGENTS.md
Reformatted and consolidated issue/PR guidance: adjusted headings, merged rules into a streamlined block, added "Creating issues or PRs" line, and moved some guidance into a condensed rules section.
New GitHub workflow guide
.agents/skills/github-workflow/SKILL.md
Added a new skill document containing Issue Rules, PR Requirements, template and labeling guidance, and sections on writing good PR descriptions and reproducible issue reports.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 I hop through lines and tidy every rule,
Turning scattered notes into one clean tool.
A skill tucked in folders, guidance set right,
Issues and PRs now crisp and bright.
Hop — the docs are neat tonight.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main changes: extracting issue/PR guidelines into a dedicated skill and reorganizing AGENTS.md structure.
Description check ✅ Passed The description comprehensively follows the template with problem statement, detailed explanation of changes, and completed checklists, though the release note section is minimal.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

The issue and PR writing guidance (labeling, description style, examples)
is only relevant when an agent is creating or reviewing issues/PRs. Keeping
it in AGENTS.md costs context tokens on every session regardless of task.

Move the full guidance into `.agents/skills/github-workflow/SKILL.md` so it
loads on demand, and keep only the mechanical must-not-break rules (title
format, Issue Number line, HTML comments) in AGENTS.md with a pointer to the
skill.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 6, 2026
@joechenrh joechenrh changed the title AGENTS: add guidelines for writing good PR descriptions AGENTS: move issue/PR guidelines into a dedicated skill Mar 6, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
AGENTS.md (1)

159-159: Make the skill handoff explicit.

Now that the detailed issue/PR policy lives outside AGENTS.md, Line 159 should instruct agents to consult the skill when they are creating or reviewing issues/PRs, not just point at it. That keeps the responsibility discoverable from the root instruction file.

Suggested wording
-- For detailed guidance on writing issues, PRs, labeling, and descriptions, see `.agents/skills/github-workflow/SKILL.md`.
+- When creating, reviewing, or editing issues/PRs, consult `.agents/skills/github-workflow/SKILL.md` for detailed guidance on writing issues, PRs, labeling, and descriptions.

Based on learnings: Applies to AGENTS.md : Document agent responsibilities, capabilities, and interactions in AGENTS.md

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@AGENTS.md` at line 159, Replace the generic pointer in AGENTS.md that reads
"For detailed guidance on writing issues, PRs, labeling, and descriptions, see
`.agents/skills/github-workflow/SKILL.md`" with an explicit instruction telling
agents to consult the GitHub workflow skill when creating or reviewing
issues/PRs (e.g., "When creating or reviewing issues or PRs, consult the GitHub
workflow skill `.agents/skills/github-workflow/SKILL.md` for the detailed
issue/PR policy and required steps"); update the sentence so it makes the
handoff explicit and actionable, referencing the skill path
`.agents/skills/github-workflow/SKILL.md` and the contexts "creating" and
"reviewing" issues/PRs to ensure discoverability from AGENTS.md.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@AGENTS.md`:
- Line 159: Replace the generic pointer in AGENTS.md that reads "For detailed
guidance on writing issues, PRs, labeling, and descriptions, see
`.agents/skills/github-workflow/SKILL.md`" with an explicit instruction telling
agents to consult the GitHub workflow skill when creating or reviewing
issues/PRs (e.g., "When creating or reviewing issues or PRs, consult the GitHub
workflow skill `.agents/skills/github-workflow/SKILL.md` for the detailed
issue/PR policy and required steps"); update the sentence so it makes the
handoff explicit and actionable, referencing the skill path
`.agents/skills/github-workflow/SKILL.md` and the contexts "creating" and
"reviewing" issues/PRs to ensure discoverability from AGENTS.md.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 06f3b698-c836-4082-be3f-4eb23e97bc8e

📥 Commits

Reviewing files that changed from the base of the PR and between 7f151d7 and 561f866.

📒 Files selected for processing (2)
  • .agents/skills/github-workflow/SKILL.md
  • AGENTS.md

- Remove duplicate "Issues and PRs MUST be written in English" from
  "Docs and command snippets" (kept in "Issue and PR Rules").
- Promote "### Skills" to "## Skills" so it is a top-level section
  rather than incorrectly nested under Quick Decision Matrix.
- Add "Creating issues or PRs" row to the decision matrix pointing
  to the github-workflow skill.
- Fix leading space on "Before finishing" matrix row.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@joechenrh joechenrh changed the title AGENTS: move issue/PR guidelines into a dedicated skill AGENTS: extract issue/PR guidelines into a dedicated skill and clean up structure Mar 6, 2026
…n pattern

The guidance previously said "do not enumerate every file or function
touched", which could be read as "never include a list". Clarify that
the problem is listing changes *instead of* explaining motivation. A
summary paragraph followed by a scannable detail list is good practice.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
.agents/skills/github-workflow/SKILL.md (1)

33-36: Make the “good example” render as an actual summary plus bullet list.

Right now the example explains the intended structure, but the inline Specifically: - ... - ... format does not read like the scannable pattern you want contributors to copy.

Proposed doc update
 - Bad example (list without motivation): "Rename function A to B. Remove function C. Add parameter X to function D. Update callers E, F, G." -- this restates the diff without explaining why.
-- Good example (summary + details): "Callers of A need both X and Y, but A only returns X, so every caller has to compute Y separately with duplicated logic. Combine both into A so callers get everything in one call. Specifically: - Merged computeX and computeY into A. - Updated callers in pkg/foo and pkg/bar to use the new signature." -- this explains the problem first, then lists notable changes for scannability.
+- Good example (summary + details):
+  "Callers of A need both X and Y, but A only returns X, so every caller has to compute Y separately with duplicated logic. Combine both into A so callers get everything in one call."
+  - Merged `computeX` and `computeY` into `A`.
+  - Updated callers in `pkg/foo` and `pkg/bar` to use the new signature.
+  -- this explains the problem first, then lists notable changes for scannability.

Based on learnings: Applies to **/*.md : Keep guidance executable and concrete; avoid ambiguous phrasing in documentation

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.agents/skills/github-workflow/SKILL.md around lines 33 - 36, Update the
"Good example" block so it is an actual two-part structure: start with a 1-2
sentence summary sentence explaining the motivation (replace the inline
"Specifically:" fragment with a standalone summary sentence), then insert a real
markdown bullet list on the next line(s) with the notable specifics (each item
prefixed with "-" on its own line) so the example reads as "summary" followed by
a scannable list; edit the "Good example" paragraph that currently contains
`Specifically: - Merged computeX... - Updated callers...` to separate the
summary and the bullets accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.agents/skills/github-workflow/SKILL.md:
- Around line 8-29: Add a clear English-only requirement to both the "Issue
Rules" and "PR Requirements" sections: under "Issue Rules" (near the
`.github/ISSUE_TEMPLATE/` reference) add a line requiring that issue titles and
descriptions be written in English, and under "PR Requirements" (near
`.github/pull_request_template.md` and the title/description bullets) add a
matching sentence that PR titles and descriptions must be in English; ensure the
wording is explicit (e.g., "Titles and descriptions must be written in English")
so it applies to both issues and PRs.

---

Nitpick comments:
In @.agents/skills/github-workflow/SKILL.md:
- Around line 33-36: Update the "Good example" block so it is an actual two-part
structure: start with a 1-2 sentence summary sentence explaining the motivation
(replace the inline "Specifically:" fragment with a standalone summary
sentence), then insert a real markdown bullet list on the next line(s) with the
notable specifics (each item prefixed with "-" on its own line) so the example
reads as "summary" followed by a scannable list; edit the "Good example"
paragraph that currently contains `Specifically: - Merged computeX... - Updated
callers...` to separate the summary and the bullets accordingly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e81af3a5-91bd-451a-8b67-0b3d23609e85

📥 Commits

Reviewing files that changed from the base of the PR and between ba7c2eb and cc82475.

📒 Files selected for processing (1)
  • .agents/skills/github-workflow/SKILL.md

Copy link
Copy Markdown

@pantheon-ai pantheon-ai 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 looks good. No issues found.

Address CodeRabbit review: the skill is the canonical detailed guide
for issues/PRs but was missing the English-only requirement that
exists in AGENTS.md. Add it to both Issue Rules and PR Requirements
sections.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot bot commented Mar 6, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: winoros

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

The pull request process is described 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 approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Mar 6, 2026
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot bot commented Mar 6, 2026

[LGTM Timeline notifier]

Timeline:

  • 2026-03-06 08:34:00.340870402 +0000 UTC m=+519884.918949596: ☑️ agreed by winoros.

@winoros
Copy link
Copy Markdown
Member

winoros commented Mar 6, 2026

But there's a question about whether we should put all the related docs into ./docs/agents/ or extract them as skills.

Before we create the .agents folder, the test guide is put into ./docs/agents/.

@winoros
Copy link
Copy Markdown
Member

winoros commented Mar 6, 2026

https://openai.com/index/harness-engineering/#:~:text=The%20repository%E2%80%99s%20knowledge%20base%20lives%20in%20a%20structured%20docs/

Suppose we want to use AGENTS.md as the entry point. I'm not sure whether the skill can handle all the needs.

@winoros winoros self-requested a review March 6, 2026 09:42
@joechenrh
Copy link
Copy Markdown
Contributor Author

But there's a question about whether we should put all the related docs into ./docs/agents/ or extract them as skills.

Before we create the .agents folder, the test guide is put into ./docs/agents/.

From my point of view, maybe we can treat .agents/skills as teaching agents "how" (like how to write, build, run tests) and "docs/agents" as telling them "what" (what's the arthitecture of DDL module). (So maybe we should move some files from docs to skills)

@winoros
Copy link
Copy Markdown
Member

winoros commented Mar 10, 2026

oh! I found a regression.
Claude only read skills in .claude/skills. So we need a soft link...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants