Reviewing — Convention Audit + Design Alignment
Review code against Sage/Acorn conventions and verify alignment with design reference.
Inputs
$ARGUMENTS
If no scope specified, review all changed files (git diff against base branch).
Procedure
0) Determine scope
- If file path provided, review that file and related files
- If "all" or no argument, scan full project
- If active plan exists, focus on plan components
1) Convention checklist
Service Providers
-
ThemeServiceProviderextendsRoots\Acorn\Sage\SageServiceProvider; other feature providers extendIlluminate\Support\ServiceProvider -
register()only contains bindings (no hooks, no side effects) -
boot()contains hooks and initialization - Dependencies injected via constructor
ACF Blocks & Fields
- Blocks created via
acf:blockgenerator -
with()returns only data the view needs -
fields()uses Builder API - Block views use
$variablenotget_field() - Reusable fields extracted to Partials
Blade Templates
- Composers for data injection, Components for reusable UI
- No business logic in Blade views
- Proper layout inheritance (
@extends,@section,@yield)
Block Views
- R-css-vars: No
match($tone)→ Tailwind class strings; notone="*"props driving color; no hardcoded color utilities onh2/p/span→ G10 violation (CRITICAL) - R-component-reuse: No inline
<x-eyebrow>+<h2>when<x-section-header>exists; no raw<a>with button utilities when<x-button>exists → G9 violation - R-nl2br:
nl2br()only onaddTextarea()/addWysiwyg()fields, notaddText()→ G11 violation - R-arbitrary-btn: No
text-[*px]ortracking-[*px]in block/component views → CRITICAL
Routes & Controllers
- Clean route declarations (no logic in closures)
- Thin controllers (delegate to services)
- Prefer Acorn Routes over
register_rest_route()
Frontend
- Tailwind v4 CSS-first approach
- Assets referenced via
@vite()orVite::asset() - Editor styles included
Hooks Placement
-
add_action/add_filterin ServiceProviderboot() -
setup.phponly forafter_setup_themeessentials - No hooks scattered in random files
Content Architecture
- Content that grows over time uses CPTs (not hardcoded arrays)
- CPTs defined in
config/poet.php(notregister_post_type()) - Shared content uses Options Pages (not duplicated across blocks)
2) Design alignment (if plan exists)
If active plan has assets:
- Read design reference from
assets/ - Compare implemented components with design
- Flag visual drift
3) Report findings
## Review: {scope}
### Critical (must fix)
- **{file}:{line}** — {issue}. See `{skill}`.
### Improvement (should fix)
- **{file}:{line}** — {issue}. See `{skill}`.
### Good Practices Found
- {positive observation}
### Design Alignment
- {component}: {MATCH/DRIFT} — {details}
### Summary
{X} critical, {Y} improvements, {Z} good practices.
4) Visual verification — all components
After sage-reviewer completes:
- Glob for all spec files:
docs/plans/<active-plan>/assets/section-*-spec.md - For each spec file found:
a. Read the
### Verification Inputsblock — extracturl,selector,refb. Dispatchvisual-verifieragent with:url: from spec Verification Inputsselector: from spec Verification Inputsspec: this spec file pathref: from spec Verification Inputs c. Collect report: MATCH | DRIFT | MISSING | FAIL_ARBITRARY_VALUES
- Present consolidated report:
- List all components with their verification status
- If any DRIFT or FAIL: list fixes needed before merge
- If all MATCH: proceed to
finishing-a-development-branch
5) After review
- Offer
finishing-a-development-branchfor merge/PR workflow - Use base skills:
requesting-code-review,receiving-code-review
Key Principles
- Reference the relevant skill for every issue
- Be specific — file path and line number for every issue
- Acknowledge good code — don't just report problems
- Check content architecture — hardcoded dynamic content is a critical finding