wtf.setup
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSetup
安装设置
Pre-flight check and installer for the WTF workflow. Validates the GitHub CLI, installs required extensions, ensures contains all required templates, creates all lifecycle labels, and installs the PR template so both agents and humans can create structured issues and pull requests.
.github/ISSUE_TEMPLATE/WTF工作流的预检与安装工具。验证GitHub CLI,安装所需扩展,确保包含所有必填模板,创建全生命周期标签,并安装PR模板,以便Agent和人员都能创建结构化的问题与拉取请求。
.github/ISSUE_TEMPLATE/Process
流程
1. Verify gh
is installed
gh1. 验证gh
已安装
ghbash
gh --versionIf not found: tell the user that the GitHub CLI is required, link them to https://cli.github.com, and stop. Do not proceed until is confirmed installed.
ghbash
gh --version若未找到:告知用户需要安装GitHub CLI,链接至https://cli.github.com,然后停止操作。确认`gh`安装完成前不得继续。
2. Verify gh
is authenticated
gh2. 验证gh
已完成认证
ghbash
gh auth statusIf not authenticated: tell the user to run and stop. Do not proceed until authentication is confirmed.
gh auth loginbash
gh auth status若未认证:告知用户运行并停止操作。确认认证完成前不得继续。
gh auth login3. Check and install required extensions
3. 检查并安装所需扩展
bash
gh extension listCheck the output for both of the following extensions. For each that is missing, install it:
bash
undefinedbash
gh extension list检查输出中是否包含以下两个扩展。对于缺失的扩展,执行安装:
bash
undefinedSub-issue hierarchy (epic → feature → task)
子问题层级结构(epic → feature → task)
gh extension install yahsan2/gh-sub-issue
gh extension install yahsan2/gh-sub-issue
Issue dependency tracking (X blocks Y)
问题依赖追踪(X 阻塞 Y)
gh extension install xiduzo/gh-issue-dependency
If installation fails (e.g. network error, permissions), warn the user that relationship tracking will be unavailable until the extension is installed. Note the failure — it will be included in the final status report.
After attempting installation, verify the command syntax for any newly installed extension:
```bash
gh sub-issue --help
gh issue-dependency --helpRecord two booleans for the final report:
- : true if
gh-sub-issue-availableis installed and workingyahsan2/gh-sub-issue - : true if
gh-issue-dependency-availableis installed and workingxiduzo/gh-issue-dependency
gh extension install xiduzo/gh-issue-dependency
若安装失败(如网络错误、权限问题),向用户发出警告,说明在扩展安装完成前,关系追踪功能将无法使用。记录失败情况——该信息会包含在最终状态报告中。
尝试安装后,验证新安装扩展的命令语法:
```bash
gh sub-issue --help
gh issue-dependency --help为最终报告记录两个布尔值:
- :若
gh-sub-issue-available已安装且可用则为trueyahsan2/gh-sub-issue - :若
gh-issue-dependency-available已安装且可用则为truexiduzo/gh-issue-dependency
4. Detect repo context
4. 检测仓库上下文
bash
gh repo view --json nameWithOwner -q .nameWithOwnerIf this fails (not inside a git repo, or no GitHub remote), warn the user and note that issue creation will not work until the repo is connected to GitHub. Continue to the template check regardless.
bash
gh repo view --json nameWithOwner -q .nameWithOwner若此命令失败(不在git仓库内,或无GitHub远程仓库),向用户发出警告,并说明在仓库连接到GitHub前,问题创建功能将无法使用。无论结果如何,继续执行模板检查步骤。
5. Check issue templates
5. 检查问题模板
Check whether exists and contains all four required templates:
.github/ISSUE_TEMPLATE/bash
ls .github/ISSUE_TEMPLATE/Required files:
BUG.mdEPIC.mdFEATURE.mdTASK.md
For each missing file, copy it from this skill's bundled references:
bash
mkdir -p .github/ISSUE_TEMPLATE检查是否存在,且包含所有四个必填模板:
.github/ISSUE_TEMPLATE/bash
ls .github/ISSUE_TEMPLATE/必填文件:
BUG.mdEPIC.mdFEATURE.mdTASK.md
对于每个缺失的文件,从本Skill的捆绑参考文件中复制:
bash
mkdir -p .github/ISSUE_TEMPLATECopy each missing template from the skill's references folder.
从Skill的参考文件夹中复制每个缺失的模板。
The references folder is at: skills/wtf-setup/references/
参考文件夹路径为:skills/wtf-setup/references/
cp skills/wtf-setup/references/BUG.md .github/ISSUE_TEMPLATE/BUG.md
cp skills/wtf-setup/references/EPIC.md .github/ISSUE_TEMPLATE/EPIC.md
cp skills/wtf-setup/references/FEATURE.md .github/ISSUE_TEMPLATE/FEATURE.md
cp skills/wtf-setup/references/TASK.md .github/ISSUE_TEMPLATE/TASK.md
Only copy files that are missing — do not overwrite existing templates. After copying, list the final contents of `.github/ISSUE_TEMPLATE/` to confirm.cp skills/wtf-setup/references/BUG.md .github/ISSUE_TEMPLATE/BUG.md
cp skills/wtf-setup/references/EPIC.md .github/ISSUE_TEMPLATE/EPIC.md
cp skills/wtf-setup/references/FEATURE.md .github/ISSUE_TEMPLATE/FEATURE.md
cp skills/wtf-setup/references/TASK.md .github/ISSUE_TEMPLATE/TASK.md
仅复制缺失的文件——不得覆盖现有模板。复制完成后,列出`.github/ISSUE_TEMPLATE/`的最终内容以确认。6. Check PR template
6. 检查PR模板
Check whether exists:
.github/pull_request_template.mdbash
ls .github/pull_request_template.md 2>/dev/nullIf missing, copy it from the skill's bundled references:
bash
cp skills/wtf-setup/references/pull_request_template.md .github/pull_request_template.mdDo not overwrite if it already exists.
检查是否存在:
.github/pull_request_template.mdbash
ls .github/pull_request_template.md 2>/dev/null若缺失,从本Skill的捆绑参考文件中复制:
bash
cp skills/wtf-setup/references/pull_request_template.md .github/pull_request_template.md若文件已存在,不得覆盖。
7. Create required GitHub labels
7. 创建所需GitHub标签
Create all lifecycle labels the workflow depends on. Using makes the command idempotent — it updates the description/color if the label already exists and creates it if it does not:
--forcebash
gh label create epic --color 5319e7 --description "Strategic initiative spanning multiple features" --force
gh label create feature --color 0075ca --description "User-facing capability delivered as a vertical slice" --force
gh label create task --color e4e669 --description "Implementable vertical slice of a Feature" --force
gh label create bug --color d73a4a --description "Something is broken" --force
gh label create implemented --color 0e8a16 --description "Implementation complete — ready for QA" --force
gh label create designed --color f9d0c4 --description "Design coverage added to the Task" --force
gh label create verified --color 006b75 --description "QA verified — ready for merge" --forceIf any label creation fails (e.g. insufficient permissions), warn the user — note that the affected skills will fall back to creating labels on first use.
Closing convention: GitHub has no native setting to require PR-based closure, so this is enforced by skill behavior. Issues are only "closed as completed" when a merged PR contains. DirectCloses #<n>calls are reserved forgh issue close(won't implement) and--reason "not planned"only. Surface this convention in the status report.--reason "duplicate"
创建工作流依赖的所有生命周期标签。使用参数可确保命令的幂等性——若标签已存在则更新其描述/颜色,若不存在则创建:
--forcebash
gh label create epic --color 5319e7 --description "Strategic initiative spanning multiple features" --force
gh label create feature --color 0075ca --description "User-facing capability delivered as a vertical slice" --force
gh label create task --color e4e669 --description "Implementable vertical slice of a Feature" --force
gh label create bug --color d73a4a --description "Something is broken" --force
gh label create implemented --color 0e8a16 --description "Implementation complete — ready for QA" --force
gh label create designed --color f9d0c4 --description "Design coverage added to the Task" --force
gh label create verified --color 006b75 --description "QA verified — ready for merge" --force若任何标签创建失败(如权限不足),向用户发出警告——说明受影响的Skill会在首次使用时自动创建标签作为 fallback。
关闭约定: GitHub没有原生设置要求基于PR关闭问题,因此此规则由Skill行为强制执行。只有当合并的PR中包含时,问题才会被“标记为已完成关闭”。直接调用Closes #<n>仅适用于gh issue close(不会实现)和--reason "not planned"(重复问题)的情况。请在状态报告中说明此约定。--reason "duplicate"
8. Report status
8. 报告状态
Print a clear status summary covering every check:
WTF Setup — Status Report
─────────────────────────
gh CLI installed ✅
gh authenticated ✅
gh-sub-issue extension ✅ (or ⚠️ not installed — relationship links unavailable)
gh-issue-dependency ext ✅ (or ⚠️ not installed — dependency links unavailable)
Repo context ✅ owner/repo (or ⚠️ not detected)
Issue templates
BUG.md ✅ (or ✅ installed from references)
EPIC.md ✅ (or ✅ installed from references)
FEATURE.md ✅ (or ✅ installed from references)
TASK.md ✅ (or ✅ installed from references)
PR template ✅ (or ✅ installed from references)
GitHub labels ✅ epic, feature, task, bug, implemented, designed, verified
─────────────────────────
Ready to use WTF. Start with `write-epic` to plan your first initiative.If any item failed (gh not installed, not authenticated), replace the closing line with a clear "Fix the issues above before proceeding." and do not suggest next steps.
打印清晰的状态摘要,涵盖所有检查项:
WTF Setup — Status Report
─────────────────────────
gh CLI installed ✅
gh authenticated ✅
gh-sub-issue extension ✅ (或 ⚠️ 未安装 — 关系链接不可用)
gh-issue-dependency ext ✅ (或 ⚠️ 未安装 — 依赖链接不可用)
Repo context ✅ owner/repo (或 ⚠️ 未检测到)
Issue templates
BUG.md ✅ (或 ✅ 从参考文件安装)
EPIC.md ✅ (或 ✅ 从参考文件安装)
FEATURE.md ✅ (或 ✅ 从参考文件安装)
TASK.md ✅ (或 ✅ 从参考文件安装)
PR template ✅ (或 ✅ 从参考文件安装)
GitHub labels ✅ epic, feature, task, bug, implemented, designed, verified
─────────────────────────
Ready to use WTF. Start with `write-epic` to plan your first initiative.若有任何项失败(如gh未安装、未认证),将结尾行替换为清晰的“请先修复上述问题,再继续操作。”,且不给出下一步建议。
9. Offer to set up steering docs
9. 询问是否设置指导文档
If setup completed without fatal errors, call with:
AskUserQuestion-
: "Setup complete. The steering docs (VISION.md, TECH.md, DESIGN.md, QA.md) capture your project's principles and standards — every skill reads them automatically. Would you like to create them now?"
question -
: "Steering docs"
header -
:
optionssteer-vision[{label: "Yes — set them up now", description: "Run(it will chain to the others)"}, {label: "Not now", description: "Skip — skills will prompt you to create them on first use"}] -
Yes → follow theprocess (it will offer to chain to TECH, DESIGN, and QA at the end).
steer-vision -
Not now → exit.
若设置完成且无致命错误,调用,参数如下:
AskUserQuestion-
: "设置完成。指导文档(VISION.md、TECH.md、DESIGN.md、QA.md)用于记录项目的原则与标准——所有Skill都会自动读取这些文档。是否现在创建它们?"
question -
: "指导文档"
header -
:
optionssteer-vision[{label: "是 — 现在设置", description: "运行(后续会自动触发TECH、DESIGN和QA文档的设置)"}, {label: "暂时不设置", description: "跳过 — Skill会在首次使用时提示您创建"}] -
是 → 执行流程(流程结束时会提供继续设置TECH、DESIGN和QA文档的选项)。
steer-vision -
暂时不设置 → 退出。