electrobun-sdlc
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseElectrobun SDLC Pipeline
Electrobun SDLC 流水线
Full 8-stage agent pipeline for building complete, tested, documented Electrobun features. Each stage has a dedicated specialist agent. Output from each stage is the input to the next.
完整的 8 阶段 Agent 流水线,用于构建完整、经过测试且配有文档的 Electrobun 功能。每个阶段都有专门的专家 Agent。上一阶段的输出即下一阶段的输入。
Pipeline Overview
流水线概览
┌──────────────────────────────────────────────────────────────────────┐
│ /electrobun-sdlc <feature> │
│ Orchestrator (main Claude) │
└──┬───────────────────────────────────────────────────────────────────┘
│
▼ Stage 1 ─────────────────────────────────────────────────────────
electrobun-researcher
→ Explores codebase + API surface
→ Output: Research Report (files, patterns, risks, unknowns)
│
▼ Stage 2 ─────────────────────────────────────────────────────────
electrobun-architect
→ Receives Research Report
→ Output: Architecture Spec (scope, blast radius, RPC flow, types, config skeleton)
│
▼ Stage 3 ─────────────────────────────────────────────────────────
electrobun-planner
→ Receives Research Report + Architecture Spec
→ Output: Implementation Plan (atomic tasks, agent assignments, acceptance criteria)
│
▼ Stage 4 ─────────────────────────────────────────────────────────
DEV SQUAD (parallel if teams enabled)
electrobun-ui-agent ← renderer files, HTML, Electroview RPC
electrobun-backend-agent ← bun files, BrowserView.defineRPC, config
→ Output: Implemented files
│
▼ Stage 5 ─────────────────────────────────────────────────────────
electrobun-qa-engineer
→ Audits all implemented code vs spec + plan
→ Output: QA Report (BLOCKER / IMPORTANT / MINOR findings, blast radius audit)
│
▼ Stage 6 ─────────────────────────────────────────────────────────
electrobun-test-writer
→ Writes golden-outcome tests (ideal behavior, not fitting current code)
→ Uses Kitchen Sink defineTest() framework
→ Output: Test file + coverage summary
│
▼ Stage 7 ─────────────────────────────────────────────────────────
electrobun-alignment-agent
→ Fixes all QA findings in severity order (BLOCKER → IMPORTANT → MINOR)
→ Corrects blast radius drift (forgotten files, unplanned changes)
→ Output: Alignment Report (what was fixed, what remains)
│
▼ Stage 8 ─────────────────────────────────────────────────────────
electrobun-docs-agent
→ Writes Mintlify MDX documentation
→ Writes regression tests
→ Marks implementation plan as ✅ COMPLETE
→ Output: Docs page, regression test file, completion summary┌──────────────────────────────────────────────────────────────────────┐
│ /electrobun-sdlc <feature> │
│ Orchestrator (main Claude) │
└──┬───────────────────────────────────────────────────────────────────┘
│
▼ Stage 1 ─────────────────────────────────────────────────────────
electrobun-researcher
→ Explores codebase + API surface
→ Output: Research Report (files, patterns, risks, unknowns)
│
▼ Stage 2 ─────────────────────────────────────────────────────────
electrobun-architect
→ Receives Research Report
→ Output: Architecture Spec (scope, blast radius, RPC flow, types, config skeleton)
│
▼ Stage 3 ─────────────────────────────────────────────────────────
electrobun-planner
→ Receives Research Report + Architecture Spec
→ Output: Implementation Plan (atomic tasks, agent assignments, acceptance criteria)
│
▼ Stage 4 ─────────────────────────────────────────────────────────
DEV SQUAD (parallel if teams enabled)
electrobun-ui-agent ← renderer files, HTML, Electroview RPC
electrobun-backend-agent ← bun files, BrowserView.defineRPC, config
→ Output: Implemented files
│
▼ Stage 5 ─────────────────────────────────────────────────────────
electrobun-qa-engineer
→ Audits all implemented code vs spec + plan
→ Output: QA Report (BLOCKER / IMPORTANT / MINOR findings, blast radius audit)
│
▼ Stage 6 ─────────────────────────────────────────────────────────
electrobun-test-writer
→ Writes golden-outcome tests (ideal behavior, not fitting current code)
→ Uses Kitchen Sink defineTest() framework
→ Output: Test file + coverage summary
│
▼ Stage 7 ─────────────────────────────────────────────────────────
electrobun-alignment-agent
→ Fixes all QA findings in severity order (BLOCKER → IMPORTANT → MINOR)
→ Corrects blast radius drift (forgotten files, unplanned changes)
→ Output: Alignment Report (what was fixed, what remains)
│
▼ Stage 8 ─────────────────────────────────────────────────────────
electrobun-docs-agent
→ Writes Mintlify MDX documentation
→ Writes regression tests
→ Marks implementation plan as ✅ COMPLETE
→ Output: Docs page, regression test file, completion summaryStage Handoffs
阶段交接
Each stage produces a document that the orchestrator passes to the next stage verbatim. Never have agents read each other's files — the orchestrator is the courier.
| From | To | Document |
|---|---|---|
| Stage 1 | Stage 2 | Research Report |
| Stage 1+2 | Stage 3 | Research Report + Architecture Spec |
| Stage 2+3 | Stage 4 | Architecture Spec + Implementation Plan (agent-specific tasks) |
| Stage 4 | Stage 5 | All implemented files (list of paths) |
| Stage 2+3+4+5 | Stage 6 | Arch Spec + Plan + QA Report |
| Stage 5+6 | Stage 7 | QA Report + Test Coverage Summary |
| Stage 2+3+6+7 | Stage 8 | Arch Spec + Plan + Test Summary + Alignment Report |
每个阶段都会生成一份文档,编排器将其原样传递给下一阶段。绝不能让 Agent 读取彼此的文件——编排器充当传递者。
| 来源 | 到 | 文档 |
|---|---|---|
| 阶段 1 | 阶段 2 | 研究报告 |
| 阶段 1+2 | 阶段 3 | 研究报告 + 架构规格 |
| 阶段 2+3 | 阶段 4 | 架构规格 + 实施计划(Agent 专属任务) |
| 阶段 4 | 阶段 5 | 所有已实现文件(路径列表) |
| 阶段 2+3+4+5 | 阶段 6 | 架构规格 + 计划 + QA 报告 |
| 阶段 5+6 | 阶段 7 | QA 报告 + 测试覆盖率摘要 |
| 阶段 2+3+6+7 | 阶段 8 | 架构规格 + 计划 + 测试摘要 + 对齐报告 |
Dev Squad Coordination (Stage 4)
开发小组协调(第 4 阶段)
The dev squad runs in sequence (UI first, then backend) because the renderer defines the RPC contract.
With :
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1TeamCreate → UI task → wait for UI completion + RPC Contract Handoff → backend task → wait → doneWithout teams (sequential subagents):
Dispatch UI subagent → collect handoff → dispatch backend subagent → collect → doneThe UI agent produces an RPC Contract Handoff table before finishing:
undefined开发小组按顺序运行(先 UI,后后端),因为渲染器定义了 RPC 合约。
使用 时:
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1TeamCreate → UI task → wait for UI completion + RPC Contract Handoff → backend task → wait → done不使用 teams 时(顺序 subagents):
Dispatch UI subagent → collect handoff → dispatch backend subagent → collect → doneUI Agent 在结束前会生成一份 RPC Contract Handoff 表:
undefinedRPC CONTRACT HANDOFF
RPC CONTRACT HANDOFF
Requests (renderer calls bun, expects response)
Requests (renderer calls bun, expects response)
| Name | Args Type | Response Type | Shared Type File |
|---|---|---|---|
| getItems | {} | Item[] | src/shared/items-rpc.ts |
| Name | Args Type | Response Type | Shared Type File |
|---|---|---|---|
| getItems | {} | Item[] | src/shared/items-rpc.ts |
Messages (bun pushes to renderer, no response)
Messages (bun pushes to renderer, no response)
| Name | Args Type | Shared Type File |
|---|---|---|
| itemAdded | { item: Item } | src/shared/items-rpc.ts |
| Name | Args Type | Shared Type File |
|---|---|---|
| itemAdded | { item: Item } | src/shared/items-rpc.ts |
Shared Type File Path
Shared Type File Path
src/shared/items-rpc.ts
The orchestrator passes this handoff verbatim to the backend agent.src/shared/items-rpc.ts
编排器将此交接内容原样传递给后端 Agent。Agent Role Boundaries
Agent 角色边界
| Agent | Owns | Never Touches |
|---|---|---|
| electrobun-researcher | Reads everything | Writes nothing |
| electrobun-architect | Design docs only | Source files |
| electrobun-planner | Plan doc only | Source files |
| electrobun-ui-agent | | |
| electrobun-backend-agent | | |
| electrobun-qa-engineer | Reads everything | Writes nothing |
| electrobun-test-writer | | Feature source files |
| electrobun-alignment-agent | Any file with a QA finding | Files with no QA findings |
| electrobun-docs-agent | | Feature source files |
| Agent | 负责 | 绝不修改 |
|---|---|---|
| electrobun-researcher | 读取所有内容 | 不写入任何内容 |
| electrobun-architect | 仅负责设计文档 | 源文件 |
| electrobun-planner | 仅负责计划文档 | 源文件 |
| electrobun-ui-agent | | |
| electrobun-backend-agent | | |
| electrobun-qa-engineer | 读取所有内容 | 不写入任何内容 |
| electrobun-test-writer | | 功能源文件 |
| electrobun-alignment-agent | 存在 QA 问题的任何文件 | 不存在 QA 问题的文件 |
| electrobun-docs-agent | | 功能源文件 |
Quality Gates
质量门禁
The orchestrator enforces these gates before advancing to the next stage:
| Gate | Condition to advance |
|---|---|
| After Stage 5 (QA) | QA Report received. BLOCKER count reviewed by orchestrator. |
| After Stage 6 (Tests) | Test file written and coverage summary reviewed. |
| After Stage 7 (Alignment) | All BLOCKERs marked resolved in Alignment Report. |
| After Stage 8 (Docs) | Plan marked ✅ COMPLETE. Completion summary received. |
If QA finds BLOCKERs that suggest the Architecture Spec itself was wrong (not the implementation), escalate to the human before alignment.
编排器在进入下一阶段前会强制执行以下门禁:
| 门禁 | 推进条件 |
|---|---|
| 阶段 5(QA)之后 | 已收到 QA 报告,且编排器已审查 BLOCKER 数量。 |
| 阶段 6(测试)之后 | 测试文件已编写完成,且覆盖率摘要已审查。 |
| 阶段 7(对齐)之后 | 对齐报告中的所有 BLOCKER 均已标记为已解决。 |
| 阶段 8(文档)之后 | 计划已标记为 ✅ COMPLETE,且已收到完成摘要。 |
如果 QA 发现的 BLOCKER 表明问题出在架构规格本身而非具体实现上,则应在对齐阶段前升级给人工处理。
Triggering the Pipeline
触发流水线
Run — the orchestrator command handles stage dispatch.
/electrobun-sdlc <feature description>For teams: set before starting the session.
For sequential mode (default): no environment variable needed.
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1运行 ——编排器命令负责调度各阶段。
/electrobun-sdlc <feature description>对于 teams 模式:启动会话前设置 。
对于顺序模式(默认):无需设置环境变量。
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1When to Use vs /electrobun-feature
何时使用 vs /electrobun-feature
| Situation | Use |
|---|---|
| New complete feature (new views, RPC, docs needed) | |
| Quick addition to an existing feature (1-2 files) | |
| Bug fix only | |
| Just wiring RPC for an existing view | |
| 情况 | 使用 |
|---|---|
| 新的完整功能(需要新视图、RPC 和文档) | |
| 对现有功能进行快速扩展(1-2 个文件) | |
| 仅修复缺陷 | |
| 仅为现有视图连接 RPC | |