The Shift from Implementation to Specification
Software engineering is moving toward a model where general-purpose libraries and frameworks are replaced by bespoke implementations generated on-demand. In this paradigm, the "product" is no longer the code implementation, but the abstract specification. By treating the prompt as a platform, engineers can synthesize multiple target-specific implementations from a single, minimal protocol. This approach allows for durable execution systems to be built natively on top of existing infrastructure (like NATS.io) with minimal dependencies.
The Agentic Design Workflow
Directly asking an LLM to jump from an abstract specification to a production-ready implementation often fails because the gap is too large for the model to handle concurrency and failure modes. To succeed, Tornow proposes a multi-stage process:
- Abstract Specification: Define the system without assuming concrete implementation details (e.g., no assumptions about database schemas or consistency models).
- Deterministic Simulation: Use a simulated environment to discover the correct algorithms under partial order and partial failure. This is where the agent acts as the design driver.
- Concrete Specification: Once the algorithm is verified in simulation, derive a concrete specification that makes target-specific decisions (e.g., SQL queries, indices) explicit.
- Concrete Implementation: Generate the final production code from the concrete specification.
Leveraging Deterministic Simulation for Debugging
Agents struggle with distributed systems because production environments hide the causes of failures. Tornow’s approach uses deterministic simulation to provide the agent with "forbidden" information—facts the production code cannot see but the agent needs to understand cause and effect.
For example, when simulating a key-value store, the environment can inject stale reads. While the production algorithm must handle these gracefully without knowing they are stale, the simulation provides the agent with a trace event revealing exactly what the latest value was. This visibility allows the agent to debug why an invariant failed, enabling it to iterate on the design until it is correct. By making the simulation inspectable and repeatable, the agent moves from simply writing code to actively designing robust distributed protocols.