← Back to journal

Move the Declaration Without Rewriting Its Body

How a narrow refactor contract reduces the number of things a verifier must justify.

Evidence basisKalu, Korpus, and frozen Ushman source/docs snapshot reviewed September 17, 2026; no new runtime qualification performed
DisclosureResearch and architecture note. KodeProof development is frozen; this is not a release announcement.
Published by Kalu KodeApply for KodeProof private alpha →

Scope: Research and architecture note. KodeProof development is frozen; this is not a release announcement.

A refactor can change location, imports, initialization order, and implementation at the same time. That makes the result difficult to evaluate because several independent questions have been bundled into one diff.

KodeProof’s current bounded path moves complete declarations while preserving their bodies byte-for-byte. Development is frozen, so this article describes retained source-level research rather than an active release.

Reduce the proposed change before proving it

In a synthetic module split, moving a helper and simultaneously rewriting its algorithm creates two different obligations. The location change affects resolution and order; the implementation change affects behavior directly.

A byte-preserving declaration move does not eliminate all risk, but it avoids claiming both transformations at once. The verifier can focus on placement, imports, protected entrypoints, comments, state closure, and runtime order under the supported rules.

The surrounding relationships still matter

Existing exported entrypoints remain anchored at their original path. Imported-binding consumers can move only with an authenticated acyclic local dependency closure and deterministic import rebasing. Private mutable state needs its writers and ordering obligations preserved.

Unknown initialization effects, ambiguous comment attachment, unsupported directives, and unresolved bindings can refuse. Valid syntax is not enough to make those relationships safe.

Do not use the narrow contract as a universal proof claim

A declaration body can remain identical while the program changes because it executes earlier or resolves a different dependency. That is why byte preservation is one condition among several, not a complete behavioral argument.

The source also distinguishes this complete-declaration path from unfinished lexical-block extraction work. The existence of a related research checkpoint does not make that broader transformation an active command.

For a reviewer, a narrow intent is easier to challenge. Which declarations moved? Which stayed anchored? Which imports changed? What evidence preserves initialization order? Those questions are more useful than asking whether a large diff “looks like a refactor.”

The lesson for recovery is similar: change one justified boundary at a time. A transformation becomes more accountable when the product deliberately avoids claiming authority over changes it did not need to make.