Introduction
What DAI Studio is, what a .dai file is, the Copy-to-LLM loop, and who this site is for.
Docs
- Getting Started
- Your First Diagram
- The Copy-to-LLM Loop
- Choosing Element Types
- Structuring with Nested Groups
- Keeping Your .dai File Current
Getting Started
Your First Diagram
Walk through placing and connecting elements on the canvas and filling in name/fields via the properties panel.
The Copy-to-LLM Loop
Click Copy to LLM in the toolbar to copy the complete .dai XML to the clipboard, then paste it into any LLM or AI agent.
Choosing Element Types
Element types are a vocabulary, not a prescribed mapping — choose whichever types are semantically meaningful for your domain.
Structuring with Nested Groups
bpmn:SubProcess nests freely at any depth; visual hierarchy communicates meaning (e.g. a rule nested inside a persona scopes it to that persona).
Keeping Your .dai File Current
A .dai file is living documentation — add dependencies/issues/risks as they appear, revise rules, invalidate assumptions, delete stale elements.
Blog
How DAI Started
I have spent six years using BPMN as my primary diagramming toolset, creating hundreds of .bpmn files to describe engineering architectures and workflows.
When I decided to test how well LLMs could interpret an uploaded diagram, the accuracy of their understanding genuinely surprised me. The structured format conveyed meaning far better than I expected. While plain .bpmn proved capable, extending the standard yielded even stronger results.
This website was built from a single website.dai file processed through OpenCode. I have not manually edited a single file outside of that .dai file, and the result is exactly what I wanted — nothing more.
When you give LLMs precise, well-structured input, they produce remarkable output. I believe the quality of context matters as much as, if not more than, the model itself.
Cheers,
Ted :)
Generating an Authentication App with DAI Studio
I built an authentication app — dai-studio/ex_auth — using DAI Studio and a single .dai file.
The .dai file describes an environment, a system, and CI/CD. That was the entire input. The total build cost $0.81, and what is checked in is the exact repo — nothing more, nothing less.
This is what DAI Studio is for. You structure your intent precisely, feed it to a model, and get back exactly what you asked for. The discipline is in the context, not the prompting.
Enjoy, Ted :)
DAI File Generation
What if you could generate .dai files from any information source?
The dai.studio/llms.txt file contains the complete file specification and can be used to generate or edit .dai files. Here are some prompts to get started.
DAI from a document
Using https://dai.studio/llms.txt, build a .dai file using the attached document.
DAI from a codebase
Using https://dai.studio/llms.txt, build a .dai file from this codebase.
Here is an example .dai file generated from SuperNova arxiv.org/html/2604.08477v1.
Enjoy, Ted :)
Examples
- AI Workflow — Order Validation
- Product & Software — CSV Export Feature
- Multi-Agent Research Pipeline
- Business Strategy — OKRs, Risks, Decisions
- Self-Referential — This Site’s Content Map
AI Workflow — Order Validation
llms.txt Example 1: context, rule, model, decision gateway and a parallel-enrichment group for validating and routing incoming orders.
Product & Software — CSV Export Feature
llms.txt Example 2: persona, story, requirement, api-endpoint, test and issue modelling a feature end-to-end from user need to known bug.
Multi-Agent Research Pipeline
llms.txt Example 3: a Pipeline Agent orchestrating a Researcher (tool + rule + skill) and a Writer (rule + prompt) sub-agent in sequence.
Business Strategy — OKRs, Risks, Decisions
New example filling the business-types gap: objective with keyResults, risks with mitigations, an ADR, and the stakeholders and assumptions behind a strategic bet.
Self-Referential — This Site’s Content Map
Publishes content-map.dai itself: the about.dai.studio content map, proving the format by using it on its own site.
Download: content-map.dai
This file is generated from the repo root’s content-map.dai, which is the canonical copy. Do not
hand-edit this one directly — regenerate it from the root file instead.
Reference
- The .dai Format
- Namespaces
- Diagram Metadata (dai:workflowMeta)
- Universal Attributes
- Element Types
- Model & Tool Properties (dai:properties)
- Flow & Structure Elements
- Annotations & Data
The .dai Format
A .dai file is BPMN 2.0 XML with a dai: namespace extension layered on top; an abstract tree where SubProcess nests freely. Shows the minimal skeleton.
Namespaces
The six required namespace prefixes every .dai file declares: bpmn, bpmndi, dc, di, dai, xsi.
Diagram Metadata (dai:workflowMeta)
description, defaultModel, targetLanguage, targetFramework and version attributes on the root process’s dai:workflowMeta element.
Universal Attributes
stepType, notes and code — the three attributes available on every typed element.
Element Types
The full typed vocabulary, grouped by domain: AI, Agent, Business, Product, Software.
Covers:
- AI Types — Element types that shape how the AI thinks and acts: the core primitives for building AI workflows.
- Agent (container type) — The autonomous AI container — its capabilities are the elements nested inside it, and it can nest other Agents for multi-agent pipelines.
- Business Types — Element types that document strategy, governance and analysis artefacts.
- Product Types — Element types that document user needs, product structure and discovery artefacts.
- Software Types — Element types that document technical architecture, implementation and quality artefacts.
AI Types
Element types that shape how the AI thinks and acts: the core primitives for building AI workflows.
Covers:
- Context — Background knowledge or grounding data that informs downstream steps. source/format/scope/content. Does not produce output itself.
- Rule — A constraint, policy or business rule the AI must enforce. enforcement is hard/soft/best-effort; rulePriority is critical/high/medium/low.
- Skill — An autonomous capability the AI can invoke when it judges the context appropriate. trigger describes when to apply it; examples shows input/output pairs.
- Tool — A callable function with a concrete implementation in code. language is python/javascript/typescript/shell/sql; returns describes the return value; typed params via dai:properties.
- Prompt — A reusable prompt template: systemPrompt, userPrompt ({{variable}} templating), outputFormat (text/json/markdown/code/list/table), temperature (0-1).
Agent (container type)
The autonomous AI container — its capabilities are the elements nested inside it, and it can nest other Agents for multi-agent pipelines.
Covers:
- Agent — The only AI type expressed as bpmn:SubProcess rather than bpmn:Task. An autonomous AI container: nest tool/skill/rule/prompt children inside it, and nest Agents inside Agents for multi-agent composition. agentRole, agentType, memoryType, maxIterations, stopCondition, outputSchema.
Business Types
Element types that document strategy, governance and analysis artefacts.
Covers:
- Risk — A potential threat: probability/impact (low/medium/high/critical) and a mitigation strategy, with an owner.
- Decision Record — An Architecture Decision Record: status (proposed/accepted/deprecated/superseded), context, decision, consequences.
- KPI — A Key Performance Indicator: numeric target, unit, formula, reporting frequency (daily/weekly/monthly/quarterly/annually).
- Objective — A strategic goal or OKR: keyResults, timeframe (q1/q2/q3/q4/annual), status (draft/active/achieved/missed).
- Stakeholder — A person or organisation with interest/influence (low/medium/high) in the outcome, plus an engagementStrategy.
- Requirement — A business or functional requirement: priority (MoSCoW), status, source, acceptanceCriteria.
- Assumption — A documented assumption the project depends on: status (unvalidated/validated/invalidated), basis, ifWrong, owner.
Product Types
Element types that document user needs, product structure and discovery artefacts.
Covers:
- Persona — A research-based user archetype: role, age, goals, frustrations, behaviours, quote. Connect to Story/Feature/Journey via sequence flows.
- Story — A user story: persona, priority (MoSCoW), status, acceptanceCriteria, storyPoints. notes holds the As a…/I want…/so that… narrative.
- Epic — A large body of work under a strategic theme, grouping multiple features or stories: status, theme, goal, owner.
- Feature — A discrete product capability: status (idea/planned/in-progress/shipped/deprecated), valueStatement, acceptanceCriteria, owner.
- Journey — A user journey map: persona, goal, steps (numbered touchpoint sequence), painPoints, opportunities.
- Experiment — A product experiment or A/B test: hypothesis (We believe that… will result in… because…), audience, successMetric, result, status.
Software Types
Element types that document technical architecture, implementation and quality artefacts.
Covers:
- Dependency — An external library or package: package, version, dependencyType (runtime/dev/peer/optional), license, purpose.
- Model — A data schema or structured type: modelFormat (typescript/json-schema/sql/protobuf/avro/plain). Typed fields via dai:properties.
- Test — A test case: testType (unit/integration/e2e/acceptance/performance/security), testStatus, testSteps, expectedResult, actualResult.
- Issue — A bug or blocker: issueType (bug/enhancement/blocker/question), severity, status, stepsToReproduce, expectedResult, actualResult, assignee.
- API Endpoint — A REST or GraphQL endpoint: method, path, authType, requestBody, responseBody, statusCode, service (connects to a Service element).
- Service — An external or internal service: baseUrl, version, authType. Provides context for the API Endpoint elements that belong to it.
- Component — A UI or software component: componentType (ui/layout/page/hook/utility/service/library), propsInterface.
- Database — A database or data store: engine (postgresql/mysql/sqlite/mongodb/redis/dynamodb/firestore/other), host, schema, accessPattern.
- Event — A domain event in an event-driven system: producer, consumers, broker (kafka/rabbitmq/aws-sns/aws-sqs/gcp-pubsub/redis-pubsub/custom/none), payloadSchema.
Model & Tool Properties (dai:properties)
dai:properties / dai:property child elements define typed fields on model and typed parameters on tool. Supported types: str, int, float, bool, date, datetime, list, dict.
Flow & Structure Elements
The BPMN control-flow vocabulary layered under the typed elements: groups, events, gateways and connections.
Covers:
- Groups (SubProcess) — bpmn:SubProcess is the primary structural tool: nest freely at any depth for containment, scope, domain boundaries or logical clustering.
- Start Events — Plain, message, timer (ISO 8601 timeCycle), conditional (boolean expression) and signal start events.
- Intermediate Events — Plain, message catch/throw, timer catch and signal catch/throw intermediate events.
- End Event — Marks where a workflow path terminates.
- Gateways — Exclusive gateway (decision — exactly one outgoing path) and parallel gateway (fork/join — all outgoing paths taken).
- Sequence Flows — bpmn:SequenceFlow connects elements and controls execution order; an optional name labels the branch (e.g. yes/no, valid/invalid).
Annotations & Data
bpmn:textAnnotation + association for human-readable notes not processed during execution; bpmn:dataStoreReference to document where data is read from or written to.