BPMN for Mermaid
Text-first. Standards-aware. Git-native. Agent-ready.
Two things live in this project. First: bpmn-beta — a text-first DSL for BPMN process diagrams, designed as a Mermaid diagram-type contribution. No XML, no heavyweight tools, no bpmn-js. Second: BP-SKILL — a 15-skill Business Process Agent Skill Suite that uses bpmn-beta as its visual output layer, packaged in the Agent Skills open standard and compatible with Claude Code, OpenAI Codex, GitHub Copilot, Gemini CLI, and Cursor.
What bpmn-beta looks like
The canonical purchase order approval flow — three participants, a gateway, and a rejection path — in 20 lines of text. No XML, no drag-and-drop, no proprietary format.
bpmn-beta accTitle: Purchase Order Approval pool company "Company" { lane requester "Requester" { start s1 "Need Identified" task:user t1 "Submit Purchase Request" } lane manager "Manager" { task:user t2 "Review Request" xor g1 "Approved?" end e2 "Rejected" } lane procurement "Procurement" { task:service t3 "Create Purchase Order" end e1 "PO Issued" } s1 --> t1 t1 --> t2 t2 --> g1 g1 --> t3: "yes" g1 --> e2: "no" t3 --> e1 }
Paste this into the live playground → okhp3.github.io/mermaid-diagram-bpmn
Where to find the project
BP-SKILL
What it is
Skills are the AI analogue of SOPs -- executable, version-controlled, platform-portable instruction sets that auto-activate on semantic match. The Agent Skills open standard (agentskills.io) defines the SKILL.md format. Claude Code, OpenAI Codex, GitHub Copilot, Gemini CLI, Cursor, and VS Code all support it as of May 2026.
The public Agent Skills ecosystem has over 89,000 skills. Zero implement a BABOK knowledge area. BP-SKILL is the first standards-conformant, lifecycle-complete business process agent skill suite.
Why bpmn-beta is the visual output layer, not the whole product
Most process work never reaches the diagram. Discovery, elicitation, stakeholder mapping, narrative documentation, gap analysis, controls definition, SOP generation, RACI matrices, and SIPOC charts all come before the diagram -- and most of them come after it too. bpmn-beta covers the visual modeling step. BP-SKILL covers the lifecycle.
The 15 skills -- grouped by layer
| Layer | Skill | Status |
|---|---|---|
| Discovery | Process Intake & Scope | Core |
| Discovery | Stakeholder & Role Mapping | Core |
| Discovery | Elicitation & Interview Facilitation | Core |
| Narrative | As-Is Process Capture | Core |
| Narrative | Process Narrative Authoring | Core |
| Narrative | Gap & Exception Analysis | Core |
| Narrative | Future-State & Change Strategy | Extension |
| Narrative | Validation & Quality Scoring | Core |
| Visual Modeling | Visual Process Modeling (uses bpmn-beta) | Core |
| Visual Modeling | Decision Model Authoring | Extension |
| Operational | Measures & Controls Definition | Extension |
| Operational | SOP & Work Instruction Generation | Core |
| Governance | RACI & Governance Matrix | Core |
| Governance | SIPOC Generation | Core |
| Publication | Publication & Handoff Packaging | Core |
The standards it aligns to
| Standard | Body | What it governs |
|---|---|---|
| BABOK v3 | IIBA | Elicitation, requirements analysis |
| BPM CBOK v4.0 | ABPMP | Process lifecycle, knowledge areas |
| APQC PCF v7.4 | APQC | Process taxonomy and classification |
| BPMN 2.0.2 | OMG | Visual process notation |
| DMN 1.4 | OMG | Decision model notation |
| ISO 9001:2015 | ISO | Documented information requirements |
| IEEE/ISO/IEC 29148:2018 | IEEE/ISO | Requirements information quality |
Install the suite
curl -L https://okhp3.github.io/mermaid-diagram-bpmn/downloads/bp-skill-suite-v0.3.zip \ -o bp-skill-suite-v0.3.zip && unzip bp-skill-suite-v0.3.zip -d skills/
Or browse individual skills: okhp3.github.io/mermaid-diagram-bpmn/skills →
What's working, what's not
- ✓ Supports core BPMN primitives in the playground — start/end events, tasks, gateways, sequence flows.
- ✓ Uses a hand-written prototype parser (line-by-line, not Langium).
- ✓ Renders SVG directly, with no bpmn-js dependency.
- ⚠ Pool/lane/message-flow support is experimental — verify output in the playground before relying on it.
- ○ Langium grammar, Mermaid External Diagram API packaging, parser validation, and
getStylesintegration are roadmap items — not yet implemented. - ✓ BP-SKILL v0.3 agent skill suite -- 15 SKILL.md files, 9 variable layer templates, Process Narrative Specification schema, eval suite. Compatible with all Agent Skills-conformant platforms.
- ✓ Agent Skills browser -- browsable and downloadable from the playground app at /skills.
- ✓ Full suite download -- bp-skill-suite-v0.3.zip packages all 15 skills and context templates.
The gap Mermaid has always had
The current options
Heavyweight tools (Visio, Signavio, Camunda, bpmn.io) are XML-first and don't live in version control. Mermaid flowcharts resemble BPMN but lack semantic correctness — a process analyst will flag it on sight.
bpmn-beta
Write BPMN as a Markdown code fence. Commit it alongside your code. Let LLMs generate it. Have process analysts read it. Render BPMN-correct shapes without XML, without a graphical editor, without bpmn-js.
What the project does
Mermaid-Native DSL
Starts with bpmn-beta — the diagram type keyword. Reads like every other Mermaid diagram. No boilerplate, no XML, no schema to import.
Pools & Lanes experimental
Pool and lane containment syntax is defined in the DSL spec. Rendering is experimental in the current prototype — verify output in the playground before relying on it.
BPMN 2.0 Correct Shapes
Start/end events, user/service/script/receive/send tasks, XOR/AND/OR gateways — rendered with correct BPMN visual notation, not flowchart approximations. Intermediate events and timer/message/error markers are on the roadmap.
AI-Generatable Syntax
Clean enough for LLMs to produce valid bpmn-beta on first try. Readable enough for non-experts to write directly. No prompt repair loops for syntax errors.
No bpmn-js Dependency
Hand-written SVG renderer produces correct BPMN shapes from scratch. No runtime dependency on bpmn-js — keeps bundle size manageable for Mermaid's contribution bar.
Mermaid Theme Integration
Prototype uses theme-aware SVG styling; full Mermaid getStyles/theme-variable integration is planned for plugin packaging. Theme Builder palettes will apply once the theming hook is wired in.
Playground & DSL Reference
Six-page React app: Home, Playground, DSL Reference, Architecture, Roadmap, and About. Live-parses bpmn-beta and renders the SVG output in-browser.
Open Source, MIT License
Fork it, extend it, propose it upstream. The spec, architecture decisions, and all source are on GitHub. Community feedback shapes the DSL before it locks.
15 Agent Skills -- BP-SKILL Suite
Fifteen SKILL.md files package the full business process lifecycle as portable agent instructions. Compatible with Claude Code, OpenAI Codex, GitHub Copilot, Gemini CLI, and Cursor. Standards-aligned to BABOK v3, BPM CBOK v4.0, APQC PCF v7.4, BPMN 2.0.2, DMN 1.4, and ISO 9001:2015.
Process Narrative Specification
PNS.md is the central handoff artifact that flows through the entire suite. Every skill either reads or enriches it, creating a validated pipeline from discovery through publication. The schema is aligned to ISO 9001 §4.4.1 and IEEE/ISO/IEC 29148.
What this is — and isn't
This is a Mermaid-native BPMN descriptive subset proposal.
- ✓ A readable DSL for the BPMN 2.0 Descriptive Conformance subset — start/end events, tasks, gateways, flows, pools, and lanes.
- ✓ Text-first, Git-native, works inside a Markdown code fence.
- ✓ AI-generatable — designed to be writable by LLMs without syntax repair.
- ✓ The visual output layer of a complete business process documentation methodology (BP-SKILL).
- ✓ A domain extension to the Agent Skills open standard (agentskills.io).
- ✓ Compatible with Claude Code, OpenAI Codex, GitHub Copilot, Gemini CLI, Cursor, VS Code, and all other Agent Skills-conformant platforms.
- ✗ Not executable BPMN — no process engine, no token simulation, no runtime semantics.
- ✗ Not BPMN XML round-tripping — no import or export of BPMN 2.0 XML files.
- ✗ Not full BPMN 2.0 conformance — choreography, conversation, boundary events, transactions, and data objects are out of scope for v1.
- ✗ Not a production Mermaid plugin yet — the upstream contribution path comes after the DSL stabilizes and the Langium parser is built.
- ✗ A replacement for BABOK, BPM CBOK, APQC, or any other body of knowledge -- it references these standards but does not reproduce them.
Where the project is
The prototype validates the core thesis. The next phase closes the gap to a complete External Diagram plugin that can be proposed upstream.
-
✓
Prototype Shipped
Hand-written line parser, heuristic topological layout, hand-written SVG renderer (no bpmn-js), five canonical example diagrams (linear process, gateway decision, pool/lane collaboration, multi-event order, parallel split), six-page React app (Home, Playground, DSL Reference, Architecture, Roadmap, About). Validates the core thesis: a Mermaid-native readable BPMN DSL can render BPMN-correct shapes without bpmn-js.
-
→
v0.1 — Pools, Lanes & Plugin API In Progress
Pools and lanes implementation (required for Descriptive Conformance subset claim), complete v1 element set, port to Mermaid External Diagram API, Langium grammar prototype for the parser. Target: demo-ready for Mermaid community engagement on issue #7699.
-
○
v1.0 — Full Plugin Planned
Langium grammar (replaces hand-written parser), npm publication, accessibility (
accTitle/accDescr+ ARIA metadata), theme integration, full test suite (Vitest), Mermaid PR gates (size <200 KB, tests, docs). -
○
Upstream Proposal Future
Mermaid core PR after v1.0 syntax stabilizes and community feedback from issue #7699 is incorporated. Requires maintainer acceptance, full docs, and a parity test corpus between the hand-written and Langium parsers.
-
✓
BP-SKILL v0.3 -- 15-skill Agent Skill Suite Shipped
15 SKILL.md files, 9 variable layer templates, Process Narrative Specification schema, eval suite, agent skills browser in the React app, full suite download. Proposed domain extension to agentskills.io.
-
○
agentskills.io Formal Submission Planned
Submit BP-SKILL as a formal domain extension proposal to the Agent Skills community governance repository.
-
○
IIBA / ABPMP Practitioner Outreach Planned
Publish BP-SKILL practitioner articles in IIBA and ABPMP community publications to build awareness in the business analysis community.
DSL Reference
The complete bpmn-beta element vocabulary, flow operators, and pool/lane rules. This is the v1 scope — what ships in the initial plugin.
| Keyword | BPMN Element | Shape |
|---|---|---|
| start | Start event (none) | Thin circle |
| end | End event (none) | Thick circle |
| event:message | Message intermediate event [planned] | Circle + envelope |
| event:timer | Timer intermediate event [planned] | Circle + clock |
| event:error | Error end event [planned] | Thick circle + lightning |
| Keyword | BPMN Element | Marker |
|---|---|---|
| task | Abstract task | Rounded rectangle |
| task:user | User task | Person icon |
| task:service | Service task | Gear icon |
| task:script | Script task | Scroll icon |
| task:receive | Receive task | Envelope icon |
| task:send | Send task | Filled envelope icon |
| Keyword | BPMN Element | Marker |
|---|---|---|
| xor | Exclusive (XOR) gateway | Diamond + X |
| and | Parallel (AND) gateway | Diamond + + |
| or | Inclusive (OR) gateway | Diamond + O |
| Operator | Meaning |
|---|---|
| --> | Sequence flow |
| source --> target: "label" | Conditional sequence flow with label |
| ==> | Default sequence flow |
| ~~> | Message flow (cross-pool only, declared at top level) |
| --- | Association (to text annotations) [planned — not yet rendered] |
- Sequence flows (
-->) must stay inside a pool — they cannot cross pool boundaries. - Message flows (
~~>) cross pools and must be declared at the top level, outside any pool block. - Lanes are one level deep. Nested lanes are explicitly deferred to a later version.
- IDs follow the pattern
[A-Za-z_][A-Za-z0-9_]*— short IDs likes1,t1,g1are recommended. - Comments:
%%— follows Mermaid convention.
Boundary events · Event subprocesses · Transactions · Choreography diagrams · Conversation diagrams · BPMN XML import/export · Executable semantics · Multi-instance markers · Compensation · Data objects/stores/groups · Nested lanes deeper than one level.
FAQ
Is this an official Mermaid diagram type?
Not yet. This is an open-source contribution proposal — it ships as an external Mermaid diagram plugin first. Upstream inclusion in Mermaid core requires maintainer acceptance and a formal PR process. The bpmn-beta keyword signals its pre-proposal status.
Will this implement the full BPMN 2.0 spec?
No. v1 targets the BPMN 2.0 Descriptive Conformance subset — the practical elements most business process diagrams actually use. Execution semantics, choreography, conversation diagrams, and BPMN XML import/export are explicitly out of scope and will remain so.
Why not use bpmn.io or bpmn-js?
bpmn-js is XML-first, browser-only in a different sense, and would be a heavyweight runtime dependency that Mermaid maintainers would reject outright. bpmn-beta is text-first, version-controllable, and designed for process diagrams that live next to code in Markdown — not in a graphical editor.
What about the Emrich/DFKI proposal on Mermaid issue #7699?
There's an academic BPMN proposal filed on GitHub by Andreas Emrich (DFKI) with a more XML-flavored DSL. bpmn-beta takes a different position: Mermaid-native readability first. The intent is to engage on that thread constructively, with the prototype as evidence of an alternative readable approach — not to compete or merge prematurely.
Can I render this in GitHub or GitLab today?
Not natively yet. The prototype runs in-browser via Replit. The GitHub/GitLab render path requires the Mermaid External Diagram API plugin, which is the v0.1 milestone target. Until then, use the Playground to render and export SVG output.
Can LLMs generate valid bpmn-beta?
That's by design. The DSL is intentionally short and predictable — no XML attributes, no metadata blocks, no nested namespaces. A well-prompted LLM should produce valid bpmn-beta on the first try for common process patterns. The Playground lets you verify output immediately.
How does this relate to Mermaid Theme Builder?
Mermaid Theme Builder handles visual governance — defining and exporting themes. bpmn-beta adds a diagram type. They're complementary: Theme Builder palettes will apply to bpmn-beta diagrams once the Mermaid theming hook is wired in.
How do I contribute or follow along?
Watch the GitHub repo for updates. Open issues for DSL feedback — syntax decisions are still early enough to change. The decision log in the repo captures what's been locked and what's still open.
Mermaid has flowcharts, sequence diagrams, Gantt charts, entity-relationship diagrams, state diagrams, mindmaps, and more. But if you need to show a business process to a process analyst — accurately, in a way they can read without you explaining your notation — Mermaid has nothing.
BPMN is the standard. It has been since 2004. It has ISO status. It's taught in enterprise architecture programs. And it's conspicuously absent from Mermaid's diagram type library.
bpmn-beta is the bridge. Not the whole spec. Not an XML importer. A readable, Mermaid-native syntax that renders BPMN-correct shapes — the ones people actually use — and fits inside a Markdown code fence.
— OverKill Hill P³ · May 2026