CS 319 · Meeting 9 of 10
Where the profession goes — and the July 2026 layer above loops: graph engineering.
Agenda · 100 min
Reading: chapters 18–19
Core concept · ch 18
NEAR · 2026–27
One foreman per team
3–10 humans + N agents. The foreman is the senior engineer designing loops. ← most of you, next year
MID · 2027–29
One foreman per project
Several loops in parallel; escalation only at four high-leverage moments (ch 13).
FAR
The AI manager is an agent
Humans define strategic context, ethics, the quality bar. Meta-decisions only.
Skills that compound across all three
Loop design · spec writing · verifier discipline · council pattern · context engineering · the managerial mindset. Deprecating: typing code, memorizing syntax, hand-debugging boilerplate.
The moment · ch 19
Peter Steinberger — whose quote opens our textbook — asked on X: "Are we still talking loops or did we shift to graphs yet?"
Within days: a mock-eulogy ("Loop Engineering is dead. Long live Graph Engineering!"), the metaphor that stuck — "agents are graduating from while-loops to org charts" — and skeptics calling it a rebrand. No new capability shipped that week. Only a name for a design problem teams already had: one loop no longer being the right shape for the work.
The five-layer stack (where this course lives)
cumulative: weak nodes make a weak org — M1–M8 are the layers under tonight's topic
Vocabulary · ch 19
Nodes
Specialized agents or deterministic steps. One job each. "Steps I could inline" are not nodes.
Edges
Routing: straight · conditional · fan-out · fan-in. Drawn before they're coded.
Shared state
The object traveling the edges — task, notes, draft, verdict. State is what makes it a system, not a group chat.
The key identity
A loop is a one-node graph with an edge back to itself. Everything from M1–M7 lives inside one node. You never graduate from loops to graphs — you compose loops into graphs.
The discriminator
"The difference is who decides the path, the agent or you." Loop: agent picks its route to your bar. Graph: you declare the valid paths and checks.
Judgment · ch 19
| Signal | Loop is enough | Reach for a graph |
|---|---|---|
| Shape | one job, clear finish line | splits into specialties that hand off |
| Parallelism | sequential | fan-out, then a join |
| Tools/models per step | same throughout | different model or toolset per step |
| Control flow | agent can free-roam safely | explicit, auditable routing |
| Failure isolation | bad step retries | one node fails without poisoning the rest |
| The verifier | one check, one thing | overloaded: judging correctness+tone+safety+completeness at once |
The last row is the sleeper: an overloaded verifier's fix is not a longer prompt — it's a separate reviewer node. The smallest honest graph is a dedicated reviewer node. Half of "I need a graph" is a weak verifier in disguise — strengthen the verifier, stay in the loop.
The migration path · and the honesty test
1 keep the loop — it's node one
2 split off the failing step (almost always the reviewer)
3 write what node one hands node two — the state schema is the real work
4 fan-out only where you already iterate over N things
5 stop when the next node stops paying
Gut check: 4 questions
0–1 yes: a loop wearing a graph diagram. 2–3: genuinely composing. 4: paradigm shift — and the work demanded it.
Intellectual honesty · required
Harrison Chase (built LangGraph): "it's basically just langgraph?" — when the reference implementation's author isn't sure the word names anything new, register that.
David Khourshid (XState): directed graphs of states and transitions are decades-old CS.
@PawelHuryn: mechanisms (loops, graphs) are the wrong level — objectives and verification are the substance.
The filter this course runs: teams genuinely escalating to coordinated nodes? Yes. Picking nodes/edges/state a distinct skill? Yes. The word new, load-bearing, slop-free? No. — The label is optional. The escalation is real. Frameworks (LangGraph, ADK, MS Agent Framework) sell the boring infrastructure: checkpointing, resumability, HITL primitives. Hand-roll while small; import when faking those costs more.
Case study · part 9 of 10
Week 11. Three loops running: triage, dependencies, digest. The digest loop kept failing — its verifier was judging completeness, tone, and invoice-number correctness at once (signal 6), and the researcher step was reading five sources one at a time (signal 2).
They ran the gut check: 3 yeses. Migration, five moves: digest loop becomes node one → reviewer split out (fresh context, read-only, different model) → state schema written — notes: list[Claim{source, quote}], the part the diagrams skip → researcher fans out ×5 → stop. Two nodes + one fan-out. No framework — a script and a queue.
Rasa's line for the retro: "We didn't upgrade our agent. We drew the arrow that was already there."
Clinic + kickoff · 30 minutes
Pairs · 15'
Swap A6 loop descriptions. Run the four-question gut check on your partner's system — be the skeptic. Verdict: loop wearing a diagram, genuine composition, or paradigm shift? Which signal fired, if any?
Capstone kickoff · teams of 2 · 15'
Pick your capstone org (student club, family business, your own team, or extend Kirana). Skim the Meeting 10 deck together. One decision tonight: whose verifier is cheapest? — that's your first loop.
Assignment A9 · capstone kickoff · due at Meeting 10
Part 1 — three-column audit
Every loop you ran this semester (including abandoned ones). Columns: loop · last landed outcome + date · queue at the human gate. Apply the standing rule to the bottom of the list: kill, defer, or ship. No prompt tuning.
Part 2 — graph design
For your capstone org: draw the napkin — nodes, edges, state object, the one conditional loop-back, where the human gate sits. Run your own gut check. Write the one-breath explanation.
Rubric
Audit honesty (dead loops named dead) 50% · napkin quality + gut-check self-verdict 30% · one-breath explanation 20%.
Next: capstone day. Bring the playbook, the audit, and the napkin.