skills/refactor/SKILL.md
Architecture refactor mode: set a concrete improvement goal, refactor until the architecture is simpler and coherent, live-test after each significant step, autoreview, commit green milestones, and track progress in /tmp/refactor-{project}.md. Use when: "refactor this", "clean up the architecture", "make the design better", "refactor until you're happy", "pay down design debt", "simplify this subsystem". Trigger: /refactor.
npx skillsauth add phrazzld/agent-skills refactorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Refactor architecture deliberately. Keep behavior stable unless the operator explicitly asks for product change.
Start by setting an explicit active goal when the harness supports goal tracking. Do not write "refactor until happy." Write a goal with:
harnesses/shared/references/verification-system-first.md
and define claim, falsifier, driver, grader, evidence packet, and cadence.Good shape:
Refactor <subsystem> so <responsibility> has one owning module, public callers
use <named interface>, and <live tests/routes> still pass after each milestone.
Stop when the diff removes the duplicated seam, reviewers find no blocking
architecture concern, and no broader behavior change is needed.
Create /tmp/refactor-{project}.md immediately. Keep it current; it is the
handoff if the session dies.
Track:
harnesses/shared/references/quality-system.md.Do not put secrets, raw credentials, or private customer data in /tmp.
harnesses/shared/references/delete-first.md before
optimizing or automating the pressure, and use the synced Ponytail skill
(skills/.external/dietrich-ponytail/SKILL.md) as the default
anti-overengineering lens before adding abstractions, files, dependencies,
wrappers, or automation. Do not tidy everything./qa, or the
surface-specific route. Unit tests alone are insufficient for a milestone.harnesses/shared/references/quality-system.md; a risky boundary change
earns more than one lens./tmp, not the repo, unless the operator asks for a durable plan.Delegate on judgment per the shared Roster contract: native subagents by
default; add cross-model critics, roster providers, or sprite lanes
(/sprites) only when they answer a distinct question. See
harnesses/shared/AGENTS.md (Roster).
Useful lanes:
Default harsh critic: load the synced
thermo-nuclear-code-quality-review skill
(skills/.external/cursor-thermo-nuclear-code-quality-review/SKILL.md) for
milestone diffs that add abstractions, split modules, cross file-size
thresholds, or claim "cleaner architecture." Use julius-caveman to compress
progress-file summaries only when they get noisy.
Stop and report instead of improvising when:
harnesses/shared/references/quality-gates.md./tmp/refactor-{project}.md is stale, the
refactor is no longer resumable.Done means:
/tmp/refactor-{project}.md names final architecture, commits, verification,
residual risk, and follow-up pressure outside scope.testing
Capture one compounding repo-technical learning while a solved problem is still fresh. Use when: after a bug fix, diagnosis, delivery, review, or incident reveals a reusable pattern worth adding to `docs/solutions/`. Trigger: /compound, /capture-learning, /learning.
testing
Route Misty Step factory application capabilities. Use when choosing, auditing, integrating, or operating Canary, Powder, Landmark, Aesthetic, or Bitterblossom: production observability, incidents, health checks, error logging, backlog/work-card state, release intelligence, UI/UX system adoption, or supervised/unsupervised agent dispatch. Trigger: /factory-apps, /factory-stack.
testing
Prove a skill beats no-skill with a falsifiable A/B eval, or retire it. Design, generate, run, and maintain a skill-specific eval: name the one claim the skill must earn, run it skill-on vs raw same-model, grade blind with objective checks first, return a keep/adapt/cut verdict. Use when: "eval this skill", "does this skill help", "prove the skill beats no skill", "write an eval for", "benchmark a skill", "is this skill worth it", "skill A/B", "skill regression test", "generate skill evals". Trigger: /skill-eval, /eval-skill, /prove-skill.
tools
> Template. Copy to `<target-repo>/.agents/skills/<repo>-<domain>/SKILL.md` > and fill every bracketed placeholder from the live target repo. Delete this > line and every other `> ` guidance line before committing. See > `../../references/repo-local-skill-generation.md` for the full process. --- name: <repo>-<domain> description: | [One paragraph: what this skill verifies/runs/operates for <repo>, stated in terms of the repo's real shape (service/CLI/library/etc.), not generic process. En