Why schemas eat prompts — the boundary contract pattern — step 7 of 8
Write audit_boundaries(system) that takes a system profile
(dict) and returns a dict with two fields:
score: integer 0-100, higher means MORE boundaries are guarded by a schema + validatorverdict: string, one of:"hardened"if score >= 75"mostly-safe"if score >= 50"leaky"if score >= 25"trust-everything"if score < 25
Score the system on FOUR trust-boundary signals. Each True
adds 25 points:
validates_model_output: schema check on every LLM responsevalidates_user_input: schema check on every inbound HTTP bodyvalidates_external_api_returns: schema check on every 3rd-party API responsevalidates_db_reads: schema check on rows coming OUT of the database (yes — even your own DB is a trust boundary if a different team writes to it)
Two systems run. Expected output:
GuardedApp: {'score': 100, 'verdict': 'hardened'}
YOLOService: {'score': 25, 'verdict': 'leaky'}
⌘↵ runs the editor.read, then continue.
Write audit_boundaries(system) that takes a system profile
(dict) and returns a dict with two fields:
score: integer 0-100, higher means MORE boundaries are guarded by a schema + validatorverdict: string, one of:"hardened"if score >= 75"mostly-safe"if score >= 50"leaky"if score >= 25"trust-everything"if score < 25
Score the system on FOUR trust-boundary signals. Each True
adds 25 points:
validates_model_output: schema check on every LLM responsevalidates_user_input: schema check on every inbound HTTP bodyvalidates_external_api_returns: schema check on every 3rd-party API responsevalidates_db_reads: schema check on rows coming OUT of the database (yes — even your own DB is a trust boundary if a different team writes to it)
Two systems run. Expected output:
GuardedApp: {'score': 100, 'verdict': 'hardened'}
YOLOService: {'score': 25, 'verdict': 'leaky'}
this step needs the editor
on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.