Skip to content
Skills Library
Programming · Testing

fec-refactoring-validation

/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.

Licence
MIT
Last repository change
26.09.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
3
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 26.09.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

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.

Original author 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.

How it works

  1. Purpose
  2. Procedure
  3. Safety-Net Levels
  4. Frontend Contract Checklist
  5. References
  6. Constraints
  7. Expected Output
Original SKILL.md headings · 56 lines, 387 words
SKILL.md preview
---
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.
Files in this package (3)
  • SKILL.md 3 KB
  • references/behavior-preservation.md 2 KB
  • references/refactoring-test-checklist.md 2 KB

Versions

The database has no other skills named fec-refactoring-validation.

Database snapshot: 13.11.2026 · package version 60e47d9d05af (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100fec-refactoring
    Use when restructuring existing frontend code while preserving observable behavior, including responsibility extraction, module movement, conditional simplification, API cleanup, or data organization. Do not use for new feature behavior, behavior-changing bug fixes, dependency…
  • 90fec-refactoring-catalog
    Use when selecting or composing behavior-preserving refactoring techniques after structural evidence is known, especially when multiple candidate transformations, preconditions, or ordering choices must be compared.
  • 86refactoring-safety
    Use when refactoring, restructuring, or resolving a fault — behavior-preserving, green build and tests, class-of-problem fixes, uniform design over hacks.
  • 100generate-tests
    Use this skill whenever the user wants to generate tests before refactoring, create a test plan, add safety net tests, lock down behavior with tests, or generate test code for existing modules. Triggers include: "generate tests", "create test plan", "add tests before…
  • 100regression-tester
    Generate and run regression tests after code refactoring to verify behavior is preserved. Use when someone has refactored code and needs to confirm nothing broke — especially when existing test coverage is insufficient. Trigger words: regression test, refactor validation,…
  • 100characterization-test-generator
    Generates tests that capture current behavior of existing code before refactoring. Use when you need a safety net before AI-assisted refactoring or modifying legacy code.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.