# Contract-First Refactoring

Use this featured profile for compatibility-sensitive migrations and refactors. Sonnet owns the immutable contract and production changes; MiniMax mines repository-wide constraints; Luna creates a test-only isolated patch; DeepSeek independently verifies the final result.

The root freezes and hashes the normalized contract before downstream work. Test patches require explicit acceptance and integration, production source remains root-owned, and verification must cite the same contract hash. This differs from ordinary review by separating specification, tests, implementation, and compliance evidence.

Every worker is a persistent supervised Unix app-server thread with strict retained results, goal/turn lifecycle, and warning-only stalls. The root controls all three; the compatibility verifier may steer or return the test author for correction but cannot accept or integrate that patch. Suspension preserves exact contract evidence, terminal history, trace, and the isolated test patch for deliberate continuation.
