Files
nexus/wiki/concepts/Inversion.md

43 lines
1.4 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.
---
title: "Inversion"
type: concept
tags: [Agent, Skill, Design Pattern, ADK]
sources: [google-5个agent-skill设计模式-2026-03-19]
last_updated: 2026-03-19
---
## Overview
Inversion 是 Google ADK 发布的 5 种 Agent Skill 设计模式之一,让 Agent 先变成面试官问你问题,等你回答完再行动。这是最反直觉但最实用的模式之一。
## Mechanism
- Agent 变成面试官,先问一系列问题
- 等待用户逐个回答
- 明确、不可协商的门控指令("不到所有阶段完成就不开始构建"
- 等用户回答完所有问题后才开始行动
## Use Cases
- 项目规划:收集需求、约束、资源
- PRD 生成:收集产品背景、目标用户、功能需求
- 架构设计:收集技术栈、规模要求、预算限制
## Key Insight
> Agent 天生喜欢直接猜测和生成Inversion 把这个流程完全反过来。
## Implementation
```
SKILL.md: 门控指令("不完成所有阶段不开始构建"
→ Agent 逐阶段提问
→ 用户回答
→ 加载 plan-template.md
→ 生成最终计划
```
## Related Concepts
- [[Generator]]:可以在开头依赖 Inversion 收集必要变量
- [[Pipeline]]:另一种强制流程的模式
- [[渐进式披露]]:类似的按需加载思想
## Connections
- [[Google5个AgentSkill设计模式]] ← part_of ← [[Inversion]]
- [[ADK]] ← published_by ← [[Inversion]]