Guides  /  Rollout and delivery

What stops code from drifting away from what was specified?

Answer

Every change is checked against the specification before it merges. A change that contradicts the specification is refused while its author is still working on it.

Akka Specify makes the specification the artifact each change is verified against. The specification and the code cannot separate, because a change that leaves the specification never lands.

The mechanism

Drift accumulates one accepted change at a time.

A specification written at the start of a project describes the system as it was designed. Changes then arrive at the pace of the business. Each change is small and reasonable on its own. Each is written by someone who has not read the document.

Nobody decides to abandon the specification. The document ages while the code moves, and within a few quarters the two describe different systems. The specification is then treated as history, and the code becomes the only account of what the system does.

WITHOUT THE CHECK the specification the code WITH THE CHECK the specification refused and returned to its author
What the check reads

A change is compared against the requirement it touches.

The functional requirementWhat the system is supposed to do. A change that alters behaviour the specification fixed is refused.
The risk envelopeThe safeguards the system must enforce. Removing a guardrail binding fails the check even when the code compiles.
The operational envelopeService level, regions, latency and token budget. A change that breaks the deployment topology those set is caught before release.
The traceability linkEach generated artifact carries the line of specification that required it, so the check knows which requirement a file answers to.
Where the check runs

The check runs at the point the change is written.

Akka Specify runs inside the repositories, CI systems and AI coding assistants a team already uses. A developer sees the refusal in the editor, and the same check runs again on the branch in CI.

A build-and-deploy gate then runs the evaluation suite and fails the deploy when the signed control set is unmet. The gate produces a versioned, hash-chained report, so a refusal is a record an auditor can read.

Questions

Related questions.

What happens when the specification is the thing that is wrong?

The specification is edited first and the code change follows it. Editing a requirement is an explicit act with an author, a reviewer and a record.

Does this slow down an urgent change?

The check runs at the speed of the build. An urgent change that agrees with the specification passes without a person in the loop, and one that contradicts it names the requirement it broke.

What about code written before the specification existed?

A specification written against what an existing system is meant to do makes the gap visible on the first check. Every requirement the running code does not meet is reported.

Can a team grant itself an exception?

An exception is written into the specification, where it carries an author and a scope. The exception stays attached to the system for as long as it applies. An exception granted verbally in a review leaves no trace once the reviewer moves on.

How is this different from a linter or a policy-as-code rule?

A linter checks the shape of the code against rules about code. The specification states what the system is for, which regions it runs in and what it must never do, and the check compares the change against that.

On Akka. Specification-checked change is a capability of Akka Specify. Build-time deploy gates and hash-chained reports are capabilities of Akka Verify.