Files
gitea-mcp/AGENTS.md
silverwind 4eaeb252a0 docs: sync AGENTS.md with gitea/gitea (#224)
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>
2026-08-02 20:28:58 +00:00

1.6 KiB

  • Never assume, verify before claiming
  • Use make help to 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. Use test type for test-only changes.
  • Add an Assisted-by: AGENT_NAME:MODEL_VERSION trailer to commit messages, never Co-Authored-By or Signed-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 fmt to format .go files, make lint-go to lint them, and make tidy after any go.mod changes
  • 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.RegisterRead or Tool.RegisterWrite, and add them to the tool tables in README.md, README.zh-cn.md and README.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