export_diagram
Exports the current project to a standard, portable text format (anti-lock-in: the diagram goes to GitHub, GitLab, Notion, a Mermaid editor, a doc...). org / entity / data-source / arch / process / journey → Mermaid (.mmd, rendered natively by GitHub/Notion). captable → Markdown (.md: holders table with %, funding rounds table, + a Mermaid pie chart of the shares). The 'kind' parameter is optional — by default the project's dominant kind. The 'format' parameter is optional too and opens the SPREADSHEET outputs: format='csv' gives, for captable, the holders table (name, type, security, round, shares, % of capital, price per share, amount invested) AND the rounds table in two files — this is what an accountant or a lawyer expects, who read neither Mermaid nor Markdown; for org, a roster block × path × person × role × % ready for an HRIS; for journey, the table phases × steps × emotion × channel × owner; for process, the steps IN EXECUTION ORDER × lane × performer × duration × SLA × cost per case × bottleneck × compliance × successors (with their condition). ⚠️ BPMN 2.0 XML does NOT exist and is not planned: the model has no pools, so a message flow would have no valid place in it: no BPMN export, even an approximate one, is produced. Read-only: it does not modify the schema. The produced FILE(S) are delivered in 'artifacts' (the user has Copy and Download buttons there): no need to copy them into the reply. The result carries in clear the format, the extension, the number of blocks and 'availableFormats' (the other outputs possible for this type, with their audience). ⚠️ 'warnings' lists WHAT THE FILE DOES NOT CARRY, and only for the dimensions this project really holds (e.g. "The Mermaid format does not carry the people assigned to blocks (4 in this project)."). When it is not empty, it is meant for the user, in one sentence; 'availableFormats' names the format that carries the missing dimension if one exists — a Mermaid org chart loses the assignments, the CSV roster carries them. Empty: there is nothing to report. ⚠️ ONE WAY: no tool re-imports these outputs. A ROUND TRIP (export to a repository, edit there, feed back) goes through export_data_model / import_data_model (kind='entity': 'dbml', 'sql-postgres', 'json-schema') or export_arch_diagram / import_arch_diagram (kind='arch': 'mermaid-c4', 'plantuml-c4'). org, process, journey, captable and data-source have NO parser: a file of these types edited elsewhere cannot be fed back. The only complete round trip of the product remains get_full_data → replace_schema (OrgGen JSON).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | Type of diagram to export. Optional: by default the project's dominant kind (the one with the most blocks). org / entity / data-source / arch / process / journey → Mermaid (.mmd, rendered natively by GitHub/GitLab/Notion). captable → Markdown (.md: holders table with %, rounds table, + a Mermaid pie chart). | |
| format | No | Output format. Optional: by default the type's natural format (Mermaid, except captable → Markdown). 'csv' is available for captable (holders table + rounds table, for a spreadsheet or an accountant), org (roster block × person × role × %, for an HRIS), journey (phases × steps × emotion × channel × owner) and process (steps in execution order × lane × performer × duration × SLA × cost × bottleneck × compliance). A format that is unavailable for the type returns an explicit error rather than an empty file — the response then lists the formats actually available. | |
| expectedProjectId | No | UUID of the project targeted by THIS call. ACTUALLY targets this project instead of the session project. Refused without changing anything if access is not granted. |