# Moves and renames

> A move is a manual identity migration: it is done by hand, one container at a time, with the gate green between each, and it opens with impact analysis over…

Page: Methodology · Verify
Canonical: https://banes-lab.com/disciplined-methodology/verify#moves-and-renames

This section is stop 48 of 102 in the learning route. Previous: [33 - Documentation is code](https://banes-lab.com/disciplined-methodology/verify/documentation-is-code.md). Next: [35 - Coverage is derived](https://banes-lab.com/disciplined-methodology/verify/coverage-is-derived.md).

A move is a [manual identity migration](https://banes-lab.com/records/arch/manual-identity-migration.md): it is done by hand, one container at a time, with the gate green between each, and it opens with [impact analysis](https://banes-lab.com/records/arch/impact-analysis.md) over every reference, as shown in [I1·a a surviving move](https://banes-lab.com/disciplined-methodology/verify#moves-and-renames-panel-a). The references that matter most are the ones a pattern collects rather than the ones a path names. As described in [the filesystem is the architecture](https://banes-lab.com/disciplined-methodology/build/the-filesystem-is-the-architecture.md), much of the tree is collected by pattern, and a [glob-resolvable tree](https://banes-lab.com/records/arch/glob-resolvable-tree.md) is exactly what a rename tool never sees.

### Enumerate, move, verify

A rename tool reports a clean rename while the surfaces that resolve by pattern quietly go empty. A suffix changes, the collector that gathered files by that suffix now gathers nothing, and everything downstream passes because nothing is left to check. A surface resolved by pattern holds no literal path that a rewrite could touch.

For this reason a move starts with an enumeration and ends with a [verification](https://banes-lab.com/records/arch/verification.md), and a count checks every surface that resolves by pattern. The rename tool's speed is traded for literal edits that a search can verify. In practice, every reference is enumerated before the move, including the ones resolved by pattern. Files are moved and renamed by hand, one container at a time, and every importer is updated by hand as well. A structural rewrite lands as a draft beside the live file, with a published migration map, and the original is deleted only after approval.

To check this, compare what each pattern-based surface collects before and after the move. Any set that shrank without explanation is a broken move that the tool would have called clean. A throwaway script can move whatever it likes. The discipline applies to code that something else depends on. A rename is also a create at its destination, so the destination is read before the write, because attention tends to stay on the source.

Nothing is dropped without a record. A restructure produces a migration map listing every displaced block with its destination, or an explicit deletion with its reason, so content removed from one place either appears in another or is listed as deleted. Relocation is a rewrite, so it needs the same approval as rewriting the contents. A move and a delete in one step is the most destructive form, because the original is gone and nothing is left to compare the replacement against.

I1·a a surviving move

```mermaid
flowchart TB
enumerate["Enumerate every reference, the pattern-resolved ones included"]
before["Record what each collector gathers"]
move["Move and rename by hand, one container at a time"]
update["Update every importer as a literal edit"]
verify["Verify every reference with a search"]
after["Record what each collector gathers now"]
same{"Same sets?"}
clean["The gate is green · next container"]
broken["A collector went empty · the move is broken"]
enumerate --> before --> move --> update --> verify --> after --> same
same -- yes --> clean
same -- no --> broken
```

## Links to

- [Manual Identity Migration](https://banes-lab.com/records/arch/manual-identity-migration.md)
- [Impact Analysis](https://banes-lab.com/records/arch/impact-analysis.md)
- [The filesystem is the architecture](https://banes-lab.com/disciplined-methodology/build/the-filesystem-is-the-architecture.md)
- [Glob-Resolvable Tree](https://banes-lab.com/records/arch/glob-resolvable-tree.md)
- [Verification](https://banes-lab.com/records/arch/verification.md)

## Linked from

- [The filesystem is the architecture](https://banes-lab.com/disciplined-methodology/build/the-filesystem-is-the-architecture.md)
- [Placement is a grammar](https://banes-lab.com/disciplined-methodology/build/placement-is-a-grammar.md)
