symphony-setup
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSymphony Setup
Symphony 搭建指南
Set up Symphony — OpenAI's orchestrator that turns Linear tickets into pull requests via autonomous Codex agents.
搭建Symphony —— OpenAI推出的编排器,可通过自主Codex Agent将Linear工单转换为Pull Request。
Preflight checks
前置检查
Run these checks first and stop if any fail — resolve before continuing:
- — run
codex. Must be installed and authenticated.codex --version - — run
mise. Needed for Elixir/Erlang version management.mise --version - — run
gh. Must be installed AND authenticated. Agents usegh auth statusto create PRs and close orphaned PRs. Silent failure without it.gh - — run
LINEAR_API_KEY. Must persist across sessions (shell config, not justtest -n "$LINEAR_API_KEY" && echo "set" || echo "missing").export - Linear MCP — verify Linear MCP is available. If not, set it up:
- Claude Code:
claude mcp add --transport http linear https://mcp.linear.app/mcp - Codex:
codex mcp add linear --url https://mcp.linear.app/mcp - Other clients: see Linear MCP docs
- Claude Code:
- Git clone auth — the hook runs
after_createunattended. Verify the user's repo clone URL works non-interactively:git clone. HTTPS with password prompts will silently fail. Use SSH keys (no passphrase) or HTTPS with credential helper / token.git clone --depth 1 <url> /tmp/test-clone && rm -rf /tmp/test-clone
Report results to the user before proceeding.
请先运行以下检查,若任意检查失败则停止操作——解决问题后再继续:
- —— 运行
codex。必须已安装并完成身份验证。codex --version - —— 运行
mise。用于管理Elixir/Erlang版本。mise --version - —— 运行
gh。必须已安装且完成身份验证。Agent会使用gh auth status创建PR并关闭孤立PR,若无此工具会静默失败。gh - —— 运行
LINEAR_API_KEY。该密钥需在会话间持久化(配置在shell中,而非仅通过test -n "$LINEAR_API_KEY" && echo "set" || echo "missing"临时设置)。export - Linear MCP —— 确认Linear MCP可用。若不可用,请按以下方式搭建:
- Claude Code:
claude mcp add --transport http linear https://mcp.linear.app/mcp - Codex:
codex mcp add linear --url https://mcp.linear.app/mcp - 其他客户端:查看Linear MCP文档
- Claude Code:
- Git克隆权限 —— 钩子会自动运行
after_create。请验证用户的仓库克隆URL可无交互执行:git clone。带密码提示的HTTPS方式会静默失败,请使用无密码的SSH密钥,或带凭据助手/令牌的HTTPS方式。git clone --depth 1 <url> /tmp/test-clone && rm -rf /tmp/test-clone
在继续操作前,请将检查结果告知用户。
Build Symphony
构建Symphony
Use the fork — easier to get started with:
bash
git clone https://github.com/odysseus0/symphony
cd symphony/elixir
mise trust && mise install
mise exec -- mix setup
mise exec -- mix buildNote: downloads precompiled Erlang/Elixir if available for the platform. If not, it compiles from source — this can take 10-20 minutes. Let the user know before starting.
mise install使用复刻版本 —— 更易快速上手:
bash
git clone https://github.com/odysseus0/symphony
cd symphony/elixir
mise trust && mise install
mise exec -- mix setup
mise exec -- mix build注意:会为对应平台下载预编译的Erlang/Elixir。若平台无预编译版本,则会从源码编译——这可能需要10-20分钟。开始前请告知用户。
mise installPrepare the user's repo
准备用户的代码仓库
Auto-detect as much as possible. Only ask the user to confirm or fill gaps.
尽可能自动检测信息,仅在必要时请用户确认或补充缺失内容。
Auto-detect repo info
自动检测仓库信息
- Repo path — from the current directory. If not in a git repo, ask.
git rev-parse --show-toplevel - Clone URL — . Verify it works non-interactively:
git remote get-url origin.git clone --depth 1 <url> /tmp/test-clone && rm -rf /tmp/test-clone - Setup commands — infer from lockfiles/manifests. Confirm with the user.
- 仓库路径 —— 在当前目录运行。若当前不在git仓库中,请询问用户。
git rev-parse --show-toplevel - 克隆URL —— 运行。请验证该URL可无交互执行:
git remote get-url origin。git clone --depth 1 <url> /tmp/test-clone && rm -rf /tmp/test-clone - 搭建命令 —— 从锁文件/清单中推断。请与用户确认。
Auto-discover Linear project
自动发现Linear项目
Use Linear MCP to list projects. Present the list and let the user pick. The is what goes in WORKFLOW.md's .
slugIdtracker.project_slug使用Linear MCP列出所有项目。将列表展示给用户并让其选择。需填入WORKFLOW.md的字段。
slugIdtracker.project_slugAuto-check and create workflow states
自动检查并创建工作流状态
After the user picks a project, use Linear MCP to check the team's workflow states. Three custom states are required. If any are missing, create them via :
curlbash
curl -s -X POST https://api.linear.app/graphql \
-H "Content-Type: application/json" \
-H "Authorization: $LINEAR_API_KEY" \
-d '{"query": "mutation($input: WorkflowStateCreateInput!) { workflowStateCreate(input: $input) { success workflowState { id name } } }", "variables": {"input": {"teamId": "<team-id>", "name": "<name>", "type": "started", "color": "<color>"}}}'| Name | Color |
|---|---|
| Rework | |
| Human Review | |
| Merging | |
Confirm with the user before creating.
用户选择项目后,使用Linear MCP检查团队的工作流状态。需要三个自定义状态。若缺失任意状态,可通过创建:
curlbash
curl -s -X POST https://api.linear.app/graphql \
-H "Content-Type: application/json" \
-H "Authorization: $LINEAR_API_KEY" \
-d '{"query": "mutation($input: WorkflowStateCreateInput!) { workflowStateCreate(input: $input) { success workflowState { id name } } }", "variables": {"input": {"teamId": "<team-id>", "name": "<name>", "type": "started", "color": "<color>"}}}'| 名称 | 颜色 |
|---|---|
| Rework | |
| Human Review | |
| Merging | |
创建前请与用户确认。
Auto-detect app/UI
自动检测应用/UI
Check whether the project has a launchable UI before asking:
- or
electronin package.json dependencies → Electron appelectron-builder - ,
react-scripts,next,vitein dependencies → web app with dev servernuxt - or
startscript in package.json → likely has a dev serverdev - ,
Procfile→ service with runtimedocker-compose.yml
If detected, propose a skill based on what you find (framework, start script, default port). Confirm with the user and adjust. If nothing detected, ask whether there's a UI — for pure libraries/CLIs/APIs, skip the launch skill.
launch-app在询问用户前,先检查项目是否有可启动的UI:
- package.json依赖中包含或
electron→ Electron应用electron-builder - 依赖中包含、
react-scripts、next、vite→ 带开发服务器的Web应用nuxt - package.json中有或
start脚本 → 通常带有开发服务器dev - 存在、
Procfile→ 带运行时的服务docker-compose.yml
若检测到,请根据发现的内容(框架、启动脚本、默认端口)提议添加 skill。请与用户确认并调整。若未检测到,请询问是否存在UI——对于纯类库/CLI/API项目,可跳过该skill。
launch-appInstall skills and workflow
安装Skill与工作流
Install two things from Symphony into the user's repo:
- Skills — install via skills.sh (agents need these in their workspace clone):
Thebash
cd <user's repo> npx skills add odysseus0/symphony -a codex -s linear land commit push pull debug --copy -yflag is required — symlinks would break in workspace clones. The--copyflag excludes-s(meta-skill, not needed by workers).symphony-setup - — copy the entire file including the markdown body. The prompt body contains the state machine, planning protocol, and validation strategy that makes agents effective.
elixir/WORKFLOW.md
将以下两项从Symphony安装到用户的仓库中:
- Skill —— 通过skills.sh安装(Agent在工作区克隆中需要这些Skill):
bash
cd <user's repo> npx skills add odysseus0/symphony -a codex -s linear land commit push pull debug --copy -y参数是必需的——符号链接会在工作区克隆中失效。--copy参数会排除-s(元Skill,Worker无需使用)。symphony-setup - —— 复制整个文件,包括Markdown正文。提示正文中包含状态机、规划协议和验证策略,这些是Agent高效工作的关键。
elixir/WORKFLOW.md
Patch WORKFLOW.md frontmatter
修补WORKFLOW.md前置内容
Two changes:
需进行两处修改:
1. Project slug
1. 项目Slug
yaml
tracker:
project_slug: "<user's project slug>"yaml
tracker:
project_slug: "<user's project slug>"2. after_create hook
2. after_create钩子
Replace entirely — the default clones the Symphony repo itself:
yaml
hooks:
after_create: |
git clone --depth 1 <user's repo clone URL> .
<user's setup commands, if any>Leave everything else as-is. Sandbox, approval_policy, polling interval, and concurrency settings all have good defaults in the fork.
完全替换默认内容——默认钩子会克隆Symphony自身的仓库:
yaml
hooks:
after_create: |
git clone --depth 1 <user's repo clone URL> .
<user's setup commands, if any>其余内容保持不变。复刻版本中的沙箱、审批策略、轮询间隔和并发设置均已配置合理的默认值。
App launch skill (if applicable)
应用启动Skill(若适用)
If the user's project has a UI or app that needs runtime testing, create in their repo:
.agents/skills/launch-app/SKILL.mdmarkdown
---
name: launch-app
description: Launch the app for runtime validation and testing.
---若用户的项目有需要运行时测试的UI或应用,请在其仓库中创建:
.agents/skills/launch-app/SKILL.mdmarkdown
---
name: launch-app
description: Launch the app for runtime validation and testing.
---Launch App
启动应用
<launch command and any setup steps specific to the user's project>
<how to verify the app is running>
<how to connect for testing — e.g., agent-browser URL, localhost port>
The WORKFLOW.md prompt tells agents to "run runtime validation" for app-touching changes. Without this skill, agents won't know how to launch the app. For non-app repos (libraries, CLIs, APIs), skip this.<针对用户项目的启动命令及相关搭建步骤>
<验证应用是否运行的方法>
<测试连接方式——例如agent-browser URL、本地端口>
WORKFLOW.md中的提示会告知Agent在涉及应用的变更时“运行运行时验证”。若无此Skill,Agent将不知道如何启动应用。对于非应用类仓库(类库、CLI、API),可跳过此步骤。Commit and push
提交并推送
Commit , , and skill (if created) to the user's repo and push. Push is critical — agents clone from the remote, so unpushed changes are invisible to workers.
.agents/skills/WORKFLOW.mdlaunch-appAfter pushing, verify: should show your commit.
git log origin/$(git branch --show-current) --oneline -1将、以及 skill(若已创建)提交到用户的仓库并推送。推送操作至关重要——Agent会从远程仓库克隆代码,未推送的变更对Worker不可见。
.agents/skills/WORKFLOW.mdlaunch-app推送后,请验证:应显示你的提交记录。
git log origin/$(git branch --show-current) --oneline -1Pre-launch: check active tickets
启动前:检查活跃工单
Before starting Symphony, use Linear MCP to list all tickets in active states (, , ). Symphony will immediately dispatch agents for every active ticket — not just new ones.
TodoIn ProgressReworkShow the list to the user and ask if they're comfortable with all of these being worked on. Move anything they're not ready to hand off back to Backlog.
启动Symphony前,使用Linear MCP列出所有活跃状态(、、)的工单。Symphony会立即为所有活跃工单分配Agent——不仅是新工单。
TodoIn ProgressRework请将列表展示给用户,询问是否确认所有工单都可交由Agent处理。将用户尚未准备好移交的工单移回Backlog。
Run
运行Symphony
bash
cd <symphony-path>/elixir
mise exec -- ./bin/symphony <repo-path>/WORKFLOW.md \
--i-understand-that-this-will-be-running-without-the-usual-guardrailsThe guardrails flag is required — Symphony runs Codex agents with sandboxing.
danger-full-accessAdd to enable the Phoenix web dashboard.
--port <port>bash
cd <symphony-path>/elixir
mise exec -- ./bin/symphony <repo-path>/WORKFLOW.md \
--i-understand-that-this-will-be-running-without-the-usual-guardrails--i-understand-that-this-will-be-running-without-the-usual-guardrailsdanger-full-access添加参数可启用Phoenix Web仪表盘。
--port <port>Verify
验证
Have the user push a test ticket to Todo in Linear. Watch for the first worker to claim it. If it fails, run this checklist:
- available in the shell running Symphony?
LINEAR_API_KEY - authenticated?
codex - passing?
gh auth status - Repo clone URL works non-interactively?
- and
.agents/skills/pushed to remote?WORKFLOW.md - Custom Linear states (Rework, Human Review, Merging) added?
请用户在Linear中推送一个测试工单到Todo状态。观察第一个Worker是否认领该工单。若失败,请运行以下检查清单:
- 运行Symphony的shell中是否存在?
LINEAR_API_KEY - 是否已完成身份验证?
codex - 是否通过?
gh auth status - 仓库克隆URL是否可无交互执行?
- 和
.agents/skills/是否已推送到远程仓库?WORKFLOW.md - 是否已添加自定义Linear状态(Rework、Human Review、Merging)?
Getting started after setup
搭建完成后的入门操作
Once Symphony is running, help the user with their first workflows:
Symphony运行后,可帮助用户完成以下初始工作流:
Break down a feature into tickets
将功能拆分为工单
The user has a big feature idea. Use Linear MCP to break it into tickets. For each ticket:
- Clear title and description with acceptance criteria
- Set blocking relationships where order matters
- Assign to the Symphony project so agents can pick them up
- Start with tickets that have no blockers in Todo
若用户有大型功能需求,使用Linear MCP将其拆分为工单。每个工单需包含:
- 清晰的标题和带有验收标准的描述
- 在有顺序要求的地方设置阻塞关系
- 分配到Symphony项目,以便Agent可认领
- 先将无阻塞的工单设置为Todo状态
First run
首次运行
Push a few tickets to Todo and watch. Walk the user through what to expect:
- Idle agents claim tickets within seconds
- Each agent writes a plan as a Linear comment before implementing
- PRs appear on GitHub with the label
symphony - The Linear board updates as agents move tickets through states
推送几个工单到Todo状态并观察。向用户说明预期流程:
- 空闲Agent会在数秒内认领工单
- 每个Agent在实现前会在Linear中写入计划评论
- GitHub上会出现带有标签的PR
symphony - 随着Agent将工单在状态间流转,Linear看板会自动更新
Tune on the fly
实时调整
WORKFLOW.md hot-reloads within ~1 second — no restart needed. Common adjustments:
- — scale up/down based on API limits or repo complexity
agent.max_concurrent_agents - — increase for complex tickets, decrease to limit token spend
agent.max_turns - — how often Symphony checks for new/changed tickets
polling.interval_ms
WORKFLOW.md支持热重载——约1秒内生效,无需重启。常见调整项:
- —— 根据API限制或仓库复杂度增减Agent数量
agent.max_concurrent_agents - —— 复杂工单可增加该值,减少令牌消耗则可降低该值
agent.max_turns - —— Symphony检查新工单/变更工单的频率
polling.interval_ms