Skip to content

Ch09. 知识生命周期 — 6 态状态机

Draft → Candidate → Review → Active → Deprecated → Archived — 每条知识的完整旅程。

本章概要

AutoSnippet 的知识不是静态存储,而是有明确生命周期的活体。本章解析 6 态状态机的设计、状态转换规则和转换触发条件。

6 态状态图

mermaid
stateDiagram-v2
    [*] --> Draft
    Draft --> Candidate : 提交
    Candidate --> Review : 质量门控通过
    Review --> Active : 审核通过
    Review --> Draft : 打回修改
    Active --> Deprecated : 进化评估 / 手动
    Deprecated --> Archived : 确认归档
    Deprecated --> Active : 重新激活

每个状态的语义

转换触发机制

关键代码

小结

Released under the MIT License.