Multi-Target Compilation: The “Prompts as Infrastructure” Proof Point
The Core Insight
Compiling a single YAML chain definition to three different platforms (TypeScript, n8n workflow JSON, LangGraph) is the moment that makes the “prompts as infrastructure” claim tangible. When a developer runs threestratt compile commands and sees the same chain expressed in three different execution environments, the abstraction layer clicks.
What We Learned
The STRATT IR (intermediate representation) layer at@stratt/ir is the key enabler. Every chain is compiled to a platform-agnostic IRProgram first, then to a specific target. This means:
- Adding a new target is a single function:
(IRProgram) => CompileResult - The chain author never thinks about platforms — they write YAML, the IR handles the rest
- Governance (gates, protected agents, failure modes) is preserved in every target output