| name | life-integrate |
| version | 0.2.3 |
| description | 周期收尾和 durable memory 写入层。Use when proof-card review needs evidence-backed PROFILE, COMPASS, PRINCIPLES, ROADMAP, BACKLOG, versions, and next-cycle handoff updates. |
| triggers | ["整合","更新人生罗盘","写回档案","close cycle","收尾","下一步路线"] |
| reads | ["~/.restart-life/cycles/<cycle>/proof-card.json"] |
| writes | ["~/.restart-life/cycles/<cycle>/integration.md","~/.restart-life/versions/"] |
| entry_gate | ["Read declared runtime artifacts before user-facing synthesis.","Stop if required evidence or context is missing."] |
| exit_criteria | ["Next route or durable output is explicit.","No durable memory update occurs without evidence ids."] |
| reroutes | [{"when":"missing usable profile","target":"life-discover"},{"when":"durable write requested without proof","target":"memory-write-gate"}] |
| recovery_modes | [{"name":"runtime-resume","when":"cycle state exists","action":"resume from ~/.restart-life/cycles/<cycle>/cycle-state.json"}] |
life-integrate
你负责把一个 cycle 的学习写回 durable artifacts。你不是总结员,而是 memory gate 的执行者:只有 proof 支持的学习才能进入长期档案。
铁律
NO COMPASS UPDATE WITHOUT EVIDENCE: proof-card 不允许,就不能更新 compass。
blocked proof 只能回到 life-act,不能写 durable update。
- 所有 durable 写入必须留下版本记录和下一入口。
入口检查
- 读取
proof-card.json,确认 verdict、evidence_ids、durable_update_allowed。
- 读取目标 durable artifacts:
PROFILE.md、profile.json、COMPASS.md、PRINCIPLES.md、ROADMAP.md、BACKLOG.md。
- 如果 proof 与原问题框架冲突,先 reroute 到
life-investigate。
- 如果 proof blocked,reroute 到
life-act,只说明缺失证据。
Integration 输出
写入 ~/.restart-life/cycles/<cycle>/integration.md:
# Integration
## Proof Summary
verdict、confidence、evidence ids。
## Durable Updates Proposed
要改哪些文件、改什么、依据哪些 evidence ids。
## Updates Applied
实际写入的 durable artifact 变更。
## Deferred Updates
证据不足所以不写的内容。
## Next Route
下一轮进入 life-roadmap / life-act / life-investigate / stop。
可写文件规则
| 目标 | 允许条件 |
|---|
PROFILE.md / profile.json | 新证据改变 values、talents、interests、constraints 的 confidence 或内容 |
COMPASS.md | proof-card 有非 synthetic evidence,且 durable_update_allowed = true |
PRINCIPLES.md | principle 有 case evidence、counterexample、reviewDate |
ROADMAP.md / BACKLOG.md | proof 改变阶段、优先级或下一 cycle |
versions/ | 每次 durable 写入都要保留快照或变更摘要 |
执行流程
- 判定 proof 是否允许写入;不允许则停止并 reroute。
- 生成 proposed updates,逐条列 evidence ids。
- 通过
memory-write-gate 思路检查每条写入是否证据足够。
- 写入
integration.md 和允许的 durable artifacts。
- 留下
next-cycle recommendation:继续、转向、补实验、调查痛点、刷新 roadmap。
质量门
写入前运行:
npm run validate:life-cycle -- --runtime ~/.restart-life --cycle <cycle> --mode <mode>
写入后再次运行同一命令,并确认 handoff scan 通过:未来 session 不依赖聊天记忆也能恢复。
禁止事项
- 不把用户“想更新”当作写入许可。
- 不在 evidence ids 缺失时补写长期身份结论。
- 不改 repo
devflow/ROADMAP.md;这里只能改私有 ~/.restart-life/ROADMAP.md。
- 不把 blocked proof 包装成“阶段性完成”。
flows in skill-manifest.json declares this skill's reroute and closeout routes.
Bundled Resources
- Read
references/guide.md for 思想来源/source lineage, closeout, version, and durable update boundaries.
- Use
assets/integration.template.md as the integration report template material.
- Run
node scripts/check-handoff.mjs --runtime ~/.restart-life --cycle <cycle> before durable writes.