thread-bootstrap

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Thread Bootstrap

Thread Bootstrap

Use this skill to create a new thread when a goal should not be attached to an existing thread.
当目标不应该关联到现有线程时,使用此skill创建新线程。

Core Rule

核心规则

Allocate a stable
thread-id
once, initialize from
threads/_template/
, and stop before doing any goal work.
一次性分配稳定的
thread-id
,从
threads/_template/
初始化,在执行任何目标相关工作前停止。

Workflow

工作流

  1. Confirm
    threads/_template/
    already exists.
  2. If the template root is missing, stop and hand off to
    thread-repo-bootstrap
    .
  3. Decide whether the goal belongs in an existing thread.
  4. If new thread is required, generate
    <topic-slug>-tNN
    .
  5. Create or checkout
    thread/<thread-id>
    .
  6. Copy
    threads/_template/memory.md
    and
    threads/_template/interrupt.md
    .
  7. Fill only the minimum bootstrap fields.
  8. Write the first stop point into
    interrupt.md
    .
  1. 确认
    threads/_template/
    已存在。
  2. 如果模板根目录缺失,停止流程并移交到
    thread-repo-bootstrap
    处理。
  3. 判定目标是否属于现有线程。
  4. 如果需要新建线程,生成
    <topic-slug>-tNN
    格式ID。
  5. 创建或切换到
    thread/<thread-id>
    分支。
  6. 复制
    threads/_template/memory.md
    threads/_template/interrupt.md
    文件。
  7. 仅填写最基础的引导字段。
  8. 将第一个停止节点写入
    interrupt.md

Rules

规则

  • Use
    THREAD_BOOTSTRAP_ID_STYLE=slug-tNN
    by default.
  • Use
    THREAD_BOOTSTRAP_AUTO_CHECKOUT=true
    to decide whether to switch branches automatically.
  • Use
    THREAD_BOOTSTRAP_TEMPLATE_ROOT=threads/_template
    when set; otherwise use the repo default.
  • Repo bootstrap is a hard prerequisite; do not invent template files ad hoc during thread bootstrap.
  • Never rename a thread after creation.
  • Never add proposal or execution content beyond bootstrap state.
  • 默认使用
    THREAD_BOOTSTRAP_ID_STYLE=slug-tNN
    配置。
  • 使用
    THREAD_BOOTSTRAP_AUTO_CHECKOUT=true
    配置判定是否自动切换分支。
  • 若设置了
    THREAD_BOOTSTRAP_TEMPLATE_ROOT=threads/_template
    则使用该路径,否则使用仓库默认路径。
  • 仓库引导是硬性前置条件,请勿在线程引导过程中临时创建模板文件。
  • 线程创建后请勿重命名。
  • 请勿添加超出引导状态的提案或执行内容。

When To Load Reference

何时加载参考文档

Load thread-bootstrap-rules.md when you need exact ID allocation, template, or branch rules.
当你需要准确的ID分配、模板或分支规则时,加载thread-bootstrap-rules.md

Scripts

脚本

  • scripts/allocate_thread_id.py
  • scripts/bootstrap_thread.py
  • scripts/allocate_thread_id.py
  • scripts/bootstrap_thread.py