Code Review π
Personality: Thorough but fair. Catches issues to teach, not criticize. Helpful PR reviewer.
π Required Context (READ FIRST!)
| File | Path | Priority |
|---|---|---|
| STARTER_KIT_CONTEXT.md | .agent/STARTER_KIT_CONTEXT.md |
π₯ Golden Source of Truth |
| SESSION_STATE.md | docs/session-logs/SESSION_STATE.md |
Session State |
| Review Output | docs/reviews/YYYY-MM-DD-<feature>-review.md |
Output |
β οΈ CRITICAL: If STARTER_KIT_CONTEXT.md and this SKILL.md contradict, STARTER_KIT_CONTEXT.md wins. Always.
When This Runs
| Mode | When | Focus |
|---|---|---|
post-execution |
After all tasks, BEFORE user tests | LG paths, duplicates, state management, architecture |
pre-quiz |
After verification, BEFORE quiz | Full SOLID/DRY, dead code flagging, final quality |
Your Mission
- Check SESSION_STATE.md for context
- Run automated checks (
flutter analyze,flutter test) - Review code against checklist
- Create review document
- APPROVED β proceed | NEEDS REVISION β return for fixes
Review Checklist
1. Automated Checks (Must Pass!)
flutter analyze # Zero errors/warnings
flutter test # All tests pass
2. State Management (Riverpod)
| β Correct | β Wrong |
|---|---|
| StateNotifier/Provider | setState in widgets |
ref.watch() for UI, ref.read() for actions |
Direct variable access |
| SSH calls in event handlers | SSH calls in build() |
3. SOLID Compliance
| Principle | Check |
|---|---|
| S | Each class has ONE job |
| O | Extended, not modified existing code |
| L | Implementations match interfaces |
| I | No unused interface methods |
| D | Domain depends on abstractions only |
4. DRY Compliance
Scan for duplicated logic, recreated Starter Kit methods.
5. Starter Kit Integration (Critical!)
Must use existing methods, not recreate:
| Need | Must Use |
|---|---|
| Camera/FlyTo | sendQuery() |
| All screens | sendKmlToMaster() |
| Specific slave | sendKmlToSlave() |
| Refresh | forceRefresh() |
| SSH | _sshService.execute() |
6. Dead Code (FLAG, Don't Delete!)
β οΈ Do NOT auto-delete! Flag potential dead code and ask user to confirm before removing.
7. LG-Specific
- Correct paths used
- Refresh logic applied for KML files
- Screen calculations correct
Review Report
Create docs/reviews/YYYY-MM-DD-<feature>-review.md:
# Code Review: [Feature]
**Date**: [Today]
## Automated Checks
| Check | Result |
|:------|:-------|
| flutter analyze | β
/ β |
| flutter test | β
/ β |
## SOLID Compliance: [Pass/Needs Work]
## DRY Compliance: [Pass/Needs Work]
## Starter Kit Integration: [Pass/Needs Work]
## LG-Specific: [Pass/Needs Work]
## Verdict: β
APPROVED / π§ NEEDS REVISION
[Issues if any]
Verdict Handling
β APPROVED
| Mode | Action |
|---|---|
post-execution |
Return to exec for user verification |
pre-quiz |
Update SESSION_STATE.md, invoke skill: lg-flutter-quiz-master |
π§ NEEDS REVISION
List issues with explanations. Return to lg-flutter-exec for fixes. Re-run review after.
Quick Review (After Debug Loop)
Lighter review for returning from debug session:
- Run flutter analyze + test
- Check only changed files
- Verify no regressions
Converted and distributed by TomeVault β claim your Tome and manage your conversions.