# Refactoring vs Release It!

Status: reviewed
Research basis: mini-only

Verdict: ✅ Complementary

Conflict: 12%
Overlap: 38%
Complementarity: 78%

## Loading Decision

Use together when changing existing code: one rule set controls safe change sequencing while the other defines the target design, construction, architecture, data, or production quality.

## Book A Pressure

- Refactoring should drive tasks where behavior-preserving structural change and current-smell scope control dominate.
- Evidence: `refactoring/refactoring.mini.md` lines 3-5: applies when changing existing code, preparing a feature/bug fix, reviewing cleanup, or reducing structural friction without changing observable behavior.

## Book B Pressure

- Release It! should drive tasks where production failure semantics, demand limits, timeouts, retries, isolation, observability, and recovery dominate.
- Evidence: `release-it/release-it.mini.md` lines 3-5: applies to services, APIs, jobs, queues, deployment paths, control tooling, and critical flows that must survive production failures and operational mistakes.

## Complementary Forces

- Claim: Refactoring contributes behavior-preserving, small-step, test-backed refactoring pressure; Release It! contributes production-failure, demand-limit, timeout, retry, isolation, observability, and recovery pressure. Together they are useful only where both scopes are active.
- Evidence:
  - `refactoring/refactoring.mini.md` lines 30-39: fires on structural friction before features, unclear bug code, absent tests, third duplication, mixed responsibilities, shotgun surgery, repeated conditionals, UI/domain mixing, patch intent mixing, and rewrite temptation.
  - `release-it/release-it.mini.md` lines 13-27: requires production failure assumptions, visible failure/limited blast radius/load shedding, operational concerns as part of the system, explicit time limits, safe bounded retries, isolation patterns, overload behavior, stability patterns, validated runtime/operational state, scarce-resource budgeting, untrusted external input, boundary observability, safe operational controls, production-aware interconnects/jobs/caches/contracts, security and bounded chaos/disaster testing.

## Overlap

- Claim: They overlap where both affect safe existing-code change, tests, behavior preservation, ownership, and stopping before speculative cleanup; the overlap score reflects how often an agent would receive similar pressure from both.
- Evidence:
  - `refactoring/refactoring.mini.md` lines 43-49: checks behavior preservation, separated structural/behavior/test updates, safety net, real friction removed, clearer ownership/control/data/interfaces, reviewable runnable patch, and stopped cleanup.
  - `release-it/release-it.mini.md` lines 41-48: checks timeouts, retry safety, bounded queues/pools/payloads, failure isolation, validated external inputs, diagnostic coverage, recoverable operational controls, and explicit production failure behavior.

## Conflicts

- Claim: The tension is scope creep: design or architecture improvements must not override behavior preservation, characterization, or the current-smell stop condition.
- Evidence:
  - `refactoring/refactoring.mini.md` lines 7-9: corrects cleanup turning into rewrite, hidden feature change, or speculative architecture.
  - `release-it/release-it.mini.md` lines 7-9: corrects happy-path production readiness by requiring failure semantics, demand limits, isolation, recovery, and diagnosis surfaces.

## Use Together When

- Use together when existing code must be reshaped toward Release It! goals without changing observable behavior or turning cleanup into redesign.

## Prefer One When

- Prefer the refactoring rule set when observable behavior must stay unchanged; prefer the other book when designing new behavior rather than reshaping existing structure.

## Source Basis

- `refactoring/refactoring.mini.md` lines 3-5: applies when changing existing code, preparing a feature/bug fix, reviewing cleanup, or reducing structural friction without changing observable behavior.
- `refactoring/refactoring.mini.md` lines 7-9: corrects cleanup turning into rewrite, hidden feature change, or speculative architecture.
- `refactoring/refactoring.mini.md` lines 30-39: fires on structural friction before features, unclear bug code, absent tests, third duplication, mixed responsibilities, shotgun surgery, repeated conditionals, UI/domain mixing, patch intent mixing, and rewrite temptation.
- `refactoring/refactoring.mini.md` lines 43-49: checks behavior preservation, separated structural/behavior/test updates, safety net, real friction removed, clearer ownership/control/data/interfaces, reviewable runnable patch, and stopped cleanup.
- `release-it/release-it.mini.md` lines 3-5: applies to services, APIs, jobs, queues, deployment paths, control tooling, and critical flows that must survive production failures and operational mistakes.
- `release-it/release-it.mini.md` lines 7-9: corrects happy-path production readiness by requiring failure semantics, demand limits, isolation, recovery, and diagnosis surfaces.
- `release-it/release-it.mini.md` lines 13-27: requires production failure assumptions, visible failure/limited blast radius/load shedding, operational concerns as part of the system, explicit time limits, safe bounded retries, isolation patterns, overload behavior, stability patterns, validated runtime/operational state, scarce-resource budgeting, untrusted external input, boundary observability, safe operational controls, production-aware interconnects/jobs/caches/contracts, security and bounded chaos/disaster testing.
- `release-it/release-it.mini.md` lines 41-48: checks timeouts, retry safety, bounded queues/pools/payloads, failure isolation, validated external inputs, diagnostic coverage, recoverable operational controls, and explicit production failure behavior.

## Review Notes

- External context was not used as decisive evidence for Refactoring vs Release It!; the verdict is based on the cited local `mini` line ranges.
