salvage
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/salvage
/salvage
Extract learning from a session or piece of work before restarting. The insight: code is cheap now; learning is the asset.
Salvage is the bridge from Review back to Problem Space. When drift is detected, salvage captures what was learned so you can restart clean without losing understanding.
在重启某段工作或任务前,提炼其中的经验。核心认知:代码的成本如今很低,学到的内容才是真正的资产。
经验提炼(Salvage)是从“复盘”回到“问题空间”的桥梁。当发现工作偏离方向时,提炼环节会记录下已学到的内容,让你能在不丢失认知的前提下,重新开始干净的工作流程。
When to Use
适用场景
Invoke when:
/salvage- Work is drifting - approach has changed direction multiple times
- Approach reversed 3+ times - you're oscillating, not converging
- Scope expanding while "done" keeps fuzzing - the finish line keeps moving
- You're protecting code you've invested in - afraid to throw it away
- Starting over feels right - but you don't want to lose what you learned
Do not use when: Work is on track and converging. Salvage is for extraction before restart, not routine reflection.
在以下场景调用:
/salvage- 工作方向偏离 - 方案多次改变方向
- 方案反复调整3次以上 - 一直在摇摆,没有向目标收敛
- 范围不断扩大但“完成标准”持续模糊 - 终点线一直在移动
- 你在维护自己投入过精力的代码 - 害怕丢弃已写的代码
- 感觉应该重新开始 - 但不想丢失已经学到的内容
不适用场景: 工作进展顺利且正在向目标收敛时。经验提炼是重启前的经验提取环节,而非常规复盘。
The Salvage Process
经验提炼流程
Step 1: Acknowledge the State
步骤1:明确当前状态
Before extracting, name what happened:
"This session/approach is being salvaged because [reason]. The original aim was [aim]. What actually happened was [reality]."
Be direct. No judgment—just clarity.
在提取经验前,先说明发生了什么:
“本次会话/方案正在进行经验提炼,原因是[具体原因]。最初目标是[原目标]。实际进展为[实际情况]。”
直接表述,不要评判,只追求清晰。
Step 2: Extract Five Things
步骤2:提取五类内容
Work through these extraction categories. Not everything will apply; extract what's present.
按以下类别提取内容,并非所有类别都适用,提取实际存在的信息即可。
1. Model Shifts (What changed your understanding?)
1. 认知转变(哪些认知改变了你的理解?)
- What assumptions were wrong?
- What did you learn about the problem that you didn't know before?
- What would you tell yourself at the start of this work?
"I thought X, but actually Y."
- 哪些假设是错误的?
- 你对这个问题有了哪些之前不知道的新认知?
- 如果回到工作开始时,你会告诉当时的自己什么?
“我原本以为是X,但实际是Y。”
2. Guardrails (Constraints discovered the hard way)
2. 约束规则(通过试错发现的限制条件)
- What boundaries should have been explicit from the start?
- What "don't do this" rules emerged?
- What edge cases bit you?
Format as explicit constraints:
Guardrail: [boundary]
Reason: [why this matters]
Trigger: [when to revisit this constraint]- 哪些边界条件从一开始就应该明确?
- 哪些“不要这么做”的规则浮现出来?
- 哪些边缘情况给你带来了麻烦?
格式化为明确的约束:
约束规则:[边界条件]
原因:[该规则的重要性]
触发条件:[何时需要重新审视该规则]3. Missing Context (What would have helped upfront?)
3. 缺失的上下文(如果一开始就知道这些会有帮助?)
- What questions should have been asked at the start?
- What existing code/patterns should have been found first?
- What documentation was missing or would have prevented this?
"If I had known about [X], I would have [Y] instead."
- 工作开始前应该问哪些问题?
- 哪些现有代码/模式应该先被了解?
- 哪些缺失的文档本可以避免这些问题?
“如果我当初知道[X],我会选择[Y]而不是现在的做法。”
4. Local Practices (Hard-won lessons worth encoding)
4. 本地实践(值得固化的试错经验)
Local practices = practical wisdom, the kind you can only get from experience.
- What tribal knowledge did this work surface?
- What would help future-you (or future teammates) in similar situations?
- What patterns should be captured?
Good tribal knowledge is:
- Specific enough to be actionable
- General enough to apply beyond this exact case
- Non-obvious (not "write tests" but "this API silently returns 200 on auth failure")
本地实践 = 实用经验,这类经验只能从实践中获得。
- 本次工作揭示了哪些团队隐性知识?
- 哪些内容能帮助未来的自己(或团队成员)应对类似情况?
- 哪些模式应该被固化下来?
优质的团队隐性知识具备以下特点:
- 足够具体,可直接执行
- 具备通用性,可应用于其他类似场景
- 非显而易见(不是“写测试”这种通用建议,而是“该API在认证失败时会静默返回200”这类具体信息)
5. What Worked (Don't lose the wins)
5. 有效内容(不要丢弃已有的成果)
- What approaches or code fragments are worth keeping?
- What partial solutions could seed the restart?
- What tools or techniques proved useful?
- 哪些方法或代码片段值得保留?
- 哪些部分解决方案可以作为重启的基础?
- 哪些工具或技术被证明是有效的?
Step 3: Package for Fresh Start
步骤3:为重启打包内容
Synthesize the extraction into a restart kit:
markdown
undefined将提取的内容整合为重启工具包:
markdown
undefinedSalvage Summary
经验提炼总结
Original Aim
初始目标
[What we were trying to achieve]
[我们原本想要实现的内容]
Why Salvaged
提炼原因
[Direct statement of what went wrong]
[直接说明问题所在]
Key Learnings
核心经验
- [Learning 1]
- [Learning 2]
- [Learning 3]
- [经验1]
- [经验2]
- [经验3]
New Guardrails
新约束规则
- [Guardrail 1]
- [Guardrail 2]
- [约束规则1]
- [约束规则2]
Context for Restart
重启上下文
[What the next attempt should know before starting]
[下一次尝试开始前需要了解的信息]
Reusable Fragments
可复用片段
[Any code, patterns, or approaches worth keeping]
undefined[值得保留的代码、模式或方法]
undefinedStep 4: Persist Learnings (if available)
步骤4:保存经验(如果有可用工具)
If Open Horizons MCP is available:
- Log to OH - Log tribal knowledge and guardrails to the graph
- Update AGENTS.md - If learnings are project-wide, suggest additions
If no persistent storage is available, output the salvage summary for the user to capture manually.
如果Open Horizons MCP可用:
- 记录到OH - 将团队隐性知识和约束规则记录到图谱中
- 更新AGENTS.md - 如果经验适用于整个项目,建议添加相关内容
如果没有持久化存储工具,输出经验提炼总结,让用户手动保存。
Output Format
输出格式
Always produce a salvage summary in this structure:
undefined始终按照以下结构生成经验提炼报告:
undefinedSalvage Report
经验提炼报告
Salvaged: [date/session identifier]
Reason: [why this work is being salvaged]
Original Aim: [what we were trying to do]
提炼对象: [日期/会话标识]
原因: [本次工作需要提炼经验的原因]
初始目标: [我们原本想要完成的任务]
Learnings
核心经验
[Numbered list of key insights]
[编号列出的关键洞见]
New Guardrails
新约束规则
[Explicit constraints with reason and trigger]
[带原因和触发条件的明确约束]
Missing Context
缺失的上下文
[What would have helped]
[如果当初了解这些会有帮助的信息]
Local Practices
本地实践
[Hard-won wisdom to encode]
[值得固化的试错经验]
Reusable Fragments
可复用片段
[Code or patterns worth keeping]
[值得保留的代码或模式]
Fresh Start Recommendation
重启建议
[How to approach this next time]
undefined[下一次尝试的方法建议]
undefinedExamples
示例
Example 1: Drifting Implementation
示例1:偏离方向的实现
/salvage
The auth refactor has changed direction 4 times. Originally simplifying
the flow, now it's more complex than before.Output:
undefined/salvage
The auth refactor has changed direction 4 times. Originally simplifying
the flow, now it's more complex than before.输出:
undefinedSalvage Report
Salvage Report
Salvaged: Auth refactor session
Reason: Approach reversed 4 times, complexity increased not decreased
Original Aim: Simplify authentication flow
Salvaged: Auth refactor session
Reason: Approach reversed 4 times, complexity increased not decreased
Original Aim: Simplify authentication flow
Learnings
Learnings
- The complexity isn't in the auth code—it's in the 6 different OAuth providers
- Each provider has subtly different token refresh behavior
- The "simple" unified flow breaks provider-specific error handling
- The complexity isn't in the auth code—it's in the 6 different OAuth providers
- Each provider has subtly different token refresh behavior
- The "simple" unified flow breaks provider-specific error handling
New Guardrails
New Guardrails
- Guardrail: Don't abstract OAuth providers into single interface
- Reason: Provider differences are semantic, not syntactic
- Trigger: Revisit if we drop to 2 providers or less
- Guardrail: Don't abstract OAuth providers into single interface
- Reason: Provider differences are semantic, not syntactic
- Trigger: Revisit if we drop to 2 providers or less
Missing Context
Missing Context
- The original auth was complex for a reason (provider edge cases)
- Should have read the PR that introduced each provider
- The original auth was complex for a reason (provider edge cases)
- Should have read the PR that introduced each provider
Local Practices
Local Practices
OAuth providers aren't interchangeable. The abstraction leak is the feature.
OAuth providers aren't interchangeable. The abstraction leak is the feature.
Fresh Start Recommendation
Fresh Start Recommendation
Instead of unifying the flow, document each provider's quirks explicitly.
Consider: is "simplify" the right aim? Maybe "make visible" is better.
undefinedInstead of unifying the flow, document each provider's quirks explicitly.
Consider: is "simplify" the right aim? Maybe "make visible" is better.
undefinedExample 2: Scope Creep
示例2:范围蔓延
/salvage
Started as "add dark mode toggle." Now touching 14 files and the
theme system doesn't exist yet.Output:
undefined/salvage
Started as "add dark mode toggle." Now touching 14 files and the
theme system doesn't exist yet.输出:
undefinedSalvage Report
Salvage Report
Salvaged: Dark mode implementation
Reason: Scope expanded from toggle to theme system
Original Aim: Add dark mode toggle to settings
Salvaged: Dark mode implementation
Reason: Scope expanded from toggle to theme system
Original Aim: Add dark mode toggle to settings
Learnings
Learnings
- No theme system exists—colors are hardcoded across components
- A toggle without infrastructure is meaningless
- This is actually two tasks: (1) build theme system, (2) add toggle
- No theme system exists—colors are hardcoded across components
- A toggle without infrastructure is meaningless
- This is actually two tasks: (1) build theme system, (2) add toggle
New Guardrails
New Guardrails
- Guardrail: UI feature requests need infrastructure check first
- Reason: "Add X" often implies "build system for X"
- Trigger: Any request that touches visual consistency
- Guardrail: UI feature requests need infrastructure check first
- Reason: "Add X" often implies "build system for X"
- Trigger: Any request that touches visual consistency
Missing Context
Missing Context
- Should have grepped for color usage before starting
- No design tokens or CSS variables in codebase
- Should have grepped for color usage before starting
- No design tokens or CSS variables in codebase
Local Practices
Local Practices
"Add [feature]" is not the same as "build [feature]." Check if the
infrastructure exists before estimating.
"Add [feature]" is not the same as "build [feature]." Check if the
infrastructure exists before estimating.
Reusable Fragments
Reusable Fragments
- Color mapping I started: styles/colors.js (incomplete but useful)
- Component audit list: 14 files that hardcode colors
- Color mapping I started: styles/colors.js (incomplete but useful)
- Component audit list: 14 files that hardcode colors
Fresh Start Recommendation
Fresh Start Recommendation
- First: Create theme system (CSS variables, ThemeContext)
- Then: Add dark mode as first theme variant
- The toggle is the easy part—do it last
undefined- First: Create theme system (CSS variables, ThemeContext)
- Then: Add dark mode as first theme variant
- The toggle is the easy part—do it last
undefinedSession Persistence
会话持久化
This skill can persist context to for use by subsequent skills.
.oh/<session>.mdIf session name provided ():
/salvage auth-refactor- Reads/writes directly
.oh/auth-refactor.md
If no session name provided ():
/salvage- After producing the salvage report, offer to save it:
"Save to session? [suggested-name] [custom] [skip]"
- Suggest a name based on git branch or the work being salvaged
Reading: Check for existing session file. Read everything—Aim, Problem Statement, Problem Space, Solution Space, Execute, Review—to understand what was attempted and what happened.
Writing: After producing the salvage report:
markdown
undefined该技能可将上下文保存到,供后续技能使用。
.oh/<session>.md如果提供了会话名称(如):
/salvage auth-refactor- 直接读写
.oh/auth-refactor.md
如果未提供会话名称(如):
/salvage- 生成经验提炼报告后,询问是否保存:
"保存到会话?[建议名称] [自定义] [跳过]"
- 根据Git分支或当前提炼的工作内容生成建议名称
读取: 检查是否存在会话文件。读取所有内容——目标、问题陈述、问题空间、解决方案空间、执行记录、复盘记录——以了解之前的尝试和实际进展。
写入: 生成经验提炼报告后,写入以下内容:
markdown
undefinedSalvage
Salvage
Updated: <timestamp>
Outcome: [extracted learnings, ready for restart]
[salvage report: learnings, guardrails, context for fresh start]
The salvage section is the capstone—it captures what was learned before the session ends or restarts.Updated: <timestamp>
Outcome: [extracted learnings, ready for restart]
[salvage report: learnings, guardrails, context for fresh start]
经验提炼部分是收尾环节——它记录了会话结束或重启前学到的所有内容。Adaptive Enhancement
自适应增强
Base Skill (prompt only)
基础技能(仅提示)
Works anywhere. Produces salvage summary for manual capture. No persistence.
可在任意环境使用。生成经验提炼总结供手动保存。无持久化功能。
With .oh/ session file
配合.oh/会话文件
- Reads for full session context
.oh/<session>.md - Writes salvage report to the session file
- The salvage report can seed the next session
- 读取获取完整会话上下文
.oh/<session>.md - 将经验提炼报告写入会话文件
- 经验提炼报告可为下一次会话提供基础
With Open Horizons MCP
配合Open Horizons MCP
- Queries related past decisions before salvaging
- Logs learnings to graph database
- Creates dive pack for restart session
- Session file serves as local cache
- 在提炼经验前查询相关历史决策
- 将经验记录到图数据库
- 为重启会话创建资料包
- 会话文件作为本地缓存
Position in Framework
在框架中的位置
Comes after: (when drift is detected) or (when you recognize thrashing).
Leads to: or with fresh understanding—you climb back up.
This is the feedback loop: Salvage is how learning flows back to the top of the framework.
/review/execute/aim/problem-space前置环节: (检测到工作偏离时)或(发现工作陷入反复时)。
后续环节: 或,带着新的认知重新开始——回到框架的上层。
这是反馈循环: 经验提炼是让学习内容回流到框架上层的方式。
/review/execute/aim/problem-spaceLeads To
后续动作
After salvage, typically:
- - Reclarify what we're actually trying to achieve
/aim - - Fresh start with new understanding
/problem-space - Create new task/issue with salvage context attached
Remember: Salvage is not failure. It's learning made explicit. The only failure is losing what you learned.
完成经验提炼后,通常会进行以下操作:
- - 重新明确我们实际想要实现的目标
/aim - - 带着新认知重新梳理问题空间
/problem-space - 创建新任务/工单,并附上经验提炼的上下文
记住: 经验提炼不是失败。它是将学习内容显性化的过程。唯一的失败是丢失你学到的内容。