refactor

Solid

The behavior-preserving restructure gate. Routed to by /refactor for a rename, extract, inline, move, dedup, or internal-implementation swap. Six gated phases prove behavioral parity through unmodified pre-existing tests; any diff that classifies as `feat` is not a refactor and is routed to tdd. A modified pre-existing test is rejected as evidence — it is a behavior change in disguise.

Code & Development 137 stars 7 forks Updated today AGPL-3.0

Install

View on GitHub

Quality Score: 80/100

Stars 20%
71
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# refactor Restructure, do not rewrite. Externally observable behavior before equals after — proven by mechanism, not inspection. Routed to by `/refactor`. ## Pre-flight Read these, or STOP and surface the gap — never guess a command or a threshold: - `<project-root>/.codearbiter/CONTEXT.md` — the `stage:` frontmatter (the maturity value) and project context. - `<project-root>/.codearbiter/tech-stack.md` — the test, coverage, lint, and type-check invocations; file layout. - `<project-root>/.codearbiter/coding-standards.md` — style, structure, naming. Required for Phase 4. The working tree MUST be clean over the named surface before Phase 1. A dirty surface conflates the refactor diff with unrelated edits and breaks parity verification — STOP and surface it. ## Phase 1 — Surface identification · gate: BLOCK Enumerate the exact blast radius before any other work. Restate the planned refactor in one sentence and confirm it back to the user, then record a surface table: - Files (repo-relative paths). - Top-level symbols touched — function, class, and exported member names. - Public method signatures within those symbols. - External consumers — call sites in other modules. Reject vague surfaces. "the auth module", "the user service", "some helpers in utils" are categories, not surfaces. A surface is acceptable only when a reader could grep the repo for the listed symbols and arrive at the same file set. The table is the parity contract for Phases 2–6. Gate: a precise, co...

Details

Author
arbiterForge
Repository
arbiterForge/codeArbiter
Created
2 months ago
Last Updated
today
Language
Python
License
AGPL-3.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category