Pipeline overview
Phase detail
Isolation + safety
Telemetry + decisions
Failsafes + recovery
Improvement loop
Agentic delivery pipeline — tier architecture
Trigger layer
GitHub issue → daemon | /pipeline slash command | /pipeline resume
Pipeline orchestrator (tier 0 — inline in VS Code)
MCP tools only · phases · complexity · quality gates · no Bash/Write/Edit
spawn_agent
spawn_agent
spawn_agent
Design orchestrator
Plan · contract · builds
Develop orchestrator
Specialists · merge · gates
Release orch.
Validate · PR
Tier 1
Tier 0
Tier 2
KMP spec.
Explore
KMP spec.
Android
iOS
Merge agent
Backend consult
Review agent
Doc agent
MCP control plane (host — 13 tools)
pipeline_read
write_handoff
update_tracker
record_gap
emit_metric
log_decision
spawn_agent
check_heartbeat
acquire_worktree
release_worktree
init_pipeline
cleanup_pipeline
create_pr
All state on host filesystem · builds run natively (Xcode, Gradle) · OAuth inherited · no Docker
Pipeline execution flow
Phase 0: Complexity assessment
T1 patch
T2 task · T3 feature · T4 epic
Existing artifacts? Skip.
Phase 1: Design
Design orchestrator (spawned, isolated)
HLD (T4 only)
LLD (T3+)
Impl. plan (all)
Contract (KMP)
Autonomous plan quality gate
Build gate: shared → android → iOS
Handoff packet
Phase 2: Implementation
Develop orchestrator (spawned, isolated)
KMP spec.
Android spec.
iOS spec.
Parallel in worktrees
Heartbeat monitoring
Tiered resolution: self → orchestrator → cross-domain → stub
Merge agent
Phase gate: shared → android → iOS
Review validation
Handoff packet
Phase 3: Release
Release orchestrator (spawned, isolated)
Final review
Synthesis doc
Instruction insights
Feature docs
Create PR
Pipeline retrospective
Human reviews PR + retrospective + gaps
Zero human intervention during execution · human at the end only
Isolation and safety model
Orchestrators: MCP-only profile
No Bash · no Write · no Edit · no Read · no Glob · no Grep
Can ONLY interact through pipeline MCP tools · instruction-enforced
Specialists: sandboxed profile
Full Bash/Read/Write/Edit + all MCP tools
Sandbox (macOS Seatbelt)
Writes scoped to worktree + build caches
Permission deny rules
git force-push · branch delete · curl · rm -rf
Git worktree isolation
KMP worktree
feature/.../kmp
Android worktree
feature/.../android
iOS worktree
feature/.../ios
Integration
Merge target
Main / develop / release branches: PROTECTED — no agent writes
Network and credential model
Sandbox: network blocked
Claude API only allowed
OAuth inherited · no keys
Native builds: Xcode · Gradle · Android SDK — on host, in sandbox allowWrite paths
Telemetry and decision audit system
emit_metric → telemetry.jsonl
pipeline.started / .completed
phase.wi.started / .completed / .retried
phase.build_gate (pass/fail)
phase.stuck_detected
phase.cross_domain
phase.amendment
phase.condensation (70/90/exhaust)
phase.context_usage
log_decision → decision-log.jsonl
complexity_assessment
plan_structure · wi_assignment
parallel_group
discovery_resolution (L1-L5)
contract_amendment
retry_decision · stub_decision
build_failure_attribution
merge_conflict · gap_classification
Decision schema
agent · phase · decision_type · criteria[] · options[] · chosen · rationale · confidence
Every judgment logged at the moment it's made — survives crashes
Technical metrics (11)
Completion rate · gap count
First-attempt success · build pass rate
Context usage · stuck detection time
Behavioral metrics (10)
Complexity accuracy · plan stability
Parallelization conflicts · resolution depth
Confidence calibration · stub avoidability
Pipeline retrospective (generated per run)
Execution summary · technical performance · decision quality · top 5 decisions
Instruction insights · gaps · all in PR description
Failsafe and recovery mechanisms
Tiered resolution (no human in the middle)
L1: Self-resolve
L2: Orchestrator
L3: Cross-domain
L4: Best-effort
L5: Gap + stub
Every level resolves or escalates · L4 always proceeds · gaps documented in PR
Stuck detection via heartbeat
Specialists write /tmp/pipeline/.../heartbeat/agent.json every significant action
Orchestrator polls via check_heartbeat MCP tool
Timeout = expected WI duration × 3
Stuck detected
→ Diagnostic check
→ Retry 1
→ Retry 2
Max retries hit
→ record_gap
→ update_tracker STUBBED
→ Continue pipeline
Context condensation protocol
70% capacity → shed discovery histories, log immediately to disk
90% capacity → minimal delegation mode (WI ID + path only)
Exhaustion → write state to disk, pipeline spawns fresh orchestrator
Recovery model
Specialist dies → re-spawn in same worktree (max 2 retries → stub)
Phase orchestrator dies → resume from progress-tracker.json on disk
Pipeline orchestrator dies → /pipeline resume reads artifacts on disk
All state on disk (tracker, handoffs, heartbeats, telemetry) survives any crash
Improvement and evolution loop
Per-run: instruction insights
Review agent analyzes telemetry + decisions
Identifies: retries, escalations, missing rules
Per-run: cross-specialist synthesis
Doc agent produces end-to-end data flow
PR reviewer's primary reference
Pipeline retrospective
Technical metrics + behavioral metrics + decision highlights + instruction insights + gaps
Post-run analysis scripts
telemetry_report.py · decision_report.py · trend_report.py
Trend analysis (across runs)
Rolling averages per metric
Anomaly detection (>2σ deviation)
Per-agent profiling
Which agents retry most?
Which produce most gaps?
Human reviews insights → updates rules / skills / agent definitions
Instruction evolution data captured now · automatic updates deferred (FE-19)
Feedback loop