重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
deep-interview by yeachan-heo/oh-my-claudecode
npx skills add https://github.com/yeachan-heo/oh-my-claudecode --skill deep-interview<Use_When>
<Do_Not_Use_When>
omc-plan 技能代替<Why_This_Exists> AI 可以构建任何东西。困难的部分在于知道要构建什么。OMC 的 autopilot Phase 0 通过分析师 + 架构师将想法扩展为规范,但这种单次处理方式难以应对真正模糊的输入。它会问“你想要什么?”而不是“你假设了什么?”。深度访谈应用苏格拉底方法论,迭代式地暴露假设并通过数学方式判断准备就绪状态,确保 AI 在花费执行周期之前拥有真正的清晰度。
灵感来源于 Ouroboros 项目,该项目证明了规范质量是 AI 辅助开发的主要瓶颈。</Why_This_Exists>
<Execution_Policy>
explore 代理收集代码库事实<Autoresearch_Mode> 当参数包含 --autoresearch 时,深度访谈将成为 的零学习曲线设置通道。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
omc autoresearchomc-plan、autopilot、ralph 或 team。而是运行:
omc autoresearch --mission "<mission>" --eval "<evaluator>" [--keep-policy <policy>] [--slug <slug>]{{ARGUMENTS}} 中提取explore 代理(haiku):检查当前工作目录是否有现有的源代码、包文件或 git 历史记录explore 代理以映射相关代码库区域,存储为 codebase_contextstate_write(mode="deep-interview") 初始化状态:{
"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": [],
"ontology_snapshots": []
}
}
5. 向用户宣布访谈开始:
开始深度访谈。在构建任何内容之前,我将提出有针对性的问题,以彻底理解您的想法。每次回答后,我会显示您的清晰度分数。一旦模糊度降至 20% 以下,我们将继续执行。
您的想法:“{initial_idea}” 项目类型: {greenfield|brownfield} 当前模糊度: 100%(我们尚未开始)
重复直到 模糊度 ≤ 阈值 或用户提前退出:
构建问题生成提示,包含:
问题定位策略:
按维度划分的问题风格:
| 维度 | 问题风格 | 示例 |
|---|---|---|
| 目标清晰度 | “当……时,具体会发生什么?” | “当您说‘管理任务’时,用户首先会采取什么具体操作?” |
| 约束清晰度 | “边界是什么?” | “这应该离线工作,还是假设有互联网连接?” |
| 成功标准清晰度 | “我们如何知道它有效?” | “如果我向您展示完成的产品,什么会让您说‘是的,就是这个’?” |
| 上下文清晰度(棕地) | “这如何适应现有系统?” | “现有的身份验证在 src/auth/ 中使用 JWT。我们应该扩展它还是添加单独的流程?” |
使用 AskUserQuestion 提出生成的问题。清晰地呈现当前模糊度上下文:
第 {n} 轮 | 目标维度:{weakest_dimension} | 模糊度:{score}%
{question}
选项应包括上下文相关的选择以及自由文本。
收到用户答案后,计算所有维度的清晰度分数。
评分提示(使用 opus 模型,temperature 0.1 以确保一致性):
给定以下针对 {greenfield|brownfield} 项目的访谈记录,请为每个维度评分(0.0 到 1.0):
原始想法:{idea}
记录:
{all rounds Q&A}
为每个维度评分:
1. 目标清晰度 (0.0-1.0):主要目标是否明确?能否用一句话陈述,无需限定词?能否无歧义地命名关键实体(名词)及其关系(动词)?
2. 约束清晰度 (0.0-1.0):边界、限制和非目标是否清晰?
3. 成功标准清晰度 (0.0-1.0):能否编写验证成功的测试?验收标准是否具体?
{4. 上下文清晰度 (0.0-1.0):[仅棕地项目] 我们是否足够了解现有系统以安全地修改它?识别的实体是否能清晰地映射到现有的代码库结构?}
对于每个维度,提供:
- 分数:浮点数 (0.0-1.0)
- 理由:一句话解释分数
- 差距:如果分数 < 0.9,说明仍不清楚的地方
5. 本体提取:识别记录中讨论的所有关键实体(名词)。
{如果轮次 > 1,注入:“上一轮的实体:{prior_entities_json from state.ontology_snapshots[-1]}。对于相同的概念,请重用这些实体名称。仅对真正的新概念引入新名称。”}
对于每个实体,提供:
- 名称:字符串(实体名称,例如“User”、“Order”、“PaymentMethod”)
- 类型:字符串(例如“核心领域”、“支持性”、“外部系统”)
- 字段:字符串[](提到的关键属性)
- 关系:字符串[](例如“User has many Orders”)
以 JSON 格式响应。包含一个额外的“ontology”键,其中包含实体数组以及维度分数。
计算模糊度:
绿地项目:模糊度 = 1 - (目标 × 0.40 + 约束 × 0.30 + 标准 × 0.30) 棕地项目:模糊度 = 1 - (目标 × 0.35 + 约束 × 0.25 + 标准 × 0.25 + 上下文 × 0.15)
计算本体稳定性:
第 1 轮特殊情况: 对于第一轮,跳过稳定性比较。所有实体均为“新”。设置 stability_ratio = N/A。如果任何轮次产生零个实体,设置 stability_ratio = N/A(避免除以零)。
对于第 2+ 轮,与上一轮的实体列表进行比较:
stable_entities:两轮中都存在且名称相同的实体changed_entities:名称不同但类型相同 且 字段重叠度 >50% 的实体(视为重命名,而非新增+移除)new_entities:此轮中未通过名称或模糊匹配到任何先前实体的实体removed_entities:上一轮中未匹配到任何当前实体的实体stability_ratio:(stable + changed) / total_entities (0.0 到 1.0,其中 1.0 = 完全收敛)此公式将重命名的实体(changed)计入稳定性。重命名的实体表示概念即使名称改变也仍然存在——这是收敛,而非不稳定。两个名称不同但 type 相同且字段重叠度 >50% 的实体应归类为“changed”(重命名),而非一个移除一个新增。
展示你的工作: 在报告稳定性数字之前,简要列出哪些实体被匹配(通过名称或模糊匹配),哪些是新增/移除的。这可以让用户检查匹配的合理性。
将本体快照(实体 + stability_ratio + matching_reasoning)存储在 state.ontology_snapshots[] 中。
评分后,向用户展示他们的进度:
第 {n} 轮完成。
| 维度 | 分数 | 权重 | 加权分数 | 差距 |
|-----------|-------|--------|----------|-----|
| 目标 | {s} | {w} | {s*w} | {gap or "清晰"} |
| 约束 | {s} | {w} | {s*w} | {gap or "清晰"} |
| 成功标准 | {s} | {w} | {s*w} | {gap or "清晰"} |
| 上下文(棕地) | {s} | {w} | {s*w} | {gap or "清晰"} |
| **模糊度** | | | **{score}%** | |
**本体:** {entity_count} 个实体 | 稳定性:{stability_ratio} | 新增:{new} | 变更:{changed} | 稳定:{stable}
{score <= threshold ? "清晰度阈值已满足!准备继续。" : "下一个问题将重点关注:{weakest_dimension}"}
通过 state_write 更新访谈状态,包含新的轮次和分数。
在特定轮次阈值,转换提问视角:
注入到问题生成提示中:
你现在处于对立模式。你的下一个问题应该挑战用户的核心假设。询问“如果相反的情况成立会怎样?”或“如果这个约束实际上不存在会怎样?”。目标是测试用户的框架是否正确,还是仅仅是习惯性的。
注入到问题生成提示中:
你现在处于简化模式。你的下一个问题应该探究是否可以移除复杂性。询问“仍然有价值的最简单版本是什么?”或“这些约束中哪些是真正必要的,哪些是假设的?”。目标是找到最小可行的规范。
注入到问题生成提示中:
你现在处于本体论者模式。经过 8 轮后模糊度仍然很高,表明我们可能是在处理症状而非核心问题。到目前为止跟踪的实体是:{current_entities_summary from latest ontology snapshot}。询问“这到底是什么?”或“查看这些实体,哪个是核心概念,哪些只是支持性的?”。目标是通过检查本体来找到本质。
挑战模式每种仅使用一次,然后恢复正常的苏格拉底式提问。在状态中跟踪已使用的模式。
当模糊度 ≤ 阈值(或达到硬性上限/提前退出)时:
.omc/specs/deep-interview-{slug}.md规范结构:
# 深度访谈规范:{title}
## 元数据
- 访谈 ID:{uuid}
- 轮次:{count}
- 最终模糊度分数:{score}%
- 类型:greenfield | brownfield
- 生成时间:{timestamp}
- 阈值:{threshold}
- 状态:{PASSED | BELOW_THRESHOLD_EARLY_EXIT}
## 清晰度细分
| 维度 | 分数 | 权重 | 加权分数 |
|-----------|-------|--------|----------|
| 目标清晰度 | {s} | {w} | {s*w} |
| 约束清晰度 | {s} | {w} | {s*w} |
| 成功标准清晰度 | {s} | {w} | {s*w} |
| 上下文清晰度 | {s} | {w} | {s*w} |
| **总清晰度** | | | **{total}** |
| **模糊度** | | | **{1-total}** |
## 目标
{源自访谈的清晰目标陈述}
## 约束
- {约束 1}
- {约束 2}
- ...
## 非目标
- {明确排除的范围 1}
- {明确排除的范围 2}
## 验收标准
- [ ] {可测试的标准 1}
- [ ] {可测试的标准 2}
- [ ] {可测试的标准 3}
- ...
## 暴露并解决的假设
| 假设 | 挑战 | 解决方案 |
|------------|-----------|------------|
| {assumption} | {how it was questioned} | {what was decided} |
## 技术上下文
{棕地项目:来自 explore 代理的相关代码库发现}
{绿地项目:技术选择和约束}
## 本体(关键实体)
{从**最终**轮次的本体提取中填充,而不仅仅是具体化时的生成}
| 实体 | 类型 | 字段 | 关系 |
|--------|------|--------|---------------|
| {entity.name} | {entity.type} | {entity.fields} | {entity.relationships} |
## 本体收敛
{使用状态中 ontology_snapshots 的数据,展示实体在访谈轮次中如何稳定下来}
| 轮次 | 实体数量 | 新增 | 变更 | 稳定 | 稳定性比率 |
|-------|-------------|-----|---------|--------|----------------|
| 1 | {n} | {n} | - | - | - |
| 2 | {n} | {new} | {changed} | {stable} | {ratio}% |
| ... | ... | ... | ... | ... | ... |
| {final} | {n} | {new} | {changed} | {stable} | {ratio}% |
## 访谈记录
<details>
<summary>完整问答({n} 轮)</summary>
### 第 1 轮
**问:** {question}
**答:** {answer}
**模糊度:** {score}% (目标:{g}, 约束:{c}, 标准:{cr})
...
</details>
Autoresearch 覆盖: 如果 --autoresearch 处于活动状态,跳过下面列出的标准执行选项。唯一有效的桥接是上述描述的 omc autoresearch --mission ... --eval ... 直接交接。
规范写入后,通过 AskUserQuestion 呈现执行选项:
问题: “您的规范已准备就绪(模糊度:{score}%)。您希望如何继续?”
选项:
Ralplan → Autopilot(推荐)
Skill("oh-my-claudecode:omc-plan"),附带 --consensus --direct 标志,并将规范文件路径作为上下文。--direct 标志跳过 omc-plan 技能的访谈阶段(深度访谈已完成需求收集),而 --consensus 触发 Planner/Architect/Critic 循环。当共识完成并在 .omc/plans/ 中生成计划后,调用 Skill("oh-my-claudecode:autopilot"),并将共识计划作为 Phase 0+1 输出——autopilot 跳过扩展和规划阶段,直接从 Phase 2(执行)开始。深度访谈规范 → omc-plan --consensus --direct → autopilot 执行使用 autopilot 执行(跳过 ralplan)
Skill("oh-my-claudecode:autopilot"),并将规范文件路径作为上下文。该规范取代 autopilot 的 Phase 0——autopilot 从 Phase 1(规划)开始。使用 ralph 执行
Skill("oh-my-claudecode:ralph"),并将规范文件路径作为任务定义。使用 team 执行
Skill("oh-my-claudecode:team"),并将规范文件路径作为共享计划。进一步优化
重要提示: 在选择执行模式时,必须通过 Skill() 调用所选技能。请勿直接实现。深度访谈代理是需求代理,而非执行代理。
阶段 1:深度访谈 阶段 2:Ralplan 阶段 3:Autopilot
┌─────────────────────┐ ┌───────────────────────────┐ ┌──────────────────────┐
│ 苏格拉底式问答 │ │ Planner 创建计划 │ │ Phase 2:执行 │
│ 模糊度评分 │───>│ Architect 审查 │───>│ Phase 3:QA 循环 │
│ 挑战代理 │ │ Critic 验证 │ │ Phase 4:验证 │
│ 规范具体化 │ │ 循环直到达成共识 │ │ Phase 5:清理 │
│ 关卡:≤20% 模糊度 │ │ ADR + RALPLAN-DR 摘要 │ │ │
└─────────────────────┘ └───────────────────────────┘ └──────────────────────┘
输出:spec.md 输出:consensus-plan.md 输出:可工作的代码
为什么需要 3 个阶段? 每个阶段提供不同的质量关卡:
跳过任何阶段都是可能的,但会降低质量保证:
<Tool_Usage>
AskUserQuestion 进行每个访谈问题——提供带有上下文选项的可点击 UITask(subagent_type="oh-my-claudecode:explore", model="haiku") 进行棕地项目代码库探索(在询问用户关于代码库的问题之前运行)state_write / state_read 进行访谈状态持久化Write 工具将最终规范保存到 .omc/specs/Skill() 桥接到执行模式——切勿直接实现问题:“我看到您的项目在 src/auth/ 中使用 passport.js 进行 JWT 身份验证。对于这个新功能,我们应该扩展现有的身份验证中间件,还是创建单独的身份验证流程?”
为什么好:先探索,然后提出有根据的问题。绝不询问用户代码已经揭示的内容。
</Good>
<Good>
对立模式激活:
第 5 轮 | 对立模式 | 模糊度:42%
您提到这需要支持 10,000 个并发用户。如果它只需要处理 100 个呢?架构会从根本上改变吗,还是说 10K 这个数字是一个假设而非经过测量的需求?
为什么好:挑战了一个可能显著简化解决方案的特定假设(规模要求)。
</Good>
<Good>
提前退出并警告:
用户:“够了,直接构建吧” 系统:“当前模糊度为 35%(阈值:20%)。仍不清楚的领域:
继续可能需要返工。仍然继续吗?” [是的,继续] [再问 2-3 个问题] [取消]
为什么好:尊重用户停止的意愿,但透明地显示风险。
</Good>
<Good>
本体收敛跟踪:
第 3 轮实体:User, Task, Project (稳定性:N/A → 67%) 第 4 轮实体:User, Task, Project, Tag (稳定性:75% — 3 个稳定,1 个新增) 第 5 轮实体:User, Task, Project, Tag (稳定性:100% — 全部 4 个稳定)
“本体已收敛——相同的 4 个实体连续 2 轮出现且无变化。领域模型已稳定。”
为什么好:展示跨轮次的实体跟踪以及可见的收敛。随着领域模型固化,稳定性比率增加,为访谈正在收敛于稳定理解提供了数学证据。
</Good>
<Bad>
批量提出多个问题:
“目标受众是什么?技术栈是什么?身份验证应该如何工作?另外,部署目标是什么?”
为什么不好:一次提出四个问题——导致回答肤浅,评分不准确。
</Bad>
<Bad>
询问代码库事实:
“您的项目使用什么数据库?”
为什么不好:应该已经生成 explore 代理来查找此信息。绝不询问用户代码已经告诉你的内容。
</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>
- [ ] 访谈完成(模糊度 ≤ 阈值 或 用户选择提前退出)
- [ ] 每轮后显示模糊度分数
- [ ] 在正确的阈值(第 4、6、8 轮)激活挑战代理
- [ ] 规范文件写入 `.omc/specs/deep-interview-{slug}.md`
- [ ] 规范包含:目标、约束、验收标准、清晰度细分、记录
- [ ] 通过 AskUserQuestion 呈现执行桥接
- [ ] 通过 Skill() 调用选定的执行模式(切勿直接实现)
- [ ] 如果选择 3 阶段流水线:调用 omc-plan --consensus --direct,然后使用共识计划调用 autopilot
- [ ] 执行交接后清理状态
- [ ] 每轮模糊度报告包含本体行,显示实体数量和稳定性比率
- [ ] 规范包含本体(关键实体)表和本体收敛部分
</Final_Checklist>
<Advanced>
## 配置
`.claude/settings.json` 中的可选设置:
```json
{
"omc": {
"deepInterview": {
"ambiguityThreshold": 0.2,
"maxRounds": 20,
"softWarningRounds": 10,
"minRoundsBeforeExit": 3,
"enableChallengeAgents": true,
"autoExecuteOnComplete": false,
"defaultExecutionMode": "autopilot",
"scoringModel": "opus"
}
}
}
如果中断,再次运行 /deep-interview。该技能从 .omc/state/deep-interview-state.json 读取状态,并从最后完成的轮次恢复。
当 autopilot 收到模糊的输入(没有文件路径、函数名称或具体锚点)时,它可以重定向到深度访谈:
用户:“autopilot 给我构建一个东西”
Autopilot:“您的请求相当开放。您想先运行深度访谈来澄清需求吗?”
[是的,先访谈] [不,直接扩展]
如果用户选择访谈,autopilot 调用 /deep-interview。当访谈完成且用户选择“使用 autopilot 执行”时,该规范成为 Phase 0 输出,autopilot 从 Phase 1(规划)继续。
推荐的执行路径链接了三个质量关卡:
/deep-interview "模糊的想法"
→ 苏格拉底式问答直到模糊度 ≤ 20%
→ 规范写入 .omc/specs/deep-interview-{slug}.md
→ 用户选择“Ralplan → Autopilot”
→ /omc-plan --consensus --direct(规范作为输入,跳过访谈)
→ Planner 根据规范创建实施计划
→ Architect 审查架构合理性
→ Critic 验证质量和可测试性
→ 循环直到达成共识(最多 5 次迭代)
→ 共识计划写入 .omc/plans/
→ /autopilot(计划作为输入,跳过 Phase 0+1)
→ Phase 2:通过 Ralph + Ultrawork 并行执行
→ Phase 3:QA 循环直到测试通过
→ Phase 4:多视角验证
→ Phase 5:清理
omc-plan 技能接收带有 --consensus --direct 标志的规范,因为深度访谈已经完成了需求收集。--direct 标志(由 omc-plan 技能支持,ralplan 是其别名)跳过访谈阶段,直接进入 Planner → Architect → Critic 共识。共识计划包括:
Autopilot 接收 ralplan 共识计划,并跳过 Phase 0(扩展)和 Phase 1(规划),因为 ralplan 已经生成了经过 Critic 批准的计划。Autopilot 直接从 Phase 2(执行)开始。
Ralplan 预执行关卡已经将模糊提示重定向到规划。深度访谈可以作为另一种重定向目标,用于那些即使对 ralplan 来说也过于模糊的提示:
模糊提示 → ralplan 关卡 → 深度访谈(如果极其模糊) → ralplan(带有清晰的规范) → autopilot
| 维度 | 绿地项目 | 棕地项目 |
|---|---|---|
| 目标清晰度 | 40% | 35% |
| 约束清晰度 | 30% | 25% |
| 成功标准清晰度 | 30% | 25% |
| 上下文清晰度 | N/A | 15% |
棕地项目增加了上下文清晰度,因为安全地修改现有代码需要理解正在更改的系统。
| 模式 | 激活时机 | 目的 | 提示注入 |
|---|---|---|---|
| 对立模式 | 第 4+ 轮 | 挑战假设 | “如果相反的情况成立会怎样?” |
| 简化模式 | 第 6+ 轮 | 移除复杂性 | “仍然有价值的最简单版本是什么?” |
| 本体论者模式 | 第 8+ 轮(如果模糊度 > 0.3) | 找到本质 | “这到底是什么?” |
每种模式仅使用一次,然后恢复正常的苏格拉底式提问。在状态中跟踪模式以防止重复。
| 分数范围 | 含义 | 操作 |
|---|---|---|
| 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}}
每周安装量
70
仓库
GitHub 星标数
11.3K
首次出现
2026年3月3日
安全审计
安装于
opencode70
gemini-cli69
codex69
kimi-cli69
cursor69
github-copilot69
<Use_When>
<Do_Not_Use_When>
omc-plan skill instead<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>
explore agent BEFORE asking the user about them<Autoresearch_Mode> When arguments include --autoresearch, Deep Interview becomes the zero-learning-curve setup lane for omc autoresearch.
omc-plan, autopilot, ralph, or team. Instead run:
omc autoresearch --mission "<mission>" --eval "<evaluator>" [--keep-policy <policy>] [--slug <slug>]{{ARGUMENTS}}explore agent (haiku): check if cwd has existing source code, package files, or git historyexplore agent to map relevant codebase areas, store as codebase_contextstate_write(mode="deep-interview"):{
"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": [],
"ontology_snapshots": []
}
}
5. 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)
Repeat until ambiguity ≤ threshold OR user exits early:
Build the question generation prompt with:
Question targeting strategy:
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?" |
Use AskUserQuestion with the generated question. Present it clearly with the current ambiguity context:
Round {n} | Targeting: {weakest_dimension} | Ambiguity: {score}%
{question}
Options should include contextually relevant choices plus free-text.
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? Can you name the key entities (nouns) and their relationships (verbs) without ambiguity?
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? Do the identified entities map cleanly to existing codebase structures?}
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)
5. Ontology Extraction: Identify all key entities (nouns) discussed in the transcript.
{If round > 1, inject: "Previous round's entities: {prior_entities_json from state.ontology_snapshots[-1]}. REUSE these entity names where the concept is the same. Only introduce new names for genuinely new concepts."}
For each entity provide:
- name: string (the entity name, e.g., "User", "Order", "PaymentMethod")
- type: string (e.g., "core domain", "supporting", "external system")
- fields: string[] (key attributes mentioned)
- relationships: string[] (e.g., "User has many Orders")
Respond as JSON. Include an additional "ontology" key containing the entities array alongside the dimension scores.
Calculate ambiguity:
Greenfield: ambiguity = 1 - (goal × 0.40 + constraints × 0.30 + criteria × 0.30) Brownfield: ambiguity = 1 - (goal × 0.35 + constraints × 0.25 + criteria × 0.25 + context × 0.15)
Calculate ontology stability:
Round 1 special case: For the first round, skip stability comparison. All entities are "new". Set stability_ratio = N/A. If any round produces zero entities, set stability_ratio = N/A (avoids division by zero).
For rounds 2+, compare with the previous round's entity list:
stable_entities: entities present in both rounds with the same namechanged_entities: entities with different names but the same type AND >50% field overlap (treated as renamed, not new+removed)new_entities: entities in this round not matched by name or fuzzy-match to any previous entityremoved_entities: entities in the previous round not matched to any current entitystability_ratio: (stable + changed) / total_entities (0.0 to 1.0, where 1.0 = fully converged)This formula counts renamed entities (changed) toward stability. Renamed entities indicate the concept persists even if the name shifted — this is convergence, not instability. Two entities with different names but the same type and >50% field overlap should be classified as "changed" (renamed), not as one removed and one added.
Show your work: Before reporting stability numbers, briefly list which entities were matched (by name or fuzzy) and which are new/removed. This lets the user sanity-check the matching.
Store the ontology snapshot (entities + stability_ratio + matching_reasoning) in state.ontology_snapshots[].
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}%** | |
**Ontology:** {entity_count} entities | Stability: {stability_ratio} | New: {new} | Changed: {changed} | Stable: {stable}
{score <= threshold ? "Clarity threshold met! Ready to proceed." : "Focusing next question on: {weakest_dimension}"}
Update interview state with the new round and scores via state_write.
At specific round thresholds, shift the questioning perspective:
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.
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.
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. The tracked entities so far are: {current_entities_summary from latest ontology snapshot}. Ask "What IS this, really?" or "Looking at these entities, which one is the CORE concept and which are just supporting?" The goal is to find the essence by examining the ontology.
Challenge modes are used ONCE each, then return to normal Socratic questioning. Track which modes have been used in state.
When ambiguity ≤ threshold (or hard cap / early exit):
.omc/specs/deep-interview-{slug}.mdSpec structure:
# Deep Interview Spec: {title}
## Metadata
- Interview ID: {uuid}
- Rounds: {count}
- Final Ambiguity Score: {score}%
- Type: greenfield | brownfield
- Generated: {timestamp}
- Threshold: {threshold}
- Status: {PASSED | BELOW_THRESHOLD_EARLY_EXIT}
## 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}** |
## Goal
{crystal-clear goal statement derived from interview}
## Constraints
- {constraint 1}
- {constraint 2}
- ...
## Non-Goals
- {explicitly excluded scope 1}
- {explicitly excluded scope 2}
## Acceptance Criteria
- [ ] {testable criterion 1}
- [ ] {testable criterion 2}
- [ ] {testable criterion 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}
## Ontology (Key Entities)
{Fill from the FINAL round's ontology extraction, not just crystallization-time generation}
| Entity | Type | Fields | Relationships |
|--------|------|--------|---------------|
| {entity.name} | {entity.type} | {entity.fields} | {entity.relationships} |
## Ontology Convergence
{Show how entities stabilized across interview rounds using data from ontology_snapshots in state}
| Round | Entity Count | New | Changed | Stable | Stability Ratio |
|-------|-------------|-----|---------|--------|----------------|
| 1 | {n} | {n} | - | - | - |
| 2 | {n} | {new} | {changed} | {stable} | {ratio}% |
| ... | ... | ... | ... | ... | ... |
| {final} | {n} | {new} | {changed} | {stable} | {ratio}% |
## Interview Transcript
<details>
<summary>Full Q&A ({n} rounds)</summary>
### Round 1
**Q:** {question}
**A:** {answer}
**Ambiguity:** {score}% (Goal: {g}, Constraints: {c}, Criteria: {cr})
...
</details>
Autoresearch override: if --autoresearch is active, skip the standard execution options below. The only valid bridge is the direct omc autoresearch --mission ... --eval ... handoff described above.
After the spec is written, present execution options via AskUserQuestion:
Question: "Your spec is ready (ambiguity: {score}%). How would you like to proceed?"
Options:
Ralplan → Autopilot (Recommended)
Skill("oh-my-claudecode:omc-plan") with --consensus --direct flags and the spec file path as context. The --direct flag skips the omc-plan skill's interview phase (the deep interview already gathered requirements), while --consensus triggers the Planner/Architect/Critic loop. When consensus completes and produces a plan in .omc/plans/, invoke Skill("oh-my-claudecode:autopilot") with the consensus plan as Phase 0+1 output — autopilot skips both Expansion and Planning, starting directly at Phase 2 (Execution).deep-interview spec → omc-plan --consensus --direct → autopilot executionIMPORTANT: On execution selection, MUST invoke the chosen skill via Skill(). Do NOT implement directly. The deep-interview agent is a requirements agent, not an execution agent.
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 code
Why 3 stages? Each stage provides a different quality gate:
Skipping any stage is possible but reduces quality assurance:
<Tool_Usage>
AskUserQuestion for each interview question — provides clickable UI with contextual optionsTask(subagent_type="oh-my-claudecode:explore", model="haiku") for brownfield codebase exploration (run BEFORE asking user about codebase)state_write / state_read for interview state persistenceWrite tool to save the final spec to .omc/specs/Skill() to bridge to execution modes — never implement directlyQuestion: "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:
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>
<Good>
Ontology convergence tracking:
Round 3 entities: User, Task, Project (stability: N/A → 67%) Round 4 entities: User, Task, Project, Tag (stability: 75% — 3 stable, 1 new) Round 5 entities: User, Task, Project, Tag (stability: 100% — all 4 stable)
"Ontology has converged — the same 4 entities appeared in 2 consecutive rounds with no changes. The domain model is stable."
Why good: Shows entity tracking across rounds with visible convergence. Stability ratio increases as the domain model solidifies, giving mathematical evidence that the interview is converging on a stable understanding.
</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
- [ ] Per-round ambiguity report includes Ontology row with entity count and stability ratio
- [ ] Spec includes Ontology (Key Entities) table and Ontology Convergence section
</Final_Checklist>
<Advanced>
## Configuration
Optional settings in `.claude/settings.json`:
```json
{
"omc": {
"deepInterview": {
"ambiguityThreshold": 0.2,
"maxRounds": 20,
"softWarningRounds": 10,
"minRoundsBeforeExit": 3,
"enableChallengeAgents": true,
"autoExecuteOnComplete": false,
"defaultExecutionMode": "autopilot",
"scoringModel": "opus"
}
}
}
If interrupted, run /deep-interview again. The skill reads state from .omc/state/deep-interview-state.json and resumes from the last completed round.
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 /deep-interview. When the interview completes and the user selects "Execute with autopilot", the spec becomes Phase 0 output and autopilot continues from Phase 1 (Planning).
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: Cleanup
The omc-plan skill receives the spec with--consensus --direct flags because the deep interview already did the requirements gathering. The --direct 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:
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).
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) → autopilot
| 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.
| 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.
| 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}}
Weekly Installs
70
Repository
GitHub Stars
11.3K
First Seen
Mar 3, 2026
Security Audits
Gen Agent Trust HubPassSocketWarnSnykPass
Installed on
opencode70
gemini-cli69
codex69
kimi-cli69
cursor69
github-copilot69
超能力技能使用指南:AI助手技能调用优先级与工作流程详解
53,700 周安装
Execute with autopilot (skip ralplan)
Skill("oh-my-claudecode:autopilot") with the spec file path as context. The spec replaces autopilot's Phase 0 — autopilot starts at Phase 1 (Planning).Execute with ralph
Skill("oh-my-claudecode:ralph") with the spec file path as the task definition.Execute with team
Skill("oh-my-claudecode:team") with the spec file path as the shared plan.Refine further