oh-my-codex 0.14.0 → 0.14.2

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 (185) hide show
  1. package/Cargo.lock +5 -5
  2. package/Cargo.toml +1 -1
  3. package/README.md +14 -8
  4. package/crates/omx-explore/src/main.rs +94 -1
  5. package/crates/omx-sparkshell/src/codex_bridge.rs +59 -12
  6. package/crates/omx-sparkshell/tests/execution.rs +48 -0
  7. package/dist/cli/__tests__/explore.test.js +33 -1
  8. package/dist/cli/__tests__/explore.test.js.map +1 -1
  9. package/dist/cli/__tests__/index.test.js +11 -2
  10. package/dist/cli/__tests__/index.test.js.map +1 -1
  11. package/dist/cli/__tests__/package-bin-contract.test.js +5 -0
  12. package/dist/cli/__tests__/package-bin-contract.test.js.map +1 -1
  13. package/dist/cli/__tests__/question.test.js +139 -25
  14. package/dist/cli/__tests__/question.test.js.map +1 -1
  15. package/dist/cli/__tests__/session-scoped-runtime.test.js +30 -0
  16. package/dist/cli/__tests__/session-scoped-runtime.test.js.map +1 -1
  17. package/dist/cli/__tests__/setup-agents-overwrite.test.js +32 -7
  18. package/dist/cli/__tests__/setup-agents-overwrite.test.js.map +1 -1
  19. package/dist/cli/__tests__/setup-refresh.test.js +8 -6
  20. package/dist/cli/__tests__/setup-refresh.test.js.map +1 -1
  21. package/dist/cli/__tests__/sparkshell-cli.test.js +23 -0
  22. package/dist/cli/__tests__/sparkshell-cli.test.js.map +1 -1
  23. package/dist/cli/__tests__/uninstall.test.js +65 -5
  24. package/dist/cli/__tests__/uninstall.test.js.map +1 -1
  25. package/dist/cli/__tests__/update.test.js +360 -26
  26. package/dist/cli/__tests__/update.test.js.map +1 -1
  27. package/dist/cli/explore.d.ts.map +1 -1
  28. package/dist/cli/explore.js +18 -3
  29. package/dist/cli/explore.js.map +1 -1
  30. package/dist/cli/index.d.ts +2 -1
  31. package/dist/cli/index.d.ts.map +1 -1
  32. package/dist/cli/index.js +7 -2
  33. package/dist/cli/index.js.map +1 -1
  34. package/dist/cli/setup.d.ts.map +1 -1
  35. package/dist/cli/setup.js +25 -3
  36. package/dist/cli/setup.js.map +1 -1
  37. package/dist/cli/sparkshell.d.ts.map +1 -1
  38. package/dist/cli/sparkshell.js +11 -1
  39. package/dist/cli/sparkshell.js.map +1 -1
  40. package/dist/cli/team.d.ts.map +1 -1
  41. package/dist/cli/team.js +159 -394
  42. package/dist/cli/team.js.map +1 -1
  43. package/dist/cli/uninstall.d.ts.map +1 -1
  44. package/dist/cli/uninstall.js +3 -1
  45. package/dist/cli/uninstall.js.map +1 -1
  46. package/dist/cli/update.d.ts +37 -9
  47. package/dist/cli/update.d.ts.map +1 -1
  48. package/dist/cli/update.js +204 -26
  49. package/dist/cli/update.js.map +1 -1
  50. package/dist/config/__tests__/generator-idempotent.test.js +51 -14
  51. package/dist/config/__tests__/generator-idempotent.test.js.map +1 -1
  52. package/dist/config/__tests__/generator-notify.test.js +35 -10
  53. package/dist/config/__tests__/generator-notify.test.js.map +1 -1
  54. package/dist/config/generator.d.ts +1 -0
  55. package/dist/config/generator.d.ts.map +1 -1
  56. package/dist/config/generator.js +61 -7
  57. package/dist/config/generator.js.map +1 -1
  58. package/dist/hooks/__tests__/code-review-skill-contract.test.d.ts +2 -0
  59. package/dist/hooks/__tests__/code-review-skill-contract.test.d.ts.map +1 -0
  60. package/dist/hooks/__tests__/code-review-skill-contract.test.js +56 -0
  61. package/dist/hooks/__tests__/code-review-skill-contract.test.js.map +1 -0
  62. package/dist/hooks/__tests__/deep-interview-contract.test.js +31 -0
  63. package/dist/hooks/__tests__/deep-interview-contract.test.js.map +1 -1
  64. package/dist/hooks/__tests__/explicit-terminal-stop-docs-contract.test.d.ts +2 -0
  65. package/dist/hooks/__tests__/explicit-terminal-stop-docs-contract.test.d.ts.map +1 -0
  66. package/dist/hooks/__tests__/explicit-terminal-stop-docs-contract.test.js +43 -0
  67. package/dist/hooks/__tests__/explicit-terminal-stop-docs-contract.test.js.map +1 -0
  68. package/dist/hooks/__tests__/explicit-terminal-stop-model-docs-contract.test.d.ts +2 -0
  69. package/dist/hooks/__tests__/explicit-terminal-stop-model-docs-contract.test.d.ts.map +1 -0
  70. package/dist/hooks/__tests__/explicit-terminal-stop-model-docs-contract.test.js +38 -0
  71. package/dist/hooks/__tests__/explicit-terminal-stop-model-docs-contract.test.js.map +1 -0
  72. package/dist/hooks/__tests__/keyword-detector.test.js +108 -0
  73. package/dist/hooks/__tests__/keyword-detector.test.js.map +1 -1
  74. package/dist/hooks/__tests__/prompt-guidance-test-helpers.d.ts.map +1 -1
  75. package/dist/hooks/__tests__/prompt-guidance-test-helpers.js +16 -1
  76. package/dist/hooks/__tests__/prompt-guidance-test-helpers.js.map +1 -1
  77. package/dist/hooks/keyword-detector.d.ts.map +1 -1
  78. package/dist/hooks/keyword-detector.js +34 -8
  79. package/dist/hooks/keyword-detector.js.map +1 -1
  80. package/dist/mcp/__tests__/bootstrap.test.js +7 -25
  81. package/dist/mcp/__tests__/bootstrap.test.js.map +1 -1
  82. package/dist/mcp/__tests__/server-lifecycle.test.js +60 -0
  83. package/dist/mcp/__tests__/server-lifecycle.test.js.map +1 -1
  84. package/dist/mcp/__tests__/state-server.test.js +177 -0
  85. package/dist/mcp/__tests__/state-server.test.js.map +1 -1
  86. package/dist/mcp/bootstrap.d.ts.map +1 -1
  87. package/dist/mcp/bootstrap.js +36 -18
  88. package/dist/mcp/bootstrap.js.map +1 -1
  89. package/dist/mcp/state-server.d.ts +17 -0
  90. package/dist/mcp/state-server.d.ts.map +1 -1
  91. package/dist/mcp/state-server.js +55 -1
  92. package/dist/mcp/state-server.js.map +1 -1
  93. package/dist/notifications/__tests__/index.test.js +0 -3
  94. package/dist/notifications/__tests__/index.test.js.map +1 -1
  95. package/dist/notifications/__tests__/session-status.test.js +90 -0
  96. package/dist/notifications/__tests__/session-status.test.js.map +1 -1
  97. package/dist/notifications/session-status.d.ts +2 -0
  98. package/dist/notifications/session-status.d.ts.map +1 -1
  99. package/dist/notifications/session-status.js +19 -4
  100. package/dist/notifications/session-status.js.map +1 -1
  101. package/dist/question/__tests__/deep-interview.test.js +44 -0
  102. package/dist/question/__tests__/deep-interview.test.js.map +1 -1
  103. package/dist/question/__tests__/renderer.test.js +192 -12
  104. package/dist/question/__tests__/renderer.test.js.map +1 -1
  105. package/dist/question/__tests__/state.test.js +21 -1
  106. package/dist/question/__tests__/state.test.js.map +1 -1
  107. package/dist/question/deep-interview.d.ts +3 -0
  108. package/dist/question/deep-interview.d.ts.map +1 -1
  109. package/dist/question/deep-interview.js +18 -1
  110. package/dist/question/deep-interview.js.map +1 -1
  111. package/dist/question/renderer.d.ts +4 -2
  112. package/dist/question/renderer.d.ts.map +1 -1
  113. package/dist/question/renderer.js +87 -18
  114. package/dist/question/renderer.js.map +1 -1
  115. package/dist/runtime/__tests__/run-outcome.test.js +38 -0
  116. package/dist/runtime/__tests__/run-outcome.test.js.map +1 -1
  117. package/dist/runtime/__tests__/run-state.test.d.ts +2 -0
  118. package/dist/runtime/__tests__/run-state.test.d.ts.map +1 -0
  119. package/dist/runtime/__tests__/run-state.test.js +37 -0
  120. package/dist/runtime/__tests__/run-state.test.js.map +1 -0
  121. package/dist/runtime/run-loop.d.ts +5 -1
  122. package/dist/runtime/run-loop.d.ts.map +1 -1
  123. package/dist/runtime/run-loop.js +8 -3
  124. package/dist/runtime/run-loop.js.map +1 -1
  125. package/dist/runtime/run-outcome.d.ts +18 -0
  126. package/dist/runtime/run-outcome.d.ts.map +1 -1
  127. package/dist/runtime/run-outcome.js +156 -7
  128. package/dist/runtime/run-outcome.js.map +1 -1
  129. package/dist/runtime/run-state.d.ts +5 -1
  130. package/dist/runtime/run-state.d.ts.map +1 -1
  131. package/dist/runtime/run-state.js +13 -3
  132. package/dist/runtime/run-state.js.map +1 -1
  133. package/dist/runtime/terminal-lifecycle.d.ts +11 -0
  134. package/dist/runtime/terminal-lifecycle.d.ts.map +1 -0
  135. package/dist/runtime/terminal-lifecycle.js +52 -0
  136. package/dist/runtime/terminal-lifecycle.js.map +1 -0
  137. package/dist/scripts/__tests__/codex-native-hook.test.js +370 -56
  138. package/dist/scripts/__tests__/codex-native-hook.test.js.map +1 -1
  139. package/dist/scripts/__tests__/postinstall.test.d.ts +2 -0
  140. package/dist/scripts/__tests__/postinstall.test.d.ts.map +1 -0
  141. package/dist/scripts/__tests__/postinstall.test.js +178 -0
  142. package/dist/scripts/__tests__/postinstall.test.js.map +1 -0
  143. package/dist/scripts/codex-native-hook.d.ts +1 -0
  144. package/dist/scripts/codex-native-hook.d.ts.map +1 -1
  145. package/dist/scripts/codex-native-hook.js +115 -56
  146. package/dist/scripts/codex-native-hook.js.map +1 -1
  147. package/dist/scripts/postinstall.d.ts +22 -0
  148. package/dist/scripts/postinstall.d.ts.map +1 -0
  149. package/dist/scripts/postinstall.js +105 -0
  150. package/dist/scripts/postinstall.js.map +1 -0
  151. package/dist/state/__tests__/operations.test.js +60 -0
  152. package/dist/state/__tests__/operations.test.js.map +1 -1
  153. package/dist/state/operations.d.ts.map +1 -1
  154. package/dist/state/operations.js +18 -1
  155. package/dist/state/operations.js.map +1 -1
  156. package/dist/team/__tests__/role-router.test.js +6 -0
  157. package/dist/team/__tests__/role-router.test.js.map +1 -1
  158. package/dist/team/__tests__/runtime.test.js +108 -2
  159. package/dist/team/__tests__/runtime.test.js.map +1 -1
  160. package/dist/team/runtime.d.ts.map +1 -1
  161. package/dist/team/runtime.js +18 -4
  162. package/dist/team/runtime.js.map +1 -1
  163. package/dist/utils/__tests__/dep-versions.test.js +25 -8
  164. package/dist/utils/__tests__/dep-versions.test.js.map +1 -1
  165. package/dist/utils/__tests__/paths.test.js +45 -0
  166. package/dist/utils/__tests__/paths.test.js.map +1 -1
  167. package/dist/utils/paths.d.ts +2 -0
  168. package/dist/utils/paths.d.ts.map +1 -1
  169. package/dist/utils/paths.js +22 -7
  170. package/dist/utils/paths.js.map +1 -1
  171. package/dist/verification/__tests__/ci-rust-gates.test.js +1 -1
  172. package/dist/verification/__tests__/ci-rust-gates.test.js.map +1 -1
  173. package/package.json +3 -2
  174. package/prompts/architect.md +4 -0
  175. package/prompts/code-reviewer.md +3 -0
  176. package/skills/code-review/SKILL.md +94 -28
  177. package/skills/deep-interview/SKILL.md +91 -0
  178. package/src/scripts/__tests__/codex-native-hook.test.ts +468 -64
  179. package/src/scripts/__tests__/postinstall.test.ts +210 -0
  180. package/src/scripts/codex-native-hook.ts +136 -53
  181. package/src/scripts/postinstall-bootstrap.js +23 -0
  182. package/src/scripts/postinstall.ts +161 -0
  183. package/templates/AGENTS.md +1 -1
  184. package/templates/model-instructions/explore-lightweight-AGENTS.md +11 -0
  185. package/templates/model-instructions/sparkshell-lightweight-AGENTS.md +10 -0
@@ -15,8 +15,6 @@ This skill activates when:
15
15
  - After implementing a major feature
16
16
  - User wants quality assessment
17
17
 
18
- ## What It Does
19
-
20
18
  ## GPT-5.4 Guidance Alignment
21
19
 
22
20
  - Default to concise, evidence-dense progress and completion reporting unless the user or risk level requires more detail.
@@ -24,30 +22,49 @@ This skill activates when:
24
22
  - If correctness depends on additional inspection, retrieval, execution, or verification, keep using the relevant tools until the review is grounded.
25
23
  - Continue through clear, low-risk, reversible next steps automatically; ask only when the next step is materially branching, destructive, or preference-dependent.
26
24
 
27
- Delegates to the `code-reviewer` agent (THOROUGH tier) for deep analysis:
25
+ Delegates to the `code-reviewer` and `architect` agents in parallel for a two-lane review:
28
26
 
29
27
  1. **Identify Changes**
30
28
  - Run `git diff` to find changed files
31
29
  - Determine scope of review (specific files or entire PR)
32
30
 
33
- 2. **Review Categories**
31
+ 2. **Launch Parallel Review Lanes**
32
+ - **`code-reviewer` lane** - owns spec compliance, security, code quality, performance, and maintainability findings
33
+ - **`architect` lane** - owns the devil's-advocate / design-tradeoff perspective
34
+ - Both lanes run in parallel and produce distinct outputs before final synthesis
35
+
36
+ 3. **Review Categories**
34
37
  - **Security** - Hardcoded secrets, injection risks, XSS, CSRF
35
38
  - **Code Quality** - Function size, complexity, nesting depth
36
39
  - **Performance** - Algorithm efficiency, N+1 queries, caching
37
40
  - **Best Practices** - Naming, documentation, error handling
38
41
  - **Maintainability** - Duplication, coupling, testability
39
42
 
40
- 3. **Severity Rating**
43
+ 4. **Severity Rating**
41
44
  - **CRITICAL** - Security vulnerability (must fix before merge)
42
45
  - **HIGH** - Bug or major code smell (should fix before merge)
43
46
  - **MEDIUM** - Minor issue (fix when possible)
44
47
  - **LOW** - Style/suggestion (consider fixing)
45
48
 
46
- 4. **Specific Recommendations**
49
+ 5. **Architectural Status Contract**
50
+ - **CLEAR** - No unresolved architectural blocker was found
51
+ - **WATCH** - Non-blocking design/tradeoff concern that must appear in the final synthesis
52
+ - **BLOCK** - Unresolved design concern that prevents a merge-ready verdict
53
+
54
+ 6. **Specific Recommendations**
47
55
  - File:line locations for each issue
48
56
  - Concrete fix suggestions
49
57
  - Code examples where applicable
50
58
 
59
+ 7. **Final Synthesis**
60
+ - Combine the `code-reviewer` recommendation and the architect status into one final verdict
61
+ - Deterministic merge gating rules:
62
+ - If architect status is **BLOCK**, final recommendation is **REQUEST CHANGES**
63
+ - Else if `code-reviewer` recommendation is **REQUEST CHANGES**, final recommendation is **REQUEST CHANGES**
64
+ - Else if architect status is **WATCH**, final recommendation is **COMMENT**
65
+ - Else final recommendation follows the `code-reviewer` lane
66
+ - The final report must make architect blockers impossible to miss
67
+
51
68
  ## Agent Delegation
52
69
 
53
70
  ```
@@ -58,6 +75,8 @@ delegate(
58
75
 
59
76
  Review code changes for quality, security, and maintainability.
60
77
 
78
+ This is the code/spec/security lane. Do not absorb architectural ownership.
79
+
61
80
  Scope: [git diff or specific files]
62
81
 
63
82
  Review Checklist:
@@ -74,6 +93,29 @@ Output: Code review report with:
74
93
  - Fix recommendations
75
94
  - Approval recommendation (APPROVE / REQUEST CHANGES / COMMENT)"
76
95
  )
96
+
97
+ delegate(
98
+ role="architect",
99
+ tier="THOROUGH",
100
+ prompt="ARCHITECTURE / DEVIL'S-ADVOCATE REVIEW TASK
101
+
102
+ Review the same code changes from the architecture/tradeoff perspective.
103
+
104
+ Scope: [git diff or specific files]
105
+
106
+ Focus:
107
+ - System boundaries and interfaces
108
+ - Hidden coupling or long-term maintainability risks
109
+ - Tradeoff tension the main reviewer might miss
110
+ - Strongest counterargument against approving as-is
111
+
112
+ Output:
113
+ - Architectural Status: CLEAR / WATCH / BLOCK
114
+ - File:line evidence for each concern
115
+ - Concrete tradeoff or design recommendation"
116
+ )
117
+
118
+ Run both lanes in parallel, then synthesize them with the deterministic rules above.
77
119
  ```
78
120
 
79
121
  ## External Model Consultation (Preferred)
@@ -112,45 +154,59 @@ CODE REVIEW REPORT
112
154
  ==================
113
155
 
114
156
  Files Reviewed: 8
115
- Total Issues: 15
157
+ Total Issues: 12
158
+ Architectural Status: WATCH
116
159
 
117
160
  CRITICAL (0)
118
161
  -----------
119
162
  (none)
120
163
 
121
- HIGH (3)
164
+ HIGH (0)
122
165
  --------
166
+ (none)
167
+
168
+ MEDIUM (7)
169
+ ----------
123
170
  1. src/api/auth.ts:42
124
- Issue: User input not sanitized before SQL query
125
- Risk: SQL injection vulnerability
126
- Fix: Use parameterized queries or ORM
171
+ Issue: Email normalization logic is duplicated instead of reusing the shared helper
172
+ Risk: Validation rules can drift between authentication paths
173
+ Fix: Route both paths through the shared normalization helper
127
174
 
128
175
  2. src/components/UserProfile.tsx:89
129
- Issue: Password displayed in plain text in logs
130
- Risk: Credential exposure
131
- Fix: Remove password from log statements
176
+ Issue: Derived permissions are recalculated on every render
177
+ Risk: Avoidable work during profile refreshes
178
+ Fix: Memoize the derived permissions list or compute it upstream
132
179
 
133
180
  3. src/utils/validation.ts:15
134
- Issue: Email regex allows invalid formats
135
- Risk: Accepts malformed emails
136
- Fix: Use proven email validation library
137
-
138
- MEDIUM (7)
139
- ----------
140
- ...
181
+ Issue: Form-layer and server-layer validation messages are defined separately
182
+ Risk: User-facing validation guidance can become inconsistent
183
+ Fix: Share one validation message helper across both call sites
141
184
 
142
185
  LOW (5)
143
186
  -------
144
187
  ...
145
188
 
146
- RECOMMENDATION: REQUEST CHANGES
189
+ ARCHITECTURE WATCHLIST
190
+ ----------------------
191
+ - src/review/orchestrator.ts:88
192
+ Concern: Review result synthesis relies on implicit ordering rather than an explicit blocker contract
193
+ Status: WATCH
194
+ Recommendation: Define deterministic merge gating before expanding reviewers
195
+
196
+ SYNTHESIS
197
+ ---------
198
+ - code-reviewer recommendation: COMMENT
199
+ - architect status: WATCH
200
+ - final recommendation: COMMENT
201
+
202
+ RECOMMENDATION: COMMENT
147
203
 
148
- Critical security issues must be addressed before merge.
204
+ Address any WATCH concerns before treating the change as merge-ready.
149
205
  ```
150
206
 
151
207
  ## Review Checklist
152
208
 
153
- The code-reviewer agent checks:
209
+ The `code-reviewer` lane checks:
154
210
 
155
211
  ### Security
156
212
  - [ ] No hardcoded secrets (API keys, passwords, tokens)
@@ -180,11 +236,21 @@ The code-reviewer agent checks:
180
236
  - [ ] Tests for critical paths
181
237
  - [ ] No commented-out code
182
238
 
239
+ ## Architect Lane Checklist
240
+
241
+ The `architect` lane checks:
242
+
243
+ - [ ] Boundary or interface changes are explicit
244
+ - [ ] New coupling/tradeoff risks are surfaced
245
+ - [ ] Long-horizon maintainability concerns are evidence-backed
246
+ - [ ] Architectural status is one of `CLEAR`, `WATCH`, or `BLOCK`
247
+ - [ ] Any `BLOCK` concern cites the reason merge-ready status should be withheld
248
+
183
249
  ## Approval Criteria
184
250
 
185
- **APPROVE** - No CRITICAL or HIGH issues, minor improvements only
186
- **REQUEST CHANGES** - CRITICAL or HIGH issues present
187
- **COMMENT** - Only LOW/MEDIUM issues, no blocking concerns
251
+ **APPROVE** - `code-reviewer` returns APPROVE and architect status is `CLEAR`
252
+ **REQUEST CHANGES** - `code-reviewer` returns REQUEST CHANGES or architect status is `BLOCK`
253
+ **COMMENT** - `code-reviewer` returns COMMENT with architect status `CLEAR`, architect status is `WATCH`, or only LOW/MEDIUM improvements remain
188
254
 
189
255
 
190
256
  ## Scenario Examples
@@ -207,7 +273,7 @@ Includes coordinated review execution across specialized agents.
207
273
  ```
208
274
  /ralph code-review then fix all issues
209
275
  ```
210
- Review code, get feedback, fix until approved.
276
+ On the explicit Ralph path, review findings should flow into automatic fix follow-up without another permission prompt. Plain `code-review` itself remains read-only and does **not** promise auto-fix.
211
277
 
212
278
  **With Ultrawork:**
213
279
  ```
@@ -52,6 +52,7 @@ If no flag is provided, use **Standard**.
52
52
  - Reduce user effort: ask only the highest-leverage unresolved question, and never ask the user for codebase facts that can be discovered directly
53
53
  - For brownfield work, prefer evidence-backed confirmation questions such as "I found X in Y. Should this change follow that pattern?"
54
54
  - In Codex CLI, deep-interview uses `omx question` as the required OMX-owned structured questioning path for every interview round
55
+ - If you launch `omx question` in a background terminal, immediately wait for that background terminal to finish and read its JSON answer before scoring ambiguity, asking another round, or handing off
55
56
  - If `omx question` is unavailable in the current runtime, treat that as a blocker/error for deep-interview rather than falling back to `request_user_input` or plain-text questioning
56
57
  - Re-score ambiguity after each answer and show progress transparently
57
58
  - Do not hand off to execution while ambiguity remains above threshold unless user explicitly opts to proceed with warning
@@ -154,6 +155,96 @@ Round {n} | Target: {weakest_dimension} | Ambiguity: {score}%
154
155
  {question}
155
156
  ```
156
157
 
158
+ `omx question` payload guidance for interview rounds:
159
+ - Use canonical `type` values instead of authoring raw `multi_select` flags by hand. `type: "single-answerable"` is the default for one-path decisions; `type: "multi-answerable"` is the canonical shape for bounded multi-select rounds. The runtime will keep `multi_select` aligned with `type`.
160
+ - Use `single-answerable` when exactly one answer should drive the next branch, the options are mutually exclusive, or selecting more than one answer would blur the decision boundary. Typical cases: handoff lane selection, choosing the primary failure mode, or confirming which of several competing interpretations is correct.
161
+ - Use `multi-answerable` when multiple options may all be true at once and you need to capture a bounded set of coexisting constraints, non-goals, risks, or acceptance checks in one round. Typical cases: selecting all out-of-scope items, all success metrics that must hold, or all deployment constraints that apply together.
162
+ - If one selected option would immediately require a follow-up question to disambiguate the others, prefer a `single-answerable` round now and ask the follow-up next. Do not hide a branching interview tree inside one overloaded multi-select prompt.
163
+ - Keep interview options bounded and concrete. If the valid answers are already known, set `allow_other: false`; only leave `allow_other: true` when the interview genuinely needs one user-supplied option that cannot be enumerated in advance.
164
+ - Read answers structurally. For `single-answerable`, expect one decisive selection in `answer.value` plus `answer.selected_values`. For `multi-answerable`, treat `answer.selected_values` as the source of truth for all chosen constraints/non-goals and preserve the full set in the transcript/spec.
165
+
166
+ Canonical bounded single-choice payload:
167
+
168
+ ```json
169
+ {
170
+ "question": "Which execution lane should own this once the interview is complete?",
171
+ "type": "single-answerable",
172
+ "options": [
173
+ {
174
+ "label": "Plan first",
175
+ "value": "ralplan",
176
+ "description": "Need architecture and test-shape review before execution"
177
+ },
178
+ {
179
+ "label": "Execute directly",
180
+ "value": "autopilot",
181
+ "description": "Requirements are already explicit enough for planning plus execution"
182
+ },
183
+ {
184
+ "label": "Refine further",
185
+ "value": "refine",
186
+ "description": "Clarification is still needed before any handoff"
187
+ }
188
+ ],
189
+ "allow_other": false,
190
+ "other_label": "Other",
191
+ "source": "deep-interview"
192
+ }
193
+ ```
194
+
195
+ Canonical bounded multi-select payload:
196
+
197
+ ```json
198
+ {
199
+ "question": "Which non-goals must stay out of scope for the first pass?",
200
+ "type": "multi-answerable",
201
+ "options": [
202
+ {
203
+ "label": "No UI redesign",
204
+ "value": "no-ui-redesign",
205
+ "description": "Keep layout and styling unchanged"
206
+ },
207
+ {
208
+ "label": "No new dependencies",
209
+ "value": "no-new-dependencies",
210
+ "description": "Work within the existing toolchain"
211
+ },
212
+ {
213
+ "label": "No API contract changes",
214
+ "value": "no-api-contract-changes",
215
+ "description": "Preserve external request and response shapes"
216
+ }
217
+ ],
218
+ "allow_other": false,
219
+ "other_label": "Other",
220
+ "source": "deep-interview"
221
+ }
222
+ ```
223
+
224
+ Canonical answer-shape reminders:
225
+
226
+ ```json
227
+ {
228
+ "answer": {
229
+ "kind": "option",
230
+ "value": "ralplan",
231
+ "selected_labels": ["Plan first"],
232
+ "selected_values": ["ralplan"]
233
+ }
234
+ }
235
+ ```
236
+
237
+ ```json
238
+ {
239
+ "answer": {
240
+ "kind": "multi",
241
+ "value": ["no-new-dependencies", "no-api-contract-changes"],
242
+ "selected_labels": ["No new dependencies", "No API contract changes"],
243
+ "selected_values": ["no-new-dependencies", "no-api-contract-changes"]
244
+ }
245
+ }
246
+ ```
247
+
157
248
  ### 2c) Score ambiguity
158
249
  Score each weighted dimension in `[0.0, 1.0]` with justification + gap.
159
250