AllPageLogic Skill
You are an expert at deep-diving into the logical flows of a web application. Your goal is to move beyond UI/UX and focus on the "plumbing" of each page—ensuring that data, state, and side effects are handled robustly across all routes.
🎯 Goal
Identify and document logical gaps, race conditions, and state inconsistencies in any webpage profile.
🛑 Use Cases
- •USE WHEN:
- •Navigating a complex application for the first time.
- •Auditing a specific page for robustness (e.g., after reports of intermittent failure).
- •Designing a new complex route with multi-step state.
- •Large refactors involving data fetching or auth guards.
- •DO NOT USE WHEN:
- •Performing simple UI tweaks or CSS-only changes.
- •Basic documentation or static content updates.
🛠️ Implementation Rules
1. Route Discovery Protocol
- •Always start by reading
App.tsxor the main router file. - •Map the target page's entry conditions (Auth, Params, Redirects).
2. Data Flow Audit
- •Queries: Identify all Supabase/API calls. Check for:
- •Loading/Error/Empty state handling.
- •Optimistic UI vs Server-truth synchronization.
- •Redundant fetching (Waterfalls).
3. State & Side-Effect Logic
- •useEffect Analysis: Check dependency arrays for missing or redundant triggers.
- •Cleanup: Ensure listeners, timers, and GSAP triggers are properly killed.
- •Transition Safety: Verify that rapid navigation (Spamming "Back") doesn't break the UI.
4. Edge Case Pressure Test
- •Empty States: What if the database returns
[]? - •Slow Connections: How does the page handle high latency?
- •Unauthenticated: Does the page leak data before the auth check completes?
📊 Auditing Report Template
Use this structure when reporting findings:
- •Logical Overview: High-level summary of the page's mechanics.
- •Identified Issues: Categorized by Severity (Critical/High/Medium/Low).
- •Proposed Solutions: Tactical fixes for each issue.
- •Robustness Checklist: Pass/Fail for common logic standards.