skills/frontend-upgrade/SKILL.md
Full-stack frontend upgrade pipeline — fuses /production-upgrade iterative audit with /plan-ceo-review vision and /plan-eng-review rigor. Deploys parallel auto-swarm agents for iterative audit and execution. Enriched with /deep-research for competitive parity.
npx skillsauth add ShaheerKhawaja/ProductionOS frontend-upgradeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are the Frontend Upgrade orchestrator — a fusion of three ProductionOS systems:
This is NOT a generic code review. This is a full-spectrum frontend transformation that audits, researches, designs, implements, and converges to 10/10 quality across all frontend dimensions.
target — Target frontend directory or repo (default: current directory). Optional.grade — Target grade (default: 10.0). Optional.iterations — Max convergence iterations (default: 7). Optional.swarm_size — Parallel audit agents per wave (default: 7). Optional.focus — Comma-separated focus areas (e.g., design,performance,a11y). Empty = full audit. Optional.Before executing, run the shared ProductionOS preamble.
ls package.json tsconfig.json next.config.* nuxt.config.* vite.config.* 2>/dev/null
cat package.json | head -50
git log --oneline -20
git diff --stat HEAD~10
grep -r "TODO\|FIXME\|HACK\|XXX" -l --exclude-dir=node_modules --exclude-dir=.next . | head -30
ls src/styles/ src/components/ui/ src/design-system/ 2>/dev/null
docs/references/ for design specs.productionos/ for prior upgrade artifacts~/.gstack/projects/*/ceo-plans/ for prior CEO visionsRun the 10-dimension frontend audit (score 1-10 each):
| Dimension | What to Evaluate | |-----------|-----------------| | 1. Visual Design | Color system, typography, spacing, hierarchy, dark mode | | 2. Component Architecture | Composition, reusability, prop patterns, state management | | 3. Performance | Bundle size, LCP, FID, CLS, lazy loading, code splitting | | 4. Accessibility | WCAG 2.1 AA, keyboard nav, screen readers, contrast, ARIA | | 5. Responsive Design | Mobile-first, breakpoints, touch targets, viewport handling | | 6. Animation and Motion | Transitions, micro-interactions, loading states, skeleton UI | | 7. Error and Edge States | Empty states, error boundaries, loading, offline, stale data | | 8. Code Quality | TypeScript strictness, linting, naming, DRY, file structure | | 9. Testing | Unit, integration, E2E, visual regression, a11y testing | | 10. Design System | Token consistency, component library, theming, documentation |
Save baseline to .productionos/FRONTEND-BASELINE.md.
HARD GATE: Do NOT skip this phase. Do NOT jump to implementation.
Deploy 3 parallel research agents:
Agent 1 (Design Inspiration): Research top 5 products in the same category. Capture design patterns, color systems, typography. Note what feels premium vs generic.
Agent 2 (Technology Landscape): Latest React/Next.js/Vue patterns, component library state of the art (shadcn/ui, Radix, Headless UI), animation libraries, performance optimization.
Agent 3 (Accessibility and Standards): WCAG 2.1 AA compliance checklist, best-in-class a11y implementations, inclusive design patterns.
Answer:
Write .productionos/FRONTEND-VISION.md with: North Star, Design Principles, Current-to-Target matrix, Competitive Parity Gaps, Design System Direction.
For every component directory: composition patterns, state management, prop drilling depth (flag > 3 levels), reusability score.
npx next build 2>&1 | tail -40
npx @next/bundle-analyzer 2>/dev/null
Map: PAGES/ROUTES -> LAYOUTS -> COMPONENTS -> UI PRIMITIVES -> DESIGN TOKENS -> THEME Map data flow: Server Components -> Client Components -> State -> API
Write .productionos/FRONTEND-ENG-PLAN.md: priority-ordered fix list (P0/P1/P2), effort estimates (S/M/L), dependencies, risk assessment.
HARD GATE: Do NOT spawn swarm agents until Phase 1 (Vision) and Phase 2 (Architecture) are complete.
Deploy swarm_size parallel agents, each assigned a dimension:
Each agent writes to .productionos/swarm/wave-{N}/agent-{N}-{dimension}.md.
After Wave 1: merge all findings into .productionos/FRONTEND-AUDIT-MERGED.md. Deduplicate. Score each dimension. Identify 3 lowest-scoring dimensions.
WAVE 2+ focused on lowest 3 dimensions:
After each fix wave:
If build/lint/tests fail: auto-fix (max 3 attempts). If still failing: revert batch, log to .productionos/FRONTEND-REVERTS.md.
Write .productionos/FRONTEND-UPGRADE-REPORT.md:
Append to .productionos/CONVERGENCE-LOG.md.
/production-upgrade instead..productionos/
FRONTEND-BASELINE.md
FRONTEND-VISION.md
FRONTEND-ENG-PLAN.md
FRONTEND-AUDIT-MERGED.md
FRONTEND-UPGRADE-REPORT.md
FRONTEND-REVERTS.md
CONVERGENCE-LOG.md
swarm/wave-{N}/agent-{N}-{dimension}.md
tools
Implementation planning workflow that turns approved ideas into dependency-aware execution plans.
development
Local RAG and Graph RAG over the SecondBrain wiki vault. Progressive context loading (hot cache -> index -> domain -> entity). Graph traversal via wikilink resolution. Use when agents need cross-project context, when answering questions that span multiple domains, or when building context for planning tasks. Triggers on: "wiki context", "cross-project context", "what do we know about", "check the wiki", "graph context", "/wiki-rag".
devops
UX improvement pipeline — creates user stories from UI guidelines, maps user journeys, identifies friction, dispatches fix agents. The user-experience equivalent of /production-upgrade.
development
Test-driven development workflow that writes failing tests first, implements minimally, and refactors safely.