How-To Refactoring and maintenance 115HOWTO-115

Refactoring and maintenance

Refactoring and maintenance guides for SpecDD projects. These articles show how to preserve behavior while changing structure, keep local specs aligned with moved code, split and extract modules safely, retire obsolete specs, and remove dead code without leaving stale contracts behind.

← All How-To categories

9 guides Refactoring and maintenance
  1. Intermediate 4 min read
    How to refactor with SpecDD

    Use SpecDD to make refactoring behavior-preserving: define the contract first, work inside authority, and update specs only when structure or ownership changes.

    Read guide
  2. Intermediate 3 min read
    How to refactor with agents safely

    Use SpecDD to keep agent-assisted refactors small, behavior-preserving, authorized, and verifiable.

    Read guide
  3. Intermediate 3 min read
    How to update specs during refactoring

    Keep specs accurate during refactors without inventing behavior changes: update structural sections, path references, tasks, and checks with the code.

    Read guide
  4. Intermediate 4 min read
    How to retire obsolete specs

    Remove obsolete specs only after confirming their behavior, ownership, references, tasks, and inherited constraints are no longer active.

    Read guide
  5. Intermediate 4 min read
    How to split modules with local specs

    Use local specs to divide a large module into smaller owned units without losing authority, inherited boundaries, or tests.

    Read guide
  6. Intermediate 3 min read
    How to move code without losing spec authority

    Keep moved files governed by the right specs: update ownership, same-basename specs, references, paths, tests, and validation with the code move.

    Read guide
  7. Advanced 3 min read
    How to extract a module with SpecDD

    Use SpecDD to turn module extraction into a reviewed sequence: capture behavior, define the new owner, move code and tests, and preserve contracts.

    Read guide
  8. Intermediate 3 min read
    How to rename or move files without breaking spec resolution

    Use a practical SpecDD file-move checklist for same-basename specs, explicit paths, references, case-sensitive names, content roots, and linting.

    Read guide
  9. Intermediate 4 min read
    How to remove dead code with SpecDD

    Use SpecDD to delete dead code without deleting live behavior: trace authority, update or remove specs, adjust tests, and verify nothing still depends on it.

    Read guide

More How-To categories