AESOP Build Pipeline — Two Paths

Same outcome, different philosophy

Current Approach
Hand-built orchestration
A for-loop over 7 phases. State tracked in a Python dataclass. Each phase writes its output to the database by hand. Human approval gates use a database flag polled every second.
Why we built it this way
Absolute control, zero dependencies
Every line of orchestration is ours. When something breaks, the stack trace points to our code—not a framework’s internals. No new concepts to learn, no dependency to track, no upgrade surprises. For a small team that knows this codebase cold, that means fast debugging and instant context.
            graph TD
              A[Build Request] --> B[Initialize State]
              B --> C[Phase 0: Fitness]
              C --> D{Fit?}
              D -->|No| E[Reject Build]
              D -->|Yes| F[Phase 1: Gap Analysis]
              F --> G{"Approve?"
  DB polling}
              G -->|No| E
              G -->|Yes| H[Phase 2: Workflow]
              H --> I[Phase 3: Instructions]
              I --> J[Phase 4: Artifacts]
              J --> K[Phase 5: Summary]
              K --> L[Phase 6: Verify]
              L --> M[Complete]

              classDef same fill:#1f1750,stroke:#8a7fba,color:#d0c8e8
              classDef diff fill:#3d1a3a,stroke:#ff2d95,color:#ff8fc7,stroke-width:2.5px
              classDef good fill:#1e2a1a,stroke:#39ff14,color:#7dff5e,stroke-width:2px
              classDef bad fill:#3a1825,stroke:#ff3860,color:#ff6b87,stroke-width:2px
              class A,B,C,F,H,I,J,K,L same
              class D,G diff
              class M good
              class E bad
          
Unchanged phase
Different: HITL gate
Failure
Success
Proposed Approach
LangGraph orchestration
A declared graph of 7 nodes connected by edges. State typed and auto-saved to disk after every step. Human approval pauses the graph itself—no polling. Crashes resume where they left off.
Why we’d adopt it
Resilience we don’t have to build
LangGraph solves three hard distributed-systems problems we currently don’t handle: crash recovery (a 10-minute build survives a server restart), time-travel debugging (replay any phase from any point in history), and auditable state (every step is a typed, serialized checkpoint). These are table-stakes for production AI infrastructure—and they come free with an open standard backed by 32k GitHub stars and enterprise deployments at Uber, LinkedIn, and Klarna.
            graph TD
              A2[Build Request] --> B2[Initialize State]
              B2 --> CK["Auto-save
  checkpoint"]
              B2 --> C2[Phase 0: Fitness]
              C2 --> D2{Fit?}
              D2 -->|No| E2[Reject]
              D2 -->|Yes| F2[Phase 1: Gap Analysis]
              F2 --> G2{"Pause for
  approval"}
              G2 -->|Approve| CK2["Auto-save
  checkpoint"]
              G2 -->|Reject| E2
              CK2 --> H2[Phase 2: Workflow]
              H2 --> I2[Phase 3: Instructions]
              I2 --> J2[Phase 4: Artifacts]
              J2 --> K2[Phase 5: Summary]
              K2 --> L2[Phase 6: Verify]
              L2 --> M2[Complete]

              classDef same fill:#1f1750,stroke:#8a7fba,color:#d0c8e8
              classDef newcap fill:#1a2a3d,stroke:#00d4ff,color:#6be4ff,stroke-width:2.5px
              classDef diff fill:#251a3d,stroke:#8b4dff,color:#c4a8ff,stroke-width:2.5px
              classDef good fill:#1e2a1a,stroke:#39ff14,color:#7dff5e,stroke-width:2px
              classDef bad fill:#3a1825,stroke:#ff3860,color:#ff6b87,stroke-width:2px
              class A2,B2,C2,F2,H2,I2,J2,K2,L2 same
              class CK,CK2 newcap
              class D2,G2 diff
              class M2 good
              class E2 bad
          
Unchanged phase
New: checkpoint
Different: HITL gate
Failure
Success

What changes — and what doesn’t

CapabilityTodayWith LangGraph
Crash recovery Build fails. Restart from scratch. Resumes from last saved step. No data lost. New
Time-travel debugging Not possible. Rerun the whole build. Rewind to any phase, tweak inputs, replay. New
Human approval gates Database flag polled every second Graph pauses. API call resumes it. Simpler
Audit trail DB rows, manually written Every state transition auto-serialized Stronger
Parallel agent execution Manual asyncio.gather Declarative fan-out with partial-failure handling Robust
Prompts & evaluation logic Unchanged. Same prompt files, same scoring formula. Same
LLM provider Unchanged. Same Anthropic/OpenAI/DeepSeek abstraction. Same
Frontend Unchanged. Same SSE event stream, same UI. Same
Database Unchanged. Same Supabase tables, same RLS. Same
Toggle mechanism Admin setting. Per-organization. Default: current. Opt-in
The bet. LangGraph replaces roughly 200 lines of hand-rolled orchestration code. The prompts, the evaluation logic, the LLM calls, the frontend—all untouched. What we gain is infrastructure-scale resilience without having to build it ourselves. The toggle means we can run both pipelines side by side, compare costs and completion rates, and switch only when the data says we should.