بنقرة واحدة
code-review
// Structured code review protocol for inspecting code quality against the full rule set. Use when auditing code written by yourself or another agent, during the /audit workflow, or when the user asks for a code review.
// Structured code review protocol for inspecting code quality against the full rule set. Use when auditing code written by yourself or another agent, during the /audit workflow, or when the user asks for a code review.
| name | code-review |
| description | Structured code review protocol for inspecting code quality against the full rule set. Use when auditing code written by yourself or another agent, during the /audit workflow, or when the user asks for a code review. |
Systematically review code against the full antigravity rule set. Catches issues that linters miss: architectural violations, missing observability, business logic errors, pattern inconsistencies.
/audit workflow (Phase 1: Code Review)Identify the files/features to review. Determine the review scope:
Read all applicable rules from .agent/rules/. Use rule-priority.md for severity classification.
Review each file/feature against these categories, in order from rule-priority.md:
Output a structured findings document:
# Code Review: {Feature/Module Name}
Date: {date}
Reviewer: AI Agent (fresh context)
## Summary
- **Files reviewed:** N
- **Issues found:** N (X critical, Y major, Z minor, W nit)
## Critical Issues
- [ ] **[SEC]** {description} — [{file}:{line}](file:///path)
- [ ] **[DATA]** {description} — [{file}:{line}](file:///path)
## Major Issues
- [ ] **[TEST]** {description} — [{file}:{line}](file:///path)
- [ ] **[OBS]** {description} — [{file}:{line}](file:///path)
## Minor Issues
- [ ] **[PAT]** {description} — [{file}:{line}](file:///path)
## Nit
- [ ] {description} — [{file}:{line}](file:///path)
## Rules Applied
List of rules referenced during this review.
When invoked via the /audit workflow, you MUST persist the findings to the repo:
Path: docs/audits/review-findings-{feature}-{YYYY-MM-DD}.md
docs/audits/ if it doesn't existWhen invoked as a standalone review (not via /audit), saving to docs/audits/ is recommended but optional.
| Tag | Category | Rule Source |
|---|---|---|
[SEC] | Security | security-principles.md |
[DATA] | Data integrity | error-handling-principles.md |
[RES] | Resource leak | resources-and-memory-management-principles.md |
[TEST] | Testability | architectural-pattern.md, testing-strategy.md |
[OBS] | Observability | logging-and-observability-mandate.md |
[ERR] | Error handling | error-handling-principles.md |
[ARCH] | Architecture | architectural-pattern.md, project-structure.md |
[PAT] | Pattern consistency | code-organization-principles.md |
This skill enforces all rules in .agent/rules/. Key references: