Multiverse Architect
Design software as if exploring parallel universes: generate several distinct solution paths, explore each briefly, then choose and refine the best one with clear reasoning and trade-offs.
This skill is intentionally imaginative yet practical. It turns vague or high-stakes problems into a structured exploration of alternatives before writing or modifying code.
When to Use This Skill
Use Multiverse Architect when:
- - The task is ambiguous or has many possible approaches.
- There are important trade-offs (performance vs simplicity, DX vs UX, short-term vs long-term).
- The user says things like:
- "不确定应该怎么实现" / "I'm not sure which way is better."
- "有没有别的方案?" / "Are there other options?"
- "我们要不要用某某框架?" / "Should we use framework X?"
- - The change impacts architecture, data models, or cross-cutting behavior.
Do not use this skill for:
- - Trivial bug fixes with an obvious solution.
- Purely mechanical changes (renaming, formatting, small copy edits).
Core Principles
- 1. Parallel universes, not random variants
- Each "universe" is a
coherent, internally consistent design, not a tiny tweak.
- Differences must be
meaningful (architecture style, data shape, ownership boundaries, flow of control).
- 2. Shallow first, deep later
- Start with
coarse-grained sketches of each universe.
- Only go deep on the one that is ultimately chosen.
- 3. Explicit trade-offs
- For each universe, list
pros, cons, and risks.
- Always tie trade-offs back to the user’s actual constraints (team skills, deadlines, performance, etc.), inferred from context when not stated.
- 4. Reversible decisions
- Prefer designs that
keep options open and make it easier to pivot later.
- Call out which choices are
hard to change vs
easy to change.
Workflow Overview
Follow this 4-phase workflow:
- 1. Clarify the problem (what must be true, what is flexible)
- Generate 3–4 universes (distinct solution designs)
- Evaluate and converge (pick one, maybe merge good ideas)
- Produce a concrete implementation plan
Use this process before writing or modifying code for large or ambiguous tasks.
Phase 1: Clarify the Problem
When this skill is activated, start by constructing a concise problem summary and constraints list in your own words.
1.1 Problem Snapshot
Produce a short snapshot with this structure:
CODEBLOCK0
Guidelines:
- - Goal: Describe the user-visible outcome, not the implementation.
- Existing context: Mention relevant tech stack, files, or patterns already in use.
- Hard requirements: Things that must not break or be violated.
- Soft preferences: Things that are "nice to have" (DX, style, etc.).
- Unknowns / assumptions: State assumptions you will proceed with; adjust later if proven wrong.
1.2 Sanity Check
Silently check:
- - Is the problem actually simple with a single obvious path?
- If yes,
reduce this skill to a quick single-universe justification and proceed with normal implementation.
- - Otherwise, continue to Phase 2.
Phase 2: Generate Universes
Create 3 to 4 distinct universes (solutions). Fewer than 3 is allowed only when the space is clearly narrow.
2.1 Universe Template
For each universe, use:
CODEBLOCK1
2.2 Encourage Genuine Diversity
When generating universes:
-
Where complexity lives (frontend vs backend, infra vs app logic).
-
Data contracts (rich objects vs thin DTOs, normalized vs denormalized).
-
Control flow (event-driven vs request/response, imperative vs declarative).
- - Avoid fake variation like:
- "With comments" vs "without comments".
- Only changing naming or minor patterns.
Phase 3: Evaluate and Converge
Once universes are defined, compare and pick.
3.1 Comparison Matrix
Construct a compact comparison:
CODEBLOCK2
Adjust columns as needed (e.g., "Scalability", "Time-to-implement").
3.2 Choose (or Hybridize) a Universe
Then produce:
CODEBLOCK3
Guidelines:
- - If combining, name the hybrid and clearly state which pieces come from which universe.
- Explicitly justify why the rejected universes were rejected (too complex, too brittle, misaligned with constraints, etc.).
Phase 4: Implementation Plan
Turn the chosen universe into a concrete plan that you will then execute using normal tools and workflows.
4.1 Plan Template
Use this:
CODEBLOCK4
4.2 Execution Mode
After the plan is created:
- - Proceed with actual implementation outside this skill, using standard coding behavior.
- If the user changes constraints mid-way, revisit:
- Either adjust the current universe.
- Or briefly spin up
one new alternative universe to re-evaluate.
Mini-Mode: Lightweight Multiverse
For medium-sized decisions (too big to be trivial, too small for full multiverse), use this compressed flow:
- 1. Write a 1-paragraph problem snapshot.
- Sketch 2 universes with only:
- Core idea
- 2–3 pros
- 2–3 cons
- 3. Choose one in 3–4 bullet points.
- Write a short 3–5 step implementation outline.
Then continue as usual with coding.
Examples
Example A – Choosing a State Management Strategy
User: "我们要不要把这个 React 项目的状态全部换成 Zustand,还是继续用 Redux?"
Apply this skill:
- 1. Snapshot problem (current Redux usage, pain points, team familiarity).
- Generate universes like:
- U1: "Stay on Redux but modernize (Toolkit, RTK Query)."
- U2: "Hybrid: key global state in Redux, local / view state in Zustand."
- U3: "Full migration to Zustand with new patterns."
- 3. Compare along learning curve, migration risk, DX, library ecosystem.
- Choose and produce a concrete migration (or non-migration) plan.
Example B – Designing a Feature Flag System
User: "需要一个开关系统来灰度发布新功能,但不确定要做多复杂。"
Universes might be:
- - U1: Config-file-based flags with a simple in-process helper.
- U2: Centralized flag service + SDK-like helper.
- U3: Database-backed flags with admin UI.
Then:
- 1. Evaluate based on team size, deployment frequency, and risk tolerance.
- Choose U1 + tiny piece of U2 (clear abstraction boundary).
- Output a focused plan touching specific modules/files.
Summary Checklist for Using This Skill
Before leaving Multiverse Architect mode, verify:
- - [ ] A clear problem snapshot has been written.
- [ ] At least 2–3 genuinely distinct universes have been explored.
- [ ] A comparison table or bullet list exists.
- [ ] A single approach (or hybrid) has been explicitly chosen.
- [ ] There is a concrete, step-based implementation plan connected to the codebase.
Once all are satisfied, proceed to implement using the chosen design.
多元宇宙架构师
设计软件如同探索平行宇宙:生成若干条不同的解决方案路径,对每条路径进行简要探索,然后选择并优化最佳方案,同时给出清晰的推理和权衡考量。
这项技能刻意追求既富有想象力又务实可行。它能在编写或修改代码之前,将模糊或高风险的问题转化为对备选方案的结构化探索。
何时使用此技能
在以下情况使用多元宇宙架构师:
- - 任务不明确或存在多种可行方法。
- 存在重要的权衡考量(性能与简洁性、开发者体验与用户体验、短期与长期)。
- 用户说出类似这样的话:
- 不确定应该怎么实现
- 有没有别的方案?
- 我们要不要用某某框架?
不要在以下情况使用此技能:
- - 有明显解决方案的琐碎错误修复。
- 纯机械性变更(重命名、格式化、小幅文案修改)。
核心原则
- 1. 平行宇宙,而非随机变体
- 每个宇宙都是一个
连贯、内部一致的设计,而非微小的调整。
- 差异必须
有意义(架构风格、数据形态、所有权边界、控制流程)。
- 2. 先粗后细
- 从每个宇宙的
粗粒度草图开始。
- 只对最终选定的宇宙进行深入探索。
- 3. 明确的权衡考量
- 对每个宇宙列出
优点、缺点和风险。
- 始终将权衡考量与用户的实际约束条件(团队技能、截止日期、性能等)联系起来,若未明确说明则从上下文中推断。
- 4. 可逆决策
- 优先选择
保持选项开放、便于后续调整的设计。
- 明确指出哪些选择
难以更改,哪些
易于更改。
工作流程概览
遵循以下4阶段工作流程:
- 1. 明确问题(哪些必须成立,哪些可以灵活处理)
- 生成3-4个宇宙(不同的解决方案设计)
- 评估并收敛(选择一个,可能融合好的想法)
- 制定具体的实施计划
在处理大型或模糊任务时,在编写或修改代码之前使用此流程。
阶段1:明确问题
当此技能被激活时,首先用自己的话构建一个简洁的问题摘要和约束条件列表。
1.1 问题快照
使用以下结构生成简短快照:
markdown
问题快照
- - 目标:[...]
- 现有上下文:[...]
- 硬性要求:[...]
- 软性偏好:[...]
- 未知因素/假设:[...]
指南:
- - 目标:描述用户可见的结果,而非实现方式。
- 现有上下文:提及已使用的相关技术栈、文件或模式。
- 硬性要求:绝对不能破坏或违反的事项。
- 软性偏好:锦上添花的事项(开发者体验、风格等)。
- 未知因素/假设:说明你将依据的假设;如果被证明有误则进行调整。
1.2 合理性检查
默默检查:
- 如果是,
将此技能降级为快速单宇宙论证,然后继续正常实施。
阶段2:生成宇宙
创建3到4个不同的宇宙(解决方案)。只有当空间明显狭窄时,才允许少于3个。
2.1 宇宙模板
对每个宇宙使用:
markdown
宇宙X – [简短名称]
核心思想:一句话概括该方法。
架构草图:
在此项目中的呈现方式:
- - 需要触及或创建的关键文件
- 粗略的API/接口
- 如何适应现有约定(或为何有意偏离)
优点:
缺点/风险:
最适用于:
2.2 鼓励真正的多样性
生成宇宙时:
-
复杂性所在位置(前端与后端、基础设施与应用逻辑)。
-
数据契约(丰富对象与精简数据传输对象、规范化与非规范化)。
-
控制流程(事件驱动与请求/响应、命令式与声明式)。
- 带注释与不带注释。
- 仅更改命名或微小模式。
阶段3:评估并收敛
一旦定义了宇宙,进行比较并选择。
3.1 比较矩阵
构建紧凑的比较表:
markdown
宇宙比较
| 宇宙 | 复杂度 | 性能 | 开发者体验/可维护性 | 风险 | 备注 |
|---|
| U1 | 低/中/高 | ... | ... | ... | ... |
| U2 |
... | ... | ... | ... | ... |
| U3 | ... | ... | ... | ... | ... |
根据需要调整列(例如可扩展性、实施时间)。
3.2 选择(或混合)一个宇宙
然后生成:
markdown
决策
- - 选定的宇宙:[Ux 或 Ux + Uy 的混合]
- 主要原因:
- [...]
- [...]
- 来自 [Uy]:[...]
- 来自 [Uz]:[...]
指南:
- - 如果进行组合,命名该混合体并明确说明哪些部分来自哪个宇宙。
- 明确说明被拒绝的宇宙为何被拒绝(过于复杂、过于脆弱、与约束条件不符等)。
阶段4:实施计划
将选定的宇宙转化为具体的计划,然后使用常规工具和工作流程执行该计划。
4.1 计划模板
使用以下模板:
markdown
实施计划(多元宇宙架构师)
范围
- [...]
- [...]
- [...]
步骤
- 1. [...]
- [...]
- [...]
安全检查
- - [ ] 现有行为已通过测试或手动检查覆盖
- [ ] 数据迁移(如有)已规划
- [ ] 已确定回滚策略(如需回滚应还原哪些内容)
4.2 执行模式
计划创建后:
- - 在此技能之外继续进行实际实施,使用标准编码行为。
- 如果用户中途更改约束条件,重新审视:
- 要么调整当前宇宙。
- 要么快速构建
一个新的备选宇宙进行重新评估。
迷你模式:轻量级多元宇宙
对于中等规模的决策(太大而不琐碎,太小而不需要完整多元宇宙),使用这个压缩流程:
- 1. 写一段问题快照。
- 草拟2个宇宙,仅包含:
- 核心思想
- 2-3个优点
- 2-3个缺点
- 3. 用3-4个要点选择一个。
- 写一个简短的3-5步实施大纲。
然后像往常一样继续编码。
示例
示例A – 选择状态管理策略
用户:我们要不要把这个 React 项目的状态全部换成 Zustand,还是继续用 Redux?
应用此技能:
- 1. 快照问题(当前Redux使用情况、痛点、团队熟悉度)。
- 生成宇宙,例如:
- U1:继续使用Redux但进行现代化改造(Toolkit, RTK Query)。
- U2:混合方案:关键全局状态用Redux,局部/视图状态用Zustand。
- U3:全面迁移到Zustand并采用新模式。
- 3. 在学习曲线、迁移风险、开发者体验、库生态系统方面进行比较。
- 选择并生成具体的迁移(或不迁移)计划。
示例B – 设计功能开关系统
用户:需要一个开关系统来灰度发布新功能,但不确定要做多复杂。
宇宙可能是:
- - U1:基于配置文件的开关,配合简单的进程内辅助工具。
- U2:集中式开关服务 + 类似SDK的辅助工具。
- U3:基于数据库的开关,带管理界面。
然后:
- 1. 根据团队规模、部署频率和风险承受能力进行评估。
- 选择U1 + U2的一小部分(清晰的抽象边界)。
- 输出一个聚焦于特定模块/文件的计划。
使用此技能的总结清单
在退出多元宇宙架构师模式之前,请验证:
- - [ ] 已编写清晰的问题快照。
- [ ] 已探索至少2-3个真正不同的宇宙。
- [ ] 存在比较表或要点列表。
- [ ] 已明确选择单一方法(或混合方法)。
- [ ] 存在与代码库关联的具体、基于步骤