docs(Agents): add code review guidance (#27053)

This commit is contained in:
sudlud 2026-08-09 17:00:20 +02:00 committed by GitHub
parent 4ee35f2f64
commit f806ca71ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 31 additions and 2 deletions

View file

@ -0,0 +1,27 @@
# Code review
Reviewing a changeset or PR, your own before submission or a contributor's. The task-scoped docs
(`cpp-guidelines.md`, `sql-guidelines.md`, `cpp-scripts.md`) apply as a checklist to every changed
line, not as background reading.
- Review codestyle on every changed line, even when style is not the change's subject. Run both
linters and report violations as findings: `python apps/codestyle/codestyle-cpp.py` and
`python apps/codestyle/codestyle-sql.py`.
- Title and description follow the [commit message guidelines](https://www.azerothcore.org/wiki/commit-message-guidelines).
- Prefer data over code: when a C++ or script change is also achievable through world DB data
(SmartAI, conditions, templates), flag the DB-only alternative (see `cpp-scripts.md`).
- Never take a claim as fact, neither the PR description's nor a comment's. Verify game-data
claims (spell/creature/quest ids, mechanics) against the world DB, DBC data, or cited sources;
verify "fixed in the latest push" against the current diff.
- Check the change is still needed against current `master`: the surrounding code may have moved,
or another change may have landed the same fix.
- On an existing PR, walk every discussion item one by one: what was raised, whether it was
answered, and whether it still applies to the current head. Never skip one because it looks
resolved, old, or minor; this walk overrides any read-comments-lightly default of the reviewing
skill. `gh pr view` misses review bodies and inline threads; pull all three:
```
gh api repos/azerothcore/azerothcore-wotlk/issues/<N>/comments --paginate # conversation comments
gh api repos/azerothcore/azerothcore-wotlk/pulls/<N>/reviews --paginate # review verdicts + bodies
gh api repos/azerothcore/azerothcore-wotlk/pulls/<N>/comments --paginate # inline comments
```

View file

@ -3,7 +3,8 @@
Project-specific rules for Project-specific rules for
[/self-review](https://github.com/eai-org/agent-toolkit/blob/main/skills/self-review/SKILL.md). [/self-review](https://github.com/eai-org/agent-toolkit/blob/main/skills/self-review/SKILL.md).
Add here rules about reviewing AzerothCore PRs before they are submitted. Generic improvements Add here rules about reviewing AzerothCore PRs before they are submitted. Generic improvements
to the review process itself belong to the skill, not here. to the review process itself belong to the skill, not here. The [code-review.md](code-review.md)
rules apply on top.
## Regression risk ## Regression risk

View file

@ -17,7 +17,8 @@ Read the matching doc(s) BEFORE starting the task:
- Script work (under `src/server/scripts/`) → also `.agents/docs/cpp-scripts.md` - Script work (under `src/server/scripts/`) → also `.agents/docs/cpp-scripts.md`
- Creating or modifying SQL → `.agents/docs/sql-guidelines.md` - Creating or modifying SQL → `.agents/docs/sql-guidelines.md`
- SmartAI work (`smart_scripts` data) → also `.agents/docs/cpp-scripts.md` - SmartAI work (`smart_scripts` data) → also `.agents/docs/cpp-scripts.md`
- Self-reviewing a changeset before submission → `.agents/docs/self-review-rules.md` - Reviewing a changeset or PR → `.agents/docs/code-review.md`
- Self-reviewing a changeset before submission → also `.agents/docs/self-review-rules.md`
- Touching a subsystem that has a doc in `.agents/docs/systems/` → read that doc too - Touching a subsystem that has a doc in `.agents/docs/systems/` → read that doc too
- Capturing a lesson or adding/updating agent docs → `.agents/docs/README.md` - Capturing a lesson or adding/updating agent docs → `.agents/docs/README.md`