parallel-execution-optimizer
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseParallel Execution Optimizer
Parallel Execution Optimizer
Use this skill when speed comes from doing independent work at the same time:
repo inspection, file reads, API checks, browser checks, build/test lanes,
deploy readbacks, or multi-worktree implementation passes.
当速度来自于同时执行独立工作时使用此技能:仓库检查、文件读取、API校验、浏览器检查、构建/测试lanes、部署回读或多worktree实现流程。
Core Pattern
Core Pattern
Turn urgency into a dependency graph before acting.
- Define the objective and done signal.
- Split work into lanes.
- Mark each lane as parallel, sequential, or gated.
- Run independent reads/checks together.
- Keep writes isolated by file, worktree, branch, service, or dataset.
- Merge only after evidence shows the lanes are compatible.
- End with a verification table, not a vague speed claim.
将紧迫性转化为依赖图后再行动。
- 定义目标和完成信号。
- 将工作拆分为lanes。
- 将每个lane标记为并行、串行或 gated。
- 同时运行独立的读取/校验任务。
- 通过文件、worktree、分支、服务或数据集保持写入操作隔离。
- 仅在有证据表明各lane兼容后再合并。
- 以验证表收尾,而非模糊的速度声明。
Lane Matrix
Lane Matrix
Before a large push, write a compact matrix:
text
Lane | Can run in parallel? | Write surface | Risk | Verification
Repo scan | yes | none | low | rg/git status outputs
Backend patch | maybe | src/api | medium | unit tests
Frontend patch | maybe | app/components | medium | browser screenshot
Deploy readback | after build | remote service | high | live URL + logsOnly run lanes in parallel when their write surfaces do not collide.
在大规模推进前,编写一个简洁的矩阵:
text
Lane | Can run in parallel? | Write surface | Risk | Verification
Repo scan | yes | none | low | rg/git status outputs
Backend patch | maybe | src/api | medium | unit tests
Frontend patch | maybe | app/components | medium | browser screenshot
Deploy readback | after build | remote service | high | live URL + logs仅当各lane的写入范围不冲突时,才并行运行它们。
Execution Rules
Execution Rules
- Batch file reads, searches, status checks, and metadata queries.
- Use isolated worktrees for large unrelated implementation lanes.
- Start long-running tests, builds, backfills, and deploys in separate sessions, then poll them deliberately.
- If a lane discovers a blocker that changes the plan, pause dependent lanes and update the matrix.
- Never let a background process outlive the turn unless the user explicitly asked for a continuing service.
- Do not parallelize destructive commands, migrations, writes to the same table, or live customer-impacting deploys without an explicit gate.
- 批量处理文件读取、搜索、状态检查和元数据查询。
- 为大型不相关的实现lanes使用独立的worktrees。
- 在单独会话中启动长时间运行的测试、构建、回填和部署任务,然后主动轮询它们的状态。
- 如果某个lane发现了会改变计划的阻塞项,暂停依赖的lanes并更新矩阵。
- 除非用户明确要求持续服务,否则绝不让后台进程超出当前任务周期。
- 除非有明确的准入控制,否则不要并行执行破坏性命令、迁移、对同一表的写入操作或影响活跃客户的部署。
Output Shape
Output Shape
Use this when reporting:
text
Parallel execution result:
- Lanes run: 5
- Lanes completed: 4
- Blocked lane: deploy readback, waiting on DNS propagation
- Fast path found: batched repo scan + focused tests
- Verification: lint pass, unit pass, live smoke pass报告时使用以下格式:
text
Parallel execution result:
- Lanes run: 5
- Lanes completed: 4
- Blocked lane: deploy readback, waiting on DNS propagation
- Fast path found: batched repo scan + focused tests
- Verification: lint pass, unit pass, live smoke passFailure Modes
Failure Modes
- More concurrency that creates conflicting edits.
- Benchmarking the tool instead of the task.
- Treating "fast" as done before correctness is proven.
- Forgetting to poll running sessions.
- Hiding skipped checks behind a success summary.
- 过多并发导致编辑冲突。
- 基准测试工具而非任务本身。
- 在正确性得到验证前就将“快速”等同于完成。
- 忘记轮询运行中的会话。
- 在成功总结背后隐藏跳过的检查。