electrobun-sdlc

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Electrobun 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 summary

Stage 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.
FromToDocument
Stage 1Stage 2Research Report
Stage 1+2Stage 3Research Report + Architecture Spec
Stage 2+3Stage 4Architecture Spec + Implementation Plan (agent-specific tasks)
Stage 4Stage 5All implemented files (list of paths)
Stage 2+3+4+5Stage 6Arch Spec + Plan + QA Report
Stage 5+6Stage 7QA Report + Test Coverage Summary
Stage 2+3+6+7Stage 8Arch 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阶段 7QA 报告 + 测试覆盖率摘要
阶段 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=1
:
TeamCreate → UI task → wait for UI completion + RPC Contract Handoff → backend task → wait → done
Without teams (sequential subagents):
Dispatch UI subagent → collect handoff → dispatch backend subagent → collect → done
The UI agent produces an RPC Contract Handoff table before finishing:
undefined
开发小组按顺序运行(先 UI,后后端),因为渲染器定义了 RPC 合约。
使用
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
时:
TeamCreate → UI task → wait for UI completion + RPC Contract Handoff → backend task → wait → done
不使用 teams 时(顺序 subagents):
Dispatch UI subagent → collect handoff → dispatch backend subagent → collect → done
UI Agent 在结束前会生成一份 RPC Contract Handoff 表:
undefined

RPC CONTRACT HANDOFF

RPC CONTRACT HANDOFF

Requests (renderer calls bun, expects response)

Requests (renderer calls bun, expects response)

NameArgs TypeResponse TypeShared Type File
getItems{}Item[]src/shared/items-rpc.ts
NameArgs TypeResponse TypeShared Type File
getItems{}Item[]src/shared/items-rpc.ts

Messages (bun pushes to renderer, no response)

Messages (bun pushes to renderer, no response)

NameArgs TypeShared Type File
itemAdded{ item: Item }src/shared/items-rpc.ts
NameArgs TypeShared 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 角色边界

AgentOwnsNever Touches
electrobun-researcherReads everythingWrites nothing
electrobun-architectDesign docs onlySource files
electrobun-plannerPlan doc onlySource files
electrobun-ui-agent
src/<viewname>/
, shared type file
src/bun/
,
electrobun.config.ts
electrobun-backend-agent
src/bun/
,
electrobun.config.ts
src/<viewname>/
electrobun-qa-engineerReads everythingWrites nothing
electrobun-test-writer
kitchen/src/tests/<name>.test.ts
Feature source files
electrobun-alignment-agentAny file with a QA findingFiles with no QA findings
electrobun-docs-agent
docs/
,
*.regression.test.ts
, plan file
Feature source files
Agent负责绝不修改
electrobun-researcher读取所有内容不写入任何内容
electrobun-architect仅负责设计文档源文件
electrobun-planner仅负责计划文档源文件
electrobun-ui-agent
src/<viewname>/
、共享类型文件
src/bun/
、
electrobun.config.ts
electrobun-backend-agent
src/bun/
、
electrobun.config.ts
src/<viewname>/
electrobun-qa-engineer读取所有内容不写入任何内容
electrobun-test-writer
kitchen/src/tests/<name>.test.ts
功能源文件
electrobun-alignment-agent存在 QA 问题的任何文件不存在 QA 问题的文件
electrobun-docs-agent
docs/
、
*.regression.test.ts
、计划文件
功能源文件

Quality Gates

质量门禁

The orchestrator enforces these gates before advancing to the next stage:
GateCondition 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
/electrobun-sdlc <feature description>
— the orchestrator command handles stage dispatch.
For teams: set
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
before starting the session. For sequential mode (default): no environment variable needed.
运行
/electrobun-sdlc <feature description>
——编排器命令负责调度各阶段。
对于 teams 模式:启动会话前设置
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
。 对于顺序模式(默认):无需设置环境变量。

When to Use vs /electrobun-feature

何时使用 vs /electrobun-feature

SituationUse
New complete feature (new views, RPC, docs needed)
/electrobun-sdlc
Quick addition to an existing feature (1-2 files)
/electrobun-feature
Bug fix only
/electrobun-debugger
Just wiring RPC for an existing view
/electrobun-rpc
情况使用
新的完整功能(需要新视图、RPC 和文档)
/electrobun-sdlc
对现有功能进行快速扩展(1-2 个文件)
/electrobun-feature
仅修复缺陷
/electrobun-debugger
仅为现有视图连接 RPC
/electrobun-rpc