v0.20.0 — Plan-stage clarifications
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 parksstate.jsonatawaiting_clarification. - Reuse on re-run keyed by capture artifact path + question target section. Prior
chosen/customresolutions 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.jsongains a new acceptedstatusvalueawaiting_clarificationand an optionalclarifications_artifactfield.schema_versionunchanged. - New artifact path:
.bender/artifacts/plan/clarifications-<timestamp>.md. Shares the plan-set timestamp so/plan confirmflips 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 additiveTypeconstants + payload requirements.internal/session/{state,validate}.go— new status + optional field.