Why TDL?

TDL was designed to solve specific problems with existing diagram-as-code tools. Here's how it compares.

Token Efficiency

When AI assistants generate diagrams, every token counts. TDL uses 40% fewer tokens than Mermaid for equivalent diagrams.

Comparison: Simple Architecture

Mermaid (47 tokens):

TDL (28 tokens):

@arch
[nodes]
  api:API Gateway
  users:User Service
  orders:Order Service

[edges]
  api->users
  api->orders
  users->orders
Rendered diagram

Designed for AI

TDL's syntax was specifically optimized for AI code generation:

  • Predictable patterns - AI can learn the syntax quickly

  • No escaping edge cases - Simple strings need no quotes

  • Compact representation - More diagram per context window

  • Clear structure - Sections prevent AI from mixing concepts

When to Use TDL

Use TDL when:

  • You want diagrams in version control

  • You're using AI to generate diagrams

  • You need cloud architecture diagrams with icons

  • You want auto-layout (focus on relationships, not positioning)

Consider alternatives when:

  • You need pixel-perfect control (use GUI tools)

  • You need diagram types TDL doesn't support yet

Next Steps

Last updated