deep-interview
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese<Purpose>
Deep Interview implements Ouroboros-inspired Socratic questioning with mathematical ambiguity scoring. It replaces vague ideas with crystal-clear specifications by asking targeted questions that expose hidden assumptions, measuring clarity across weighted dimensions, and refusing to proceed until ambiguity drops below a configurable threshold (default: 20%). The output feeds into a 3-stage pipeline: **deep-interview → ralplan (consensus refinement) → autopilot (execution)**, ensuring maximum clarity at every stage.
</Purpose>
<Use_When>
- User has a vague idea and wants thorough requirements gathering before execution
- User says "deep interview", "interview me", "ask me everything", "don't assume", "make sure you understand"
- User says "ouroboros", "socratic", "I have a vague idea", "not sure exactly what I want"
- User wants to avoid "that's not what I meant" outcomes from autonomous execution
- Task is complex enough that jumping to code would waste cycles on scope discovery
- User wants mathematically-validated clarity before committing to execution </Use_When>
<Do_Not_Use_When>
- User has a detailed, specific request with file paths, function names, or acceptance criteria -- execute directly
- User wants to explore options or brainstorm -- use skill instead
omc-plan - User wants a quick fix or single change -- delegate to executor or ralph
- User says "just do it" or "skip the questions" -- respect their intent
- User already has a PRD or plan file -- use ralph or autopilot with that plan </Do_Not_Use_When>
<Why_This_Exists>
AI can build anything. The hard part is knowing what to build. OMC's autopilot Phase 0 expands ideas into specs via analyst + architect, but this single-pass approach struggles with genuinely vague inputs. It asks "what do you want?" instead of "what are you assuming?" Deep Interview applies Socratic methodology to iteratively expose assumptions and mathematically gate readiness, ensuring the AI has genuine clarity before spending execution cycles.
Inspired by the Ouroboros project which demonstrated that specification quality is the primary bottleneck in AI-assisted development.
</Why_This_Exists>
<Execution_Policy>
- Ask ONE question at a time -- never batch multiple questions
- Target the WEAKEST clarity dimension with each question
- Gather codebase facts via agent BEFORE asking the user about them
explore - Score ambiguity after every answer -- display the score transparently
- Do not proceed to execution until ambiguity ≤ threshold (default 0.2)
- Allow early exit with a clear warning if ambiguity is still high
- Persist interview state for resume across session interruptions
- Challenge agents activate at specific round thresholds to shift perspective </Execution_Policy>
<Purpose>
深度访谈实现了受Ouroboros启发的苏格拉底式提问机制,搭配数学歧义度评分能力。它会通过提出针对性问题暴露隐藏假设,在多个加权维度上衡量需求清晰度,并拒绝在歧义度降至可配置阈值(默认20%)以下前推进后续流程,从而将模糊的想法转化为极其清晰的需求规格。输出结果会输入到3阶段流水线:**deep-interview → ralplan (共识优化) → autopilot (执行)**,确保每个阶段的需求清晰度都达到最高水平。
</Purpose>
<Use_When>
- 用户有模糊的想法,希望在执行前完成全面的需求收集
- 用户提及「深度访谈」、「对我进行访谈」、「问我所有相关问题」、「不要做假设」、「确保你完全理解需求」
- 用户提及「ouroboros」、「socratic」、「我有个模糊的想法」、「不确定自己到底想要什么」
- 用户希望避免自主执行后出现「这不是我想要的」的结果
- 任务复杂度较高,直接开始写代码会在需求范围梳理阶段浪费大量资源
- 用户希望在确认执行前获得经过数学验证的需求清晰度 </Use_When>
<Do_Not_Use_When>
- 用户有详细具体的需求,包含文件路径、函数名或验收标准——直接执行即可
- 用户希望探索选项或头脑风暴——使用技能替代
omc-plan - 用户需要快速修复或单个小改动——委派给执行器或ralph即可
- 用户说「直接做」或「跳过提问」——尊重用户的意图
- 用户已经有PRD或计划文件——直接使用ralph或autopilot基于该计划执行 </Do_Not_Use_When>
<Why_This_Exists>
AI可以构建任何东西,最难的部分是明确到底要构建什么。OMC的autopilot第0阶段通过分析师+架构师将想法扩展为规格,但这种单次处理的方式很难应对真正模糊的输入。它只会问「你想要什么?」,而不会问「你做了什么假设?」。深度访谈应用苏格拉底方法论,迭代暴露潜在假设,并通过数学机制校验就绪状态,确保AI在投入执行资源前已经真正明确了需求。
该工具受Ouroboros项目启发,该项目证明了需求规格质量是AI辅助开发的首要瓶颈。
</Why_This_Exists>
<Execution_Policy>
- 一次只提一个问题——永远不要批量抛出多个问题
- 每次提问都针对清晰度最低的维度
- 在询问用户代码库相关问题前,先通过agent收集代码库的实际信息
explore - 每次收到回答后都要计算歧义度得分——透明向用户展示得分
- 歧义度≤阈值(默认0.2)前不要推进到执行阶段
- 如果用户坚持提前退出,要明确告知风险后允许退出
- 持久化访谈状态,会话中断后可以恢复进度
- 在特定轮次阈值激活挑战agent,转换提问视角 </Execution_Policy>
Phase 1: Initialize
第1阶段:初始化
- Parse the user's idea from
{{ARGUMENTS}} - Detect brownfield vs greenfield:
- Run agent (haiku): check if cwd has existing source code, package files, or git history
explore - If source files exist AND the user's idea references modifying/extending something: brownfield
- Otherwise: greenfield
- Run
- For brownfield: Run agent to map relevant codebase areas, store as
explorecodebase_context - Initialize state via :
state_write(mode="deep-interview")
json
{
"active": true,
"current_phase": "deep-interview",
"state": {
"interview_id": "<uuid>",
"type": "greenfield|brownfield",
"initial_idea": "<user input>",
"rounds": [],
"current_ambiguity": 1.0,
"threshold": 0.2,
"codebase_context": null,
"challenge_modes_used": []
}
}- Announce the interview to the user:
Starting deep interview. I'll ask targeted questions to understand your idea thoroughly before building anything. After each answer, I'll show your clarity score. We'll proceed to execution once ambiguity drops below 20%.Your idea: "{initial_idea}" Project type: {greenfield|brownfield} Current ambiguity: 100% (we haven't started yet)
- 从中解析用户的想法
{{ARGUMENTS}} - 识别存量项目/全新项目:
- 运行agent(haiku模型):检查当前工作目录是否存在现有源码、包管理文件或git历史
explore - 如果存在源码文件且用户的想法涉及修改/扩展现有功能:存量项目(brownfield)
- 否则:全新项目(greenfield)
- 运行
- 存量项目处理:运行agent映射相关代码库区域,存储为
explorecodebase_context - 通过初始化状态:
state_write(mode="deep-interview")
json
{
"active": true,
"current_phase": "deep-interview",
"state": {
"interview_id": "<uuid>",
"type": "greenfield|brownfield",
"initial_idea": "<user input>",
"rounds": [],
"current_ambiguity": 1.0,
"threshold": 0.2,
"codebase_context": null,
"challenge_modes_used": []
}
}- 向用户告知访谈启动:
开始深度访谈。在开始构建前,我会提出针对性问题充分了解你的想法。每次回答后我会展示你的需求清晰度得分,当歧义度降至20%以下时我们就会进入执行阶段。你的想法: "{initial_idea}" 项目类型: {greenfield|brownfield} 当前歧义度: 100%(尚未开始访谈)
Phase 2: Interview Loop
第2阶段:访谈循环
Repeat until OR user exits early:
ambiguity ≤ threshold重复执行以下步骤直到或用户提前退出:
歧义度 ≤ 阈值Step 2a: Generate Next Question
步骤2a:生成下一个问题
Build the question generation prompt with:
- The user's original idea
- All prior Q&A rounds (conversation history)
- Current clarity scores per dimension (which is weakest?)
- Challenge agent mode (if activated -- see Phase 3)
- Brownfield codebase context (if applicable)
Question targeting strategy:
- Identify the dimension with the LOWEST clarity score
- Generate a question that specifically improves that dimension
- Questions should expose ASSUMPTIONS, not gather feature lists
Question styles by dimension:
| Dimension | Question Style | Example |
|---|---|---|
| Goal Clarity | "What exactly happens when...?" | "When you say 'manage tasks', what specific action does a user take first?" |
| Constraint Clarity | "What are the boundaries?" | "Should this work offline, or is internet connectivity assumed?" |
| Success Criteria | "How do we know it works?" | "If I showed you the finished product, what would make you say 'yes, that's it'?" |
| Context Clarity (brownfield) | "How does this fit?" | "The existing auth uses JWT in src/auth/. Should we extend that or add a separate flow?" |
构建问题生成提示词,包含以下信息:
- 用户的原始想法
- 所有之前的问答轮次(对话历史)
- 当前各维度的清晰度得分(最低的是哪个?)
- 挑战agent模式(如果已激活——参考第3阶段)
- 存量项目代码库上下文(如果适用)
问题靶向策略:
- 识别清晰度得分最低的维度
- 生成专门提升该维度清晰度的问题
- 问题要聚焦于暴露假设,而不是收集功能列表
各维度的提问风格:
| 维度 | 提问风格 | 示例 |
|---|---|---|
| 目标清晰度 | "当...时具体会发生什么?" | "你提到的「管理任务」,用户首先会执行什么具体操作?" |
| 约束清晰度 | "边界范围是什么?" | "这个功能需要支持离线使用,还是默认需要联网?" |
| 成功标准 | "我们怎么判断它正常工作了?" | "如果我给你展示成品,什么情况会让你觉得「对,就是这个」?" |
| 上下文清晰度(存量项目) | "这个功能怎么适配现有系统?" | "现有鉴权模块在src/auth/目录下使用JWT实现,我们应该扩展现有逻辑还是新增独立的鉴权流程?" |
Step 2b: Ask the Question
步骤2b:提出问题
Use with the generated question. Present it clearly with the current ambiguity context:
AskUserQuestionRound {n} | Targeting: {weakest_dimension} | Ambiguity: {score}%
{question}Options should include contextually relevant choices plus free-text.
使用接口抛出已生成的问题,结合当前歧义度上下文清晰展示:
AskUserQuestion第{n}轮 | 针对维度:{weakest_dimension} | 歧义度:{score}%
{question}选项需要包含上下文相关的选择以及自由输入框。
Step 2c: Score Ambiguity
步骤2c:计算歧义度
After receiving the user's answer, score clarity across all dimensions.
Scoring prompt (use opus model, temperature 0.1 for consistency):
Given the following interview transcript for a {greenfield|brownfield} project, score clarity on each dimension from 0.0 to 1.0:
Original idea: {idea}
Transcript:
{all rounds Q&A}
Score each dimension:
1. Goal Clarity (0.0-1.0): Is the primary objective unambiguous? Can you state it in one sentence without qualifiers?
2. Constraint Clarity (0.0-1.0): Are the boundaries, limitations, and non-goals clear?
3. Success Criteria Clarity (0.0-1.0): Could you write a test that verifies success? Are acceptance criteria concrete?
{4. Context Clarity (0.0-1.0): [brownfield only] Do we understand the existing system well enough to modify it safely?}
For each dimension provide:
- score: float (0.0-1.0)
- justification: one sentence explaining the score
- gap: what's still unclear (if score < 0.9)
Respond as JSON.Calculate ambiguity:
Greenfield:
Brownfield:
ambiguity = 1 - (goal × 0.40 + constraints × 0.30 + criteria × 0.30)ambiguity = 1 - (goal × 0.35 + constraints × 0.25 + criteria × 0.25 + context × 0.15)收到用户的回答后,对所有维度的清晰度打分。
打分提示词(使用opus模型,温度设置为0.1保证结果一致性):
基于以下{greenfield|brownfield}项目的访谈记录,将每个维度的清晰度按0.0到1.0打分:
原始想法:{idea}
访谈记录:
{所有问答轮次}
对每个维度打分:
1. 目标清晰度(0.0-1.0):核心目标是否没有歧义?你是否可以不带修饰地用一句话描述它?
2. 约束清晰度(0.0-1.0):边界、限制和非目标是否明确?
3. 成功标准清晰度(0.0-1.0):你是否可以写出验证成功的测试用例?验收标准是否具体?
{4. 上下文清晰度(0.0-1.0):[仅存量项目]我们是否足够了解现有系统,可以安全地进行修改?}
针对每个维度提供:
- score:浮点数(0.0-1.0)
- justification:解释得分的一句话说明
- gap:仍不明确的点(如果得分<0.9)
以JSON格式返回。歧义度计算公式:
全新项目:
存量项目:
歧义度 = 1 - (目标得分 × 0.40 + 约束得分 × 0.30 + 标准得分 × 0.30)歧义度 = 1 - (目标得分 × 0.35 + 约束得分 × 0.25 + 标准得分 × 0.25 + 上下文得分 × 0.15)Step 2d: Report Progress
步骤2d:进度反馈
After scoring, show the user their progress:
Round {n} complete.
| Dimension | Score | Weight | Weighted | Gap |
|-----------|-------|--------|----------|-----|
| Goal | {s} | {w} | {s*w} | {gap or "Clear"} |
| Constraints | {s} | {w} | {s*w} | {gap or "Clear"} |
| Success Criteria | {s} | {w} | {s*w} | {gap or "Clear"} |
| Context (brownfield) | {s} | {w} | {s*w} | {gap or "Clear"} |
| **Ambiguity** | | | **{score}%** | |
{score <= threshold ? "Clarity threshold met! Ready to proceed." : "Focusing next question on: {weakest_dimension}"}打分完成后,向用户展示进度:
第{n}轮访谈完成。
| 维度 | 得分 | 权重 | 加权得分 | 待明确点 |
|-----------|-------|--------|----------|-----|
| 目标 | {s} | {w} | {s*w} | {待明确点或「已明确」} |
| 约束 | {s} | {w} | {s*w} | {待明确点或「已明确」} |
| 成功标准 | {s} | {w} | {s*w} | {待明确点或「已明确」} |
| 上下文(存量项目) | {s} | {w} | {s*w} | {待明确点或「已明确」} |
| **歧义度** | | | **{score}%** | |
{score <= threshold ? "已达到清晰度阈值!准备进入执行阶段。" : "下一个问题将针对:{weakest_dimension}"}Step 2e: Update State
步骤2e:更新状态
Update interview state with the new round and scores via .
state_write通过将新的轮次和得分更新到访谈状态中。
state_writeStep 2f: Check Soft Limits
步骤2f:检查软限制
- Round 3+: Allow early exit if user says "enough", "let's go", "build it"
- Round 10: Show soft warning: "We're at 10 rounds. Current ambiguity: {score}%. Continue or proceed with current clarity?"
- Round 20: Hard cap: "Maximum interview rounds reached. Proceeding with current clarity level ({score}%)."
- 第3轮及以后:如果用户说「足够了」、「开始吧」、「构建吧」,允许提前退出
- 第10轮:展示软警告:「我们已经完成10轮访谈,当前歧义度:{score}%。继续访谈还是按当前清晰度推进?」
- 第20轮:硬上限:「已达到最大访谈轮次,将按当前清晰度水平({score}%)推进。」
Phase 3: Challenge Agents
第3阶段:挑战Agent
At specific round thresholds, shift the questioning perspective:
在特定的轮次阈值,转换提问视角:
Round 4+: Contrarian Mode
第4轮及以后:唱反调模式
Inject into the question generation prompt:
You are now in CONTRARIAN mode. Your next question should challenge the user's core assumption. Ask "What if the opposite were true?" or "What if this constraint doesn't actually exist?" The goal is to test whether the user's framing is correct or just habitual.
在问题生成提示词中注入:
你现在处于唱反调模式。你的下一个问题需要挑战用户的核心假设。可以问「如果情况正好相反呢?」或者「如果这个约束其实不存在呢?」,目标是验证用户的框架是正确的,还是只是习惯性假设。
Round 6+: Simplifier Mode
第6轮及以后:简化模式
Inject into the question generation prompt:
You are now in SIMPLIFIER mode. Your next question should probe whether complexity can be removed. Ask "What's the simplest version that would still be valuable?" or "Which of these constraints are actually necessary vs. assumed?" The goal is to find the minimal viable specification.
在问题生成提示词中注入:
你现在处于简化模式。你的下一个问题需要探究是否可以移除复杂度。可以问「仍有价值的最简版本是什么样的?」或者「这些约束里哪些是实际必要的,哪些是假设的?」,目标是找到最小可行规格。
Round 8+: Ontologist Mode (if ambiguity still > 0.3)
第8轮及以后(如果歧义度仍>0.3):本体论模式
Inject into the question generation prompt:
You are now in ONTOLOGIST mode. The ambiguity is still high after 8 rounds, suggesting we may be addressing symptoms rather than the core problem. Ask "What IS this, really?" or "If you could only describe this in one sentence to a colleague, what would you say?" The goal is to find the essence.
Challenge modes are used ONCE each, then return to normal Socratic questioning. Track which modes have been used in state.
在问题生成提示词中注入:
你现在处于本体论模式。经过8轮访谈后歧义度仍然很高,说明我们可能在解决表面问题而非核心问题。可以问「这个东西本质上到底是什么?」或者「如果你只能用一句话向同事描述它,你会怎么说?」,目标是找到需求本质。
每种挑战模式仅使用一次,之后回归正常的苏格拉底式提问。在状态中记录已使用的模式避免重复。
Phase 4: Crystallize Spec
第4阶段:固化需求规格
When ambiguity ≤ threshold (or hard cap / early exit):
- Generate the specification using opus model with the full interview transcript
- Write to file:
.omc/specs/deep-interview-{slug}.md
Spec structure:
markdown
undefined当歧义度 ≤ 阈值(或达到硬上限/用户提前退出):
- 基于完整的访谈记录,使用opus模型生成需求规格
- 写入文件:
.omc/specs/deep-interview-{slug}.md
规格结构:
markdown
undefinedDeep Interview Spec: {title}
深度访谈规格:{title}
Metadata
元数据
- Interview ID: {uuid}
- Rounds: {count}
- Final Ambiguity Score: {score}%
- Type: greenfield | brownfield
- Generated: {timestamp}
- Threshold: {threshold}
- Status: {PASSED | BELOW_THRESHOLD_EARLY_EXIT}
- 访谈ID:{uuid}
- 访谈轮次:{count}
- 最终歧义度得分:{score}%
- 项目类型:greenfield | brownfield
- 生成时间:{timestamp}
- 阈值:{threshold}
- 状态:{PASSED | 未达阈值提前退出}
Clarity Breakdown
清晰度明细
| Dimension | Score | Weight | Weighted |
|---|---|---|---|
| Goal Clarity | {s} | {w} | {s*w} |
| Constraint Clarity | {s} | {w} | {s*w} |
| Success Criteria | {s} | {w} | {s*w} |
| Context Clarity | {s} | {w} | {s*w} |
| Total Clarity | {total} | ||
| Ambiguity | {1-total} |
| 维度 | 得分 | 权重 | 加权得分 |
|---|---|---|---|
| 目标清晰度 | {s} | {w} | {s*w} |
| 约束清晰度 | {s} | {w} | {s*w} |
| 成功标准 | {s} | {w} | {s*w} |
| 上下文清晰度 | {s} | {w} | {s*w} |
| 总清晰度 | {total} | ||
| 歧义度 | {1-total} |
Goal
目标
{crystal-clear goal statement derived from interview}
{从访谈中提炼的极其清晰的目标陈述}
Constraints
约束
- {constraint 1}
- {constraint 2}
- ...
- {约束1}
- {约束2}
- ...
Non-Goals
非目标
- {explicitly excluded scope 1}
- {explicitly excluded scope 2}
- {明确排除的范围1}
- {明确排除的范围2}
- ...
Acceptance Criteria
验收标准
- {testable criterion 1}
- {testable criterion 2}
- {testable criterion 3}
- ...
- {可测试的标准1}
- {可测试的标准2}
- {可测试的标准3}
- ...
Assumptions Exposed & Resolved
暴露并解决的假设
| Assumption | Challenge | Resolution |
|---|---|---|
| {assumption} | {how it was questioned} | {what was decided} |
| 假设 | 挑战方式 | 解决方案 |
|---|---|---|
| {假设内容} | {提问挑战的方式} | {最终决策内容} |
Technical Context
技术上下文
{brownfield: relevant codebase findings from explore agent}
{greenfield: technology choices and constraints}
{存量项目:explore agent返回的相关代码库发现}
{全新项目:技术选型和约束}
Ontology (Key Entities)
本体(核心实体)
| Entity | Fields | Relationships |
|---|---|---|
| {entity} | {field1, field2} | {relates to...} |
| 实体 | 字段 | 关联关系 |
|---|---|---|
| {实体名} | {字段1, 字段2} | {与...关联} |
Interview Transcript
访谈记录
<details>
<summary>Full Q&A ({n} rounds)</summary>
<details>
<summary>完整问答(共{n}轮)</summary>
Round 1
第1轮
Q: {question}
A: {answer}
Ambiguity: {score}% (Goal: {g}, Constraints: {c}, Criteria: {cr})
...
</details>
```问: {question}
答: {answer}
歧义度: {score}%(目标:{g}, 约束:{c}, 标准:{cr})
...
</details>
```Phase 5: Execution Bridge
第5阶段:执行衔接
After the spec is written, present execution options via :
AskUserQuestionQuestion: "Your spec is ready (ambiguity: {score}%). How would you like to proceed?"
Options:
-
Ralplan → Autopilot (Recommended)
- Description: "3-stage pipeline: consensus-refine this spec with Planner/Architect/Critic, then execute with full autopilot. Maximum quality."
- Action: Invoke with
Skill("oh-my-claudecode:omc-plan")flags and the spec file path as context. The--consensus --directflag skips the omc-plan skill's interview phase (the deep interview already gathered requirements), while--directtriggers the Planner/Architect/Critic loop. When consensus completes and produces a plan in--consensus, invoke.omc/plans/with the consensus plan as Phase 0+1 output — autopilot skips both Expansion and Planning, starting directly at Phase 2 (Execution).Skill("oh-my-claudecode:autopilot") - Pipeline:
deep-interview spec → omc-plan --consensus --direct → autopilot execution
-
Execute with autopilot (skip ralplan)
- Description: "Full autonomous pipeline — planning, parallel implementation, QA, validation. Faster but without consensus refinement."
- Action: Invoke with the spec file path as context. The spec replaces autopilot's Phase 0 — autopilot starts at Phase 1 (Planning).
Skill("oh-my-claudecode:autopilot")
-
Execute with ralph
- Description: "Persistence loop with architect verification — keeps working until all acceptance criteria pass"
- Action: Invoke with the spec file path as the task definition.
Skill("oh-my-claudecode:ralph")
-
Execute with team
- Description: "N coordinated parallel agents — fastest execution for large specs"
- Action: Invoke with the spec file path as the shared plan.
Skill("oh-my-claudecode:team")
-
Refine further
- Description: "Continue interviewing to improve clarity (current: {score}%)"
- Action: Return to Phase 2 interview loop.
IMPORTANT: On execution selection, MUST invoke the chosen skill via . Do NOT implement directly. The deep-interview agent is a requirements agent, not an execution agent.
Skill()规格写入完成后,通过向用户展示执行选项:
AskUserQuestion问题:「你的需求规格已准备就绪(歧义度:{score}%)。你希望如何推进?」
选项:
-
Ralplan → Autopilot(推荐)
- 描述:「3阶段流水线:通过规划师/架构师/评审员对该规格进行共识优化,之后通过全功能autopilot执行,质量最高。」
- 操作:调用,传入
Skill("oh-my-claudecode:omc-plan")参数和规格文件路径作为上下文。--consensus --direct参数会跳过omc-plan技能的访谈阶段(深度访谈已经完成需求收集),--direct参数会触发规划师→架构师→评审员的共识循环。当共识完成并在--consensus目录下生成计划后,调用.omc/plans/,传入共识计划作为第0+1阶段输出——autopilot会跳过扩展和规划阶段,直接进入第2阶段(执行)。Skill("oh-my-claudecode:autopilot") - 流水线:
deep-interview 规格 → omc-plan --consensus --direct → autopilot 执行
-
直接通过autopilot执行(跳过ralplan)
- 描述:「全自动流水线——包含规划、并行实现、QA、验证,速度更快但没有共识优化环节。」
- 操作:调用,传入规格文件路径作为上下文。规格会替代autopilot的第0阶段输出——autopilot从第1阶段(规划)开始执行。
Skill("oh-my-claudecode:autopilot")
-
通过ralph执行
- 描述:「带架构师验证的持久化循环——持续迭代直到所有验收标准通过」
- 操作:调用,传入规格文件路径作为任务定义。
Skill("oh-my-claudecode:ralph")
-
通过团队执行
- 描述:「N个协同的并行agent——大型规格的最快执行方式」
- 操作:调用,传入规格文件路径作为共享计划。
Skill("oh-my-claudecode:team")
-
进一步优化
- 描述:「继续访谈提升清晰度(当前:{score}%)」
- 操作:回到第2阶段访谈循环。
重要提示: 选择执行选项后,必须通过调用选中的技能,不要直接实现功能。deep-interview agent是需求处理agent,不是执行agent。
Skill()The 3-Stage Pipeline (Recommended Path)
3阶段流水线(推荐路径)
Stage 1: Deep Interview Stage 2: Ralplan Stage 3: Autopilot
┌─────────────────────┐ ┌───────────────────────────┐ ┌──────────────────────┐
│ Socratic Q&A │ │ Planner creates plan │ │ Phase 2: Execution │
│ Ambiguity scoring │───>│ Architect reviews │───>│ Phase 3: QA cycling │
│ Challenge agents │ │ Critic validates │ │ Phase 4: Validation │
│ Spec crystallization│ │ Loop until consensus │ │ Phase 5: Cleanup │
│ Gate: ≤20% ambiguity│ │ ADR + RALPLAN-DR summary │ │ │
└─────────────────────┘ └───────────────────────────┘ └──────────────────────┘
Output: spec.md Output: consensus-plan.md Output: working codeWhy 3 stages? Each stage provides a different quality gate:
- Deep Interview gates on clarity — does the user know what they want?
- Ralplan gates on feasibility — is the approach architecturally sound?
- Autopilot gates on correctness — does the code work and pass review?
Skipping any stage is possible but reduces quality assurance:
- Skip Stage 1 → autopilot may build the wrong thing (vague requirements)
- Skip Stage 2 → autopilot may plan poorly (no Architect/Critic challenge)
- Skip Stage 3 → no execution (just a refined plan)
<Tool_Usage>
- Use for each interview question — provides clickable UI with contextual options
AskUserQuestion - Use for brownfield codebase exploration (run BEFORE asking user about codebase)
Task(subagent_type="oh-my-claudecode:explore", model="haiku") - Use opus model (temperature 0.1) for ambiguity scoring — consistency is critical
- Use /
state_writefor interview state persistencestate_read - Use tool to save the final spec to
Write.omc/specs/ - Use to bridge to execution modes — never implement directly
Skill() - Challenge agent modes are prompt injections, not separate agent spawns </Tool_Usage>
Question: "I see your project uses JWT authentication with passport.js in src/auth/.
For this new feature, should we extend the existing auth middleware or create
a separate authentication flow?"
Why good: Explored first, then asked an informed question. Never asks the user what the code already reveals.
</Good>
<Good>
Contrarian mode activation:Round 5 | Contrarian Mode | Ambiguity: 42%
You've said this needs to support 10,000 concurrent users. What if it only
needed to handle 100? Would the architecture change fundamentally, or is
the 10K number an assumption rather than a measured requirement?
Why good: Challenges a specific assumption (scale requirement) that could dramatically simplify the solution.
</Good>
<Good>
Early exit with warning:User: "That's enough, just build it"
System: "Current ambiguity is 35% (threshold: 20%). Areas still unclear:
- Success Criteria: 0.5 (How do we verify the search ranking algorithm works correctly?)
- Constraints: 0.6 (No performance targets defined yet)
Proceeding may require rework. Continue anyway?"
[Yes, proceed] [Ask 2-3 more questions] [Cancel]
Why good: Respects user's desire to stop but transparently shows the risk.
</Good>
<Bad>
Batching multiple questions:"What's the target audience? And what tech stack? And how should auth work?
Also, what's the deployment target?"
Why bad: Four questions at once — causes shallow answers and makes scoring inaccurate.
</Bad>
<Bad>
Asking about codebase facts:"What database does your project use?"
Why bad: Should have spawned explore agent to find this. Never ask the user what the code already tells you.
</Bad>
<Bad>
Proceeding despite high ambiguity:"Ambiguity is at 45% but we've done 5 rounds, so let's start building."
Why bad: 45% ambiguity means nearly half the requirements are unclear. The mathematical gate exists to prevent exactly this.
</Bad>
</Examples>
<Escalation_And_Stop_Conditions>
- **Hard cap at 20 rounds**: Proceed with whatever clarity exists, noting the risk
- **Soft warning at 10 rounds**: Offer to continue or proceed
- **Early exit (round 3+)**: Allow with warning if ambiguity > threshold
- **User says "stop", "cancel", "abort"**: Stop immediately, save state for resume
- **Ambiguity stalls** (same score +-0.05 for 3 rounds): Activate Ontologist mode to reframe
- **All dimensions at 0.9+**: Skip to spec generation even if not at round minimum
- **Codebase exploration fails**: Proceed as greenfield, note the limitation
</Escalation_And_Stop_Conditions>
<Final_Checklist>
- [ ] Interview completed (ambiguity ≤ threshold OR user chose early exit)
- [ ] Ambiguity score displayed after every round
- [ ] Challenge agents activated at correct thresholds (round 4, 6, 8)
- [ ] Spec file written to `.omc/specs/deep-interview-{slug}.md`
- [ ] Spec includes: goal, constraints, acceptance criteria, clarity breakdown, transcript
- [ ] Execution bridge presented via AskUserQuestion
- [ ] Selected execution mode invoked via Skill() (never direct implementation)
- [ ] If 3-stage pipeline selected: omc-plan --consensus --direct invoked, then autopilot with consensus plan
- [ ] State cleaned up after execution handoff
</Final_Checklist>
<Advanced>第1阶段:深度访谈 第2阶段:Ralplan 第3阶段:Autopilot
┌─────────────────────┐ ┌───────────────────────────┐ ┌──────────────────────┐
│ 苏格拉底式问答 │ │ 规划师生成执行计划 │ │ 第2阶段:执行 │
│ 歧义度打分 │───>│ 架构师评审 │───>│ 第3阶段:QA循环 │
│ 挑战Agent │ │ 评审员验证 │ │ 第4阶段:校验 │
│ 规格固化 │ │ 循环直到达成共识 │ │ 第5阶段:清理 │
│ 阈值:≤20%歧义度 │ │ ADR + RALPLAN-DR 摘要 │ │ │
└─────────────────────┘ └───────────────────────────┘ └──────────────────────┘
输出:spec.md 输出:consensus-plan.md 输出:可用代码为什么要分3个阶段? 每个阶段提供不同的质量校验:
- 深度访谈 校验清晰度——用户是否明确知道自己想要什么?
- Ralplan 校验可行性——方案在架构上是否合理?
- Autopilot 校验正确性——代码是否可用且通过评审?
可以跳过任意阶段,但会降低质量保障程度:
- 跳过第1阶段 → autopilot可能构建错误的产品(需求模糊)
- 跳过第2阶段 → autopilot可能规划不当(没有架构师/评审员的挑战)
- 跳过第3阶段 → 没有实际执行(只有优化后的计划)
<Tool_Usage>
- 每次访谈提问使用——提供带上下文选项的可点击UI
AskUserQuestion - 存量项目代码库探索使用(在询问用户代码库相关问题前执行)
Task(subagent_type="oh-my-claudecode:explore", model="haiku") - 歧义度打分使用opus模型(温度0.1)——一致性至关重要
- 访谈状态持久化使用/
state_writestate_read - 使用工具将最终规格保存到
Write目录.omc/specs/ - 执行衔接使用调用对应技能——永远不要直接实现功能
Skill() - 挑战Agent模式是提示词注入,不需要单独生成agent </Tool_Usage>
问题:「我看到你的项目在src/auth/目录下使用passport.js实现了JWT鉴权,这个新功能我们应该扩展现有鉴权中间件,还是创建独立的鉴权流程?"
为什么优秀:先探索代码库,再提出有依据的问题,永远不会询问用户代码库已经明确的信息。
</Good>
<Good>
唱反调模式激活:第5轮 | 唱反调模式 | 歧义度:42%
你提到这个功能需要支持10000并发用户,如果只需要支持100个呢?架构会发生根本性变化吗?还是说10000这个数字是假设的,而非实际测量的需求?
为什么优秀:挑战了一个可能大幅简化方案的具体假设(规模需求)。
</Good>
<Good>
带警告的提前退出:用户:「足够了,直接构建吧」
系统:「当前歧义度为35%(阈值:20%)。仍不明确的点包括:
- 成功标准:0.5(如何验证搜索排序算法正常工作?)
- 约束:0.6(尚未定义性能指标)
继续执行可能需要返工,是否仍然继续?"
[是,继续] [再问2-3个问题] [取消]
为什么优秀:尊重用户停止访谈的意愿,同时透明展示风险。
</Good>
<Bad>
批量抛出多个问题:"目标受众是谁?用什么技术栈?鉴权怎么实现?还有部署目标是什么?"
为什么不好:一次提四个问题——会导致回答很浅,打分也不准确。
</Bad>
<Bad>
询问代码库已有的事实:"你的项目用什么数据库?"
为什么不好:应该生成explore agent来查找这个信息,永远不要询问用户代码库已经明确告诉你的内容。
</Bad>
<Bad>
高歧义度下仍然推进:"歧义度是45%,但我们已经做了5轮访谈了,开始构建吧。"
为什么不好:45%的歧义度意味着近一半的需求不明确,数学阈值的存在就是为了避免这种情况。
</Bad>
</Examples>
<Escalation_And_Stop_Conditions>
- **20轮硬上限**:按当前清晰度推进,明确标注风险
- **10轮软警告**:提供继续访谈或直接推进的选项
- **提前退出(第3轮及以后)**:歧义度高于阈值时展示警告后允许退出
- **用户说「停止」、「取消」、「终止」**:立即停止,保存状态供后续恢复
- **歧义度停滞**(连续3轮得分波动在±0.05以内):激活本体论模式重新梳理框架
- **所有维度得分≥0.9**:即使未达到最低轮次要求,也直接进入规格生成阶段
- **代码库探索失败**:按全新项目处理,记录该限制
</Escalation_And_Stop_Conditions>
<Final_Checklist>
- [ ] 访谈完成(歧义度≤阈值 或 用户选择提前退出)
- [ ] 每轮访谈后都展示了歧义度得分
- [ ] 挑战Agent在正确的阈值激活(第4、6、8轮)
- [ ] 规格文件已写入`.omc/specs/deep-interview-{slug}.md`
- [ ] 规格包含:目标、约束、验收标准、清晰度明细、访谈记录
- [ ] 通过AskUserQuestion展示了执行衔接选项
- [ ] 选中的执行模式通过Skill()调用(永远不直接实现)
- [ ] 如果选择3阶段流水线:调用omc-plan --consensus --direct,之后用共识计划调用autopilot
- [ ] 执行移交后清理状态
</Final_Checklist>
<Advanced>Configuration
配置
Optional settings in :
.claude/settings.jsonjson
{
"omc": {
"deepInterview": {
"ambiguityThreshold": 0.2,
"maxRounds": 20,
"softWarningRounds": 10,
"minRoundsBeforeExit": 3,
"enableChallengeAgents": true,
"autoExecuteOnComplete": false,
"defaultExecutionMode": "autopilot",
"scoringModel": "opus"
}
}
}.claude/settings.jsonjson
{
"omc": {
"deepInterview": {
"ambiguityThreshold": 0.2,
"maxRounds": 20,
"softWarningRounds": 10,
"minRoundsBeforeExit": 3,
"enableChallengeAgents": true,
"autoExecuteOnComplete": false,
"defaultExecutionMode": "autopilot",
"scoringModel": "opus"
}
}
}Resume
恢复进度
If interrupted, run again. The skill reads state from and resumes from the last completed round.
/deep-interview.omc/state/deep-interview-state.json如果会话中断,再次运行即可。该技能会从中读取状态,从上次完成的轮次恢复。
/deep-interview.omc/state/deep-interview-state.jsonIntegration with Autopilot
与Autopilot集成
When autopilot receives a vague input (no file paths, function names, or concrete anchors), it can redirect to deep-interview:
User: "autopilot build me a thing"
Autopilot: "Your request is quite open-ended. Would you like to run a deep interview first to clarify requirements?"
[Yes, interview first] [No, expand directly]If the user chooses interview, autopilot invokes . When the interview completes and the user selects "Execute with autopilot", the spec becomes Phase 0 output and autopilot continues from Phase 1 (Planning).
/deep-interview当autopilot收到模糊输入(没有文件路径、函数名或具体锚点)时,可以重定向到深度访谈:
用户:"autopilot 给我做个东西"
Autopilot:「你的需求非常开放,你是否希望先运行深度访谈明确需求?」
[是,先访谈] [否,直接扩展]如果用户选择访谈,autopilot会调用。访谈完成且用户选择「通过autopilot执行」时,生成的规格会作为第0阶段输出,autopilot从第1阶段(规划)继续执行。
/deep-interviewThe 3-Stage Pipeline: deep-interview → ralplan → autopilot
3阶段流水线:deep-interview → ralplan → autopilot
The recommended execution path chains three quality gates:
/deep-interview "vague idea"
→ Socratic Q&A until ambiguity ≤ 20%
→ Spec written to .omc/specs/deep-interview-{slug}.md
→ User selects "Ralplan → Autopilot"
→ /omc-plan --consensus --direct (spec as input, skip interview)
→ Planner creates implementation plan from spec
→ Architect reviews for architectural soundness
→ Critic validates quality and testability
→ Loop until consensus (max 5 iterations)
→ Consensus plan written to .omc/plans/
→ /autopilot (plan as input, skip Phase 0+1)
→ Phase 2: Parallel execution via Ralph + Ultrawork
→ Phase 3: QA cycling until tests pass
→ Phase 4: Multi-perspective validation
→ Phase 5: CleanupThe omc-plan skill receives the spec with flags because the deep interview already did the requirements gathering. The flag (supported by the omc-plan skill, which ralplan aliases) skips the interview phase and goes straight to Planner → Architect → Critic consensus. The consensus plan includes:
--consensus --direct--direct- RALPLAN-DR summary (Principles, Decision Drivers, Options)
- ADR (Decision, Drivers, Alternatives, Why chosen, Consequences)
- Testable acceptance criteria (inherited from deep-interview spec)
- Implementation steps with file references
Autopilot receives the ralplan consensus plan and skips both Phase 0 (Expansion) and Phase 1 (Planning) since ralplan already produced a Critic-approved plan. Autopilot starts directly at Phase 2 (Execution).
推荐的执行路径串联了三个质量校验门:
/deep-interview "模糊的想法"
→ 苏格拉底式问答直到歧义度 ≤ 20%
→ 规格写入.omc/specs/deep-interview-{slug}.md
→ 用户选择「Ralplan → Autopilot」
→ /omc-plan --consensus --direct(规格作为输入,跳过访谈)
→ 规划师根据规格生成执行计划
→ 架构师评审架构合理性
→ 评审员验证质量和可测试性
→ 循环直到达成共识(最多5次迭代)
→ 共识计划写入.omc/plans/目录
→ /autopilot(计划作为输入,跳过第0+1阶段)
→ 第2阶段:通过Ralph + Ultrawork并行执行
→ 第3阶段:QA循环直到测试通过
→ 第4阶段:多视角验证
→ 第5阶段:清理omc-plan技能收到带参数的规格,因为深度访谈已经完成了需求收集。参数(omc-plan技能支持,ralplan是其别名)会跳过访谈阶段,直接进入规划师→架构师→评审员的共识循环。共识计划包含:
--consensus --direct--direct- RALPLAN-DR摘要(原则、决策驱动因素、选项)
- ADR(决策、驱动因素、备选方案、选择原因、后果)
- 可测试的验收标准(继承自深度访谈规格)
- 带文件引用的执行步骤
Autopilot收到ralplan共识计划后会跳过第0阶段(扩展)和第1阶段(规划),因为ralplan已经生成了经评审员认可的计划。Autopilot直接从第2阶段(执行)开始。
Integration with Ralplan Gate
与Ralplan门控集成
The ralplan pre-execution gate already redirects vague prompts to planning. Deep interview can serve as an alternative redirect target for prompts that are too vague even for ralplan:
Vague prompt → ralplan gate → deep-interview (if extremely vague) → ralplan (with clear spec) → autopilotralplan执行前门控已经会将模糊的提示重定向到规划流程。对于即使对ralplan来说也过于模糊的提示,深度访谈可以作为替代的重定向目标:
模糊提示 → ralplan门控 → 深度访谈(如果极其模糊) → ralplan(带清晰规格) → autopilotBrownfield vs Greenfield Weights
存量项目 vs 全新项目权重
| Dimension | Greenfield | Brownfield |
|---|---|---|
| Goal Clarity | 40% | 35% |
| Constraint Clarity | 30% | 25% |
| Success Criteria | 30% | 25% |
| Context Clarity | N/A | 15% |
Brownfield adds Context Clarity because modifying existing code safely requires understanding the system being changed.
| 维度 | 全新项目 | 存量项目 |
|---|---|---|
| 目标清晰度 | 40% | 35% |
| 约束清晰度 | 30% | 25% |
| 成功标准 | 30% | 25% |
| 上下文清晰度 | 无 | 15% |
存量项目新增上下文清晰度维度,因为安全修改现有代码需要理解被修改的系统。
Challenge Agent Modes
挑战Agent模式
| Mode | Activates | Purpose | Prompt Injection |
|---|---|---|---|
| Contrarian | Round 4+ | Challenge assumptions | "What if the opposite were true?" |
| Simplifier | Round 6+ | Remove complexity | "What's the simplest version?" |
| Ontologist | Round 8+ (if ambiguity > 0.3) | Find essence | "What IS this, really?" |
Each mode is used exactly once, then normal Socratic questioning resumes. Modes are tracked in state to prevent repetition.
| 模式 | 激活时机 | 目标 | 提示词注入 |
|---|---|---|---|
| 唱反调 | 第4轮及以后 | 挑战假设 | "如果情况正好相反呢?" |
| 简化模式 | 第6轮及以后 | 移除复杂度 | "最简可用版本是什么样的?" |
| 本体论模式 | 第8轮及以后(如果歧义度>0.3) | 找到本质 | "这个东西本质上到底是什么?" |
每种模式仅使用一次,之后恢复正常的苏格拉底式提问。状态中会跟踪已使用的模式避免重复。
Ambiguity Score Interpretation
歧义度得分解读
| Score Range | Meaning | Action |
|---|---|---|
| 0.0 - 0.1 | Crystal clear | Proceed immediately |
| 0.1 - 0.2 | Clear enough | Proceed (default threshold) |
| 0.2 - 0.4 | Some gaps | Continue interviewing |
| 0.4 - 0.6 | Significant gaps | Focus on weakest dimensions |
| 0.6 - 0.8 | Very unclear | May need reframing (Ontologist) |
| 0.8 - 1.0 | Almost nothing known | Early stages, keep going |
Task: {{ARGUMENTS}}
| 得分范围 | 含义 | 操作 |
|---|---|---|
| 0.0 - 0.1 | 极其清晰 | 立即推进 |
| 0.1 - 0.2 | 足够清晰 | 推进(默认阈值) |
| 0.2 - 0.4 | 存在少量缺口 | 继续访谈 |
| 0.4 - 0.6 | 存在明显缺口 | 聚焦最弱维度 |
| 0.6 - 0.8 | 非常模糊 | 可能需要重新梳理框架(本体论模式) |
| 0.8 - 1.0 | 几乎没有明确信息 | 早期阶段,继续访谈 |
任务:{{ARGUMENTS}}