10.4 Separating "spec" from "conversation"

Overview and links for this section of the guide.

Why spec and conversation get mixed (and why it hurts)

In fast iteration, you chat, brainstorm, change your mind, and refine requirements. That’s normal. The problem is when the model treats every sentence of that conversation as a binding requirement.

This creates drift:

  • old constraints linger and conflict with new ones,
  • the model “remembers” a casual idea as a requirement,
  • you forget what was agreed and what was just brainstorming.
The fix

Separate the authoritative spec from the conversation and keep it stable.

The principle: one authoritative spec block

Maintain a single “spec block” that you treat as the source of truth. Everything else is discussion.

In practice, that means:

  • you paste the spec block at the top of the task prompt,
  • you update it deliberately when requirements change,
  • you instruct the model to ignore earlier conversation if it conflicts with the spec block.
The spec block is “context you control”

This is one of the strongest anti-drift tools you have. It keeps the loop fast and prevents instruction accumulation.

A reusable spec block template

SPEC (authoritative)

Goal:
[One sentence.]

Constraints:
- Language/runtime: [...]
- Dependencies: allowed [...], forbidden [...]
- Files in scope: [...]
- Non-scope: [...]
- Style: [...]
- Safety: no secrets; no unsafe dynamic execution; safe logging

Acceptance criteria:
- [...]

Output requirements:
- For code changes: diff-only
- Keep diffs small; plan first for non-trivial tasks

END SPEC

Then you add a separate section for conversation notes if needed:

NOTES (non-authoritative)
- [brainstorming ideas]
- [optional future work]
- [questions]

How to iterate without drifting

When you iterate:

  1. Update the spec block first (if requirements changed).
  2. Ask the model to restate assumptions and confirm constraints.
  3. Ask for a plan, then implement in small diffs.
  4. Run verification and paste evidence back.

This keeps iteration fast because each loop starts from an aligned, compact state.

Handoffs and context resets

When switching models or restarting a session, the spec block becomes your handoff packet. Paste:

  • the spec block,
  • the minimal relevant code slice,
  • the current failing output (if debugging).

This avoids re-pasting entire chat history and prevents confusion.

Don’t let chat history become your spec

Chat history is messy. Specs are crisp. Keep them separate.

Where to go next