solution-space
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/solution-space
/solution-space
Explore candidate solutions before committing to implementation. The trap is defending the first workable idea.
Solution Space sits between Problem Statement and Implementation. You have the problem framed; now map the approaches before picking one.
在投入实现前探索候选解决方案。需要警惕的陷阱是执着于第一个可行的想法。
解决方案空间(Solution Space)介于问题描述与实现之间。当你已明确问题框架后,先梳理所有可行方案,再做选择。
When to Use
适用场景
Invoke when:
/solution-space- Problem is understood - You have a clear problem statement
- Multiple approaches seem viable - Not obvious which path is best
- You're about to start coding - Pause and explore before committing
- Patches keep accumulating - Third config flag for the same bug
- You feel attached to your first idea - That's the warning sign
Do not use when: You're still clarifying the problem. Use first. Solution Space assumes the problem is framed.
/problem-statement在以下场景调用:
/solution-space- 已明确问题 - 你拥有清晰的问题描述
- 多种方案看似可行 - 无法明确哪种路径最优
- 即将开始编码 - 在投入前先暂停并探索方案
- 补丁不断累积 - 为同一个bug添加第三个配置项
- 执着于第一个想法 - 这是危险信号
请勿在以下场景使用:你仍在梳理问题。请先使用。解决方案空间的前提是问题已被明确界定。
/problem-statementThe Local Maximum Trap
局部最优陷阱
"The hardest part of design has never been coming up with ideas. It is letting go of the first workable idea to look for better ones."
Exploration is cheap. The failure mode is defending the first solution that works.
Signs you're stuck on a local maximum:
- First solution considered is the only solution considered
- You're explaining why alternatives won't work before trying them
- You're acting as a crafter (defending) rather than an editor (filtering)
- Implementation details discussed before approaches compared
"设计最困难的部分从来不是想出点子,而是放下第一个可行的想法去寻找更好的方案。"
探索的成本很低。失败的模式就是执着于第一个有效的解决方案。
陷入局部最优的信号:
- 只考虑第一个想到的解决方案
- 在尝试替代方案前就解释为什么它们不可行
- 你在扮演捍卫者(执着于现有想法)而非筛选者(评估方案)
- 在对比不同方案前就讨论实现细节
The Escalation Ladder
方案升级阶梯
Not all problems need redesigns. The ladder helps you find the right altitude.
并非所有问题都需要重新设计。这个阶梯能帮你找到合适的处理层级。
Level 1: Band-Aid Fix
层级1:临时修复(Band-Aid Fix)
Don't default to this. Patch the symptom.
- Fine under deadline pressure
- Toxic as habit
- Signal: "This will break again"
Example: Add a null check. Catch the exception. Hardcode the edge case.
不要默认选择此方案。仅修复表面症状。
- 在截止日期压力下可以接受
- 但长期使用会产生危害
- 信号:“这个问题还会再次出现”
示例:添加空值检查。捕获异常。硬编码处理边缘情况。
Level 2: Local Optimum
层级2:局部优化(Local Optimum)
Better, but limited. Optimize within current assumptions.
- Classic refactor trap
- Improves what exists without questioning it
- Signal: "This is cleaner but the same shape"
Example: Extract a method. Add a parameter. Refactor for readability.
比临时修复好,但有局限性。在现有假设范围内进行优化。
- 典型的重构陷阱
- 在不质疑现有架构的前提下改进
- 信号:“代码更简洁了,但整体架构没变”
示例:提取方法。添加参数。为提升可读性重构代码。
Level 3: Reframe
层级3:重构问题定义(Reframe)
Now you're thinking. Question the problem statement.
- Different framing yields different solutions
- Often reveals the actual constraint
- Signal: "What if the problem is actually..."
Example: "We need faster cache invalidation" becomes "Why do we cache this at all?"
这才是正确的思考方向。质疑原有的问题描述。
- 不同的问题框架会带来不同的解决方案
- 通常能揭示真正的约束条件
- 信号:“如果问题本质是……会怎样?”
示例:“我们需要更快的缓存失效机制”转变为“我们到底为什么要缓存这个内容?”
Level 4: Redesign
层级4:重新设计(Redesign)
This is the goal. Change the system so the problem doesn't exist.
- The higher peak, the terraform
- Problems dissolve rather than get solved
- Signal: "With this change, we wouldn't need to..."
Example: Instead of fixing sync conflicts, make the data flow unidirectional.
这是最终目标。改变系统架构,从根源上消除问题。
- 如同登上更高的山峰,彻底改造系统
- 问题被彻底解决而非暂时缓解
- 信号:“通过这个改动,我们就不需要再……”
示例:不再修复同步冲突,而是让数据流变为单向模式。
The Process
实施流程
Step 1: State the Problem (Confirm)
步骤1:确认问题描述
Before exploring solutions, confirm the problem statement:
"The problem we're solving is: [statement]. The key constraint is: [constraint]. Success looks like: [outcome]."
If you can't state this clearly, go back to .
/problem-statement在探索方案前,先确认问题描述:
"我们要解决的问题是:[描述]。核心约束是:[约束条件]。成功的标准是:[预期结果]。"
如果你无法清晰表述以上内容,请回到。
/problem-statementStep 2: Generate Candidates (Breadth)
步骤2:生成候选方案(广度探索)
List at least 3-4 candidate approaches before evaluating any:
markdown
undefined在评估前,至少列出3-4个候选方案:
markdown
undefinedCandidate Solutions
候选解决方案
Option A: [Name]
方案A:[名称]
- Approach: [Brief description]
- Level: [Band-Aid / Local Optimum / Reframe / Redesign]
- Trade-off: [Main cost]
- 思路:[简要描述]
- 层级:[临时修复/局部优化/重构问题定义/重新设计]
- 权衡:[主要成本]
Option B: [Name]
方案B:[名称]
...
**Rules for this step:**
- No evaluation yet - just generation
- Include at least one approach from a higher level than your instinct
- Include the "obvious" solution even if you don't like it...
**此步骤规则**:
- 先不做评估,只生成方案
- 至少包含一个比你直觉选择层级更高的方案
- 即使你不喜欢,也要列出“显而易见”的方案Step 3: Evaluate Trade-offs (Depth)
步骤3:评估权衡(深度分析)
For each candidate, assess:
- Does it solve the stated problem? (Not a related problem)
- What's the implementation cost? (Time, complexity, risk)
- What's the maintenance cost? (Ongoing burden)
- Does it create new problems? (Second-order effects)
- Does it enable future options? (Optionality)
针对每个候选方案,评估以下维度:
- 是否解决了明确的问题?(而非相关问题)
- 实现成本是多少?(时间、复杂度、风险)
- 维护成本是多少?(长期负担)
- 是否会产生新问题?(次生影响)
- 是否为未来预留了扩展空间?(可扩展性)
Step 4: Recommend with Reasoning
步骤4:给出带理由的推荐
Make a recommendation and state why:
markdown
undefined明确推荐方案并说明原因:
markdown
undefinedRecommendation
推荐方案
Approach: [Selected option]
Level: [Band-Aid / Local Optimum / Reframe / Redesign]
Why this one:
- [Reason 1]
- [Reason 2]
Why not the others:
- Option A: [Reason rejected]
- Option B: [Reason rejected]
Known trade-offs we're accepting:
- [Trade-off 1]
- [Trade-off 2]
undefined选择的方案: [选中的选项]
层级: [临时修复/局部优化/重构问题定义/重新设计]
选择理由:
- [理由1]
- [理由2]
未选择其他方案的原因:
- 方案A:[拒绝理由]
- 方案B:[拒绝理由]
我们接受的权衡:
- [权衡1]
- [权衡2]
undefinedStep 5: Check for Local Maximum
步骤5:检查是否陷入局部最优
Before committing, ask:
- Did I defend my first idea or actually explore?
- Is there a higher-level approach I dismissed too quickly?
- Am I optimizing the wrong thing?
If you explored genuinely and still landed on the first idea, that's fine. The danger is never looking.
在最终确认前,问自己:
- 我是在捍卫第一个想法,还是真正探索了所有方案?
- 是否有更高层级的方案被我快速否决了?
- 我是不是在优化错误的方向?
如果你确实进行了全面探索,最终还是选择了第一个想法,这没问题。危险在于从未尝试探索其他可能。
Output Format
输出格式
markdown
undefinedmarkdown
undefinedSolution Space Analysis
解决方案空间分析
Problem: [One sentence]
Key Constraint: [The binding constraint]
问题: [一句话描述]
核心约束: [关键约束条件]
Candidates Considered
候选方案
| Option | Level | Approach | Trade-off |
|---|---|---|---|
| A | [Level] | [Brief] | [Cost] |
| B | [Level] | [Brief] | [Cost] |
| C | [Level] | [Brief] | [Cost] |
| 选项 | 层级 | 思路 | 权衡 |
|---|---|---|---|
| A | [层级] | [简要描述] | [成本] |
| B | [层级] | [简要描述] | [成本] |
| C | [层级] | [简要描述] | [成本] |
Evaluation
评估结果
Option A: [Name]
- Solves stated problem: [Yes/Partially/No]
- Implementation cost: [Low/Medium/High]
- Maintenance burden: [Low/Medium/High]
- Second-order effects: [Description]
[Repeat for each option]
方案A:[名称]
- 是否解决问题:[是/部分解决/否]
- 实现成本:[低/中/高]
- 维护负担:[低/中/高]
- 次生影响:[描述]
[对每个选项重复以上评估]
Recommendation
推荐方案
Selected: Option [X] - [Name]
Level: [Band-Aid / Local Optimum / Reframe / Redesign]
Rationale: [Why this approach fits the constraints]
Accepted trade-offs:
- [Trade-off 1]
- [Trade-off 2]
选中: 方案[X] - [名称]
层级: [临时修复/局部优化/重构问题定义/重新设计]
理由: [此方案为何符合约束条件]
接受的权衡:
- [权衡1]
- [权衡2]
Implementation Notes
实施注意事项
[Any specific considerations for the selected approach]
undefined[针对选中方案的具体考虑]
undefinedExamples
示例
Example 1: Performance Problem
示例1:性能问题
/solution-space
Users report the dashboard is slow. Loading takes 8 seconds.Output:
markdown
undefined/solution-space
用户反馈仪表盘加载缓慢,耗时8秒。输出:
markdown
undefinedSolution Space Analysis
解决方案空间分析
Problem: Dashboard loads in 8 seconds; users expect <2 seconds
Key Constraint: Can't rewrite the entire frontend this quarter
问题: 仪表盘加载耗时8秒,用户期望加载时间<2秒
核心约束: 本季度无法重写整个前端
Candidates Considered
候选方案
| Option | Level | Approach | Trade-off |
|---|---|---|---|
| A | Band-Aid | Add loading spinner | Doesn't fix slowness |
| B | Local Optimum | Add caching layer | Cache invalidation complexity |
| C | Reframe | Lazy-load dashboard sections | Changes UX slightly |
| D | Redesign | Stream data, render incrementally | Larger change |
| 选项 | 层级 | 思路 | 权衡 |
|---|---|---|---|
| A | 临时修复 | 添加加载动画 | 无法真正解决缓慢问题 |
| B | 局部优化 | 添加缓存层 | 缓存失效逻辑复杂 |
| C | 重构问题定义 | 懒加载仪表盘模块 | 轻微改变用户体验 |
| D | 重新设计 | 流式传输数据,增量渲染 | 改动范围较大 |
Evaluation
评估结果
Option A: Loading Spinner
- Solves stated problem: No (perception only)
- Implementation cost: Low
- Second-order: Users still wait 8 seconds
Option B: Caching Layer
- Solves stated problem: Partially (helps repeat visits)
- Implementation cost: Medium
- Second-order: Stale data risk, invalidation complexity
Option C: Lazy Loading
- Solves stated problem: Yes (perceived speed)
- Implementation cost: Medium
- Second-order: Slight UX change, content shifts
Option D: Streaming Render
- Solves stated problem: Yes (actual + perceived)
- Implementation cost: High
- Second-order: Enables future improvements, larger change
方案A:加载动画
- 是否解决问题:否(仅改变感知)
- 实现成本:低
- 次生影响:用户仍需等待8秒
方案B:缓存层
- 是否解决问题:部分解决(对重复访问有效)
- 实现成本:中
- 次生影响:存在数据过期风险,失效逻辑复杂
方案C:懒加载
- 是否解决问题:是(提升感知速度)
- 实现成本:中
- 次生影响:轻微改变用户体验,内容会出现位移
方案D:流式渲染
- 是否解决问题:是(同时提升实际和感知速度)
- 实现成本:高
- 次生影响:为未来优化预留空间,但改动范围大
Recommendation
推荐方案
Selected: Option C - Lazy Loading
Level: Reframe
Rationale: The problem isn't "dashboard is slow" - it's "users wait before seeing anything useful." Lazy loading shows useful content in <1s while loading the rest. Lower cost than streaming, better than caching.
Accepted trade-offs:
- Content will shift as sections load
- Need to prioritize which sections load first
undefined选中: 方案C - 懒加载
层级: 重构问题定义
理由: 问题本质不是“仪表盘慢”,而是“用户在看到有用内容前需要等待”。懒加载能在1秒内展示有用内容,其余部分后台加载。成本低于流式渲染,效果优于缓存。
接受的权衡:
- 模块加载时内容会出现位移
- 需要优先确定哪些模块先加载
undefinedExample 2: The Third Config Flag
示例2:第三个配置项
/solution-space
We have a bug where notifications fire twice. This is the third
config flag we're adding to work around notification timing issues.Output:
markdown
undefined/solution-space
我们遇到了通知重复触发的bug,这是我们为解决通知时序问题准备添加的第三个配置项。输出:
markdown
undefinedSolution Space Analysis
解决方案空间分析
Problem: Notifications fire twice; third config flag proposed
Key Constraint: Pattern of band-aids suggests systemic issue
问题: 通知重复触发,计划添加第三个配置项
核心约束: 不断添加临时补丁表明存在系统性问题
Candidates Considered
候选方案
| Option | Level | Approach | Trade-off |
|---|---|---|---|
| A | Band-Aid | Add debounce flag | 4th flag incoming |
| B | Local Optimum | Consolidate notification logic | Still reactive model |
| C | Reframe | Why do we notify on this event? | May simplify |
| D | Redesign | Event sourcing for notifications | Larger change |
| 选项 | 层级 | 思路 | 权衡 |
|---|---|---|---|
| A | 临时修复 | 添加防抖配置项 | 很快会需要第四个配置项 |
| B | 局部优化 | 整合通知逻辑 | 仍为被动式修复 |
| C | 重构问题定义 | 为什么要在这个事件触发通知? | 可能简化逻辑 |
| D | 重新设计 | 事件溯源实现通知 | 重构范围大 |
Evaluation
评估结果
Option A: Debounce Flag
- Solves stated problem: Temporarily
- Second-order: Maintenance nightmare, flags interact
Option B: Consolidate Logic
- Solves stated problem: Probably
- Second-order: Still treating symptoms
Option C: Question the Trigger
- Solves stated problem: Possibly dissolves it
- Second-order: May reveal unnecessary complexity
Option D: Event Sourcing
- Solves stated problem: Yes, prevents duplicates by design
- Second-order: Significant refactor
方案A:防抖配置项
- 是否解决问题:暂时解决
- 次生影响:维护成本激增,配置项之间会产生冲突
方案B:整合逻辑
- 是否解决问题:可能
- 次生影响:仍在处理表面症状
方案C:质疑触发逻辑
- 是否解决问题:可能从根源消除
- 次生影响:可能发现不必要的复杂度
方案D:事件溯源
- 是否解决问题:是,从设计上避免重复
- 次生影响:重构范围大
Recommendation
推荐方案
Selected: Option C - Reframe, then possibly D
Level: Reframe (investigation)
Rationale: Three config flags is a code smell. Before adding a fourth, understand why notifications are triggered from multiple paths. The duplication likely indicates unclear ownership of the notification concern.
Next step: Map all notification trigger points. If >3 paths trigger the same notification, the problem isn't timing - it's architecture.
undefined选中: 方案C - 重构问题定义,之后考虑方案D
层级: 重构问题定义(调研阶段)
理由: 添加第三个配置项是代码异味。在添加第四个前,先搞清楚为什么通知会从多个路径触发。重复问题很可能表明通知模块的职责划分不清晰。
下一步: 梳理所有通知触发点。如果超过3个路径触发同一个通知,那么问题不在时序上,而是架构问题。
undefinedSession Persistence
会话持久化
This skill can persist context to for use by subsequent skills.
.oh/<session>.mdIf session name provided ():
/solution-space auth-refactor- Reads/writes directly
.oh/auth-refactor.md
If no session name provided ():
/solution-space- After producing the solution space analysis, offer to save it:
"Save to session? [suggested-name] [custom] [skip]"
- Suggest a name based on git branch or the problem being solved
Reading: Check for existing session file. Read prior skill outputs—Aim, Problem Statement, Problem Space—to understand what we're solving and the constraints.
Writing: After producing output, write the solution space analysis to the session file:
markdown
undefined此技能可将上下文保存到,供后续技能使用。
.oh/<session>.md如果提供了会话名称(如):
/solution-space auth-refactor- 直接读写
.oh/auth-refactor.md
如果未提供会话名称(如):
/solution-space- 生成解决方案空间分析后,会询问是否保存:
"保存到会话?[建议名称] [自定义] [跳过]"
- 会根据Git分支或当前问题生成建议名称
读取: 检查是否存在会话文件。读取之前的技能输出——Aim、Problem Statement、Problem Space——以理解问题背景和约束条件。
写入: 生成输出后,将解决方案空间分析写入会话文件:
markdown
undefinedSolution Space
解决方案空间
Updated: <timestamp>
[solution space analysis and recommendation]
undefined更新时间: <时间戳>
[解决方案空间分析和推荐内容]
undefinedAdaptive Enhancement
自适应增强
Base Skill (prompt only)
基础技能(仅提示)
Works anywhere. Produces solution space analysis for discussion. No persistence.
可在任意环境使用。生成解决方案空间分析用于讨论。无持久化功能。
With .oh/ session file
配合.oh/会话文件
- Reads for prior context (aim, problem statement, constraints)
.oh/<session>.md - Writes solution analysis and recommendation to the session file
- can read the selected approach
/execute
- 读取获取历史上下文(目标、问题描述、约束条件)
.oh/<session>.md - 将解决方案分析和推荐内容写入会话文件
- 可读取选中的方案
/execute
With Open Horizons MCP
配合Open Horizons MCP
- Queries related past solution decisions
- Finds similar problems across endeavors
- Logs the solution space exploration and decision
- Session file serves as local cache
- 查询相关的历史解决方案决策
- 跨项目查找类似问题
- 记录解决方案空间探索和决策过程
- 会话文件作为本地缓存
Position in Framework
在框架中的位置
Comes after: (you need a framed problem to evaluate solutions against).
Leads to: to implement, or to challenge the recommendation.
Can loop back to: (if exploration reveals the problem is mis-framed).
/problem-statement/execute/dissent/problem-statement之前的步骤: (你需要明确的问题框架,才能评估解决方案)。
之后的步骤: (实现选中的方案),或(挑战推荐方案)。
可回到的步骤: (如果探索发现问题框架有误)。
/problem-statement/execute/dissent/problem-statementLeads To
后续流程
After solution-space, typically:
- - Implement the selected approach
/execute - - If the recommendation feels too easy
/dissent - - If exploration revealed the problem is mis-framed
/problem-statement
Remember: The goal isn't to always pick Redesign. It's to know you explored before committing. A deliberate Band-Aid beats an accidental one.
完成解决方案空间分析后,通常会进入以下流程:
- - 实现选中的方案
/execute - - 如果觉得推荐方案过于草率
/dissent - - 如果探索发现问题框架有误
/problem-statement
记住: 目标不是每次都选择重新设计,而是确保在投入前进行了充分探索。刻意选择的临时修复,好过无意识的被动补丁。