You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Keep <subagent> block architecture, incorporate main's new
"User questions (MANDATORY)" instructions into subagent prompts
for both start_unit/continue_unit and start_units cases.
https://claude.ai/code/session_01WtQrEmTYmoUheaP49HAei7
"| Design direction with previews | `pick_design_direction` MCP tool | Wireframe variants |\n"+
2614
-
`| Simple open-ended clarification | Conversation text | "Tell me more about the use case" |\n\n`+
2678
+
`| Simple open-ended clarification (no known options) | Conversation text | "Tell me more about the use case" |\n\n`+
2679
+
"### ALWAYS provide pre-selected options\n\n"+
2680
+
"When using `AskUserQuestion`, you MUST provide an `options` array with concrete choices the user can pick from. "+
2681
+
"You already know the domain — translate your knowledge into selectable options instead of forcing the user to type freeform answers. "+
2682
+
'Include an "Other (let me specify)" option when the list may not be exhaustive.\n\n'+
2683
+
'**Good:** `AskUserQuestion({ question: "Which auth strategy?", options: ["OAuth 2.0 + PKCE", "Magic link (passwordless)", "SSO via SAML", "Other (let me specify)"] })`\n'+
2684
+
'**Bad:** Typing "Which auth strategy should we use? We could do OAuth, magic links, or SSO..." as plain text.\n\n'+
2685
+
"### One question per tool call — break up compound questions\n\n"+
2686
+
"If you have multiple independent questions (e.g., auth strategy AND database choice AND caching layer), "+
2687
+
"do NOT combine them into a single long message. Instead:\n"+
2688
+
"- Use **separate `AskUserQuestion` calls** for each independent decision, OR\n"+
2689
+
"- Use **one `ask_user_visual_question` call** with multiple entries in the `questions[]` array (each with its own options) when the decisions are related and benefit from being seen together\n\n"+
2690
+
"Never dump multiple questions as numbered plain-text paragraphs.\n\n"+
2615
2691
`**Violation:** Outputting numbered questions, option lists, or "A) ... B) ... C) ..." as conversation text. `+
2616
-
"If you catch yourself typing options inline, STOP and use `AskUserQuestion` instead.\n\n"
"If you catch yourself typing options inline, STOP and use `AskUserQuestion` with an `options` array instead.\n\n"
2693
+
: "Mode: **autonomous** — elaborate independently. When you DO need user input (blockers, ambiguity), "+
2694
+
"use `AskUserQuestion` with pre-selected `options[]` — never plain-text option lists.\n\n"
2618
2695
}**Elaboration produces the PLAN, not the deliverables:**\n1. Research the problem space and write discovery artifacts to \`knowledge/\`\n2. Define units with scope, completion criteria, and dependencies — NOT the actual work product\n - A unit spec says WHAT will be produced and HOW to verify it\n - The execution phase produces the actual deliverables\n - Do NOT write full specs, schemas, or implementations during elaboration\n3. Write unit files to \`.haiku/intents/${slug}/stages/${stage}/units/\`\n4. Call \`haiku_run_next { intent: "${slug}" }\` — the orchestrator validates and opens the review gate\n\n**Unit file naming convention (REQUIRED):**\nFiles MUST be named \`unit-NN-slug.md\` where:\n- \`NN\` is a zero-padded sequence number (01, 02, 03...)\n- \`slug\` is a kebab-case descriptor (e.g., \`user-auth\`, \`data-model\`)\n- Example: \`unit-01-data-model.md\`, \`unit-02-api-endpoints.md\`\n\nFiles that don't match this pattern will not appear in the review UI and will block advancement.`,
2619
2696
)
2620
2697
@@ -2805,6 +2882,12 @@ function buildRunInstructions(
2805
2882
"6. Track outputs in unit frontmatter `outputs:` field",
2806
2883
"7. Use `ask_user_visual_question` for visual artifacts — do NOT open files in a browser",
2807
2884
`8. If outputs from a previous stage are missing: call \`haiku_revisit { intent: "${slug}" }\``,
2885
+
"",
2886
+
"**User questions (MANDATORY):** When you need user input:",
2887
+
"- Use `AskUserQuestion` with an `options[]` array for every decision that has known alternatives — NEVER output option lists as plain text",
2888
+
"- Use `ask_user_visual_question` when questions involve visual artifacts, rich markdown context, or multiple related decisions (use the `questions[]` array)",
2889
+
"- Break independent questions into separate tool calls — do NOT bundle unrelated decisions into one message",
2890
+
'- Always pre-populate options from your domain knowledge; include "Other (let me specify)" when the list may not be exhaustive',
2808
2891
)
2809
2892
subagentParts.push(instrLines.join("\n"))
2810
2893
@@ -3005,6 +3088,12 @@ function buildRunInstructions(
3005
3088
"6. Track outputs in unit frontmatter `outputs:` field",
3006
3089
"7. Use `ask_user_visual_question` for visual artifacts — do NOT open files in a browser",
3007
3090
`8. If outputs from a previous stage are missing: call \`haiku_revisit { intent: "${slug}" }\``,
3091
+
"",
3092
+
"**User questions (MANDATORY):** When you need user input:",
3093
+
"- Use `AskUserQuestion` with an `options[]` array for every decision that has known alternatives — NEVER output option lists as plain text",
3094
+
"- Use `ask_user_visual_question` when questions involve visual artifacts, rich markdown context, or multiple related decisions (use the `questions[]` array)",
3095
+
"- Break independent questions into separate tool calls — do NOT bundle unrelated decisions into one message",
3096
+
'- Always pre-populate options from your domain knowledge; include "Other (let me specify)" when the list may not be exhaustive',
0 commit comments