refine

Reviews and refactors a feature's changed code against charter rules before verification.

150|10|Updated Feb 16, 2026
One-click install
npx skills add https://github.com/swingerman/engineer --skill refine-swingerman
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: refine
Source: https://github.com/swingerman/engineer/tree/main/engineer/skills/refine
Command: npx skills add https://github.com/swingerman/engineer --skill refine-swingerman

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? After a feature's code is implemented and passing, teams need a disciplined cleanup pass that improves reuse, quality, and efficiency without breaking the behavior contract or violating project architecture rules. ## Core Features & Use Cases - Three-lens parallel review: Dispatches Reuse, Quality, and Efficiency subagents over the feature branch's changed code, merging and deduplicating their findings. - Charter-bound filtering: Validates every refactor proposal against CHARTER.md and the ACs/specs contract, rejecting violations before they reach the human. - Graceful breaking changes: Classifies changes as consumer-facing or internal, introducing deprecation-marked forwarding shims and migration notes for consumer-facing shapes. - Use Case: After ATDD produces passing code for a feature, run the refine checkpoint to detect duplication via deterministic scanning, clean up incidental complexity, and hand off to change-risk verification with a structured summary. ## Quick Start Ask the agent to refine the code we just built for this feature and clean it up before verification.

Frequently Asked Questions about refine

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I refactor code without breaking acceptance criteria?▼

Run the refine checkpoint after tests pass. It reviews only the feature branch's changed code, filters every proposal against the charter and ACs/specs contract, re-runs both test streams after applying changes, and reverts any proposal that fails.

What does the refine checkpoint do in a spec-driven pipeline?▼

It dispatches three parallel review subagents covering reuse, quality, and efficiency over the changed code, consolidates findings, filters them against the project charter, lets the human pick proposals, applies them, and emits a handoff to risk verification.

How are breaking changes handled during refactoring?▼

Consumer-facing changes get a graceful path: a deprecation-marked forwarding shim plus a migration note, with the new shape introduced alongside the old. Internal-only changes can be applied directly.

When should I not use this refactoring workflow?▼

Do not use it to change behavior (use feature-edit), for risk analysis (use crap-analyzer), or on code that is not yet implemented and green. It also requires the prior checkpoint to be complete before starting.

Does the duplicate detection require external tools?▼

The deterministic duplicate scan is optional. If the backend tool is unavailable, skipped, or errors, the Reuse subagent proceeds with its own LLM-based judgment and the status is surfaced in its prompt.