← Agent workflows guides

How to stop an agent when the spec is ambiguous

How-To Agent workflows Intermediate 1041012HOWTO-1041012

HOWTO-1041012Agent workflowsIntermediate

This guide shows you how to stop an agent when the governing SpecDD spec is ambiguous in a spec-driven development workflow.

Stopping is part of the workflow. If the spec does not grant enough authority or does not define the behavior, the right move is to pause, make the missing decision visible, update the spec, and resume from the reviewed contract.

Short answer

When an agent finds ambiguity, do not let it guess. Ask it to identify the unresolved decision, mark or add a decision-needed task when appropriate, update the spec after human review, and resume with a separate implementation prompt.

When to use this guide

Use this guide when:

Steps

1. Recognize ambiguity early

Ambiguity may show up as:

Example:

Tasks:
  [?] Decide whether duplicate places are allowed on the same day.

The [?] state means implementation should not silently choose a rule.

2. Pause implementation

Use:

List the unresolved Itinerary decisions.

If files have already changed, review the diff carefully and decide whether to keep, revise, or discard those edits through your normal workflow. Do not mark the task complete while the governing decision is open.

3. Classify the ambiguity

The fix depends on the problem:

AmbiguitySpecDD response
missing writable authorityadd or revise Can modify or Owns
missing behavioradd a Must, Done when, or Scenario
unclear non-goaladd Must not
forbidden dependency questionadd or revise Forbids
outside context neededadd References or Can read
human decision requireduse a [?] task until resolved

4. Record the decision needed

If the decision is not ready, keep it in Tasks:

Tasks:
  [?] Decide whether duplicate places are allowed on the same day.

If work is blocked on external information, use:

Tasks:
  [!] Confirm storage retry policy.

These states preserve the reason implementation stopped.

5. Update the spec after review

Once the decision is made, update the relevant rule:

Must:
  A place can appear only once on the same trip day.

Done when:
  Duplicate-place behavior is covered by a check.

Scenario: duplicate place on same day
  Given the itinerary already contains "Louvre Museum" for June 12
  When "Louvre Museum" is added again for June 12
  Then validation fails
  And the itinerary keeps one entry for June 12

Use:

Update the Itinerary spec with the approved duplicate-place rule.

6. Resume with a bounded prompt

After the spec is reviewed:

Plan the duplicate-place validation change.

Then:

Implement the approved duplicate-place validation plan.

Do not resume from the old ambiguous instruction. Resume from the updated contract.

Common mistakes

How to verify the result

Ambiguity was handled correctly when:

← Agent workflows guides