Read the full writeup →

LangGraph agent · Claude · Python safety checks

A marathon plan that has to pass review

By Jeremy Lee. Tell it your race, goal, current mileage and weeks to go.

ASSESS PLAN ADJUST CRITIQUE REVISE END issues and budget left: revise clean: done

The model drafts the plan; plain Python checks it. critique flags any week that raises mileage more than 20%, a race week above 75% of peak, a long run over 22.5 miles, or a long run longer than the week, and merges that with an LLM review. revise fixes what was flagged and loops back, up to two revisions by default.

One recorded run

Input

Race
Boston
Goal
3:05:00
Weeks to go
16
Current miles / week
22
Longest recent run
9 mi
Days / week
5
Race-day forecast
74°F

Recommended target

3:05 3:20

Agent trace

assess → feasible=False, target 3:20:00, peak 45 mpw
plan → drafted 16 weeks
adjust → tailored plan to course & weather
critique → 5 issue(s): week 5 jumps mileage >20% (23→28)
revise #1 → addressed 5 issue(s)
critique → clean

Verbatim from examples/sample_run.md (status symbols left out). The full 16-week plan is on the writeup page.

The five nodes

Runs from the command line or a Streamlit app that streams each node. Generation uses the Claude CLI by default or the Anthropic API. An evaluation harness (src/eval.py) is written but its results haven't been captured yet.

Code on GitHub Setup and commands