dsh-archify-projects 0.0.0-stage → 0.1.0

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 (148) hide show
  1. package/README.md +204 -2
  2. package/cordis.patch.yml +99 -0
  3. package/dist/client.js +2261 -0
  4. package/dist/client.js.map +1 -0
  5. package/docs/CONTAINER.md +197 -0
  6. package/docs/DESIGN.md +905 -0
  7. package/docs/HANDOVER.md +391 -0
  8. package/docs/PUBLISH.md +107 -0
  9. package/icon.svg +12 -0
  10. package/lib/host/archify-skill.js +116 -0
  11. package/lib/host/archify-skill.js.map +1 -0
  12. package/lib/host/config.js +95 -0
  13. package/lib/host/config.js.map +1 -0
  14. package/lib/host/context.js +28 -0
  15. package/lib/host/context.js.map +1 -0
  16. package/lib/host/git.js +185 -0
  17. package/lib/host/git.js.map +1 -0
  18. package/lib/host/http.js +184 -0
  19. package/lib/host/http.js.map +1 -0
  20. package/lib/host/index.js +90 -0
  21. package/lib/host/index.js.map +1 -0
  22. package/lib/host/policy.js +124 -0
  23. package/lib/host/policy.js.map +1 -0
  24. package/lib/host/routes.js +667 -0
  25. package/lib/host/routes.js.map +1 -0
  26. package/lib/host/runner.js +913 -0
  27. package/lib/host/runner.js.map +1 -0
  28. package/lib/host/store.js +370 -0
  29. package/lib/host/store.js.map +1 -0
  30. package/lib/host/workspace.js +65 -0
  31. package/lib/host/workspace.js.map +1 -0
  32. package/lib/shared/format.js +138 -0
  33. package/lib/shared/format.js.map +1 -0
  34. package/lib/shared/prompt.js +257 -0
  35. package/lib/shared/prompt.js.map +1 -0
  36. package/lib/shared/protocol.js +31 -0
  37. package/lib/shared/protocol.js.map +1 -0
  38. package/lib/shared/types.js +173 -0
  39. package/lib/shared/types.js.map +1 -0
  40. package/locale/en.json +6 -0
  41. package/locale/zh.json +6 -0
  42. package/package.json +98 -4
  43. package/skills/archify/LICENSE +22 -0
  44. package/skills/archify/SKILL.md +109 -0
  45. package/skills/archify/THIRD_PARTY_NOTICES.md +69 -0
  46. package/skills/archify/assets/JetBrainsMono-OFL.txt +93 -0
  47. package/skills/archify/assets/template.html +13709 -0
  48. package/skills/archify/bin/archify.mjs +6936 -0
  49. package/skills/archify/bin/delivery-update.mjs +91 -0
  50. package/skills/archify/bin/finalize.mjs +895 -0
  51. package/skills/archify/bin/open-artifact.mjs +146 -0
  52. package/skills/archify/bin/preview.mjs +969 -0
  53. package/skills/archify/bin/recover-output.mjs +41 -0
  54. package/skills/archify/bin/visual-check.mjs +2667 -0
  55. package/skills/archify/brand-marks/README.md +31 -0
  56. package/skills/archify/brand-marks/catalog.json +131 -0
  57. package/skills/archify/delta/architecture-delta.mjs +1313 -0
  58. package/skills/archify/examples/agent-run.lifecycle.json +55 -0
  59. package/skills/archify/examples/agent-tool-call.workflow.json +74 -0
  60. package/skills/archify/examples/async-job-roundtrip.sequence.json +56 -0
  61. package/skills/archify/examples/brand-aware-delivery.architecture.json +34 -0
  62. package/skills/archify/examples/cache-miss-request.sequence.json +77 -0
  63. package/skills/archify/examples/checkout-platform.base.architecture.json +32 -0
  64. package/skills/archify/examples/checkout-platform.head.architecture.json +32 -0
  65. package/skills/archify/examples/dataflow-product-analytics.html +13820 -0
  66. package/skills/archify/examples/deployment-release.lifecycle.json +48 -0
  67. package/skills/archify/examples/event-stream.dataflow.json +52 -0
  68. package/skills/archify/examples/holiday-planning.workflow.json +143 -0
  69. package/skills/archify/examples/incident-response.workflow.json +59 -0
  70. package/skills/archify/examples/lifecycle-agent-run.html +13765 -0
  71. package/skills/archify/examples/locales/de.json +425 -0
  72. package/skills/archify/examples/locales/es.json +440 -0
  73. package/skills/archify/examples/locales/fr.json +425 -0
  74. package/skills/archify/examples/locales/fr.partial.json +22 -0
  75. package/skills/archify/examples/locales/it.json +425 -0
  76. package/skills/archify/examples/locales/ja.json +425 -0
  77. package/skills/archify/examples/locales/ko.json +440 -0
  78. package/skills/archify/examples/locales/pt.json +425 -0
  79. package/skills/archify/examples/locales/ru.json +425 -0
  80. package/skills/archify/examples/product-analytics.dataflow.json +71 -0
  81. package/skills/archify/examples/production-deployment.architecture.json +51 -0
  82. package/skills/archify/examples/release-delivery.workflow.json +57 -0
  83. package/skills/archify/examples/sequence-cache-miss-request.html +13835 -0
  84. package/skills/archify/examples/web-app-rendered.html +13808 -0
  85. package/skills/archify/examples/web-app.architecture.json +41 -0
  86. package/skills/archify/examples/workflow-agent-tool-call-rendered.html +13826 -0
  87. package/skills/archify/migrations/workflow-v2.mjs +280 -0
  88. package/skills/archify/package.json +17 -0
  89. package/skills/archify/recipes/scenarios.mjs +430 -0
  90. package/skills/archify/references/architecture-layout-repair.md +18 -0
  91. package/skills/archify/references/authoring-contract.md +419 -0
  92. package/skills/archify/references/authoring-defaults.md +41 -0
  93. package/skills/archify/references/brand-marks.md +82 -0
  94. package/skills/archify/references/delivery-contract.md +588 -0
  95. package/skills/archify/references/repository-authoring.md +105 -0
  96. package/skills/archify/references/update-awareness.md +12 -0
  97. package/skills/archify/references/viewer-runtime.md +35 -0
  98. package/skills/archify/renderers/architecture/grid.mjs +62 -0
  99. package/skills/archify/renderers/architecture/labels.mjs +215 -0
  100. package/skills/archify/renderers/architecture/render-architecture.mjs +1001 -0
  101. package/skills/archify/renderers/architecture/routing.mjs +1157 -0
  102. package/skills/archify/renderers/dataflow/README.md +105 -0
  103. package/skills/archify/renderers/dataflow/render-dataflow.mjs +544 -0
  104. package/skills/archify/renderers/lifecycle/README.md +171 -0
  105. package/skills/archify/renderers/lifecycle/grid-routing.mjs +429 -0
  106. package/skills/archify/renderers/lifecycle/render-lifecycle.mjs +938 -0
  107. package/skills/archify/renderers/sequence/README.md +129 -0
  108. package/skills/archify/renderers/sequence/render-sequence.mjs +526 -0
  109. package/skills/archify/renderers/shared/atomic-output.mjs +1982 -0
  110. package/skills/archify/renderers/shared/brand-marks.mjs +670 -0
  111. package/skills/archify/renderers/shared/cli.mjs +451 -0
  112. package/skills/archify/renderers/shared/desktop-readability.mjs +132 -0
  113. package/skills/archify/renderers/shared/diagnostics.mjs +173 -0
  114. package/skills/archify/renderers/shared/engineering-profiles.mjs +157 -0
  115. package/skills/archify/renderers/shared/generated-brand-marks.mjs +2003 -0
  116. package/skills/archify/renderers/shared/generated-validators.mjs +134 -0
  117. package/skills/archify/renderers/shared/geometry.mjs +1941 -0
  118. package/skills/archify/renderers/shared/i18n.mjs +603 -0
  119. package/skills/archify/renderers/shared/layout-report.mjs +42 -0
  120. package/skills/archify/renderers/shared/legend.mjs +217 -0
  121. package/skills/archify/renderers/shared/output-path.mjs +440 -0
  122. package/skills/archify/renderers/shared/path-semantics.mjs +1017 -0
  123. package/skills/archify/renderers/shared/portable-path.mjs +408 -0
  124. package/skills/archify/renderers/shared/repository-evidence.mjs +352 -0
  125. package/skills/archify/renderers/shared/repository-location.mjs +59 -0
  126. package/skills/archify/renderers/shared/route-quality.mjs +614 -0
  127. package/skills/archify/renderers/shared/sidecar-path.mjs +38 -0
  128. package/skills/archify/renderers/shared/spatial-grid.mjs +66 -0
  129. package/skills/archify/renderers/shared/text-fit.mjs +105 -0
  130. package/skills/archify/renderers/shared/utils.mjs +254 -0
  131. package/skills/archify/renderers/shared/validator.mjs +86 -0
  132. package/skills/archify/renderers/workflow/README.md +301 -0
  133. package/skills/archify/renderers/workflow/render-workflow.mjs +37 -0
  134. package/skills/archify/renderers/workflow/workflow-compiler.mjs +4913 -0
  135. package/skills/archify/renderers/workflow/workflow-migration-geometry.mjs +144 -0
  136. package/skills/archify/schemas/README.md +256 -0
  137. package/skills/archify/schemas/architecture.schema.json +152 -0
  138. package/skills/archify/schemas/common.schema.json +181 -0
  139. package/skills/archify/schemas/dataflow.schema.json +254 -0
  140. package/skills/archify/schemas/lifecycle.schema.json +280 -0
  141. package/skills/archify/schemas/sequence.schema.json +234 -0
  142. package/skills/archify/schemas/workflow.schema.json +439 -0
  143. package/skills/archify/scripts/check-render-output.mjs +1388 -0
  144. package/skills/archify/scripts/check-update.mjs +1710 -0
  145. package/skills/archify/scripts/delivery-update-child.mjs +23 -0
  146. package/skills/archify/scripts/render-examples.mjs +26 -0
  147. package/skills/archify/scripts/update-contract.mjs +182 -0
  148. package/skills/archify/skill-release.json +10 -0
@@ -0,0 +1,55 @@
1
+ {
2
+ "schema_version": 1,
3
+ "diagram_type": "lifecycle",
4
+ "meta": {
5
+ "title": "Agent Run Lifecycle",
6
+ "output": "examples/lifecycle-agent-run.html",
7
+ "viewBox": [1030, 630],
8
+ "animation": "trace",
9
+ "quality_profile": "showcase"
10
+ },
11
+ "lanes": [
12
+ { "id": "main", "label": "Lifecycle phases" },
13
+ { "id": "waiting", "label": "Interruptions" },
14
+ { "id": "exceptions", "label": "Recovery loop" },
15
+ { "id": "terminal", "label": "Terminal exits" }
16
+ ],
17
+ "states": [
18
+ { "id": "queued", "type": "start", "label": "Queued", "sublabel": "request accepted", "lane": "main", "col": 0, "step": "01", "tag": "entry" },
19
+ { "id": "planning", "type": "active", "label": "Planning", "sublabel": "build task graph", "lane": "main", "col": 1, "step": "02", "tag": "model" },
20
+ { "id": "executing", "type": "active", "label": "Executing", "sublabel": "tool calls", "lane": "main", "col": 2, "step": "03", "tag": "work" },
21
+ { "id": "reviewing", "type": "decision", "label": "Reviewing", "sublabel": "quality gate", "lane": "main", "col": 3, "step": "04", "tag": "check" },
22
+ { "id": "completed", "type": "success", "label": "Completed", "sublabel": "final response", "lane": "main", "col": 4, "step": "05", "tag": "done" },
23
+ { "id": "approval", "type": "waiting", "label": "Needs Approval", "sublabel": "human gate", "lane": "waiting", "col": 0, "tag": "pause" },
24
+ { "id": "blocked", "type": "waiting", "label": "Blocked", "sublabel": "missing input", "lane": "waiting", "col": 1, "tag": "wait" },
25
+ { "id": "failed", "type": "failure", "label": "Failed", "sublabel": "recoverable error", "lane": "exceptions", "col": 0, "yOffset": 78, "tag": "retryable" },
26
+ { "id": "cancelled", "type": "failure", "label": "Cancelled", "sublabel": "user stopped", "lane": "terminal", "col": 0, "tag": "terminal" },
27
+ { "id": "expired", "type": "failure", "label": "Expired", "sublabel": "timeout", "lane": "terminal", "col": 1, "tag": "terminal" }
28
+ ],
29
+ "transitions": [
30
+ { "id": "approval-needed", "from": "executing", "to": "approval", "variant": "security", "fromSide": "bottom", "toSide": "top", "route": "straight" },
31
+ { "id": "review-blocked", "from": "reviewing", "to": "blocked", "variant": "default", "route": "drop" },
32
+ { "id": "execution-failed", "from": "executing", "to": "failed", "variant": "security", "fromSide": "left", "toSide": "left", "via": [[320, 157], [320, 385]] },
33
+ { "id": "failed-retry", "from": "failed", "to": "executing", "variant": "emphasis", "fromSide": "left", "toSide": "top", "via": [[20, 385], [20, 80], [402, 80]] },
34
+ { "id": "block-expired", "from": "blocked", "to": "expired", "variant": "security", "fromSide": "bottom", "toSide": "top", "route": "straight" },
35
+ { "id": "approval-cancelled", "from": "approval", "to": "cancelled", "variant": "security", "fromSide": "bottom", "toSide": "top", "via": [[480, 336], [480, 432], [402, 432]] }
36
+ ],
37
+ "cards": [
38
+ {
39
+ "dot": "emerald",
40
+ "title": "Main Path + Waits",
41
+ "items": [
42
+ "The run has five ordered phases from queue to completion",
43
+ "Approval and missing input pause the run without ending it"
44
+ ]
45
+ },
46
+ {
47
+ "dot": "rose",
48
+ "title": "Recovery + Terminal Exits",
49
+ "items": [
50
+ "Failed loops back while retry budget remains",
51
+ "Cancelled and Expired are terminal exits with no return path"
52
+ ]
53
+ }
54
+ ]
55
+ }
@@ -0,0 +1,74 @@
1
+ {
2
+ "schema_version": 2,
3
+ "diagram_type": "workflow",
4
+ "meta": {
5
+ "title": "Agent Tool Call Workflow",
6
+ "animation": "trace",
7
+ "visual_preset": "signal-flow",
8
+ "quality_profile": "showcase",
9
+ "output": "examples/workflow-agent-tool-call-rendered.html"
10
+ },
11
+ "lanes": [
12
+ { "id": "ui", "label": "User Interface" },
13
+ { "id": "agent", "label": "Agent Runtime" },
14
+ { "id": "policy", "label": "Policy & Recovery", "variant": "exception" },
15
+ { "id": "tools", "label": "Tool Execution & Evidence" }
16
+ ],
17
+ "phases": [
18
+ { "id": "intake", "label": "Intake", "fromCol": 0, "toCol": 1 },
19
+ { "id": "reasoning", "label": "Plan + route", "fromCol": 2, "toCol": 3, "variant": "emphasis" },
20
+ { "id": "execution", "label": "Execute + report", "fromCol": 4, "toCol": 5, "variant": "dashed" }
21
+ ],
22
+ "groups": [
23
+ { "id": "agent_loop", "label": "Planning loop", "lane": "agent", "fromCol": 2, "toCol": 3, "variant": "emphasis" },
24
+ { "id": "exception_path", "label": "Human or policy stop", "lane": "policy", "fromCol": 3, "toCol": 5, "variant": "security" },
25
+ { "id": "evidence_path", "label": "Evidence path", "lane": "tools", "fromCol": 1, "toCol": 2, "variant": "dashed" },
26
+ { "id": "tool_work", "label": "Tool work", "lane": "tools", "fromCol": 4, "toCol": 5, "variant": "dashed" }
27
+ ],
28
+ "mainPath": ["user", "chat", "planner", "router", "approval", "tool", "external", "final"],
29
+ "nodes": [
30
+ { "id": "user", "lane": "ui", "col": 0, "type": "external", "label": "User", "sublabel": "asks for work", "width": 132 },
31
+ { "id": "chat", "lane": "ui", "col": 1, "type": "frontend", "label": "Chat Surface", "sublabel": "thread + files", "width": 132 },
32
+ { "id": "final", "lane": "ui", "col": 5, "type": "backend", "label": "Final Reply", "sublabel": "answer + changes", "width": 132 },
33
+ { "id": "planner", "lane": "agent", "col": 2, "type": "backend", "label": "Agent Planner", "sublabel": "plan next step", "tag": "context aware", "width": 132 },
34
+ { "id": "router", "lane": "agent", "col": 3, "type": "backend", "label": "Tool Router", "sublabel": "choose capability", "width": 132 },
35
+ { "id": "approval", "lane": "policy", "col": 3, "type": "security", "label": "Approval Gate", "sublabel": "scope + consent", "tag": "block risky ops", "width": 132 },
36
+ { "id": "blocked", "lane": "policy", "col": 4, "type": "security", "label": "Blocked", "sublabel": "wait or reject", "width": 132 },
37
+ { "id": "retry", "lane": "policy", "col": 5, "type": "messagebus", "label": "Retry Path", "sublabel": "revise request", "width": 132 },
38
+ { "id": "tool", "lane": "tools", "col": 4, "type": "messagebus", "label": "Tool Call", "sublabel": "shell / browser / MCP", "tag": "structured result", "width": 132 },
39
+ { "id": "external", "lane": "tools", "col": 5, "type": "cloud", "label": "External API", "sublabel": "network service", "width": 132 },
40
+ { "id": "store", "lane": "tools", "col": 1, "type": "database", "label": "Context Store", "sublabel": "repo + memory", "width": 132 },
41
+ { "id": "trace", "lane": "tools", "col": 2, "type": "database", "label": "Trace Log", "sublabel": "events + output", "width": 132 }
42
+ ],
43
+ "edges": [
44
+ { "id": "request-chat", "from": "user", "to": "chat", "variant": "default" },
45
+ { "id": "plan-request", "from": "chat", "to": "planner", "label": "plan", "variant": "emphasis" },
46
+ { "id": "planner-route", "from": "planner", "to": "router", "variant": "default" },
47
+ { "id": "approval-check", "from": "router", "to": "approval", "label": "needs approval?", "variant": "security" },
48
+ { "id": "approved-tool", "from": "approval", "to": "tool", "variant": "emphasis" },
49
+ { "id": "approval-denied", "from": "approval", "to": "blocked", "label": "denied", "variant": "security", "role": "error" },
50
+ { "id": "retry-request", "from": "blocked", "to": "retry", "variant": "dashed", "role": "branch" },
51
+ { "id": "tool-external-call", "from": "tool", "to": "external", "variant": "default" },
52
+ { "id": "external-reply", "from": "external", "to": "final", "variant": "emphasis", "role": "return", "fromSide": "right", "toSide": "right", "route": "outside-right", "width": 1.2 },
53
+ { "id": "record-result", "from": "external", "to": "trace", "label": "record result", "variant": "dashed", "fromSide": "bottom", "toSide": "bottom", "route": "bottom-channel", "labelSegment": 1 },
54
+ { "id": "write-trace-memory", "from": "store", "to": "trace", "label": "trace + memory", "variant": "dashed" }
55
+ ],
56
+ "cards": [
57
+ {
58
+ "dot": "cyan",
59
+ "title": "Compiler Contract",
60
+ "items": [
61
+ "Lanes and columns determine node placement",
62
+ "Labels reserve clearance; routes stay orthogonal"
63
+ ]
64
+ },
65
+ {
66
+ "dot": "rose",
67
+ "title": "Runtime Semantics",
68
+ "items": [
69
+ "Approval gates risky work before tool execution",
70
+ "Evidence returns through isolated trace and memory"
71
+ ]
72
+ }
73
+ ]
74
+ }
@@ -0,0 +1,56 @@
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
+ },
12
+ "participants": [
13
+ { "id": "client", "type": "external", "label": "Client", "sublabel": "mobile app" },
14
+ { "id": "api", "type": "backend", "label": "Jobs API", "sublabel": "request edge" },
15
+ { "id": "queue", "type": "messagebus", "label": "Queue", "sublabel": "durable work" },
16
+ { "id": "worker", "type": "backend", "label": "Worker", "sublabel": "background" },
17
+ { "id": "provider", "type": "cloud", "label": "Provider", "sublabel": "external API" },
18
+ { "id": "store", "type": "database", "label": "Job Store", "sublabel": "source of truth" },
19
+ { "id": "notify", "type": "messagebus", "label": "Notifier", "sublabel": "webhook" }
20
+ ],
21
+ "segments": [
22
+ { "from": 150, "to": 288, "label": "Accept" },
23
+ { "from": 306, "to": 538, "label": "Background work" },
24
+ { "from": 554, "to": 800, "label": "Notify + reconcile" }
25
+ ],
26
+ "messages": [
27
+ { "from": "client", "to": "api", "y": 180, "label": "POST /jobs", "variant": "emphasis" },
28
+ { "from": "api", "to": "queue", "y": 222, "label": "enqueue job", "variant": "emphasis" },
29
+ { "from": "api", "to": "client", "y": 264, "label": "202 + job id", "variant": "return" },
30
+ { "from": "queue", "to": "worker", "y": 326, "label": "deliver", "variant": "emphasis" },
31
+ { "from": "worker", "to": "provider", "y": 368, "label": "perform work", "variant": "default" },
32
+ { "from": "provider", "to": "worker", "y": 410, "label": "result / timeout", "variant": "return" },
33
+ { "from": "worker", "to": "queue", "y": 452, "label": "retry if timeout", "variant": "dashed" },
34
+ { "from": "worker", "to": "store", "y": 494, "label": "persist final state", "variant": "emphasis" },
35
+ { "from": "worker", "to": "notify", "y": 566, "label": "job.completed", "variant": "dashed" },
36
+ { "from": "notify", "to": "client", "y": 608, "label": "signed webhook", "variant": "dashed" },
37
+ { "from": "client", "to": "api", "y": 650, "label": "GET /jobs/:id", "variant": "default" },
38
+ { "from": "api", "to": "store", "y": 692, "label": "read status", "variant": "default" },
39
+ { "from": "store", "to": "api", "y": 734, "label": "completed", "variant": "return" },
40
+ { "from": "api", "to": "client", "y": 776, "label": "200 final result", "variant": "return" }
41
+ ],
42
+ "activations": [
43
+ { "participant": "api", "from": 174, "to": 272, "type": "backend" },
44
+ { "participant": "queue", "from": 216, "to": 334, "type": "messagebus" },
45
+ { "participant": "worker", "from": 320, "to": 574, "type": "backend" },
46
+ { "participant": "provider", "from": 362, "to": 416, "type": "cloud" },
47
+ { "participant": "store", "from": 488, "to": 742, "type": "database" },
48
+ { "participant": "notify", "from": 560, "to": 616, "type": "messagebus" },
49
+ { "participant": "api", "from": 644, "to": 784, "type": "backend" }
50
+ ],
51
+ "cards": [
52
+ { "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"] },
53
+ { "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"] },
54
+ { "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"] }
55
+ ]
56
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "schema_version": 1,
3
+ "diagram_type": "architecture",
4
+ "meta": {
5
+ "title": "Brand-aware AI delivery",
6
+ "output": "brand-aware-delivery.html",
7
+ "quality_profile": "showcase",
8
+ "viewBox": [1120, 640]
9
+ },
10
+ "components": [
11
+ { "id": "request", "type": "external", "label": "Product request", "sublabel": "Owner brief", "pos": [38, 260], "size": [138, 68] },
12
+ { "id": "claude", "type": "frontend", "label": "Claude", "sublabel": "Plan and author", "brand": "claude", "pos": [220, 260], "size": [138, 68] },
13
+ { "id": "github", "type": "messagebus", "label": "GitHub", "sublabel": "Review and merge", "brand": "github", "pos": [402, 260], "size": [138, 68] },
14
+ { "id": "container", "type": "backend", "label": "Docker service", "sublabel": "Build and run", "brand": "docker", "pos": [584, 260], "size": [138, 68] },
15
+ { "id": "edge", "type": "cloud", "label": "Cloudflare", "sublabel": "Global delivery", "brand": "cloudflare", "pos": [766, 260], "size": [138, 68] },
16
+ { "id": "customer", "type": "external", "label": "Customers", "sublabel": "Web and mobile", "pos": [948, 260], "size": [138, 68] },
17
+ { "id": "database", "type": "database", "label": "PostgreSQL", "sublabel": "Durable state", "brand": "postgresql", "pos": [584, 420], "size": [138, 68] },
18
+ { "id": "billing", "type": "external", "label": "Stripe", "sublabel": "Billing events", "brand": "stripe", "pos": [766, 420], "size": [138, 68] }
19
+ ],
20
+ "connections": [
21
+ { "id": "brief-to-claude", "from": "request", "to": "claude", "label": "brief", "variant": "emphasis" },
22
+ { "id": "claude-to-github", "from": "claude", "to": "github", "label": "change set", "labelDy": -28 },
23
+ { "id": "github-to-container", "from": "github", "to": "container", "label": "approved build", "labelDy": -28 },
24
+ { "id": "container-to-edge", "from": "container", "to": "edge", "label": "deploy" },
25
+ { "id": "edge-to-customer", "from": "edge", "to": "customer", "label": "HTTPS", "variant": "emphasis" },
26
+ { "id": "container-to-database", "from": "container", "to": "database", "label": "SQL", "fromSide": "bottom", "toSide": "top", "labelAt": [625, 370] },
27
+ { "id": "container-to-billing", "from": "container", "to": "billing", "label": "create charge", "variant": "dashed", "fromSide": "bottom", "toSide": "top", "via": [[653, 374], [835, 374]] },
28
+ { "id": "billing-to-database", "from": "billing", "to": "database", "label": "webhook", "variant": "dashed" }
29
+ ],
30
+ "cards": [
31
+ { "dot": "cyan", "title": "Identity at a glance", "items": ["Semantic color still explains technical role", "Brand badges identify the actual products"] },
32
+ { "dot": "amber", "title": "Portable by default", "items": ["Preset marks ship inside Archify", "Every visual export keeps the same badge"] }
33
+ ]
34
+ }
@@ -0,0 +1,77 @@
1
+ {
2
+ "schema_version": 1,
3
+ "diagram_type": "sequence",
4
+ "meta": {
5
+ "title": "Cache Miss Request Sequence",
6
+ "output": "examples/sequence-cache-miss-request.html",
7
+ "viewBox": [1080, 580],
8
+ "column_fit": "spread",
9
+ "animation": "trace",
10
+ "quality_profile": "showcase"
11
+ },
12
+ "participants": [
13
+ { "id": "user", "type": "external", "label": "User", "sublabel": "browser session" },
14
+ { "id": "web", "type": "frontend", "label": "Web App", "sublabel": "React UI" },
15
+ { "id": "api", "type": "backend", "label": "API", "sublabel": "request handler" },
16
+ { "id": "auth", "type": "security", "label": "Auth", "sublabel": "JWT verify" },
17
+ { "id": "redis", "type": "database", "label": "Redis", "sublabel": "cache" },
18
+ { "id": "db", "type": "database", "label": "Postgres", "sublabel": "source of truth" },
19
+ { "id": "trace", "type": "messagebus", "label": "Trace", "sublabel": "async event" }
20
+ ],
21
+ "segments": [
22
+ { "from": 150, "to": 250, "label": "Request" },
23
+ { "from": 260, "to": 370, "label": "Fallback" },
24
+ { "from": 380, "to": 480, "label": "Response + trace" }
25
+ ],
26
+ "messages": [
27
+ { "id": "open-page", "from": "user", "to": "web", "y": 160, "label": "open page", "variant": "default" },
28
+ { "id": "dashboard-request", "from": "web", "to": "api", "y": 185, "label": "GET /dashboard", "variant": "emphasis" },
29
+ { "id": "verify-jwt", "from": "api", "to": "auth", "y": 210, "label": "verify JWT", "variant": "security" },
30
+ { "id": "auth-claims", "from": "auth", "to": "api", "y": 238, "label": "claims ok", "variant": "return" },
31
+ { "id": "cache-read", "from": "api", "to": "redis", "y": 270, "label": "read cache", "variant": "default" },
32
+ { "id": "cache-miss", "from": "redis", "to": "api", "y": 298, "label": "miss", "variant": "return" },
33
+ { "id": "profile-query", "from": "api", "to": "db", "y": 330, "label": "query profile + metrics", "variant": "emphasis" },
34
+ { "id": "profile-rows", "from": "db", "to": "api", "y": 358, "label": "rows", "variant": "return" },
35
+ { "id": "cache-write", "from": "api", "to": "redis", "y": 390, "label": "set cache", "variant": "dashed" },
36
+ { "id": "trace-emit", "from": "api", "to": "trace", "y": 418, "label": "emit trace", "variant": "dashed" },
37
+ { "id": "dashboard-response", "from": "api", "to": "web", "y": 443, "label": "200 JSON", "variant": "return" },
38
+ { "id": "page-render", "from": "web", "to": "user", "y": 468, "label": "render", "variant": "return" }
39
+ ],
40
+ "activations": [
41
+ { "participant": "web", "from": 180, "to": 474, "type": "frontend" },
42
+ { "participant": "api", "from": 185, "to": 450, "type": "backend" },
43
+ { "participant": "auth", "from": 205, "to": 244, "type": "security" },
44
+ { "participant": "redis", "from": 265, "to": 304, "type": "database" },
45
+ { "participant": "db", "from": 325, "to": 364, "type": "database" },
46
+ { "participant": "trace", "from": 413, "to": 449, "type": "messagebus" }
47
+ ],
48
+ "cards": [
49
+ {
50
+ "dot": "emerald",
51
+ "title": "Happy Path",
52
+ "items": [
53
+ "The main request is Web App -> API -> data source -> response",
54
+ "Return messages are quieter than forward calls",
55
+ "Activation bars make ownership duration visible"
56
+ ]
57
+ },
58
+ {
59
+ "dot": "rose",
60
+ "title": "Policy + Fallback",
61
+ "items": [
62
+ "JWT verification is colored as a security interaction",
63
+ "Cache miss is visible without overpowering the main path",
64
+ "Database access only appears after cache fallback"
65
+ ]
66
+ },
67
+ {
68
+ "dot": "orange",
69
+ "title": "Async Trace",
70
+ "items": [
71
+ "Trace emission is dashed and secondary",
72
+ "It does not block the response path",
73
+ "The diagram separates user-facing latency from observability"
74
+ ]
75
+ }
76
+ ]
77
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "schema_version": 1,
3
+ "diagram_type": "architecture",
4
+ "meta": {
5
+ "title": "Checkout Platform — Baseline",
6
+ "output": "checkout-platform.base.html",
7
+ "visual_preset": "signal-flow"
8
+ },
9
+ "components": [
10
+ { "id": "buyers", "type": "external", "label": "Buyers", "sublabel": "Web + mobile", "pos": [40, 250], "size": [120, 60] },
11
+ { "id": "edge", "type": "cloud", "label": "Edge Gateway", "sublabel": "TLS + routing", "pos": [220, 250], "size": [130, 60] },
12
+ { "id": "checkout", "type": "backend", "label": "Checkout API", "sublabel": "v1 service", "pos": [430, 250], "size": [130, 60] },
13
+ { "id": "cache", "type": "database", "label": "Session Cache", "sublabel": "Redis", "pos": [430, 100], "size": [130, 60] },
14
+ { "id": "orders", "type": "database", "label": "Orders", "sublabel": "PostgreSQL", "pos": [640, 250], "size": [130, 60] },
15
+ { "id": "queue", "type": "messagebus", "label": "Order Events", "sublabel": "durable queue", "pos": [430, 400], "size": [130, 60] },
16
+ { "id": "worker", "type": "backend", "label": "Fulfilment", "sublabel": "async worker", "pos": [640, 400], "size": [130, 60] },
17
+ { "id": "payments", "type": "external", "label": "Payment Rail", "sublabel": "external", "pos": [850, 250], "size": [130, 60] }
18
+ ],
19
+ "boundaries": [
20
+ { "kind": "region", "label": "Production region", "wraps": ["edge", "checkout", "cache", "orders", "queue", "worker"] },
21
+ { "kind": "security-group", "label": "Checkout trust zone", "wraps": ["checkout", "orders"] }
22
+ ],
23
+ "connections": [
24
+ { "id": "buyer-request", "from": "buyers", "to": "edge", "label": "HTTPS", "variant": "emphasis" },
25
+ { "id": "edge-checkout", "from": "edge", "to": "checkout" },
26
+ { "id": "session-read", "from": "checkout", "to": "cache", "label": "session", "fromSide": "top", "toSide": "bottom", "labelDy": -66 },
27
+ { "id": "persist-order", "from": "checkout", "to": "orders", "label": "SQL" },
28
+ { "id": "publish-order", "from": "checkout", "to": "queue", "label": "accepted", "variant": "dashed", "fromSide": "bottom", "toSide": "top", "labelDy": 66 },
29
+ { "id": "consume-order", "from": "queue", "to": "worker" },
30
+ { "id": "authorize-payment", "from": "orders", "to": "payments", "label": "authorize", "variant": "security" }
31
+ ]
32
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "schema_version": 1,
3
+ "diagram_type": "architecture",
4
+ "meta": {
5
+ "title": "Checkout Platform — Fraud Gate",
6
+ "output": "checkout-platform.head.html",
7
+ "visual_preset": "signal-flow"
8
+ },
9
+ "components": [
10
+ { "id": "buyers", "type": "external", "label": "Buyers", "sublabel": "Web + mobile", "pos": [40, 250], "size": [120, 60] },
11
+ { "id": "edge", "type": "cloud", "label": "Edge Gateway", "sublabel": "TLS + routing", "pos": [220, 250], "size": [130, 60] },
12
+ { "id": "checkout", "type": "backend", "label": "Checkout API", "sublabel": "v2 idempotent", "pos": [430, 250], "size": [130, 60] },
13
+ { "id": "fraud", "type": "security", "label": "Fraud Gate", "sublabel": "policy scoring", "pos": [640, 100], "size": [130, 60], "tag": "new owner" },
14
+ { "id": "orders", "type": "database", "label": "Orders", "sublabel": "PostgreSQL", "pos": [640, 250], "size": [130, 60] },
15
+ { "id": "queue", "type": "messagebus", "label": "Order Events", "sublabel": "durable queue", "pos": [430, 420], "size": [130, 60] },
16
+ { "id": "worker", "type": "backend", "label": "Fulfilment", "sublabel": "async worker", "pos": [640, 400], "size": [130, 60] },
17
+ { "id": "payments", "type": "external", "label": "Payment Rail", "sublabel": "external", "pos": [850, 250], "size": [130, 60] }
18
+ ],
19
+ "boundaries": [
20
+ { "kind": "region", "label": "Production region", "wraps": ["edge", "checkout", "fraud", "orders", "queue", "worker"] },
21
+ { "kind": "security-group", "label": "Checkout trust zone", "wraps": ["checkout", "fraud", "orders"] }
22
+ ],
23
+ "connections": [
24
+ { "id": "buyer-request", "from": "buyers", "to": "edge", "label": "HTTPS", "variant": "emphasis" },
25
+ { "id": "edge-checkout", "from": "edge", "to": "checkout" },
26
+ { "id": "fraud-check", "from": "checkout", "to": "fraud", "label": "screen", "variant": "security", "fromSide": "top", "toSide": "bottom", "labelDy": -66 },
27
+ { "id": "persist-order", "from": "checkout", "to": "orders", "label": "SQL tx" },
28
+ { "id": "publish-order", "from": "checkout", "to": "queue", "label": "accepted", "variant": "dashed", "fromSide": "bottom", "toSide": "top", "labelDy": 76 },
29
+ { "id": "consume-order", "from": "queue", "to": "worker" },
30
+ { "id": "authorize-payment", "from": "fraud", "to": "payments", "label": "authorize", "variant": "security", "fromSide": "right", "toSide": "top", "via": [[820, 130], [915, 130]] }
31
+ ]
32
+ }