[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7590WAPQ1DJH9D8DP89HNEV":3,"skill-same:01M7590WAPQ1DJH9D8DP89HNEV":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":14,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M7590WAPQ1DJH9D8DP89HNEV","ag-intent-clarify",null,"Clarify intent before RIPER-5 phase delegation. Scores ambiguity (4 signals); generates structured multi-choice questions for Tier 2. Two-mode: SIMPLE and DEEP.","ngxccc\u002Fagent-skills-kit","ngxccc","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F163379246?v=4","01M758XVG64QK26AGK0WKB26TB","Ngoc Tran","01M758XVHB8J6MHV0YTBVDBXCA",0,"MIT","https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fag-intent-clarify\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: ag-intent-clarify\ndescription: \"Clarify intent before RIPER-5 phase delegation. Scores ambiguity (4 signals); generates structured multi-choice questions for Tier 2. Two-mode: SIMPLE and DEEP.\"\ntrigger_keywords: intent clarification, ambiguity score, routing tier, clarify request\nlayer: contract\n---\n\n# ag-intent-clarify\n\n## When to Apply\n\nUse this skill when working with ag-intent-clarify workflows, tasks, or system specifications.\n\n## How to Use\n\nRefer to the workflow instructions and command references detailed below.\n\n> Output style: lead each question with the recommended option; plain language, no filler — `process\u002Fdevelopment-protocols\u002Fcommunication-standards.md`.\n\nTwo-mode intent clarification: SIMPLE (direct, 3-5 reads) and DEEP (research subagent first, then questions).\n\nScores a user request's ambiguity and — when Tier 2 triggers — produces a structured, multi-dimension clarification suite with option-rich questions rather than open-ended prompts. Uses ag-scenario, ag-predict, and ag-sequential-thinking style reasoning to generate questions, not just to answer them.\n\nThis is the highest-leverage skill in the system. Poor intent clarification wastes entire phase programs. Invest in the question generation step.\n\n---\n\n## When To Invoke\n\nAt ORCHESTRATOR before every routing decision for new user requests. Check auto-skip conditions first. If none apply, score the four signals and act on the resulting tier.\n\n---\n\n## Auto-Skip Conditions\n\nThese conditions force Tier 0 regardless of the ambiguity score. Check these FIRST.\n\n1. Continuation phrases — \"go\", \"continue\", \"proceed\", \"just do it\", or similar standalone instruction\n2. Mid-phase-program execution — active phase plan is selected and approved, user is advancing\n3. Trivial fix — single-file, under 15 lines, no schema\u002FAPI\u002Fauth changes\n4. Explicit mode command — \"ENTER EXECUTE MODE\", \"ENTER RESEARCH MODE\", etc.\n5. Resuming active plan — an existing active plan is identified and confirmed\n6. Pure information question — \"What is X?\", \"How does Y work?\" mapping to a single obvious routing target\n\nWhen an auto-skip condition matches, produce only a 1-sentence restatement of intent and route immediately per the existing routing protocol. Do not announce the tier. Do not surface any questions.\n\n**Priority ordering when multiple conditions match simultaneously:**\n\n1. Explicit mode command (highest priority)\n2. \u002Fgoal mid-program execution\n3. Continuation phrase\n4. Trivial fix \u002F active-plan resume (lowest priority)\n5. Pure information question \u002F resuming active plan (lowest priority — treated as Tier 0, auto-route to ag-research-agent or answer directly)\n\nApply only the highest-priority matching condition's abbreviated behavior. Do not combine behaviors from multiple matching conditions.\n\n**Under \u002Fgoal autonomous execution:** Even when an auto-skip condition matches and Tier 0 applies, the 1-sentence restatement MUST be emitted to the chat log as an audit entry. Never skip the restatement emit under \u002Fgoal — it proves Tier-0 ran and serves as the audit log for that phase's intent confirmation.\n\n---\n\n## 4-Signal Scoring Formula\n\nEach signal is worth +1. Sum to get the ambiguity score.\n\n| Signal            | Description                                                      |\n| ----------------- | ---------------------------------------------------------------- |\n| Ambiguous scope   | Request touches multiple features or packages without naming one |\n| No explicit path  | No file, package, or feature name mentioned                      |\n| Multiple intents  | Request could be a bug fix, feature, refactor, or question       |\n| First interaction | No established workflow context in current session               |\n\nScore thresholds:\n\n| Score | Tier   | Action                                      |\n| ----- | ------ | ------------------------------------------- |\n| 0–1   | Tier 0 | Auto-route silently                         |\n| 2     | Tier 1 | Show routing summary, wait for confirmation |\n| 3+    | Tier 2 | Full structured clarification suite         |\n\n---\n\n## Mode Selection\n\nBefore running any tier, the orchestrator selects the operating mode. Mode affects only HOW option values are populated in questions — the question FORMAT, CRITICAL\u002FUSEFUL grouping, and wait-for-go-ahead footer are identical in both modes.\n\n### SIMPLE MODE (default)\n\n- Orchestrator runs the skill directly in the main thread\n- 3–5 file reads max (the Light Research Pass below)\n- Works when concrete option values can be derived from active plans + context routing alone\n- No subagent spawning\n\n**Trigger conditions (all must be true for SIMPLE):**\n\n- Ambiguity score ≤ 3\n- Request is scoped to a known file, package, or named feature\n- Orchestrator can fill option values from active plans + context routing alone\n- Continuation, resume, or single-package scenario\n\n### DEEP MODE\n\n- Spawns a full research subagent BEFORE generating questions\n- The subagent returns structured findings; the orchestrator uses those findings to populate question options with real file paths, concrete values, and risk-aware implications\n- No generic `{X}` placeholders ever — this mode's entire purpose is to eliminate them\n- Questions are materially better because they are grounded in actual codebase discovery\n\n**Trigger conditions (any ONE triggers DEEP):**\n\n- Ambiguity score is 4\u002F4 (all four signals)\n- Request involves a phase program kickoff (new umbrella + N phases)\n- Request touches 3+ packages or feature folders\n- Request involves an architectural decision (new pattern, library swap, schema design)\n- User explicitly requests deep analysis (\"deep dive\", \"investigate before asking\", \"thorough\")\n- Orchestrator judges that good option values CANNOT be generated without a codebase scan\n\n---\n\n## Deep Mode — Research Subagent Protocol\n\nWhen DEEP MODE is triggered, the orchestrator spawns a research subagent before generating questions. The subagent's only job is to return raw findings — it does NOT generate questions.\n\n### Research Subagent Prompt Template\n\nPass this prompt to the subagent verbatim, substituting the bracketed values:\n\n```\nINTENT CLARIFY — DEEP MODE RESEARCH\nRequest: [user's exact request]\nRelevant feature: [if known, else \"unknown\"]\nActive plans found: [list from plan-discovery]\n\nYour job: investigate the request deeply so the orchestrator can generate high-quality clarifying questions.\n\nRequired steps (all must run):\n1. ag-review-situation — current branch, worktrees, active plans, uncommitted changes\n2. ag-scout — scan codebase for files\u002Fmodules relevant to: [keywords from request]\n3. ag-sequential-thinking — map the decision dimensions: what must be decided first? what is downstream?\n4. ag-scenario — for each plausible interpretation: what are the top 3 failure modes?\n5. ag-predict — 5-persona debate: senior dev \u002F PM \u002F security reviewer \u002F QA \u002F end user — what does each want to know before starting?\n\nReturn structured output with these sections:\n- DISCOVERED CONTEXT: actual file paths, module names, package names found\n- DECISION DIMENSIONS: ordered list of decisions that have downstream impact\n- RISK SURFACE: for each interpretation, top 2 failure modes\n- PERSONA DISAGREEMENTS: what different stakeholders would want prioritized differently\n- CONCRETE VALUES: real paths, command strings, feature names to use in question options\n\nDo NOT generate questions — that is the orchestrator's job. Just return raw findings.\n```\n\n### After Receiving Subagent Output\n\nThe orchestrator uses the subagent's `DISCOVERED CONTEXT` and `CONCRETE VALUES` sections to replace every option value in the Tier 2 question suite. The question generation steps (Steps 1–6 in Tier 2 below) proceed as normal, but option text is populated from real findings instead of the light research pass.\n\n---\n\n## Tier 0: Silent Auto-Route\n\nNo user interaction added. Score 0–1 or auto-skip triggered.\n\nRoute to the detected agent per the existing routing protocol. Do not show a routing summary.\n\n---\n\n## Tier 1: Routing Summary\n\nPerform a light research pass (see section below). Then present:\n\n```\nRouting: [detected intent] → [target agent]\nScope: [what I think you want changed]\nPlan: [existing plan if found, or \"new work\"]\n```\n\nWAIT for the user's next message before routing. Do NOT route in the same response. Do NOT say \"I'll proceed unless you correct me.\"\n\nIf the user confirms, proceed. If the user corrects, re-score and re-route.\n\n---\n\n## Tier 2: Full Structured Clarification Suite\n\nTier 2 is the core of this skill. When triggered, the orchestrator does the following:\n\n### Step 1 — Research pass (mode-dependent)\n\n**In SIMPLE MODE:** Perform a light research pass (see Light Research Pass section). Budget: 3–5 file reads. Scan active plans, context routing table, recent git state, and the named file\u002Fpackage if any. This populates concrete values in question options.\n\n**In DEEP MODE:** The research subagent has already run (see Deep Mode section above) and returned structured findings. Use the `DISCOVERED CONTEXT` and `CONCRETE VALUES` sections from those findings instead of performing a light research pass. Skip the 3–5 file read budget — the subagent already covered it.\n\nIn both modes, the goal of Step 1 is identical: replace every generic placeholder in question options with concrete values (package paths, plan IDs, file names, feature names).\n\n### Step 2 — Question generation using ag-scenario + ag-predict style reasoning\n\nBefore writing the questions, THINK across these axes:\n\n- What are the plausible failure modes if we pick the wrong scope? (ag-scenario thinking)\n- What would 5 different people (senior dev, PM, security reviewer, QA, end user) want to know before starting? (ag-predict thinking)\n- What ordering of decisions has the most downstream impact? (ag-sequential-thinking)\n\nUse this analysis to GENERATE questions — not to answer them. The goal is to surface the decisions that, if made wrong, will cause the most rework.\n\n### Step 3 — Classify each dimension as CRITICAL or USEFUL\n\n- **CRITICAL** — getting this wrong derails the entire phase or causes rework\n- **USEFUL** — helpful context but can default to recommendation without blocking\n\nCRITICAL dimensions appear first. The user can say \"skip useful questions\" to answer only CRITICAL ones.\n\n### Step 4 — Format each question using AskUserQuestion tool\n\n**REQUIRED: use the `AskUserQuestion` tool to render all Tier 2 questions.** Do NOT render questions as markdown text. The AskUserQuestion tool renders clickable option selections in the Claude Code UI, which is far faster for the user than typing answers.\n\n**How to call it:**\n\n- Pass all questions in a single `AskUserQuestion` call (up to 4 per call)\n- Group CRITICAL questions into the first call(s), USEFUL questions after\n- Use `multiSelect: false` for mutually exclusive choices (default)\n- Use `multiSelect: true` only when the user genuinely needs to pick multiple options (e.g. \"which packages are in scope\")\n- The `header` field (max 12 chars) is the chip label — use the dimension name abbreviated\n- Set `description` to the 1–2 sentence consequence explanation\n- Each option `label` is the short choice text; `description` is the implication\n\n**Option rules (same as before, now applied to AskUserQuestion fields):**\n\n- Minimum 3 options per question (the tool supports up to 4; always include an \"Other\" option as the last one)\n- Mark exactly one option as `(Recommended)` by appending it to the label: `\"Sequential — single agent (Recommended)\"`\n- Fill option labels with concrete values from the research pass (real file paths, package names, plan IDs) — never generic placeholders\n- The \"Other\" option label: `\"Other\"` with description: `\"Describe your preference in the next message\"`\n\n**If AskUserQuestion is unavailable** (tool not in scope, non-interactive context): fall back to the markdown format below, but always prefer the tool when available.\n\n```\n**Q[N]: [Question title]**\n[1–2 sentences explaining why this decision matters and what goes wrong if we choose incorrectly.]\n\nOptions:\n  A) [option] — [implication] *(Recommended)*\n  B) [option] — [implication]\n  C) [option] — [implication]\n  D) Other: describe your preference\n```\n\n### Step 5 — Group questions by dimension with headers\n\nEach dimension header format:\n\n```\n### [Dimension name] 🔴 CRITICAL\n```\n\nor\n\n```\n### [Dimension name] 🟡 USEFUL\n```\n\n### Step 6 — Emit wait-for-go-ahead footer\n\nAfter all questions, always emit:\n\n> Answer what you want — partial answers are fine. I'll use the _(Recommended)_ defaults for anything you skip. Ready to proceed when you confirm.\n\nDo NOT route to any subagent before receiving at least a partial response or explicit \"go\".\n\n---\n\n## The 8 Standard Dimensions\n\nFor a substantial request, cover all 8 dimensions. For a narrower request, use only the dimensions that are genuinely ambiguous. Do not pad — every question should require a real decision.\n\n### Dimension 1 — Scope and Boundaries 🔴 CRITICAL\n\nClarify what changes and — equally important — what must NOT change.\n\nExample questions:\n\n- Which packages\u002Ffiles are in scope?\n- Are there components or APIs that must remain untouched?\n- Is this isolated to one package or cross-cutting?\n\n### Dimension 2 — Success Criteria 🔴 CRITICAL\n\nClarify what the user truly wants to see as a result.\n\nExample questions:\n\n- What does \"done\" look like to you?\n- Is the goal a passing test suite, a deployed change, a passing code review, or visible UI behavior?\n- Is there a specific user action or flow that must work?\n\n### Dimension 3 — Failure Modes and Risk Surface 🔴 CRITICAL\n\nClarify what the user is most worried about going wrong.\n\nExample questions:\n\n- What are the most likely ways this change breaks something?\n- Are there auth, billing, schema, or public API surfaces this touches?\n- Is there a rollback requirement?\n\n### Dimension 4 — Prior Context 🟡 USEFUL\n\nClarify what has already been tried or is already in progress.\n\nExample questions:\n\n- Is there an existing plan file for this?\n- Has this been attempted before? What happened?\n- Is this a continuation of recent work (visible in git status or active plans)?\n\n### Dimension 5 — Priority and Urgency 🟡 USEFUL\n\nClarify the expected speed\u002Fquality tradeoff.\n\nExample questions:\n\n- Is this a hotfix that needs to ship now, or a proper implementation with full plan\u002Ftest coverage?\n- Does this block other work in flight?\n- Quick patch acceptable, or must it be production-grade immediately?\n\n### Dimension 6 — Autonomy Boundaries 🟡 USEFUL\n\n> **Autopilot Mode — CRITICAL promotion:** When an autopilot trigger phrase is detected,\n> Dimension 6 is treated as 🔴 CRITICAL rather than 🟡 USEFUL. It must appear in the\n> first AskUserQuestion call alongside the CRITICAL dimensions, not after them. The question\n> must explicitly name the three hard stops and ask the user to confirm they understand those\n> remain manual-first gates.\n\nClarify how much the agent can decide on its own vs. checkpoint with the user.\n\nExample questions:\n\n- Can the agent pick the implementation approach, or does the user want to choose?\n- Should the agent pause for approval before destructive changes (schema migrations, API removals)?\n- Is a \u002Fgoal-style autonomous run acceptable, or does each phase need a checkpoint?\n\nAutopilot-specific example (when trigger detected):\n\n- \"This run will proceed autonomously. The following gates remain manual regardless:\n  (1) irreversible\u002Foutward-facing actions not in the validate-contract,\n  (2) live-provider billed feasibility probes (cost-class: needs-live-provider),\n  (3) cascade BLOCKED (two consecutive phases BLOCKED). All other gates auto-proceed.\n  Are there any additional gates you want to keep manual for this run?\"\n\n### Dimension 7 — Technical Constraints 🟡 USEFUL\n\nClarify any specific libraries, patterns, or constraints the solution must conform to.\n\nExample questions:\n\n- Is there a specific library or pattern required?\n- Are there style\u002Flint rules that constrain the approach?\n- Must the solution work in a specific runtime environment (Bun vs Node, edge vs server)?\n\n### Dimension 8 — Phase Program Questions 🔴 CRITICAL (multi-phase only)\n\nOnly include when the request implies multiple dependent phases or a long-running program.\n\nExample questions:\n\n- Should phases run sequentially or can some parallelize?\n- Which phase is the hard dependency for the rest?\n- What is the acceptable stopping point if a later phase is blocked?\n\n---\n\n## Full Tier 2 Example\n\nBelow is a complete example of good Tier 2 output for a request like \"refactor the billing flow to add credit top-up support.\"\n\n---\n\n**Intent understood:** Add credit top-up support to the billing flow. Before routing, I need to resolve a few key decisions.\n\n---\n\n### Scope and Boundaries 🔴 CRITICAL\n\n**Q1: Which layers does this change touch?**\nGetting scope wrong here means re-opening files mid-phase and invalidating earlier test gates.\n\nOptions:\nA) Prisma schema + tRPC billing router + UI billing page — full stack _(Recommended)_\nB) tRPC billing router + UI only — skip schema migration for now\nC) UI only — wire to existing endpoints, validate assumptions first\nD) Other: describe your preference\n\n**Q2: Which existing billing surfaces must NOT change?**\nWe need to know what is off-limits before touching shared code paths.\n\nOptions:\nA) Stripe webhook handlers and subscription models are frozen _(Recommended)_\nB) Only the credit transaction model is frozen\nC) Nothing is frozen — all billing code is in scope\nD) Other: describe your preference\n\n---\n\n### Success Criteria 🔴 CRITICAL\n\n**Q3: What does \"done\" look like?**\nIf the success bar is wrong, the agent will stop too early or overshoot.\n\nOptions:\nA) User can trigger a top-up from the UI and credit balance updates — end-to-end _(Recommended)_\nB) Backend complete with tests passing; UI is out of scope for this phase\nC) Plan written and approved — no implementation yet\nD) Other: describe your preference\n\n---\n\n### Failure Modes and Risk Surface 🔴 CRITICAL\n\n**Q4: Is there a risk surface we must protect?**\nBilling changes can silently double-charge or under-credit users if guard logic is missing.\n\nOptions:\nA) Add explicit idempotency key to the top-up Stripe call _(Recommended)_\nB) No idempotency needed — amount is small enough that duplicates are acceptable\nC) Not sure — flag for code review\nD) Other: describe your preference\n\n---\n\n### Priority and Urgency 🟡 USEFUL\n\n**Q5: Speed vs. quality tradeoff?**\nAffects whether we write a full plan with validate-contract or skip to a lightweight execute.\n\nOptions:\nA) Proper plan + validate-contract + full test coverage _(Recommended)_\nB) Quick implementation with tests deferred to a follow-up\nC) Research and plan only — no implementation this session\nD) Other: describe your preference\n\n---\n\n> Answer what you want — partial answers are fine. I'll use the _(Recommended)_ defaults for anything you skip. Ready to proceed when you confirm.\n\n---\n\n## Bad vs. Good Question Format\n\nUnderstanding the failure modes in question generation:\n\n### Bad (open-ended, no options)\n\n```\nQ: What scope should the refactor cover?\n```\n\nThis forces the user to type a free-form answer. Slow. Vague. Hard to act on.\n\n### Bad (only 2 options, no recommendation marked)\n\n```\nQ: Full stack or UI only?\n  A) Full stack\n  B) UI only\n```\n\nBinary questions miss the third path. No recommendation means the user has no default to accept.\n\n### Bad (generic placeholders left in)\n\n```\nQ: Which areas? [A] just {X} [B] {X} and {Y}\n```\n\nPlaceholders not replaced with concrete values from light research. Signals the skill was invoked lazily.\n\n### Good\n\n```\n**Q1: Which packages does this refactor touch?**\nScope determines which test gates apply and which blast-radius files need review before touching code.\n\nOptions:\n  A) packages\u002Fapi\u002Fsrc\u002Frouter\u002Fbilling.ts + apps\u002Fweb\u002Fsrc\u002Fapp\u002Fbilling — full stack *(Recommended)*\n  B) apps\u002Fweb\u002Fsrc\u002Fapp\u002Fbilling only — frontend changes, read-only backend exploration\n  C) packages\u002Fapi\u002Fsrc\u002Frouter\u002Fbilling.ts only — backend logic, no UI changes yet\n  D) Other: describe your preferred scope\n```\n\n---\n\n## Autonomy Mode\n\n### What Grants Autonomy\n\n- Explicit autonomy phrases: \"you decide\", \"just do it\", \"full autonomy\", \"don't ask\", \"autonomous\"\n- Mid-phase-program context where the current phase plan is selected and approved\n- User has answered Tier 2 questions and said \"go\"\n- Autopilot Mode trigger phrase detected (see `orchestration.md §Autopilot Trigger Routing`):\n  autonomy is granted for the full run scope. Dimension 6 (Autonomy Boundaries) is treated as\n  CRITICAL rather than USEFUL for this session.\n\n### Phrase Matching Rule\n\nAutonomy phrases must be standalone statements or sentence-initial. They do NOT match when embedded in descriptive text.\n\n- \"just do it\" (standalone) → autonomy granted\n- \"just do the simple version\" → NOT autonomy (descriptive use, user is specifying scope)\n- \"you decide how to implement it\" → autonomy granted\n\n### What Autonomy Means\n\n- All tiers collapse to Tier 0 for the current task chain\n- Clarification questions are skipped\n- Routing summaries are skipped\n\n### What Autonomy Does NOT Override\n\n- EXECUTE approval gate (\"ENTER EXECUTE MODE\" still required)\n- Plan review checkpoint\n- Phase-program phase boundaries\n- High-risk execution handoff gates\n- The Consolidated Autopilot Clarification Round (see §Autopilot Clarification Mode below) —\n  autopilot grants autonomy for the run, but the clarification round itself still fires once\n  to lock the session. It is a different gate from the standard intent-clarify suite.\n\n---\n\n## Autopilot Clarification Mode\n\nWhen an autopilot trigger is detected (see `orchestration.md §Autopilot Trigger Routing`),\nthe standard Tier 0\u002F1\u002F2 scoring flow is bypassed. A single **Consolidated Autopilot\nClarification Round** replaces it.\n\n**When This Mode Fires:** The orchestrator sets autopilot clarification mode when a recognized\nautopilot trigger phrase is detected at any RIPER-5 phase boundary. The trigger detection and\nphrase list live in `orchestration.md §Autopilot Trigger Routing` — this skill does not own\nthe detection logic.\n\n**Consolidated-Round Rule:** Issue exactly ONE `AskUserQuestion` call covering all four mandatory\ndimensions in a single round-trip: (1) Scope and task name (CRITICAL), (2) Definition of done\n(CRITICAL), (3) Risk tolerance \u002F Hard-stop confirm (CRITICAL = Dimension 6 promoted), (4) Gate\ndeviations (CRITICAL). After the user responds, the session is locked and the orchestrator\nproceeds to emit the provisional goal block.\n\n**Abort-to-Interactive Rule:** If the user responds to the consolidated round with a phrase\nopting out of autopilot (\"actually, let's do this step by step\", \"cancel autopilot\", \"stop\",\n\"interactive please\"): (1) Acknowledge the opt-out, (2) Revert to standard RIPER-5 interactive\nbehavior, (3) Re-issue the standard Combined Clarification Gate (Step 6.5), (4) Do NOT emit\nthe provisional goal block, (5) Deactivate autopilot-mode for this session.\n\n**Validator Conformance:** Autopilot clarification output MUST include all four validator markers:\nrestatement, score (always 4\u002F4 under autopilot), mode (always deep for phase-program kickoffs),\nreason\u002Fbecause justification. Full spec: `process\u002Fdevelopment-protocols\u002Fautopilot.md §Consolidated Clarification Round`.\n\n---\n\n## Light Research Pass\n\n**Used in SIMPLE MODE only.** In DEEP MODE, the research subagent replaces this step entirely.\n\nPerformed by the orchestrator in the main thread, not as a subagent delegation.\n\nBudget: 3–5 file reads max.\n\nWhat it checks:\n\n1. Active plan inventory (`process\u002Fgeneral-plans\u002Factive\u002F` and `process\u002Ffeatures\u002F*\u002Factive\u002F`)\n2. Context routing table in `process\u002Fcontext\u002Fall-context.md` (match keywords to domain)\n3. Recent git status (uncommitted changes related to the request?)\n4. If a specific package or file is named, one quick read of that file\n\nPurpose: replace generic placeholders in question options with concrete names (package paths, plan IDs, model names, router file names). A question with concrete values is 3× more actionable than one with `{X}`.\n\nThis is NOT a full research-agent delegation. Route to research-agent after clarification resolves.\n\n---\n\n## Intent Revalidation After Research\n\nAfter the research-agent completes, the orchestrator checks whether the original intent still holds.\n\nIf research reveals the request is fundamentally different from what was assumed, re-present a Tier 1 routing summary with updated understanding.\n\nIf research confirms the original intent, proceed to INNOVATE or PLAN without re-asking. Never repeat clarification that was already resolved.\n\n---\n\n## FAST Mode Integration\n\nIntent clarification fires BEFORE the fast-mode agent is spawned. The orchestrator scores and clarifies in the main thread, then hands the clarified intent to the fast-mode-agent prompt.\n\nInside the fast-mode-agent, no additional clarification is needed — intent is already resolved.\n\n---\n\n## Fallback (Still Ambiguous After Tier 2)\n\nIf the user answers Tier 2 questions but a single routing path still cannot be determined:\n\n1. State what remains unclear in one sentence.\n2. Ask one final direct question (plain, not multiple-choice).\n3. If still unresolvable after that, default to the research-agent with the narrowest reasonable scope.\n\nNever loop clarification more than twice. Two rounds max, then route to research.\n\n---\n\n## Worked Scoring Examples\n\n**Example A — \"Fix the login bug on the auth page\"**\n\n- Ambiguous scope: No (+0) — \"auth page\" is a specific scope\n- No explicit path: Yes (+1) — no file named, but scope is narrow\n- Multiple intents: No (+0) — single intent (fix)\n- First interaction: No (+0)\n\nScore: 1 → Tier 0, auto-route to debugger\u002Fexecute.\n\n**Example B — \"Make the app faster\"**\n\n- Ambiguous scope: Yes (+1) — bundle size, API perf, rendering, caching all possible\n- No explicit path: Yes (+1) — no file or package named\n- Multiple intents: Yes (+1) — refactor, config change, infra work, or research\n- First interaction: Yes (+1)\n\nScore: 4 → Tier 2, full structured clarification suite.\nGenerate questions across Scope, Success Criteria, Failure Modes, Priority, Technical Constraints (all dimensions where \"faster\" is ambiguous).\n\n**Example C — \"Add a top-up button to the billing page\"**\n\n- Ambiguous scope: No (+0) — billing page is named\n- No explicit path: Yes (+1) — no file path\n- Multiple intents: Yes (+1) — could stop at UI only or require schema\u002FStripe changes\n- First interaction: Yes (+1)\n\nScore: 3 → Tier 2, but only 3–4 questions covering Scope, Success Criteria, Risk Surface (billing-specific failure modes). Skip Autonomy Boundaries and Phase Program since it's a single-phase feature.\n\n## References\n\n- [process\u002Fcontext\u002Fall-context.md](process\u002Fcontext\u002Fall-context.md)\n","# ag-intent-clarify\n\n## When to Apply\n\nUse this skill when working with ag-intent-clarify workflows, tasks, or system specifications.\n\n## How to Use\n\nRefer to the workflow instructions and command references detailed below.\n\n> Output style: lead each question with the recommended option; plain language, no filler — `process\u002Fdevelopment-protocols\u002Fcommunication-standards.md`.\n\nTwo-mode intent clarification: SIMPLE (direct, 3-5 reads) and DEEP (research subagent first, then questions).\n\nScores a user request's ambiguity and — when Tier 2 triggers — produces a structured, multi-dimension clarification suite with option-rich questions rather than open-ended prompts. Uses ag-scenario, ag-predict, and ag-sequential-thinking style reasoning to generate questions, not just to answer them.\n\nThis is the highest-leverage skill in the system. Poor intent clarification wastes entire phase programs. Invest in the question generation step.\n\n---\n\n## When To Invoke\n\nAt ORCHESTRATOR before every routing decision for new user requests. Check auto-skip conditions first. If none apply, score the four signals and act on the resulting tier.\n\n---\n\n## Auto-Skip Conditions\n\nThese conditions force Tier 0 regardless of the ambiguity score. Check these FIRST.\n\n1. Continuation phrases — \"go\", \"continue\", \"proceed\", \"just do it\", or similar standalone instruction\n2. Mid-phase-program execution — active phase plan is selected and approved, user is advancing\n3. Trivial fix — single-file, under 15 lines, no schema\u002FAPI\u002Fauth changes\n4. Explicit mode command — \"ENTER EXECUTE MODE\", \"ENTER RESEARCH MODE\", etc.\n5. Resuming active plan — an existing active plan is identified and confirmed\n6. Pure information question — \"What is X?\", \"How does Y work?\" mapping to a single obvious routing target\n\nWhen an auto-skip condition matches, produce only a 1-sentence restatement of intent and route immediately per the existing routing protocol. Do not announce the tier. Do not surface any questions.\n\n**Priority ordering when multiple conditions match simultaneously:**\n\n1. Explicit mode command (highest priority)\n2. \u002Fgoal mid-program execution\n3. Continuation phrase\n4. Trivial fix \u002F active-plan resume (lowest priority)\n5. Pure information question \u002F resuming active plan (lowest priority — treated as Tier 0, auto-route to ag-research-agent or answer directly)\n\nApply only the highest-priority matching condition's abbreviated behavior. Do not combine behaviors from multiple matching conditions.\n\n**Under \u002Fgoal autonomous execution:** Even when an auto-skip condition matches and Tier 0 applies, the 1-sentence restatement MUST be emitted to the chat log as an audit entry. Never skip the restatement emit under \u002Fgoal — it proves Tier-0 ran and serves as the audit log for that phase's intent confirmation.\n\n---\n\n## 4-Signal Scoring Formula\n\nEach signal is worth +1. Sum to get the ambiguity score.\n\n| Signal            | Description                                                      |\n| ----------------- | ---------------------------------------------------------------- |\n| Ambiguous scope   | Request touches multiple features or packages without naming one |\n| No explicit path  | No file, package, or feature name mentioned                      |\n| Multiple intents  | Request could be a bug fix, feature, refactor, or question       |\n| First interaction | No established workflow context in current session               |\n\nScore thresholds:\n\n| Score | Tier   | Action                                      |\n| ----- | ------ | ------------------------------------------- |\n| 0–1   | Tier 0 | Auto-route silently                         |\n| 2     | Tier 1 | Show routing summary, wait for confirmation |\n| 3+    | Tier 2 | Full structured clarification suite         |\n\n---\n\n## Mode Selection\n\nBefore running any tier, the orchestrator selects the operating mode. Mode affects only HOW option values are populated in questions — the question FORMAT, CRITICAL\u002FUSEFUL grouping, and wait-for-go-ahead footer are identical in both modes.\n\n### SIMPLE MODE (default)\n\n- Orchestrator runs the skill directly in the main thread\n- 3–5 file reads max (the Light Research Pass below)\n- Works when concrete option values can be derived from active plans + context routing alone\n- No subagent spawning\n\n**Trigger conditions (all must be true for SIMPLE):**\n\n- Ambiguity score ≤ 3\n- Request is scoped to a known file, package, or named feature\n- Orchestrator can fill option values from active plans + context routing alone\n- Continuation, resume, or single-package scenario\n\n### DEEP MODE\n\n- Spawns a full research subagent BEFORE generating questions\n- The subagent returns structured findings; the orchestrator uses those findings to populate question options with real file paths, concrete values, and risk-aware implications\n- No generic `{X}` placeholders ever — this mode's entire purpose is to eliminate them\n- Questions are materially better because they are grounded in actual codebase discovery\n\n**Trigger conditions (any ONE triggers DEEP):**\n\n- Ambiguity score is 4\u002F4 (all four signals)\n- Request involves a phase program kickoff (new umbrella + N phases)\n- Request touches 3+ packages or feature folders\n- Request involves an architectural decision (new pattern, library swap, schema design)\n- User explicitly requests deep analysis (\"deep dive\", \"investigate before asking\", \"thorough\")\n- Orchestrator judges that good option values CANNOT be generated without a codebase scan\n\n---\n\n## Deep Mode — Research Subagent Protocol\n\nWhen DEEP MODE is triggered, the orchestrator spawns a research subagent before generating questions. The subagent's only job is to return raw findings — it does NOT generate questions.\n\n### Research Subagent Prompt Template\n\nPass this prompt to the subagent verbatim, substituting the bracketed values:\n\n```\nINTENT CLARIFY — DEEP MODE RESEARCH\nRequest: [user's exact request]\nRelevant feature: [if known, else \"unknown\"]\nActive plans found: [list from plan-discovery]\n\nYour job: investigate the request deeply so the orchestrator can generate high-quality clarifying questions.\n\nRequired steps (all must run):\n1. ag-review-situation — current branch, worktrees, active plans, uncommitted changes\n2. ag-scout — scan codebase for files\u002Fmodules relevant to: [keywords from request]\n3. ag-sequential-thinking — map the decision dimensions: what must be decided first? what is downstream?\n4. ag-scenario — for each plausible interpretation: what are the top 3 failure modes?\n5. ag-predict — 5-persona debate: senior dev \u002F PM \u002F security reviewer \u002F QA \u002F end user — what does each want to know before starting?\n\nReturn structured output with these sections:\n- DISCOVERED CONTEXT: actual file paths, module names, package names found\n- DECISION DIMENSIONS: ordered list of decisions that have downstream impact\n- RISK SURFACE: for each interpretation, top 2 failure modes\n- PERSONA DISAGREEMENTS: what different stakeholders would want prioritized differently\n- CONCRETE VALUES: real paths, command strings, feature names to use in question options\n\nDo NOT generate questions — that is the orchestrator's job. Just return raw findings.\n```\n\n### After Receiving Subagent Output\n\nThe orchestrator uses the subagent's `DISCOVERED CONTEXT` and `CONCRETE VALUES` sections to replace every option value in the Tier 2 question suite. The question generation steps (Steps 1–6 in Tier 2 below) proceed as normal, but option text is populated from real findings instead of the light research pass.\n\n---\n\n## Tier 0: Silent Auto-Route\n\nNo user interaction added. Score 0–1 or auto-skip triggered.\n\nRoute to the detected agent per the existing routing protocol. Do not show a routing summary.\n\n---\n\n## Tier 1: Routing Summary\n\nPerform a light research pass (see section below). Then present:\n\n```\nRouting: [detected intent] → [target agent]\nScope: [what I think you want changed]\nPlan: [existing plan if found, or \"new work\"]\n```\n\nWAIT for the user's next message before routing. Do NOT route in the same response. Do NOT say \"I'll proceed unless you correct me.\"\n\nIf the user confirms, proceed. If the user corrects, re-score and re-route.\n\n---\n\n## Tier 2: Full Structured Clarification Suite\n\nTier 2 is the core of this skill. When triggered, the orchestrator does the following:\n\n### Step 1 — Research pass (mode-dependent)\n\n**In SIMPLE MODE:** Perform a light research pass (see Light Research Pass section). Budget: 3–5 file reads. Scan active plans, context routing table, recent git state, and the named file\u002Fpackage if any. This populates concrete values in question options.\n\n**In DEEP MODE:** The research subagent has already run (see Deep Mode section above) and returned structured findings. Use the `DISCOVERED CONTEXT` and `CONCRETE VALUES` sections from those findings instead of performing a light research pass. Skip the 3–5 file read budget — the subagent already covered it.\n\nIn both modes, the goal of Step 1 is identical: replace every generic placeholder in question options with concrete values (package paths, plan IDs, file names, feature names).\n\n### Step 2 — Question generation using ag-scenario + ag-predict style reasoning\n\nBefore writing the questions, THINK across these axes:\n\n- What are the plausible failure modes if we pick the wrong scope? (ag-scenario thinking)\n- What would 5 different people (senior dev, PM, security reviewer, QA, end user) want to know before starting? (ag-predict thinking)\n- What ordering of decisions has the most downstream impact? (ag-sequential-thinking)\n\nUse this analysis to GENERATE questions — not to answer them. The goal is to surface the decisions that, if made wrong, will cause the most rework.\n\n### Step 3 — Classify each dimension as CRITICAL or USEFUL\n\n- **CRITICAL** — getting this wrong derails the entire phase or causes rework\n- **USEFUL** — helpful context but can default to recommendation without blocking\n\nCRITICAL dimensions appear first. The user can say \"skip useful questions\" to answer only CRITICAL ones.\n\n### Step 4 — Format each question using AskUserQuestion tool\n\n**REQUIRED: use the `AskUserQuestion` tool to render all Tier 2 questions.** Do NOT render questions as markdown text. The AskUserQuestion tool renders clickable option selections in the Claude Code UI, which is far faster for the user than typing answers.\n\n**How to call it:**\n\n- Pass all questions in a single `AskUserQuestion` call (up to 4 per call)\n- Group CRITICAL questions into the first call(s), USEFUL questions after\n- Use `multiSelect: false` for mutually exclusive choices (default)\n- Use `multiSelect: true` only when the user genuinely needs to pick multiple options (e.g. \"which packages are in scope\")\n- The `header` field (max 12 chars) is the chip label — use the dimension name abbreviated\n- Set `description` to the 1–2 sentence consequence explanation\n- Each option `label` is the short choice text; `description` is the implication\n\n**Option rules (same as before, now applied to AskUserQuestion fields):**\n\n- Minimum 3 options per question (the tool supports up to 4; always include an \"Other\" option as the last one)\n- Mark exactly one option as `(Recommended)` by appending it to the label: `\"Sequential — single agent (Recommended)\"`\n- Fill option labels with concrete values from the research pass (real file paths, package names, plan IDs) — never generic placeholders\n- The \"Other\" option label: `\"Other\"` with description: `\"Describe your preference in the next message\"`\n\n**If AskUserQuestion is unavailable** (tool not in scope, non-interactive context): fall back to the markdown format below, but always prefer the tool when available.\n\n```\n**Q[N]: [Question title]**\n[1–2 sentences explaining why this decision matters and what goes wrong if we choose incorrectly.]\n\nOptions:\n  A) [option] — [implication] *(Recommended)*\n  B) [option] — [implication]\n  C) [option] — [implication]\n  D) Other: describe your preference\n```\n\n### Step 5 — Group questions by dimension with headers\n\nEach dimension header format:\n\n```\n### [Dimension name] 🔴 CRITICAL\n```\n\nor\n\n```\n### [Dimension name] 🟡 USEFUL\n```\n\n### Step 6 — Emit wait-for-go-ahead footer\n\nAfter all questions, always emit:\n\n> Answer what you want — partial answers are fine. I'll use the _(Recommended)_ defaults for anything you skip. Ready to proceed when you confirm.\n\nDo NOT route to any subagent before receiving at least a partial response or explicit \"go\".\n\n---\n\n## The 8 Standard Dimensions\n\nFor a substantial request, cover all 8 dimensions. For a narrower request, use only the dimensions that are genuinely ambiguous. Do not pad — every question should require a real decision.\n\n### Dimension 1 — Scope and Boundaries 🔴 CRITICAL\n\nClarify what changes and — equally important — what must NOT change.\n\nExample questions:\n\n- Which packages\u002Ffiles are in scope?\n- Are there components or APIs that must remain untouched?\n- Is this isolated to one package or cross-cutting?\n\n### Dimension 2 — Success Criteria 🔴 CRITICAL\n\nClarify what the user truly wants to see as a result.\n\nExample questions:\n\n- What does \"done\" look like to you?\n- Is the goal a passing test suite, a deployed change, a passing code review, or visible UI behavior?\n- Is there a specific user action or flow that must work?\n\n### Dimension 3 — Failure Modes and Risk Surface 🔴 CRITICAL\n\nClarify what the user is most worried about going wrong.\n\nExample questions:\n\n- What are the most likely ways this change breaks something?\n- Are there auth, billing, schema, or public API surfaces this touches?\n- Is there a rollback requirement?\n\n### Dimension 4 — Prior Context 🟡 USEFUL\n\nClarify what has already been tried or is already in progress.\n\nExample questions:\n\n- Is there an existing plan file for this?\n- Has this been attempted before? What happened?\n- Is this a continuation of recent work (visible in git status or active plans)?\n\n### Dimension 5 — Priority and Urgency 🟡 USEFUL\n\nClarify the expected speed\u002Fquality tradeoff.\n\nExample questions:\n\n- Is this a hotfix that needs to ship now, or a proper implementation with full plan\u002Ftest coverage?\n- Does this block other work in flight?\n- Quick patch acceptable, or must it be production-grade immediately?\n\n### Dimension 6 — Autonomy Boundaries 🟡 USEFUL\n\n> **Autopilot Mode — CRITICAL promotion:** When an autopilot trigger phrase is detected,\n> Dimension 6 is treated as 🔴 CRITICAL rather than 🟡 USEFUL. It must appear in the\n> first AskUserQuestion call alongside the CRITICAL dimensions, not after them. The question\n> must explicitly name the three hard stops and ask the user to confirm they understand those\n> remain manual-first gates.\n\nClarify how much the agent can decide on its own vs. checkpoint with the user.\n\nExample questions:\n\n- Can the agent pick the implementation approach, or does the user want to choose?\n- Should the agent pause for approval before destructive changes (schema migrations, API removals)?\n- Is a \u002Fgoal-style autonomous run acceptable, or does each phase need a checkpoint?\n\nAutopilot-specific example (when trigger detected):\n\n- \"This run will proceed autonomously. The following gates remain manual regardless:\n  (1) irreversible\u002Foutward-facing actions not in the validate-contract,\n  (2) live-provider billed feasibility probes (cost-class: needs-live-provider),\n  (3) cascade BLOCKED (two consecutive phases BLOCKED). All other gates auto-proceed.\n  Are there any additional gates you want to keep manual for this run?\"\n\n### Dimension 7 — Technical Constraints 🟡 USEFUL\n\nClarify any specific libraries, patterns, or constraints the solution must conform to.\n\nExample questions:\n\n- Is there a specific library or pattern required?\n- Are there style\u002Flint rules that constrain the approach?\n- Must the solution work in a specific runtime environment (Bun vs Node, edge vs server)?\n\n### Dimension 8 — Phase Program Questions 🔴 CRITICAL (multi-phase only)\n\nOnly include when the request implies multiple dependent phases or a long-running program.\n\nExample questions:\n\n- Should phases run sequentially or can some parallelize?\n- Which phase is the hard dependency for the rest?\n- What is the acceptable stopping point if a later phase is blocked?\n\n---\n\n## Full Tier 2 Example\n\nBelow is a complete example of good Tier 2 output for a request like \"refactor the billing flow to add credit top-up support.\"\n\n---\n\n**Intent understood:** Add credit top-up support to the billing flow. Before routing, I need to resolve a few key decisions.\n\n---\n\n### Scope and Boundaries 🔴 CRITICAL\n\n**Q1: Which layers does this change touch?**\nGetting scope wrong here means re-opening files mid-phase and invalidating earlier test gates.\n\nOptions:\nA) Prisma schema + tRPC billing router + UI billing page — full stack _(Recommended)_\nB) tRPC billing router + UI only — skip schema migration for now\nC) UI only — wire to existing endpoints, validate assumptions first\nD) Other: describe your preference\n\n**Q2: Which existing billing surfaces must NOT change?**\nWe need to know what is off-limits before touching shared code paths.\n\nOptions:\nA) Stripe webhook handlers and subscription models are frozen _(Recommended)_\nB) Only the credit transaction model is frozen\nC) Nothing is frozen — all billing code is in scope\nD) Other: describe your preference\n\n---\n\n### Success Criteria 🔴 CRITICAL\n\n**Q3: What does \"done\" look like?**\nIf the success bar is wrong, the agent will stop too early or overshoot.\n\nOptions:\nA) User can trigger a top-up from the UI and credit balance updates — end-to-end _(Recommended)_\nB) Backend complete with tests passing; UI is out of scope for this phase\nC) Plan written and approved — no implementation yet\nD) Other: describe your preference\n\n---\n\n### Failure Modes and Risk Surface 🔴 CRITICAL\n\n**Q4: Is there a risk surface we must protect?**\nBilling changes can silently double-charge or under-credit users if guard logic is missing.\n\nOptions:\nA) Add explicit idempotency key to the top-up Stripe call _(Recommended)_\nB) No idempotency needed — amount is small enough that duplicates are acceptable\nC) Not sure — flag for code review\nD) Other: describe your preference\n\n---\n\n### Priority and Urgency 🟡 USEFUL\n\n**Q5: Speed vs. quality tradeoff?**\nAffects whether we write a full plan with validate-contract or skip to a lightweight execute.\n\nOptions:\nA) Proper plan + validate-contract + full test coverage _(Recommended)_\nB) Quick implementation with tests deferred to a follow-up\nC) Research and plan only — no implementation this session\nD) Other: describe your preference\n\n---\n\n> Answer what you want — partial answers are fine. I'll use the _(Recommended)_ defaults for anything you skip. Ready to proceed when you confirm.\n\n---\n\n## Bad vs. Good Question Format\n\nUnderstanding the failure modes in question generation:\n\n### Bad (open-ended, no options)\n\n```\nQ: What scope should the refactor cover?\n```\n\nThis forces the user to type a free-form answer. Slow. Vague. Hard to act on.\n\n### Bad (only 2 options, no recommendation marked)\n\n```\nQ: Full stack or UI only?\n  A) Full stack\n  B) UI only\n```\n\nBinary questions miss the third path. No recommendation means the user has no default to accept.\n\n### Bad (generic placeholders left in)\n\n```\nQ: Which areas? [A] just {X} [B] {X} and {Y}\n```\n\nPlaceholders not replaced with concrete values from light research. Signals the skill was invoked lazily.\n\n### Good\n\n```\n**Q1: Which packages does this refactor touch?**\nScope determines which test gates apply and which blast-radius files need review before touching code.\n\nOptions:\n  A) packages\u002Fapi\u002Fsrc\u002Frouter\u002Fbilling.ts + apps\u002Fweb\u002Fsrc\u002Fapp\u002Fbilling — full stack *(Recommended)*\n  B) apps\u002Fweb\u002Fsrc\u002Fapp\u002Fbilling only — frontend changes, read-only backend exploration\n  C) packages\u002Fapi\u002Fsrc\u002Frouter\u002Fbilling.ts only — backend logic, no UI changes yet\n  D) Other: describe your preferred scope\n```\n\n---\n\n## Autonomy Mode\n\n### What Grants Autonomy\n\n- Explicit autonomy phrases: \"you decide\", \"just do it\", \"full autonomy\", \"don't ask\", \"autonomous\"\n- Mid-phase-program context where the current phase plan is selected and approved\n- User has answered Tier 2 questions and said \"go\"\n- Autopilot Mode trigger phrase detected (see `orchestration.md §Autopilot Trigger Routing`):\n  autonomy is granted for the full run scope. Dimension 6 (Autonomy Boundaries) is treated as\n  CRITICAL rather than USEFUL for this session.\n\n### Phrase Matching Rule\n\nAutonomy phrases must be standalone statements or sentence-initial. They do NOT match when embedded in descriptive text.\n\n- \"just do it\" (standalone) → autonomy granted\n- \"just do the simple version\" → NOT autonomy (descriptive use, user is specifying scope)\n- \"you decide how to implement it\" → autonomy granted\n\n### What Autonomy Means\n\n- All tiers collapse to Tier 0 for the current task chain\n- Clarification questions are skipped\n- Routing summaries are skipped\n\n### What Autonomy Does NOT Override\n\n- EXECUTE approval gate (\"ENTER EXECUTE MODE\" still required)\n- Plan review checkpoint\n- Phase-program phase boundaries\n- High-risk execution handoff gates\n- The Consolidated Autopilot Clarification Round (see §Autopilot Clarification Mode below) —\n  autopilot grants autonomy for the run, but the clarification round itself still fires once\n  to lock the session. It is a different gate from the standard intent-clarify suite.\n\n---\n\n## Autopilot Clarification Mode\n\nWhen an autopilot trigger is detected (see `orchestration.md §Autopilot Trigger Routing`),\nthe standard Tier 0\u002F1\u002F2 scoring flow is bypassed. A single **Consolidated Autopilot\nClarification Round** replaces it.\n\n**When This Mode Fires:** The orchestrator sets autopilot clarification mode when a recognized\nautopilot trigger phrase is detected at any RIPER-5 phase boundary. The trigger detection and\nphrase list live in `orchestration.md §Autopilot Trigger Routing` — this skill does not own\nthe detection logic.\n\n**Consolidated-Round Rule:** Issue exactly ONE `AskUserQuestion` call covering all four mandatory\ndimensions in a single round-trip: (1) Scope and task name (CRITICAL), (2) Definition of done\n(CRITICAL), (3) Risk tolerance \u002F Hard-stop confirm (CRITICAL = Dimension 6 promoted), (4) Gate\ndeviations (CRITICAL). After the user responds, the session is locked and the orchestrator\nproceeds to emit the provisional goal block.\n\n**Abort-to-Interactive Rule:** If the user responds to the consolidated round with a phrase\nopting out of autopilot (\"actually, let's do this step by step\", \"cancel autopilot\", \"stop\",\n\"interactive please\"): (1) Acknowledge the opt-out, (2) Revert to standard RIPER-5 interactive\nbehavior, (3) Re-issue the standard Combined Clarification Gate (Step 6.5), (4) Do NOT emit\nthe provisional goal block, (5) Deactivate autopilot-mode for this session.\n\n**Validator Conformance:** Autopilot clarification output MUST include all four validator markers:\nrestatement, score (always 4\u002F4 under autopilot), mode (always deep for phase-program kickoffs),\nreason\u002Fbecause justification. Full spec: `process\u002Fdevelopment-protocols\u002Fautopilot.md §Consolidated Clarification Round`.\n\n---\n\n## Light Research Pass\n\n**Used in SIMPLE MODE only.** In DEEP MODE, the research subagent replaces this step entirely.\n\nPerformed by the orchestrator in the main thread, not as a subagent delegation.\n\nBudget: 3–5 file reads max.\n\nWhat it checks:\n\n1. Active plan inventory (`process\u002Fgeneral-plans\u002Factive\u002F` and `process\u002Ffeatures\u002F*\u002Factive\u002F`)\n2. Context routing table in `process\u002Fcontext\u002Fall-context.md` (match keywords to domain)\n3. Recent git status (uncommitted changes related to the request?)\n4. If a specific package or file is named, one quick read of that file\n\nPurpose: replace generic placeholders in question options with concrete names (package paths, plan IDs, model names, router file names). A question with concrete values is 3× more actionable than one with `{X}`.\n\nThis is NOT a full research-agent delegation. Route to research-agent after clarification resolves.\n\n---\n\n## Intent Revalidation After Research\n\nAfter the research-agent completes, the orchestrator checks whether the original intent still holds.\n\nIf research reveals the request is fundamentally different from what was assumed, re-present a Tier 1 routing summary with updated understanding.\n\nIf research confirms the original intent, proceed to INNOVATE or PLAN without re-asking. Never repeat clarification that was already resolved.\n\n---\n\n## FAST Mode Integration\n\nIntent clarification fires BEFORE the fast-mode agent is spawned. The orchestrator scores and clarifies in the main thread, then hands the clarified intent to the fast-mode-agent prompt.\n\nInside the fast-mode-agent, no additional clarification is needed — intent is already resolved.\n\n---\n\n## Fallback (Still Ambiguous After Tier 2)\n\nIf the user answers Tier 2 questions but a single routing path still cannot be determined:\n\n1. State what remains unclear in one sentence.\n2. Ask one final direct question (plain, not multiple-choice).\n3. If still unresolvable after that, default to the research-agent with the narrowest reasonable scope.\n\nNever loop clarification more than twice. Two rounds max, then route to research.\n\n---\n\n## Worked Scoring Examples\n\n**Example A — \"Fix the login bug on the auth page\"**\n\n- Ambiguous scope: No (+0) — \"auth page\" is a specific scope\n- No explicit path: Yes (+1) — no file named, but scope is narrow\n- Multiple intents: No (+0) — single intent (fix)\n- First interaction: No (+0)\n\nScore: 1 → Tier 0, auto-route to debugger\u002Fexecute.\n\n**Example B — \"Make the app faster\"**\n\n- Ambiguous scope: Yes (+1) — bundle size, API perf, rendering, caching all possible\n- No explicit path: Yes (+1) — no file or package named\n- Multiple intents: Yes (+1) — refactor, config change, infra work, or research\n- First interaction: Yes (+1)\n\nScore: 4 → Tier 2, full structured clarification suite.\nGenerate questions across Scope, Success Criteria, Failure Modes, Priority, Technical Constraints (all dimensions where \"faster\" is ambiguous).\n\n**Example C — \"Add a top-up button to the billing page\"**\n\n- Ambiguous scope: No (+0) — billing page is named\n- No explicit path: Yes (+1) — no file path\n- Multiple intents: Yes (+1) — could stop at UI only or require schema\u002FStripe changes\n- First interaction: Yes (+1)\n\nScore: 3 → Tier 2, but only 3–4 questions covering Scope, Success Criteria, Risk Surface (billing-specific failure modes). Skip Autonomy Boundaries and Phase Program since it's a single-phase feature.\n\n## References\n\n- [process\u002Fcontext\u002Fall-context.md](process\u002Fcontext\u002Fall-context.md)\n",{"name":5,"layer":24,"description":7,"trigger_keywords":25},"contract","intent clarification, ambiguity score, routing tier, clarify request","main","1ef0dcd00fe806a8dc4e0b7173b9db967c3ab274",".claude\u002Fskills\u002Fag-intent-clarify","https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit","https:\u002F\u002Fgithub.com\u002Fngxccc","https:\u002F\u002Fngxccc.github.io","Make it work, make it right, make it fast.","2026-08-02 20:59:07",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add ngxccc\u002Fagent-skills-kit --skill ag-intent-clarify",{"tool":40,"command":41},"bunx","bunx skills add ngxccc\u002Fagent-skills-kit --skill ag-intent-clarify",{"tool":43,"command":44},"pnpm","pnpm dlx skills add ngxccc\u002Fagent-skills-kit --skill ag-intent-clarify","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fag-intent-clarify\u002FSKILL.md",true,[48,54,58],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"scripts\u002Ffixtures\u002Fvalidate-intent-clarify-output\u002Ffail.md","SCRIPT","脚本",217,"https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fag-intent-clarify\u002Fscripts\u002Ffixtures\u002Fvalidate-intent-clarify-output\u002Ffail.md",{"path":55,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":56,"sourceHtmlUrl":57},"scripts\u002Ffixtures\u002Fvalidate-intent-clarify-output\u002Fpass.md",451,"https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fag-intent-clarify\u002Fscripts\u002Ffixtures\u002Fvalidate-intent-clarify-output\u002Fpass.md",{"path":59,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":60,"sourceHtmlUrl":61},"scripts\u002Fvalidate-intent-clarify-output.mjs",2021,"https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fag-intent-clarify\u002Fscripts\u002Fvalidate-intent-clarify-output.mjs",[63,70,77,84,91,98],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M76W3C8X6Q5DS0364KQT7W7A","zustand","Rules and standards for state management using Zustand in React and Next.js. Use when implementing client-side stores, persistence with localStorage, or preventing SSR hydration mismatch.","https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002Fskills\u002F.curated\u002Fzustand\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M76W39FJGES309VAH7SFWA9Y","zod","Zod v4 schema validation best practices. Use when defining schemas, utilizing safeParse, or customizing error messages.","https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002Fskills\u002F.curated\u002Fzod\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M76W36HTYA4BR5FKCWMX1RFR","upstash-ratelimit","Rules, standards, and references for rate limiting in serverless environments using Upstash Ratelimit. Use when implementing rate limiting, configuring Upstash Redis, or handling request blocking.","https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002Fskills\u002F.curated\u002Fupstash-ratelimit\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M76W32H4PS01WFRS7FNPK2G1","ui-design","UI\u002FUX and frontend design best practices guidelines (formerly frontend-design). This skill should be used when writing, reviewing, or designing frontend code to ensure accessibility, performance, and usability. Triggers on tasks involving HTML structure, CSS styling, responsive layouts, form design, animations, or accessibility improvements.","https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002Fskills\u002F.curated\u002Fui-design\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M76W2YAP6RK8N0EVWFG54VD7","typescript","TypeScript performance, tsconfig, type errors, async patterns — triggered when the user asks to \"optimize TypeScript performance\", \"speed up tsc compilation\", \"configure tsconfig.json\", \"fix type errors\", \"improve async patterns\", or encounters TS errors (TS2322, TS2339, \"is not assignable to\"). Also triggers on .ts, .tsx, .d.ts file work involving type definitions, module organization, or memory management. Does NOT cover TypeScript basics, framework-specific patterns, or testing.","https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002Fskills\u002F.curated\u002Ftypescript\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M76W2RMAZNNJQ2HECH3X6ZSH","typescript-refactor","TypeScript and TSX refactoring and modernization guidelines from a principal specialist perspective, current to TypeScript 6.0 and React 19. This skill should be used when refactoring, reviewing, or modernizing TypeScript or React\u002FTSX code for type safety, compiler performance, and idiomatic patterns. Triggers on tasks involving type architecture, narrowing, generics, discriminated unions, error handling, React component and hook typing, or migration to modern TypeScript features (satisfies, using, const type parameters, inferred type predicates, isolatedDeclarations, erasable syntax, import attributes).","https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002Fskills\u002F.curated\u002Ftypescript-refactor\u002FSKILL.md",[],[]]