bootstrap

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
<!-- markdownlint-disable MD013 -->
<!-- markdownlint-disable MD013 -->

Setup Workflow

工作流初始化

Run once per repo, before the first use of any other workflow skill. It teaches this repo where issues live, what the triage labels are called, and where the domain docs sit — and records those answers as the
docs/agents/
files the rest of the pipeline reads.
This is prompt-driven, not a deterministic script: explore, present what you found, confirm with the user, then write. Never guess where guessing can be replaced by looking.
每个代码仓库仅需运行一次,在使用任何其他工作流skill之前执行。它会告知代码仓库问题的存放位置、分类标签的命名以及领域文档的位置,并将这些答案记录为
docs/agents/
目录下的文件,供后续流程读取。
这是由提示驱动的流程,而非确定性脚本:先探索,展示发现的内容,与用户确认后再进行编写。凡可通过查看获取信息的,绝不猜测。

Process

流程

1. Explore

1. 探索

Read what already exists; don't assume:
  • git remote -v
    — is this a GitHub repo? Which owner/repo?
  • AGENTS.md
    /
    CLAUDE.md
    at root — does either exist? Is there already an
    ## Agent skills
    section?
  • CONTEXT.md
    ,
    CONTEXT-MAP.md
    at root.
  • docs/agents/
    — did a prior run already write these?
  • Existing issue labels (
    gh label list
    , or the GitHub MCP) — so triage maps onto real labels instead of creating duplicates.
  • Monorepo signals (
    pnpm-workspace.yaml
    ,
    workspaces
    in
    package.json
    , populated
    packages/*
    ) — decides single- vs multi-context docs.
查看已有的内容,不要主观假设:
  • git remote -v
    — 这是GitHub仓库吗?所属的所有者/仓库名称是什么?
  • 根目录下的
    AGENTS.md
    /
    CLAUDE.md
    — 是否存在其中任意一个?是否已有
    ## Agent skills
    章节?
  • 根目录下的
    CONTEXT.md
    CONTEXT-MAP.md
  • docs/agents/
    — 是否之前运行过该流程并已生成这些文件?
  • 已有的问题标签(
    gh label list
    ,或GitHub MCP)— 确保分类标签映射到真实存在的标签,避免重复创建。
  • 单体仓库标识(
    pnpm-workspace.yaml
    package.json
    中的
    workspaces
    、已填充的
    packages/*
    目录)— 决定使用单上下文还是多上下文文档。

2. Present findings and ask

2. 展示发现并确认

Summarise what's present and missing. Take the three decisions in order, each led by a recommended answer the user can accept in a word. Skip any the exploration already settled.
A — Issue tracker. Where work is tracked. Default: GitHub Issues on
origin
. Alternatives: GitLab, local markdown under
.scratch/
, or a workflow the user describes. Propose the one matching the git remote.
B — Triage labels. Read the repo's real labels first (
gh label list
or the GitHub MCP). If the canonical set already exists (
bug
,
enhancement
,
needs-triage
,
needs-info
,
ready-for-agent
,
ready-for-human
,
wontfix
), keep them. If the repo already uses different strings for the same roles, map onto those — never invent labels that already exist under another name. Record the final mapping in
docs/agents/issue-tracker.md
.
C — Domain docs layout. Assume single-context (one
CONTEXT.md
+ ADRs in
docs/adr/
) unless monorepo signals appeared, in which case propose a
CONTEXT-MAP.md
.
总结已有的内容和缺失的部分。按顺序做出三项决策,每项决策给出推荐答案,用户只需用一个词即可确认。跳过那些已通过探索确定的内容。
A — 问题追踪器:工作任务的追踪位置。默认:
origin
对应的GitHub Issues。备选方案:GitLab、
.scratch/
目录下的本地markdown文件,或用户描述的其他工作流。建议选择与git远程仓库匹配的方案。
B — 分类标签:先读取仓库的真实标签(
gh label list
或GitHub MCP)。如果标准标签集已存在(
bug
enhancement
needs-triage
needs-info
ready-for-agent
ready-for-human
wontfix
),则保留它们。如果仓库已使用其他名称指代相同作用的标签,则映射到这些现有标签上——绝不创建已以其他名称存在的标签。将最终的映射关系记录在
docs/agents/issue-tracker.md
中。
C — 领域文档布局:默认假设为单上下文(一个
CONTEXT.md
加上
docs/adr/
目录下的ADR文档),除非发现单体仓库标识,此时建议使用
CONTEXT-MAP.md

3. Write

3. 编写

Write
docs/agents/issue-tracker.md
,
docs/agents/domain.md
, and
docs/agents/workflow.md
from the confirmed answers, and add an
## Agent skills
block pointing at them in whichever of
CLAUDE.md
/
AGENTS.md
the repo already uses.
根据确认后的答案编写
docs/agents/issue-tracker.md
docs/agents/domain.md
docs/agents/workflow.md
,并在仓库已有的
CLAUDE.md
AGENTS.md
中添加指向这些文件的
## Agent skills
区块。

It's working if

验证成功的标志

docs/agents/issue-tracker.md
and
domain.md
land (plus
workflow.md
), an
## Agent skills
section appears in
CLAUDE.md
or
AGENTS.md
, the proposed tracker matches the real git remote, and the labels match strings that already exist. Afterwards
to-spec
,
to-tickets
, and
triage
act on the right place with the right labels instead of guessing.
Re-run only to switch trackers or start over — day-to-day tweaks are just edits to
docs/agents/*.md
.
docs/agents/issue-tracker.md
domain.md
已生成(加上
workflow.md
),
CLAUDE.md
AGENTS.md
中出现
## Agent skills
章节,推荐的追踪器与真实的git远程仓库匹配,且标签与已存在的字符串一致。之后
to-spec
to-tickets
triage
功能将使用正确的标签在正确的位置运行,无需猜测。
仅在切换追踪器或重新开始时重新运行该流程——日常调整只需编辑
docs/agents/*.md
文件即可。