analyzing-codebases
Detects project languages and monorepo state, runs language-appropriate static analysis (dependency graph, complexity,…
Adds golden/snapshot tests to untested hotspot modules before refactoring. Use when refactor plan marks any phase with characterization_test.status=must-scaffold.
Claude Code
$ npx -y skills add wayne930242/Reflexive-Claude-Code --skill scaffolding-characterization-tests --agent claude-code
Codex
$ npx skills add wayne930242/Reflexive-Claude-Code --skill scaffolding-characterization-tests -a codex -y
Cursor
$ npx skills add wayne930242/Reflexive-Claude-Code --skill scaffolding-characterization-tests -a cursor -y
Gemini CLI
$ npx skills add wayne930242/Reflexive-Claude-Code --skill scaffolding-characterization-tests -a gemini-cli -y
GitHub Copilot
$ npx skills add wayne930242/Reflexive-Claude-Code --skill scaffolding-characterization-tests -a github-copilot -y
OpenCode
$ npx skills add wayne930242/Reflexive-Claude-Code --skill scaffolding-characterization-tests -a opencode -y
Windsurf
$ npx skills add wayne930242/Reflexive-Claude-Code --skill scaffolding-characterization-tests -a windsurf -y
name: scaffolding-characterization-tests description: Adds golden/snapshot tests to untested hotspot modules before refactoring. Use when refactor plan marks any phase with characterization_test.status=must-scaffold.
**Scaffolding characterization tests IS building the safety net BEFORE touching code.**
Per Feathers' "Working Effectively with Legacy Code": never refactor untested code. Capture current behavior as golden output, verify tests go green against unmodified code, commit the scaffold, then enter applying-refactors.
**Core principle:** Snapshot current behavior, not aspirational behavior. The tests protect the refactor from accidental regression.
**Pattern:** Chain **Handoff:** automatic (no user confirmation unless new tests added) **Next:** `applying-refactors`
**Tasks:** 1. Parse refactor plan 2. Filter phases requiring must-scaffold 3. For each target module, pick recipe from `references/characterization-test-recipes.md` 4. Generate test file(s); capture current output as golden 5. Run new tests to verify green 6. Commit scaffold 7. Handoff to applying-refactors
Read `.rcc/{ts}-refactor-plan.md`. Collect all phases with `characterization_test.status: must-scaffold`.
Skip phases where module already has coverage (sample: run test runner with coverage, check if `target_module` has ≥3 passing tests). Keep those that need scaffold.
If none → skip to Task 7 immediately.
Language + module shape determines recipe:
See `references/characterization-test-recipes.md` for per-language code.
Run the test runner on the new test file only. Expected: all new tests pass.
Fail → diagnose. Never alter the module to make tests pass. If the module has nondeterminism (time, random, uuid), freeze sources and retry.
git add <test paths> <golden fixture paths> git commit -m "test(aref): scaffold characterization tests for <scope>"
Print summary: N modules scaffolded, M skipped (already covered), K marked high-risk. Hand off to `applying-refactors` unless all phases became high-risk (then return to planning for replan).
| Thought | Reality | |---------|---------| | "The module is simple, tests redundant" | Refactor accidents happen most in simple-looking modules. | | "Test captures bug behavior" | Correct — the point is to preserve CURRENT behavior, bugs included. Fix bugs in a separate commit AFTER refactor. | | "Golden files too big, just check count" | The size IS the signal. Commit it. | | "Skip modules with IO — too hard" | Mark high-risk, escalate to user, don't silently skip. |
A Claude Code plugin marketplace for skills-driven Agentic Context Engineering (ACE) — build, analyze, and maintain agent systems with structured workflows.
Detects project languages and monorepo state, runs language-appropriate static analysis (dependency graph, complexity,…
Executes a refactor plan phase-by-phase on a dedicated branch with per-phase commits and mandatory reviewer checkpoints. Use when…
Writes AGENTS.md per subproject, archives run artifacts, and suggests rcc handoff conditionally. Use when verifying-refactors…
Converts a refactor map into a phased plan using parallel-change, branch-by-abstraction, or strangler fig patterns. Use when user…
Validates hard structural rules (no cycles, file/fn line caps, cognitive/cyclomatic complexity) and runs mutation testing on…
Validates component-type choices for agent system work, classifying knowledge as CLAUDE.md vs rule vs skill vs agent vs hook and…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.