{"id":"ftl2-ai-loop-state-file-cross-rule-communication","text":"AI-loop rules can read state populated by other rules via `state._state_file.resources`, enabling cross-rule data flow (e.g., DNS rule reads IP from Linode provisioning rule's state).","truth_value":"IN","source":"entries/2026/05/11/deployments-stargate-rules-ensure_stargate_dns.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{"example":"# From cloudflare-stargate/rules/ensure_stargate_dns.py\n# DNS rule reads IP provisioned by ensure_stargate_linode rule\nasync def action(ftl) -> None:\n    stargate = ftl.state.get(\"_state_file\", {}).get(\"resources\", {}).get(\"stargate\", {})\n    ip = stargate.get(\"ipv4\", [None])[0]\n    await ftl.community.general.cloudflare_dns(\n        zone=\"catbeez18.com\", record=\"stargate\",\n        type=\"A\", value=ip, proxied=False, state=\"present\",\n    )"},"explanation":{"steps":[{"node":"ftl2-ai-loop-state-file-cross-rule-communication","truth_value":"IN","reason":"premise"}]}}