implement-spec
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseYou have been provided a spec. This spec should have tickets associated with it, describing how to implement the spec.
The goal is a PR which implements the entire spec on a single branch.
The tickets are not a list of steps. They are a task graph with blocking relationships between them. This means there is always a frontier of tickets which are ready to be grabbed.
Communication to and from subagents should be sparse. Communicate primarily through context pointers: to the spec, tickets, research notes, and previous commits. Don't duplicate information already available via pointers.
Implementer subagents should be run in the background where possible for maximum concurrency.
已为你提供一份规范。该规范应关联有相关工单,描述如何实现此规范。
目标是在单个分支上提交一个实现完整规范的PR。
这些工单并非步骤列表,而是带有阻塞关系的task graph(任务图)。这意味着始终存在一批可随时处理的**frontier(前沿)**工单。
与subagents(子代理)之间的通信应尽量精简。主要通过上下文指针进行沟通:指向规范、工单、研究笔记以及之前的提交记录。请勿重复已可通过指针获取的信息。
尽可能让Implementer subagents(实现子代理)在后台运行,以实现maximum concurrency(最大并发)。
Steps
步骤
-
Read the spec and tickets. Read enough to understand the task graph.
-
(optional) Use an exploration subagent to conduct any exploration required by the tickets - relevant codebase files or external documentation. Ensure the exploration subagent can save files - it should save its markdown notes in a directory outside the repo, accessible by all future subagents. This lets implementer subagents focus on implementation rather than exploration.
-
Create a branch, and a draft PR. The PR should be marked as 'closing' the spec issue and tickets.
-
Use implementer subagents to implement each ticket. Each implementer subagent should work in its own worktree, on its own branch.
-
Once an implementer subagent completes, merge its work to the PR branch with a merger subagent.
-
If this changes the frontier of available tickets, kick off more implementer subagents to work on the new tickets. This allows for maximum concurrency.
-
Once all tickets are complete, run /code-review on the PR branch. Fix all issues raised by the code review in a single implementer subagent.
-
Mark the PR as ready for review.
-
Clean up all implementer subagent worktrees.
- 阅读规范和工单,充分理解任务图。
2.(可选)使用exploration subagent(探索子代理)完成工单所需的任何探索工作——例如查看相关代码库文件或外部文档。确保探索子代理能够保存文件——它应将markdown笔记保存在仓库外的一个目录中,供所有后续子代理访问。这样可以让实现子代理专注于实现工作,而非探索。
-
创建一个分支和一个草稿PR。该PR应标记为“关闭”规范相关的议题和工单。
-
使用实现子代理完成每个工单的实现。每个实现子代理应在自己的worktree(工作区)和分支上工作。
-
当一个实现子代理完成工作后,使用**merger subagent(合并子代理)**将其工作合并到PR分支。
-
如果这一操作改变了可处理工单的前沿,则启动更多实现子代理来处理新的工单。以此实现最大并发。
-
所有工单完成后,在PR分支上运行/code-review命令。在单个实现子代理中修复代码评审提出的所有问题。
-
将PR标记为可评审状态。
-
清理所有实现子代理的工作区。