Step 1 of 4
Map the boundaries and define types
Find every place prose crosses into code.
Inventory every model-to-system boundary in my pipeline: tool-call arguments, extraction outputs, classification results, generation outputs consumed by code, and inter-agent messages. For each, define the output type as a schema: precise field types, enums for closed sets, optionality that reflects reality, and field descriptions (they double as generation guidance). Flag the boundaries currently parsed by regex or string-splitting - these are the incident factories and get migrated first. Deliver the boundary inventory with schemas drafted for the top 5.
Expected after this step
A boundary inventory with schemas for the riskiest five.
Should not happen
- ✕Regex scraping of markdown that breaks on every format drift
- ✕Schemas that exist but are not enforced at runtime
- ✕Unbounded repair loops burning tokens on unfixable output
- ✕Silent fallbacks that fabricate data downstream systems trust
Verify before continuing
Do not move on until every check is true. The complete button stays locked until then.
Do not continue if…
- !Regex scraping of markdown that breaks on every format drift
- !Schemas that exist but are not enforced at runtime
- !Unbounded repair loops burning tokens on unfixable output
- !Silent fallbacks that fabricate data downstream systems trust
If the AI messes this up
Use this when the AI fakes progress or breaks the feature. It forces a real fix.
The inventory missed boundaries. Grep the codebase for json.loads, regex on model output, and .split( near LLM calls - each hit is a boundary someone forgot.