/planning-frontend-refactor
Planning a frontend refactor: audits an existing React/Next.js frontend against Ring standards (architecture, design system, accessibility, testing) and produces a prioritized task list (findings.md + tasks.md) for ring:running-dev-cycle-frontend. Plans only — no edits. Use when
$ npx -y skills add LerianStudio/ring --skill planning-frontend-refactor --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/planning-frontend-refactor
Context preview
The summary Claude sees to decide when to auto-load this skill.
Planning a frontend refactor: audits an existing React/Next.js frontend against Ring standards (architecture, design system, accessibility, testing) and produces a prioritized task list (findings.md + tasks.md) for ring:running-dev-cycle-frontend. Plans only — no edits. Use when
SKILL.md
planning-frontend-refactor.SKILL.mdname: ring:planning-frontend-refactor
description: "Planning a frontend refactor: audits an existing React/Next.js frontend against Ring standards (architecture, design system, accessibility, testing) and produces a prioritized task list (findings.md + tasks.md) for ring:running-dev-cycle-frontend. Plans only — no edits. Use when an existing frontend needs to meet standards or an audit is requested. Skip for greenfield, single-file fixes, or backend (use ring:planning-backend-refactor)."
Dev Refactor Frontend
When to use
- User wants to refactor existing frontend project to follow standards
- Legacy React/Next.js codebase needs modernization
- Frontend project audit requested
Skip when
- Greenfield project → Use /ring:planning-small-features or /ring:planning-large-features instead
- Single file fix → Use ring:running-dev-cycle-frontend directly
- Backend-only project → Use ring:planning-backend-refactor instead
Sequence
**Runs before:** ring:running-dev-cycle-frontend
Analyzes existing frontend codebase against Ring/Lerian standards and generates refactoring tasks for ring:running-dev-cycle-frontend.
You orchestrate. Agents analyze. NEVER use Bash/Grep/Read to analyze code — dispatch agents.
Gap Principle
Every divergence from Ring standards = a mandatory gap. No exceptions.
All divergences → FINDING-XXX → REFACTOR-XXX task → ring:running-dev-cycle-frontend input.
Architecture Pattern Applicability
| Project Type | Apply Frontend Standards? | |---|---| | Full React/Next.js App | ✅ YES — all frontend.md sections | | Design System Library | ✅ YES | | Landing page / static | ⚡ PARTIAL — directory + styling only | | Utility / config package | ❌ NO |
Standards Loading
Pre-fetch before any step:
WebFetch: https://raw.githubusercontent.com/LerianStudio/ring/main/CLAUDE.md
WebFetch: https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/frontend.md
WebFetch: testing-accessibility.md, testing-visual.md, testing-e2e.md, testing-performance.md
STOP if any fetch fails.
Execution Steps
Step 1: Validate Prerequisites
- Check `docs/PROJECT_RULES.md` exists → STOP if missing
- Detect UI library mode: read `package.json`
<!-- Replace @your-org/design-system with your organization's design system package. -->
- `@your-org/design-system` → `design-system`
- Otherwise → `fallback-only`
- If `go.mod` and no React → STOP: use `ring:planning-backend-refactor`
Step 2: Generate Codebase Report
Dispatch `ring:codebase-explorer`:
Generate comprehensive codebase report: project structure, React/Next.js patterns,
component architecture, state management, forms, styling, testing approach,
package.json dependencies. Output: docs/ring:planning-frontend-refactor/{timestamp}/codebase-report.mdStep 3: Dispatch Frontend Specialist Agents (parallel)
Verify `codebase-report.md` exists before dispatching.
**Dispatch all 3 in ONE message:**
Task 1: ring:frontend (MODE: ANALYSIS only)
- Load frontend.md via WebFetch
- Check all 19 sections per standards-coverage-table.md
- Flag framework/library mismatches vs standards
- File size enforcement: >1000 lines = ISSUE-XXX
- UI Library Mode: {ui_library_mode}
- Output: Standards Coverage Table + ISSUE-XXX per finding
Task 2: ring:qa-frontend (MODE: ANALYSIS only)
- Check all 19 testing sections (ACC, VIS, E2E, PERF)
- UI Library Mode: {ui_library_mode}
- Output: Standards Coverage Table + ISSUE-XXX for gaps
Task 3: ring:ui-engineer (MODE: ANALYSIS only)
- Check design system component usage compliance
- If ui_library_mode = "fallback-only", check custom component WCAG 2.1 AA accessibility, responsive/layout fallback behavior, and design-token/theme fallback usage
- For fallback-only mode, output ISSUE-XXX per violation plus a short note that frontend and qa-frontend own baseline implementation/testing coverage
- Output: ISSUE-XXX for non-compliant usageStep 4: Map Findings → Tasks
After all agents complete:
1. Save reports to `docs/ring:planning-frontend-refactor/{timestamp}/` 2. Map each ISSUE-XXX → FINDING-XXX 3. Generate `findings.md` 4. Map each FINDING-XXX → REFACTOR-XXX (1:1) 5. Generate `tasks.md` (ring:running-dev-cycle-frontend compatible)
**Findings template:**
## FINDING-001: {Pattern Name} in {file_path}
- **Severity:** CRITICAL | HIGH | MEDIUM | LOW
- **File:** {path}:{line}
- **Current:** {code or description}
- **Expected:** {Ring standard}Step 5: Visual Report + User Approval
Generate visual HTML summary → `ring:visualizing`. Present to user. Wait for explicit APPROVED.
Step 6: Save + Handoff
Save all artifacts. Handoff to `ring:running-dev-cycle-frontend`.
Severity Reference
| Severity | Criteria | |---|---| | CRITICAL | Security risk, WCAG legal issue, build broken | | HIGH | Missing server components, Lighthouse < 80, wrong pattern | | MEDIUM | Client component overuse, missing snapshots | | LOW | Naming conventions, file organization |
Read more
name: ring:planning-frontend-refactor description: "Planning a frontend refactor: audits an existing React/Next.js frontend against Ring standards (architecture, design system, accessibility, testing) and produces a prioritized task list (findings.md + tasks.md) for ring:running-dev-cycle-frontend. Plans only — no edits. Use when an existing frontend needs to meet standards or an audit is requested. Skip for greenfield, single-file fixes, or backend (use ring:planning-backend-refactor)."
Dev Refactor Frontend
When to use
- User wants to refactor existing frontend project to follow standards
- Legacy React/Next.js codebase needs modernization
- Frontend project audit requested
Skip when
- Greenfield project → Use /ring:planning-small-features or /ring:planning-large-features instead
- Single file fix → Use ring:running-dev-cycle-frontend directly
- Backend-only project → Use ring:planning-backend-refactor instead
Sequence
**Runs before:** ring:running-dev-cycle-frontend
Analyzes existing frontend codebase against Ring/Lerian standards and generates refactoring tasks for ring:running-dev-cycle-frontend.
You orchestrate. Agents analyze. NEVER use Bash/Grep/Read to analyze code — dispatch agents.
Gap Principle
Every divergence from Ring standards = a mandatory gap. No exceptions.
All divergences → FINDING-XXX → REFACTOR-XXX task → ring:running-dev-cycle-frontend input.
Architecture Pattern Applicability
| Project Type | Apply Frontend Standards? | |---|---| | Full React/Next.js App | ✅ YES — all frontend.md sections | | Design System Library | ✅ YES | | Landing page / static | ⚡ PARTIAL — directory + styling only | | Utility / config package | ❌ NO |
Standards Loading
Pre-fetch before any step:
WebFetch: https://raw.githubusercontent.com/LerianStudio/ring/main/CLAUDE.md WebFetch: https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/frontend.md WebFetch: testing-accessibility.md, testing-visual.md, testing-e2e.md, testing-performance.md
STOP if any fetch fails.
Execution Steps
Step 1: Validate Prerequisites
- Check `docs/PROJECT_RULES.md` exists → STOP if missing
- Detect UI library mode: read `package.json`
<!-- Replace @your-org/design-system with your organization's design system package. -->
- `@your-org/design-system` → `design-system`
- Otherwise → `fallback-only`
- If `go.mod` and no React → STOP: use `ring:planning-backend-refactor`
Step 2: Generate Codebase Report
Dispatch `ring:codebase-explorer`:
Generate comprehensive codebase report: project structure, React/Next.js patterns,
component architecture, state management, forms, styling, testing approach,
package.json dependencies. Output: docs/ring:planning-frontend-refactor/{timestamp}/codebase-report.mdStep 3: Dispatch Frontend Specialist Agents (parallel)
Verify `codebase-report.md` exists before dispatching.
**Dispatch all 3 in ONE message:**
Task 1: ring:frontend (MODE: ANALYSIS only)
- Load frontend.md via WebFetch
- Check all 19 sections per standards-coverage-table.md
- Flag framework/library mismatches vs standards
- File size enforcement: >1000 lines = ISSUE-XXX
- UI Library Mode: {ui_library_mode}
- Output: Standards Coverage Table + ISSUE-XXX per finding
Task 2: ring:qa-frontend (MODE: ANALYSIS only)
- Check all 19 testing sections (ACC, VIS, E2E, PERF)
- UI Library Mode: {ui_library_mode}
- Output: Standards Coverage Table + ISSUE-XXX for gaps
Task 3: ring:ui-engineer (MODE: ANALYSIS only)
- Check design system component usage compliance
- If ui_library_mode = "fallback-only", check custom component WCAG 2.1 AA accessibility, responsive/layout fallback behavior, and design-token/theme fallback usage
- For fallback-only mode, output ISSUE-XXX per violation plus a short note that frontend and qa-frontend own baseline implementation/testing coverage
- Output: ISSUE-XXX for non-compliant usageStep 4: Map Findings → Tasks
After all agents complete:
1. Save reports to `docs/ring:planning-frontend-refactor/{timestamp}/` 2. Map each ISSUE-XXX → FINDING-XXX 3. Generate `findings.md` 4. Map each FINDING-XXX → REFACTOR-XXX (1:1) 5. Generate `tasks.md` (ring:running-dev-cycle-frontend compatible)
**Findings template:**
## FINDING-001: {Pattern Name} in {file_path}
- **Severity:** CRITICAL | HIGH | MEDIUM | LOW
- **File:** {path}:{line}
- **Current:** {code or description}
- **Expected:** {Ring standard}Step 5: Visual Report + User Approval
Generate visual HTML summary → `ring:visualizing`. Present to user. Wait for explicit APPROVED.
Step 6: Save + Handoff
Save all artifacts. Handoff to `ring:running-dev-cycle-frontend`.
Severity Reference
| Severity | Criteria | |---|---| | CRITICAL | Security risk, WCAG legal issue, build broken | | HIGH | Missing server components, Lighthouse < 80, wrong pattern | | MEDIUM | Client component overuse, missing snapshots | | LOW | Naming conventions, file organization |
Proven engineering practices, enforced through skills. Ring is a comprehensive skills library and workflow system for AI agents that transforms how AI assistants approach software development.
Repo: LerianStudio/ring
Other skills on ring.
- /analyzing-options
Analyzing different approaches for a task or problem with structured comparisons, effort estimates, and recommendations. Use when facing strategic decisions, architecture choices, or multiple viable approaches. Skip when there's an obvious single approach or the decision is
Open skill - /auditing-production-readiness
Auditing a service's production readiness against Ring engineering standards across base dimensions plus a conditional multi-tenant dimension, then emitting a scored report and an HTML dashboard. Use before production deploy, periodic review, onboarding, or a major release. Skip
Open skill - /cleaning-comments
Cleaning redundant and obvious comments following clean code principles while preserving meaningful documentation. Supports git scope filtering (staged, unstaged, branch, commit-range). Use when code has excessive comments, during code review, or post-refactor cleanup. Skip when
Open skill - /committing-changes
Commit changes with scope allowlist enforcement, atomic grouping, GPG-signed conventional commits, and trailer management. Detects the repo's PR-validation scope policy before proposing any message. Use when the user asks to commit or has changes ready to record. Skip when the
Open skill - /creating-handoffs
Creating a handoff document that captures session state (completed work, decisions, open items, next steps) and delivering it via Plan Mode so the user gets the native 'clear context and continue implementing' resume option. Use when ending a session, when context grows large,
Open skill - /creating-worktrees
Creating an isolated git worktree for parallel branch work: selects the directory by priority order, verifies/adds .gitignore safety, auto-installs the detected toolchain's dependencies, runs a baseline test, and reports readiness. Use before a feature that needs isolation from
Open skill

