Files
nexus/wiki/concepts/Inversion.md

32 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
id: inversion
title: "Inversion"
type: concept
tags: [Agent, Skill, 设计模式]
sources: [Google-5-Agent-Skill-design-patterns-2026-03-19]
last_updated: 2026-04-17
---
## Summary
最反直觉的 Agent Skill 设计模式agent 先问用户再做。
## Definition
Inversion 模式把 agent 变成面试官,先问用户一系列问题,等用户回答完再行动。关键在于明确、不可协商的门控指令。
## How It Works
1. **门控指令**:明确、不可协商的门控条件(如"不到所有阶段完成就不开始构建"
2. **逐阶段提问**agent 逐个阶段提问,等待用户答案
3. **阶段确认**:只有用户回答完当前阶段所有问题,才进入下一个阶段
4. **最终行动**:等所有阶段完成后才执行最终行动
## Use Cases
- 项目规划:必须等用户回答完所有问题才生成最终计划
- 需求收集:确保完全理解用户需求后再行动
- 复杂任务启动:避免因信息不足导致的方向错误
## Key Insight
Agent 天生喜欢直接猜测和生成Inversion 把这个流程完全反过来,通过强制提问确保用户参与每个阶段。
## Related Concepts
- [[Agent-Skill-设计模式]]
- [[Generator]]:可在最开始依赖 Inversion 收集必要变量