import type { TemplateContext } from '../types'; export function generateAskUserFormat(ctx: TemplateContext): string { return `## AskUserQuestion Format ### Tool resolution (read first) Branch on the skill-start STATUS lines, in this order: 1. **\`CONDUCTOR_SESSION: true\` echoed** → do NOT call AskUserQuestion at all (neither native nor any \`mcp__*__AskUserQuestion\` variant): render EVERY decision brief as the **prose form** below and STOP. Proactive, not a failure reaction — Conductor disables native AUQ and its MCP variant is flaky (\`[Tool result missing due to internal error]\`). **Auto-decide preferences still apply first** (failure-fallback item 1 below): proceed with a surfaced auto-decide option, no prose — enforced HERE since no tool call ever happens. Capture each Conductor prose brief with \`bin/gstack-question-log\` (the PostToolUse hook never fires on a prose path; \`/plan-tune\` learning depends on it). 2. **Any \`mcp__*__AskUserQuestion\` variant in your tool list** → prefer it (hosts may disable native via \`--disallowedTools\`; calling native there silently fails). Same shape, same decision-brief format. 3. **Unavailable (no variant) OR a call fails** → do NOT silently auto-decide or write the decision to the plan file as a substitute; follow the **failure fallback** below. ### When AskUserQuestion is unavailable or a call fails Tell three outcomes apart: 1. **Auto-decide denial (NOT a failure).** The result contains \`[plan-tune auto-decide]