# K-02 — Agent loop + observations
# Category: KEY
# Kapitel: 02 – Anatomie des Coding-Agents
# Anker: Agent-Loop; Observations füllen den Context
# Orientierung: 16:9 landscape
# Didaktik: Jede Handlung ist Tool-Call + Observation; unkontrollierte Dumps starten Context Rot.
# Caption (DE): Der Loop wählt Text oder Tool-Calls; unkontrollierte Observations füllen den Context.
# Ziel-Asset: assets/illustrations/K-02-agent-loop.jpg
# Language: English (Gemini / Imagen)
# Usage: paste entire prompt body below into Gemini

--- PROMPT START ---
Create a clean educational technical flowchart illustration, 16:9 landscape, for a professional practice book about coding agents.

TOPIC: The agent loop — context in, LLM decides, tools execute, observations refill context.

GLOBAL STYLE:
- flat vector flowchart; navy (#0B1F33), teal (#0D9488), amber risk (#D97706), off-white (#F8FAFC), slate
- minimal English labels; print-ready; no mascots; no brand logos

QUALITY GUARDRAILS:
- every visible word correctly spelled English; max ~12 short labels
- never invent long fake logs; use abstract “tool log” icon only

Title text exactly: "The agent loop"

COMPOSITION — central vertical loop:

1) TOP node: rounded rectangle "Context window"
   Inside: three stacked mini-bars labeled "System", "History", "Tool results"
   Make "Tool results" bar thickest and amber-tinted

2) Arrow down to node: "LLM: next action"

3) Branch split:
   - left path: "text only → user"
   - right path: "tool-call(s) → harness"

4) Right path continues to node: "Observation"
   then curved arrow back into Context window labeled "Observation → Context"

5) RIGHT side callout panel titled "Stop conditions" with short checklist chips only:
   - "user turn"
   - "max steps"
   - "done"
   - "approval needed"

6) BOTTOM amber warning strip:
   "Unfiltered tool dumps → context rot"

MOOD: systems teaching figure; clear arrows; high contrast.
ASPECT: 16:9. Strong grayscale readability.
NEGATIVE: no robots, no neon, no brand logos, no real product UI screenshots, no watermarks, no long stack traces as text. Never render prompt meta (no “short chips only”, hex codes, file names) as labels.
--- PROMPT END ---

# Follow-up edit:
# Emphasize Tool results as the thickest bar. Keep Observation → Context loop closed.
# Warning strip must stay: Unfiltered tool dumps → context rot.
