wtf.steer-tech
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSteer Tech
技术指南生成工具(Steer Tech)
Generate or refine — the technical guidelines document. This document is the canonical reference for the stack, architectural patterns, and constraints every implementer must follow.
docs/steering/TECH.mdSee for the expected document shape.
references/tech-template.md生成或完善——技术指南文档。这份文档是所有开发者必须遵循的技术栈、架构模式和约束条件的权威参考。
docs/steering/TECH.md可参考了解文档的预期结构。
references/tech-template.mdProcess
流程
1. Check if the document already exists
1. 检查文档是否已存在
Use the Read tool to attempt reading .
docs/steering/TECH.mdIf the file exists, call with:
AskUserQuestion-
: "docs/steering/TECH.md already exists. What would you like to do?"
question -
: "Tech doc found"
header -
:
options[{label: "Refine it", description: "Review and improve the existing document"}, {label: "Exit", description: "Leave it as-is"}] -
Refine it → read the current document, then skip to step 4 (use existing doc as context, only ask about gaps or outdated sections).
-
Exit → exit immediately.
If the file does not exist, continue to step 2.
使用读取工具尝试读取。
docs/steering/TECH.md如果文件已存在,调用工具,参数如下:
AskUserQuestion-
: "docs/steering/TECH.md已存在。您想要做什么?"
question -
: "找到技术文档"
header -
:
options[{label: "完善它", description: "审阅并改进现有文档"}, {label: "退出", description: "保持文档原样"}] -
完善它 → 读取当前文档,然后跳至步骤4(以现有文档为上下文,仅询问关于缺失或过时的部分)。
-
退出 → 立即退出。
如果文件不存在,继续步骤2。
2. Research the codebase
2. 研究代码库
Use the Agent tool to extract technical facts directly from the codebase. Do not ask the user for things that can be read:
- Stack: ,
package.json,pyproject.toml,go.mod,Cargo.toml, or equivalent — extract languages, frameworks, and versions*.csproj - Architecture: module structure, folder layout, layer separation patterns
- Test framework: existing test files, test scripts in
package.json - Commands: scripts,
package.json,Makefile, CI configjustfile - ADRs: any ,
docs/adr/, or inline decision recordsdocs/decisions/ - Conventions: naming patterns from existing files, import paths, test file locations
- CLAUDE.md and any existing architectural docs
Synthesise findings. Produce a concrete draft of Stack, Commands, and Code Conventions from this research alone — these sections should require no user input.
使用Agent工具直接从代码库中提取技术信息。对于可通过读取获取的信息,无需询问用户:
- 技术栈:、
package.json、pyproject.toml、go.mod、Cargo.toml或等效文件——提取语言、框架及其版本*.csproj - 架构:模块结构、文件夹布局、分层模式
- 测试框架:现有测试文件、中的测试脚本
package.json - 命令:脚本、
package.json、Makefile、CI配置justfile - ADR:任何、
docs/adr/目录下的文件,或内联的决策记录docs/decisions/ - 约定:现有文件的命名模式、导入路径、测试文件位置
- CLAUDE.md和任何已有的架构文档
综合研究结果。仅通过此研究就生成技术栈、命令和代码规范的具体草稿——这些部分无需用户输入。
3. Interview the user for gaps only
3. 仅针对研究无法确定的内容询问用户
Only ask about what research could not determine. Work through questions one at a time using .
AskUserQuestionTopics that may need input:
- Key constraints — "Are there non-negotiables every implementer must respect?"
- Pre-fill with constraints found in CLAUDE.md or existing docs.
- Architecture decisions — "Are there key decisions that shaped the architecture that aren't documented yet?"
- Pre-fill with patterns inferred from the codebase structure.
- Known pain points — "Are there areas of the codebase that need special care?"
- Pre-fill with anything flagged in README or comments.
Skip any topic already answered by research.
仅询问研究无法确定的内容。使用工具逐个处理问题。
AskUserQuestion可能需要用户输入的主题:
- 关键约束条件 — "是否存在所有开发者必须遵守的不可协商规则?"
- 预先填充从CLAUDE.md或现有文档中找到的约束条件。
- 架构决策 — "是否存在影响架构但尚未记录的关键决策?"
- 预先填充从代码库结构中推断出的模式。
- 已知痛点 — "代码库中是否有需要特别注意的领域?"
- 预先填充README或注释中标记的内容。
跳过任何已通过研究得到答案的主题。
4. Draft the document
4. 起草文档
Using as the shape reference, fill in all sections with gathered context. Replace every with real content derived from the codebase.
references/tech-template.md[PLACEHOLDER]Writing rules:
- Commands must be exact and tested — stale commands are worse than no commands
- Architecture description reflects what the codebase actually does, not aspirations
- Constraints are written as imperatives ("No synchronous I/O on the request path")
- ADRs link to source files where they exist; inline only the decision and rationale
以为结构参考,用收集到的上下文填充所有章节。将每个替换为从代码库中获取的真实内容。
references/tech-template.md[PLACEHOLDER]撰写规则:
- 命令必须准确且经过验证——过时的命令比没有命令更糟糕
- 架构描述应反映代码库的实际情况,而非理想状态
- 约束条件以祈使句形式编写(例如:"请求路径上禁止同步I/O")
- ADR链接到其所在的源文件;仅内联决策内容和理由
5. Review with user
5. 与用户审阅
Show the draft. Then call with , , and .
AskUserQuestionquestion: "Does this accurately reflect the technical setup?"header: "Review"options: [{label: "Looks good — save it", description: "Write to docs/steering/TECH.md"}, {label: "I have changes", description: "I want to adjust something first"}]Apply edits, then proceed.
展示草稿。然后调用工具,参数为,,以及。
AskUserQuestionquestion: "这份文档是否准确反映了技术配置?"header: "审阅"options: [{label: "没问题——保存它", description: "写入docs/steering/TECH.md"}, {label: "我需要修改", description: "我想先调整一些内容"}]应用修改后继续操作。
6. Write the document
6. 写入文档
bash
mkdir -p docs/steeringWrite the final content to .
docs/steering/TECH.mdCommit the file:
bash
git add docs/steering/TECH.md
git commit -m "docs: add technical guidelines steering document"Print the file path.
bash
mkdir -p docs/steering将最终内容写入。
docs/steering/TECH.md提交文件:
bash
git add docs/steering/TECH.md
git commit -m "docs: add technical guidelines steering document"打印文件路径。
7. Offer wiki sync
7. 提供Wiki同步选项
Call with:
AskUserQuestion- : "Would you like to sync this to the GitHub wiki?"
question - : "Wiki sync"
header - :
options[{label: "Yes — push to wiki", description: "Publish TECH.md as a wiki page"}, {label: "Not now", description: "Skip wiki sync"}]
If yes:
bash
REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)
git clone https://github.com/$REPO.wiki.git /tmp/wiki-sync
cp docs/steering/TECH.md /tmp/wiki-sync/WTF-Tech.md
cd /tmp/wiki-sync && git add WTF-Tech.md && git commit -m "Sync: technical guidelines" && git push
rm -rf /tmp/wiki-sync调用工具,参数如下:
AskUserQuestion- : "是否要将此文档同步到GitHub Wiki?"
question - : "Wiki同步"
header - :
options[{label: "是——推送到Wiki", description: "将TECH.md发布为Wiki页面"}, {label: "暂时不用", description: "跳过Wiki同步"}]
如果选择是:
bash
REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)
git clone https://github.com/$REPO.wiki.git /tmp/wiki-sync
cp docs/steering/TECH.md /tmp/wiki-sync/WTF-Tech.md
cd /tmp/wiki-sync && git add WTF-Tech.md && git commit -m "Sync: technical guidelines" && git push
rm -rf /tmp/wiki-sync8. Offer to continue
8. 提供后续操作选项
Call with:
AskUserQuestion- : "What's next?"
question - : "Next step"
header - :
optionssteer-design[{label: "Create DESIGN.md", description: "Runsteer-qato document the design guidelines"}, {label: "Create QA.md", description: "Runsteer-visionto document the QA standards"}, {label: "Create VISION.md", description: "Runto document the product vision"}, {label: "Stop here", description: "Exit — no further action"}]
Route to the appropriate skill based on the answer.
调用工具,参数如下:
AskUserQuestion- : "接下来要做什么?"
question - : "下一步"
header - :
optionssteer-design[{label: "创建DESIGN.md", description: "运行steer-qa来记录设计指南"}, {label: "创建QA.md", description: "运行steer-vision来记录QA标准"}, {label: "创建VISION.md", description: "运行来记录产品愿景"}, {label: "到此为止", description: "退出——无进一步操作"}]
根据用户的回答调用相应的Skill。