wtf.steer-tech

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Steer Tech

技术指南生成工具(Steer Tech)

Generate or refine
docs/steering/TECH.md
— the technical guidelines document. This document is the canonical reference for the stack, architectural patterns, and constraints every implementer must follow.
See
references/tech-template.md
for the expected document shape.
生成或完善
docs/steering/TECH.md
——技术指南文档。这份文档是所有开发者必须遵循的技术栈、架构模式和约束条件的权威参考。
可参考
references/tech-template.md
了解文档的预期结构。

Process

流程

1. Check if the document already exists

1. 检查文档是否已存在

Use the Read tool to attempt reading
docs/steering/TECH.md
.
If the file exists, call
AskUserQuestion
with:
  • question
    : "docs/steering/TECH.md already exists. What would you like to do?"
  • header
    : "Tech doc found"
  • 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
工具,参数如下:
  • question
    : "docs/steering/TECH.md已存在。您想要做什么?"
  • 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
    ,
    *.csproj
    , or equivalent — extract languages, frameworks, and versions
  • Architecture: module structure, folder layout, layer separation patterns
  • Test framework: existing test files, test scripts in
    package.json
  • Commands:
    package.json
    scripts,
    Makefile
    ,
    justfile
    , CI config
  • ADRs: any
    docs/adr/
    ,
    docs/decisions/
    , or inline decision records
  • 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
    justfile
    、CI配置
  • 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
AskUserQuestion
.
Topics that may need input:
  1. Key constraints — "Are there non-negotiables every implementer must respect?"
    • Pre-fill with constraints found in CLAUDE.md or existing docs.
  2. Architecture decisions — "Are there key decisions that shaped the architecture that aren't documented yet?"
    • Pre-fill with patterns inferred from the codebase structure.
  3. 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
工具逐个处理问题。
可能需要用户输入的主题:
  1. 关键约束条件 — "是否存在所有开发者必须遵守的不可协商规则?"
    • 预先填充从CLAUDE.md或现有文档中找到的约束条件。
  2. 架构决策 — "是否存在影响架构但尚未记录的关键决策?"
    • 预先填充从代码库结构中推断出的模式。
  3. 已知痛点 — "代码库中是否有需要特别注意的领域?"
    • 预先填充README或注释中标记的内容。
跳过任何已通过研究得到答案的主题。

4. Draft the document

4. 起草文档

Using
references/tech-template.md
as the shape reference, fill in all sections with gathered context. Replace every
[PLACEHOLDER]
with real content derived from the codebase.
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
AskUserQuestion
with
question: "Does this accurately reflect the technical setup?"
,
header: "Review"
, and
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.
展示草稿。然后调用
AskUserQuestion
工具,参数为
question: "这份文档是否准确反映了技术配置?"
header: "审阅"
,以及
options: [{label: "没问题——保存它", description: "写入docs/steering/TECH.md"}, {label: "我需要修改", description: "我想先调整一些内容"}]
应用修改后继续操作。

6. Write the document

6. 写入文档

bash
mkdir -p docs/steering
Write the final content to
docs/steering/TECH.md
.
Commit 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
AskUserQuestion
with:
  • question
    : "Would you like to sync this to the GitHub wiki?"
  • header
    : "Wiki sync"
  • 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
工具,参数如下:
  • question
    : "是否要将此文档同步到GitHub Wiki?"
  • header
    : "Wiki同步"
  • 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-sync

8. Offer to continue

8. 提供后续操作选项

Call
AskUserQuestion
with:
  • question
    : "What's next?"
  • header
    : "Next step"
  • options
    :
    [{label: "Create DESIGN.md", description: "Run 
    steer-design
    to document the design guidelines"}, {label: "Create QA.md", description: "Run
    steer-qa
    to document the QA standards"}, {label: "Create VISION.md", description: "Run
    steer-vision
     to document the product vision"}, {label: "Stop here", description: "Exit — no further action"}]
Route to the appropriate skill based on the answer.
调用
AskUserQuestion
工具,参数如下:
  • question
    : "接下来要做什么?"
  • header
    : "下一步"
  • options
    :
    [{label: "创建DESIGN.md", description: "运行
    steer-design
    来记录设计指南"}, {label: "创建QA.md", description: "运行
    steer-qa
    来记录QA标准"}, {label: "创建VISION.md", description: "运行
    steer-vision
    来记录产品愿景"}, {label: "到此为止", description: "退出——无进一步操作"}]
根据用户的回答调用相应的Skill。