Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Multi-file workspaces

!include <path> splits a large model across files, resolved relative to the including file’s own directory:

// root.dsl
workspace "Enterprise" {
    model {
        !include shop.dsl
        !include billing.dsl
    }
    views { auto }
}
// shop.dsl
shop = softwareSystem "Shop" {
    web = container "Web App"
}

Recommended layout is one file per bounded context or subsystem, plus a root workspace file that just wires them together with !include and declares cross-subsystem relationships. This is also the natural editing unit for an LLM agent: it can load and edit one subsystem file without pulling the whole enterprise model into context, then re-validate just its change.

Parse errors inside an included file report that file’s own path and line number, not the root file’s — so “line 5 of shop.dsl” points exactly where an agent needs to look, even several !include levels deep.

Full runnable example: a root workspace catalog.dsl that !includes two subsystem files from a catalog/ subdirectory and wires a cross-subsystem relationship between them. Note that identifiers declared inside an included file (ordersApi, db, …) are flat, top-level names once included — not accessed as orders.api — so give elements you need to reference from outside their own file a globally unique identifier.