mirror of
https://gitea.com/gitea/gitea-mcp.git
synced 2026-08-03 15:49:23 +02:00
4eaeb252a0
Carries over the applicable rules from https://gitea.com/gitea/gitea `AGENTS.md`, covering test scope, linter escape hatches and PR conventions. Swaps `Co-Authored-By` for the `Assisted-by` trailer. Reviewed-on: https://gitea.com/gitea/gitea-mcp/pulls/224 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: silverwind <me@silverwind.io>
1.6 KiB
1.6 KiB
- Never assume, verify before claiming
- Use
make helpto find available development targets - PR descriptions: minimal, only what and why, no task lists or file listings
- Reference issues and PRs by full URL, not by number
- Use Conventional Commits for commit messages and PR titles, e.g.
type(scope): subject;!before the colon if breaking. Usetesttype for test-only changes. - Add an
Assisted-by: AGENT_NAME:MODEL_VERSIONtrailer to commit messages, neverCo-Authored-ByorSigned-off-by - Attribute agent authorship on one trailing line in issue and pull request comments, never as a PR description section
- Never force-push, amend, or squash unless asked. Use new commits and normal push for pull request updates
- Keep comments short, prefer same-line, explain why, never narrate code. Preserve existing ones that still apply
- Ensure no trailing whitespace in edited files
- Run
make fmtto format.gofiles,make lint-goto lint them, andmake tidyafter anygo.modchanges - Fix the cause rather than disabling a linter or weakening a test. Where unavoidable, use the narrowest scope with a trailing comment giving the reason
- Register new tools with
Tool.RegisterReadorTool.RegisterWrite, and add them to the tool tables inREADME.md,README.zh-cn.mdandREADME.zh-tw.md - Run single go tests with
go test -run '^TestName$' ./modulepath/ - Write the fewest, fastest tests covering the behavior, extending an existing one where possible. Prefer unit tests where logic is testable in isolation
- Wait on a deterministic condition rather than
sleep