@stacksjs/defaults 0.74.40 → 0.74.42

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.
Files changed (78) hide show
  1. package/ai/skills/stacks-cms/SKILL.md +4 -4
  2. package/ai/skills/stacks-composables/SKILL.md +1 -1
  3. package/ai/skills/stacks-config/SKILL.md +1 -1
  4. package/ai/skills/stacks-dashboard/SKILL.md +1 -1
  5. package/ai/skills/stacks-technical-diagrams/LICENSE +1 -1
  6. package/ai/skills/stacks-technical-diagrams/SKILL.md +257 -229
  7. package/ai/skills/stacks-technical-diagrams/THIRD_PARTY_NOTICES.md +69 -0
  8. package/ai/skills/stacks-technical-diagrams/assets/JetBrainsMono-OFL.txt +93 -0
  9. package/ai/skills/stacks-technical-diagrams/assets/template.html +14588 -929
  10. package/ai/skills/stacks-technical-diagrams/bin/diagrams +10 -0
  11. package/ai/skills/stacks-technical-diagrams/bin/open-artifact.mjs +86 -0
  12. package/ai/skills/stacks-technical-diagrams/bin/preview.mjs +654 -0
  13. package/ai/skills/stacks-technical-diagrams/bin/technical-diagrams.mjs +1898 -89
  14. package/ai/skills/stacks-technical-diagrams/bin/visual-check.mjs +829 -0
  15. package/ai/skills/stacks-technical-diagrams/brand-marks/README.md +31 -0
  16. package/ai/skills/stacks-technical-diagrams/brand-marks/catalog.json +131 -0
  17. package/ai/skills/stacks-technical-diagrams/delta/architecture-delta.mjs +1221 -0
  18. package/ai/skills/stacks-technical-diagrams/examples/agent-run.lifecycle.json +18 -22
  19. package/ai/skills/stacks-technical-diagrams/examples/agent-tool-call.workflow.json +58 -52
  20. package/ai/skills/stacks-technical-diagrams/examples/async-job-roundtrip.sequence.json +61 -0
  21. package/ai/skills/stacks-technical-diagrams/examples/brand-aware-delivery.architecture.json +47 -0
  22. package/ai/skills/stacks-technical-diagrams/examples/cache-miss-request.sequence.json +30 -23
  23. package/ai/skills/stacks-technical-diagrams/examples/checkout-platform.base.architecture.json +31 -0
  24. package/ai/skills/stacks-technical-diagrams/examples/checkout-platform.head.architecture.json +31 -0
  25. package/ai/skills/stacks-technical-diagrams/examples/deployment-release.lifecycle.json +49 -0
  26. package/ai/skills/stacks-technical-diagrams/examples/event-stream.dataflow.json +57 -0
  27. package/ai/skills/stacks-technical-diagrams/examples/incident-response.workflow.json +64 -0
  28. package/ai/skills/stacks-technical-diagrams/examples/product-analytics.dataflow.json +22 -16
  29. package/ai/skills/stacks-technical-diagrams/examples/production-deployment.architecture.json +71 -0
  30. package/ai/skills/stacks-technical-diagrams/examples/release-delivery.workflow.json +62 -0
  31. package/ai/skills/stacks-technical-diagrams/examples/web-app.architecture.json +16 -11
  32. package/ai/skills/stacks-technical-diagrams/migrations/workflow-v2.mjs +279 -0
  33. package/ai/skills/stacks-technical-diagrams/recipes/scenarios.mjs +391 -0
  34. package/ai/skills/stacks-technical-diagrams/references/authoring-contract.md +243 -0
  35. package/ai/skills/stacks-technical-diagrams/references/brand-marks.md +65 -0
  36. package/ai/skills/stacks-technical-diagrams/references/delivery-contract.md +120 -0
  37. package/ai/skills/stacks-technical-diagrams/references/viewer-runtime.md +45 -0
  38. package/ai/skills/stacks-technical-diagrams/renderers/architecture/render-architecture.mjs +780 -73
  39. package/ai/skills/stacks-technical-diagrams/renderers/dataflow/README.md +25 -3
  40. package/ai/skills/stacks-technical-diagrams/renderers/dataflow/render-dataflow.mjs +240 -52
  41. package/ai/skills/stacks-technical-diagrams/renderers/lifecycle/README.md +31 -7
  42. package/ai/skills/stacks-technical-diagrams/renderers/lifecycle/render-lifecycle.mjs +227 -50
  43. package/ai/skills/stacks-technical-diagrams/renderers/sequence/README.md +36 -6
  44. package/ai/skills/stacks-technical-diagrams/renderers/sequence/render-sequence.mjs +270 -63
  45. package/ai/skills/stacks-technical-diagrams/renderers/shared/brand-marks.mjs +563 -0
  46. package/ai/skills/stacks-technical-diagrams/renderers/shared/bun-runtime.mjs +20 -0
  47. package/ai/skills/stacks-technical-diagrams/renderers/shared/cli.mjs +186 -10
  48. package/ai/skills/stacks-technical-diagrams/renderers/shared/desktop-readability.mjs +26 -0
  49. package/ai/skills/stacks-technical-diagrams/renderers/shared/diagnostics.mjs +127 -0
  50. package/ai/skills/stacks-technical-diagrams/renderers/shared/engineering-profiles.mjs +157 -0
  51. package/ai/skills/stacks-technical-diagrams/renderers/shared/generated-brand-marks.mjs +2003 -0
  52. package/ai/skills/stacks-technical-diagrams/renderers/shared/generated-validators.mjs +3 -3
  53. package/ai/skills/stacks-technical-diagrams/renderers/shared/geometry.mjs +1195 -2
  54. package/ai/skills/stacks-technical-diagrams/renderers/shared/i18n.mjs +595 -0
  55. package/ai/skills/stacks-technical-diagrams/renderers/shared/legend.mjs +217 -0
  56. package/ai/skills/stacks-technical-diagrams/renderers/shared/output-path.mjs +340 -0
  57. package/ai/skills/stacks-technical-diagrams/renderers/shared/repository-evidence.mjs +238 -0
  58. package/ai/skills/stacks-technical-diagrams/renderers/shared/repository-location.mjs +58 -0
  59. package/ai/skills/stacks-technical-diagrams/renderers/shared/text-fit.mjs +49 -0
  60. package/ai/skills/stacks-technical-diagrams/renderers/shared/utils.mjs +163 -19
  61. package/ai/skills/stacks-technical-diagrams/renderers/shared/validator.mjs +51 -5
  62. package/ai/skills/stacks-technical-diagrams/renderers/workflow/README.md +137 -17
  63. package/ai/skills/stacks-technical-diagrams/renderers/workflow/render-workflow.mjs +24 -470
  64. package/ai/skills/stacks-technical-diagrams/renderers/workflow/workflow-compiler.mjs +4400 -0
  65. package/ai/skills/stacks-technical-diagrams/renderers/workflow/workflow-migration-geometry.mjs +144 -0
  66. package/ai/skills/stacks-technical-diagrams/schemas/README.md +154 -11
  67. package/ai/skills/stacks-technical-diagrams/schemas/architecture.schema.json +61 -4
  68. package/ai/skills/stacks-technical-diagrams/schemas/common.schema.json +72 -0
  69. package/ai/skills/stacks-technical-diagrams/schemas/dataflow.schema.json +40 -18
  70. package/ai/skills/stacks-technical-diagrams/schemas/lifecycle.schema.json +43 -18
  71. package/ai/skills/stacks-technical-diagrams/schemas/sequence.schema.json +41 -4
  72. package/ai/skills/stacks-technical-diagrams/schemas/workflow.schema.json +97 -1
  73. package/ai/skills/stacks-technical-diagrams/scripts/check-render-output.mjs +551 -12
  74. package/ai/skills/stacks-technical-diagrams/scripts/render-examples.mjs +3 -4
  75. package/ide/vscode/package.json +1 -1
  76. package/package.json +2 -2
  77. package/resources/components/CookieConsent.stx +146 -0
  78. package/resources/components/CookieConsent.test.ts +79 -0
@@ -3,9 +3,15 @@
3
3
  "diagram_type": "lifecycle",
4
4
  "meta": {
5
5
  "title": "Agent Run Lifecycle",
6
- "subtitle": "State machine for planning, tool execution, human approval, retries, and terminal outcomes",
7
6
  "output": "examples/lifecycle-agent-run.html",
8
- "viewBox": [980, 660]
7
+ "viewBox": [1030, 630],
8
+ "animation": "trace",
9
+ "quality_profile": "showcase",
10
+ "views": [
11
+ { "id": "main-lifecycle", "label": "Main lifecycle", "focus": ["queued", "planning", "executing", "reviewing", "completed"], "note": "Follow the ordered phases from accepted request to completed response." },
12
+ { "id": "human-waits", "label": "Human and input waits", "focus": ["executing", "approval", "reviewing", "blocked"], "note": "See where the run pauses without becoming terminal." },
13
+ { "id": "recovery-and-exits", "label": "Recovery and terminal exits", "focus": ["executing", "failed", "blocked", "cancelled", "expired"], "note": "Separate retryable failure from cancellation and expiry." }
14
+ ]
9
15
  },
10
16
  "lanes": [
11
17
  { "id": "main", "label": "Lifecycle phases" },
@@ -26,38 +32,28 @@
26
32
  { "id": "expired", "type": "failure", "label": "Expired", "sublabel": "timeout", "lane": "terminal", "col": 1, "tag": "terminal" }
27
33
  ],
28
34
  "transitions": [
29
- { "from": "executing", "to": "approval", "variant": "security", "fromSide": "bottom", "toSide": "top", "route": "straight" },
30
- { "from": "reviewing", "to": "blocked", "variant": "default", "route": "drop" },
31
- { "from": "executing", "to": "failed", "variant": "security", "fromSide": "left", "toSide": "top", "via": [[340, 342], [402, 342]] },
32
- { "from": "blocked", "to": "expired", "variant": "security", "fromSide": "bottom", "toSide": "top", "route": "straight" },
33
- { "from": "approval", "to": "cancelled", "variant": "security", "fromSide": "bottom", "toSide": "top", "route": "straight" }
35
+ { "id": "approval-needed", "from": "executing", "to": "approval", "variant": "security", "fromSide": "bottom", "toSide": "top", "route": "straight" },
36
+ { "id": "review-blocked", "from": "reviewing", "to": "blocked", "variant": "default", "route": "drop" },
37
+ { "id": "execution-failed", "from": "executing", "to": "failed", "variant": "security", "fromSide": "left", "toSide": "left", "via": [[320, 157], [320, 385]] },
38
+ { "id": "failed-retry", "from": "failed", "to": "executing", "variant": "emphasis", "fromSide": "left", "toSide": "top", "via": [[20, 385], [20, 80], [402, 80]] },
39
+ { "id": "block-expired", "from": "blocked", "to": "expired", "variant": "security", "fromSide": "bottom", "toSide": "top", "route": "straight" },
40
+ { "id": "approval-cancelled", "from": "approval", "to": "cancelled", "variant": "security", "fromSide": "bottom", "toSide": "top", "via": [[480, 336], [480, 432], [402, 432]] }
34
41
  ],
35
42
  "cards": [
36
43
  {
37
44
  "dot": "emerald",
38
- "title": "Main Path",
45
+ "title": "Main Path + Waits",
39
46
  "items": [
40
47
  "The run has five ordered phases from queue to completion",
41
- "The primary lifecycle is carried by one horizontal rail",
42
- "Completion is a phase, not a detached side box"
43
- ]
44
- },
45
- {
46
- "dot": "amber",
47
- "title": "Human + Input Gates",
48
- "items": [
49
- "Approval pauses execution without ending the run",
50
- "Blocked waits for missing user input",
51
- "Wait states can resume back into planning or execution"
48
+ "Approval and missing input pause the run without ending it"
52
49
  ]
53
50
  },
54
51
  {
55
52
  "dot": "rose",
56
- "title": "Terminal + Recovery",
53
+ "title": "Recovery + Terminal Exits",
57
54
  "items": [
58
55
  "Failed loops back while retry budget remains",
59
- "Cancelled and Expired are exits from the lifecycle",
60
- "Terminal exits do not point back into active execution"
56
+ "Cancelled and Expired are terminal exits with no return path"
61
57
  ]
62
58
  }
63
59
  ]
@@ -1,19 +1,38 @@
1
1
  {
2
- "schema_version": 1,
2
+ "schema_version": 2,
3
3
  "diagram_type": "workflow",
4
4
  "meta": {
5
5
  "title": "Agent Tool Call Workflow",
6
- "subtitle": "Renderer-driven workflow prototype with lanes, anchored nodes, and orthogonal edges",
7
- "output": "examples/workflow-agent-tool-call-rendered.html",
8
- "viewBox": [720, 900]
6
+ "animation": "trace",
7
+ "visual_preset": "signal-flow",
8
+ "quality_profile": "showcase",
9
+ "views": [
10
+ {
11
+ "id": "happy-path",
12
+ "label": "Request to result",
13
+ "focus": ["user", "chat", "planner", "router", "approval", "tool", "external", "final"],
14
+ "note": "Follow the successful request from user intent to the final reply."
15
+ },
16
+ {
17
+ "id": "safety-gate",
18
+ "label": "Policy and recovery",
19
+ "focus": ["router", "approval", "blocked", "retry"],
20
+ "note": "See where risky work stops, waits for consent, or returns for revision."
21
+ },
22
+ {
23
+ "id": "evidence-loop",
24
+ "label": "Evidence and memory",
25
+ "focus": ["external", "store", "trace"],
26
+ "note": "Isolate the durable trace and context path behind the visible answer."
27
+ }
28
+ ],
29
+ "output": "examples/workflow-agent-tool-call-rendered.html"
9
30
  },
10
31
  "lanes": [
11
32
  { "id": "ui", "label": "User Interface" },
12
33
  { "id": "agent", "label": "Agent Runtime" },
13
- { "id": "policy", "label": "Policy Boundary" },
14
- { "id": "exceptions", "label": "Exception Handling", "variant": "exception" },
15
- { "id": "tools", "label": "Tool Execution" },
16
- { "id": "trace", "label": "Observability" }
34
+ { "id": "policy", "label": "Policy & Recovery", "variant": "exception" },
35
+ { "id": "tools", "label": "Tool Execution & Evidence" }
17
36
  ],
18
37
  "phases": [
19
38
  { "id": "intake", "label": "Intake", "fromCol": 0, "toCol": 1 },
@@ -22,66 +41,53 @@
22
41
  ],
23
42
  "groups": [
24
43
  { "id": "agent_loop", "label": "Planning loop", "lane": "agent", "fromCol": 2, "toCol": 3, "variant": "emphasis" },
25
- { "id": "tool_work", "label": "Tool work", "lane": "tools", "fromCol": 4, "toCol": 5, "variant": "dashed" },
26
- { "id": "exception_path", "label": "Human or policy stop", "lane": "exceptions", "fromCol": 3, "toCol": 5, "variant": "security" }
44
+ { "id": "exception_path", "label": "Human or policy stop", "lane": "policy", "fromCol": 3, "toCol": 5, "variant": "security" },
45
+ { "id": "evidence_path", "label": "Evidence path", "lane": "tools", "fromCol": 1, "toCol": 2, "variant": "dashed" },
46
+ { "id": "tool_work", "label": "Tool work", "lane": "tools", "fromCol": 4, "toCol": 5, "variant": "dashed" }
27
47
  ],
28
48
  "mainPath": ["user", "chat", "planner", "router", "approval", "tool", "external", "final"],
29
49
  "nodes": [
30
- { "id": "user", "lane": "ui", "col": 0, "type": "external", "label": "User", "sublabel": "asks for work" },
31
- { "id": "chat", "lane": "ui", "col": 1, "type": "frontend", "label": "Chat Surface", "sublabel": "thread + files" },
32
- { "id": "final", "lane": "ui", "col": 5, "type": "backend", "label": "Final Reply", "sublabel": "answer + changes" },
33
- { "id": "planner", "lane": "agent", "col": 2, "type": "backend", "label": "Agent Planner", "sublabel": "plan next step", "tag": "context aware" },
34
- { "id": "router", "lane": "agent", "col": 3, "type": "backend", "label": "Tool Router", "sublabel": "choose capability" },
35
- { "id": "approval", "lane": "policy", "col": 3, "type": "security", "label": "Approval Gate", "sublabel": "scope + consent", "tag": "block risky ops" },
36
- { "id": "blocked", "lane": "exceptions", "col": 4, "type": "security", "label": "Blocked", "sublabel": "wait or reject" },
37
- { "id": "retry", "lane": "exceptions", "col": 5, "type": "messagebus", "label": "Retry Path", "sublabel": "revise request" },
38
- { "id": "tool", "lane": "tools", "col": 4, "type": "messagebus", "label": "Tool Call", "sublabel": "shell / browser / MCP", "tag": "structured result" },
39
- { "id": "external", "lane": "tools", "col": 5, "type": "cloud", "label": "External API", "sublabel": "network service" },
40
- { "id": "store", "lane": "trace", "col": 1, "type": "database", "label": "Context Store", "sublabel": "repo + memory" },
41
- { "id": "trace", "lane": "trace", "col": 4, "type": "database", "label": "Trace Log", "sublabel": "events + output" }
50
+ { "id": "user", "lane": "ui", "col": 0, "type": "external", "label": "User", "sublabel": "asks for work", "width": 132 },
51
+ { "id": "chat", "lane": "ui", "col": 1, "type": "frontend", "label": "Chat Surface", "sublabel": "thread + files", "width": 132 },
52
+ { "id": "final", "lane": "ui", "col": 5, "type": "backend", "label": "Final Reply", "sublabel": "answer + changes", "width": 132 },
53
+ { "id": "planner", "lane": "agent", "col": 2, "type": "backend", "label": "Agent Planner", "sublabel": "plan next step", "tag": "context aware", "width": 132 },
54
+ { "id": "router", "lane": "agent", "col": 3, "type": "backend", "label": "Tool Router", "sublabel": "choose capability", "width": 132 },
55
+ { "id": "approval", "lane": "policy", "col": 3, "type": "security", "label": "Approval Gate", "sublabel": "scope + consent", "tag": "block risky ops", "width": 132 },
56
+ { "id": "blocked", "lane": "policy", "col": 4, "type": "security", "label": "Blocked", "sublabel": "wait or reject", "width": 132 },
57
+ { "id": "retry", "lane": "policy", "col": 5, "type": "messagebus", "label": "Retry Path", "sublabel": "revise request", "width": 132 },
58
+ { "id": "tool", "lane": "tools", "col": 4, "type": "messagebus", "label": "Tool Call", "sublabel": "shell / browser / MCP", "tag": "structured result", "width": 132 },
59
+ { "id": "external", "lane": "tools", "col": 5, "type": "cloud", "label": "External API", "sublabel": "network service", "width": 132 },
60
+ { "id": "store", "lane": "tools", "col": 1, "type": "database", "label": "Context Store", "sublabel": "repo + memory", "width": 132 },
61
+ { "id": "trace", "lane": "tools", "col": 2, "type": "database", "label": "Trace Log", "sublabel": "events + output", "width": 132 }
42
62
  ],
43
63
  "edges": [
44
- { "from": "user", "to": "chat", "variant": "default" },
45
- { "from": "chat", "to": "planner", "label": "plan", "variant": "emphasis", "fromSide": "bottom", "toSide": "top", "route": "drop", "labelSegment": 1 },
46
- { "from": "planner", "to": "router", "variant": "default" },
47
- { "from": "router", "to": "approval", "label": "needs approval?", "variant": "security", "fromSide": "bottom", "toSide": "top", "route": "drop", "labelSegment": 0, "labelDx": 34, "labelDy": 18 },
48
- { "from": "approval", "to": "tool", "variant": "emphasis", "fromSide": "left", "toSide": "left", "route": "return-left" },
49
- { "from": "approval", "to": "blocked", "label": "denied", "variant": "security", "role": "error", "fromSide": "bottom", "toSide": "top", "route": "drop", "labelSegment": 1, "labelDy": 12 },
50
- { "from": "blocked", "to": "retry", "variant": "dashed", "role": "branch" },
51
- { "from": "tool", "to": "external", "variant": "default" },
52
- { "from": "external", "to": "final", "variant": "emphasis", "role": "return", "fromSide": "right", "toSide": "right", "route": "outside-right", "width": 1.2 },
53
- { "from": "external", "to": "trace", "label": "record result", "variant": "dashed", "fromSide": "bottom", "toSide": "bottom", "route": "bottom-channel", "labelSegment": 1 },
54
- { "from": "store", "to": "trace", "label": "trace + memory", "variant": "dashed", "labelAt": [365, 735] }
64
+ { "id": "request-chat", "from": "user", "to": "chat", "variant": "default" },
65
+ { "id": "plan-request", "from": "chat", "to": "planner", "label": "plan", "variant": "emphasis" },
66
+ { "id": "planner-route", "from": "planner", "to": "router", "variant": "default" },
67
+ { "id": "approval-check", "from": "router", "to": "approval", "label": "needs approval?", "variant": "security" },
68
+ { "id": "approved-tool", "from": "approval", "to": "tool", "variant": "emphasis" },
69
+ { "id": "approval-denied", "from": "approval", "to": "blocked", "label": "denied", "variant": "security", "role": "error" },
70
+ { "id": "retry-request", "from": "blocked", "to": "retry", "variant": "dashed", "role": "branch" },
71
+ { "id": "tool-external-call", "from": "tool", "to": "external", "variant": "default" },
72
+ { "id": "external-reply", "from": "external", "to": "final", "variant": "emphasis", "role": "return", "fromSide": "right", "toSide": "right", "route": "outside-right", "width": 1.2 },
73
+ { "id": "record-result", "from": "external", "to": "trace", "label": "record result", "variant": "dashed", "fromSide": "bottom", "toSide": "bottom", "route": "bottom-channel", "labelSegment": 1 },
74
+ { "id": "write-trace-memory", "from": "store", "to": "trace", "label": "trace + memory", "variant": "dashed" }
55
75
  ],
56
76
  "cards": [
57
77
  {
58
78
  "dot": "cyan",
59
- "title": "Renderer Rules",
79
+ "title": "Compiler Contract",
60
80
  "items": [
61
81
  "Lanes and columns determine node placement",
62
- "Edges attach to explicit node anchors",
63
- "Cross-lane paths use orthogonal routing",
64
- "Short adjacent links stay unlabeled"
82
+ "Labels reserve clearance; routes stay orthogonal"
65
83
  ]
66
84
  },
67
85
  {
68
86
  "dot": "rose",
69
- "title": "Workflow Semantics",
87
+ "title": "Runtime Semantics",
70
88
  "items": [
71
- "Approval is a first-class policy step",
72
- "Consent gates are visible in the main path",
73
- "External calls stay inside the tool lane",
74
- "Trace writes are separate from the hot path"
75
- ]
76
- },
77
- {
78
- "dot": "emerald",
79
- "title": "Why It Matters",
80
- "items": [
81
- "This is closer to a diagram_type renderer",
82
- "The graph can be edited without SVG surgery",
83
- "Layout rules can be tested and improved",
84
- "A future IR can reuse this shape directly"
89
+ "Approval gates risky work before tool execution",
90
+ "Evidence returns through isolated trace and memory"
85
91
  ]
86
92
  }
87
93
  ]
@@ -0,0 +1,61 @@
1
+ {
2
+ "schema_version": 1,
3
+ "diagram_type": "sequence",
4
+ "meta": {
5
+ "title": "Async Job Roundtrip",
6
+ "output": "examples/async-job-roundtrip.html",
7
+ "viewBox": [820, 920],
8
+ "animation": "trace",
9
+ "visual_preset": "signal-flow",
10
+ "quality_profile": "showcase",
11
+ "views": [
12
+ { "id": "accept-and-enqueue", "label": "Accept without blocking", "focus": ["client", "api", "queue"], "note": "The API acknowledges quickly after durable enqueue." },
13
+ { "id": "work-and-retry", "label": "Background work and retry", "focus": ["queue", "worker", "provider"], "note": "Timeouts re-enter the queue instead of holding the original request open." },
14
+ { "id": "observe-final-state", "label": "Observe final consistency", "focus": ["worker", "store", "notify", "client", "api"], "note": "Webhook delivery is primary; polling remains a bounded fallback." }
15
+ ]
16
+ },
17
+ "participants": [
18
+ { "id": "client", "type": "external", "label": "Client", "sublabel": "mobile app" },
19
+ { "id": "api", "type": "backend", "label": "Jobs API", "sublabel": "request edge" },
20
+ { "id": "queue", "type": "messagebus", "label": "Queue", "sublabel": "durable work" },
21
+ { "id": "worker", "type": "backend", "label": "Worker", "sublabel": "background" },
22
+ { "id": "provider", "type": "cloud", "label": "Provider", "sublabel": "external API" },
23
+ { "id": "store", "type": "database", "label": "Job Store", "sublabel": "source of truth" },
24
+ { "id": "notify", "type": "messagebus", "label": "Notifier", "sublabel": "webhook" }
25
+ ],
26
+ "segments": [
27
+ { "from": 150, "to": 288, "label": "Accept" },
28
+ { "from": 306, "to": 538, "label": "Background work" },
29
+ { "from": 554, "to": 800, "label": "Notify + reconcile" }
30
+ ],
31
+ "messages": [
32
+ { "from": "client", "to": "api", "y": 180, "label": "POST /jobs", "variant": "emphasis" },
33
+ { "from": "api", "to": "queue", "y": 222, "label": "enqueue job", "variant": "emphasis" },
34
+ { "from": "api", "to": "client", "y": 264, "label": "202 + job id", "variant": "return" },
35
+ { "from": "queue", "to": "worker", "y": 326, "label": "deliver", "variant": "emphasis" },
36
+ { "from": "worker", "to": "provider", "y": 368, "label": "perform work", "variant": "default" },
37
+ { "from": "provider", "to": "worker", "y": 410, "label": "result / timeout", "variant": "return" },
38
+ { "from": "worker", "to": "queue", "y": 452, "label": "retry if timeout", "variant": "dashed" },
39
+ { "from": "worker", "to": "store", "y": 494, "label": "persist final state", "variant": "emphasis" },
40
+ { "from": "worker", "to": "notify", "y": 566, "label": "job.completed", "variant": "dashed" },
41
+ { "from": "notify", "to": "client", "y": 608, "label": "signed webhook", "variant": "dashed" },
42
+ { "from": "client", "to": "api", "y": 650, "label": "GET /jobs/:id", "variant": "default" },
43
+ { "from": "api", "to": "store", "y": 692, "label": "read status", "variant": "default" },
44
+ { "from": "store", "to": "api", "y": 734, "label": "completed", "variant": "return" },
45
+ { "from": "api", "to": "client", "y": 776, "label": "200 final result", "variant": "return" }
46
+ ],
47
+ "activations": [
48
+ { "participant": "api", "from": 174, "to": 272, "type": "backend" },
49
+ { "participant": "queue", "from": 216, "to": 334, "type": "messagebus" },
50
+ { "participant": "worker", "from": 320, "to": 574, "type": "backend" },
51
+ { "participant": "provider", "from": 362, "to": 416, "type": "cloud" },
52
+ { "participant": "store", "from": 488, "to": 742, "type": "database" },
53
+ { "participant": "notify", "from": 560, "to": 616, "type": "messagebus" },
54
+ { "participant": "api", "from": 644, "to": 784, "type": "backend" }
55
+ ],
56
+ "cards": [
57
+ { "dot": "cyan", "title": "Fast Acknowledgement", "items": ["The caller receives a durable job id before work begins", "Queue ownership is visible in the acceptance contract", "The original connection does not wait for provider latency"] },
58
+ { "dot": "orange", "title": "Bounded Recovery", "items": ["Timeouts re-enter the queue with a retry policy", "Final state is persisted before notification", "The job store remains the source of truth"] },
59
+ { "dot": "emerald", "title": "Two Observation Paths", "items": ["A signed webhook announces completion", "Status polling is a fallback, not a second workflow", "Both paths converge on the same final state"] }
60
+ ]
61
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "schema_version": 1,
3
+ "diagram_type": "architecture",
4
+ "meta": {
5
+ "title": "Brand-aware AI delivery",
6
+ "quality_profile": "showcase",
7
+ "viewBox": [1120, 640],
8
+ "views": [
9
+ {
10
+ "id": "delivery-path",
11
+ "label": "Delivery path",
12
+ "focus": ["request", "claude", "github", "container", "edge", "customer"],
13
+ "note": "Follow one delivery from the request through the model, repository, container, and edge."
14
+ },
15
+ {
16
+ "id": "business-data",
17
+ "label": "Business and data",
18
+ "focus": ["container", "database", "billing"],
19
+ "note": "Inspect durable state and billing without losing the main delivery path."
20
+ }
21
+ ]
22
+ },
23
+ "components": [
24
+ { "id": "request", "type": "external", "label": "Product request", "sublabel": "Owner brief", "pos": [38, 260], "size": [138, 68] },
25
+ { "id": "claude", "type": "frontend", "label": "Claude", "sublabel": "Plan and author", "brand": "claude", "pos": [220, 260], "size": [138, 68] },
26
+ { "id": "github", "type": "messagebus", "label": "GitHub", "sublabel": "Review and merge", "brand": "github", "pos": [402, 260], "size": [138, 68] },
27
+ { "id": "container", "type": "backend", "label": "Docker service", "sublabel": "Build and run", "brand": "docker", "pos": [584, 260], "size": [138, 68] },
28
+ { "id": "edge", "type": "cloud", "label": "Cloudflare", "sublabel": "Global delivery", "brand": "cloudflare", "pos": [766, 260], "size": [138, 68] },
29
+ { "id": "customer", "type": "external", "label": "Customers", "sublabel": "Web and mobile", "pos": [948, 260], "size": [138, 68] },
30
+ { "id": "database", "type": "database", "label": "PostgreSQL", "sublabel": "Durable state", "brand": "postgresql", "pos": [584, 420], "size": [138, 68] },
31
+ { "id": "billing", "type": "external", "label": "Stripe", "sublabel": "Billing events", "brand": "stripe", "pos": [766, 420], "size": [138, 68] }
32
+ ],
33
+ "connections": [
34
+ { "id": "brief-to-claude", "from": "request", "to": "claude", "label": "brief", "variant": "emphasis" },
35
+ { "id": "claude-to-github", "from": "claude", "to": "github", "label": "change set", "labelDy": -28 },
36
+ { "id": "github-to-container", "from": "github", "to": "container", "label": "approved build", "labelDy": -28 },
37
+ { "id": "container-to-edge", "from": "container", "to": "edge", "label": "deploy" },
38
+ { "id": "edge-to-customer", "from": "edge", "to": "customer", "label": "HTTPS", "variant": "emphasis" },
39
+ { "id": "container-to-database", "from": "container", "to": "database", "label": "SQL", "fromSide": "bottom", "toSide": "top", "labelAt": [625, 370] },
40
+ { "id": "container-to-billing", "from": "container", "to": "billing", "label": "create charge", "variant": "dashed", "fromSide": "bottom", "toSide": "top", "via": [[653, 374], [835, 374]] },
41
+ { "id": "billing-to-database", "from": "billing", "to": "database", "label": "webhook", "variant": "dashed" }
42
+ ],
43
+ "cards": [
44
+ { "dot": "cyan", "title": "Identity at a glance", "items": ["Semantic color still explains technical role", "Brand badges identify the actual products"] },
45
+ { "dot": "amber", "title": "Portable by default", "items": ["Preset marks ship inside the skill", "Every visual export keeps the same badge"] }
46
+ ]
47
+ }
@@ -3,9 +3,16 @@
3
3
  "diagram_type": "sequence",
4
4
  "meta": {
5
5
  "title": "Cache Miss Request Sequence",
6
- "subtitle": "Frontend request path with auth, cache fallback, persistence, and async trace",
7
6
  "output": "examples/sequence-cache-miss-request.html",
8
- "viewBox": [820, 760]
7
+ "viewBox": [1080, 560],
8
+ "column_fit": "spread",
9
+ "animation": "trace",
10
+ "quality_profile": "showcase",
11
+ "views": [
12
+ { "id": "request-and-auth", "label": "Request and identity", "focus": ["user", "web", "api", "auth"], "note": "Follow the user request through the authentication check." },
13
+ { "id": "cache-fallback", "label": "Cache fallback", "focus": ["api", "redis", "db"], "note": "See the cache miss and the source-of-truth query it triggers." },
14
+ { "id": "return-and-trace", "label": "Return and trace", "focus": ["db", "api", "redis", "trace", "web", "user"], "note": "Separate response latency from the non-blocking observability write." }
15
+ ]
9
16
  },
10
17
  "participants": [
11
18
  { "id": "user", "type": "external", "label": "User", "sublabel": "browser session" },
@@ -17,31 +24,31 @@
17
24
  { "id": "trace", "type": "messagebus", "label": "Trace", "sublabel": "async event" }
18
25
  ],
19
26
  "segments": [
20
- { "from": 150, "to": 295, "label": "Request" },
21
- { "from": 315, "to": 505, "label": "Fallback" },
22
- { "from": 525, "to": 665, "label": "Response + trace" }
27
+ { "from": 150, "to": 250, "label": "Request" },
28
+ { "from": 260, "to": 370, "label": "Fallback" },
29
+ { "from": 380, "to": 480, "label": "Response + trace" }
23
30
  ],
24
31
  "messages": [
25
- { "from": "user", "to": "web", "y": 185, "label": "open page", "variant": "default" },
26
- { "from": "web", "to": "api", "y": 228, "label": "GET /dashboard", "variant": "emphasis" },
27
- { "from": "api", "to": "auth", "y": 270, "label": "verify JWT", "variant": "security" },
28
- { "from": "auth", "to": "api", "y": 305, "label": "claims ok", "variant": "return" },
29
- { "from": "api", "to": "redis", "y": 354, "label": "read cache", "variant": "default" },
30
- { "from": "redis", "to": "api", "y": 391, "label": "miss", "variant": "return" },
31
- { "from": "api", "to": "db", "y": 443, "label": "query profile + metrics", "variant": "emphasis" },
32
- { "from": "db", "to": "api", "y": 489, "label": "rows", "variant": "return" },
33
- { "from": "api", "to": "redis", "y": 536, "label": "set cache", "variant": "dashed" },
34
- { "from": "api", "to": "trace", "y": 580, "label": "emit trace", "variant": "dashed" },
35
- { "from": "api", "to": "web", "y": 625, "label": "200 JSON", "variant": "return" },
36
- { "from": "web", "to": "user", "y": 662, "label": "render", "variant": "return" }
32
+ { "id": "open-page", "from": "user", "to": "web", "y": 160, "label": "open page", "variant": "default" },
33
+ { "id": "dashboard-request", "from": "web", "to": "api", "y": 185, "label": "GET /dashboard", "variant": "emphasis" },
34
+ { "id": "verify-jwt", "from": "api", "to": "auth", "y": 210, "label": "verify JWT", "variant": "security" },
35
+ { "id": "auth-claims", "from": "auth", "to": "api", "y": 238, "label": "claims ok", "variant": "return" },
36
+ { "id": "cache-read", "from": "api", "to": "redis", "y": 270, "label": "read cache", "variant": "default" },
37
+ { "id": "cache-miss", "from": "redis", "to": "api", "y": 298, "label": "miss", "variant": "return" },
38
+ { "id": "profile-query", "from": "api", "to": "db", "y": 330, "label": "query profile + metrics", "variant": "emphasis" },
39
+ { "id": "profile-rows", "from": "db", "to": "api", "y": 358, "label": "rows", "variant": "return" },
40
+ { "id": "cache-write", "from": "api", "to": "redis", "y": 390, "label": "set cache", "variant": "dashed" },
41
+ { "id": "trace-emit", "from": "api", "to": "trace", "y": 418, "label": "emit trace", "variant": "dashed" },
42
+ { "id": "dashboard-response", "from": "api", "to": "web", "y": 443, "label": "200 JSON", "variant": "return" },
43
+ { "id": "page-render", "from": "web", "to": "user", "y": 468, "label": "render", "variant": "return" }
37
44
  ],
38
45
  "activations": [
39
- { "participant": "web", "from": 220, "to": 668, "type": "frontend" },
40
- { "participant": "api", "from": 228, "to": 632, "type": "backend" },
41
- { "participant": "auth", "from": 265, "to": 310, "type": "security" },
42
- { "participant": "redis", "from": 349, "to": 398, "type": "database" },
43
- { "participant": "db", "from": 438, "to": 496, "type": "database" },
44
- { "participant": "trace", "from": 575, "to": 630, "type": "messagebus" }
46
+ { "participant": "web", "from": 180, "to": 474, "type": "frontend" },
47
+ { "participant": "api", "from": 185, "to": 450, "type": "backend" },
48
+ { "participant": "auth", "from": 205, "to": 244, "type": "security" },
49
+ { "participant": "redis", "from": 265, "to": 304, "type": "database" },
50
+ { "participant": "db", "from": 325, "to": 364, "type": "database" },
51
+ { "participant": "trace", "from": 413, "to": 449, "type": "messagebus" }
45
52
  ],
46
53
  "cards": [
47
54
  {
@@ -0,0 +1,31 @@
1
+ {
2
+ "schema_version": 1,
3
+ "diagram_type": "architecture",
4
+ "meta": {
5
+ "title": "Checkout Platform - Baseline",
6
+ "visual_preset": "signal-flow"
7
+ },
8
+ "components": [
9
+ { "id": "buyers", "type": "external", "label": "Buyers", "sublabel": "Web + mobile", "pos": [40, 250], "size": [120, 60] },
10
+ { "id": "edge", "type": "cloud", "label": "Edge Gateway", "sublabel": "TLS + routing", "pos": [220, 250], "size": [130, 60] },
11
+ { "id": "checkout", "type": "backend", "label": "Checkout API", "sublabel": "v1 service", "pos": [430, 250], "size": [130, 60] },
12
+ { "id": "cache", "type": "database", "label": "Session Cache", "sublabel": "Redis", "pos": [430, 100], "size": [130, 60] },
13
+ { "id": "orders", "type": "database", "label": "Orders", "sublabel": "PostgreSQL", "pos": [640, 250], "size": [130, 60] },
14
+ { "id": "queue", "type": "messagebus", "label": "Order Events", "sublabel": "durable queue", "pos": [430, 400], "size": [130, 60] },
15
+ { "id": "worker", "type": "backend", "label": "Fulfilment", "sublabel": "async worker", "pos": [640, 400], "size": [130, 60] },
16
+ { "id": "payments", "type": "external", "label": "Payment Rail", "sublabel": "external", "pos": [850, 250], "size": [130, 60] }
17
+ ],
18
+ "boundaries": [
19
+ { "kind": "region", "label": "Production region", "wraps": ["edge", "checkout", "cache", "orders", "queue", "worker"] },
20
+ { "kind": "security-group", "label": "Checkout trust zone", "wraps": ["checkout", "orders"] }
21
+ ],
22
+ "connections": [
23
+ { "id": "buyer-request", "from": "buyers", "to": "edge", "label": "HTTPS", "variant": "emphasis" },
24
+ { "id": "edge-checkout", "from": "edge", "to": "checkout" },
25
+ { "id": "session-read", "from": "checkout", "to": "cache", "label": "session", "fromSide": "top", "toSide": "bottom", "labelDy": -66 },
26
+ { "id": "persist-order", "from": "checkout", "to": "orders", "label": "SQL" },
27
+ { "id": "publish-order", "from": "checkout", "to": "queue", "label": "accepted", "variant": "dashed", "fromSide": "bottom", "toSide": "top", "labelDy": 66 },
28
+ { "id": "consume-order", "from": "queue", "to": "worker" },
29
+ { "id": "authorize-payment", "from": "orders", "to": "payments", "label": "authorize", "variant": "security" }
30
+ ]
31
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "schema_version": 1,
3
+ "diagram_type": "architecture",
4
+ "meta": {
5
+ "title": "Checkout Platform - Fraud Gate",
6
+ "visual_preset": "signal-flow"
7
+ },
8
+ "components": [
9
+ { "id": "buyers", "type": "external", "label": "Buyers", "sublabel": "Web + mobile", "pos": [40, 250], "size": [120, 60] },
10
+ { "id": "edge", "type": "cloud", "label": "Edge Gateway", "sublabel": "TLS + routing", "pos": [220, 250], "size": [130, 60] },
11
+ { "id": "checkout", "type": "backend", "label": "Checkout API", "sublabel": "v2 idempotent", "pos": [430, 250], "size": [130, 60] },
12
+ { "id": "fraud", "type": "security", "label": "Fraud Gate", "sublabel": "policy scoring", "pos": [640, 100], "size": [130, 60], "tag": "new owner" },
13
+ { "id": "orders", "type": "database", "label": "Orders", "sublabel": "PostgreSQL", "pos": [640, 250], "size": [130, 60] },
14
+ { "id": "queue", "type": "messagebus", "label": "Order Events", "sublabel": "durable queue", "pos": [430, 420], "size": [130, 60] },
15
+ { "id": "worker", "type": "backend", "label": "Fulfilment", "sublabel": "async worker", "pos": [640, 400], "size": [130, 60] },
16
+ { "id": "payments", "type": "external", "label": "Payment Rail", "sublabel": "external", "pos": [850, 250], "size": [130, 60] }
17
+ ],
18
+ "boundaries": [
19
+ { "kind": "region", "label": "Production region", "wraps": ["edge", "checkout", "fraud", "orders", "queue", "worker"] },
20
+ { "kind": "security-group", "label": "Checkout trust zone", "wraps": ["checkout", "fraud", "orders"] }
21
+ ],
22
+ "connections": [
23
+ { "id": "buyer-request", "from": "buyers", "to": "edge", "label": "HTTPS", "variant": "emphasis" },
24
+ { "id": "edge-checkout", "from": "edge", "to": "checkout" },
25
+ { "id": "fraud-check", "from": "checkout", "to": "fraud", "label": "screen", "variant": "security", "fromSide": "top", "toSide": "bottom", "labelDy": -66 },
26
+ { "id": "persist-order", "from": "checkout", "to": "orders", "label": "SQL tx" },
27
+ { "id": "publish-order", "from": "checkout", "to": "queue", "label": "accepted", "variant": "dashed", "fromSide": "bottom", "toSide": "top", "labelDy": 76 },
28
+ { "id": "consume-order", "from": "queue", "to": "worker" },
29
+ { "id": "authorize-payment", "from": "fraud", "to": "payments", "label": "authorize", "variant": "security", "fromSide": "right", "toSide": "top", "via": [[820, 130], [915, 130]] }
30
+ ]
31
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "schema_version": 1,
3
+ "diagram_type": "lifecycle",
4
+ "meta": {
5
+ "title": "Deployment Release Lifecycle",
6
+ "output": "examples/deployment-release.html",
7
+ "viewBox": [980, 680],
8
+ "animation": "trace",
9
+ "visual_preset": "signal-flow",
10
+ "quality_profile": "showcase",
11
+ "views": [
12
+ { "id": "promotion-rail", "label": "Promotion rail", "focus": ["queued", "building", "verifying", "ready", "live"], "note": "Follow the deployment object from accepted change to healthy production." },
13
+ { "id": "approval-gate", "label": "Approval gate", "focus": ["verifying", "approval", "cancelled", "ready"], "note": "Approval pauses promotion and can terminate the release cleanly." },
14
+ { "id": "rollback-outcomes", "label": "Rollback outcomes", "focus": ["ready", "rollback", "failed", "live", "paused", "rolled_back"], "note": "Separate pre-promotion failure from post-promotion health regression." }
15
+ ]
16
+ },
17
+ "lanes": [
18
+ { "id": "main", "label": "Release phases" },
19
+ { "id": "waiting", "label": "Approval + health wait" },
20
+ { "id": "recovery", "label": "Rollback controller" },
21
+ { "id": "terminal", "label": "Terminal exits" }
22
+ ],
23
+ "states": [
24
+ { "id": "queued", "type": "start", "label": "Queued", "sublabel": "change accepted", "lane": "main", "col": 0, "step": "01", "tag": "pending" },
25
+ { "id": "building", "type": "active", "label": "Building", "sublabel": "immutable image", "lane": "main", "col": 1, "step": "02", "tag": "running" },
26
+ { "id": "verifying", "type": "decision", "label": "Verifying", "sublabel": "tests + policy", "lane": "main", "col": 2, "step": "03", "tag": "gate" },
27
+ { "id": "ready", "type": "waiting", "label": "Ready", "sublabel": "promotion pending", "lane": "main", "col": 3, "step": "04", "tag": "approved" },
28
+ { "id": "live", "type": "success", "label": "Live", "sublabel": "production healthy", "lane": "main", "col": 4, "step": "05", "tag": "success" },
29
+ { "id": "approval", "type": "waiting", "label": "Needs Approval", "sublabel": "release owner", "lane": "waiting", "col": 0, "tag": "pause" },
30
+ { "id": "rollback", "type": "active", "label": "Rolling Back", "sublabel": "last good image", "lane": "recovery", "col": 1, "tag": "automatic" },
31
+ { "id": "paused", "type": "waiting", "label": "Health Paused", "sublabel": "SLO regression", "lane": "waiting", "col": 2, "tag": "observe" },
32
+ { "id": "cancelled", "type": "failure", "label": "Cancelled", "sublabel": "approval denied", "lane": "terminal", "col": 0, "tag": "terminal" },
33
+ { "id": "failed", "type": "failure", "label": "Failed", "sublabel": "rollback failed", "lane": "terminal", "col": 1, "tag": "terminal" },
34
+ { "id": "rolled_back", "type": "success", "label": "Rolled Back", "sublabel": "service restored", "lane": "terminal", "col": 2, "tag": "terminal" }
35
+ ],
36
+ "transitions": [
37
+ { "from": "verifying", "to": "approval", "variant": "security", "route": "straight", "fromSide": "bottom", "toSide": "top" },
38
+ { "from": "approval", "to": "cancelled", "variant": "security", "route": "straight", "fromSide": "bottom", "toSide": "top" },
39
+ { "from": "ready", "to": "rollback", "variant": "security", "route": "straight", "fromSide": "bottom", "toSide": "top" },
40
+ { "from": "rollback", "to": "failed", "variant": "security", "route": "straight", "fromSide": "bottom", "toSide": "top" },
41
+ { "from": "live", "to": "paused", "variant": "dashed", "route": "straight", "fromSide": "bottom", "toSide": "top" },
42
+ { "from": "paused", "to": "rolled_back", "variant": "emphasis", "route": "straight", "fromSide": "bottom", "toSide": "top" }
43
+ ],
44
+ "cards": [
45
+ { "dot": "cyan", "title": "Promotion Rail", "items": ["The release object moves through five ordered phases", "Verification and approval remain distinct states", "Live means production health is currently proven"] },
46
+ { "dot": "amber", "title": "Wait States", "items": ["Human approval can pause without consuming a worker", "A health regression pauses further rollout", "Every wait exposes the event required to continue"] },
47
+ { "dot": "rose", "title": "Explicit Endings", "items": ["Denied approval ends as Cancelled", "Rollback controller failure ends as Failed", "Successful rollback is a terminal restored outcome"] }
48
+ ]
49
+ }