Skip to content

v0.20.0 — Plan-stage clarifications

Choose a tag to compare

@mayckol mayckol released this 19 Apr 23:08

What's new

bender clarify subcommand + new internal/clarification package.

The /plan flow now detects unresolved decision points after the spec draft and asks the practitioner up to 3 prioritized multiple-choice questions before producing the rest of the plan set. Mirrors the spec-kit /clarify UX inside /plan.

Highlights

  • Interactive prompt (huh-driven) with A–D options, Custom free-form, and Skip.
  • Non-interactive mode — auto-detected when no TTY, or via --non-interactive / BENDER_NONINTERACTIVE=1. Pending entries land in the artifact.
  • Strict non-interactive (--strict / BENDER_CLARIFICATIONS_STRICT=1) exits 2 and parks state.json at awaiting_clarification.
  • Reuse on re-run keyed by capture artifact path + question target section. Prior chosen/custom resolutions carry forward, no re-prompt.
  • Spec rewrite — answered resolutions replace [NEEDS CLARIFICATION: …] markers in the spec draft in place; the original question + answer remain traceable in the clarifications artifact.

Wire-protocol additions (additive, no breaking changes)

  • Three new event types: clarifications_requested, clarifications_resolved, clarifications_pending — same v1 envelope.
  • Session state.json gains a new accepted status value awaiting_clarification and an optional clarifications_artifact field. schema_version unchanged.
  • New artifact path: .bender/artifacts/plan/clarifications-<timestamp>.md. Shares the plan-set timestamp so /plan confirm flips it atomically.

Files

  • cmd/bender/clarify.go — Cobra subcommand.
  • internal/clarification/ — Batch/Question/Resolution types, Marshal/Unmarshal, prompt, reuse, spec_apply, runner, non-interactive helper, event builder.
  • internal/event/{event,payload}.go — three additive Type constants + payload requirements.
  • internal/session/{state,validate}.go — new status + optional field.