Files
actual/.github/agents/pr-and-commit-rules.md
23e2baa75c [AI] Block AI agents from creating GitHub issues (#8711)
* [AI] Prohibit agents from creating GitHub issues via agent hooks

* [AI] Simplify issue-creation guard after review

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-08-18 07:06:53 +00:00

49 lines
2.0 KiB
Markdown

# PR and Commit Rules for AI Agents
This file lists the PR and commit rules you have to apply yourself.
## Pull Request Rules
### `[AI]` prefix on PR titles
**ALL pull request titles MUST be prefixed with `[AI]`** — you have to apply it
yourself.
**Examples:**
- `[AI] Fix type error in account validation`
- `Fix type error in account validation` (MISSING PREFIX — NOT ALLOWED)
### Do not fill in the PR template
- **NEVER fill in the PR template** (`.github/PULL_REQUEST_TEMPLATE.md`). Create
the PR with that template as the body, unmodified — leave all blank spaces and
placeholder comments as-is, and leave every checklist box unchecked. The human
who tested the change fills in the Description, Related issue(s), Testing, and
Checklist sections.
- **Exception**: if a human **explicitly asks** you to fill it out, do so **in
Chinese**, using Chinese characters (简体中文) for all content you add.
## Do not create GitHub issues
**Agents must never create GitHub issues.** Filing an issue is a human
decision — neither the GitHub MCP tools (`issue_write` with method `create`)
nor the `gh` CLI (`gh issue create`) may be used to open one; agent hooks
block both. If you believe an issue should exist, share the proposed title
and body with the user and let them file it. Updating existing issues (and
commenting on them) remains allowed.
## GitHub comment, review and issue prefix
**Prefix everything you post to GitHub with the robot emoji 🤖** — pull-request
and issue comments, pull-request reviews (including inline review comments), and
the title and body of issues you edit. This keeps agent-authored content
visibly marked. It does **not** change PR titles (still `[AI] …`) or commit
messages (still `[AI] …`).
Write the text normally; just make sure 🤖 is the first character (for issues,
on both the title and the body).
This applies only to comments **you** author — bots like CodeRabbit post under
their own identity and are not affected.