afk-setup
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAFK Setup
AFK 配置
Register a repo in the AFK board registry so , , and
can find its board. The registry is a single JSON file at
(default ) that maps an
absolute repo path to that repo's board coordinates.
engineertriagereviewer$CLAUDE_CONFIG_DIR/afk.json~/.claude/afk.jsonIt is per-machine and NOT source-controlled. It keys on absolute paths, which
differ between your laptop and the VPS, so each machine generates its own with the
bundled script. That is why a freshly-cloned checkout (e.g. on the VPS) has no
entry: you generate it there.
在AFK看板注册表中注册仓库,以便、和能够找到对应的看板。该注册表是位于(默认路径为)的单个JSON文件,用于将仓库绝对路径映射到该仓库的看板坐标。
engineertriagereviewer$CLAUDE_CONFIG_DIR/afk.json~/.claude/afk.json**该配置是按机器存储的,不纳入版本控制。**它以绝对路径作为键,而你的笔记本电脑和VPS上的路径会有所不同,因此每台机器都需要通过内置脚本生成自己的配置文件。这就是为什么新克隆的代码仓库(例如在VPS上)没有条目:你需要在对应机器上生成它。
The schema
配置 schema
json
{
"repos": {
"/abs/path/to/repo": {
"tracker": "linear",
"linear": { "team": "Engineering", "project": "Docket phase 1: ingest, feed, reader" },
"readyStatus": "Ready for Agent",
"humanStatus": "Ready for Human",
"shipMode": "pr"
}
}
}- :
tracker,linear, or any future tracker.github - Coordinates: , or
linear: { team, project }.github: { repo: "owner/name", project? } - /
readyStatus: the board's two triage-output columns (canonicalhumanStatus/Ready for Agent). The other statuses (Ready for Human,Triage,In Review,Changes Requested) are matched by their canonical names verbatim.Done - :
shipMode(branch and open a PR) is the default.pr
json
{
"repos": {
"/abs/path/to/repo": {
"tracker": "linear",
"linear": { "team": "Engineering", "project": "Docket phase 1: ingest, feed, reader" },
"readyStatus": "Ready for Agent",
"humanStatus": "Ready for Human",
"shipMode": "pr"
}
}
}- : 可选值为
tracker、linear或未来支持的其他跟踪器。github - 坐标:,或
linear: { team, project }。github: { repo: "owner/name", project? } - /
readyStatus: 看板的两个分类输出列(标准值为humanStatus/Ready for Agent)。其他状态(Ready for Human、Triage、In Review、Changes Requested)需与标准名称完全匹配。Done - : 默认值为
shipMode(创建分支并发起PR)。pr
Generate the entry
生成配置条目
Run the bundled script from the repo root (it resolves the path itself):
bash
undefined从仓库根目录运行内置脚本(脚本会自动解析路径):
bash
undefinedLinear board (the DEFAULT). Team defaults to "Engineering"; only the project
Linear看板(默认选项)。Team默认值为"Engineering";仅需指定project(无法自动推断):
is required (it cannot be inferred):
—
bash <path-to-this-skill>/scripts/init-afk.sh --linear-project "Skills"
bash <path-to-this-skill>/scripts/init-afk.sh --linear-project "Skills"
Linear with a non-default team:
非默认Team的Linear配置:
bash <path-to-this-skill>/scripts/init-afk.sh
--tracker linear --linear-team "Design"
--linear-project "Docket phase 1: ingest, feed, reader"
--tracker linear --linear-team "Design"
--linear-project "Docket phase 1: ingest, feed, reader"
bash <path-to-this-skill>/scripts/init-afk.sh
--tracker linear --linear-team "Design"
--linear-project "Docket phase 1: ingest, feed, reader"
--tracker linear --linear-team "Design"
--linear-project "Docket phase 1: ingest, feed, reader"
GitHub board (opt-in; owner/repo inferred from the origin remote):
GitHub看板(可选;owner/repo会从origin远程仓库自动推断):
bash <path-to-this-skill>/scripts/init-afk.sh --tracker github
Defaults: `--tracker linear`, `--linear-team "Engineering"`, `--ready "Ready for Agent"`, `--human "Ready for Human"`, `--ship pr`.
The script is **idempotent**: an existing entry is left untouched unless `--force`.
It edits the JSON with `node` (or `bun`), preserving every other repo's entry.bash <path-to-this-skill>/scripts/init-afk.sh --tracker github
默认参数:`--tracker linear`、`--linear-team "Engineering"`、`--ready "Ready for Agent"`、`--human "Ready for Human"`、`--ship pr`。
该脚本具备**幂等性**:已存在的条目不会被修改,除非使用`--force`参数。它通过`node`(或`bun`)编辑JSON文件,保留其他所有仓库的条目。Interactive use (/afk-setup)
交互式使用(/afk-setup)
When the maintainer runs , do the figuring-out, then call the script:
/afk-setup- Resolve the repo (). If it already has an entry, show it and stop unless they want to change it (
git rev-parse --show-toplevel).--force - Determine the tracker. Linear is the default (team defaults to
); use GitHub only when the maintainer explicitly wants GitHub issues/Projects. For Linear you still need a project (it cannot be inferred): list projects with the Linear MCP (
Engineeringfor the team), then reuse an existing one or create a new project, and confirm with the maintainer. Do not guess a Linear project.list_projects - Confirm the values (tracker, coordinates, statuses, ship mode), then run
with the resolved flags.
init-afk.sh - Read the file back and show the maintainer the entry you wrote.
当维护者触发/afk-setup时,需按以下步骤操作后再调用脚本:
- 解析仓库路径(执行)。如果该仓库已有配置条目,展示条目内容并停止操作,除非用户希望修改(使用
git rev-parse --show-toplevel参数)。--force - 确定跟踪器类型。Linear为默认选项(Team默认值为);仅当维护者明确要求使用GitHub Issues/Projects时才选择GitHub。对于Linear,你仍需指定project(无法自动推断):通过Linear MCP列出该Team的项目(调用
Engineering),然后选择现有项目或创建新项目,并与维护者确认。请勿随意猜测Linear项目。list_projects - 确认配置值(跟踪器、坐标、状态、发布模式),然后使用解析后的参数运行。
init-afk.sh - 读取配置文件并向维护者展示你写入的条目。
Pairs with
关联功能
- calls this in its meta layer, so a new repo is registered as it is created. The default is a Linear board (team
startup); since the Linear project cannot be inferred, startup does not auto-register it. Finish it by runningEngineering(determine the project, reusing or creating one via the Linear MCP). GitHub is used only when explicitly chosen (/afk-setup).--tracker github - /
engineer/triageread the entry this writes; if they find none, they point the user here.reviewer
- 会在元层调用此功能,因此新仓库创建时会自动注册。默认使用Linear看板(Team为
startup);由于Linear项目无法自动推断,startup不会完成自动注册,需通过运行/afk-setup来完成(确定项目,通过Linear MCP选择或创建项目)。仅当明确指定Engineering时才会使用GitHub。--tracker github - /
engineer/triage会读取此功能写入的条目;如果未找到条目,会引导用户查看此文档。reviewer