mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-09 06:03:01 -05:00
* [AI] Extract PR/commit rules into shared agent skill Deduplicate PR and commit instructions from AGENTS.md into a standalone skill file at .github/agents/pr-and-commit-rules.md. This single source of truth is consumed by both Claude Code (via CLAUDE.md @-import) and Cursor (via .cursor/rules/pr-and-commit.mdc with alwaysApply: true). AGENTS.md now references the shared file instead of repeating the rules in three separate sections. https://claude.ai/code/session_01KkHg7MYXrTyDkTw6u98Vam * Add release notes for PR #7153 --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
75 lines
2.4 KiB
Plaintext
75 lines
2.4 KiB
Plaintext
---
|
|
description: Rules for AI-generated commits and pull requests
|
|
globs:
|
|
alwaysApply: true
|
|
---
|
|
|
|
# PR and Commit Rules for AI Agents
|
|
|
|
Canonical source: `.github/agents/pr-and-commit-rules.md`
|
|
|
|
## Commit Rules
|
|
|
|
### [AI] Prefix Requirement
|
|
|
|
**ALL commit messages MUST be prefixed with `[AI]`.** This is a mandatory requirement with no exceptions.
|
|
|
|
**Examples:**
|
|
|
|
- `[AI] Fix type error in account validation`
|
|
- `[AI] Add support for new transaction categories`
|
|
- `Fix type error in account validation` (MISSING PREFIX - NOT ALLOWED)
|
|
- `Add support for new transaction categories` (MISSING PREFIX - NOT ALLOWED)
|
|
|
|
### Git Safety Rules
|
|
|
|
- **Never** update git config
|
|
- **Never** run destructive git operations (force push, hard reset) unless the user explicitly requests it
|
|
- **Never** skip hooks (`--no-verify`, `--no-gpg-sign`)
|
|
- **Never** force push to `main`/`master`
|
|
- **Never** commit unless explicitly asked by the user
|
|
|
|
## Pre-Commit Quality Checklist
|
|
|
|
Before committing, ensure all of the following:
|
|
|
|
- [ ] Commit message is prefixed with `[AI]`
|
|
- [ ] `yarn typecheck` passes
|
|
- [ ] `yarn lint:fix` has been run
|
|
- [ ] Relevant tests pass
|
|
- [ ] User-facing strings are translated
|
|
- [ ] Code style conventions followed (see `AGENTS.md` for full style guide)
|
|
|
|
## Pull Request Rules
|
|
|
|
### [AI] Prefix Requirement
|
|
|
|
**ALL pull request titles MUST be prefixed with `[AI]`.** This is a mandatory requirement with no exceptions.
|
|
|
|
**Examples:**
|
|
|
|
- `[AI] Fix type error in account validation`
|
|
- `[AI] Add support for new transaction categories`
|
|
- `Fix type error in account validation` (MISSING PREFIX - NOT ALLOWED)
|
|
|
|
### Labels
|
|
|
|
Add the **"AI generated"** label to all AI-created pull requests.
|
|
|
|
### PR Template: Do Not Fill In
|
|
|
|
- **NEVER fill in the PR template** (`.github/PULL_REQUEST_TEMPLATE.md`). Leave all blank spaces and placeholder comments as-is.
|
|
- **Exception**: If a human **explicitly asks** you to fill out the PR template, then fill it out **in Chinese** (简体中文).
|
|
|
|
## Quick-Reference Workflow
|
|
|
|
1. Make your changes
|
|
2. Run `yarn typecheck` — fix any errors
|
|
3. Run `yarn lint:fix` — fix any remaining lint errors
|
|
4. Run relevant tests (`yarn test` for all, or workspace-specific)
|
|
5. Stage files and commit with `[AI]` prefix — do not skip hooks
|
|
6. When creating a PR:
|
|
- Use `[AI]` prefix in the title
|
|
- Add the `"AI generated"` label
|
|
- Leave the PR template blank (do not fill it in)
|