Forge Idea Session Report

Deterministic Agent Governance Framework (Blockstate / blockstate)
Target: Python 3.12+ • Mode: Test Whether It Holds Up • Lead: James
BMAD VERIFIED ZERO TRUST AI HARDENED

Locked Decisions & Architectural Invariants

Runtime Ownership & Enclave

Python Owns Transitions (as_tool())

The Python runtime strictly owns statecharts, tool gating, and transitions under the Declarative Control Grammar (@Stage, @Transition, @Guard). Avoids the "Enterprise Island Trap" by operating as a transactional compliance execution enclave for LangGraph, Semantic Kernel, AutoGen, and AWS Bedrock via from blockstate.adapters.langchain import as_tool.

State & Storage Slicing

Two-Tier Memory, Task Stack & StorageBackend SPI

Global SessionState holds cross-flow facts while TaskFrameState is scoped to the active flow with a push/pop TaskStack. Version 1 persistence is sliced to 3 canonical StorageBackend SPI drivers: In-Memory, Local SQLite (WAL mode), and PostgreSQL (async SQLAlchemy), deferring Redis, MS SQL Server, and DynamoDB to v1.2+.

Zero-Trust Boundaries

Pluggable PII Stripper

PII stripping and vault tokenisation is a pluggable, optional interface (PIIStripper protocol supporting local regex/Python, dedicated LLM, or third-party APIs), preserving developer choice.

Low-Latency Execution

System-1 Pass 1 (<100ms)

Pass 1 supports non-autoregressive decision models (such as Jev / TEV / ONNX) and fast SLMs for sub-100ms intent classification and slot routing. Configurable fallback and human-escalation circuit breakers prevent conversational deadlocks.

Static Verification

DCG AST & Lengauer-Tarjan Dominator Proofs

Enforces the Declarative Control Grammar (DCG) (@Stage, @Transition, @Guard) to bypass Rice's Theorem, rejecting dynamic reflection (getattr(self, dynamic_state)()) with [Blockstate E014] and proving mandatory precursor stages (e.g. KYC dominates Payout) via blockstate check and blockstate verify.

Regulatory Ledger

Async Ordered TurnLedger

Every turn emits a structured audit record asynchronously via an ordered queue/event stream keyed by session_id (and local dev traces in .blockstate/traces.jsonl via blockstate trace), guaranteeing non-blocking latency and strict causal ordering for EU AI Act / SOC2 compliance.

Rejected Options & Discarded Paths

Rejected

Automatic Reactive Time-Travel Rewind DAGs (MVP)

Reason: High-risk over-engineering. Automatically rewinding stages risks duplicating external side effects (e.g. re-running payment or reservation APIs). In-stage mutations update in place; cross-stage revisions use explicit stage re-entry routes.

Rejected

Scattering Transitions in Pydantic Validators

Reason: Raising transition exceptions inside model validators fragments the state machine across files, breaking single-point AST inspection and CI/CD compiler verification.

Rejected

Mandatory Global Confirmation Steps

Reason: Enforcing confirmation modals on every turn ruins conversational UX. Kept strictly as an optional decorator feature for destructive actions.

Rejected

Bespoke LLM Provider Wrappers & Full-Estate Orchestrator Replacement

Reason: Avoid reinventing HTTP clients, prompt serialisation, or ripping out existing enterprise orchestrators ("Enterprise Island Trap"). Align model execution on PydanticAI / LiteLLM and expose Blockstate as a verified transactional compliance enclave via as_tool().

The Pressure-Testing Roster

🔒

Vex

Security Engineer

"Challenged the zero-trust PII vault boundary and Pass-1 parser prompt-injection risks."

🏗️

Winston

System Architect

"Architected the push/pop TaskFrame call stack to eliminate statechart $N \times M$ edge explosion."

💻

Amelia

Senior Software Engineer

"Defended developer ergonomics, PydanticAI integration, and static AST graph compiler integrity."

🚢

Dana

The Pragmatist

"Killed the over-engineered automatic rewind DAG and formal logic prover for a clean, lean MVP."

🏦

Marcus Vance

Lead AI Architect, Tier-1 Bank

"Pushed on conversational realities, multi-intent turns, and enterprise audit streaming requirements."

🛡️

Elena Rostova

CISO, InsurTech

"Interrogated outbound prompt exfiltration risks and regulatory record-keeping compliance."