catchup

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Catchup — Context Reconstruction

Catchup — 上下文重建

This skill is strictly read-only. Do NOT edit files, create branches, or run write commands.
本技能为严格只读模式。请勿编辑文件、创建分支或运行写入类命令。

1. Gather data (run all independent steps in parallel)

1. 收集数据(所有独立步骤并行运行)

  • git log --format="%h %s (%ar)" -20
    ,
    git status
    , and
    git worktree list
  • Read
    .branch-context.md
    (if exists — check CWD and worktree root). Parse YAML frontmatter:
    workflow_step
    ,
    validate_round
    /
    validate_max
    ,
    review_round
    /
    review_max
    ,
    plan_review_chunk
    /
    plan_review_total
    /
    plan_chunks_approved
  • Read
    ai-workspace/MEMORY.md
    — note anything in-progress or blocking
  • Read
    HANDOFF.md
    (if exists)
  • List
    ai-workspace/plans/
    (sort by mtime, most recent first) and read the first file that does NOT end in
    .done.md
    or
    .executed.md
  • Search Basic Memory via MCP for recent entries matching the current branch name. If MCP unavailable, skip silently.
  • GitHub — check availability first:
    bash
    command -v gh >/dev/null 2>&1 && gh auth status >/dev/null 2>&1
    If authenticated, run in parallel:
    bash
    gh pr list --state open
    gh issue list --state open --limit 15
    If
    gh
    is unavailable or unauthenticated, note "GitHub CLI unavailable" and skip. Do NOT attempt to install or authenticate.
  • 执行
    git log --format="%h %s (%ar)" -20
    git status
    以及
    git worktree list
    命令
  • 读取
    .branch-context.md
    (如果存在,请检查当前工作目录和工作树根目录)。解析YAML frontmatter字段:
    workflow_step
    validate_round
    /
    validate_max
    review_round
    /
    review_max
    plan_review_chunk
    /
    plan_review_total
    /
    plan_chunks_approved
  • 读取
    ai-workspace/MEMORY.md
    —— 记录所有进行中或阻塞的事项
  • 读取
    HANDOFF.md
    (如果存在)
  • 列出
    ai-workspace/plans/
    目录下的文件(按修改时间倒序排列,最新的在前),读取第一个不以
    .done.md
    .executed.md
    结尾的文件
  • 通过MCP搜索基础内存,查找与当前分支名称匹配的最近条目。如果MCP不可用,静默跳过。
  • GitHub —— 先检查可用性:
    bash
    command -v gh >/dev/null 2>&1 && gh auth status >/dev/null 2>&1
    如果已完成认证,并行运行以下命令:
    bash
    gh pr list --state open
    gh issue list --state open --limit 15
    如果
    gh
    不可用或未完成认证,标注「GitHub CLI不可用」并跳过。请勿尝试安装或完成认证。

2. Synthesize

2. 整合信息

Present findings in this format. Omit sections where the data source was not found (e.g., no HANDOFF.md, gh unavailable). Always show Loop state and Blockers even when empty — absence is informative:
Branch:         <name> — <what we're building (from plan or branch-context)>
Worktree:       <path> (or "primary")
Last commit:    <hash> <message>
Uncommitted:    <staged/unstaged summary, or "clean">
Workflow step:  <N> — <step name> (from frontmatter, or inferred)
Loop state:     validate <round>/<max>, review <round>/<max>
Active plan:    <file> — <current phase> — <next action>
Blockers:       <list>
Open PRs:       <count — titles>
Open issues:    <count — top 5 titles>
Handoff:        <detail>
After the summary, surface blockers and TODO items prominently — remaining work, failing CI, stale branches, items from memory flagged as blocking. These go above the fold, not as footnotes.
按照以下格式展示查询结果。未找到对应数据源的章节请省略(例如没有HANDOFF.md、gh不可用的场景)。即便内容为空也始终要展示循环状态和阻塞项 —— 内容缺失本身也是有效信息:
Branch:         <name> — <what we're building (from plan or branch-context)>
Worktree:       <path> (or "primary")
Last commit:    <hash> <message>
Uncommitted:    <staged/unstaged summary, or "clean">
Workflow step:  <N> — <step name> (from frontmatter, or inferred)
Loop state:     validate <round>/<max>, review <round>/<max>
Active plan:    <file> — <current phase> — <next action>
Blockers:       <list>
Open PRs:       <count — titles>
Open issues:    <count — top 5 titles>
Handoff:        <detail>
在总结之后,优先突出展示阻塞项和待办事项 —— 剩余工作、CI失败、过时分支、内存中标记为阻塞的条目。这些内容要放在最显眼的位置,不要放在脚注中。

3. Suggest next actions

3. 建议后续操作

Based on gathered state, suggest 2-3 concrete next actions. Examples:
  • "Resume building — plan X is at step 5 (Build)"
  • "Run /validate — implementation looks complete"
  • "Address blocker: [description]"
  • "Review open PR #N — awaiting action"
  • "Pick up issue #N — in-progress"
End with: "What would you like to do?"
基于收集到的状态,建议2-3个具体的后续操作。示例:
  • 「恢复构建 —— 计划X当前处于第5步(Build阶段)」
  • 「运行/validate —— 实现看起来已完成」
  • 「处理阻塞项:[描述]」
  • 「评审开放PR #N —— 等待处理」
  • 「接手issue #N —— 进行中」
最后以:「你想要做什么?」结尾

Failure modes

故障场景

  • No
    .branch-context.md
    : infer workflow step from git state and plan file status. Note: "No branch context — step inferred."
  • No active plan: note "No active plan." Do not search
    .done.md
    files.
  • On
    main
    branch
    : skip branch-context and plan lookup. Show git state, PRs, issues, and memory only.
  • Basic Memory MCP unavailable: skip silently.
  • gh
    unavailable
    : show "GitHub CLI unavailable — PR/issue status unknown."
  • .branch-context.md
    :根据git状态和计划文件状态推断工作流步骤。标注:「无分支上下文 —— 步骤为推断结果。」
  • 无活跃计划:标注「无活跃计划。」不要搜索
    .done.md
    文件。
  • 处于
    main
    分支
    :跳过分支上下文和计划查找。仅展示git状态、PR、issue和内存内容。
  • 基础内存MCP不可用:静默跳过。
  • gh
    不可用
    :展示「GitHub CLI不可用 —— PR/issue状态未知。」