gatekeeper-init

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

初始化(gatekeeper-init)

Initialization (gatekeeper-init)

版本编号 = 当前 Git 分支名(规则见
gatekeeper
skill)。仅创建 requirement.md / progress.md;design/review/test 由
gatekeeper-next
按阶段实例化。
Version number = current Git branch name (rules refer to the
gatekeeper
skill). Only requirement.md / progress.md are created; design/review/test are instantiated in phases by
gatekeeper-next
.

Procedure

Procedure

1. 创建目录

1. Create Directory

  • 项目根/.gatekeeper/${版本编号}/
    不存在 → 创建。
  • 已存在 → 列出文件询问人工(跳过/确认覆盖/补齐),未确认不写入;分支名含目录非法字符 → 中止询问。
  • ${project root}/.gatekeeper/${version number}/
    does not exist → create it.
  • Already exists → list files and ask for manual confirmation (skip/confirm overwrite/supplement), no writing without confirmation; branch name contains illegal directory characters → abort and prompt for handling.

2. 实例化模板

2. Instantiate Templates

  • gatekeeper
    skill 的
    template/
    复制:
    _template-requirement.md
    → requirement.md、
    _template-progress.md
    → progress.md。
  • ${版本编号}
    占位符替换为实际分支名;不做其他内容改动。
  • Copy from the
    template/
    directory of the
    gatekeeper
    skill:
    _template-requirement.md
    → requirement.md,
    _template-progress.md
    → progress.md.
  • Replace the
    ${version number}
    placeholder with the actual branch name; do not modify other content.

3. 校验(不通过不启动)

3. Validation (Do Not Proceed If Failed)

  • 两份文件均存在且无
    ${
    残留 → 通过。
  • 不通过 → 输出失败项,写
    .init-incomplete
    标记,拒绝启动,等人工修复重跑。
  • Both files exist and no
    ${
    residues remain → pass.
  • Failed → output failed items, write the
    .init-incomplete
    marker, refuse to start, wait for manual repair and re-run.

4. 输出

4. Output

  • 目录路径 + 文件清单,提示人工填写 requirement.md 后进入需求阶段。
  • Directory path + file list, prompt to manually fill in requirement.md before entering the requirement phase.

Pitfalls

Pitfalls

  1. 仅做占位符替换,禁止修改模板业务内容;不得代写 requirement.md / progress.md。
  2. 已存在目录禁止无确认覆盖。
  1. Only perform placeholder replacement, prohibit modifying the business content of templates; do not write requirement.md / progress.md on behalf of users.
  2. Prohibit overwriting existing directories without confirmation.