fabro/test/docs/tutorials/branch-loop/branch-loop.dot
Bryan Helmkamp 2cce052f9f Add DOT docs test suite and fix invalid DOT in docs examples
Extract all 29 full digraph workflows from docs into test/docs/ with
an extraction script, assemble 7 snippet DOTs from reference pages,
and add a runner script for validate/dry-run/haiku/full phases.

Docs fixes:
- definition-of-done: replace multi-word condition values with
  underscored equivalents (parser doesn't support spaces), make
  safe-default edges unconditional for fallback coverage
- semantic-port: make fallback edges unconditional on fetch/analyze
  nodes so validator doesn't reject all-conditional-edge nodes

All 36 DOTs pass `arc validate`.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-06 14:55:56 -05:00

16 lines
829 B
Text

digraph BranchLoop {
graph [goal="Create a Python script that passes its test suite"]
rankdir=LR
start [shape=Mdiamond, label="Start"]
exit [shape=Msquare, label="Exit"]
plan [label="Plan", prompt="Plan a small Python script (fizzbuzz.py) and a test file (test_fizzbuzz.py) using pytest. Describe what you will create.", shape=tab, reasoning_effort="low"]
implement [label="Implement", prompt="Create fizzbuzz.py and test_fizzbuzz.py as planned. Write the files to disk."]
validate [label="Validate", shape=parallelogram, script="python -m pytest test_fizzbuzz.py -v 2>&1 || true"]
gate [shape=diamond, label="Tests passing?"]
start -> plan -> implement -> validate -> gate
gate -> exit [label="Pass", condition="outcome=success"]
gate -> implement [label="Fix"]
}