Skip to content
Development
Skill

/fec-refactoring-validation

Use when proving that a frontend refactoring preserved existing behavior, selecting an appropriate safety net, validating each structural step, or assigning a PASS, PARTIAL, or NOT PROVEN preservation verdict.

From plugin
frontend-craft
2256 skills14 agents11 commands5 hooks
+1

Claude Code

$ npx -y skills add bovinphang/frontend-craft --skill fec-refactoring-validation --agent claude-code

SKILL.md

fec-refactoring-validation.SKILL.md
name: fec-refactoring-validation
description: Use when proving that a frontend refactoring preserved existing behavior, selecting an appropriate safety net, validating each structural step, or assigning a PASS, PARTIAL, or NOT PROVEN preservation verdict.

Skill: Refactoring Validation

Purpose

Define the observable contract and the smallest credible evidence needed to prove that structural edits preserved existing frontend behavior.

Procedure

1. Record the relevant behavior contract before substantial edits. 2. Classify safety-net coverage as A, B, or C. 3. Run and record the pre-change baseline. 4. Match verification to the current refactoring risk and affected boundary. 5. After every structural step, run the narrowest sufficient check immediately. 6. If a newly introduced failure appears, revert that step before broader repair. 7. At the end, run the broad gates justified by the affected surface. 8. Assign PASS, PARTIAL, or NOT PROVEN from evidence, not optimism.

Pure structural work uses **GREEN → REFACTOR → GREEN**.

Safety-Net Levels

| Level | Evidence | Execution guidance | | --- | --- | --- | | A — Strong | Existing tests cover relevant behavior | Use tests as the primary safety net | | B — Partial | Important behavior is only partly covered | Add focused characterization of current behavior before risky steps | | C — None | No useful automated behavior coverage | Do not auto-install a framework; keep CAUTION/DANGER plan-only unless a minimal safety net is authorized |

Frontend Contract Checklist

Check relevant items, not every item mechanically:

  • function inputs, outputs, exceptions, and error mapping;
  • DOM structure that consumers depend on, visible states, focus, keyboard flow, and accessibility semantics;
  • props, emits, slots, hook/composable return values, and event ordering;
  • requests, payloads, cancellation, retries, cache keys, and loading/error transitions;
  • store state, persistence, object identity, memoization, refs/reactivity, and lifecycle timing;
  • routes, URLs, guards, package exports, serialized fields, and backend-facing DTOs.

References

  • Load [behavior-preservation.md](references/behavior-preservation.md) for contract construction and proof levels.
  • Load [refactoring-test-checklist.md](references/refactoring-test-checklist.md) for targeted verification by frontend risk.

Constraints

  • Passing unrelated tests does not prove preservation.
  • A green test written only after the change is weaker evidence than a pre-change baseline or characterization test.
  • Do not rewrite expected values simply because the refactor changed behavior.
  • Do not hide missing proof behind a PASS label.
  • Do not install a new test framework without explicit authorization.

Expected Output

A behavior-preservation record containing baseline status, safety-net level, per-step checks, final validation, unresolved coverage gaps, and a PASS/PARTIAL/NOT PROVEN verdict.

Read more
@bovinphang
Ships withfrontend-craft

frontend-craft is a universal frontend plugin that brings the same opinionated engineering standards to all 15 AI coding assistants.

2256 skills14 agents6 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
22
Star history of bovinphang/frontend-craft on GitHub, a chart by star-history.com

Other skills on frontend-craft.

fec-alchemy

fec-alchemy

Use when absorbing ideas, capabilities, workflows, architecture, quality systems, ecosystem extensions, or engineering practices…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about fec-refactoring-validation.

Which coding agents can use fec-refactoring-validation?
fec-refactoring-validation installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.