elanous 0.2.10 → 0.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apps/pwa/out/404/index.html +1 -1
- package/apps/pwa/out/404.html +1 -1
- package/apps/pwa/out/_next/static/-6XrAoD3eU7NyMHAE4xPS/_buildManifest.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1147-466ec15afacc1a65.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1159-0c5ef8bc21cb6afb.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1394-ee3795b112907122.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1452.93700483b9d4fc61.js +9 -0
- package/apps/pwa/out/_next/static/chunks/{6062-73e68343a9814f6a.js → 1829-b453a1b22d3999bb.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/2176-c379e3ebce874151.js +1 -0
- package/apps/pwa/out/_next/static/chunks/2426.8c6ee0c668d53def.js +1 -0
- package/apps/pwa/out/_next/static/chunks/3170-7ec60a56fa0e4728.js +1 -0
- package/apps/pwa/out/_next/static/chunks/3278-ae6ef084769f6195.js +1 -0
- package/apps/pwa/out/_next/static/chunks/3454-988a53dac60a1763.js +1 -0
- package/apps/pwa/out/_next/static/chunks/3638-aa80b4641ea439db.js +1 -0
- package/apps/pwa/out/_next/static/chunks/3735-fe3402553ac1c9c6.js +1 -0
- package/apps/pwa/out/_next/static/chunks/3869-3cd46526879f454c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/390.c373e31b3b9d0c41.js +5 -0
- package/apps/pwa/out/_next/static/chunks/3992-2e522a8ac5f2afde.js +25 -0
- package/apps/pwa/out/_next/static/chunks/4215-c9d91dd644ec1719.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4508-5d0161d1e724d735.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4685-c3c1c625b71accd1.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4733-623a79345b171e1c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4883.3bd969ea1d3aaaff.js +2 -0
- package/apps/pwa/out/_next/static/chunks/5532.6899a12958a89b72.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{8067-87ce253ec2f23697.js → 5845-e6c003ce8d5fd36a.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/5978-b27004c677119115.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{8046cadf-211ca3c0e00f2b72.js → 5cd7e3a9-404fd6b8d0ecd44c.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/6048-4c5c33579bc4ef78.js +1 -0
- package/apps/pwa/out/_next/static/chunks/6303-422dbf0f67c72aac.js +1 -0
- package/apps/pwa/out/_next/static/chunks/6751-bb3595948b2e311b.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7274-19b7279f18b47ab3.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7277-0b2fc7c16ba2d64b.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{4323.c5dfb6f503304775.js → 7334.a6679d9168f37aa8.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/7551-a0e0707b79164ddd.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7758-0b018a9e4fc56200.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7777-79f845045aa1ed86.js +1 -0
- package/apps/pwa/out/_next/static/chunks/79f8be9e-957d68913b590b08.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8025-cc24ee5d8f2fb6f8.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8039-df92e08fede5de8f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8206-c6684dcde12be721.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8421-1c4acfb1395a0edf.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8605-0259994816604c49.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8725.bf46bb1395dd0fa2.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8734-252d511cd276c0dc.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8834-ca1cb09c1cb1a6bf.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{2415.ed6428ff334c7ce2.js → 9269.d2a4795bc6812717.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/9538-2816b90923606459.js +1 -0
- package/apps/pwa/out/_next/static/chunks/9656-c1540088f5859c80.js +1 -0
- package/apps/pwa/out/_next/static/chunks/9906-482c6619b3fdda20.js +1 -0
- package/apps/pwa/out/_next/static/chunks/9920-5cfdc5e8fd209825.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/_not-found/page-d16993889b125c42.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/approvals/page-cb169620945d1952.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/autopilot/page-cefe8169e36cf62a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/board/page-d2e35228bc497119.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/botlab/{page-54b32bd27726588d.js → page-5c05b0da4bc1392c.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/bots/page-e0ccdb576812b523.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/chat/page-813c4a52c9d05ca8.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/consult/page-4731f2c215358937.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/control/page-a022b257950f39e6.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/design-check/page-a2ffc717e04b8b0a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/editor/page-b59ee4e70fc18fcf.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/exec/page-a67e11ba962337b5.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/field/page-c172dabd796eb7a3.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/healthz/route-d16993889b125c42.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/inside/page-1efd0cb9e0ed9d13.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/intake/page-d5dc7ff69a37b4cf.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/layout-e71c84189e8c683e.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/live/page-1d6a533ce5a6efcb.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/market/page-dfca9b7d2de0b135.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/missions/[id]/page-793fa536b3a6ef37.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/morning/page-6dd3bfbbde2a5c2c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/not-found-490653e8d4cc8852.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/observatory/page-77447356baad75d2.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/ops/checklist/page-29e961191f6057df.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/ops/release/page-c822f55b884d9104.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/ops/seats/page-fa4ccfc432424e52.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/outputs/page-6d604227e1664b71.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/page-9c7e8f744a765daf.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/reflection/page-4048543b4b7ad5e0.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/scheduler/page-4c3a3126abed551a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/sessions/page-64b0aecb1ca75e75.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/settings/devices/page-4292d0149020e8a7.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/settings/page-db14d0be7f1c460c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/setup/done/page-e5d8072cd7cfef73.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/setup/layout-d16993889b125c42.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/setup/page-9547b5cec7cf76bf.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/share/page-e6dcb83265530636.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/showroom/page-45248f08d6aecae5.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/tasks/page-2cddeb9e2aeedc55.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/term/page-e297866051595d81.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/today/page-baba2e047872fb0f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/trace/page-e895da4ec9cac345.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/vault/page-4344faf20216233b.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/page-698bb29f11864b89.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/workflows/page-bd6a6dc1ddc273f2.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/workspace/page-2e9e2fb01c9da1c9.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/worktrees/page-d62ceb13411ebba4.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{2ea96958-e8c7e112de50b067.js → f48170cc-d05d28bf87a43bf4.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/framework-172630e6aa5e2d7f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/main-app-f0fe2d7477845181.js +1 -0
- package/apps/pwa/out/_next/static/chunks/main-fc98ac70b44eccb0.js +1 -0
- package/apps/pwa/out/_next/static/chunks/pages/_app-5bd7f10271f72413.js +1 -0
- package/apps/pwa/out/_next/static/chunks/pages/_error-97d0d85ea05fef9b.js +1 -0
- package/apps/pwa/out/_next/static/chunks/webpack-9e4d02d567b98240.js +1 -0
- package/apps/pwa/out/_next/static/css/128fb7fb670b2fbf.css +1 -0
- package/apps/pwa/out/approvals/index.html +1 -1
- package/apps/pwa/out/approvals/index.txt +23 -23
- package/apps/pwa/out/autopilot/index.html +1 -1
- package/apps/pwa/out/autopilot/index.txt +23 -23
- package/apps/pwa/out/board/index.html +1 -1
- package/apps/pwa/out/board/index.txt +23 -23
- package/apps/pwa/out/botlab/index.html +1 -1
- package/apps/pwa/out/botlab/index.txt +22 -22
- package/apps/pwa/out/bots/index.html +1 -1
- package/apps/pwa/out/bots/index.txt +22 -22
- package/apps/pwa/out/chat/index.html +1 -1
- package/apps/pwa/out/chat/index.txt +22 -22
- package/apps/pwa/out/consult/index.html +1 -1
- package/apps/pwa/out/consult/index.txt +23 -23
- package/apps/pwa/out/control/index.html +1 -1
- package/apps/pwa/out/control/index.txt +23 -23
- package/apps/pwa/out/design-check/index.html +1 -1
- package/apps/pwa/out/design-check/index.txt +23 -23
- package/apps/pwa/out/editor/index.html +1 -1
- package/apps/pwa/out/editor/index.txt +23 -23
- package/apps/pwa/out/exec/index.html +1 -1
- package/apps/pwa/out/exec/index.txt +23 -23
- package/apps/pwa/out/field/index.html +1 -1
- package/apps/pwa/out/field/index.txt +23 -23
- package/apps/pwa/out/healthz +1 -1
- package/apps/pwa/out/index.html +1 -1
- package/apps/pwa/out/index.txt +22 -22
- package/apps/pwa/out/inside/index.html +1 -0
- package/apps/pwa/out/inside/index.txt +31 -0
- package/apps/pwa/out/intake/index.html +1 -1
- package/apps/pwa/out/intake/index.txt +23 -23
- package/apps/pwa/out/live/index.html +1 -1
- package/apps/pwa/out/live/index.txt +23 -23
- package/apps/pwa/out/market/index.html +1 -1
- package/apps/pwa/out/market/index.txt +22 -22
- package/apps/pwa/out/missions/placeholder/index.html +1 -1
- package/apps/pwa/out/missions/placeholder/index.txt +22 -22
- package/apps/pwa/out/morning/index.html +1 -1
- package/apps/pwa/out/morning/index.txt +23 -23
- package/apps/pwa/out/observatory/index.html +1 -1
- package/apps/pwa/out/observatory/index.txt +23 -23
- package/apps/pwa/out/ops/checklist/index.html +1 -1
- package/apps/pwa/out/ops/checklist/index.txt +22 -22
- package/apps/pwa/out/ops/release/index.html +1 -1
- package/apps/pwa/out/ops/release/index.txt +22 -22
- package/apps/pwa/out/ops/seats/index.html +1 -1
- package/apps/pwa/out/ops/seats/index.txt +22 -22
- package/apps/pwa/out/outputs/index.html +1 -0
- package/apps/pwa/out/outputs/index.txt +30 -0
- package/apps/pwa/out/reflection/index.html +1 -1
- package/apps/pwa/out/reflection/index.txt +23 -23
- package/apps/pwa/out/scheduler/index.html +1 -1
- package/apps/pwa/out/scheduler/index.txt +23 -23
- package/apps/pwa/out/sessions/index.html +1 -1
- package/apps/pwa/out/sessions/index.txt +22 -22
- package/apps/pwa/out/settings/devices/index.html +1 -1
- package/apps/pwa/out/settings/devices/index.txt +23 -23
- package/apps/pwa/out/settings/index.html +1 -1
- package/apps/pwa/out/settings/index.txt +23 -23
- package/apps/pwa/out/setup/done/index.html +1 -1
- package/apps/pwa/out/setup/done/index.txt +23 -23
- package/apps/pwa/out/setup/index.html +1 -1
- package/apps/pwa/out/setup/index.txt +23 -23
- package/apps/pwa/out/share/index.html +1 -1
- package/apps/pwa/out/share/index.txt +23 -23
- package/apps/pwa/out/showroom/index.html +1 -1
- package/apps/pwa/out/showroom/index.txt +22 -22
- package/apps/pwa/out/tasks/index.html +1 -1
- package/apps/pwa/out/tasks/index.txt +23 -23
- package/apps/pwa/out/term/index.html +1 -1
- package/apps/pwa/out/term/index.txt +23 -24
- package/apps/pwa/out/today/index.html +1 -1
- package/apps/pwa/out/today/index.txt +23 -23
- package/apps/pwa/out/trace/index.html +1 -1
- package/apps/pwa/out/trace/index.txt +23 -23
- package/apps/pwa/out/vault/index.html +1 -1
- package/apps/pwa/out/vault/index.txt +23 -23
- package/apps/pwa/out/workflows/chat-ui/index.html +1 -1
- package/apps/pwa/out/workflows/chat-ui/index.txt +23 -23
- package/apps/pwa/out/workflows/index.html +1 -1
- package/apps/pwa/out/workflows/index.txt +23 -23
- package/apps/pwa/out/workspace/index.html +1 -1
- package/apps/pwa/out/workspace/index.txt +23 -24
- package/apps/pwa/out/worktrees/index.html +1 -1
- package/apps/pwa/out/worktrees/index.txt +23 -23
- package/graphs/context/nightly-condense.yaml +21 -0
- package/graphs/context/recipes.yaml +12 -0
- package/graphs/demo/inside-seed.yaml +20 -0
- package/graphs/demo/recipes.yaml +12 -0
- package/graphs/drafts/draft-cleanup.yaml +19 -0
- package/graphs/drafts/recipes.yaml +23 -0
- package/graphs/intake/intake-daily.yaml +2 -1
- package/graphs/ops/recipes.yaml +3 -0
- package/graphs/ops/secret-exposure.yaml +24 -0
- package/graphs/release/recipes.yaml +3 -0
- package/graphs/release/release-loop.yaml +4 -1
- package/graphs/video/explainer-line.yaml +2 -2
- package/package.json +2 -1
- package/plugins/card-followup/examples/sample-card.png +0 -0
- package/plugins/elanous-hwp/README.md +25 -0
- package/plugins/elanous-hwp/cli.ts +22 -0
- package/plugins/elanous-hwp/converter.ts +237 -0
- package/plugins/elanous-hwp/fixtures/fixed-controls.hwpx +0 -0
- package/plugins/elanous-hwp/fixtures/fixed-table-controls.hwpx +0 -0
- package/plugins/elanous-hwp/fixtures/fixed.hwpx +0 -0
- package/plugins/elanous-hwp/plugin.json +16 -0
- package/plugins/elanous-hwp/plugin.ts +40 -0
- package/scripts/ci-public-export-leak-gate.ts +75 -14
- package/scripts/ci-public-leak-gate.ts +44 -9
- package/scripts/context-hooks/claude-stop.sh +4 -0
- package/scripts/context-hooks/emit.ts +24 -0
- package/scripts/context-hooks/post-tool-use.sh +4 -0
- package/scripts/coord-channel-watch.sh +12 -0
- package/scripts/coord-requests-bridge.ts +143 -0
- package/scripts/field-feed/lib.ts +4 -0
- package/scripts/fleet/node-setup.sh +20 -3
- package/scripts/homebrew-formula-bump.ts +69 -0
- package/scripts/lib/telegram-inject-args.ts +31 -0
- package/scripts/marketing/measure-site-numbers.ts +169 -0
- package/scripts/measure-gate-shards.ts +309 -0
- package/scripts/measure-pod-memory-by-goal.ts +130 -0
- package/scripts/mission-request-judge.ts +31 -1
- package/scripts/morning-report.ts +2 -2
- package/scripts/opportunity-scan.ts +1 -1
- package/scripts/release-loop/auto-approve-node.ts +21 -4
- package/scripts/release-loop/checklist-gate-node.ts +2 -1
- package/scripts/release-loop/cut-branch.ts +84 -0
- package/scripts/release-loop/gate-node.ts +22 -15
- package/scripts/release-loop/mac-smoke-node.ts +229 -0
- package/scripts/release-loop/node-verdict.ts +3 -3
- package/scripts/release-loop/ops-upgrade-node.ts +47 -6
- package/scripts/release-loop/publish-node.ts +4 -1
- package/scripts/release-loop/tui-node-checks.ts +42 -0
- package/scripts/release-loop/tui-sim-node.ts +32 -8
- package/scripts/release-loop/unattended-release.ts +5 -3
- package/scripts/release-loop/version-node.ts +74 -13
- package/scripts/signal-digest-cycle.ts +2 -7
- package/scripts/signal-digest-photo.ts +11 -0
- package/scripts/tech1-public-measure.ts +94 -0
- package/scripts/telegram-inject.ts +14 -6
- package/scripts/test-diet/node.ts +1 -1
- package/scripts/test-diet/remeasure-list.ts +112 -0
- package/scripts/tui-regress.ts +2 -2
- package/scripts/ux/demo-rehearsal.ts +247 -0
- package/scripts/ux/demo-seed.ts +108 -0
- package/scripts/ux/lib/rehearsal-verdict.ts +80 -0
- package/skills/diagram-master/SKILL.md +366 -0
- package/skills/diagram-master/references/engines/excalidraw/color-palette.md +67 -0
- package/skills/diagram-master/references/engines/excalidraw/element-templates.md +182 -0
- package/skills/diagram-master/references/engines/excalidraw/json-schema.md +71 -0
- package/skills/diagram-master/references/engines/excalidraw/render_excalidraw.py +189 -0
- package/skills/diagram-master/references/engines/excalidraw/render_template.html +57 -0
- package/skills/diagram-master/references/engines/matplotlib/matplotlib-patterns.md +235 -0
- package/skills/diagram-master/references/engines/matplotlib/render_matplotlib.py +184 -0
- package/skills/diagram-master/references/engines/mermaid/domain-templates.md +435 -0
- package/skills/diagram-master/references/engines/mermaid/render_mermaid.py +116 -0
- package/skills/diagram-master/references/engines/mermaid/syntax-reference.md +2247 -0
- package/skills/diagram-master/references/engines/nanobannana/render_nanobannana2.py +168 -0
- package/skills/diagram-master/references/engines/svg/color-palette.md +188 -0
- package/skills/diagram-master/references/engines/svg/html-base-template.html +332 -0
- package/skills/diagram-master/references/engines/svg/interactivity-patterns.md +435 -0
- package/skills/diagram-master/references/engines/svg/render_interactive_svg.py +212 -0
- package/skills/diagram-master/references/engines/svg/svg-element-templates.md +349 -0
- package/skills/diagram-master/references/examples/README.md +69 -0
- package/skills/diagram-master/references/examples/ref_grid_architecture.png +0 -0
- package/skills/diagram-master/references/examples/ref_layered_flow.png +0 -0
- package/skills/diagram-master/references/pyproject.toml +16 -0
- package/skills/diagram-master/references/quality-checklist.md +33 -0
- package/skills/diagram-master/references/routing-guide.md +164 -0
- package/skills/diagram-master/references/uv.lock +1356 -0
- package/skills/google-workspace/SKILL.md +33 -0
- package/skills/google-workspace/scripts/gws-safe.sh +177 -0
- package/skills/grill-me/SKILL.md +1 -1
- package/skills/lecture-note-digitizer/SKILL.md +926 -0
- package/skills/lecture-note-digitizer/references/convert_to_pdf.py +30 -0
- package/skills/lecture-note-digitizer/references/extract_slide_diagram.py +73 -0
- package/skills/lecture-note-digitizer/references/html-template.md +167 -0
- package/skills/lecture-note-digitizer/references/katex-style-guide.md +165 -0
- package/skills/omni-crawl/SKILL.md +21 -11
- package/skills/omni-crawl/scripts/main.ts +6 -6
- package/skills/omni-crawl/src/router.ts +3 -3
- package/skills/omni-digest/SKILL.md +17 -9
- package/skills/omni-digest/digest.md +2 -2
- package/skills/omni-digest/src/fetch.ts +30 -3
- package/skills/pitch-deck/SKILL.md +2 -2
- package/skills/pitch-deck/template.html +2 -2
- package/skills/youtube-master/SKILL.md +163 -0
- package/skills/youtube-master/package-lock.json +558 -0
- package/skills/youtube-master/package.json +13 -0
- package/skills/youtube-master/references/study-note-template.md +124 -0
- package/skills/youtube-master/scripts/main.ts +435 -0
- package/skills/youtube-master/scripts/transcribe-local.ts +24 -0
- package/skills/youtube-master/src/audio.ts +63 -0
- package/skills/youtube-master/src/domain-staging.ts +50 -0
- package/skills/youtube-master/src/env.ts +36 -0
- package/skills/youtube-master/src/obsidian.ts +155 -0
- package/skills/youtube-master/src/router.ts +110 -0
- package/skills/youtube-master/src/stt.ts +199 -0
- package/skills/youtube-master/src/study-note.ts +175 -0
- package/skills/youtube-master/src/summarize.ts +358 -0
- package/skills/youtube-master/src/transcript.ts +76 -0
- package/skills/youtube-master/src/types.ts +91 -0
- package/skills/youtube-master/src/util.ts +93 -0
- package/skills/youtube-master/src/youtube.ts +70 -0
- package/skills/youtube-master/tsconfig.json +13 -0
- package/src/acp/server.ts +5 -2
- package/src/agent-mission/driver.ts +215 -23
- package/src/agent-mission/pty-decision.ts +71 -0
- package/src/agent-mission/review-loop.ts +30 -0
- package/src/autopilot/build/llm-conflict-merge.ts +16 -3
- package/src/autopilot/pty-control-loop.ts +4 -1
- package/src/autopilot/tool-registry.ts +2 -0
- package/src/boot/daemon-prompt-turn.ts +5 -0
- package/src/boot/daemon-runtime.ts +9 -3
- package/src/boot/daemon-tools/web-search.ts +3 -0
- package/src/card-followup/core.ts +109 -0
- package/src/chat/index.ts +2 -0
- package/src/cli/drive-input-jail.ts +101 -0
- package/src/cli/hooks-cli.ts +17 -3
- package/src/cli/make-cli.ts +43 -0
- package/src/cli/persona-cli.ts +98 -9
- package/src/cli/plugin-cli.ts +31 -22
- package/src/cli/pod-cli.ts +36 -9
- package/src/cli/pod-memory-advice.ts +35 -0
- package/src/cli/pr-cli.ts +51 -15
- package/src/cli/pty-drive-cli.ts +41 -7
- package/src/cli/pty-drive-verdict.ts +40 -0
- package/src/cli/release-cli.ts +63 -10
- package/src/cli/setup-cli.ts +43 -1
- package/src/cli/skills-cli.ts +17 -1
- package/src/context-bus/claude-hooks-install.ts +10 -0
- package/src/context-bus/context-now-surfaces.ts +65 -0
- package/src/context-bus/context-now.ts +104 -0
- package/src/context-bus/coord-events.ts +2 -2
- package/src/context-bus/external-events.ts +52 -0
- package/src/context-bus/long-term-memory.ts +108 -0
- package/src/context-bus/nightly-condense.ts +153 -0
- package/src/context-bus/session-events.ts +35 -0
- package/src/dashboard/dashboard-status-lines.ts +2 -0
- package/src/dashboard/index.ts +17 -4
- package/src/dashboard/slash-runtime/dashboard-handlers.ts +31 -1
- package/src/decisions/decision-cards.ts +10 -3
- package/src/decisions/decision-ledger.ts +13 -5
- package/src/discord/sprint21-runtime.ts +5 -1
- package/src/discord-self-message.ts +32 -0
- package/src/discord-slash-wire.ts +5 -1
- package/src/discord.ts +17 -1
- package/src/domains/core-tools.ts +3 -2
- package/src/domains/outbound-alert.ts +105 -32
- package/src/domains/outbound-log-probe.ts +8 -0
- package/src/domains/telegram-kind-route.ts +51 -13
- package/src/exec-requests/default-outputs.ts +25 -0
- package/src/exec-requests/planner.ts +10 -2
- package/src/exec-requests/runner.ts +20 -6
- package/src/exec-requests/store.ts +3 -0
- package/src/execution-loop/launch-gate.ts +109 -0
- package/src/field/field-reel.ts +5 -1
- package/src/field-note/index.ts +201 -0
- package/src/field-note/telegram.ts +142 -0
- package/src/field-note/transcribe.ts +248 -0
- package/src/graph-kinds/registry.ts +3 -3
- package/src/graph-runner/graph-cli.ts +61 -1
- package/src/graph-runner/graph-grow-llm.ts +47 -0
- package/src/graph-runner/graph-grow.ts +50 -0
- package/src/graph-runner/runner.ts +329 -33
- package/src/grok/agent-search.ts +8 -2
- package/src/guardian/secret-exposure-scan.ts +101 -0
- package/src/harness/harness-cli-command.ts +375 -13
- package/src/harness/harness-pod-dispatch.ts +43 -23
- package/src/harness/harness-seams.ts +38 -4
- package/src/harness/harness-stop.ts +23 -4
- package/src/harness/launch-registry.ts +91 -0
- package/src/harness/process-garbage.ts +5 -3
- package/src/hooks/consult-intake.ts +153 -0
- package/src/hooks/dispatch.ts +82 -0
- package/src/hooks/expose.ts +254 -0
- package/src/hooks/github-shadow.ts +108 -0
- package/src/hooks/providers.ts +71 -5
- package/src/hooks/queue.ts +1 -1
- package/src/hooks/receiver.ts +94 -16
- package/src/index.ts +76 -14
- package/src/intake-plane/categorize.ts +18 -46
- package/src/intake-plane/discord-seat-work.ts +38 -2
- package/src/intake-plane/front-route-classifier.ts +33 -39
- package/src/intake-plane/persona-answer.ts +30 -0
- package/src/intake-plane/runtime-callables.ts +8 -1
- package/src/intake-plane/telegram-seat-work.ts +36 -2
- package/src/intake-plane/wish-card.ts +33 -0
- package/src/intake-plane/wish-folder.ts +67 -0
- package/src/intent-gate/gate.ts +30 -10
- package/src/live/detail-switch.ts +5 -0
- package/src/llm/difficulty.ts +57 -0
- package/src/llm/judge-layer.ts +101 -0
- package/src/llm/mission-router.ts +33 -19
- package/src/loops/contract/examples/cmo-seat.loop.yaml +51 -0
- package/src/loops/contract/examples/orchestrator.loop.yaml +57 -0
- package/src/loops/contract/examples/steward.loop.yaml +50 -0
- package/src/loops/contract/loop-agent.schema.json +138 -0
- package/src/loops/contract/validate.ts +64 -0
- package/src/loops/registry.ts +20 -6
- package/src/market/signed-index.ts +4 -0
- package/src/maturity/bot-command-maturity.ts +45 -0
- package/src/maturity/feature-maturity.ts +27 -4
- package/src/model-tier/index.ts +2 -2
- package/src/model-tier/tier-resolver.ts +20 -20
- package/src/model-tier/types.ts +6 -6
- package/src/mss/logging/log-store.ts +15 -0
- package/src/nexus/api/config-model-tier.ts +5 -4
- package/src/nexus/api/fabric-plans.ts +53 -0
- package/src/nexus/api/harness-api.ts +5 -1
- package/src/nexus/api/health.ts +2 -0
- package/src/nexus/api/http-server.ts +67 -8
- package/src/nexus/api/inside-events.ts +226 -0
- package/src/nexus/api/meta-api.ts +21 -8
- package/src/nexus/api/missions.ts +6 -1
- package/src/nexus/api/ops-seats.ts +33 -0
- package/src/nexus/api/outbound-report.ts +40 -7
- package/src/nexus/api/outputs-route.ts +44 -0
- package/src/nexus/api/personas.ts +95 -53
- package/src/nexus/api/seat-requests.ts +44 -2
- package/src/nexus/api/sessions-store.ts +17 -38
- package/src/nexus/api/sub-seat-charters.ts +34 -0
- package/src/nexus/api/tabs-mutations.ts +3 -1
- package/src/nexus/api/task-cards-api.ts +19 -0
- package/src/nexus/api/trace.ts +18 -6
- package/src/nexus/api/workflow-history.ts +88 -0
- package/src/nexus/api/workflow-run-event-bridge.ts +1 -0
- package/src/nexus/api/workflows.ts +132 -6
- package/src/nexus/index.ts +2 -0
- package/src/nexus/kinds/webterm.ts +2 -1
- package/src/nexus/outbound/delivery-ledger.ts +17 -8
- package/src/nexus/outbound/router.ts +8 -3
- package/src/nexus/webterm/pty.ts +6 -2
- package/src/onboarding/cli-auth-status.ts +80 -0
- package/src/onboarding/voice-ai.ts +3 -3
- package/src/org/seat-budget.ts +48 -0
- package/src/org/stall-escalation.ts +63 -0
- package/src/outputs/ledger.ts +120 -0
- package/src/persona/persona-todo.ts +79 -0
- package/src/persona/presets.ts +123 -2
- package/src/persona/team-set.ts +155 -0
- package/src/plugins/install/plugin-install.ts +14 -0
- package/src/plugins/maker/market-bundle.ts +110 -0
- package/src/plugins/maker/plugin-maker.ts +254 -11
- package/src/plugins/maker/wizard-generate.ts +103 -0
- package/src/pod-lease/admission.ts +150 -0
- package/src/pod-lease/dependency-state.ts +85 -0
- package/src/pod-lease/host-lease.ts +127 -0
- package/src/project/project-suggestion.ts +16 -0
- package/src/project/session-context.ts +24 -0
- package/src/release-loop/checklist.ts +17 -5
- package/src/release-loop/feature-store.ts +29 -13
- package/src/release-loop/landed-but-yellow.ts +48 -0
- package/src/release-loop/next-md-merge.ts +58 -0
- package/src/release-loop/release-note.ts +59 -4
- package/src/seat-dispatch/seat-ask.ts +130 -0
- package/src/seat-dispatch/seat-questions.ts +100 -0
- package/src/seat-loop/seat-loop.ts +709 -29
- package/src/seat-loop/seat-report.ts +37 -2
- package/src/self-dev/dev-cli.ts +4 -1
- package/src/self-dev/dev-pipeline.ts +37 -1
- package/src/self-dev/draft-sweep.ts +79 -40
- package/src/self-dev/draft-triage-rules.ts +62 -7
- package/src/self-dev/fabric-plan-core.ts +297 -0
- package/src/self-dev/orchestrate.ts +36 -4
- package/src/self-dev/release-path-guard.ts +62 -0
- package/src/self-dev/shard-aggregate.ts +230 -0
- package/src/self-dev/shard-placement.ts +60 -0
- package/src/self-dev/shard-plan.ts +48 -0
- package/src/self-dev/shard-pod-run.ts +77 -0
- package/src/self-dev/shard-run.ts +105 -0
- package/src/self-implement/budget-gate.ts +29 -12
- package/src/self-implement/gate-baseline.ts +1 -1
- package/src/self-implement/gate-candidate-ranking.ts +60 -0
- package/src/self-implement/gate-cli.ts +40 -1
- package/src/self-implement/gate-scope.ts +44 -13
- package/src/self-implement/graph-variant.ts +171 -0
- package/src/self-implement/harness-policy-gates.ts +1 -1
- package/src/self-implement/headless-elanous-driver.ts +27 -3
- package/src/self-implement/host-regate.ts +22 -1
- package/src/self-implement/importer-test-index.ts +2 -1
- package/src/self-implement/l8-merge-queue.ts +130 -0
- package/src/self-implement/orchestrator.ts +257 -9
- package/src/self-implement/route-consumer-test-index.ts +122 -0
- package/src/self-implement/seams.ts +72 -11
- package/src/self-implement/test-seams.ts +2 -0
- package/src/self-implement/uncommitted-work.ts +59 -0
- package/src/session/index.ts +36 -13
- package/src/skills/gift-install.ts +215 -0
- package/src/skills/tools/web-search.ts +4 -1
- package/src/steward/launch.ts +42 -26
- package/src/steward/steward-cards.ts +17 -9
- package/src/steward/triage.ts +46 -14
- package/src/task-cards/card-cli.ts +25 -1
- package/src/task-orchestrator/mission.ts +5 -0
- package/src/task-orchestrator/store.ts +12 -3
- package/src/task-orchestrator/surfaces/pod-command-job.ts +43 -17
- package/src/task-orchestrator/surfaces/pod-lease.ts +156 -19
- package/src/task-orchestrator/surfaces/pod-pool.ts +127 -26
- package/src/task-orchestrator/surfaces/self-implement-pod.ts +222 -40
- package/src/task-orchestrator/surfaces/self-implement.ts +15 -2
- package/src/task-orchestrator/types.ts +2 -0
- package/src/telegram-card-followup.ts +16 -96
- package/src/telegram-commands.ts +31 -1
- package/src/telegram-project-command.ts +145 -0
- package/src/telegram-report.ts +21 -17
- package/src/telegram.ts +61 -8
- package/src/tool-runtime/self-cognition-runtimes.ts +13 -3
- package/src/user-config.ts +110 -24
- package/src/version/packed-revision.json +1 -1
- package/src/web-search/grok.ts +7 -1
- package/src/web-search/index.ts +28 -1
- package/src/web-search/provider.ts +4 -0
- package/src/web-search/x-intent.ts +5 -0
- package/src/workflow-runtime/executor.ts +277 -47
- package/src/workflow-runtime/index.ts +1 -0
- package/src/workflow-runtime/nodes/subworkflow.ts +60 -0
- package/src/workflow-runtime/plugin-kind-node.ts +1 -1
- package/src/workflow-runtime/schema.ts +79 -4
- package/src/workflow-runtime/types.ts +35 -4
- package/apps/pwa/out/_next/static/2DsiDfDCks44g1cPUMhiW/_buildManifest.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1105-c473ed46272fba79.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1377-1efeffbbac0963ff.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1470.98a6ab61ccb4131c.js +0 -1
- package/apps/pwa/out/_next/static/chunks/216-5acd01cbde4acda7.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2330-c2f07246c8788af1.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2375-cb6debea56cce4fb.js +0 -1
- package/apps/pwa/out/_next/static/chunks/24-e6d28380efab7faf.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2977-e38442e86289f1d3.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2982-2a2df543be3d2e5a.js +0 -25
- package/apps/pwa/out/_next/static/chunks/3403.4bc97b4066945a94.js +0 -5
- package/apps/pwa/out/_next/static/chunks/3615-740dd270764ffa24.js +0 -1
- package/apps/pwa/out/_next/static/chunks/371-4ad6af55dad02ced.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3734-1015fe991eb9b7e7.js +0 -1
- package/apps/pwa/out/_next/static/chunks/4114-3e63117452378807.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5012-a7fe6f3c8b6fe45a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5609-012bb3557211f07e.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5783-ef40ebfc91d55230.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5791-bb82743fa6299562.js +0 -1
- package/apps/pwa/out/_next/static/chunks/62-ff227c3edb8b248b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6320-baac91d68843a9a6.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6725-68ab7cc0b1faf00d.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6998-a654fe5c58271600.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7633-1b3709b0854c9412.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7647.2fcd30d894d5ee30.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7673-2eda1507d38dadb8.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7951-8b03dbb10b24cd06.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7990-e12efba616f46e03.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8142-744998d65d7bb17e.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8195-6fde3d7a39859206.js +0 -10
- package/apps/pwa/out/_next/static/chunks/8619-4365e03a2862830f.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8894-b5fb36bab837cd29.js +0 -1
- package/apps/pwa/out/_next/static/chunks/920-f7dceb78f1c585ef.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9454-84d0d5d77446bd92.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9651-3cd291a6fa1370d2.js +0 -1
- package/apps/pwa/out/_next/static/chunks/988-5f92e7ab7ccea3dd.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9989-5582582f06429840.js +0 -1
- package/apps/pwa/out/_next/static/chunks/ae787e4c-f2998de7f1ba72a4.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/_not-found/page-859cea1570b6227a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/approvals/page-d2253d7e58ef1890.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/autopilot/page-5441d4a9ab35e518.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/board/page-d9b12d680922d980.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/bots/page-e268d6d145827a22.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/chat/page-f8116559c7424da7.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/consult/page-1085399fd0f32112.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/control/page-1df686a14f65895a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/design-check/page-54e1f966ab60a4dc.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/editor/page-7ed95f296f5ee8e9.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/exec/page-11edac668d77e5c3.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/field/page-59e2b9a22cd5a6d5.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/healthz/route-859cea1570b6227a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/intake/page-2976df21ad74ab48.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/layout-34d211a67f16d510.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/live/page-8ff652d5d950639b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/market/page-b31610deda76337b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/missions/[id]/page-6cb0e1bbefe5fb3d.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/morning/page-a286a152cf584576.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/not-found-d9237581e7003bcb.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/observatory/page-83274e761643fdd2.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/ops/checklist/page-ceee6cfb1d4e6d68.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/ops/release/page-9c9f8bb3e4a64091.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/ops/seats/page-c17217603ea3426a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/page-efb6177cbf1e8a51.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/reflection/page-d307523703bc4df3.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/scheduler/page-462f4e4bab45ce7d.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/sessions/page-8990e96f33af3837.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/settings/devices/page-e168fa1030af0548.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/settings/page-1233e05a4068bc9c.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/setup/done/page-13a1840b1fac337a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/setup/layout-859cea1570b6227a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/setup/page-64a29fc80b11ab55.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/share/page-68e787339a16b3dc.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/showroom/page-4fddc90b23feb215.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/tasks/page-886ba8260dc79c79.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/term/page-0f26507a1722e40b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/today/page-109d4ccd42259c9d.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/trace/page-f5c2a4e510726774.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/vault/page-b2e0039416f42522.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/page-26102fd7350f171e.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/workflows/page-708948bc8a802794.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/workspace/page-5e5611620f78fb0b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/worktrees/page-139ba5c367bbf60a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/framework-ea806bb57f2b8923.js +0 -1
- package/apps/pwa/out/_next/static/chunks/main-8d2302399c2c8f87.js +0 -1
- package/apps/pwa/out/_next/static/chunks/main-app-202b4e81f33895ea.js +0 -1
- package/apps/pwa/out/_next/static/chunks/pages/_app-b10928c60f0b8488.js +0 -1
- package/apps/pwa/out/_next/static/chunks/pages/_error-689039227d443fab.js +0 -1
- package/apps/pwa/out/_next/static/chunks/webpack-e5bea36f183b25e6.js +0 -1
- package/apps/pwa/out/_next/static/css/43feca5fd387dcbd.css +0 -1
- /package/apps/pwa/out/_next/static/{2DsiDfDCks44g1cPUMhiW → -6XrAoD3eU7NyMHAE4xPS}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,2247 @@
|
|
|
1
|
+
# Mermaid Complete Syntax Reference
|
|
2
|
+
|
|
3
|
+
> Compiled from official Mermaid documentation. Version: 11.x
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Global Concepts
|
|
8
|
+
|
|
9
|
+
### Diagram Structure
|
|
10
|
+
Every diagram begins with a **diagram type keyword**, followed by the diagram body.
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
%%{init: { 'theme': 'dark' }}%%
|
|
14
|
+
diagramType [direction]
|
|
15
|
+
... body ...
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Comments
|
|
19
|
+
```
|
|
20
|
+
%% This is a comment (anything after %% to end of line)
|
|
21
|
+
```
|
|
22
|
+
Avoid `%%{ }%%` in comments — it conflicts with directives.
|
|
23
|
+
|
|
24
|
+
### Reserved Word
|
|
25
|
+
The word `end` breaks Flowchart and Sequence diagrams. Wrap it: `"end"`, `(end)`, `[end]`, or `{end}`.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
### Frontmatter (YAML config block)
|
|
30
|
+
Must appear before the diagram keyword. The `---` must be the only character on the first line.
|
|
31
|
+
|
|
32
|
+
```yaml
|
|
33
|
+
---
|
|
34
|
+
title: My Diagram
|
|
35
|
+
displayMode: compact
|
|
36
|
+
config:
|
|
37
|
+
theme: forest
|
|
38
|
+
look: handDrawn
|
|
39
|
+
layout: elk
|
|
40
|
+
elk:
|
|
41
|
+
mergeEdges: true
|
|
42
|
+
nodePlacementStrategy: LINEAR_SEGMENTS # SIMPLE | NETWORK_SIMPLEX | LINEAR_SEGMENTS | BRANDES_KOEPF
|
|
43
|
+
gantt:
|
|
44
|
+
useWidth: 400
|
|
45
|
+
---
|
|
46
|
+
flowchart LR
|
|
47
|
+
A --> B
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Directives (inline config)
|
|
51
|
+
```
|
|
52
|
+
%%{init: { 'theme': 'dark', 'flowchart': {'curve': 'linear'} }}%%
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Themes
|
|
56
|
+
Built-in themes: `default` | `forest` | `dark` | `neutral` | `base`
|
|
57
|
+
|
|
58
|
+
### Looks (flowchart & state only)
|
|
59
|
+
`look: handDrawn` | `look: classic`
|
|
60
|
+
|
|
61
|
+
### Layout Algorithms
|
|
62
|
+
`layout: dagre` (default) | `layout: elk` | `layout: tidy-tree` (mindmap)
|
|
63
|
+
|
|
64
|
+
### Accessibility
|
|
65
|
+
```
|
|
66
|
+
accTitle: This is the accessible title
|
|
67
|
+
accDescr: This is an accessible description
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## 1. Flowchart
|
|
73
|
+
|
|
74
|
+
**Keyword:** `flowchart` (or `graph`)
|
|
75
|
+
|
|
76
|
+
### Direction
|
|
77
|
+
```
|
|
78
|
+
flowchart TB % Top to Bottom (default)
|
|
79
|
+
flowchart TD % Top-Down (same as TB)
|
|
80
|
+
flowchart BT % Bottom to Top
|
|
81
|
+
flowchart LR % Left to Right
|
|
82
|
+
flowchart RL % Right to Left
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Node Shapes (Classic)
|
|
86
|
+
| Syntax | Shape |
|
|
87
|
+
|--------|-------|
|
|
88
|
+
| `id` | Rectangle (default) |
|
|
89
|
+
| `id[text]` | Rectangle |
|
|
90
|
+
| `id(text)` | Rounded edges |
|
|
91
|
+
| `id([text])` | Stadium / pill |
|
|
92
|
+
| `id[[text]]` | Subroutine (double vertical lines) |
|
|
93
|
+
| `id[(text)]` | Cylinder (database) |
|
|
94
|
+
| `id((text))` | Circle |
|
|
95
|
+
| `id>text]` | Asymmetric (flag/arrow right) |
|
|
96
|
+
| `id{text}` | Rhombus / diamond |
|
|
97
|
+
| `id{{text}}` | Hexagon |
|
|
98
|
+
| `id[/text/]` | Parallelogram |
|
|
99
|
+
| `id[\text\]` | Parallelogram alt |
|
|
100
|
+
| `id[/text\]` | Trapezoid |
|
|
101
|
+
| `id[\text/]` | Trapezoid alt |
|
|
102
|
+
| `id(((text)))` | Double circle |
|
|
103
|
+
|
|
104
|
+
### Node Shapes (v11.3.0+ Extended — `@{ shape: <name> }` syntax)
|
|
105
|
+
```
|
|
106
|
+
A@{ shape: rect, label: "Process" }
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
| Shape Name | Short Name | Aliases |
|
|
110
|
+
|-----------|------------|---------|
|
|
111
|
+
| Rectangle | `rect` | `proc`, `process`, `rectangle` |
|
|
112
|
+
| Rounded Rectangle | `rounded` | `event` |
|
|
113
|
+
| Stadium | `stadium` | `pill`, `terminal` |
|
|
114
|
+
| Subroutine / Framed Rectangle | `fr-rect` | `subproc`, `subprocess`, `subroutine`, `framed-rectangle` |
|
|
115
|
+
| Cylinder | `cyl` | `cylinder`, `database`, `db` |
|
|
116
|
+
| Circle | `circle` | `circ` |
|
|
117
|
+
| Small Circle | `sm-circ` | `small-circle`, `start` |
|
|
118
|
+
| Double Circle | `dbl-circ` | `double-circle` |
|
|
119
|
+
| Framed Circle | `fr-circ` | `framed-circle`, `stop` |
|
|
120
|
+
| Diamond | `diam` | `decision`, `diamond`, `question` |
|
|
121
|
+
| Hexagon | `hex` | `hexagon`, `prepare` |
|
|
122
|
+
| Lean Right | `lean-r` | `in-out`, `lean-right` |
|
|
123
|
+
| Lean Left | `lean-l` | `lean-left`, `out-in` |
|
|
124
|
+
| Trapezoid Base Bottom | `trap-b` | `priority`, `trapezoid`, `trapezoid-bottom` |
|
|
125
|
+
| Trapezoid Base Top | `trap-t` | `inv-trapezoid`, `manual`, `trapezoid-top` |
|
|
126
|
+
| Text Block | `text` | — |
|
|
127
|
+
| Notched Rectangle (Card) | `notch-rect` | `card`, `notched-rectangle` |
|
|
128
|
+
| Cloud | `cloud` | — |
|
|
129
|
+
| Hourglass (Collate) | `hourglass` | `collate` |
|
|
130
|
+
| Lightning Bolt (Com Link) | `bolt` | `com-link`, `lightning-bolt` |
|
|
131
|
+
| Curly Brace Left | `brace` | `brace-l`, `comment` |
|
|
132
|
+
| Curly Brace Right | `brace-r` | — |
|
|
133
|
+
| Curly Braces Both | `braces` | — |
|
|
134
|
+
| Delay / Half-Rounded | `delay` | `half-rounded-rectangle` |
|
|
135
|
+
| Horizontal Cylinder | `h-cyl` | `das`, `horizontal-cylinder` |
|
|
136
|
+
| Lined Cylinder (Disk) | `lin-cyl` | `disk`, `lined-cylinder` |
|
|
137
|
+
| Curved Trapezoid (Display) | `curv-trap` | `curved-trapezoid`, `display` |
|
|
138
|
+
| Divided Rectangle | `div-rect` | `div-proc`, `divided-process`, `divided-rectangle` |
|
|
139
|
+
| Document | `doc` | `document` |
|
|
140
|
+
| Filled Rectangle (Fork/Join) | `fork` | `join` |
|
|
141
|
+
| Window Pane (Internal Storage) | `win-pane` | `internal-storage`, `window-pane` |
|
|
142
|
+
| Filled Circle (Junction) | `f-circ` | `filled-circle`, `junction` |
|
|
143
|
+
| Lined Document | `lin-doc` | `lined-document` |
|
|
144
|
+
| Lined Rectangle | `lin-rect` | `lin-proc`, `lined-process`, `lined-rectangle`, `shaded-process` |
|
|
145
|
+
| Notched Pentagon | `notch-pent` | `loop-limit`, `notched-pentagon` |
|
|
146
|
+
| Flipped Triangle | `flip-tri` | `flipped-triangle`, `manual-file` |
|
|
147
|
+
| Sloped Rectangle | `sl-rect` | `manual-input`, `sloped-rectangle` |
|
|
148
|
+
| Stacked Document | `docs` | `documents`, `st-doc`, `stacked-document` |
|
|
149
|
+
| Stacked Rectangle | `st-rect` | `processes`, `procs`, `stacked-rectangle` |
|
|
150
|
+
| Odd | `odd` | — |
|
|
151
|
+
| Flag (Paper Tape) | `flag` | `paper-tape` |
|
|
152
|
+
| Bang | `bang` | — |
|
|
153
|
+
| Bow Tie Rectangle | `bow-rect` | `bow-tie-rectangle`, `stored-data` |
|
|
154
|
+
| Crossed Circle (Summary) | `cross-circ` | `crossed-circle`, `summary` |
|
|
155
|
+
| Tagged Document | `tag-doc` | `tagged-document` |
|
|
156
|
+
| Tagged Rectangle | `tag-rect` | `tag-proc`, `tagged-process`, `tagged-rectangle` |
|
|
157
|
+
| Triangle | `tri` | `extract`, `triangle` |
|
|
158
|
+
|
|
159
|
+
### Edge / Arrow Types
|
|
160
|
+
| Syntax | Description |
|
|
161
|
+
|--------|-------------|
|
|
162
|
+
| `A --> B` | Arrow |
|
|
163
|
+
| `A --- B` | Open link (no arrow) |
|
|
164
|
+
| `A --o B` | Circle edge |
|
|
165
|
+
| `A --x B` | Cross edge |
|
|
166
|
+
| `A <--> B` | Bidirectional arrow |
|
|
167
|
+
| `A -.-> B` | Dotted arrow |
|
|
168
|
+
| `A -.- B` | Dotted open link |
|
|
169
|
+
| `A ==> B` | Thick arrow |
|
|
170
|
+
| `A === B` | Thick open link |
|
|
171
|
+
| `A ~~~ B` | Invisible link |
|
|
172
|
+
|
|
173
|
+
**Arrow lengths** — add extra dashes/dots to increase length:
|
|
174
|
+
```
|
|
175
|
+
A ---> B % longer arrow
|
|
176
|
+
A ----> B % even longer
|
|
177
|
+
A -.-> B % dotted
|
|
178
|
+
A -..-> B % longer dotted
|
|
179
|
+
A ===> B % longer thick
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
**Labels on edges:**
|
|
183
|
+
```
|
|
184
|
+
A -->|label text| B
|
|
185
|
+
A -- label text --> B
|
|
186
|
+
A -->|"text with spaces"| B
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**Multi-directional:**
|
|
190
|
+
```
|
|
191
|
+
A & B --> C & D
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Subgraphs
|
|
195
|
+
```
|
|
196
|
+
subgraph title
|
|
197
|
+
direction LR
|
|
198
|
+
node1 --> node2
|
|
199
|
+
end
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Subgraphs can have their own direction. External nodes can connect to subgraphs:
|
|
203
|
+
```
|
|
204
|
+
subgraph id1[Title]
|
|
205
|
+
a --> b
|
|
206
|
+
end
|
|
207
|
+
subgraph id2[Title2]
|
|
208
|
+
c --> d
|
|
209
|
+
end
|
|
210
|
+
id1 --> id2
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Interaction (click events)
|
|
214
|
+
```
|
|
215
|
+
click nodeId href "https://url" "tooltip"
|
|
216
|
+
click nodeId call callbackFn() "tooltip"
|
|
217
|
+
```
|
|
218
|
+
Requires `securityLevel: 'loose'`.
|
|
219
|
+
|
|
220
|
+
### Styling
|
|
221
|
+
```
|
|
222
|
+
style nodeId fill:#f9f,stroke:#333,stroke-width:4px,color:#fff,stroke-dasharray: 5 5
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
**classDef:**
|
|
226
|
+
```
|
|
227
|
+
classDef myClass fill:#f9f,stroke:#333,stroke-width:4px
|
|
228
|
+
class nodeId myClass
|
|
229
|
+
nodeId:::myClass
|
|
230
|
+
classDef default fill:#f9f %% applies to all nodes without explicit class
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### Node Text Features
|
|
234
|
+
- Unicode: `id["This ❤ Unicode"]`
|
|
235
|
+
- Markdown: `id["\`**Bold** _Italic_\`"]` (requires `htmlLabels: false`)
|
|
236
|
+
- Line breaks: `id["Line1<br/>Line2"]`
|
|
237
|
+
|
|
238
|
+
### Example
|
|
239
|
+
```
|
|
240
|
+
---
|
|
241
|
+
title: Authentication Flow
|
|
242
|
+
config:
|
|
243
|
+
theme: default
|
|
244
|
+
---
|
|
245
|
+
flowchart TD
|
|
246
|
+
A([Start]) --> B{Has account?}
|
|
247
|
+
B -->|Yes| C[Login]
|
|
248
|
+
B -->|No| D[Register]
|
|
249
|
+
C --> E[(Database)]
|
|
250
|
+
D --> E
|
|
251
|
+
E --> F([End])
|
|
252
|
+
style E fill:#bbf,stroke:#33f
|
|
253
|
+
classDef decision fill:#ffd,stroke:#cc0
|
|
254
|
+
class B decision
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## 2. Sequence Diagram
|
|
260
|
+
|
|
261
|
+
**Keyword:** `sequenceDiagram`
|
|
262
|
+
|
|
263
|
+
### Participants
|
|
264
|
+
```
|
|
265
|
+
participant Alice
|
|
266
|
+
actor Bob
|
|
267
|
+
participant API@{ "type": "boundary" } %% special types
|
|
268
|
+
participant DB@{ "type": "database" }
|
|
269
|
+
participant Ctrl@{ "type": "control" }
|
|
270
|
+
participant Ent@{ "type": "entity" }
|
|
271
|
+
participant Coll@{ "type": "collections" }
|
|
272
|
+
participant Q@{ "type": "queue" }
|
|
273
|
+
participant A as Alice %% alias with 'as' keyword
|
|
274
|
+
participant API@{ "type": "boundary", "alias": "Public API" }
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
### Grouping / Box
|
|
278
|
+
```
|
|
279
|
+
box Aqua Group Name
|
|
280
|
+
participant A
|
|
281
|
+
participant B
|
|
282
|
+
end
|
|
283
|
+
box rgb(33,66,99)
|
|
284
|
+
participant C
|
|
285
|
+
end
|
|
286
|
+
box transparent Aqua %% force transparent when name is a color
|
|
287
|
+
participant D
|
|
288
|
+
end
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
### Message Arrow Types
|
|
292
|
+
| Arrow | Description |
|
|
293
|
+
|-------|-------------|
|
|
294
|
+
| `->` | Solid line, no arrowhead |
|
|
295
|
+
| `-->` | Dotted line, no arrowhead |
|
|
296
|
+
| `->>` | Solid line with arrowhead |
|
|
297
|
+
| `-->>` | Dotted line with arrowhead |
|
|
298
|
+
| `<<->>` | Solid bidirectional (v11+) |
|
|
299
|
+
| `<<-->>` | Dotted bidirectional (v11+) |
|
|
300
|
+
| `-x` | Solid line with cross |
|
|
301
|
+
| `--x` | Dotted line with cross |
|
|
302
|
+
| `-)` | Solid line, open arrow (async) |
|
|
303
|
+
| `--)` | Dotted line, open arrow (async) |
|
|
304
|
+
| `-\|\\` | Solid, top half arrowhead (v11.12.3+) |
|
|
305
|
+
| `--\|\\` | Dotted, top half arrowhead |
|
|
306
|
+
| `-\|/` | Solid, bottom half arrowhead |
|
|
307
|
+
| `--\|/` | Dotted, bottom half arrowhead |
|
|
308
|
+
|
|
309
|
+
### Message Syntax
|
|
310
|
+
```
|
|
311
|
+
Alice->>Bob: Message text
|
|
312
|
+
Alice->>+Bob: Message (activates Bob)
|
|
313
|
+
Bob-->>-Alice: Response (deactivates Bob)
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
### Central Connections (v11.12.3+)
|
|
317
|
+
```
|
|
318
|
+
Alice->>()Bob: from Alice to center
|
|
319
|
+
Alice()->>Bob: from center to Bob
|
|
320
|
+
John()->>()Alice: center to center
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
### Activations
|
|
324
|
+
```
|
|
325
|
+
activate Alice
|
|
326
|
+
deactivate Alice
|
|
327
|
+
%% or shorthand:
|
|
328
|
+
Alice->>+Bob: Message
|
|
329
|
+
Bob-->>-Alice: Reply
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
### Notes
|
|
333
|
+
```
|
|
334
|
+
Note right of Alice: Text
|
|
335
|
+
Note left of Bob: Text
|
|
336
|
+
Note over Alice,Bob: Spans two participants
|
|
337
|
+
```
|
|
338
|
+
Line breaks: `Note over A,B: Line 1<br/>Line 2`
|
|
339
|
+
|
|
340
|
+
### Fragments (Control Flow)
|
|
341
|
+
```
|
|
342
|
+
loop Every minute
|
|
343
|
+
John-->Alice: Ping
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
alt is sick
|
|
347
|
+
Bob->>Alice: Not great
|
|
348
|
+
else is well
|
|
349
|
+
Bob->>Alice: Great!
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
opt Extra response
|
|
353
|
+
Bob->>Alice: Thanks
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
par Alice to Bob
|
|
357
|
+
Alice->>Bob: Hi!
|
|
358
|
+
and Alice to John
|
|
359
|
+
Alice->>John: Hi!
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
critical Establish DB connection
|
|
363
|
+
Service-->DB: connect
|
|
364
|
+
option Network timeout
|
|
365
|
+
Service-->Service: Log error
|
|
366
|
+
option Credentials rejected
|
|
367
|
+
Service-->Service: Log other error
|
|
368
|
+
end
|
|
369
|
+
|
|
370
|
+
break booking failed
|
|
371
|
+
API-->Consumer: show failure
|
|
372
|
+
end
|
|
373
|
+
|
|
374
|
+
rect rgb(0,255,0)
|
|
375
|
+
... highlighted content ...
|
|
376
|
+
end
|
|
377
|
+
rect rgba(0,0,255,.1)
|
|
378
|
+
... content ...
|
|
379
|
+
end
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
### Dynamic Participants
|
|
383
|
+
```
|
|
384
|
+
create participant Carl
|
|
385
|
+
Alice->>Carl: Hi Carl!
|
|
386
|
+
create actor D as Donald
|
|
387
|
+
destroy Carl
|
|
388
|
+
Alice-xCarl: Goodbye
|
|
389
|
+
destroy Bob
|
|
390
|
+
Bob->>Alice: I agree
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
### Sequence Numbers
|
|
394
|
+
```
|
|
395
|
+
autonumber
|
|
396
|
+
Alice->>John: Message 1
|
|
397
|
+
John-->>Alice: Message 2
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
### Actor Menus / Links
|
|
401
|
+
```
|
|
402
|
+
link Alice: Dashboard @ https://dashboard.example.com/alice
|
|
403
|
+
links Alice: {"Dashboard": "https://example.com", "Wiki": "https://wiki.example.com"}
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
### Configuration
|
|
407
|
+
```javascript
|
|
408
|
+
mermaid.sequenceConfig = {
|
|
409
|
+
mirrorActors: true,
|
|
410
|
+
diagramMarginX: 50,
|
|
411
|
+
diagramMarginY: 10,
|
|
412
|
+
boxTextMargin: 5,
|
|
413
|
+
noteMargin: 10,
|
|
414
|
+
messageMargin: 35,
|
|
415
|
+
actorFontSize: 14,
|
|
416
|
+
actorFontFamily: '"Open Sans", sans-serif',
|
|
417
|
+
noteFontSize: 14,
|
|
418
|
+
messageFontSize: 16,
|
|
419
|
+
bottomMarginAdj: 1,
|
|
420
|
+
};
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
### Example
|
|
424
|
+
```
|
|
425
|
+
sequenceDiagram
|
|
426
|
+
autonumber
|
|
427
|
+
participant C as Client
|
|
428
|
+
participant A as API
|
|
429
|
+
participant DB as Database
|
|
430
|
+
C->>+A: POST /login
|
|
431
|
+
A->>+DB: SELECT user
|
|
432
|
+
DB-->>-A: User data
|
|
433
|
+
A-->>-C: JWT token
|
|
434
|
+
Note right of C: Store token
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
---
|
|
438
|
+
|
|
439
|
+
## 3. Class Diagram
|
|
440
|
+
|
|
441
|
+
**Keyword:** `classDiagram`
|
|
442
|
+
|
|
443
|
+
### Direction
|
|
444
|
+
```
|
|
445
|
+
classDiagram
|
|
446
|
+
direction LR %% TB | BT | LR | RL
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
### Define Classes
|
|
450
|
+
```
|
|
451
|
+
class Animal
|
|
452
|
+
class Animal["Animal with label"]
|
|
453
|
+
class `Animal Class!` %% backtick for special chars
|
|
454
|
+
|
|
455
|
+
%% With members:
|
|
456
|
+
class BankAccount {
|
|
457
|
+
+String owner
|
|
458
|
+
+BigDecimal balance
|
|
459
|
+
+deposit(amount) bool
|
|
460
|
+
-withdraw(amount) int
|
|
461
|
+
#protectedField
|
|
462
|
+
~packageField
|
|
463
|
+
+staticMethod()$
|
|
464
|
+
+abstractMethod()*
|
|
465
|
+
List~int~ data %% generics with ~
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
%% Colon syntax (one at a time):
|
|
469
|
+
BankAccount : +String owner
|
|
470
|
+
BankAccount : +deposit(amount)
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
### Visibility Modifiers
|
|
474
|
+
| Symbol | Meaning |
|
|
475
|
+
|--------|---------|
|
|
476
|
+
| `+` | Public |
|
|
477
|
+
| `-` | Private |
|
|
478
|
+
| `#` | Protected |
|
|
479
|
+
| `~` | Package/Internal |
|
|
480
|
+
| `*` (suffix) | Abstract |
|
|
481
|
+
| `$` (suffix) | Static |
|
|
482
|
+
|
|
483
|
+
### Annotations
|
|
484
|
+
```
|
|
485
|
+
class Shape <<interface>>
|
|
486
|
+
class Color <<enumeration>>
|
|
487
|
+
class Service <<Service>>
|
|
488
|
+
class Base <<Abstract>>
|
|
489
|
+
|
|
490
|
+
%% Or nested:
|
|
491
|
+
class Shape {
|
|
492
|
+
<<interface>>
|
|
493
|
+
+draw()
|
|
494
|
+
}
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
### Relationships
|
|
498
|
+
| Syntax | Type |
|
|
499
|
+
|--------|------|
|
|
500
|
+
| `ClassA <\|-- ClassB` | Inheritance |
|
|
501
|
+
| `ClassA *-- ClassB` | Composition |
|
|
502
|
+
| `ClassA o-- ClassB` | Aggregation |
|
|
503
|
+
| `ClassA --> ClassB` | Association |
|
|
504
|
+
| `ClassA -- ClassB` | Link (solid) |
|
|
505
|
+
| `ClassA ..> ClassB` | Dependency |
|
|
506
|
+
| `ClassA ..\|> ClassB` | Realization |
|
|
507
|
+
| `ClassA .. ClassB` | Link (dashed) |
|
|
508
|
+
|
|
509
|
+
**Labels and cardinality:**
|
|
510
|
+
```
|
|
511
|
+
ClassA "1" --> "*" ClassB : label text
|
|
512
|
+
ClassA <|--|> ClassB %% two-way inheritance
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
**Lollipop interface:**
|
|
516
|
+
```
|
|
517
|
+
bar ()-- foo
|
|
518
|
+
foo --() bar
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
### Namespace
|
|
522
|
+
```
|
|
523
|
+
namespace BaseShapes {
|
|
524
|
+
class Triangle
|
|
525
|
+
class Rectangle {
|
|
526
|
+
double width
|
|
527
|
+
double height
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
### Notes
|
|
533
|
+
```
|
|
534
|
+
note "General diagram note"
|
|
535
|
+
note for MyClass "Note for specific class"
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
### Interaction
|
|
539
|
+
```
|
|
540
|
+
link ClassName "https://url" "tooltip"
|
|
541
|
+
click ClassName call callbackFn() "tooltip"
|
|
542
|
+
click ClassName href "https://url" "tooltip"
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
### Styling
|
|
546
|
+
```
|
|
547
|
+
style Animal fill:#f9f,stroke:#333,stroke-width:4px
|
|
548
|
+
classDef myStyle fill:#f96,stroke:#333
|
|
549
|
+
class Animal myStyle
|
|
550
|
+
Animal:::myStyle %% shorthand
|
|
551
|
+
classDef default fill:#f9f %% applies to all
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
### Configuration
|
|
555
|
+
```yaml
|
|
556
|
+
config:
|
|
557
|
+
class:
|
|
558
|
+
hideEmptyMembersBox: true
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
### Example
|
|
562
|
+
```
|
|
563
|
+
classDiagram
|
|
564
|
+
direction TB
|
|
565
|
+
namespace Shapes {
|
|
566
|
+
class Shape <<interface>> {
|
|
567
|
+
+draw() void
|
|
568
|
+
+area() float
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
class Circle {
|
|
572
|
+
+float radius
|
|
573
|
+
+draw() void
|
|
574
|
+
+area() float
|
|
575
|
+
}
|
|
576
|
+
class Rectangle {
|
|
577
|
+
+float width
|
|
578
|
+
+float height
|
|
579
|
+
+draw() void
|
|
580
|
+
+area() float
|
|
581
|
+
}
|
|
582
|
+
Shape <|.. Circle : implements
|
|
583
|
+
Shape <|.. Rectangle : implements
|
|
584
|
+
Circle "1" *-- "1" Point : center
|
|
585
|
+
```
|
|
586
|
+
|
|
587
|
+
---
|
|
588
|
+
|
|
589
|
+
## 4. State Diagram
|
|
590
|
+
|
|
591
|
+
**Keywords:** `stateDiagram-v2` (preferred) or `stateDiagram`
|
|
592
|
+
|
|
593
|
+
### States
|
|
594
|
+
```
|
|
595
|
+
stateDiagram-v2
|
|
596
|
+
stateId %% simple state
|
|
597
|
+
state "Description" as s2 %% state with description
|
|
598
|
+
s2 : This is a state description %% colon syntax
|
|
599
|
+
[*] --> s1 %% start state
|
|
600
|
+
s1 --> [*] %% end state
|
|
601
|
+
```
|
|
602
|
+
|
|
603
|
+
### Transitions
|
|
604
|
+
```
|
|
605
|
+
s1 --> s2
|
|
606
|
+
s1 --> s2: Transition label
|
|
607
|
+
```
|
|
608
|
+
|
|
609
|
+
### Direction
|
|
610
|
+
```
|
|
611
|
+
direction LR %% inside diagram or composite state
|
|
612
|
+
```
|
|
613
|
+
|
|
614
|
+
### Composite States
|
|
615
|
+
```
|
|
616
|
+
state First {
|
|
617
|
+
[*] --> second
|
|
618
|
+
second --> [*]
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
state "Named" as Named {
|
|
622
|
+
[*] --> inner
|
|
623
|
+
}
|
|
624
|
+
```
|
|
625
|
+
|
|
626
|
+
### Special States
|
|
627
|
+
```
|
|
628
|
+
state if_state <<choice>>
|
|
629
|
+
state fork_state <<fork>>
|
|
630
|
+
state join_state <<join>>
|
|
631
|
+
```
|
|
632
|
+
|
|
633
|
+
### Concurrency
|
|
634
|
+
```
|
|
635
|
+
state Active {
|
|
636
|
+
[*] --> NumLockOff
|
|
637
|
+
NumLockOff --> NumLockOn : EvNumLockPressed
|
|
638
|
+
--
|
|
639
|
+
[*] --> CapsLockOff
|
|
640
|
+
CapsLockOff --> CapsLockOn : EvCapsLockPressed
|
|
641
|
+
}
|
|
642
|
+
```
|
|
643
|
+
|
|
644
|
+
### Notes
|
|
645
|
+
```
|
|
646
|
+
note right of State1
|
|
647
|
+
Important note here.
|
|
648
|
+
end note
|
|
649
|
+
note left of State2 : Inline note
|
|
650
|
+
```
|
|
651
|
+
|
|
652
|
+
### Styling (classDef)
|
|
653
|
+
```
|
|
654
|
+
classDef myStyle fill:#f00,color:white,font-weight:bold
|
|
655
|
+
class Still myStyle
|
|
656
|
+
class Moving, Crash movement
|
|
657
|
+
Still:::myStyle %% shorthand in transition
|
|
658
|
+
|
|
659
|
+
%% Limitations: cannot style start/end states or composite states
|
|
660
|
+
```
|
|
661
|
+
|
|
662
|
+
### Example
|
|
663
|
+
```
|
|
664
|
+
stateDiagram-v2
|
|
665
|
+
direction LR
|
|
666
|
+
[*] --> Idle
|
|
667
|
+
Idle --> Processing : start
|
|
668
|
+
state Processing {
|
|
669
|
+
direction TB
|
|
670
|
+
[*] --> Fetching
|
|
671
|
+
Fetching --> Parsing : data received
|
|
672
|
+
Parsing --> [*]
|
|
673
|
+
}
|
|
674
|
+
Processing --> Done : success
|
|
675
|
+
Processing --> Error : failure
|
|
676
|
+
Error --> Idle : retry
|
|
677
|
+
Done --> [*]
|
|
678
|
+
```
|
|
679
|
+
|
|
680
|
+
---
|
|
681
|
+
|
|
682
|
+
## 5. Entity Relationship Diagram
|
|
683
|
+
|
|
684
|
+
**Keyword:** `erDiagram`
|
|
685
|
+
|
|
686
|
+
### Relationship Syntax
|
|
687
|
+
```
|
|
688
|
+
ENTITY1 RELATIONSHIP ENTITY2 : "label"
|
|
689
|
+
```
|
|
690
|
+
|
|
691
|
+
### Cardinality Markers
|
|
692
|
+
| Left | Right | Meaning |
|
|
693
|
+
|------|-------|---------|
|
|
694
|
+
| `\|o` | `o\|` | Zero or one |
|
|
695
|
+
| `\|\|` | `\|\|` | Exactly one |
|
|
696
|
+
| `}o` | `o{` | Zero or more |
|
|
697
|
+
| `}\|` | `\|{` | One or more |
|
|
698
|
+
|
|
699
|
+
**Aliases:** `only one`, `1`, `zero or one`, `one or more`, `1+`, `zero or more`, `0+`, `many(0)`, `many(1)`
|
|
700
|
+
|
|
701
|
+
### Identification (line style)
|
|
702
|
+
| Syntax | Type |
|
|
703
|
+
|--------|------|
|
|
704
|
+
| `--` | Identifying (solid) |
|
|
705
|
+
| `..` | Non-identifying (dashed) |
|
|
706
|
+
|
|
707
|
+
**Aliases:** `to` = identifying, `optionally to` = non-identifying
|
|
708
|
+
|
|
709
|
+
### Full relationship examples:
|
|
710
|
+
```
|
|
711
|
+
CUSTOMER ||--o{ ORDER : places
|
|
712
|
+
CAR 1 to zero or more NAMED-DRIVER : allows
|
|
713
|
+
PERSON many(0) optionally to 0+ NAMED-DRIVER : is
|
|
714
|
+
```
|
|
715
|
+
|
|
716
|
+
### Attributes
|
|
717
|
+
```
|
|
718
|
+
ENTITY {
|
|
719
|
+
string name
|
|
720
|
+
int age
|
|
721
|
+
string email PK "Primary key"
|
|
722
|
+
string(99) firstName "Only 99 chars"
|
|
723
|
+
string phone UK %% Unique Key
|
|
724
|
+
string orderId FK %% Foreign Key
|
|
725
|
+
string cardId PK, FK %% Multiple keys
|
|
726
|
+
string[] tags %% array type
|
|
727
|
+
}
|
|
728
|
+
```
|
|
729
|
+
|
|
730
|
+
Keys: `PK`, `FK`, `UK` (comma-separated for multiple)
|
|
731
|
+
|
|
732
|
+
### Aliases (entity display names)
|
|
733
|
+
```
|
|
734
|
+
p[Person] {
|
|
735
|
+
string firstName
|
|
736
|
+
}
|
|
737
|
+
a["Customer Account"] {
|
|
738
|
+
string email
|
|
739
|
+
}
|
|
740
|
+
p ||--o| a : has
|
|
741
|
+
```
|
|
742
|
+
|
|
743
|
+
### Direction
|
|
744
|
+
```
|
|
745
|
+
erDiagram
|
|
746
|
+
direction LR %% TB | BT | LR | RL
|
|
747
|
+
```
|
|
748
|
+
|
|
749
|
+
### Styling
|
|
750
|
+
```
|
|
751
|
+
style id1 fill:#f9f,stroke:#333
|
|
752
|
+
classDef myClass fill:#f96
|
|
753
|
+
class ENTITY myClass
|
|
754
|
+
ENTITY:::myClass
|
|
755
|
+
classDef default fill:#f9f
|
|
756
|
+
```
|
|
757
|
+
|
|
758
|
+
### Example
|
|
759
|
+
```
|
|
760
|
+
erDiagram
|
|
761
|
+
direction LR
|
|
762
|
+
CUSTOMER ||--o{ ORDER : places
|
|
763
|
+
CUSTOMER {
|
|
764
|
+
string id PK
|
|
765
|
+
string name
|
|
766
|
+
string email UK
|
|
767
|
+
}
|
|
768
|
+
ORDER ||--|{ LINE-ITEM : contains
|
|
769
|
+
ORDER {
|
|
770
|
+
int orderNumber PK
|
|
771
|
+
string customerId FK
|
|
772
|
+
date orderDate
|
|
773
|
+
}
|
|
774
|
+
PRODUCT ||--o{ LINE-ITEM : "ordered in"
|
|
775
|
+
PRODUCT {
|
|
776
|
+
string code PK
|
|
777
|
+
string name
|
|
778
|
+
float price
|
|
779
|
+
}
|
|
780
|
+
```
|
|
781
|
+
|
|
782
|
+
---
|
|
783
|
+
|
|
784
|
+
## 6. Gantt Diagram
|
|
785
|
+
|
|
786
|
+
**Keyword:** `gantt`
|
|
787
|
+
|
|
788
|
+
### Structure
|
|
789
|
+
```
|
|
790
|
+
gantt
|
|
791
|
+
title Chart Title
|
|
792
|
+
dateFormat YYYY-MM-DD
|
|
793
|
+
axisFormat %m/%d
|
|
794
|
+
tickInterval 1week
|
|
795
|
+
weekday monday
|
|
796
|
+
excludes weekends
|
|
797
|
+
excludes 2024-01-01, sunday
|
|
798
|
+
weekend friday %% define weekend start (friday or saturday)
|
|
799
|
+
todayMarker off %% or: todayMarker stroke-width:5px,stroke:#0f0,opacity:0.5
|
|
800
|
+
displayMode compact %% (or via frontmatter: displayMode: compact)
|
|
801
|
+
|
|
802
|
+
section Section Name
|
|
803
|
+
Task Name : [tags,] [id,] startDate, endDate/duration
|
|
804
|
+
```
|
|
805
|
+
|
|
806
|
+
### Task Metadata Syntax
|
|
807
|
+
```
|
|
808
|
+
Task : a1, 2024-01-01, 30d %% id, start, duration
|
|
809
|
+
Task : after a1, 20d %% after another task
|
|
810
|
+
Task : 2024-01-01, 2024-02-01 %% start, end date
|
|
811
|
+
Task : 2024-01-01, until b %% start until another task starts
|
|
812
|
+
Task : crit, active, a1, 2024-01-01, 3d %% with tags
|
|
813
|
+
Task : milestone, m1, 2024-01-25, 0d %% milestone
|
|
814
|
+
Task : vert, v1, 2024-01-15, 0d %% vertical marker
|
|
815
|
+
```
|
|
816
|
+
|
|
817
|
+
**Tags (optional, specified first):** `active`, `done`, `crit`, `milestone`, `vert`
|
|
818
|
+
|
|
819
|
+
### Date Formats (dateFormat)
|
|
820
|
+
| Token | Meaning |
|
|
821
|
+
|-------|---------|
|
|
822
|
+
| `YYYY` | 4-digit year |
|
|
823
|
+
| `YY` | 2-digit year |
|
|
824
|
+
| `MM` | Month (01-12) |
|
|
825
|
+
| `DD` | Day (01-31) |
|
|
826
|
+
| `HH` | Hour 24h (00-23) |
|
|
827
|
+
| `hh` | Hour 12h (01-12) |
|
|
828
|
+
| `mm` | Minutes |
|
|
829
|
+
| `ss` | Seconds |
|
|
830
|
+
| `X` | Unix timestamp |
|
|
831
|
+
| `x` | Unix ms timestamp |
|
|
832
|
+
|
|
833
|
+
### Axis Formats (axisFormat — d3 strftime)
|
|
834
|
+
`%Y` year, `%m` month, `%d` day, `%H` hour, `%M` minute, `%b` short month, `%a` short weekday
|
|
835
|
+
|
|
836
|
+
### tickInterval
|
|
837
|
+
Pattern: `[1-9][0-9]*(millisecond|second|minute|hour|day|week|month)`
|
|
838
|
+
|
|
839
|
+
### Configuration
|
|
840
|
+
```javascript
|
|
841
|
+
mermaid.ganttConfig = {
|
|
842
|
+
titleTopMargin: 25,
|
|
843
|
+
barHeight: 20,
|
|
844
|
+
barGap: 4,
|
|
845
|
+
topPadding: 75,
|
|
846
|
+
rightPadding: 75,
|
|
847
|
+
leftPadding: 75,
|
|
848
|
+
fontSize: 12,
|
|
849
|
+
sectionFontSize: 24,
|
|
850
|
+
numberSectionStyles: 4,
|
|
851
|
+
axisFormat: '%d/%m',
|
|
852
|
+
tickInterval: '1week',
|
|
853
|
+
topAxis: true,
|
|
854
|
+
displayMode: 'compact',
|
|
855
|
+
weekday: 'sunday',
|
|
856
|
+
};
|
|
857
|
+
```
|
|
858
|
+
|
|
859
|
+
### Interaction
|
|
860
|
+
```
|
|
861
|
+
click taskId href "https://url"
|
|
862
|
+
click taskId call callbackFn(args)
|
|
863
|
+
```
|
|
864
|
+
|
|
865
|
+
### Example
|
|
866
|
+
```
|
|
867
|
+
gantt
|
|
868
|
+
title Project Timeline
|
|
869
|
+
dateFormat YYYY-MM-DD
|
|
870
|
+
axisFormat %b %d
|
|
871
|
+
excludes weekends
|
|
872
|
+
|
|
873
|
+
section Planning
|
|
874
|
+
Requirements : done, req, 2024-01-01, 7d
|
|
875
|
+
Design : active, des, after req, 14d
|
|
876
|
+
|
|
877
|
+
section Development
|
|
878
|
+
Backend API : crit, back, after des, 21d
|
|
879
|
+
Frontend : front, after des, 21d
|
|
880
|
+
Integration : after back front, 7d
|
|
881
|
+
|
|
882
|
+
section Release
|
|
883
|
+
Testing : crit, 7d
|
|
884
|
+
Deploy : milestone, 2024-03-15, 0d
|
|
885
|
+
```
|
|
886
|
+
|
|
887
|
+
---
|
|
888
|
+
|
|
889
|
+
## 7. Pie Chart
|
|
890
|
+
|
|
891
|
+
**Keyword:** `pie`
|
|
892
|
+
|
|
893
|
+
### Syntax
|
|
894
|
+
```
|
|
895
|
+
pie [showData] [title "Title Text"]
|
|
896
|
+
"Label A" : 42.5
|
|
897
|
+
"Label B" : 30
|
|
898
|
+
"Label C" : 27.5
|
|
899
|
+
```
|
|
900
|
+
- Values must be positive numbers > 0
|
|
901
|
+
- `showData` renders actual values next to labels
|
|
902
|
+
|
|
903
|
+
### Configuration
|
|
904
|
+
```yaml
|
|
905
|
+
config:
|
|
906
|
+
pie:
|
|
907
|
+
textPosition: 0.75 %% 0.0 (center) to 1.0 (outer edge)
|
|
908
|
+
themeVariables:
|
|
909
|
+
pieOuterStrokeWidth: "5px"
|
|
910
|
+
```
|
|
911
|
+
|
|
912
|
+
### Example
|
|
913
|
+
```
|
|
914
|
+
---
|
|
915
|
+
config:
|
|
916
|
+
pie:
|
|
917
|
+
textPosition: 0.5
|
|
918
|
+
---
|
|
919
|
+
pie showData
|
|
920
|
+
title Browser Market Share
|
|
921
|
+
"Chrome" : 65.5
|
|
922
|
+
"Safari" : 19.2
|
|
923
|
+
"Firefox" : 4.0
|
|
924
|
+
"Edge" : 4.1
|
|
925
|
+
"Other" : 7.2
|
|
926
|
+
```
|
|
927
|
+
|
|
928
|
+
---
|
|
929
|
+
|
|
930
|
+
## 8. Quadrant Chart
|
|
931
|
+
|
|
932
|
+
**Keyword:** `quadrantChart`
|
|
933
|
+
|
|
934
|
+
### Syntax
|
|
935
|
+
```
|
|
936
|
+
quadrantChart
|
|
937
|
+
title Chart Title
|
|
938
|
+
x-axis Low Label --> High Label
|
|
939
|
+
x-axis "Left Label Only" %% single label
|
|
940
|
+
y-axis Bottom Label --> Top Label
|
|
941
|
+
quadrant-1 Top-right text %% Q1 = top right
|
|
942
|
+
quadrant-2 Top-left text %% Q2 = top left
|
|
943
|
+
quadrant-3 Bottom-left text %% Q3 = bottom left
|
|
944
|
+
quadrant-4 Bottom-right text %% Q4 = bottom right
|
|
945
|
+
Point A: [0.75, 0.80] %% x,y in range 0-1
|
|
946
|
+
Point B:::myClass: [0.3, 0.5] %% with class
|
|
947
|
+
Point C: [0.5, 0.5] radius: 12, color: #ff0000, stroke-color: #000, stroke-width: 2px
|
|
948
|
+
```
|
|
949
|
+
|
|
950
|
+
### Point Styling
|
|
951
|
+
```
|
|
952
|
+
Point A: [0.9, 0.0] radius: 12
|
|
953
|
+
Point B: [0.8, 0.1] color: #ff3300, radius: 10
|
|
954
|
+
classDef myClass color: #109060, radius: 10
|
|
955
|
+
Point C:::myClass: [0.5, 0.5]
|
|
956
|
+
```
|
|
957
|
+
|
|
958
|
+
### Configuration
|
|
959
|
+
```yaml
|
|
960
|
+
config:
|
|
961
|
+
quadrantChart:
|
|
962
|
+
chartWidth: 500
|
|
963
|
+
chartHeight: 500
|
|
964
|
+
titlePadding: 10
|
|
965
|
+
titleFontSize: 20
|
|
966
|
+
quadrantPadding: 5
|
|
967
|
+
quadrantLabelFontSize: 16
|
|
968
|
+
pointRadius: 5
|
|
969
|
+
pointLabelFontSize: 12
|
|
970
|
+
xAxisPosition: top %% top | bottom
|
|
971
|
+
yAxisPosition: left %% left | right
|
|
972
|
+
themeVariables:
|
|
973
|
+
quadrant1Fill: "#ff0000"
|
|
974
|
+
quadrant2Fill: "#00ff00"
|
|
975
|
+
quadrant3Fill: "#0000ff"
|
|
976
|
+
quadrant4Fill: "#ffff00"
|
|
977
|
+
quadrantPointFill: "#ff00ff"
|
|
978
|
+
quadrantTitleFill: "#000000"
|
|
979
|
+
```
|
|
980
|
+
|
|
981
|
+
### Example
|
|
982
|
+
```
|
|
983
|
+
quadrantChart
|
|
984
|
+
title Eisenhower Matrix
|
|
985
|
+
x-axis Urgent --> Not Urgent
|
|
986
|
+
y-axis Not Important --> Important
|
|
987
|
+
quadrant-1 Plan
|
|
988
|
+
quadrant-2 Do
|
|
989
|
+
quadrant-3 Delegate
|
|
990
|
+
quadrant-4 Delete
|
|
991
|
+
Email: [0.9, 0.3]
|
|
992
|
+
Meeting: [0.8, 0.7]
|
|
993
|
+
Exercise: [0.2, 0.9]
|
|
994
|
+
Social media: [0.1, 0.1]
|
|
995
|
+
```
|
|
996
|
+
|
|
997
|
+
---
|
|
998
|
+
|
|
999
|
+
## 9. Requirement Diagram
|
|
1000
|
+
|
|
1001
|
+
**Keyword:** `requirementDiagram`
|
|
1002
|
+
|
|
1003
|
+
### Requirement Types
|
|
1004
|
+
`requirement` | `functionalRequirement` | `interfaceRequirement` | `performanceRequirement` | `physicalRequirement` | `designConstraint`
|
|
1005
|
+
|
|
1006
|
+
### Risk Options
|
|
1007
|
+
`Low` | `Medium` | `High`
|
|
1008
|
+
|
|
1009
|
+
### Verify Methods
|
|
1010
|
+
`Analysis` | `Inspection` | `Test` | `Demonstration`
|
|
1011
|
+
|
|
1012
|
+
### Syntax
|
|
1013
|
+
```
|
|
1014
|
+
requirementDiagram
|
|
1015
|
+
|
|
1016
|
+
direction LR %% TB | BT | LR | RL
|
|
1017
|
+
|
|
1018
|
+
requirement req_name {
|
|
1019
|
+
id: 1
|
|
1020
|
+
text: requirement description
|
|
1021
|
+
risk: high
|
|
1022
|
+
verifymethod: test
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
functionalRequirement func_req {
|
|
1026
|
+
id: 1.1
|
|
1027
|
+
text: "functional requirement"
|
|
1028
|
+
risk: low
|
|
1029
|
+
verifymethod: inspection
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
element element_name {
|
|
1033
|
+
type: simulation
|
|
1034
|
+
docRef: path/to/doc
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
req_name - satisfies -> element_name
|
|
1038
|
+
element_name <- copies - other_elem
|
|
1039
|
+
```
|
|
1040
|
+
|
|
1041
|
+
**Relationship types:** `contains` | `copies` | `derives` | `satisfies` | `verifies` | `refines` | `traces`
|
|
1042
|
+
|
|
1043
|
+
### Styling
|
|
1044
|
+
```
|
|
1045
|
+
style req_name fill:#ffa,stroke:#000,color:green
|
|
1046
|
+
classDef important fill:#f96,stroke:#333,font-weight:bold
|
|
1047
|
+
class req_name,elem_name important
|
|
1048
|
+
req_name:::important
|
|
1049
|
+
```
|
|
1050
|
+
|
|
1051
|
+
### Example
|
|
1052
|
+
```
|
|
1053
|
+
requirementDiagram
|
|
1054
|
+
|
|
1055
|
+
requirement sys_req {
|
|
1056
|
+
id: 1
|
|
1057
|
+
text: System shall process 1000 req/s
|
|
1058
|
+
risk: high
|
|
1059
|
+
verifymethod: test
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
performanceRequirement perf_req {
|
|
1063
|
+
id: 1.1
|
|
1064
|
+
text: Response time < 100ms
|
|
1065
|
+
risk: medium
|
|
1066
|
+
verifymethod: demonstration
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
element load_test {
|
|
1070
|
+
type: "test suite"
|
|
1071
|
+
docRef: tests/load_test
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
load_test - verifies -> perf_req
|
|
1075
|
+
sys_req - contains -> perf_req
|
|
1076
|
+
```
|
|
1077
|
+
|
|
1078
|
+
---
|
|
1079
|
+
|
|
1080
|
+
## 10. GitGraph
|
|
1081
|
+
|
|
1082
|
+
**Keyword:** `gitGraph`
|
|
1083
|
+
|
|
1084
|
+
### Commands
|
|
1085
|
+
```
|
|
1086
|
+
gitGraph
|
|
1087
|
+
commit %% normal commit on current branch
|
|
1088
|
+
commit id: "custom-id"
|
|
1089
|
+
commit id: "tag" tag: "v1.0.0"
|
|
1090
|
+
commit type: NORMAL %% NORMAL | REVERSE | HIGHLIGHT
|
|
1091
|
+
commit id: "A" tag: "release" type: HIGHLIGHT
|
|
1092
|
+
branch develop
|
|
1093
|
+
branch "cherry-pick" %% quoted if could be keyword
|
|
1094
|
+
checkout develop
|
|
1095
|
+
switch develop %% same as checkout
|
|
1096
|
+
merge develop
|
|
1097
|
+
merge develop id: "merge-id" tag: "merge-tag" type: REVERSE
|
|
1098
|
+
cherry-pick id: "commit-id"
|
|
1099
|
+
cherry-pick id: "merge-id" parent: "parent-commit-id"
|
|
1100
|
+
```
|
|
1101
|
+
|
|
1102
|
+
### Configuration (via frontmatter)
|
|
1103
|
+
```yaml
|
|
1104
|
+
config:
|
|
1105
|
+
gitGraph:
|
|
1106
|
+
showBranches: true
|
|
1107
|
+
showCommitLabel: true
|
|
1108
|
+
mainBranchName: main
|
|
1109
|
+
mainBranchOrder: 0
|
|
1110
|
+
parallelCommits: false
|
|
1111
|
+
rotateCommitLabel: true
|
|
1112
|
+
```
|
|
1113
|
+
|
|
1114
|
+
### Theming
|
|
1115
|
+
```yaml
|
|
1116
|
+
config:
|
|
1117
|
+
theme: base
|
|
1118
|
+
themeVariables:
|
|
1119
|
+
git0: "#ff0000"
|
|
1120
|
+
git1: "#00ff00"
|
|
1121
|
+
gitBranchLabel0: "#ffffff"
|
|
1122
|
+
commitLabelBackground: "#f4f4f4"
|
|
1123
|
+
commitLabelColor: "#000000"
|
|
1124
|
+
commitLabelFontSize: "16px"
|
|
1125
|
+
tagLabelFontSize: "14px"
|
|
1126
|
+
tagLabelBackground: "#fff"
|
|
1127
|
+
tagLabelBorder: "#ccc"
|
|
1128
|
+
tagLabelColor: "#000"
|
|
1129
|
+
```
|
|
1130
|
+
|
|
1131
|
+
### Example
|
|
1132
|
+
```
|
|
1133
|
+
---
|
|
1134
|
+
title: Feature Branch Workflow
|
|
1135
|
+
---
|
|
1136
|
+
gitGraph
|
|
1137
|
+
commit id: "init"
|
|
1138
|
+
branch develop
|
|
1139
|
+
checkout develop
|
|
1140
|
+
commit id: "feature-start"
|
|
1141
|
+
branch feature/auth
|
|
1142
|
+
checkout feature/auth
|
|
1143
|
+
commit id: "add-login"
|
|
1144
|
+
commit id: "add-logout"
|
|
1145
|
+
checkout develop
|
|
1146
|
+
merge feature/auth id: "merge-auth" tag: "v0.2"
|
|
1147
|
+
checkout main
|
|
1148
|
+
merge develop id: "release" tag: "v1.0.0" type: HIGHLIGHT
|
|
1149
|
+
```
|
|
1150
|
+
|
|
1151
|
+
---
|
|
1152
|
+
|
|
1153
|
+
## 11. Mindmap
|
|
1154
|
+
|
|
1155
|
+
**Keyword:** `mindmap`
|
|
1156
|
+
|
|
1157
|
+
### Syntax (indentation-based hierarchy)
|
|
1158
|
+
```
|
|
1159
|
+
mindmap
|
|
1160
|
+
root((Central Topic))
|
|
1161
|
+
Branch A
|
|
1162
|
+
Leaf 1
|
|
1163
|
+
Leaf 2
|
|
1164
|
+
Branch B
|
|
1165
|
+
::icon(fa fa-book)
|
|
1166
|
+
:::myClass
|
|
1167
|
+
Sub-branch
|
|
1168
|
+
Deep leaf
|
|
1169
|
+
```
|
|
1170
|
+
|
|
1171
|
+
### Node Shapes
|
|
1172
|
+
| Syntax | Shape |
|
|
1173
|
+
|--------|-------|
|
|
1174
|
+
| `id[text]` | Square |
|
|
1175
|
+
| `id(text)` | Rounded square |
|
|
1176
|
+
| `id((text))` | Circle |
|
|
1177
|
+
| `id))text((` | Bang (cloud-like) |
|
|
1178
|
+
| `id)text(` | Cloud |
|
|
1179
|
+
| `id{{text}}` | Hexagon |
|
|
1180
|
+
| `text` (plain) | Default (rounded rectangle) |
|
|
1181
|
+
|
|
1182
|
+
### Icons (requires font icons loaded by integrator)
|
|
1183
|
+
```
|
|
1184
|
+
Node
|
|
1185
|
+
::icon(fa fa-book)
|
|
1186
|
+
::icon(mdi mdi-skull-outline)
|
|
1187
|
+
```
|
|
1188
|
+
|
|
1189
|
+
### CSS Classes
|
|
1190
|
+
```
|
|
1191
|
+
Node[Text]
|
|
1192
|
+
:::className1 className2
|
|
1193
|
+
```
|
|
1194
|
+
|
|
1195
|
+
### Markdown Strings
|
|
1196
|
+
```
|
|
1197
|
+
mindmap
|
|
1198
|
+
id1["`**Bold** and _italic_`"]
|
|
1199
|
+
id2["`Long text wraps
|
|
1200
|
+
automatically`"]
|
|
1201
|
+
```
|
|
1202
|
+
|
|
1203
|
+
### Layout
|
|
1204
|
+
```yaml
|
|
1205
|
+
config:
|
|
1206
|
+
layout: tidy-tree %% requires tidy-tree plugin registration
|
|
1207
|
+
```
|
|
1208
|
+
|
|
1209
|
+
### Example
|
|
1210
|
+
```
|
|
1211
|
+
mindmap
|
|
1212
|
+
root((Project))
|
|
1213
|
+
Planning
|
|
1214
|
+
::icon(fa fa-calendar)
|
|
1215
|
+
Requirements
|
|
1216
|
+
Timeline
|
|
1217
|
+
Development
|
|
1218
|
+
::icon(fa fa-code)
|
|
1219
|
+
Backend
|
|
1220
|
+
API
|
|
1221
|
+
Database
|
|
1222
|
+
Frontend
|
|
1223
|
+
UI
|
|
1224
|
+
Tests
|
|
1225
|
+
Deployment
|
|
1226
|
+
Staging
|
|
1227
|
+
Production
|
|
1228
|
+
```
|
|
1229
|
+
|
|
1230
|
+
---
|
|
1231
|
+
|
|
1232
|
+
## 12. Timeline
|
|
1233
|
+
|
|
1234
|
+
**Keyword:** `timeline`
|
|
1235
|
+
|
|
1236
|
+
### Syntax
|
|
1237
|
+
```
|
|
1238
|
+
timeline
|
|
1239
|
+
title Timeline Title
|
|
1240
|
+
section Section Name
|
|
1241
|
+
TimePeriod : Event 1 : Event 2
|
|
1242
|
+
TimePeriod2 : Event
|
|
1243
|
+
: Another event on same period
|
|
1244
|
+
```
|
|
1245
|
+
- Time periods and events are plain text
|
|
1246
|
+
- Multiple events per period: separate with `:` or new lines (same indent, leading `:`)
|
|
1247
|
+
- Line breaks: use `<br>`
|
|
1248
|
+
|
|
1249
|
+
### Styling
|
|
1250
|
+
```yaml
|
|
1251
|
+
config:
|
|
1252
|
+
theme: base
|
|
1253
|
+
timeline:
|
|
1254
|
+
disableMulticolor: true %% all periods same color
|
|
1255
|
+
themeVariables:
|
|
1256
|
+
cScale0: '#ff0000'
|
|
1257
|
+
cScaleLabel0: '#ffffff'
|
|
1258
|
+
cScale1: '#00ff00'
|
|
1259
|
+
cScale2: '#0000ff'
|
|
1260
|
+
%% cScale0..cScale11, cScaleLabel0..cScaleLabel11
|
|
1261
|
+
```
|
|
1262
|
+
|
|
1263
|
+
### Example
|
|
1264
|
+
```
|
|
1265
|
+
timeline
|
|
1266
|
+
title Technology Timeline
|
|
1267
|
+
section Early Computing
|
|
1268
|
+
1940s : First computers
|
|
1269
|
+
: ENIAC developed
|
|
1270
|
+
1950s : Transistors
|
|
1271
|
+
: FORTRAN language
|
|
1272
|
+
section Personal Computing
|
|
1273
|
+
1970s : Microprocessors
|
|
1274
|
+
: Apple I
|
|
1275
|
+
1980s : IBM PC
|
|
1276
|
+
: Macintosh
|
|
1277
|
+
section Internet Era
|
|
1278
|
+
1990s : World Wide Web
|
|
1279
|
+
: Browser wars
|
|
1280
|
+
2000s : Social media
|
|
1281
|
+
: Smartphones
|
|
1282
|
+
```
|
|
1283
|
+
|
|
1284
|
+
---
|
|
1285
|
+
|
|
1286
|
+
## 13. Sankey Diagram
|
|
1287
|
+
|
|
1288
|
+
**Keyword:** `sankey` (v10.3.0+)
|
|
1289
|
+
|
|
1290
|
+
### Syntax (CSV-like format)
|
|
1291
|
+
```
|
|
1292
|
+
sankey
|
|
1293
|
+
|
|
1294
|
+
source,target,value
|
|
1295
|
+
Source A,Target B,100
|
|
1296
|
+
Source A,Target C,50
|
|
1297
|
+
"Source, with comma","Target D",75
|
|
1298
|
+
"Source with ""quotes""","Target E",25
|
|
1299
|
+
```
|
|
1300
|
+
|
|
1301
|
+
Rules:
|
|
1302
|
+
- 3 columns only: `source`, `target`, `value`
|
|
1303
|
+
- Empty lines allowed for readability
|
|
1304
|
+
- Wrap commas in double quotes
|
|
1305
|
+
- Escape double quotes by doubling them
|
|
1306
|
+
|
|
1307
|
+
### Configuration
|
|
1308
|
+
```yaml
|
|
1309
|
+
config:
|
|
1310
|
+
sankey:
|
|
1311
|
+
showValues: false %% hide/show value labels
|
|
1312
|
+
width: 800
|
|
1313
|
+
height: 400
|
|
1314
|
+
linkColor: source %% source | target | gradient | #hex
|
|
1315
|
+
nodeAlignment: justify %% justify | center | left | right
|
|
1316
|
+
```
|
|
1317
|
+
|
|
1318
|
+
### Example
|
|
1319
|
+
```
|
|
1320
|
+
---
|
|
1321
|
+
config:
|
|
1322
|
+
sankey:
|
|
1323
|
+
showValues: false
|
|
1324
|
+
---
|
|
1325
|
+
sankey
|
|
1326
|
+
|
|
1327
|
+
Electricity,Homes,113
|
|
1328
|
+
Electricity,Industry,342
|
|
1329
|
+
Electricity,Transport,37
|
|
1330
|
+
|
|
1331
|
+
Gas,Heating,152
|
|
1332
|
+
Gas,Industry,48
|
|
1333
|
+
```
|
|
1334
|
+
|
|
1335
|
+
---
|
|
1336
|
+
|
|
1337
|
+
## 14. XY Chart
|
|
1338
|
+
|
|
1339
|
+
**Keyword:** `xychart`
|
|
1340
|
+
|
|
1341
|
+
### Syntax
|
|
1342
|
+
```
|
|
1343
|
+
xychart [horizontal]
|
|
1344
|
+
title "Chart Title"
|
|
1345
|
+
x-axis [jan, feb, mar] %% categorical
|
|
1346
|
+
x-axis "X Title" 0 --> 100 %% numeric range
|
|
1347
|
+
y-axis "Y Title" 0 --> 100
|
|
1348
|
+
y-axis "Y Title" %% auto range
|
|
1349
|
+
bar [10, 20, 30, 40]
|
|
1350
|
+
line [15, 25, 35, 45]
|
|
1351
|
+
```
|
|
1352
|
+
|
|
1353
|
+
### Configuration
|
|
1354
|
+
```yaml
|
|
1355
|
+
config:
|
|
1356
|
+
xyChart:
|
|
1357
|
+
width: 700
|
|
1358
|
+
height: 500
|
|
1359
|
+
titlePadding: 10
|
|
1360
|
+
titleFontSize: 20
|
|
1361
|
+
showTitle: true
|
|
1362
|
+
chartOrientation: vertical %% vertical | horizontal
|
|
1363
|
+
plotReservedSpacePercent: 50
|
|
1364
|
+
showDataLabel: false
|
|
1365
|
+
xAxis:
|
|
1366
|
+
showLabel: true
|
|
1367
|
+
labelFontSize: 14
|
|
1368
|
+
showTitle: true
|
|
1369
|
+
titleFontSize: 16
|
|
1370
|
+
showTick: true
|
|
1371
|
+
tickLength: 5
|
|
1372
|
+
showAxisLine: true
|
|
1373
|
+
yAxis:
|
|
1374
|
+
showLabel: true
|
|
1375
|
+
labelFontSize: 14
|
|
1376
|
+
themeVariables:
|
|
1377
|
+
xyChart:
|
|
1378
|
+
backgroundColor: "#ffffff"
|
|
1379
|
+
titleColor: "#333333"
|
|
1380
|
+
xAxisLabelColor: "#555"
|
|
1381
|
+
xAxisTitleColor: "#333"
|
|
1382
|
+
xAxisTickColor: "#999"
|
|
1383
|
+
xAxisLineColor: "#999"
|
|
1384
|
+
yAxisLabelColor: "#555"
|
|
1385
|
+
yAxisTitleColor: "#333"
|
|
1386
|
+
yAxisTickColor: "#999"
|
|
1387
|
+
yAxisLineColor: "#999"
|
|
1388
|
+
plotColorPalette: "#ff0000, #00ff00, #0000ff"
|
|
1389
|
+
```
|
|
1390
|
+
|
|
1391
|
+
### Example
|
|
1392
|
+
```
|
|
1393
|
+
---
|
|
1394
|
+
config:
|
|
1395
|
+
xyChart:
|
|
1396
|
+
width: 800
|
|
1397
|
+
showDataLabel: true
|
|
1398
|
+
themeVariables:
|
|
1399
|
+
xyChart:
|
|
1400
|
+
plotColorPalette: "#4e79a7, #f28e2b"
|
|
1401
|
+
---
|
|
1402
|
+
xychart
|
|
1403
|
+
title "Quarterly Revenue"
|
|
1404
|
+
x-axis [Q1, Q2, Q3, Q4]
|
|
1405
|
+
y-axis "Revenue ($M)" 0 --> 50
|
|
1406
|
+
bar [20, 28, 35, 42]
|
|
1407
|
+
line [18, 25, 33, 40]
|
|
1408
|
+
```
|
|
1409
|
+
|
|
1410
|
+
---
|
|
1411
|
+
|
|
1412
|
+
## 15. Block Diagram
|
|
1413
|
+
|
|
1414
|
+
**Keyword:** `block`
|
|
1415
|
+
|
|
1416
|
+
### Syntax
|
|
1417
|
+
```
|
|
1418
|
+
block
|
|
1419
|
+
columns 3
|
|
1420
|
+
a b c d %% 4 blocks, 3 columns → d wraps to row 2
|
|
1421
|
+
a["Label"] b:2 %% b spans 2 columns
|
|
1422
|
+
space %% empty cell (1 column)
|
|
1423
|
+
space:3 %% empty cell spanning 3 columns
|
|
1424
|
+
```
|
|
1425
|
+
|
|
1426
|
+
### Nested (Composite) Blocks
|
|
1427
|
+
```
|
|
1428
|
+
block
|
|
1429
|
+
block:groupId:2 %% id:columnSpan
|
|
1430
|
+
columns 2
|
|
1431
|
+
A B C D
|
|
1432
|
+
end
|
|
1433
|
+
E
|
|
1434
|
+
```
|
|
1435
|
+
|
|
1436
|
+
### Block Shapes
|
|
1437
|
+
Same as flowchart node shapes:
|
|
1438
|
+
- `id[text]` rectangle
|
|
1439
|
+
- `id(text)` rounded
|
|
1440
|
+
- `id([text])` stadium
|
|
1441
|
+
- `id[[text]]` subroutine
|
|
1442
|
+
- `id[(text)]` cylinder
|
|
1443
|
+
- `id((text))` circle
|
|
1444
|
+
- `id>text]` asymmetric
|
|
1445
|
+
- `id{text}` rhombus
|
|
1446
|
+
- `id{{text}}` hexagon
|
|
1447
|
+
- `id[/text/]` parallelogram
|
|
1448
|
+
- `id[\text\]` parallelogram alt
|
|
1449
|
+
- `id[/text\]` trapezoid
|
|
1450
|
+
- `id[\text/]` trapezoid alt
|
|
1451
|
+
- `id(((text)))` double circle
|
|
1452
|
+
|
|
1453
|
+
### Block Arrows
|
|
1454
|
+
```
|
|
1455
|
+
blockArrowId<["Label"]>(right)
|
|
1456
|
+
blockArrowId2<["Label"]>(left)
|
|
1457
|
+
blockArrowId3<["Label"]>(up)
|
|
1458
|
+
blockArrowId4<["Label"]>(down)
|
|
1459
|
+
blockArrowId5<["Label"]>(x) %% horizontal bidirectional
|
|
1460
|
+
blockArrowId6<["Label"]>(y) %% vertical bidirectional
|
|
1461
|
+
blockArrowId7<["Label"]>(x, down)
|
|
1462
|
+
```
|
|
1463
|
+
|
|
1464
|
+
### Connections
|
|
1465
|
+
```
|
|
1466
|
+
block
|
|
1467
|
+
A space B
|
|
1468
|
+
A --> B
|
|
1469
|
+
A -- "label" --> B
|
|
1470
|
+
A --- B %% no arrowhead
|
|
1471
|
+
```
|
|
1472
|
+
|
|
1473
|
+
### Styling
|
|
1474
|
+
```
|
|
1475
|
+
style B fill:#969,stroke:#333,stroke-width:4px
|
|
1476
|
+
classDef myClass fill:#6e6ce6,stroke:#333
|
|
1477
|
+
class A myClass
|
|
1478
|
+
```
|
|
1479
|
+
|
|
1480
|
+
### Example
|
|
1481
|
+
```
|
|
1482
|
+
block
|
|
1483
|
+
columns 3
|
|
1484
|
+
Frontend blockArrowId<[" "]>(right) Backend
|
|
1485
|
+
space:2 down<[" "]>(down)
|
|
1486
|
+
Disk left<[" "]>(left) Database[("Database")]
|
|
1487
|
+
|
|
1488
|
+
classDef front fill:#696,stroke:#333
|
|
1489
|
+
classDef back fill:#969,stroke:#333
|
|
1490
|
+
class Frontend front
|
|
1491
|
+
class Backend,Database back
|
|
1492
|
+
```
|
|
1493
|
+
|
|
1494
|
+
---
|
|
1495
|
+
|
|
1496
|
+
## 16. Kanban
|
|
1497
|
+
|
|
1498
|
+
**Keyword:** `kanban`
|
|
1499
|
+
|
|
1500
|
+
### Syntax
|
|
1501
|
+
```
|
|
1502
|
+
kanban
|
|
1503
|
+
columnId[Column Title]
|
|
1504
|
+
taskId[Task Description]
|
|
1505
|
+
taskId2[Another Task]@{ ticket: PROJ-123, assigned: 'user', priority: 'High' }
|
|
1506
|
+
```
|
|
1507
|
+
|
|
1508
|
+
**Priority values:** `Very High` | `High` | `Low` | `Very Low`
|
|
1509
|
+
|
|
1510
|
+
### Configuration
|
|
1511
|
+
```yaml
|
|
1512
|
+
config:
|
|
1513
|
+
kanban:
|
|
1514
|
+
ticketBaseUrl: 'https://jira.example.com/browse/#TICKET#'
|
|
1515
|
+
```
|
|
1516
|
+
`#TICKET#` is replaced by the task's ticket value.
|
|
1517
|
+
|
|
1518
|
+
### Example
|
|
1519
|
+
```
|
|
1520
|
+
---
|
|
1521
|
+
config:
|
|
1522
|
+
kanban:
|
|
1523
|
+
ticketBaseUrl: 'https://github.com/org/repo/issues/#TICKET#'
|
|
1524
|
+
---
|
|
1525
|
+
kanban
|
|
1526
|
+
todo[To Do]
|
|
1527
|
+
id1[Write unit tests]@{ ticket: 42, priority: 'High' }
|
|
1528
|
+
id2[Update documentation]@{ assigned: 'alice' }
|
|
1529
|
+
wip[In Progress]
|
|
1530
|
+
id3[Implement feature]@{ ticket: 38, assigned: 'bob', priority: 'Very High' }
|
|
1531
|
+
review[Review]
|
|
1532
|
+
id4[Code review for PR #45]
|
|
1533
|
+
done[Done]
|
|
1534
|
+
id5[Fix login bug]@{ ticket: 31 }
|
|
1535
|
+
```
|
|
1536
|
+
|
|
1537
|
+
---
|
|
1538
|
+
|
|
1539
|
+
## 17. Architecture Diagram
|
|
1540
|
+
|
|
1541
|
+
**Keyword:** `architecture-beta` (v11.1.0+)
|
|
1542
|
+
|
|
1543
|
+
### Syntax
|
|
1544
|
+
```
|
|
1545
|
+
architecture-beta
|
|
1546
|
+
group groupId(iconName)[Label]
|
|
1547
|
+
group subGroupId(iconName)[Label] in parentGroupId
|
|
1548
|
+
|
|
1549
|
+
service serviceId(iconName)[Label]
|
|
1550
|
+
service serviceId(iconName)[Label] in groupId
|
|
1551
|
+
|
|
1552
|
+
junction junctionId
|
|
1553
|
+
junction junctionId in groupId
|
|
1554
|
+
|
|
1555
|
+
serviceId:L -- R:serviceId2 %% edge (T=Top, B=Bottom, L=Left, R=Right)
|
|
1556
|
+
serviceId:T --> B:serviceId2 %% with arrow into target
|
|
1557
|
+
serviceId:L <-- R:serviceId2 %% with arrow into source
|
|
1558
|
+
serviceId:L <--> R:serviceId2 %% bidirectional
|
|
1559
|
+
serviceId{group}:B --> T:serviceId2{group} %% edges out of groups
|
|
1560
|
+
```
|
|
1561
|
+
|
|
1562
|
+
### Built-in Icons
|
|
1563
|
+
`cloud` | `database` | `disk` | `internet` | `server`
|
|
1564
|
+
|
|
1565
|
+
Custom icons via iconify: `logos:aws-lambda`, `logos:aws-aurora`, etc.
|
|
1566
|
+
|
|
1567
|
+
### Example
|
|
1568
|
+
```
|
|
1569
|
+
architecture-beta
|
|
1570
|
+
group cloud(cloud)[AWS Cloud]
|
|
1571
|
+
|
|
1572
|
+
service lb(internet)[Load Balancer] in cloud
|
|
1573
|
+
service api1(server)[API Server 1] in cloud
|
|
1574
|
+
service api2(server)[API Server 2] in cloud
|
|
1575
|
+
service db(database)[RDS Database] in cloud
|
|
1576
|
+
service cache(disk)[ElastiCache] in cloud
|
|
1577
|
+
|
|
1578
|
+
lb:R --> L:api1
|
|
1579
|
+
lb:R --> L:api2
|
|
1580
|
+
api1:R --> L:db
|
|
1581
|
+
api2:R --> L:db
|
|
1582
|
+
api1:B --> T:cache
|
|
1583
|
+
api2:B --> T:cache
|
|
1584
|
+
```
|
|
1585
|
+
|
|
1586
|
+
---
|
|
1587
|
+
|
|
1588
|
+
## 18. Packet Diagram
|
|
1589
|
+
|
|
1590
|
+
**Keyword:** `packet` (v11.0.0+)
|
|
1591
|
+
|
|
1592
|
+
### Syntax
|
|
1593
|
+
```
|
|
1594
|
+
---
|
|
1595
|
+
title: "TCP Packet"
|
|
1596
|
+
---
|
|
1597
|
+
packet
|
|
1598
|
+
0-15: "Source Port"
|
|
1599
|
+
16-31: "Destination Port"
|
|
1600
|
+
32-63: "Sequence Number"
|
|
1601
|
+
106: "URG" %% single bit
|
|
1602
|
+
107: "ACK"
|
|
1603
|
+
|
|
1604
|
+
%% v11.7.0+ bit-count syntax:
|
|
1605
|
+
+16: "Source Port" %% 16 bits from previous field end
|
|
1606
|
+
+16: "Dest Port"
|
|
1607
|
+
32-47: "Length" %% can mix styles
|
|
1608
|
+
```
|
|
1609
|
+
|
|
1610
|
+
### Example
|
|
1611
|
+
```
|
|
1612
|
+
packet
|
|
1613
|
+
title UDP Packet
|
|
1614
|
+
+16: "Source Port"
|
|
1615
|
+
+16: "Destination Port"
|
|
1616
|
+
+16: "Length"
|
|
1617
|
+
+16: "Checksum"
|
|
1618
|
+
64-95: "Data (variable)"
|
|
1619
|
+
```
|
|
1620
|
+
|
|
1621
|
+
---
|
|
1622
|
+
|
|
1623
|
+
## 19. C4 Diagrams
|
|
1624
|
+
|
|
1625
|
+
**Keywords:** `C4Context` | `C4Container` | `C4Component` | `C4Dynamic` | `C4Deployment`
|
|
1626
|
+
|
|
1627
|
+
### Elements
|
|
1628
|
+
|
|
1629
|
+
**Context (C4Context):**
|
|
1630
|
+
```
|
|
1631
|
+
Person(alias, label, ?descr)
|
|
1632
|
+
Person_Ext(alias, label, ?descr)
|
|
1633
|
+
System(alias, label, ?descr)
|
|
1634
|
+
SystemDb(alias, label, ?descr)
|
|
1635
|
+
SystemQueue(alias, label, ?descr)
|
|
1636
|
+
System_Ext(alias, label, ?descr)
|
|
1637
|
+
SystemDb_Ext(alias, label, ?descr)
|
|
1638
|
+
SystemQueue_Ext(alias, label, ?descr)
|
|
1639
|
+
```
|
|
1640
|
+
|
|
1641
|
+
**Container (C4Container):**
|
|
1642
|
+
```
|
|
1643
|
+
Container(alias, label, ?techn, ?descr)
|
|
1644
|
+
ContainerDb(alias, label, ?techn, ?descr)
|
|
1645
|
+
ContainerQueue(alias, label, ?techn, ?descr)
|
|
1646
|
+
Container_Ext / ContainerDb_Ext / ContainerQueue_Ext
|
|
1647
|
+
```
|
|
1648
|
+
|
|
1649
|
+
**Component (C4Component):**
|
|
1650
|
+
```
|
|
1651
|
+
Component(alias, label, ?techn, ?descr)
|
|
1652
|
+
ComponentDb / ComponentQueue / Component_Ext / ComponentDb_Ext / ComponentQueue_Ext
|
|
1653
|
+
```
|
|
1654
|
+
|
|
1655
|
+
**Deployment (C4Deployment):**
|
|
1656
|
+
```
|
|
1657
|
+
Deployment_Node(alias, label, ?type, ?descr)
|
|
1658
|
+
Node(alias, label, ?type, ?descr) %% alias for Deployment_Node
|
|
1659
|
+
Node_L / Node_R
|
|
1660
|
+
```
|
|
1661
|
+
|
|
1662
|
+
**Boundaries:**
|
|
1663
|
+
```
|
|
1664
|
+
Enterprise_Boundary(alias, label) { ... }
|
|
1665
|
+
System_Boundary(alias, label) { ... }
|
|
1666
|
+
Container_Boundary(alias, label) { ... }
|
|
1667
|
+
Boundary(alias, label, type) { ... }
|
|
1668
|
+
```
|
|
1669
|
+
|
|
1670
|
+
### Relationships
|
|
1671
|
+
```
|
|
1672
|
+
Rel(from, to, label, ?techn)
|
|
1673
|
+
BiRel(from, to, label)
|
|
1674
|
+
RelIndex(index, from, to, label) %% C4Dynamic
|
|
1675
|
+
Rel_U / Rel_Up / Rel_D / Rel_Down
|
|
1676
|
+
Rel_L / Rel_Left / Rel_R / Rel_Right
|
|
1677
|
+
Rel_Back(from, to, label)
|
|
1678
|
+
```
|
|
1679
|
+
|
|
1680
|
+
### Styling
|
|
1681
|
+
```
|
|
1682
|
+
UpdateElementStyle(alias, $fontColor="red", $bgColor="grey", $borderColor="red")
|
|
1683
|
+
UpdateRelStyle(from, to, $textColor="blue", $lineColor="blue", $offsetX="5", $offsetY="-10")
|
|
1684
|
+
UpdateLayoutConfig($c4ShapeInRow="4", $c4BoundaryInRow="2")
|
|
1685
|
+
```
|
|
1686
|
+
|
|
1687
|
+
### Example
|
|
1688
|
+
```
|
|
1689
|
+
C4Container
|
|
1690
|
+
title Container Diagram
|
|
1691
|
+
|
|
1692
|
+
System_Ext(extMail, "E-Mail System", "SMTP")
|
|
1693
|
+
Person(user, "User", "End user")
|
|
1694
|
+
|
|
1695
|
+
Container_Boundary(sys, "Application") {
|
|
1696
|
+
Container(web, "Web App", "React", "Single-page application")
|
|
1697
|
+
Container(api, "API", "Node.js", "REST API")
|
|
1698
|
+
ContainerDb(db, "Database", "PostgreSQL", "User data")
|
|
1699
|
+
}
|
|
1700
|
+
|
|
1701
|
+
Rel(user, web, "Uses", "HTTPS")
|
|
1702
|
+
Rel(web, api, "Calls", "JSON/HTTPS")
|
|
1703
|
+
Rel(api, db, "Reads/Writes", "SQL")
|
|
1704
|
+
Rel(api, extMail, "Sends email", "SMTP")
|
|
1705
|
+
UpdateRelStyle(user, web, $offsetY="20")
|
|
1706
|
+
```
|
|
1707
|
+
|
|
1708
|
+
---
|
|
1709
|
+
|
|
1710
|
+
## 20. ZenUML (Sequence Alternative)
|
|
1711
|
+
|
|
1712
|
+
**Keyword:** `zenuml`
|
|
1713
|
+
|
|
1714
|
+
### Syntax
|
|
1715
|
+
```
|
|
1716
|
+
zenuml
|
|
1717
|
+
title Title
|
|
1718
|
+
Alice %% declare participant
|
|
1719
|
+
@Actor Bob %% annotator types: @Actor @Database @Boundary @Control @Entity @Queue
|
|
1720
|
+
A as Alice %% alias
|
|
1721
|
+
J as John
|
|
1722
|
+
|
|
1723
|
+
Alice->Bob: async message
|
|
1724
|
+
Alice.SyncMethod() %% sync call to self
|
|
1725
|
+
Alice.SyncMethod(p1, p2) { %% sync with body
|
|
1726
|
+
Bob.nestedMethod()
|
|
1727
|
+
}
|
|
1728
|
+
new ObjectA %% creation message
|
|
1729
|
+
new ObjectA(with, params)
|
|
1730
|
+
|
|
1731
|
+
%% Reply messages:
|
|
1732
|
+
a = Alice.method() %% assign return value
|
|
1733
|
+
SomeType a = Alice.method() %% typed variable
|
|
1734
|
+
Alice.method() {
|
|
1735
|
+
return result %% explicit return
|
|
1736
|
+
}
|
|
1737
|
+
@return
|
|
1738
|
+
Alice->Bob: returnValue %% @return annotator
|
|
1739
|
+
```
|
|
1740
|
+
|
|
1741
|
+
### Control Flow
|
|
1742
|
+
```
|
|
1743
|
+
while(condition) {
|
|
1744
|
+
...
|
|
1745
|
+
}
|
|
1746
|
+
|
|
1747
|
+
for(item in list) {
|
|
1748
|
+
...
|
|
1749
|
+
}
|
|
1750
|
+
|
|
1751
|
+
forEach(item in collection) {
|
|
1752
|
+
...
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
loop loopText {
|
|
1756
|
+
...
|
|
1757
|
+
}
|
|
1758
|
+
|
|
1759
|
+
if(condition) {
|
|
1760
|
+
...
|
|
1761
|
+
} else if(cond2) {
|
|
1762
|
+
...
|
|
1763
|
+
} else {
|
|
1764
|
+
...
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1767
|
+
opt {
|
|
1768
|
+
...
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1771
|
+
par {
|
|
1772
|
+
Alice->Bob: parallel1
|
|
1773
|
+
Alice->John: parallel2
|
|
1774
|
+
}
|
|
1775
|
+
|
|
1776
|
+
try {
|
|
1777
|
+
...
|
|
1778
|
+
} catch {
|
|
1779
|
+
...
|
|
1780
|
+
} finally {
|
|
1781
|
+
...
|
|
1782
|
+
}
|
|
1783
|
+
```
|
|
1784
|
+
|
|
1785
|
+
### Comments
|
|
1786
|
+
```
|
|
1787
|
+
// Single-line comment (rendered above next message)
|
|
1788
|
+
// **Markdown** supported in comments
|
|
1789
|
+
```
|
|
1790
|
+
|
|
1791
|
+
### Example
|
|
1792
|
+
```
|
|
1793
|
+
zenuml
|
|
1794
|
+
title Order Processing
|
|
1795
|
+
@Actor Customer
|
|
1796
|
+
@Database OrderDB
|
|
1797
|
+
|
|
1798
|
+
Customer->OrderService: placeOrder(items)
|
|
1799
|
+
OrderService.validateOrder(items) {
|
|
1800
|
+
if(items.isEmpty()) {
|
|
1801
|
+
return error
|
|
1802
|
+
}
|
|
1803
|
+
}
|
|
1804
|
+
OrderService->OrderDB: save(order)
|
|
1805
|
+
order = OrderDB.save(order) {}
|
|
1806
|
+
return order
|
|
1807
|
+
```
|
|
1808
|
+
|
|
1809
|
+
---
|
|
1810
|
+
|
|
1811
|
+
## 21. Radar Diagram
|
|
1812
|
+
|
|
1813
|
+
**Keyword:** `radar-beta` (v11.6.0+)
|
|
1814
|
+
|
|
1815
|
+
### Syntax
|
|
1816
|
+
```
|
|
1817
|
+
radar-beta
|
|
1818
|
+
title Title Text
|
|
1819
|
+
axis id1["Label 1"]
|
|
1820
|
+
axis id2["Label 2"], id3["Label 3"] %% multiple on one line
|
|
1821
|
+
curve c1["Curve Name"]{1, 2, 3, 4, 5}
|
|
1822
|
+
curve c2{5, 4, 3, 2, 1}
|
|
1823
|
+
curve c3{ axis1: 30, axis2: 20 } %% key-value pairs
|
|
1824
|
+
showLegend true
|
|
1825
|
+
max 100
|
|
1826
|
+
min 0
|
|
1827
|
+
graticule circle %% circle | polygon
|
|
1828
|
+
ticks 5
|
|
1829
|
+
```
|
|
1830
|
+
|
|
1831
|
+
### Configuration
|
|
1832
|
+
```yaml
|
|
1833
|
+
config:
|
|
1834
|
+
radar:
|
|
1835
|
+
width: 600
|
|
1836
|
+
height: 600
|
|
1837
|
+
marginTop: 50
|
|
1838
|
+
marginBottom: 50
|
|
1839
|
+
marginLeft: 50
|
|
1840
|
+
marginRight: 50
|
|
1841
|
+
axisScaleFactor: 1
|
|
1842
|
+
axisLabelFactor: 1.05
|
|
1843
|
+
curveTension: 0.17
|
|
1844
|
+
themeVariables:
|
|
1845
|
+
cScale0: "#FF0000"
|
|
1846
|
+
cScale1: "#00FF00"
|
|
1847
|
+
radar:
|
|
1848
|
+
axisColor: "black"
|
|
1849
|
+
axisStrokeWidth: 1
|
|
1850
|
+
axisLabelFontSize: "12px"
|
|
1851
|
+
curveOpacity: 0.7
|
|
1852
|
+
curveStrokeWidth: 2
|
|
1853
|
+
graticuleColor: "black"
|
|
1854
|
+
graticuleOpacity: 0.5
|
|
1855
|
+
graticuleStrokeWidth: 1
|
|
1856
|
+
legendBoxSize: 10
|
|
1857
|
+
legendFontSize: "14px"
|
|
1858
|
+
```
|
|
1859
|
+
|
|
1860
|
+
### Example
|
|
1861
|
+
```
|
|
1862
|
+
---
|
|
1863
|
+
title: "Team Skill Assessment"
|
|
1864
|
+
---
|
|
1865
|
+
radar-beta
|
|
1866
|
+
axis tech["Technical"], comm["Communication"], lead["Leadership"]
|
|
1867
|
+
axis prob["Problem Solving"], collab["Collaboration"]
|
|
1868
|
+
curve alice["Alice"]{85, 70, 60, 90, 75}
|
|
1869
|
+
curve bob["Bob"]{70, 85, 80, 75, 90}
|
|
1870
|
+
max 100
|
|
1871
|
+
min 0
|
|
1872
|
+
graticule polygon
|
|
1873
|
+
ticks 5
|
|
1874
|
+
```
|
|
1875
|
+
|
|
1876
|
+
---
|
|
1877
|
+
|
|
1878
|
+
## 22. Treemap
|
|
1879
|
+
|
|
1880
|
+
**Keyword:** `treemap-beta`
|
|
1881
|
+
|
|
1882
|
+
### Syntax (indentation = hierarchy)
|
|
1883
|
+
```
|
|
1884
|
+
treemap-beta
|
|
1885
|
+
"Section 1"
|
|
1886
|
+
"Leaf 1.1": 12 %% leaf with value
|
|
1887
|
+
"Section 1.2":::myClass %% section with style
|
|
1888
|
+
"Leaf 1.2.1": 8
|
|
1889
|
+
"Section 2"
|
|
1890
|
+
"Leaf 2.1": 20:::myClass %% leaf with style
|
|
1891
|
+
"Leaf 2.2": 25
|
|
1892
|
+
|
|
1893
|
+
classDef myClass fill:red,color:blue,stroke:#FFD600
|
|
1894
|
+
```
|
|
1895
|
+
|
|
1896
|
+
### Configuration
|
|
1897
|
+
```yaml
|
|
1898
|
+
config:
|
|
1899
|
+
treemap:
|
|
1900
|
+
useMaxWidth: true
|
|
1901
|
+
padding: 10
|
|
1902
|
+
diagramPadding: 8
|
|
1903
|
+
showValues: true
|
|
1904
|
+
borderWidth: 1
|
|
1905
|
+
valueFontSize: 12
|
|
1906
|
+
labelFontSize: 14
|
|
1907
|
+
valueFormat: "," %% d3 format: "," | "$" | ".1f" | ".1%" | "$0,0" | "$,.2f"
|
|
1908
|
+
```
|
|
1909
|
+
|
|
1910
|
+
### Example
|
|
1911
|
+
```
|
|
1912
|
+
---
|
|
1913
|
+
config:
|
|
1914
|
+
treemap:
|
|
1915
|
+
valueFormat: '$0,0'
|
|
1916
|
+
---
|
|
1917
|
+
treemap-beta
|
|
1918
|
+
"Budget 2024"
|
|
1919
|
+
"Engineering"
|
|
1920
|
+
"Salaries": 1200000
|
|
1921
|
+
"Tools": 50000
|
|
1922
|
+
"Marketing"
|
|
1923
|
+
"Campaigns": 300000
|
|
1924
|
+
"Events": 150000
|
|
1925
|
+
"Operations"
|
|
1926
|
+
"Infrastructure": 200000
|
|
1927
|
+
```
|
|
1928
|
+
|
|
1929
|
+
---
|
|
1930
|
+
|
|
1931
|
+
## 23. Venn Diagram
|
|
1932
|
+
|
|
1933
|
+
**Keyword:** `venn-beta` (v11.12.3+)
|
|
1934
|
+
|
|
1935
|
+
### Syntax
|
|
1936
|
+
```
|
|
1937
|
+
venn-beta
|
|
1938
|
+
title "Title"
|
|
1939
|
+
set A["Set A Name"]:20 %% :N sets size
|
|
1940
|
+
set B["Set B Name"]:12
|
|
1941
|
+
union A,B["Overlap Label"]:5 %% identifiers must be previously defined
|
|
1942
|
+
text A1["Item in A"] %% text node in set A (indented under set/union)
|
|
1943
|
+
union A,B,C["Triple overlap"]
|
|
1944
|
+
style A fill:#ff6b6b
|
|
1945
|
+
style A,B color:#333
|
|
1946
|
+
style AB1 color:red
|
|
1947
|
+
```
|
|
1948
|
+
|
|
1949
|
+
**Style properties:** `fill`, `color`, `stroke`, `stroke-width`, `fill-opacity`
|
|
1950
|
+
|
|
1951
|
+
### Example
|
|
1952
|
+
```
|
|
1953
|
+
venn-beta
|
|
1954
|
+
title "Technology Skills"
|
|
1955
|
+
set frontend["Frontend"]:30
|
|
1956
|
+
text f1["React"]
|
|
1957
|
+
text f2["CSS"]
|
|
1958
|
+
set backend["Backend"]:25
|
|
1959
|
+
text b1["Node.js"]
|
|
1960
|
+
text b2["SQL"]
|
|
1961
|
+
union frontend,backend["Fullstack"]:10
|
|
1962
|
+
text fb1["TypeScript"]
|
|
1963
|
+
style frontend fill:#4fc3f7
|
|
1964
|
+
style backend fill:#81c784
|
|
1965
|
+
```
|
|
1966
|
+
|
|
1967
|
+
---
|
|
1968
|
+
|
|
1969
|
+
## 24. User Journey
|
|
1970
|
+
|
|
1971
|
+
**Keyword:** `journey`
|
|
1972
|
+
|
|
1973
|
+
### Syntax
|
|
1974
|
+
```
|
|
1975
|
+
journey
|
|
1976
|
+
title Journey Title
|
|
1977
|
+
section Section Name
|
|
1978
|
+
Task Name: score: Actor1, Actor2
|
|
1979
|
+
```
|
|
1980
|
+
|
|
1981
|
+
- `score`: integer 1–5 (satisfaction level)
|
|
1982
|
+
- Multiple actors comma-separated
|
|
1983
|
+
- Tasks assigned to all listed actors
|
|
1984
|
+
|
|
1985
|
+
### Example
|
|
1986
|
+
```
|
|
1987
|
+
journey
|
|
1988
|
+
title User Onboarding
|
|
1989
|
+
section Discovery
|
|
1990
|
+
Find product: 3: User
|
|
1991
|
+
Visit homepage: 4: User
|
|
1992
|
+
section Signup
|
|
1993
|
+
Create account: 2: User, System
|
|
1994
|
+
Verify email: 3: User, System
|
|
1995
|
+
section First Use
|
|
1996
|
+
Complete profile: 4: User
|
|
1997
|
+
First action: 5: User
|
|
1998
|
+
Get help: 2: User, Support
|
|
1999
|
+
```
|
|
2000
|
+
|
|
2001
|
+
---
|
|
2002
|
+
|
|
2003
|
+
## Global Styling Reference
|
|
2004
|
+
|
|
2005
|
+
### `style` keyword (inline CSS on individual nodes)
|
|
2006
|
+
```
|
|
2007
|
+
style nodeId fill:#f9f,stroke:#333,stroke-width:4px,color:#fff,stroke-dasharray: 5 5,font-size:16px
|
|
2008
|
+
```
|
|
2009
|
+
|
|
2010
|
+
### `classDef` (reusable style class)
|
|
2011
|
+
```
|
|
2012
|
+
classDef className fill:#f9f,stroke:#333,stroke-width:4px,color:#fff
|
|
2013
|
+
classDef class1,class2 font-size:12pt %% multiple classes same style
|
|
2014
|
+
classDef default fill:#f9f %% applies to all nodes by default
|
|
2015
|
+
```
|
|
2016
|
+
|
|
2017
|
+
### Applying classes
|
|
2018
|
+
```
|
|
2019
|
+
class nodeId className
|
|
2020
|
+
class nodeId1,nodeId2 className
|
|
2021
|
+
nodeId:::className %% shorthand
|
|
2022
|
+
nodeId:::class1,class2 %% multiple classes
|
|
2023
|
+
```
|
|
2024
|
+
|
|
2025
|
+
### CSS Properties commonly used
|
|
2026
|
+
`fill`, `stroke`, `stroke-width`, `stroke-dasharray`, `color`, `font-size`, `font-weight`, `font-style`, `opacity`, `rx`, `ry`
|
|
2027
|
+
|
|
2028
|
+
---
|
|
2029
|
+
|
|
2030
|
+
## Theme Variables
|
|
2031
|
+
|
|
2032
|
+
### Global themeVariables
|
|
2033
|
+
```yaml
|
|
2034
|
+
config:
|
|
2035
|
+
themeVariables:
|
|
2036
|
+
primaryColor: '#ff0000'
|
|
2037
|
+
primaryTextColor: '#ffffff'
|
|
2038
|
+
primaryBorderColor: '#cc0000'
|
|
2039
|
+
lineColor: '#333333'
|
|
2040
|
+
secondaryColor: '#00ff00'
|
|
2041
|
+
tertiaryColor: '#0000ff'
|
|
2042
|
+
background: '#ffffff'
|
|
2043
|
+
mainBkg: '#ececff'
|
|
2044
|
+
secondBkg: '#f4f4f4'
|
|
2045
|
+
border1: '#9370db'
|
|
2046
|
+
border2: '#aaaa33'
|
|
2047
|
+
arrowheadColor: '#333333'
|
|
2048
|
+
fontFamily: '"trebuchet ms", verdana, arial'
|
|
2049
|
+
fontSize: '16px'
|
|
2050
|
+
labelBackground: '#e8e8e8'
|
|
2051
|
+
edgeLabelBackground: '#e8e8e8'
|
|
2052
|
+
clusterBkg: '#ffffde'
|
|
2053
|
+
clusterBorder: '#aaaa33'
|
|
2054
|
+
titleColor: '#333'
|
|
2055
|
+
attributeBackgroundColorEven: '#fff'
|
|
2056
|
+
attributeBackgroundColorOdd: '#f8f8f8'
|
|
2057
|
+
noteBkgColor: '#fff5ad'
|
|
2058
|
+
noteTextColor: '#333'
|
|
2059
|
+
activationBorderColor: '#666'
|
|
2060
|
+
activationBkgColor: '#f4f4f4'
|
|
2061
|
+
sequenceNumberColor: 'white'
|
|
2062
|
+
sectionBkgColor: '#6eaa28'
|
|
2063
|
+
altSectionBkgColor: 'white'
|
|
2064
|
+
gridColor: 'lightgrey'
|
|
2065
|
+
fillType0: '#6eaa28' # ... fillType0 through fillType7
|
|
2066
|
+
cScale0: '#ff0000' # cScale0..cScale11
|
|
2067
|
+
cScaleLabel0: '#ffffff'
|
|
2068
|
+
```
|
|
2069
|
+
|
|
2070
|
+
---
|
|
2071
|
+
|
|
2072
|
+
## Quick Reference Card
|
|
2073
|
+
|
|
2074
|
+
| Diagram | Keyword | Min Required |
|
|
2075
|
+
|---------|---------|-------------|
|
|
2076
|
+
| Flowchart | `flowchart LR` | direction + one node |
|
|
2077
|
+
| Sequence | `sequenceDiagram` | one message |
|
|
2078
|
+
| Class | `classDiagram` | one class |
|
|
2079
|
+
| State | `stateDiagram-v2` | one state |
|
|
2080
|
+
| ER | `erDiagram` | one entity |
|
|
2081
|
+
| Gantt | `gantt` | `dateFormat` + one task |
|
|
2082
|
+
| Pie | `pie` | one slice |
|
|
2083
|
+
| Quadrant | `quadrantChart` | one point |
|
|
2084
|
+
| Requirement | `requirementDiagram` | one requirement |
|
|
2085
|
+
| GitGraph | `gitGraph` | one commit |
|
|
2086
|
+
| Mindmap | `mindmap` | root node |
|
|
2087
|
+
| Timeline | `timeline` | one period |
|
|
2088
|
+
| Sankey | `sankey` | one CSV row |
|
|
2089
|
+
| XY Chart | `xychart` | one data series |
|
|
2090
|
+
| Block | `block` | one block |
|
|
2091
|
+
| Kanban | `kanban` | one column |
|
|
2092
|
+
| Architecture | `architecture-beta` | one service |
|
|
2093
|
+
| Packet | `packet` | one field |
|
|
2094
|
+
| C4 Context | `C4Context` | one element |
|
|
2095
|
+
| ZenUML | `zenuml` | one message |
|
|
2096
|
+
| Radar | `radar-beta` | one axis + one curve |
|
|
2097
|
+
| Treemap | `treemap-beta` | one leaf with value |
|
|
2098
|
+
| Venn | `venn-beta` | one set |
|
|
2099
|
+
| User Journey | `journey` | one task in a section |
|
|
2100
|
+
|
|
2101
|
+
---
|
|
2102
|
+
|
|
2103
|
+
## Economics-Specific Examples (Enhanced)
|
|
2104
|
+
|
|
2105
|
+
> 강의노트/학술 자료에서 자주 사용되는 경제학 다이어그램 예시.
|
|
2106
|
+
> 모든 예시에 classDef 팔레트 + ELK layout 적용.
|
|
2107
|
+
|
|
2108
|
+
### Economics Palette (공통 classDef)
|
|
2109
|
+
```
|
|
2110
|
+
classDef primary fill:#3b82f6,stroke:#1e3a5f,color:#fff
|
|
2111
|
+
classDef secondary fill:#8b5cf6,stroke:#5b21b6,color:#fff
|
|
2112
|
+
classDef market fill:#fed7aa,stroke:#c2410c
|
|
2113
|
+
classDef game fill:#ddd6fe,stroke:#6d28d9
|
|
2114
|
+
classDef success fill:#bbf7d0,stroke:#166534
|
|
2115
|
+
classDef warning fill:#fef08a,stroke:#854d0e
|
|
2116
|
+
classDef danger fill:#fecaca,stroke:#991b1b
|
|
2117
|
+
classDef neutral fill:#e5e7eb,stroke:#374151
|
|
2118
|
+
```
|
|
2119
|
+
|
|
2120
|
+
### Example: 경제학 기본 흐름 (Flowchart + ELK)
|
|
2121
|
+
```
|
|
2122
|
+
---
|
|
2123
|
+
title: "경제학의 기본 흐름"
|
|
2124
|
+
config:
|
|
2125
|
+
layout: elk
|
|
2126
|
+
theme: base
|
|
2127
|
+
---
|
|
2128
|
+
flowchart LR
|
|
2129
|
+
subgraph S1 ["1. 합리적 의사결정"]
|
|
2130
|
+
A1(소비자) & A2(생산자) & A3(정부)
|
|
2131
|
+
end
|
|
2132
|
+
subgraph S2 ["2. 상호작용"]
|
|
2133
|
+
B1(시장) & B2(게임이론)
|
|
2134
|
+
end
|
|
2135
|
+
subgraph S3 ["3. 균형 & 문제해결"]
|
|
2136
|
+
C1(균형 도출) & C2(정책 개선)
|
|
2137
|
+
end
|
|
2138
|
+
S1 ==> S2 ==> S3
|
|
2139
|
+
classDef primary fill:#3b82f6,stroke:#1e3a5f,color:#fff
|
|
2140
|
+
class A1,A2,A3,B1,B2,C1,C2 primary
|
|
2141
|
+
```
|
|
2142
|
+
|
|
2143
|
+
### Example: 미시경제학 두 접근법
|
|
2144
|
+
```
|
|
2145
|
+
---
|
|
2146
|
+
config:
|
|
2147
|
+
layout: elk
|
|
2148
|
+
theme: base
|
|
2149
|
+
---
|
|
2150
|
+
flowchart TB
|
|
2151
|
+
Micro[미시경제학] --> Market[시장 분석<br/>경제주체 다수]
|
|
2152
|
+
Micro --> Game[게임이론<br/>경제주체 소수]
|
|
2153
|
+
Market --> Eq[수요·공급 → 균형]
|
|
2154
|
+
Game --> Nash[Nash Equilibrium]
|
|
2155
|
+
classDef market fill:#fed7aa,stroke:#c2410c
|
|
2156
|
+
classDef game fill:#ddd6fe,stroke:#6d28d9
|
|
2157
|
+
class Market market
|
|
2158
|
+
class Game game
|
|
2159
|
+
```
|
|
2160
|
+
|
|
2161
|
+
### Example: 한계분석 MB=MC (Flowchart 버전)
|
|
2162
|
+
```
|
|
2163
|
+
---
|
|
2164
|
+
title: "한계분석 MB = MC"
|
|
2165
|
+
config:
|
|
2166
|
+
layout: elk
|
|
2167
|
+
theme: base
|
|
2168
|
+
---
|
|
2169
|
+
flowchart TB
|
|
2170
|
+
subgraph Analysis ["한계분석 프레임워크"]
|
|
2171
|
+
direction TB
|
|
2172
|
+
Q["활동량 Q"] --> MB["한계편익 MB<br/>(감소 함수)"]
|
|
2173
|
+
Q --> MC["한계비용 MC<br/>(증가 함수)"]
|
|
2174
|
+
MB & MC --> Compare{"MB vs MC"}
|
|
2175
|
+
Compare -->|"MB > MC"| Increase["활동량 증가"]
|
|
2176
|
+
Compare -->|"MB < MC"| Decrease["활동량 감소"]
|
|
2177
|
+
Compare -->|"MB = MC"| Optimal["최적점 Q*"]
|
|
2178
|
+
end
|
|
2179
|
+
classDef primary fill:#3b82f6,stroke:#1e3a5f,color:#fff
|
|
2180
|
+
classDef success fill:#bbf7d0,stroke:#166534
|
|
2181
|
+
class Q,MB,MC primary
|
|
2182
|
+
class Optimal success
|
|
2183
|
+
```
|
|
2184
|
+
|
|
2185
|
+
### Example: MB=MC (XY Chart 버전)
|
|
2186
|
+
```
|
|
2187
|
+
xychart-beta
|
|
2188
|
+
title "MB vs MC"
|
|
2189
|
+
x-axis "활동량 Q" [0, 2, 4, 6, 8, 10]
|
|
2190
|
+
y-axis "한계편익/비용" [0, 12]
|
|
2191
|
+
line "MB (감소)" [11, 8.5, 6.5, 4.5, 3, 1.5]
|
|
2192
|
+
line "MC (증가)" [1.5, 3, 4.5, 6.5, 8.5, 11]
|
|
2193
|
+
```
|
|
2194
|
+
|
|
2195
|
+
### Example: 소비자 선호 가정
|
|
2196
|
+
```
|
|
2197
|
+
---
|
|
2198
|
+
config:
|
|
2199
|
+
layout: elk
|
|
2200
|
+
theme: base
|
|
2201
|
+
---
|
|
2202
|
+
flowchart TB
|
|
2203
|
+
Pref["소비자 선호 가정"] --> Comp["완비성<br/>Completeness"]
|
|
2204
|
+
Pref --> Trans["이행성<br/>Transitivity"]
|
|
2205
|
+
Pref --> More["단조성<br/>More is Better"]
|
|
2206
|
+
Comp --> CompDesc["모든 묶음 비교 가능"]
|
|
2207
|
+
Trans --> TransDesc["A ≻ B, B ≻ C → A ≻ C"]
|
|
2208
|
+
More --> MoreDesc["더 많은 것을 선호"]
|
|
2209
|
+
classDef primary fill:#3b82f6,stroke:#1e3a5f,color:#fff
|
|
2210
|
+
classDef neutral fill:#e5e7eb,stroke:#374151
|
|
2211
|
+
class Pref,Comp,Trans,More primary
|
|
2212
|
+
class CompDesc,TransDesc,MoreDesc neutral
|
|
2213
|
+
```
|
|
2214
|
+
|
|
2215
|
+
### Example: 소비자 최적화 문제
|
|
2216
|
+
```
|
|
2217
|
+
---
|
|
2218
|
+
title: "소비자 최적화 문제"
|
|
2219
|
+
config:
|
|
2220
|
+
layout: elk
|
|
2221
|
+
theme: base
|
|
2222
|
+
---
|
|
2223
|
+
flowchart TB
|
|
2224
|
+
subgraph Objective ["목적"]
|
|
2225
|
+
Max["max U(x1, x2)<br/>효용 극대화"]
|
|
2226
|
+
end
|
|
2227
|
+
subgraph Constraint ["제약"]
|
|
2228
|
+
Budget["p1*x1 + p2*x2 <= M<br/>예산 제약"]
|
|
2229
|
+
NonNeg["x1, x2 >= 0"]
|
|
2230
|
+
end
|
|
2231
|
+
subgraph Solution ["해법"]
|
|
2232
|
+
Tangency["MRS = p1/p2<br/>접선 조건"]
|
|
2233
|
+
Corner["꼭짓점 해"]
|
|
2234
|
+
end
|
|
2235
|
+
Max --> Budget
|
|
2236
|
+
Budget --> Tangency
|
|
2237
|
+
Budget --> Corner
|
|
2238
|
+
Tangency --> Optimal["최적 소비 묶음"]
|
|
2239
|
+
Corner --> Optimal
|
|
2240
|
+
classDef primary fill:#3b82f6,stroke:#1e3a5f,color:#fff
|
|
2241
|
+
classDef success fill:#bbf7d0,stroke:#166534
|
|
2242
|
+
classDef warning fill:#fef08a,stroke:#854d0e
|
|
2243
|
+
class Max primary
|
|
2244
|
+
class Budget,NonNeg warning
|
|
2245
|
+
class Tangency,Corner primary
|
|
2246
|
+
class Optimal success
|
|
2247
|
+
```
|