w00-workflow-checkpoint

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

W00 Workflow Checkpoint(仅存档 + 读档)

W00 Workflow Checkpoint (Save + Resume Only)

这是独立于
w01~w05
的基础能力层,只负责两件事:存档(checkpoint)读档(resume)

This is a basic capability layer independent of
w01~w05
, responsible for only two things: save (checkpoint) and resume.

⚠️ 核心强制要求

⚠️ Core Mandatory Requirements

职责边界(严格)

Strict Responsibility Boundaries

  • w00-workflow-checkpoint
    只负责
    • 存档:写入/更新 checkpoint
    • 读档:读取并恢复最近 checkpoint 上下文
  • w00-workflow-checkpoint
    不负责
    • 初始化 issue(由
      w01/w02
      等主流程阶段触发)
    • 关闭任务(由
      w05-task-closure
      触发)
  • w00-workflow-checkpoint
    is only responsible for:
    • Save: Write/update checkpoint
    • Resume: Read and restore the latest checkpoint context
  • w00-workflow-checkpoint
    is NOT responsible for:
    • Initializing issues (triggered by main workflow stages like
      w01/w02
      )
    • Closing tasks (triggered by
      w05-task-closure
      )

术语约定(避免歧义)

Terminology Conventions (Avoid Ambiguity)

  • 存档:默认指 checkpoint 更新(不是关闭任务)
  • 读档:默认指恢复 checkpoint 上下文
  • 归档/收尾:由
    w05-task-closure
    处理,不属于本 skill
  • Save: By default, refers to checkpoint update (not task closure)
  • Resume: By default, refers to restoring checkpoint context
  • Archiving/Closing: Handled by
    w05-task-closure
    , not part of this skill

触发方式(自动 + 手动)

Trigger Methods (Automatic + Manual)

  • 自动触发:主流程阶段在关键节点自动调用本 skill 执行“存档/读档”。
  • 手动触发(高频):用户说
    存档
    读档
    时触发。
  • 额外条件(存档兜底):执行“存档”时,若上下文无可更新 issue(未提供
    #issue
    、无绑定
    Issue #
    、候选 0 条),允许直接创建 issue 并写入首个 checkpoint(创建并存档)。

  • Automatic Trigger: Main workflow stages automatically call this skill to perform "save/resume" at key nodes.
  • High-Frequency Manual Trigger: Triggered when the user says
    save
    or
    resume
    .
  • Additional Condition (Save Fallback): When performing "save", if there is no updatable issue in the context (no
    #issue
    provided, no bound
    Issue #
    , 0 candidates allowed), directly create an issue and write the first checkpoint (create and save).

管理对象

Managed Objects

  • 仓库:无固定默认值,按上下文解析(用户显式指定 > 当前 Git 仓库远程 > 用户选择)
  • 示例仓库:
    qiao-925/qiao-skills
    (仅示例,不作为默认值)
  • 任务标题:
    [<repo>] <目标短句>
    (示例:
    [qiao-skills] 优化 W00 自动存档触发
  • 仓库名写法:沿用仓库原始定义,不额外做大小写转换
  • 标签:
    status:*
    +
    type:*
    +
    repo:*
    +
    wf:*
    (可选:
    term:*
  • wf:*
    规范:使用完整阶段名(示例:
    wf:w02-task-planning
  • 最小字段:
    Goal / Next

  • Repository: No fixed default value, parsed by context (user explicit specification > current Git repository remote > user selection)
  • Example Repository:
    qiao-925/qiao-skills
    (example only, not used as default)
  • Task Title:
    [<repo>] <target short sentence>
    (Example:
    [qiao-skills] Optimize W00 automatic save trigger
    )
  • Repository Name Format: Follow the original repository definition, no additional case conversion
  • Labels:
    status:*
    +
    type:*
    +
    repo:*
    +
    wf:*
    (optional:
    term:*
    )
  • wf:*
    Specification: Use full stage name (Example:
    wf:w02-task-planning
    )
  • Minimum Fields:
    Goal / Next

AI Agent 行为要求

AI Agent Behavior Requirements

两个标准动作

Two Standard Actions

  1. 存档(checkpoint)
    • 写入:
      已完成 / 阻塞 / 下一步
    • 若阻塞:状态建议更新为
      status:blocked
  2. 读档(resume)
    • 读取 issue + 最近 checkpoint
    • 返回:最后状态 + 下一步
  1. Save (checkpoint)
    • Write:
      Completed / Blocked / Next Step
    • If blocked: Suggest updating status to
      status:blocked
  2. Resume
    • Read issue + latest checkpoint
    • Return: Last status + next step

存档判定流程(更新哪一个)

Save Decision Process (Which One to Update)

  1. 用户给出
    #issue
    :直接更新该 issue。
  2. 上下文有绑定
    Issue #
    :更新该 issue。
  3. 否则拉取当前仓库候选 issue(open +
    repo:*
    )。
  4. 分支:
    • 0 条:触发下文“额外条件(创建并存档)”。
    • 1 条:自动选中并回报。
    • 2+ 条:列出 3~5 条候选让用户选择;未选择前不写入。
  1. User provides
    #issue
    : Directly update this issue.
  2. Context has bound
    Issue #
    : Update this issue.
  3. Otherwise, pull candidate issues from the current repository (open +
    repo:*
    ).
  4. Branches:
    • 0 candidates: Trigger the "Additional Condition (Create and Save)" below.
    • 1 candidate: Automatically select and report back.
    • 2+ candidates: List 3~5 candidates for user selection; do not write until selection is made.

读档判定流程(读哪一个)

Resume Decision Process (Which One to Read)

  1. 用户给出
    #issue
    :直接读档。
  2. 上下文有绑定
    Issue #
    :优先读档该 issue。
  3. 否则列出当前仓库候选(优先
    status:in-progress
    /
    status:blocked
    )。
  4. 确定后输出读档摘要。
  1. User provides
    #issue
    : Directly resume.
  2. Context has bound
    Issue #
    : Prioritize resuming this issue.
  3. Otherwise, list candidates from the current repository (prioritize
    status:in-progress
    /
    status:blocked
    ).
  4. Output resume summary after confirmation.

命令参考(统一使用
gh issue
原生命令)

Command Reference (Use Original
gh issue
Commands Exclusively)

  • 存档:
    gh issue comment <id> -R <owner>/<repo> --body "检查点 YYYY-MM-DD HH:mm\n已完成: ...\n阻塞: ...\n下一步: ..."
  • 读档:
    gh issue view <id> -R <owner>/<repo> --comments
  • 候选列表:
    gh issue list -R <owner>/<repo> --state open --label "repo:<repo>" --limit 20 --json number,title,updatedAt,labels,url
  • Save:
    gh issue comment <id> -R <owner>/<repo> --body "Checkpoint YYYY-MM-DD HH:mm\nCompleted: ...\nBlocked: ...\nNext Step: ..."
  • Resume:
    gh issue view <id> -R <owner>/<repo> --comments
  • Candidate List:
    gh issue list -R <owner>/<repo> --state open --label "repo:<repo>" --limit 20 --json number,title,updatedAt,labels,url

输出规范

Output Specifications

  • 每次调用后返回:执行动作、Issue 编号/链接、当前状态、下一步建议。
  • 多候选时必须先列候选并请求用户选择。
  • After each call, return: Executed action, Issue number/link, current status, next step suggestion.
  • When there are multiple candidates, must first list them and request user confirmation.

一行回执模板(强制)

Mandatory One-Line Receipt Template

  • 存档回执
    • 已存档 #<issue> | 状态:<status> | 下一步:<next> | <url>
  • 读档回执
    • 已读档 #<issue> | 状态:<status> | 下一步:<next> | <url>
字段规则:
  • status
    /
    next
    若缺失,使用
    -
    占位,不省略字段。
  • 回执必须为单行,便于快速扫读与复制。
  • Save Receipt:
    • Saved #<issue> | Status:<status> | Next Step:<next> | <url>
  • Resume Receipt:
    • Resumed #<issue> | Status:<status> | Next Step:<next> | <url>
Field Rules:
  • If
    status
    /
    next
    is missing, use
    -
    as placeholder, do not omit the field.
  • Receipt must be a single line for quick scanning and copying.

额外条件(创建并存档)

Additional Condition (Create and Save)

  • 该条件仅在执行“存档”时生效,属于兜底分支,不改变“仅存档 + 读档”的主职责。
  • 触发条件:未提供
    #issue
    、无绑定
    Issue #
    、候选 issue 为 0 条。
  • 执行动作:创建 issue 后立即写入首个 checkpoint(不要求用户先手动初始化)。
  • 回执:沿用存档回执模板(
    已存档 #<issue> | 状态:<status> | 下一步:<next> | <url>
    )。

  • This condition only takes effect when performing "save", it is a fallback branch and does not change the main responsibility of "only save + resume".
  • Trigger Condition: No
    #issue
    provided, no bound
    Issue #
    , 0 candidate issues.
  • Action: Create an issue and immediately write the first checkpoint (no requirement for user to manually initialize first).
  • Receipt: Follow the save receipt template (
    Saved #<issue> | Status:<status> | Next Step:<next> | <url>
    ).

与 W01~W05 的关系

Relationship with W01~W05

  • w01/w02
    :负责初始化或绑定 issue;随后调用 W00 存档。
  • w03/w04
    :执行中高频调用 W00 存档/读档。
  • w05
    :负责关闭任务;必要时调用 W00 补最后一次存档。
  • w01/w02
    : Responsible for initializing or binding issues; then call W00 to save.
  • w03/w04
    : Call W00 frequently to save/resume during execution.
  • w05
    : Responsible for closing tasks; call W00 to save one last time if necessary.

手动调用示例

Manual Call Examples

  • 存档
  • 读档
交互规则:用户只需输入关键词;issue 选择、字段补齐与候选列表由系统自动判定并交互确认。
  • save
  • resume
Interaction Rules: Users only need to enter keywords; issue selection, field completion and candidate lists are automatically determined and confirmed by the system.

边界情况

Edge Cases

  • 未提供 issue 且无候选:触发“额外条件(创建并存档)”。
  • 候选过多:仅展示最近更新的 3~5 条。
  • 仓库上下文不明确:先要求用户确认
    <owner>/<repo>
    ,再执行存档/读档。
  • gh
    未登录:提示
    gh auth login
  • 不使用 alias,统一按上文原生命令执行。
  • No issue provided and no candidates: Trigger "Additional Condition (Create and Save)".
  • Too many candidates: Only display the 3~5 most recently updated ones.
  • Unclear repository context: First ask user to confirm
    <owner>/<repo>
    , then perform save/resume.
  • gh
    not logged in: Prompt
    gh auth login
    .
  • Do not use aliases, execute exclusively with original commands as specified above.