SpecGraph
All posts
amendments2 September 20264 min read

Changing the spec while the coding agent is already building

Specs change mid-build. That's normal. Here's how an amendment becomes a new story, the phase re-locks, and the coding agent picks up the change on its next call over MCP.

ST

SpecGraph team

Every spec-driven workflow hits the same awkward moment. The spec is sealed, the coding agent is three stories in, and someone realises the product needs a CSV export. Or compliance flags a retention rule nobody captured. Or a stakeholder asks a question that turns out to be a missing feature.

The tempting fix is to tell the agent directly in chat. It works for an afternoon. Then the spec says one thing, the code says another, and the next person to read the pack has no idea which one is true.

We think changing the spec mid-build should be the normal case, not the exception. So we built the loop around it.

Two front doors, one outcome

There are two ways to change a spec after content is locked. An amendment is the formal route: a typed proposal against a locked phase, with a title, a rationale and the details. A wish is the collaborative route: a suggestion anyone on the project can file, which a phase owner triages and merges.

Both end in the same place. When the change adds a feature, it becomes a new feature in the spec, and the pack composer derives a new story file from it with status ready-for-dev. The sprint registry, sprint-status.yaml, updates with it.

Applying an amendment is deliberately ordered. The phase unlocks, the proposed content lands, any downstream phase that was already complete is flagged for review, and the phase locks again. Nobody has to remember to re-lock it, and nobody downstream gets to assume their part is still valid without looking.

Re-sealing without renumbering

The hard part of mid-build change is not adding the story. It is keeping every other story where it was.

Story keys derive from feature numbers. If adding a feature reshuffled those numbers, a story the agent was halfway through could quietly get a new key on the next read. The agent would be working on a story that, as far as the pack is concerned, no longer exists.

SpecGraph avoids this in two ways. New features get the next number above the highest existing one, so a fourth feature is always FR-004. And when you save the pack, each assigned number is written back onto its feature, so it stays put across every later recomposition. Once the pack is saved, keys for in-flight work don't move. You can add ten features tomorrow and reorder them, and the story the agent started this morning keeps its name.

The agent should never have to ask which version of the spec it is reading. It should only ever have to ask what's next.

How the agent finds out

This is where MCP earns its place. The coding agent doesn't read the pack once at the start and work from memory. It reads on demand. Each time it starts a story with /sg-dev, it checks the sprint status over MCP, sees the new ready-for-dev row and picks it up in order.

So if you apply an amendment while the agent is mid-story, nothing breaks:

  • The current story keeps its key and finishes as planned.
  • The new story waits in ready-for-dev until the agent is free.
  • On its next call, the agent sees the change. There is no cache to flush and no pack to re-upload.

If the new work is urgent, pass its key explicitly (/sg-dev <story-key>) and it jumps the queue.

Changes that aren't features follow the same rule with a different result. An architecture amendment appends a new decision record to the architecture document instead of rewriting the old one. The agent's next read sees both: the original decision with its rationale, and the override. We append; we don't rewrite. Stable context makes for a stable agent.

What you can do this week

  • Next time you want to tell your agent “oh, also add X”, write it down as a spec change instead. Even a three-line note with a rationale beats a chat message nobody will find again.
  • Check whether your story or ticket IDs survive reordering. If adding work shifts existing IDs, your agent and your reviewers are both working from moving targets.
  • If you use SpecGraph, run the loop once on a scratch project: propose an add-feature amendment, apply it, save the pack, and confirm the existing story keys didn't change.

Specs will change after you seal them. The only question is whether the change goes through the contract or around it.

  • amendments
  • mcp
  • agents
  • workflow

Stop vibe-coding solo.Ship with the whole org aligned.

Coding agents are fast, and they are obedient: they build exactly what the spec says. SpecGraph makes the spec worth obeying. Every department on the record, conflicts settled before code, one sealed pack your agent works from.

Request access

0%