<!-- AUTO-GENERATED by task packs:render -- DO NOT EDIT MANUALLY -->
<!-- Purpose: rendered skill -->
<!-- Source of truth: packs/skills/skills-pack-0.1.json -->
<!-- Regenerate with: task packs:render -->
<!-- Edit the source, not this file. Slice instead of loading every SKILL.md: task packs:slice skills by-trigger --trigger <kw> (or list) -->
Deft Directive Interview
Deterministic interview loop that any skill can invoke to gather structured user input.
Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
When to Use
- Another skill needs to gather structured input from the user (e.g. deft-directive-setup Phase 1/Phase 2)
- User says "interview loop", "q&a loop", or "run interview loop"
- A workflow requires a series of focused questions with explicit defaults and confirmation before proceeding
Interview Loop
Rule 1: One Question Per Turn
! Ask ONE focused question per step. After the user answers, send the NEXT question in a new message. Repeat until all questions for the current interview are answered.
- ⊗ Include two or more questions in the same message under any circumstances
- ⊗ List upcoming questions -- only show the current one
- ⊗ Combine the current question with a summary of previous answers unless explicitly at the confirmation gate
- ! Progress checkpoints (#5353) coexist with these forbids: emit them as Rule 2 agent-initiated non-choice status updates (see Progress Checkpoints). Inventory labels are allowed; concrete upcoming question text is not. A status statement is not a prior-answer summary.
Rule 2: Numbered Options with Stated Default
! Every question MUST present numbered answer options. Exactly one option MUST be marked as the default using the [default: N] notation inline.
Example:
Which deployment platform?
0. Discuss with agent (pause interview to talk it through)
─────────────────────────────────────────────────────────
1. Cross-platform (Linux / macOS / Windows)
2. Web / Cloud [default: 2]
3. Embedded / low-resource
4. Other / I don't know
Enter confirm / b back / 0 discuss
- ! The default MUST be stated inline with the option (e.g.
[default: 2]), not in a separate line or footnote - ! If no option is objectively better, pick the most common choice and mark it as default
- ! Option
0. Discuss with agentMUST appear in slot 0 at the top of the options block, visually separated from the numbered answer options (e.g. by a horizontal rule or blank line) so it is not confused withOther / I don't know - ! A persistent one-line legend MUST appear directly under the options block on every question (see Rule 11)
Always-Structured Rendering (Option A)
! EVERY user-facing question MUST render via the structured question tool: click-commit on hosts that have one (e.g. Warp ask_user_question); plain-text with typed response otherwise. The agent MUST NOT emit a user-facing question as conversational prose regardless of whether the final answer content is enumerable or freeform. This is the Option A always-structured rendering rule (#478).
! Host-portable numeric labels (#1563). For deterministic menus, a structured question tool satisfies this rule only when it visibly preserves each canonical numeric option label (for example, 1. Web / Cloud) and returns the numeric selection or exact displayed option text. If the host UI may replace numbers with alphabetic affordances, unlabeled buttons, or any non-canonical choice labels, render the numbered menu in chat with typed response instead. Fallback chat replies map only to the displayed number or exact displayed option text; do not infer from host-added letters unless those letters were actually displayed.
! Freeform answer collection, when needed, MUST be a two-step flow:
- Structured-tool call with options such as
[Draft for me (I'll propose content) / Write my own / Defer / Discuss / Back]. - If the user picks "Write my own", a follow-up plain-text prompt collects the freeform content. The prompt itself is a non-question status message ("Type your answer below.") -- the enumerable path choice has already been captured by the structured tool.
! The ONLY permissible plain-text-to-user emissions are:
- The Rule 6 Confirmation Gate (typed plain-text commit, see Rule 6's Click-Commit Hosts subsection).
- Agent-initiated status updates that do NOT ask the user to choose anything (e.g. "Files written. Next I'll read X.").
- ⊗ Emit a user-facing question outside a structured-tool call because the answer content is prose, because a preamble is long, because the question "feels conversational," or because the prior question was plain-text. None of those are valid reasons.
- ⊗ Present a user-facing choice as plain-text prose when a structured question tool is available on the host.
Click-Commit Rendering
! When the host's structured question tool is single-shot / click-commit (the tool returns the user's selection atomically with no separate Enter step -- e.g. Warp ask_user_question), Rules 8, 9, and 10 MUST be rendered as explicit clickable options in the options list on every applicable question. The Enter confirm / b back / 0 discuss keystroke legend from Rule 11 is a plain-text-mode affordance only.
Click-commit options block shape:
[ Back -- revisit step N-1 ]
[ Discuss with agent (pause interview) ]
----------------------------------------
[ Answer option 1 ]
[ Answer option 2 [default] ]
[ Answer option 3 ]
[ Other / I don't know ]
- !
BackMUST appear on every question EXCEPT the first (nothing to go back to). PickingBackreturns to question N-1 with its previously captured answer displayed. - !
Discuss with agentMUST appear on every question. Picking it enters Rule 10 freeform mode; the agent MUST re-render the same question after the discussion resolves. - ! Answer options MUST render with the default marker (e.g.
[default]appended to the option label) since the[default: N]inline notation is not rendered by most click-commit tools. - ⊗ Omit
Backon any question except the first. - ⊗ Omit
Discuss with agenton any question. - ⊗ Treat a click-commit tool's returned selection as a Rule-8 confirmed commit. Click-commit tools do NOT satisfy Rule 8 -- there is no keyboard Enter step, so the click is both selection and commit. The Rule 6 Confirmation Gate (rendered as plain-text typed commit on click-commit hosts) provides the only typed-commit step in the flow.
Preamble Placement
~ Explanatory preamble (context, consequences, what-happens-next) MAY appear as plain markdown ABOVE the structured-tool call. The question itself -- the sentence that asks for a decision -- MUST be encoded in the structured tool's question field, and the enumerable options MUST be encoded in the tool's options field.
- ⊗ Render a user-facing question as plain-text because you wanted to include preamble -- preamble belongs above the tool call, not instead of it.
Progress Checkpoints (#5353)
! Require appropriately timed, concise progress checkpoints during multi-topic and adaptive interviews. Each checkpoint MUST cover: current phase, remaining material decision areas, accepted deferrals, and reasons for runtime additions. A status statement is not a batch of questions and is not a prior-answer summary.
Coexistence with Rule 1
! Emit checkpoints as Rule 2 Always-Structured agent-initiated status updates that do NOT ask the user to choose anything. Do not invent a third plain-text emission class.
! Turn shape: Prefer a separate status message immediately before the next structured question. If a checkpoint shares a turn with a question, it MUST be non-choice status prose ABOVE the structured-tool call (outside the tool question field), with exactly one structured question inside the tool (no second question; no upcoming concrete question list).
! Inventory labels vs upcoming questions: Remaining-scope text MAY name decision-area / inventory labels. It MUST NOT enumerate concrete upcoming question text. Rule 1 ⊗ List upcoming questions stays.
Decision inventory + closed triggers
! Maintain a session-local decision inventory = calling-skill required/optional fields plus runtime deferred/added entries. Each runtime addition carries a reason; each accepted deferral is recorded.
! Emit a progress checkpoint at these closed triggers only (no every-turn default):
- phase entry / phase exit (including setup Phase 1/2/3 boundaries when those skills own the loop)
- after a material decision-area is added to the inventory (runtime append of a new decision-area with reason — distinct from ordinary fill of an existing calling-skill field)
- after an accepted deferral is recorded
- before Rule 6 confirmation gate
- on operator how-much-is-left (below)
! Do not invent a fixed total before adaptive questions are known. Short interviews keep proportionate cost (no every-turn full recap).
- ⊗ Emit a checkpoint on ordinary field-fill alone
- ⊗ Invent a fixed question census before adaptive branching is known
- ⊗ Default to an every-turn full recap
How-much-is-left interrupt
! When the operator asks how much remains / remaining scope, answer as a Rule 2 status-only emission grounded in the decision inventory; then re-render the same pending question. Do not advance to the next material decision on that interrupt. Do not open Discuss unless the operator chose Discuss.
Preserve interaction constraints
! Keep one-question interaction where required, Discuss/Back, and explicit confirmation semantics (including Rule 8). Compatible with #4377 adaptive branching / sizing / confirmation; independent of #4535 menu-shape mismatch.
- ⊗ Remove Rule 8 or switch to yolo as the remedy for progress visibility
Acceptance / regression fixture (#5353)
! A multi-topic fixture MUST assert:
- status-only checkpoint at each closed trigger
- no upcoming concrete question list
- addition-with-reason visible on runtime inventory append
- no checkpoint on ordinary field-fill alone
- how-much-is-left → status then same-question re-render
- short path has no every-turn recap
- accepted deferrals visible
- shared-turn checkpoint prose stays outside the structured tool
questionfield
Rule 3: Explicit "Other / I Don't Know" Escape
! Every question MUST include an escape option. The last numbered option MUST be either:
- "Other (please specify)" -- for open-ended alternatives
- "I don't know" -- when the user may lack context to answer
- "Other / I don't know" -- combined form (preferred)
- ! The
Other / I don't knowescape is SEPARATE from the slot-0Discuss with agentoption (Rule 10). The two options MUST both be present and MUST NOT be merged into a single entry - ⊗ Present a question with no escape option -- the user must always have a way out
- ⊗ Use the
Other / I don't knowentry as the discuss/freeform escape -- slot 0Discuss with agentis the discuss escape (Rule 10) - ~ When the user selects the escape option, follow up with a brief open-ended prompt to capture their input or acknowledge the gap
Rule 4: Depth Gate
! Keep asking until the calling skill's required inputs are captured with sufficient specificity to generate the target artifact. On the Full material-decision contract path (#5351), "sufficient specificity" is the operator-confirmed material-decision inventory — not an open-ended "no material ambiguity remains" judgment.
Material-decision contract (#5351)
! Apply this contract when any of:
- Sizing-Gate outcome is Full (greenfield Full, or brownfield Replace that reached Sizing after confirmed scrap), or
- an operator-directed interview that has already entered Full-depth questioning (including a brownfield session that skipped Chaining but is already behaving as Full — treat as conformance debt; still apply the bound rather than invent a "Full/brownfield" compound state), or
- reopen / continuation that enters or remains in Full depth after a declared-ready state or after Rule 6 confirmation (operator explicitly escalates into Full, or the prior path was already Full).
Out of scope: Light sizing; Add-scope short path; Update/delta interview that stays delta — including short-path reopen/correction that stays on that short path. ⊗ Apply the Full material-decision inventory contract to a Light / Add-scope / delta correction solely because Rule 6 ran.
! The material-decision inventory is the depth-bound handoff surface for when questioning may stop. It carries: target deliverable, material required decisions (each with a resolution condition), approved constraints, accepted deferrals, and completion conditions. Reuse Delegation Mode required-field semantics without forcing a sub-skill invoke.
! Relation to the seven-key Full Path Output set (ProblemStatement … Overview):
- Seven-key set = output-shape narratives that must be filled for Full artifact write.
- Material-decision inventory = depth-bound for when questioning may stop.
- Rule 4 completeness reads the inventory for ask-set sufficiency; Rule 7 answers-map completeness still requires values for every caller-required key that is not legitimately deferred for this phase.
- ⊗ Ship a competing undefined second required-field list. ⊗ Reframe the existing seven-key MUST as "only SHOULD."
! Authorship / confirm / freeze:
- Agent MAY draft the inventory from conversation + pack defaults.
- Operator MUST explicitly confirm the inventory before depth-gate completion pressure applies (and before treating the ask-set as closed).
- Each inventory member is marked operator-named vs agent-derived; ⊗ invent approved constraints or accepted deferrals as if operator-approved.
- After confirm, inventory mutation uses an operator-visible boundary-change path (diff + re-confirm). ⊗ Silent agent-maximal or silent thin-then-widen inventories.
! Phase-relative sufficiency + follow-up cites:
- A decision is mandatory for this phase when leaving it unresolved would change the current deliverable's required behavior, constraints, acceptance, or feasibility.
- A choice among implementations that already satisfy those conditions need not block this phase.
- Newly discovered questions MUST (a) cite an outstanding material requirement and stay within its resolution condition, or (b) revisit an accepted deferral with operator-visible boundary change, or (c) on operator-raised or agent-discovered gap / inventory defect after declared-ready: operator-visible inventory amendment (diff) then re-confirm (agent may propose the amendment; operator MUST re-confirm before the ask-set widens).
- Routine clarification inside an existing resolution condition needs no extra approval.
! Deferrals vs handoff: Resolved / legitimately deferred-for-this-phase / still-blocking are distinct. A deferral records the unresolved decision, why it does not block this deliverable, and the later trigger — not a fabricated answers-map value. Represent deferrals in the existing handoff / working artifact. Required values remain enforced where the caller needs them now.
! Persistence on continuation: Carry target deliverable, inventory dispositions, and accepted boundary changes in the caller's working artifact / answers handoff and reload them on continuation. Requirements-phase completion and implementation readiness stay separate claims. ⊗ Reconstruct a fresh maximal inventory from "comprehensive enough to implement" on resume.
- ! If an answer introduces new ambiguity within an outstanding resolution condition, ask clarifying questions before moving on
- ! Do not truncate the interview to save time when inventory items remain unresolved or still-blocking
- ! On non-Full paths (Light / Add-scope / delta that stays delta), the calling skill still defines sufficient specificity via its required-field handoff; the Full material-decision contract does not apply unless reopened into Full depth
Rule 5: Default Acceptance
! When a question has a stated default, the user may accept it with any of the following responses:
- Bare enter / empty response
- "yes", "y", "ok", "default", "keep"
! When the user types the default option number (e.g. "2"), this is treated as a numeric selection — Rule 8 applies (echo selection, wait for confirmation). It is NOT treated as a bare acceptance like "yes" or Enter.
! Do NOT re-ask the question when the user accepts the default via a non-numeric response. Record the default value and proceed to the next question.
- ⊗ Re-ask a question because the user's acceptance was "too brief" -- any of the listed responses is a valid acceptance
- ⊗ Interpret an empty response as a refusal or skip
Rule 6: Confirmation Gate
! After ALL questions are answered (depth gate satisfied), display a summary of ALL captured answers in a clearly formatted list and require explicit yes/no confirmation before proceeding.
Format:
Here are the values I captured:
- **Field 1**: value
- **Field 2**: value
- **Field 3**: value
...
Confirm these values? (yes / no)
- ! Accept only explicit affirmative responses (
yes,confirmed,approve) -- reject vague responses (proceed,do it,go ahead) - ~ Note: The confirmation gate is intentionally stricter than Rule 5 (default-acceptance). Rule 5 accepts casual responses like
okfor individual question defaults because the cost of a wrong default is low (one field, correctable at the confirmation gate). The confirmation gate guards the entire artifact -- acceptingokhere risks generating artifacts from auto-filled or misunderstood values. This asymmetry is by design. - ! If the user says
no: ask which values to correct, re-ask those specific questions only (do not restart the full interview), then re-display the updated summary and re-confirm - ! On the Full material-decision contract path (#5351): the confirmation summary MUST list each inventory item as decided / deferred-with-permit / out-of-phase; require explicit affirm; ⊗ treat artifact write success alone as completion
- ! Post-gate reopen / continuation after declared-ready uses the same re-ask-those-specific-questions bound, extended by Rule 4 inventory cite/amend branch (c) for operator-raised or agent-discovered gaps — ⊗ reopen unbounded Full questioning from a declared-ready state without inventory amendment + re-confirm
- ! If any value appears to be auto-generated filler (repeated default text, placeholder strings, or values that echo the question prompt), warn the user explicitly before confirming
- ⊗ Proceed to artifact generation without displaying the summary and receiving explicit confirmation
Click-Commit Hosts: Plain-Text Confirmation Gate
! When the host's structured question tool is click-commit, the Confirmation Gate MUST be rendered as plain-text requiring a typed response (yes / no / back / discuss). It MUST NOT be rendered via the click-commit structured tool.
- ! Accept only explicit affirmative tokens (
yes,confirmed,approve) per the existing Rule 6 strictness. Reject click-level tokens and vague responses (ok,proceed,do it). - ! The typed commit provides the Enter-confirm semantic that Rule 8 was written to guarantee. This is the only place in the click-commit flow where a true commit step exists.
- ⊗ Render the Confirmation Gate via a click-commit structured tool -- this removes the last safeguard against misclicks on the final answer.
Mode Restore After the Gate
! After the Rule 6 Confirmation Gate commits (user typed an affirmative token), the plain-text rendering mode is RELEASED. The next user-facing question MUST return to structured-tool rendering (click-commit on hosts that have one; plain-text with typed response otherwise, per Rule 2's Always-Structured Rendering). The plain-text gate does NOT establish a sticky mode for subsequent prompts.
- ⊗ Render the next user-facing question as plain-text conversational prose because the Rule 6 Gate was just in plain-text mode.
Rule 7: Structured Handoff Contract
! When the interview is complete (confirmation gate passed), the skill exits with an answers map -- a structured key-value representation of all captured answers that the calling skill uses to generate artifacts.
The answers map format:
{
"field_1": "captured value",
"field_2": "captured value",
"field_3": ["list", "if", "multi-select"],
...
}
- ! The calling skill defines the expected keys in its invocation of deft-directive-interview
- ! The answers map MUST contain a value for every required key defined by the calling skill that is not legitimately deferred for this phase under the Full material-decision contract (#5351)
- ! Keys legitimately deferred for this phase MUST NOT be fabricated as placeholder answers-map values; record them as accepted deferrals in the inventory / working-artifact handoff instead
- ! Optional keys may be omitted if the user did not provide input and no default was applicable
- ~ The calling skill is responsible for validating the answers map against its own schema and requesting re-interview for any missing or invalid (non-deferred) fields
Output Targets
Interview output writes to the authority selected by the calling skill. Greenfield setup writes project-level narratives to xbrief/PROJECT-DEFINITION.xbrief.json and implementation requirements to lifecycle scope xBRIEFs in xbrief/proposed/; it does not create xbrief/specification.xbrief.json. A caller that explicitly owns a full-spec workflow may target the compatibility specification artifact. PRD.md is never authoritative. New xBRIEFs target the current v0.8 schema; see