analyzing-codebases
Detects project languages and monorepo state, runs language-appropriate static analysis (dependency graph, complexity, duplication, semantic patterns), and…
Validates hard structural rules (no cycles, file/fn line caps, cognitive/cyclomatic complexity) and runs mutation testing on touched modules. Use when applying-refactors has completed all phases on the refactor branch.
$ npx -y skills add wayne930242/Reflexive-Claude-Code --skill verifying-refactors --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/verifying-refactorsContext preview
The summary Claude sees to decide when to auto-load this skill.
Validates hard structural rules (no cycles, file/fn line caps, cognitive/cyclomatic complexity) and runs mutation testing on touched modules. Use when applying-refactors has completed all phases on the refactor branch.
name: verifying-refactors description: Validates hard structural rules (no cycles, file/fn line caps, cognitive/cyclomatic complexity) and runs mutation testing on touched modules. Use when applying-refactors has completed all phases on the refactor branch.
**Verifying refactors IS proving the refactor made the codebase better by measurable rules, not vibes.**
Run the same toolchain as analyzing-codebases, on the post-refactor state. Compare before/after. Every hard rule must hold or the refactor is not done. Mutation test touched modules to confirm characterization tests actually assert.
**Core principle:** A refactor that reduces complexity on paper but fails hard rules is a regression.
**Pattern:** Chain **Handoff:** user-confirmation **Next:** `finalizing-refactors`
**Tasks:** 1. Run post-refactor toolchain 2. Check hard rules 3. Run mutation testing on touched modules 4. Produce verification report 5. Present to user
Rerun the same tools as analyzing-codebases on current (refactored) state. Save outputs to `.rcc/aref-raw/{ts}-post-*.json` (distinct from pre-refactor `*-pre-*.json` if you want to rename original outputs; else use new timestamp).
Per `references/hard-rules.md`, check each rule. Any failure → STOP, do not proceed to mutation testing, report failure.
Rules:
Per `references/mutation-testing.md`. Run mutation tool ONLY on modules touched by the refactor (derived from git diff since branch point). Global mutation runs are out of scope.
Record mutation score (killed/total). Survivors >20% → flag `weak-tests` in report but do not block.
Write `.rcc/{ts}-verification-report.md`:
# Verification Report {ts}
## Hard Rules
| Rule | Before | After | Pass/Fail |
|------|--------|-------|-----------|
| Cyclic deps | 3 | 0 | PASS |
| Max file LOC | 820 | 298 | PASS |
| ...
## Mutation Testing
| Module | Mutants | Killed | Score | Flag |
|--------|---------|--------|-------|------|
| src/auth/token.ts | 48 | 41 | 85% | |
| src/auth/middleware.ts | 32 | 20 | 63% | weak-tests |
## Delta vs Pre-refactor
- Hotspot count: -3
- Duplication clusters: -2
- AGENTS.md gaps: unchanged (handled by finalizing)
## Decision
PASS / FAIL-HARD-RULES / PASS-WITH-WEAK-TESTSPrint report summary. Ask user:
| Thought | Reality | |---------|---------| | "Coverage is 85%, skip mutation" | Coverage measures execution, not assertion. Mutation validates asserts. | | "Warnings are fine, not FAIL" | Warning ≠ FAIL but IS recorded. User decides acceptance. | | "Cognitive complexity 16 is close enough" | Hard rule is hard. Negotiate in plan, not in verify. |
A Claude Code plugin marketplace for skills-driven Agentic Context Engineering (ACE) — build, analyze, and maintain agent systems with structured workflows.
Repo: wayne930242/Reflexive-Claude-Code
Detects project languages and monorepo state, runs language-appropriate static analysis (dependency graph, complexity, duplication, semantic patterns), and…
Executes a refactor plan phase-by-phase on a dedicated branch with per-phase commits and mandatory reviewer checkpoints. Use when characterization-tests…
Writes AGENTS.md per subproject, archives run artifacts, and suggests rcc handoff conditionally. Use when verifying-refactors passes (PASS or…
Converts a refactor map into a phased plan using parallel-change, branch-by-abstraction, or strangler fig patterns. Use when user has approved the refactor map…
Adds golden/snapshot tests to untested hotspot modules before refactoring. Use when refactor plan marks any phase with…
Validates component-type choices for agent system work, classifying knowledge as CLAUDE.md vs rule vs skill vs agent vs hook and checking for conflicts. Use…