cmd-speckit-init-update
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/speckit.init.update
/speckit.init.update
Agent skill wrapper for the Claude command .
/speckit.init.updateWhen the original command text references , , or named arguments, map them from the user's current request.
{{INPUT}}$1Claude命令的Agent技能包装器。
/speckit.init.update当原始命令文本引用、或命名参数时,从用户当前请求中映射这些参数。
{{INPUT}}$1Command Instructions
命令说明
Refresh the scripts and templates in the current project by downloading the latest versions from . Never overwrites user-governed files.
.specify/github/spec-kit通过从下载最新版本,刷新当前项目中的脚本和模板。绝不覆盖用户管理的文件。
github/spec-kit.specify/Protected paths (never overwrite)
受保护路径(绝不覆盖)
- — all files including
.specify/memory/constitution.md - — all feature artifacts
.specify/specs/
- — 所有文件,包括
.specify/memory/constitution.md - — 所有功能制品
.specify/specs/
Steps
步骤
-
Verify setup: Check thatexists in the project root. If not, stop and tell the user to run
.specify/first./speckit.init -
Clone upstream:bash
UPSTREAM_DIR=$(mktemp -d) git clone --depth 1 https://github.com/github/spec-kit.git "$UPSTREAM_DIR"If the clone fails, report the error and stop. -
Update files by copying from upstream, skipping protected paths. For each file in the upstreamdirectory:
.specify/Upstream source Local destination Protected? .specify/memory/constitution.md.specify/memory/constitution.mdYES — skip .specify/scripts/bash/common.sh.specify/scripts/bash/common.shupdate .specify/scripts/bash/setup-plan.sh.specify/scripts/bash/setup-plan.shupdate .specify/scripts/bash/check-prerequisites.sh.specify/scripts/bash/check-prerequisites.shupdate .specify/scripts/bash/update-agent-context.sh.specify/scripts/bash/update-agent-context.shupdate .specify/scripts/bash/create-new-feature.sh.specify/scripts/bash/create-new-feature.shupdate .specify/templates/agent-file-template.md.specify/templates/agent-file-template.mdupdate .specify/templates/checklist-template.md.specify/templates/checklist-template.mdupdate .specify/templates/tasks-template.md.specify/templates/tasks-template.mdupdate .specify/templates/spec-template.md.specify/templates/spec-template.mdupdate .specify/templates/plan-template.md.specify/templates/plan-template.mdupdate Also copy any additionalor.specify/scripts/files found in upstream that are not listed above (new upstream additions). Preserve file permissions..specify/templates/ -
Clean up:bash
rm -rf "$UPSTREAM_DIR" -
Report a summary table:
Status | File | Reason UPDATED | .specify/templates/spec-template.md | Content changed ADDED | .specify/scripts/bash/new-script.sh | New upstream file SKIPPED | .specify/memory/constitution.md | User-governed SKIPPED | .specify/specs/ | User-governed -
Next step: Review any updated templates before runningor
/speckit.specifyin case template changes affect expected output format./speckit.plan
-
验证环境: 检查项目根目录中是否存在。如果不存在,停止操作并告知用户先运行
.specify/。/speckit.init -
克隆上游仓库:bash
UPSTREAM_DIR=$(mktemp -d) git clone --depth 1 https://github.com/github/spec-kit.git "$UPSTREAM_DIR"如果克隆失败,报告错误并停止操作。 -
更新文件: 从上游仓库复制文件,跳过受保护路径。对于上游目录中的每个文件:
.specify/Upstream source Local destination Protected? .specify/memory/constitution.md.specify/memory/constitution.mdYES — skip .specify/scripts/bash/common.sh.specify/scripts/bash/common.shupdate .specify/scripts/bash/setup-plan.sh.specify/scripts/bash/setup-plan.shupdate .specify/scripts/bash/check-prerequisites.sh.specify/scripts/bash/check-prerequisites.shupdate .specify/scripts/bash/update-agent-context.sh.specify/scripts/bash/update-agent-context.shupdate .specify/scripts/bash/create-new-feature.sh.specify/scripts/bash/create-new-feature.shupdate .specify/templates/agent-file-template.md.specify/templates/agent-file-template.mdupdate .specify/templates/checklist-template.md.specify/templates/checklist-template.mdupdate .specify/templates/tasks-template.md.specify/templates/tasks-template.mdupdate .specify/templates/spec-template.md.specify/templates/spec-template.mdupdate .specify/templates/plan-template.md.specify/templates/plan-template.mdupdate 同时复制上游仓库中未在上述列表中列出的所有额外或.specify/scripts/文件(上游新增文件)。保留文件权限。.specify/templates/ -
清理:bash
rm -rf "$UPSTREAM_DIR" -
报告: 生成汇总表格:
Status | File | Reason UPDATED | .specify/templates/spec-template.md | Content changed ADDED | .specify/scripts/bash/new-script.sh | New upstream file SKIPPED | .specify/memory/constitution.md | User-governed SKIPPED | .specify/specs/ | User-governed -
下一步: 在运行或
/speckit.specify之前,检查所有更新后的模板,以防模板更改影响预期的输出格式。/speckit.plan