chief-install

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Install the Chief into the current project.
将Chief安装到当前项目中。

Arguments

参数

The first argument is the target version (branch or tag). Optional.
  • No argument → install the latest stable release (highest semver tag). Find it by running
    git ls-remote --tags https://github.com/thaitype/chief.git
    , strip
    refs/tags/
    , ignore
    ^{}
    entries, and pick the highest semver version.
  • canary
    → latest canary branch (active development, unreleased)
  • v1.0.0
    ,
    v2.0.0
    , etc. → specific tagged version
第一个参数是目标版本(分支或标签),为可选参数。
  • 无参数 → 安装最新稳定版本(最高语义化版本标签)。可通过运行
    git ls-remote --tags https://github.com/thaitype/chief.git
    查找,去除
    refs/tags/
    前缀,忽略
    ^{}
    条目,选择最高的语义化版本。
  • canary
    → 最新的canary分支(活跃开发中,未发布)
  • v1.0.0
    v2.0.0
    等 → 指定的标签版本

Steps

步骤

1. Check for existing installation

1. 检查现有安装情况

Check if the Chief is already installed by looking for these signals:
  1. .agents/agents/chief-agent.md
    exists
  2. .chief/
    directory exists
  3. AGENTS.md
    or
    CLAUDE.md
    at root contains the keyword "Chief" (check file content, not just existence — these files may exist from other setups)
If any of these match → the framework is likely already installed. Warn the user and suggest upgrading instead. Show them:
npx skills@latest add thaitype/chief --skill chief-upgrade
/chief-upgrade
Do NOT proceed unless the user explicitly confirms they want a fresh install.
If none match → proceed.
通过以下信号检查Chief是否已安装:
  1. .agents/agents/chief-agent.md
    文件存在
  2. .chief/
    目录存在
  3. 根目录下的
    AGENTS.md
    CLAUDE.md
    文件内容中包含关键词 "Chief"(需检查文件内容,而非仅判断文件是否存在——这些文件可能来自其他配置)
如果任意一项匹配 → 该框架很可能已安装。向用户发出警告,并建议升级。展示以下内容:
npx skills@latest add thaitype/chief --skill chief-upgrade
/chief-upgrade
除非用户明确确认需要全新安装,否则请勿继续。
如果无一匹配 → 继续执行。

2. Ask coding agent and install mode

2. 询问编码Agent和安装模式

Ask the user:
  1. Which coding agent? — Supported agents:
    claude-code
    ,
    opencode
    ,
    codex
    ,
    cursor
    ,
    copilot
    ,
    gemini-cli
    ,
    amp
    ,
    windsurf
    ,
    kiro
    ,
    aider
  2. Install mode? (relevant for
    claude-code
    and
    copilot
    )
    • link (recommended) — symlinks from agent-specific directory to
      .agents/
    • copy — copies files instead of symlinking
    • On Windows, link mode requires Developer Mode enabled and
      git config --global core.symlinks true
      . If unavailable, suggest copy mode.
    • For all other agents, mode does not affect behavior since they read
      AGENTS.md
      and
      .agents/
      directly
向用户询问:
  1. 使用哪种编码Agent? —— 支持的Agent:
    claude-code
    opencode
    codex
    cursor
    copilot
    gemini-cli
    amp
    windsurf
    kiro
    aider
  2. 安装模式?(与
    claude-code
    copilot
    相关)
    • link(推荐)—— 从Agent特定目录创建符号链接到
      .agents/
    • copy —— 复制文件而非创建符号链接
    • 在Windows系统中,link模式需要启用开发者模式并设置
      git config --global core.symlinks true
      。若无法启用,建议使用copy模式。
    • 对于所有其他Agent,模式不影响行为,因为它们直接读取
      AGENTS.md
      .agents/

3. Clone and run setup script

3. 克隆并运行安装脚本

bash
git clone --depth 1 --branch <version> https://github.com/thaitype/chief.git .chief-agent-tmp
bash .chief-agent-tmp/scripts/setup.sh --agent <agent> --mode <mode>
If the setup script fails completely (non-zero exit code or crashes), skip to step 3b for full manual install. Do NOT run
rm -rf .chief-agent-tmp
yet — it's needed for manual steps.
If the setup script succeeds, proceed to step 4.
bash
git clone --depth 1 --branch <version> https://github.com/thaitype/chief.git .chief-agent-tmp
bash .chief-agent-tmp/scripts/setup.sh --agent <agent> --mode <mode>
如果安装脚本完全失败(非零退出码或崩溃),跳至步骤3b进行完整手动安装。请勿立即运行
rm -rf .chief-agent-tmp
——手动步骤需要用到该目录。
如果安装脚本成功,继续执行步骤4。

3b. Full manual install (fallback if setup script fails)

3b. 完整手动安装(安装脚本失败时的备选方案)

If the setup script failed, perform the entire install manually:
bash
undefined
如果安装脚本失败,手动执行全部安装步骤:
bash
undefined

Core files (source is under template/)

核心文件(源文件位于template/下)

cp -r .chief-agent-tmp/template/.agents .agents cp -r .chief-agent-tmp/template/.chief .chief cp .chief-agent-tmp/template/AGENTS.md AGENTS.md

For `claude-code` only, set up Claude Code integration:

Link mode:
```bash
ln -s AGENTS.md CLAUDE.md
mkdir -p .claude/agents .claude/skills
for f in .agents/agents/*.md; do ln -s "../../$f" ".claude/agents/$(basename "$f")"; done
for d in .agents/skills/*/; do ln -s "../../$d" ".claude/skills/$(basename "$d")"; done
Copy mode:
bash
cp AGENTS.md CLAUDE.md
mkdir -p .claude/agents .claude/skills
cp .agents/agents/*.md .claude/agents/
cp -r .agents/skills/* .claude/skills/
For
copilot
only, set up GitHub Copilot integration:
Link mode:
bash
mkdir -p .github/agents
for f in .agents/agents/*.md; do ln -s "../../$f" ".github/agents/$(basename "$f")"; done
Copy mode:
bash
mkdir -p .github/agents
cp .agents/agents/*.md .github/agents/
For all other agents — no extra steps needed.
For non-
claude-code
agents, ask the user for model names:
  1. Thinking Model (for chief-agent, e.g.
    o3
    ,
    gemini-2.5-pro
    )
  2. Coding Model (for builder/tester/review-plan, e.g.
    gpt-4.1
    ,
    gemini-2.5-flash
    )
Replace
${thinking_model}
with the Thinking Model in chief-agent, and
${coding_model}
with the Coding Model in all other agent files. For
claude-code
, auto-replace with
opus
and
sonnet
(no prompt needed). For
copilot
, update files in
.github/agents/
. For other agents, update files in
.agents/agents/
.
Skip any file or directory that already exists (warn the user).
cp -r .chief-agent-tmp/template/.agents .agents cp -r .chief-agent-tmp/template/.chief .chief cp .chief-agent-tmp/template/AGENTS.md AGENTS.md

仅针对`claude-code`,设置Claude Code集成:

Link模式:
```bash
ln -s AGENTS.md CLAUDE.md
mkdir -p .claude/agents .claude/skills
for f in .agents/agents/*.md; do ln -s "../../$f" ".claude/agents/$(basename "$f")"; done
for d in .agents/skills/*/; do ln -s "../../$d" ".claude/skills/$(basename "$d")"; done
Copy模式:
bash
cp AGENTS.md CLAUDE.md
mkdir -p .claude/agents .claude/skills
cp .agents/agents/*.md .claude/agents/
cp -r .agents/skills/* .claude/skills/
仅针对
copilot
,设置GitHub Copilot集成:
Link模式:
bash
mkdir -p .github/agents
for f in .agents/agents/*.md; do ln -s "../../$f" ".github/agents/$(basename "$f")"; done
Copy模式:
bash
mkdir -p .github/agents
cp .agents/agents/*.md .github/agents/
对于所有其他Agent —— 无需额外步骤。
对于非
claude-code
的Agent,向用户询问模型名称:
  1. 思考模型(用于chief-agent,例如
    o3
    gemini-2.5-pro
  2. 编码模型(用于builder/tester/review-plan,例如
    gpt-4.1
    gemini-2.5-flash
将chief-agent中的
${thinking_model}
替换为思考模型,将所有其他Agent文件中的
${coding_model}
替换为编码模型。对于
claude-code
,自动替换为
opus
sonnet
(无需提示用户)。对于
copilot
,更新
.github/agents/
中的文件。对于其他Agent,更新
.agents/agents/
中的文件。
跳过任何已存在的文件或目录(向用户发出警告)。

4. Verify installation

4. 验证安装

After the setup script or manual install completes, verify that the installation is correct:
  1. Core files exist:
    • .agents/agents/chief-agent.md
    • .agents/agents/builder-agent.md
    • .agents/agents/tester-agent.md
    • .agents/agents/review-plan-agent.md
    • .agents/skills/grill-me/SKILL.md
    • .chief/project.md
    • .chief/_rules/
    • AGENTS.md
  2. Claude Code only (if agent is
    claude-code
    ):
    • CLAUDE.md
      exists (symlink or copy depending on mode)
    • .claude/agents/
      contains entries for all 4 agents
    • .claude/skills/
      contains entry for grill-me
    • If link mode: verify symlinks resolve correctly
  3. Copilot only (if agent is
    copilot
    ):
    • .github/agents/
      contains entries for all 4 agents (symlinks or copies depending on mode)
    • If link mode: verify symlinks resolve correctly
    • Model values have been replaced if the user provided model names
安装脚本或手动安装完成后,验证安装是否正确:
  1. 核心文件存在:
    • .agents/agents/chief-agent.md
    • .agents/agents/builder-agent.md
    • .agents/agents/tester-agent.md
    • .agents/agents/review-plan-agent.md
    • .agents/skills/grill-me/SKILL.md
    • .chief/project.md
    • .chief/_rules/
    • AGENTS.md
  2. 仅针对Claude Code(若Agent为
    claude-code
    ):
    • CLAUDE.md
      存在(根据模式为符号链接或复制文件)
    • .claude/agents/
      包含所有4个Agent的条目
    • .claude/skills/
      包含grill-me的条目
    • 若为link模式:验证符号链接解析正确
  3. 仅针对Copilot(若Agent为
    copilot
    ):
    • .github/agents/
      包含所有4个Agent的条目(根据模式为符号链接或复制文件)
    • 若为link模式:验证符号链接解析正确
    • 若用户提供了模型名称,已替换模型值

5. Fix issues (fallback)

5. 修复问题(备选方案)

If any verification check fails, fix it manually:
  • Missing core file → copy from
    .chief-agent-tmp/template/
    if it still exists, otherwise clone again and copy the specific file
  • Missing CLAUDE.md → create symlink (
    ln -s AGENTS.md CLAUDE.md
    ) or copy depending on mode
  • Missing .claude/ symlinks → create them individually:
    bash
    mkdir -p .claude/agents .claude/skills
    ln -s ../../.agents/agents/<file>.md .claude/agents/<file>.md
    ln -s ../../.agents/skills/<skill> .claude/skills/<skill>
  • Broken symlink → remove and recreate
  • Wrong mode (e.g. user wanted link but got copy) → remove and recreate with correct mode
如果任何验证检查失败,手动修复:
  • 核心文件缺失 → 若
    .chief-agent-tmp
    仍存在,从
    .chief-agent-tmp/template/
    复制;否则重新克隆并复制特定文件
  • CLAUDE.md缺失 → 根据模式创建符号链接(
    ln -s AGENTS.md CLAUDE.md
    )或复制文件
  • .claude/符号链接缺失 → 逐个创建:
    bash
    mkdir -p .claude/agents .claude/skills
    ln -s ../../.agents/agents/<file>.md .claude/agents/<file>.md
    ln -s ../../.agents/skills/<skill> .claude/skills/<skill>
  • 符号链接损坏 → 删除并重新创建
  • 模式错误(例如用户想要link模式但实际为copy模式)→ 删除并以正确模式重新创建

6. Clean up

6. 清理

Ensure
.chief-agent-tmp
is removed:
bash
rm -rf .chief-agent-tmp
确保删除
.chief-agent-tmp
bash
rm -rf .chief-agent-tmp

7. Next steps

7. 后续步骤

Tell the user:
  1. Edit
    .chief/project.md
    with your project details (or run
    chief-agent: use grill-me to help me fill in project.md
    )
  2. Review
    AGENTS.md
    and customize if needed
  3. Start using: ask chief-agent to plan your first milestone
告知用户:
  1. 编辑
    .chief/project.md
    填写项目详情(或运行
    chief-agent: use grill-me to help me fill in project.md
  2. 查看
    AGENTS.md
    并根据需要自定义
  3. 开始使用:请求chief-agent规划第一个里程碑

Important rules

重要规则

  • NEVER overwrite existing files without explicit user approval
  • If the framework is already installed, suggest
    /chief-upgrade
    instead
  • Always clean up
    .chief-agent-tmp
    even if the install is cancelled or fails
  • If the setup script fails, attempt manual fixes before giving up
  • Report all verification results to the user — even successful ones
  • 未经用户明确批准,绝不要覆盖现有文件
  • 如果框架已安装,建议使用
    /chief-upgrade
    进行升级
  • 即使安装被取消或失败,也要始终清理
    .chief-agent-tmp
  • 如果安装脚本失败,在放弃前尝试手动修复
  • 向用户报告所有验证结果——即使是成功的结果