Architecting an AI-native workflow — a 5-step playbook in code — step 8 of 9
Write is_ai_native_ready(spec) that returns a dict with:
score: float, fraction of REQUIRED fields present (rounded to 2)missing: list of required field names not in the spechas_explicit_policies: True iff EVERY value inspec.get("policies", {})is a dict (not a string — "ask Sarah" is a string and disqualifies)business_metrics_only: True iffspec.get("metrics", [])contains NONE of these vanity strings:"hours_saved","hours_saved_per_week","engagement","vibes"ready: True iff score >= 0.85 AND has_explicit_policies AND business_metrics_only
Two specs run. Expected output:
{'score': 1.0, 'missing': [], 'has_explicit_policies': True, 'business_metrics_only': True, 'ready': True}
{'score': 0.43, 'missing': ['decisions', 'error_sites', 'success_criteria', 'tacit_knowledge'], 'has_explicit_policies': False, 'business_metrics_only': False, 'ready': False}
⌘↵ runs the editor.read, then continue.
Write is_ai_native_ready(spec) that returns a dict with:
score: float, fraction of REQUIRED fields present (rounded to 2)missing: list of required field names not in the spechas_explicit_policies: True iff EVERY value inspec.get("policies", {})is a dict (not a string — "ask Sarah" is a string and disqualifies)business_metrics_only: True iffspec.get("metrics", [])contains NONE of these vanity strings:"hours_saved","hours_saved_per_week","engagement","vibes"ready: True iff score >= 0.85 AND has_explicit_policies AND business_metrics_only
Two specs run. Expected output:
{'score': 1.0, 'missing': [], 'has_explicit_policies': True, 'business_metrics_only': True, 'ready': True}
{'score': 0.43, 'missing': ['decisions', 'error_sites', 'success_criteria', 'tacit_knowledge'], 'has_explicit_policies': False, 'business_metrics_only': False, 'ready': False}
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.