Skip to main content

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 three stratt 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
In the ATHENA showcase demo, showing TypeScript (with typed step functions and gate guards), n8n (with webhook triggers and IF gate nodes), and LangGraph (with StateGraph and conditional edges) from the same 3-step doc-publish chain was the strongest “infrastructure” signal we tested.

Business Application

This pattern has direct value for platform positioning: STRATT is not “another prompt template library.” It’s a compiler toolchain for agent workflows. The compilation step is what separates infrastructure from a YAML config file — the same way Terraform separates infrastructure-as-code from a JSON config. For sales conversations: “Write it once in YAML, deploy it to any agent framework” is a concrete, demonstrable claim. Run the compile commands live.

Actionable Takeaway

Every council showcase should include the 3-target compile step. It takes 30 seconds to run and is the single most persuasive proof that the governance and composition model isn’t theoretical — it compiles to real, executable code on real platforms.