@deftai/directive-content 0.55.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (250) hide show
  1. package/.agents/skills/deft/SKILL.md +6 -0
  2. package/.agents/skills/deft-directive-article-review/SKILL.md +11 -0
  3. package/.agents/skills/deft-directive-build/SKILL.md +10 -0
  4. package/.agents/skills/deft-directive-cost/SKILL.md +12 -0
  5. package/.agents/skills/deft-directive-debug/SKILL.md +13 -0
  6. package/.agents/skills/deft-directive-gh-arch/SKILL.md +11 -0
  7. package/.agents/skills/deft-directive-gh-slice/SKILL.md +10 -0
  8. package/.agents/skills/deft-directive-glossary/SKILL.md +10 -0
  9. package/.agents/skills/deft-directive-interview/SKILL.md +9 -0
  10. package/.agents/skills/deft-directive-pre-pr/SKILL.md +9 -0
  11. package/.agents/skills/deft-directive-refinement/SKILL.md +10 -0
  12. package/.agents/skills/deft-directive-release/SKILL.md +12 -0
  13. package/.agents/skills/deft-directive-review-cycle/SKILL.md +10 -0
  14. package/.agents/skills/deft-directive-setup/SKILL.md +10 -0
  15. package/.agents/skills/deft-directive-swarm/SKILL.md +10 -0
  16. package/.agents/skills/deft-directive-sync/SKILL.md +9 -0
  17. package/.agents/skills/deft-directive-triage/SKILL.md +9 -0
  18. package/.agents/skills/deft-directive-write-skill/SKILL.md +9 -0
  19. package/LICENSE.md +22 -0
  20. package/QUICK-START.md +167 -0
  21. package/UPGRADING.md +517 -0
  22. package/coding/build-output.md +28 -0
  23. package/coding/coding.md +235 -0
  24. package/coding/debugging.md +110 -0
  25. package/coding/holzmann.md +96 -0
  26. package/coding/hygiene.md +127 -0
  27. package/coding/security.md +158 -0
  28. package/coding/testing.md +162 -0
  29. package/coding/toolchain.md +44 -0
  30. package/commands.md +300 -0
  31. package/context/context.md +57 -0
  32. package/context/deterministic-split.md +67 -0
  33. package/context/examples.md +26 -0
  34. package/context/fractal-summaries.md +69 -0
  35. package/context/long-horizon.md +46 -0
  36. package/context/spec-deltas.md +177 -0
  37. package/context/tool-design.md +34 -0
  38. package/context/working-memory.md +62 -0
  39. package/contracts/boundary-maps.md +65 -0
  40. package/contracts/deterministic-questions.md +59 -0
  41. package/contracts/hierarchy.md +77 -0
  42. package/conventions/content-manifest.json +399 -0
  43. package/conventions/machine-generated-banner.md +130 -0
  44. package/conventions/references.md +120 -0
  45. package/conventions/rule-ownership.json +382 -0
  46. package/conventions/task-caching.md +43 -0
  47. package/conventions/vbrief-filenames.md +70 -0
  48. package/deployments/README.md +37 -0
  49. package/deployments/agentuity/README.md +138 -0
  50. package/deployments/agentuity/via-cli.md +380 -0
  51. package/deployments/agentuity/via-cloud.md +425 -0
  52. package/deployments/agentuity/via-github-actions.md +664 -0
  53. package/deployments/agentuity/via-gravity-network.md +606 -0
  54. package/deployments/agentuity/via-vpc.md +607 -0
  55. package/deployments/aws/README.md +38 -0
  56. package/deployments/aws/via-app-runner.md +612 -0
  57. package/deployments/aws/via-ecs-fargate.md +561 -0
  58. package/deployments/aws/via-elastic-beanstalk.md +628 -0
  59. package/deployments/aws/via-lambda.md +649 -0
  60. package/deployments/azure/README.md +37 -0
  61. package/deployments/azure/via-aks.md +390 -0
  62. package/deployments/azure/via-app-service.md +564 -0
  63. package/deployments/azure/via-container-apps.md +599 -0
  64. package/deployments/azure/via-functions.md +552 -0
  65. package/deployments/cloud-gov/README.md +63 -0
  66. package/deployments/cloud-gov/agents/compliance-docs.md +154 -0
  67. package/deployments/cloud-gov/agents.md +39 -0
  68. package/deployments/cloud-gov/cicd.md +64 -0
  69. package/deployments/cloud-gov/deployment.md +150 -0
  70. package/deployments/cloud-gov/logging.md +43 -0
  71. package/deployments/cloud-gov/manifest.md +121 -0
  72. package/deployments/cloud-gov/overview.md +58 -0
  73. package/deployments/cloud-gov/security.md +46 -0
  74. package/deployments/cloud-gov/services.md +72 -0
  75. package/deployments/cloud-gov/upstream/README.md +18 -0
  76. package/deployments/cloudflare/README.md +33 -0
  77. package/deployments/cloudflare/via-dashboard.md +83 -0
  78. package/deployments/cloudflare/via-git.md +90 -0
  79. package/deployments/cloudflare/via-github-actions.md +185 -0
  80. package/deployments/cloudflare/via-terraform.md +157 -0
  81. package/deployments/cloudflare/via-wrangler.md +165 -0
  82. package/deployments/fly-io/README.md +37 -0
  83. package/deployments/fly-io/via-dockerfile.md +648 -0
  84. package/deployments/fly-io/via-flyctl.md +653 -0
  85. package/deployments/fly-io/via-github-actions.md +695 -0
  86. package/deployments/fly-io/via-multi-region.md +598 -0
  87. package/deployments/google/README.md +34 -0
  88. package/deployments/google/via-app-engine.md +42 -0
  89. package/deployments/google/via-cloud-functions.md +23 -0
  90. package/deployments/google/via-cloud-run.md +330 -0
  91. package/deployments/google/via-gke.md +23 -0
  92. package/deployments/netlify/README.md +99 -0
  93. package/deployments/netlify/via-cli.md +17 -0
  94. package/deployments/netlify/via-functions.md +19 -0
  95. package/deployments/netlify/via-git.md +25 -0
  96. package/deployments/vercel/README.md +90 -0
  97. package/deployments/vercel/via-api.md +16 -0
  98. package/deployments/vercel/via-cli.md +17 -0
  99. package/deployments/vercel/via-git.md +24 -0
  100. package/docs/BROWNFIELD.md +179 -0
  101. package/docs/getting-started.md +137 -0
  102. package/docs/good-agents-md.md +137 -0
  103. package/events/README.md +89 -0
  104. package/events/event-record.schema.json +26 -0
  105. package/events/registry.json +166 -0
  106. package/events/registry.schema.json +71 -0
  107. package/glossary.md +145 -0
  108. package/incidents/README.md +81 -0
  109. package/incidents/_template.md +38 -0
  110. package/interfaces/cli.md +104 -0
  111. package/interfaces/rest.md +212 -0
  112. package/interfaces/tui.md +242 -0
  113. package/interfaces/web.md +123 -0
  114. package/languages/6502-DASM.md +132 -0
  115. package/languages/c.md +235 -0
  116. package/languages/commands.md +23 -0
  117. package/languages/cpp.md +132 -0
  118. package/languages/csharp.md +259 -0
  119. package/languages/dart.md +183 -0
  120. package/languages/delphi.md +218 -0
  121. package/languages/elixir.md +208 -0
  122. package/languages/go.md +78 -0
  123. package/languages/java.md +278 -0
  124. package/languages/javascript.md +163 -0
  125. package/languages/julia.md +175 -0
  126. package/languages/kotlin.md +193 -0
  127. package/languages/markdown.md +168 -0
  128. package/languages/mermaid.md +146 -0
  129. package/languages/officejs.md +392 -0
  130. package/languages/python.md +209 -0
  131. package/languages/r.md +163 -0
  132. package/languages/rust.md +216 -0
  133. package/languages/sql.md +216 -0
  134. package/languages/swift.md +153 -0
  135. package/languages/typescript.md +132 -0
  136. package/languages/vba.md +279 -0
  137. package/languages/vhdl.md +180 -0
  138. package/languages/visual-basic.md +151 -0
  139. package/languages/zig.md +196 -0
  140. package/meta/SOUL.md +27 -0
  141. package/meta/code-field.md +44 -0
  142. package/meta/morals.md +40 -0
  143. package/meta/philosophy.md +39 -0
  144. package/meta/project.md +49 -0
  145. package/meta/ralph.md +223 -0
  146. package/meta/security.md +80 -0
  147. package/meta/versioning.md +326 -0
  148. package/package.json +22 -0
  149. package/packs/lessons/lessons-pack-0.1.json +553 -0
  150. package/packs/patterns/patterns-pack-0.1.json +57 -0
  151. package/packs/rules/rules-pack-0.1.json +4767 -0
  152. package/packs/skills/skills-pack-0.1.json +262 -0
  153. package/packs/strategies/strategies-pack-0.1.json +167 -0
  154. package/packs/swarm-spec/swarm-spec-pack-0.1.json +17 -0
  155. package/patterns/executor-layer-credentials.md +227 -0
  156. package/patterns/llm-app.md +156 -0
  157. package/patterns/multi-agent.md +278 -0
  158. package/patterns/prompt-assembly-layer-ordering.md +154 -0
  159. package/patterns/role-as-overlay.md +179 -0
  160. package/platforms/2600.md +137 -0
  161. package/platforms/unity.md +329 -0
  162. package/references/composer-skill-porting.md +152 -0
  163. package/references/cost-models.md +163 -0
  164. package/references/ip-risk.md +246 -0
  165. package/references/plain-english-ux.md +275 -0
  166. package/resilience/context-pruning.md +67 -0
  167. package/resilience/continue-here.md +62 -0
  168. package/scm/changelog.md +276 -0
  169. package/scm/git.md +139 -0
  170. package/scm/github.md +265 -0
  171. package/secrets/.gitkeep +0 -0
  172. package/skills/deft-build/SKILL.md +20 -0
  173. package/skills/deft-directive-article-review/SKILL.md +156 -0
  174. package/skills/deft-directive-build/SKILL.md +302 -0
  175. package/skills/deft-directive-cost/SKILL.md +201 -0
  176. package/skills/deft-directive-debug/SKILL.md +140 -0
  177. package/skills/deft-directive-decompose/SKILL.md +96 -0
  178. package/skills/deft-directive-gh-arch/SKILL.md +160 -0
  179. package/skills/deft-directive-gh-slice/SKILL.md +199 -0
  180. package/skills/deft-directive-glossary/SKILL.md +118 -0
  181. package/skills/deft-directive-interview/SKILL.md +528 -0
  182. package/skills/deft-directive-pre-pr/SKILL.md +131 -0
  183. package/skills/deft-directive-probe/SKILL.md +127 -0
  184. package/skills/deft-directive-refinement/SKILL.md +403 -0
  185. package/skills/deft-directive-release/SKILL.md +266 -0
  186. package/skills/deft-directive-review-cycle/SKILL.md +401 -0
  187. package/skills/deft-directive-setup/SKILL.md +717 -0
  188. package/skills/deft-directive-swarm/SKILL.md +989 -0
  189. package/skills/deft-directive-sync/SKILL.md +288 -0
  190. package/skills/deft-directive-triage/SKILL.md +137 -0
  191. package/skills/deft-directive-write-skill/SKILL.md +169 -0
  192. package/skills/deft-interview/SKILL.md +16 -0
  193. package/skills/deft-pre-pr/SKILL.md +16 -0
  194. package/skills/deft-review-cycle/SKILL.md +16 -0
  195. package/skills/deft-roadmap-refresh/SKILL.md +16 -0
  196. package/skills/deft-setup/SKILL.md +20 -0
  197. package/skills/deft-swarm/SKILL.md +16 -0
  198. package/skills/deft-sync/SKILL.md +16 -0
  199. package/strategies/README.md +83 -0
  200. package/strategies/artifact-guards.md +85 -0
  201. package/strategies/bdd.md +115 -0
  202. package/strategies/brownfield.md +7 -0
  203. package/strategies/discuss.md +129 -0
  204. package/strategies/emit-hints.md +69 -0
  205. package/strategies/enterprise.md +193 -0
  206. package/strategies/interview.md +551 -0
  207. package/strategies/map.md +179 -0
  208. package/strategies/probe.md +151 -0
  209. package/strategies/rapid.md +155 -0
  210. package/strategies/research.md +155 -0
  211. package/strategies/roadmap.md +9 -0
  212. package/strategies/speckit.md +437 -0
  213. package/strategies/v0-20-contract.md +134 -0
  214. package/strategies/yolo.md +169 -0
  215. package/swarm/swarm.md +300 -0
  216. package/templates/COST-ESTIMATE.md +114 -0
  217. package/templates/PULL_REQUEST_TEMPLATE.md +35 -0
  218. package/templates/agent-prompt-preamble.md +409 -0
  219. package/templates/agents-entry.md +211 -0
  220. package/templates/agents-entry.placeholders.md +75 -0
  221. package/templates/embed.go +20 -0
  222. package/templates/embed_test.go +36 -0
  223. package/templates/make-spec-example.md +9 -0
  224. package/templates/make-spec.md +246 -0
  225. package/templates/project.md.template +52 -0
  226. package/templates/specification.md +1 -0
  227. package/templates/swarm-greptile-poller-prompt.md +556 -0
  228. package/templates/user.md.template +31 -0
  229. package/tools/RWLDL.md +80 -0
  230. package/tools/greptile.md +141 -0
  231. package/tools/installer.md +23 -0
  232. package/tools/taskfile-migration.md +32 -0
  233. package/tools/taskfile.md +185 -0
  234. package/tools/telemetry.md +285 -0
  235. package/vbrief/schemas/cache-meta.schema.json +137 -0
  236. package/vbrief/schemas/candidates.schema.json +130 -0
  237. package/vbrief/schemas/codebase-map.schema.json +213 -0
  238. package/vbrief/schemas/lessons-pack.schema.json +134 -0
  239. package/vbrief/schemas/patterns-pack.schema.json +84 -0
  240. package/vbrief/schemas/rules-pack.schema.json +105 -0
  241. package/vbrief/schemas/skills-pack.schema.json +94 -0
  242. package/vbrief/schemas/slices.schema.json +87 -0
  243. package/vbrief/schemas/strategies-pack.schema.json +89 -0
  244. package/vbrief/schemas/swarm-spec-pack.schema.json +84 -0
  245. package/vbrief/schemas/vbrief-core.schema.json +1022 -0
  246. package/vbrief/vbrief.md +684 -0
  247. package/verification/integration.md +76 -0
  248. package/verification/plan-checking.md +85 -0
  249. package/verification/uat.md +60 -0
  250. package/verification/verification.md +117 -0
@@ -0,0 +1,528 @@
1
+ ---
2
+ name: deft-directive-interview
3
+ description: >-
4
+ Deterministic structured Q&A interview loop. Use when any skill needs to
5
+ gather structured input from the user through a series of focused questions
6
+ with numbered options, stated defaults, and a confirmation gate before
7
+ artifact generation. Interview output targets vBRIEF narratives — not
8
+ PRD.md.
9
+ ---
10
+ <!-- AUTO-GENERATED by task packs:render -- DO NOT EDIT MANUALLY -->
11
+ <!-- Purpose: rendered skill -->
12
+ <!-- Source of truth: packs/skills/skills-pack-0.1.json -->
13
+ <!-- Regenerate with: task packs:render -->
14
+ <!-- Edit the source, not this file. Slice instead of loading every SKILL.md: task packs:slice skills by-trigger --trigger <kw> (or list) -->
15
+
16
+ # Deft Directive Interview
17
+
18
+ Deterministic interview loop that any skill can invoke to gather structured user input.
19
+
20
+ Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
21
+
22
+ ## When to Use
23
+
24
+ - Another skill needs to gather structured input from the user (e.g. deft-directive-setup Phase 1/Phase 2)
25
+ - User says "interview loop", "q&a loop", or "run interview loop"
26
+ - A workflow requires a series of focused questions with explicit defaults and confirmation before proceeding
27
+
28
+ ## Interview Loop
29
+
30
+ ### Rule 1: One Question Per Turn
31
+
32
+ ! 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.
33
+
34
+ - ⊗ Include two or more questions in the same message under any circumstances
35
+ - ⊗ List upcoming questions -- only show the current one
36
+ - ⊗ Combine the current question with a summary of previous answers unless explicitly at the confirmation gate
37
+
38
+ ### Rule 2: Numbered Options with Stated Default
39
+
40
+ ! Every question MUST present numbered answer options. Exactly one option MUST be marked as the default using the `[default: N]` notation inline.
41
+
42
+ Example:
43
+ ```
44
+ Which deployment platform?
45
+
46
+ 0. Discuss with agent (pause interview to talk it through)
47
+ ─────────────────────────────────────────────────────────
48
+ 1. Cross-platform (Linux / macOS / Windows)
49
+ 2. Web / Cloud [default: 2]
50
+ 3. Embedded / low-resource
51
+ 4. Other / I don't know
52
+
53
+ Enter confirm / b back / 0 discuss
54
+ ```
55
+
56
+ - ! The default MUST be stated inline with the option (e.g. `[default: 2]`), not in a separate line or footnote
57
+ - ! If no option is objectively better, pick the most common choice and mark it as default
58
+ - ! Option `0. Discuss with agent` MUST 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 with `Other / I don't know`
59
+ - ! A persistent one-line legend MUST appear directly under the options block on every question (see Rule 11)
60
+
61
+ #### Always-Structured Rendering (Option A)
62
+
63
+ ! 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).
64
+
65
+ ! **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.
66
+
67
+ ! Freeform answer collection, when needed, MUST be a two-step flow:
68
+
69
+ 1. Structured-tool call with options such as `[Draft for me (I'll propose content) / Write my own / Defer / Discuss / Back]`.
70
+ 2. 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.
71
+
72
+ ! The ONLY permissible plain-text-to-user emissions are:
73
+
74
+ 1. The Rule 6 Confirmation Gate (typed plain-text commit, see Rule 6's Click-Commit Hosts subsection).
75
+ 2. Agent-initiated status updates that do NOT ask the user to choose anything (e.g. "Files written. Next I'll read X.").
76
+
77
+ - ⊗ 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.
78
+ - ⊗ Present a user-facing choice as plain-text prose when a structured question tool is available on the host.
79
+
80
+ #### Click-Commit Rendering
81
+
82
+ ! 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.
83
+
84
+ Click-commit options block shape:
85
+
86
+ ```
87
+ [ Back -- revisit step N-1 ]
88
+ [ Discuss with agent (pause interview) ]
89
+ ----------------------------------------
90
+ [ Answer option 1 ]
91
+ [ Answer option 2 [default] ]
92
+ [ Answer option 3 ]
93
+ [ Other / I don't know ]
94
+ ```
95
+
96
+ - ! `Back` MUST appear on every question EXCEPT the first (nothing to go back to). Picking `Back` returns to question N-1 with its previously captured answer displayed.
97
+ - ! `Discuss with agent` MUST appear on every question. Picking it enters Rule 10 freeform mode; the agent MUST re-render the same question after the discussion resolves.
98
+ - ! 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.
99
+ - ⊗ Omit `Back` on any question except the first.
100
+ - ⊗ Omit `Discuss with agent` on any question.
101
+ - ⊗ 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.
102
+
103
+ #### Preamble Placement
104
+
105
+ ~ 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.
106
+
107
+ - ⊗ Render a user-facing question as plain-text because you wanted to include preamble -- preamble belongs above the tool call, not instead of it.
108
+
109
+ ### Rule 3: Explicit "Other / I Don't Know" Escape
110
+
111
+ ! Every question MUST include an escape option. The last numbered option MUST be either:
112
+ - "Other (please specify)" -- for open-ended alternatives
113
+ - "I don't know" -- when the user may lack context to answer
114
+ - "Other / I don't know" -- combined form (preferred)
115
+
116
+ - ! The `Other / I don't know` escape is SEPARATE from the slot-0 `Discuss with agent` option (Rule 10). The two options MUST both be present and MUST NOT be merged into a single entry
117
+ - ⊗ Present a question with no escape option -- the user must always have a way out
118
+ - ⊗ Use the `Other / I don't know` entry as the discuss/freeform escape -- slot 0 `Discuss with agent` is the discuss escape (Rule 10)
119
+ - ~ When the user selects the escape option, follow up with a brief open-ended prompt to capture their input or acknowledge the gap
120
+
121
+ ### Rule 4: Depth Gate
122
+
123
+ ! Keep asking until no material ambiguity remains before artifact generation. The interview is NOT complete until the calling skill's required inputs are all captured with sufficient specificity to generate the target artifact.
124
+
125
+ - ! If an answer introduces new ambiguity (e.g. user selects "Other" and describes something that requires follow-up), ask clarifying questions before moving on
126
+ - ! Do not truncate the interview to save time -- completeness takes priority over brevity
127
+ - ~ The calling skill defines what "sufficient specificity" means by providing a list of required fields in the handoff contract
128
+
129
+ ### Rule 5: Default Acceptance
130
+
131
+ ! When a question has a stated default, the user may accept it with any of the following responses:
132
+ - Bare enter / empty response
133
+ - "yes", "y", "ok", "default", "keep"
134
+
135
+ ! 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.
136
+
137
+ ! 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.
138
+
139
+ - ⊗ Re-ask a question because the user's acceptance was "too brief" -- any of the listed responses is a valid acceptance
140
+ - ⊗ Interpret an empty response as a refusal or skip
141
+
142
+ ### Rule 6: Confirmation Gate
143
+
144
+ ! 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.
145
+
146
+ Format:
147
+ ```
148
+ Here are the values I captured:
149
+
150
+ - **Field 1**: value
151
+ - **Field 2**: value
152
+ - **Field 3**: value
153
+ ...
154
+
155
+ Confirm these values? (yes / no)
156
+ ```
157
+
158
+ - ! Accept only explicit affirmative responses (`yes`, `confirmed`, `approve`) -- reject vague responses (`proceed`, `do it`, `go ahead`)
159
+ - ~ Note: The confirmation gate is intentionally stricter than Rule 5 (default-acceptance). Rule 5 accepts casual responses like `ok` for 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 -- accepting `ok` here risks generating artifacts from auto-filled or misunderstood values. This asymmetry is by design.
160
+ - ! 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
161
+ - ! 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
162
+ - ⊗ Proceed to artifact generation without displaying the summary and receiving explicit confirmation
163
+
164
+ #### Click-Commit Hosts: Plain-Text Confirmation Gate
165
+
166
+ ! 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.
167
+
168
+ - ! 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`).
169
+ - ! 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.
170
+ - ⊗ Render the Confirmation Gate via a click-commit structured tool -- this removes the last safeguard against misclicks on the final answer.
171
+
172
+ #### Mode Restore After the Gate
173
+
174
+ ! 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.
175
+
176
+ - ⊗ Render the next user-facing question as plain-text conversational prose because the Rule 6 Gate was just in plain-text mode.
177
+
178
+ ### Rule 7: Structured Handoff Contract
179
+
180
+ ! 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.
181
+
182
+ The answers map format:
183
+ ```json
184
+ {
185
+ "field_1": "captured value",
186
+ "field_2": "captured value",
187
+ "field_3": ["list", "if", "multi-select"],
188
+ ...
189
+ }
190
+ ```
191
+
192
+ - ! The calling skill defines the expected keys in its invocation of deft-directive-interview
193
+ - ! The answers map MUST contain a value for every required key defined by the calling skill
194
+ - ! Optional keys may be omitted if the user did not provide input and no default was applicable
195
+ - ~ The calling skill is responsible for validating the answers map against its own schema and requesting re-interview for any missing or invalid fields
196
+
197
+ ## Output Targets
198
+
199
+ Interview output writes to `specification.vbrief.json` `plan.narratives` — the vBRIEF draft is the sole authoritative output. PRD.md is never generated. All vBRIEFs target the canonical v0.6 schema (`vbrief/schemas/vbrief-core.schema.json`, strict `const: "0.6"`); see [`../../conventions/references.md`](../../conventions/references.md).
200
+
201
+ When the interview captures origin provenance (e.g. the user links to a GitHub issue or Jira ticket), include a `references` entry in the canonical form documented in [`../../conventions/references.md`](../../conventions/references.md):
202
+
203
+ ```json
204
+ "references": [
205
+ {
206
+ "uri": "https://github.com/{owner}/{repo}/issues/{N}",
207
+ "type": "x-vbrief/github-issue",
208
+ "title": "Issue #{N}: {issue title}"
209
+ }
210
+ ]
211
+ ```
212
+
213
+ ### Full Path Output
214
+
215
+ ! On the Full path, the interview populates `specification.vbrief.json` `plan.narratives` with `vBRIEFInfo.version: "0.6"`, `status: draft`, and rich keys:
216
+
217
+ - `ProblemStatement`: What problem this project solves
218
+ - `Goals`: High-level project goals
219
+ - `UserStories`: User stories in standard format
220
+ - `Requirements`: Structured requirements (FR-N: functional, NFR-N: non-functional)
221
+ - `SuccessMetrics`: Measurable success criteria
222
+ - `Architecture`: System design and technical architecture
223
+ - `Overview`: Brief project summary
224
+
225
+ ! All narrative values MUST be plain strings — never objects or arrays.
226
+
227
+ ! The human approval gate reviews the vBRIEF draft narratives directly — reviewing the narratives IS the approval step. On approval, update `status` to `approved` and generate downstream scope vBRIEFs.
228
+
229
+ ### Light Path Output
230
+
231
+ ! On the Light path, the interview populates `specification.vbrief.json` with `status: draft` and slim narratives:
232
+
233
+ - `Overview`: Brief project summary
234
+ - `Architecture`: System design description
235
+
236
+ ! On approval, update `status` to `approved`. Scope vBRIEFs are then created in `vbrief/proposed/` for each identified work item.
237
+
238
+ ### PRD.md (deprecated — never authoritative)
239
+
240
+ PRD.md is not generated as part of the interview workflow on either path. The `specification.vbrief.json` vBRIEF draft is the sole source of truth.
241
+
242
+ - ? If stakeholders require a traditional PRD document, run `task prd:render` to export a read-only `PRD.md` from `plan.narratives`
243
+ - ! PRD.md is never authoritative — `specification.vbrief.json` is the source of truth
244
+ - ⊗ Generate an authoritative PRD.md during the interview process
245
+ - ⊗ Treat PRD.md as a source of truth — it is a generated export artifact
246
+
247
+ ## Invocation Contract
248
+
249
+ deft-directive-interview supports two usage modes:
250
+
251
+ ### Embedded Mode
252
+
253
+ The calling skill references deft-directive-interview rules inline (e.g. "this phase follows the deterministic interview loop defined in `skills/deft-directive-interview/SKILL.md`") and applies the rules directly within its own question sequence. No formal contract object is needed -- the calling skill embeds the question definitions and field requirements in its own SKILL.md. This is the current approach used by `skills/deft-directive-setup/SKILL.md` Phase 1 and Phase 2.
254
+
255
+ ### Delegation Mode
256
+
257
+ The calling skill explicitly invokes deft-directive-interview as a sub-skill and passes a formal contract object. When using delegation mode, the calling skill MUST provide:
258
+
259
+ 1. **Required fields**: list of field names that must be captured (the depth gate uses this to determine completeness)
260
+ 2. **Question definitions**: for each field, the question text, numbered options (if applicable), and default value
261
+ 3. **Optional fields**: list of field names that may be skipped
262
+
263
+ The calling skill MAY provide:
264
+ - **Context preamble**: a brief description of why these questions are being asked (shown to the user before the first question)
265
+ - **Validation rules**: constraints on acceptable values for specific fields
266
+
267
+ ### Rule 8: Deterministic Selection Confirmation
268
+
269
+ ! After the user enters a number to select an option, the agent MUST echo the selected option text and wait for explicit confirmation before advancing to the next question. The confirm-after-number-press step is MANDATORY -- number entry alone MUST NOT advance the interview.
270
+
271
+ Example:
272
+ ```
273
+ Which deployment platform?
274
+
275
+ 0. Discuss with agent (pause interview to talk it through)
276
+ ────────────────────────────────────────────────────────
277
+ 1. Cross-platform (Linux / macOS / Windows)
278
+ 2. Web / Cloud [default: 2]
279
+ 3. Embedded / low-resource
280
+ 4. Other / I don't know
281
+
282
+ Enter confirm / b back / 0 discuss
283
+
284
+ > User: 1
285
+
286
+ You selected: **1. Cross-platform (Linux / macOS / Windows)**
287
+ Press Enter to confirm, type a different number to change, or `b` to go back.
288
+ ```
289
+
290
+ - ! Show the selected option text (with its number) after each number entry -- the user must see what was selected
291
+ - ! Wait for Enter / explicit confirmation before advancing -- do NOT auto-advance on number press, under any circumstances
292
+ - ! If the user types a different number instead of confirming, switch to that option and re-confirm (echo the new selection and wait for Enter again)
293
+ - ! Accept `b`, `back`, or `prev` at the confirm prompt as a shortcut to back-navigation (Rule 9) without first requiring confirmation of the selection
294
+ - ⊗ Auto-advance to the next question immediately after the user presses a number key
295
+ - ⊗ Skip the echo step -- even when the selection "seems obvious" the agent MUST display the selected option text back to the user before advancing
296
+
297
+ ### Rule 9: Backward Navigation
298
+
299
+ ! The agent MUST support backward navigation during the interview. At any question (including at the confirm-after-number prompt from Rule 8), the user may type `back`, `prev`, or `b` to return to the previous question and change their answer.
300
+
301
+ - ! When the user navigates back, re-display the previous question with the previously selected answer shown
302
+ - ! The user may change the answer or confirm the existing one
303
+ - ! The back-navigation affordance MUST be visible on every question via the persistent one-line legend (Rule 11) -- not only announced once at the start of the interview
304
+ - ~ The agent SHOULD additionally inform the user of backward navigation availability at the start of the interview (e.g. "Type 'b' / 'back' at any question to revisit the previous answer")
305
+ - ⊗ Refuse to let the user revisit previous answers during the interview
306
+ - ⊗ Hide the back-navigation affordance -- the legend under each question MUST name the `b` key explicitly
307
+
308
+ ### Rule 10: Freeform Conversation Escape (Slot 0 -- Discuss with agent)
309
+
310
+ ! Every deterministic question MUST include an option `0` that pauses the structured flow and opens a freeform conversation with the agent. Option 0 is the self-describing **Discuss with agent** escape hatch and is DISTINCT from `Other / I don't know` (Rule 3).
311
+
312
+ - ! Option 0 label: `0. Discuss with agent` (a short self-describing clarifier such as `(pause interview to talk it through)` MAY follow on the same line)
313
+ - ! Option 0 MUST render 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 with slot `Other / I don't know`
314
+ - ! The slot-0 label MUST be self-describing -- do NOT use generic labels like `Other..`, `Escape`, or `Pause` without the `Discuss with agent` phrasing
315
+ - ! When the user selects 0, the agent enters a freeform conversation mode where the user can ask clarifying questions, request more context about the options, or explain nuance
316
+ - ! The agent MUST explicitly resume the deterministic flow when the conversation is resolved: re-display the same question (with the full options block and legend) and wait for a numbered answer
317
+ - ⊗ Continue the deterministic flow while in freeform conversation mode
318
+ - ⊗ Omit option 0 from any deterministic question
319
+ - ⊗ Place option 0 at the bottom of the options block or inline with numbered answers -- slot 0 MUST be first, visually separated
320
+ - ⊗ Merge slot-0 `Discuss with agent` with `Other / I don't know` -- they are distinct affordances
321
+
322
+ ### Rule 11: Persistent Legend Under Each Question
323
+
324
+ ! Every deterministic question MUST surface the confirm / back / discuss affordances on every question (not only at the start of the interview). The way those affordances are surfaced depends on the host's rendering mode -- see Rule 2's Click-Commit Rendering and Always-Structured Rendering subsections.
325
+
326
+ Canonical legend text (plain-text mode):
327
+
328
+ ```
329
+ Enter confirm / b back / 0 discuss
330
+ ```
331
+
332
+ #### Plain-Text Rendering Mode
333
+
334
+ ! In plain-text rendering mode, the keystroke legend above MUST be rendered directly under the options block on every deterministic question, including re-displayed questions after back-navigation (Rule 9) or freeform resume (Rule 10).
335
+
336
+ - ! The legend MUST be present under every deterministic question in plain-text mode
337
+ - ! The legend MUST name all three affordances: `Enter` (confirm selection -- Rule 8), `b` (back -- Rule 9), `0` (discuss -- Rule 10)
338
+ - ~ The legend SHOULD appear as a single line directly below the options block, separated by a blank line
339
+ - ? Additional hints (e.g. `c cancel`) MAY be appended with `/` separators, but the three canonical affordances MUST always be present
340
+ - ⊗ Omit the legend from any plain-text-mode deterministic question -- every question MUST carry it
341
+ - ⊗ Replace the canonical affordance labels with non-self-describing abbreviations (e.g. `↵`, `←`) without also spelling them out
342
+
343
+ #### Click-Commit Rendering Mode
344
+
345
+ ! In click-commit rendering mode, the confirm / back / discuss affordances are rendered as clickable options in the options list per Rule 2's Click-Commit Rendering subsection:
346
+
347
+ - `Back -- revisit step N-1` renders as a clickable option on every question except the first
348
+ - `Discuss with agent (pause interview)` renders as a clickable option on every question
349
+ - Commit is implicit in the click-commit return; the Rule 6 plain-text Confirmation Gate is the only typed-commit step before file writes
350
+
351
+ ! The keystroke legend MAY be omitted in click-commit rendering because the host tool does not accept keystroke input. The affordances themselves MUST still be present as clickable options (not omitted).
352
+
353
+ - ⊗ Omit `Back` (except on the first question) or `Discuss with agent` from any click-commit rendering -- the affordances survive the mode change even though the keystroke legend does not
354
+
355
+ ## IP Risk Probe (#738)
356
+
357
+ ! When the interview captures the project description (and any
358
+ research-phase notes), the agent MUST run the IP-risk heuristic from
359
+ [`references/ip-risk.md`](../../references/ip-risk.md) -- canonical
360
+ implementation `scripts/ip_risk.py:detect_ip_terms` -- before generating
361
+ the SPECIFICATION.
362
+
363
+ The heuristic is permissive on purpose: recognizable IP names (Magic:
364
+ The Gathering, Pokemon, etc.), fictional-universe terms (Hogwarts,
365
+ Tatooine), branded characters (Mickey Mouse, Spider-Man), sports leagues
366
+ (NFL, NBA), and trademarked products (iPhone, Xbox) all trigger a hit.
367
+
368
+ ! When `detect_ip_terms` returns at least one hit:
369
+
370
+ 1. ! Ask the explicit monetization-intent question (canonical wording in
371
+ `references/ip-risk.md` `## Question Script`). The user MUST choose
372
+ between **personal use only** and **commercial use** -- defaulting to
373
+ `commercial` when intent is unclear, because the stricter checklist is
374
+ the wrong-side-of-safe choice.
375
+ 2. ! Emit the plain-English risk summary from
376
+ `scripts/ip_risk.py:plain_risk_summary(hits, intent)` into the
377
+ interview output AND into an `IPRisk` narrative on the
378
+ `specification.vbrief.json` draft. The summary opens with `not legal
379
+ advice`, names the detected categories, and (for commercial intent)
380
+ states explicitly that lawyer consultation is **not optional output**
381
+ from this interview.
382
+ 3. ! Inject the three protection scope items from
383
+ `scripts/ip_risk.py:ip_risk_scope_items(intent)` into the spec
384
+ vBRIEF's `plan.items` array (disclaimer stub `IP-1`, API-only-asset
385
+ policy `IP-2`, hosting policy `IP-3`). The items flow naturally into
386
+ the rendered SPECIFICATION.md via the existing
387
+ `scripts/spec_render.py` pipeline -- no spec_render.py modification
388
+ is required.
389
+ 4. ! For commercial intent, the lawyer-consultation recommendation is
390
+ non-optional output -- the interview MUST surface it before the
391
+ confirmation gate.
392
+
393
+ - ⊗ Skip the IP-risk probe when the project description references
394
+ third-party intellectual property -- the heuristic is the gate
395
+ whether or not the agent thinks the project is "obviously fine".
396
+ - ⊗ Treat the absence of detected terms as proof that the project is
397
+ IP-free -- the heuristic only knows about the curated lists in
398
+ `scripts/ip_risk.py`. When the description is vague, the agent SHOULD
399
+ ask directly "is this based on a game / film / sports league /
400
+ brand?".
401
+ - ⊗ Provide legal advice. Deft is not a law firm -- the only
402
+ recommendation it makes is **consult a lawyer**.
403
+
404
+ ## Plain-English UX (#740)
405
+
406
+ ! Every user-facing question, summary, and output line in this skill
407
+ MUST follow the rules in
408
+ [`references/plain-english-ux.md`](../../references/plain-english-ux.md):
409
+
410
+ 1. ! Every technical question MUST carry a one-line plain-English
411
+ context note as preamble above the structured-tool call. The
412
+ preamble explains the *consequence* of the choice in non-technical
413
+ terms.
414
+ 2. ! Every acronym MUST be defined inline on first use within a skill
415
+ session: `PRD (Product Requirements Document)`, `NFR (Non-Functional
416
+ Requirement)`, `FR (Functional Requirement)`, `SPEC (Specification)`,
417
+ `API (Application Programming Interface)`, `DB (Database)`, `CI
418
+ (Continuous Integration)`, `MVP (Minimum Viable Product)`. Subsequent
419
+ uses MAY drop the expansion.
420
+ 3. ! When a skill recommends a framework, library, language, or tool,
421
+ the recommendation MUST either explain the rationale in plain-English
422
+ terms the user actually cares about (cost, speed, hiring, hosting
423
+ compatibility, etc.) OR remove the rationale entirely and present it
424
+ as an overridable default. ⊗ Drop a framework name with a one-word
425
+ `industry-standard` / `modern` / `scalable` justification.
426
+
427
+ - ⊗ Drop a technical question on the user without a plain-English
428
+ context note above it.
429
+ - ⊗ Use an acronym for the first time without inlining `(full
430
+ expansion)`.
431
+ - ⊗ Treat "the user can ask their other AI to translate" as an
432
+ acceptable mitigation for jargon.
433
+
434
+ ## Approval Menus After PRD and SPEC Review (#740, refs #767)
435
+
436
+ ! After every PRD review AND every SPECIFICATION review, the agent MUST
437
+ present an explicit numbered approval menu using the canonical shapes
438
+ from `references/plain-english-ux.md` `## Rule 4`. The menu replaces
439
+ ambiguous buttons like `Accept / Refine / Edit` with action-shaped
440
+ labels.
441
+
442
+ Canonical PRD-review menu:
443
+
444
+ ```
445
+ What would you like to do with the PRD (Product Requirements Document)?
446
+
447
+ 1. Approve and continue (lock the PRD, generate the SPECIFICATION)
448
+ 2. Suggest changes (you describe what to change; the agent rewrites)
449
+ 3. Edit yourself (you edit the PRD directly; the agent waits)
450
+ 4. Discuss
451
+ 5. Back
452
+
453
+ Enter confirm / b back / 0 discuss
454
+ ```
455
+
456
+ Canonical SPECIFICATION-review menu:
457
+
458
+ ```
459
+ What would you like to do with the SPECIFICATION?
460
+
461
+ 1. Approve and continue (lock the SPEC, proceed to implementation)
462
+ 2. Suggest changes (you describe what to change; the agent rewrites)
463
+ 3. Edit yourself (you edit the SPEC directly; the agent waits)
464
+ 4. Discuss
465
+ 5. Back
466
+
467
+ Enter confirm / b back / 0 discuss
468
+ ```
469
+
470
+ ! Every numbered approval menu MUST follow the #767 deterministic-
471
+ question framework rule: the **final two numbered options MUST be
472
+ `Discuss` and `Back`**, in that order. This is consistent with this
473
+ skill's Rule 9 (back-navigation) and Rule 10 (slot-0 discuss-with-agent
474
+ escape) and provides a uniform exit path on every menu. The framework
475
+ rule itself is being landed by Agent 1 in #767; once
476
+ `contracts/deterministic-questions.md` exists, this skill MUST defer to
477
+ it for the canonical wording.
478
+
479
+ - ⊗ Add a numbered approval menu where Discuss and Back are not the
480
+ final two options.
481
+ - ⊗ Use plain `Accept / Refine / Edit` buttons without explanatory
482
+ parentheticals.
483
+
484
+ ## Diff-View Preface on PRD / SPEC Review (#740)
485
+
486
+ ! When a PRD or SPECIFICATION review surfaces a red/green diff, the
487
+ agent MUST emit a one-line non-alarming preface ABOVE the diff that
488
+ sets expectations -- red lines are removals, green lines are additions,
489
+ NOT errors. Canonical preface:
490
+
491
+ ```
492
+ Here's what changed since the previous draft. Red lines were removed,
493
+ green lines were added. Nothing here is broken -- this is a normal
494
+ review.
495
+ ```
496
+
497
+ ? Alternatively, the agent MAY hide the diff entirely on the first
498
+ review pass and present a plain-English summary of changes instead;
499
+ show the diff only on the second pass or when the user explicitly asks
500
+ for it.
501
+
502
+ - ⊗ Show a red/green diff at first review without a non-alarming
503
+ preface.
504
+
505
+ ## Anti-Patterns
506
+
507
+ - ⊗ Ask multiple questions in a single message -- one question per turn, always
508
+ - ⊗ Proceed to artifact generation without the confirmation gate -- all captured answers must be displayed and explicitly confirmed
509
+ - ⊗ Omit the default marker from any question -- every question must have a `[default: N]` option
510
+ - ⊗ Omit the "Other / I don't know" escape from any question -- every question must have an escape option
511
+ - ⊗ Omit option 0 (freeform conversation escape) from any deterministic question
512
+ - ⊗ Re-ask a question after the user accepted the default -- move on immediately
513
+ - ⊗ Skip the depth gate and generate artifacts with known ambiguity remaining
514
+ - ⊗ Exit the interview without producing a structured answers map for the calling skill
515
+ - ⊗ Combine interview questions with artifact generation in the same message
516
+ - ⊗ Generate an authoritative PRD.md — interview output targets `specification.vbrief.json` narratives only
517
+ - ⊗ Treat PRD.md as a source of truth — it is a read-only export via `task prd:render`
518
+ - ⊗ Auto-advance to the next question on number press without echoing the selection and waiting for confirmation
519
+ - ⊗ Refuse backward navigation during the interview -- the user must be able to revisit previous answers
520
+ - ⊗ Render a deterministic question without the persistent `Enter confirm / b back / 0 discuss` legend directly below the options block **in plain-text rendering mode** (Rule 11 Plain-Text Rendering Mode) -- in click-commit rendering mode the keystroke legend MAY be omitted per Rule 11 Click-Commit Rendering Mode, provided `Back` and `Discuss with agent` still render as clickable options
521
+ - ⊗ Use `Pause`, `Escape`, `Other..`, or any non-self-describing label for slot 0 -- the label MUST be `Discuss with agent` (Rule 10)
522
+ - ⊗ Place slot-0 `Discuss with agent` at the bottom of the options block or merge it with `Other / I don't know` -- slot 0 MUST be first and visually distinct (Rule 10)
523
+ - ⊗ Emit a user-facing question as conversational prose outside the structured tool because the answer content is prose, because the preamble is long, because the question "feels conversational," or because the prior question was plain-text (Rule 2 Always-Structured Rendering, #478)
524
+ - ⊗ Omit `Back` or `Discuss with agent` as clickable options in click-commit rendering (Rule 2 Click-Commit Rendering, #477)
525
+ - ⊗ Treat a click-commit tool's atomic return as a Rule-8-compliant confirmed commit (Rule 2 Click-Commit Rendering, #477)
526
+ - ⊗ Render the Rule 6 Confirmation Gate via a click-commit structured tool on a click-commit host -- the gate MUST be plain-text with a typed `yes` commit (Rule 6 Click-Commit Hosts, #477)
527
+ - ⊗ Render the next user-facing question as plain-text conversational prose because the Rule 6 Gate was just rendered in plain-text -- plain-text mode is released after the typed commit (Rule 6 Mode Restore, #478)
528
+ - ⊗ Render a user-facing question as plain-text because you wanted to include a long preamble -- preamble belongs above the tool call, not instead of it (Rule 2 Preamble Placement, #478)