@stacksjs/defaults 0.75.361 → 0.75.362

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 (208) hide show
  1. package/ai/skills/stacks-ai/SKILL.md +22 -0
  2. package/ai/skills/stacks-native/CATALOG.md +2 -2
  3. package/ai/skills/stacks-technical-diagrams/LICENSE +202 -22
  4. package/ai/skills/stacks-technical-diagrams/LICENSE-MIT +22 -0
  5. package/ai/skills/stacks-technical-diagrams/NOTICE +26 -0
  6. package/ai/skills/stacks-technical-diagrams/SKILL.md +106 -266
  7. package/ai/skills/stacks-technical-diagrams/THIRD_PARTY_NOTICES.md +11 -2
  8. package/ai/skills/stacks-technical-diagrams/UPSTREAM.json +12 -0
  9. package/ai/skills/stacks-technical-diagrams/agents/openai.yaml +2 -2
  10. package/ai/skills/stacks-technical-diagrams/assets/template.html +3655 -3798
  11. package/ai/skills/stacks-technical-diagrams/bin/archify.mjs +7290 -0
  12. package/ai/skills/stacks-technical-diagrams/bin/delivery-update.mjs +7 -0
  13. package/ai/skills/stacks-technical-diagrams/bin/diagrams +1 -0
  14. package/ai/skills/stacks-technical-diagrams/bin/finalize.mjs +1056 -0
  15. package/ai/skills/stacks-technical-diagrams/bin/open-artifact.mjs +72 -12
  16. package/ai/skills/stacks-technical-diagrams/bin/preview.mjs +348 -31
  17. package/ai/skills/stacks-technical-diagrams/bin/recover-output.mjs +41 -0
  18. package/ai/skills/stacks-technical-diagrams/bin/technical-diagrams.mjs +3 -2097
  19. package/ai/skills/stacks-technical-diagrams/bin/visual-check.mjs +2142 -157
  20. package/ai/skills/stacks-technical-diagrams/brand-marks/README.md +3 -3
  21. package/ai/skills/stacks-technical-diagrams/delta/architecture-delta.mjs +130 -33
  22. package/ai/skills/stacks-technical-diagrams/examples/agent-run.lifecycle.json +25 -30
  23. package/ai/skills/stacks-technical-diagrams/examples/agent-tool-call.workflow.json +0 -20
  24. package/ai/skills/stacks-technical-diagrams/examples/archify-dev-activity.timeline.json +176 -0
  25. package/ai/skills/stacks-technical-diagrams/examples/archify-repository.tree.json +197 -0
  26. package/ai/skills/stacks-technical-diagrams/examples/async-job-roundtrip.sequence.json +1 -6
  27. package/ai/skills/stacks-technical-diagrams/examples/brand-aware-delivery.architecture.json +3 -16
  28. package/ai/skills/stacks-technical-diagrams/examples/cache-miss-request.sequence.json +2 -7
  29. package/ai/skills/stacks-technical-diagrams/examples/checkout-platform.base.architecture.json +2 -1
  30. package/ai/skills/stacks-technical-diagrams/examples/checkout-platform.head.architecture.json +2 -1
  31. package/ai/skills/stacks-technical-diagrams/examples/checkout-request.waterfall.json +20 -0
  32. package/ai/skills/stacks-technical-diagrams/examples/class-payment-processors-rendered.html +14987 -0
  33. package/ai/skills/stacks-technical-diagrams/examples/class-payments-rendered.html +14787 -0
  34. package/ai/skills/stacks-technical-diagrams/examples/dataflow-product-analytics.html +14880 -0
  35. package/ai/skills/stacks-technical-diagrams/examples/delivery.explainer.json +155 -0
  36. package/ai/skills/stacks-technical-diagrams/examples/deployment-release.lifecycle.json +57 -34
  37. package/ai/skills/stacks-technical-diagrams/examples/erd-orders-rendered.html +15112 -0
  38. package/ai/skills/stacks-technical-diagrams/examples/event-stream.dataflow.json +1 -6
  39. package/ai/skills/stacks-technical-diagrams/examples/example-rebuild.waterfall.json +212 -0
  40. package/ai/skills/stacks-technical-diagrams/examples/holiday-planning.workflow.json +143 -0
  41. package/ai/skills/stacks-technical-diagrams/examples/incident-response.workflow.json +1 -6
  42. package/ai/skills/stacks-technical-diagrams/examples/lifecycle-agent-run.html +14892 -0
  43. package/ai/skills/stacks-technical-diagrams/examples/locales/de.json +463 -0
  44. package/ai/skills/stacks-technical-diagrams/examples/locales/fr.json +463 -0
  45. package/ai/skills/stacks-technical-diagrams/examples/locales/fr.partial.json +22 -0
  46. package/ai/skills/stacks-technical-diagrams/examples/locales/it.json +463 -0
  47. package/ai/skills/stacks-technical-diagrams/examples/locales/ja.json +463 -0
  48. package/ai/skills/stacks-technical-diagrams/examples/locales/pt.json +463 -0
  49. package/ai/skills/stacks-technical-diagrams/examples/locales/ru.json +463 -0
  50. package/ai/skills/stacks-technical-diagrams/examples/orders.erd.json +337 -0
  51. package/ai/skills/stacks-technical-diagrams/examples/payment-incident.timeline.json +24 -0
  52. package/ai/skills/stacks-technical-diagrams/examples/payment-platform.tree.json +22 -0
  53. package/ai/skills/stacks-technical-diagrams/examples/payment-processors.class.json +177 -0
  54. package/ai/skills/stacks-technical-diagrams/examples/payments.class.json +85 -0
  55. package/ai/skills/stacks-technical-diagrams/examples/product-analytics.dataflow.json +1 -6
  56. package/ai/skills/stacks-technical-diagrams/examples/production-deployment.architecture.json +3 -23
  57. package/ai/skills/stacks-technical-diagrams/examples/release-delivery.workflow.json +1 -6
  58. package/ai/skills/stacks-technical-diagrams/examples/sequence-cache-miss-request.html +14895 -0
  59. package/ai/skills/stacks-technical-diagrams/examples/subscription-billing-rendered.html +15369 -0
  60. package/ai/skills/stacks-technical-diagrams/examples/subscription-billing.erd.json +548 -0
  61. package/ai/skills/stacks-technical-diagrams/examples/timeline-archify-dev-activity-rendered.html +15002 -0
  62. package/ai/skills/stacks-technical-diagrams/examples/timeline-payment-incident-rendered.html +14772 -0
  63. package/ai/skills/stacks-technical-diagrams/examples/tree-archify-repository-rendered.html +15071 -0
  64. package/ai/skills/stacks-technical-diagrams/examples/tree-payment-platform-rendered.html +14810 -0
  65. package/ai/skills/stacks-technical-diagrams/examples/waterfall-checkout-request-rendered.html +14754 -0
  66. package/ai/skills/stacks-technical-diagrams/examples/waterfall-example-rebuild-rendered.html +14940 -0
  67. package/ai/skills/stacks-technical-diagrams/examples/web-app-rendered.html +14889 -0
  68. package/ai/skills/stacks-technical-diagrams/examples/web-app.architecture.json +1 -6
  69. package/ai/skills/stacks-technical-diagrams/examples/workflow-agent-tool-call-rendered.html +14907 -0
  70. package/ai/skills/stacks-technical-diagrams/explainer/browser-check.mjs +208 -0
  71. package/ai/skills/stacks-technical-diagrams/explainer/charts.mjs +70 -0
  72. package/ai/skills/stacks-technical-diagrams/explainer/check.mjs +168 -0
  73. package/ai/skills/stacks-technical-diagrams/explainer/diagrams.mjs +518 -0
  74. package/ai/skills/stacks-technical-diagrams/explainer/diff.mjs +124 -0
  75. package/ai/skills/stacks-technical-diagrams/explainer/inline.mjs +155 -0
  76. package/ai/skills/stacks-technical-diagrams/explainer/layout.mjs +35 -0
  77. package/ai/skills/stacks-technical-diagrams/explainer/page-bundle.mjs +16 -0
  78. package/ai/skills/stacks-technical-diagrams/explainer/parse.mjs +300 -0
  79. package/ai/skills/stacks-technical-diagrams/explainer/patch.mjs +117 -0
  80. package/ai/skills/stacks-technical-diagrams/explainer/prepare.mjs +131 -0
  81. package/ai/skills/stacks-technical-diagrams/explainer/reader.css +472 -0
  82. package/ai/skills/stacks-technical-diagrams/explainer/reader.js +667 -0
  83. package/ai/skills/stacks-technical-diagrams/explainer/render.mjs +224 -0
  84. package/ai/skills/stacks-technical-diagrams/explainer/revision.mjs +20 -0
  85. package/ai/skills/stacks-technical-diagrams/explainer/sources.mjs +318 -0
  86. package/ai/skills/stacks-technical-diagrams/explainer/validate.mjs +138 -0
  87. package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/LICENSE +40 -0
  88. package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/README.md +5 -0
  89. package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/chunks/3DKXF73K.js +4 -0
  90. package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/chunks/42UTT654.js +3 -0
  91. package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/chunks/DKTLEL5E.js +1 -0
  92. package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/chunks/EEIX5ZYH.js +2 -0
  93. package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/chunks/EJ5KOXYD.js +25 -0
  94. package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/chunks/GUJTEFZK.js +1 -0
  95. package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/chunks/IZOKQ2GT.js +4 -0
  96. package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/chunks/L4LY553T.js +3 -0
  97. package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/chunks/MSKIJHB2.js +2 -0
  98. package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/chunks/RVARI57O.js +1 -0
  99. package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/chunks/UKSIWDDN.js +2 -0
  100. package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/chunks/UPTXNAXN.js +2 -0
  101. package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/chunks/XTDUIGUI.js +9 -0
  102. package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/chunks/YAYTP6L5.js +9 -0
  103. package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/core.js +1 -0
  104. package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/diagrams/pie.js +1 -0
  105. package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/diagrams/quadrantChart.js +1 -0
  106. package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/diagrams/radar.js +1 -0
  107. package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/diagrams/sankey.js +1 -0
  108. package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/diagrams/venn.js +1 -0
  109. package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/diagrams/xychart.js +1 -0
  110. package/ai/skills/stacks-technical-diagrams/explainer/writing.mjs +139 -0
  111. package/ai/skills/stacks-technical-diagrams/locales/README.md +40 -0
  112. package/ai/skills/stacks-technical-diagrams/locales/ar.json +488 -0
  113. package/ai/skills/stacks-technical-diagrams/locales/en.json +488 -0
  114. package/ai/skills/stacks-technical-diagrams/locales/es.json +488 -0
  115. package/ai/skills/stacks-technical-diagrams/locales/ko.json +488 -0
  116. package/ai/skills/stacks-technical-diagrams/locales/manifest.json +10 -0
  117. package/ai/skills/stacks-technical-diagrams/locales/zh-CN.json +488 -0
  118. package/ai/skills/stacks-technical-diagrams/locales/zh-TW.json +488 -0
  119. package/ai/skills/stacks-technical-diagrams/migrations/workflow-v2.mjs +1 -0
  120. package/ai/skills/stacks-technical-diagrams/recipes/scenarios.mjs +115 -51
  121. package/ai/skills/stacks-technical-diagrams/references/architecture-layout-repair.md +18 -0
  122. package/ai/skills/stacks-technical-diagrams/references/authoring-contract.md +453 -51
  123. package/ai/skills/stacks-technical-diagrams/references/authoring-defaults.md +57 -0
  124. package/ai/skills/stacks-technical-diagrams/references/brand-marks.md +57 -3
  125. package/ai/skills/stacks-technical-diagrams/references/delivery-contract.md +603 -58
  126. package/ai/skills/stacks-technical-diagrams/references/explainer-authoring.md +274 -0
  127. package/ai/skills/stacks-technical-diagrams/references/repository-authoring.md +126 -0
  128. package/ai/skills/stacks-technical-diagrams/references/update-awareness.md +13 -0
  129. package/ai/skills/stacks-technical-diagrams/references/viewer-runtime.md +18 -11
  130. package/ai/skills/stacks-technical-diagrams/renderers/architecture/grid.mjs +1 -1
  131. package/ai/skills/stacks-technical-diagrams/renderers/architecture/labels.mjs +2 -0
  132. package/ai/skills/stacks-technical-diagrams/renderers/architecture/render-architecture.mjs +550 -424
  133. package/ai/skills/stacks-technical-diagrams/renderers/architecture/routing.mjs +1469 -0
  134. package/ai/skills/stacks-technical-diagrams/renderers/class/README.md +129 -0
  135. package/ai/skills/stacks-technical-diagrams/renderers/class/render-class.mjs +1095 -0
  136. package/ai/skills/stacks-technical-diagrams/renderers/dataflow/README.md +89 -17
  137. package/ai/skills/stacks-technical-diagrams/renderers/dataflow/dataflow-compiler.mjs +1605 -0
  138. package/ai/skills/stacks-technical-diagrams/renderers/dataflow/joint-label-routing.mjs +165 -0
  139. package/ai/skills/stacks-technical-diagrams/renderers/dataflow/label-capacity.mjs +81 -0
  140. package/ai/skills/stacks-technical-diagrams/renderers/dataflow/render-dataflow.mjs +14 -474
  141. package/ai/skills/stacks-technical-diagrams/renderers/erd/README.md +246 -0
  142. package/ai/skills/stacks-technical-diagrams/renderers/erd/grid.mjs +150 -0
  143. package/ai/skills/stacks-technical-diagrams/renderers/erd/render-erd.mjs +1588 -0
  144. package/ai/skills/stacks-technical-diagrams/renderers/explainer/render-explainer.mjs +42 -0
  145. package/ai/skills/stacks-technical-diagrams/renderers/lifecycle/README.md +83 -94
  146. package/ai/skills/stacks-technical-diagrams/renderers/lifecycle/render-lifecycle.mjs +990 -417
  147. package/ai/skills/stacks-technical-diagrams/renderers/sequence/README.md +49 -17
  148. package/ai/skills/stacks-technical-diagrams/renderers/sequence/render-sequence.mjs +735 -94
  149. package/ai/skills/stacks-technical-diagrams/renderers/shared/atomic-output.mjs +1982 -0
  150. package/ai/skills/stacks-technical-diagrams/renderers/shared/automatic-labels.mjs +290 -0
  151. package/ai/skills/stacks-technical-diagrams/renderers/shared/brand-marks.mjs +169 -26
  152. package/ai/skills/stacks-technical-diagrams/renderers/shared/cli.mjs +266 -54
  153. package/ai/skills/stacks-technical-diagrams/renderers/shared/desktop-readability.mjs +106 -0
  154. package/ai/skills/stacks-technical-diagrams/renderers/shared/diagnostics.mjs +0 -0
  155. package/ai/skills/stacks-technical-diagrams/renderers/shared/generated-validators.mjs +268 -2
  156. package/ai/skills/stacks-technical-diagrams/renderers/shared/geometry.mjs +774 -124
  157. package/ai/skills/stacks-technical-diagrams/renderers/shared/i18n.mjs +289 -556
  158. package/ai/skills/stacks-technical-diagrams/renderers/shared/layout-report.mjs +18 -1
  159. package/ai/skills/stacks-technical-diagrams/renderers/shared/legend.mjs +16 -6
  160. package/ai/skills/stacks-technical-diagrams/renderers/shared/node-card-style.mjs +32 -0
  161. package/ai/skills/stacks-technical-diagrams/renderers/shared/output-path.mjs +329 -229
  162. package/ai/skills/stacks-technical-diagrams/renderers/shared/owned-temp-directory.mjs +82 -0
  163. package/ai/skills/stacks-technical-diagrams/renderers/shared/path-semantics.mjs +1017 -0
  164. package/ai/skills/stacks-technical-diagrams/renderers/shared/portable-path.mjs +408 -0
  165. package/ai/skills/stacks-technical-diagrams/renderers/shared/repository-evidence.mjs +235 -79
  166. package/ai/skills/stacks-technical-diagrams/renderers/shared/repository-location.mjs +17 -4
  167. package/ai/skills/stacks-technical-diagrams/renderers/shared/route-quality.mjs +670 -0
  168. package/ai/skills/stacks-technical-diagrams/renderers/shared/sidecar-path.mjs +38 -0
  169. package/ai/skills/stacks-technical-diagrams/renderers/shared/software-notices.mjs +6 -0
  170. package/ai/skills/stacks-technical-diagrams/renderers/shared/spatial-grid.mjs +66 -0
  171. package/ai/skills/stacks-technical-diagrams/renderers/shared/svg-path-analysis.mjs +135 -0
  172. package/ai/skills/stacks-technical-diagrams/renderers/shared/text-fit.mjs +59 -3
  173. package/ai/skills/stacks-technical-diagrams/renderers/shared/utils.mjs +63 -35
  174. package/ai/skills/stacks-technical-diagrams/renderers/shared/validator.mjs +2 -5
  175. package/ai/skills/stacks-technical-diagrams/renderers/timeline/README.md +76 -0
  176. package/ai/skills/stacks-technical-diagrams/renderers/timeline/render-timeline.mjs +576 -0
  177. package/ai/skills/stacks-technical-diagrams/renderers/tree/README.md +96 -0
  178. package/ai/skills/stacks-technical-diagrams/renderers/tree/render-tree.mjs +573 -0
  179. package/ai/skills/stacks-technical-diagrams/renderers/waterfall/README.md +73 -0
  180. package/ai/skills/stacks-technical-diagrams/renderers/waterfall/render-waterfall.mjs +413 -0
  181. package/ai/skills/stacks-technical-diagrams/renderers/workflow/README.md +137 -23
  182. package/ai/skills/stacks-technical-diagrams/renderers/workflow/render-workflow.mjs +18 -6
  183. package/ai/skills/stacks-technical-diagrams/renderers/workflow/workflow-compiler.mjs +2230 -710
  184. package/ai/skills/stacks-technical-diagrams/renderers/workflow/workflow-migration-geometry.mjs +17 -0
  185. package/ai/skills/stacks-technical-diagrams/renderers/workflow/workflow-placement-repair.mjs +94 -0
  186. package/ai/skills/stacks-technical-diagrams/schemas/README.md +87 -40
  187. package/ai/skills/stacks-technical-diagrams/schemas/architecture.schema.json +7 -33
  188. package/ai/skills/stacks-technical-diagrams/schemas/class.schema.json +345 -0
  189. package/ai/skills/stacks-technical-diagrams/schemas/common.schema.json +68 -2
  190. package/ai/skills/stacks-technical-diagrams/schemas/dataflow.schema.json +14 -3
  191. package/ai/skills/stacks-technical-diagrams/schemas/erd.schema.json +381 -0
  192. package/ai/skills/stacks-technical-diagrams/schemas/explainer.schema.json +927 -0
  193. package/ai/skills/stacks-technical-diagrams/schemas/lifecycle.schema.json +23 -110
  194. package/ai/skills/stacks-technical-diagrams/schemas/sequence.schema.json +15 -4
  195. package/ai/skills/stacks-technical-diagrams/schemas/timeline.schema.json +160 -0
  196. package/ai/skills/stacks-technical-diagrams/schemas/tree.schema.json +141 -0
  197. package/ai/skills/stacks-technical-diagrams/schemas/waterfall.schema.json +147 -0
  198. package/ai/skills/stacks-technical-diagrams/schemas/workflow.schema.json +14 -3
  199. package/ai/skills/stacks-technical-diagrams/scripts/check-render-output.mjs +876 -243
  200. package/ai/skills/stacks-technical-diagrams/scripts/check-update.mjs +1717 -0
  201. package/ai/skills/stacks-technical-diagrams/scripts/delivery-update-child.mjs +26 -0
  202. package/ai/skills/stacks-technical-diagrams/scripts/generate-brand-marks.mjs +141 -0
  203. package/ai/skills/stacks-technical-diagrams/scripts/generate-validators.mjs +105 -0
  204. package/ai/skills/stacks-technical-diagrams/scripts/render-examples.mjs +11 -1
  205. package/ai/skills/stacks-technical-diagrams/scripts/update-contract.mjs +187 -0
  206. package/ai/skills/stacks-technical-diagrams/skill-release.json +10 -0
  207. package/ide/vscode/package.json +1 -1
  208. package/package.json +2 -2
@@ -1,318 +1,158 @@
1
1
  ---
2
2
  name: stacks-technical-diagrams
3
- description: Create polished, validated architecture, workflow, sequence, data-flow, and lifecycle diagrams for Stacks applications as explorable standalone HTML with inline SVG, dark/light themes, four visual presets, optional trace motion, and PNG/JPEG/WebP/SVG/WebM export. Accepts plain-language requirements or pasted Mermaid; reads repository evidence when the diagram must reflect real code; compares two architecture snapshots as a Before/Delta/After review. Use for system or cloud architecture, security boundaries, network topology, technical workflows, CI/CD, runbooks, API call sequences, request lifecycles, data pipelines, lineage, PII boundaries, state machines, status transitions, or converting Mermaid into a purpose-built diagram.
4
- license: MIT
3
+ description: "Create validated architecture, workflow, sequence, data-flow, lifecycle/state, ERD, class, tree, timeline, and waterfall diagrams as explorable standalone HTML with dark/light themes, motion and image/SVG/WebM export. Accept requirements or Mermaid; inspect repository evidence for code-backed diagrams. Use when visualizing systems, API calls, pipelines, schemas, histories, timings, or everyday steps, parts, relationships and states. Also turn an answer into a one-page explainer, with the conclusion first, structured panels, native diagrams and charts, when the user asks for a page, an explainer or an answer to share (做成一页, 用页面讲), or proactively when the user's rules opt in with an [archify explainer: ...] line. Not for dashboards."
4
+ license: Apache-2.0
5
5
  metadata:
6
6
  source: tt-a1i/archify
7
- source_version: "2.17.0-dev.1"
8
- source_commit: 18911058008f17dc065af23a2cdc9bfeff6d3f7a
9
- based_on: Cocoon-AI/architecture-diagram-generator (MIT, v1.0)
7
+ source_commit: d6059331abbddb49bca380ff46dca8ce33158b04
8
+ source_version: "3.2.0"
9
+ version: "3.2"
10
+ author: tt-a1i
10
11
  ---
11
12
 
12
13
  # Technical Diagrams for Stacks
13
14
 
14
- Turn a small typed JSON specification into one self-contained, interactive HTML diagram. Static
15
- output is the default; motion is opt-in.
15
+ This is the Stacks Bun port of [Archify](https://github.com/tt-a1i/archify), pinned to
16
+ `d6059331abbddb49bca380ff46dca8ce33158b04` (3.2.0). Preserve the bundled Apache-2.0
17
+ license, MIT origin notice and third-party notices. Updates belong in Stacks source;
18
+ the renderer never checks for or downloads an update.
16
19
 
17
- Every delivered artifact carries a theme toggle (persists in `localStorage`, respects
18
- `prefers-color-scheme`), pan/zoom, node search, focus with authored upstream/downstream reach, route
19
- probing, a semantic lens, an overview radar, presentation mode, guided stories, and an export menu
20
- (clipboard PNG; PNG/JPEG/WebP raster at up to 4x; dual-theme SVG; WebM for motion; 1200x630 share
21
- cards). Those are reader capabilities that already exist in the output, not authoring work.
20
+ Use `storage/framework/defaults/ai/skills/stacks-technical-diagrams/bin/diagrams`
21
+ (or its `.claude/skills/` generated link) instead of `node bin/archify.mjs` in the
22
+ examples below. The launcher and child processes run Bun with this skill's empty
23
+ `runtime.toml` and `--no-env-file`; application preloads and env files must stay out.
22
24
 
23
- ## Attribution
25
+ In a Stacks documentation project, honor the requested destination. By default put
26
+ each artifact at `docs/public/diagrams/<slug>/index.html`, with its source alongside
27
+ it, and add a Markdown guide linking `/diagrams/<slug>`; BunPress applies `/docs`.
28
+ A bare `<slug>.html` can be redirected to a missing extensionless path by the docs
29
+ host. Keep diagrams white-labeled when the application requires it. Repository
30
+ provenance can remain in a private validation receipt when publishing it would
31
+ expose an underlying implementation that the user asked to keep private.
24
32
 
25
- This skill ports the renderer, validator, and viewer from
26
- [Archify](https://github.com/tt-a1i/archify) 2.17.0-dev.1 by tt-a1i under the MIT license. Archify is
27
- itself a fork and rewrite of Cocoon AI's `architecture-diagram-generator` 1.0. Preserve `LICENSE` and
28
- `THIRD_PARTY_NOTICES.md` when redistributing this skill or substantial portions of its source.
29
33
 
30
- ## Running the CLI
34
+ Create checked standalone HTML as a native diagram or a one-page explainer that answers a question.
31
35
 
32
- Every command below is one launcher invocation from the Stacks project root:
36
+ Run commands from your working directory. Unless the user names another location, give each new artifact request its own folder `.archify/<type>-<slug>-<YYYYMMDD-HHMMSS>/` there (local time, chosen once): keep the candidate and `<slug>.html` in it and reuse it for repairs. Native diagrams use `candidate.json` with `meta.output` relative to the working directory; explainers may use `candidate.archify.md` and a portable output filename. A later request gets a new folder. Replace `bin/archify.mjs` in every command with the installed package's absolute path, or its path relative to your working directory; CLI input and output paths resolve from that directory.
33
37
 
34
- ```bash
35
- .claude/skills/stacks-technical-diagrams/bin/diagrams doctor
36
- ```
38
+ For a native diagram of a real codebase, read [Repository authoring](references/repository-authoring.md) while tracing the requested behavior. A system description uses the native steps below; a frozen candidate uses the handoff path.
37
39
 
38
- The launcher runs Bun against the skill's own empty `runtime.toml` with `--no-env-file`, so a diagram
39
- render never inherits the application's `preload` chain or its `.env`. Never call the renderers with
40
- a bare `bun`; use the launcher (or `bun --config=<skill>/runtime.toml --no-env-file
41
- <skill>/bin/technical-diagrams.mjs` if you need the explicit form).
42
-
43
- Commands: `render`, `validate`, `deliver`, `compare`, `preview`, `visual-check`, `check`, `inspect`,
44
- `migrate`, `guide`, `brands`, `examples`, `doctor`, `demo`. Run `diagrams` with no arguments for the
45
- full usage block.
46
-
47
- ## Fast authoring path
48
-
49
- Use this bounded path for ordinary generation.
50
-
51
- 1. Choose `architecture`, `workflow`, `sequence`, `dataflow`, or `lifecycle` from the question. When
52
- ambiguous, run `diagrams guide "<scenario>" --json`.
53
- 2. Read one matching schema in `schemas/`, plus `schemas/common.schema.json`, plus one matching JSON
54
- example in `examples/`. Read only those files. Use the example for field shape, never for facts.
55
- New workflow sources use `schema_version: 2`; keep `schema_version: 1` only when preserving an
56
- existing workflow's fixed geometry.
57
- 3. Artifact first: the next tool action writes the candidate JSON. Do not plan exact coordinates in
58
- prose and do not read renderer internals before the first candidate. Start with one clear main
59
- path, short side branches, sparse labels, and at most 12 primary nodes. Set
60
- `meta.quality_profile: "showcase"` unless the user explicitly wants a dense `standard` map. Start
61
- with automatic routes and labels; do not add `via`, `channelX`, `channelY`, or `labelAt` before a
62
- diagnostic asks for one, and apply at most one diagnosed geometry control per repair.
63
- 4. Validate after every candidate edit and immediately before handoff:
40
+ ## Choose the artifact
64
41
 
65
- ```bash
66
- .claude/skills/stacks-technical-diagrams/bin/diagrams validate <type> <candidate.json> --quality showcase --json
67
- ```
42
+ - When the user asks to draw or visualize a system, flow, schema or history, use a native diagram and the Type router.
43
+ - Use `explainer` when the user asks for the answer as a page: a page, one page, an explainer, something to share (“做成一页”, “用页面讲”, “answer with a page”). Without such a request, answer in text or draw the requested diagram. A page made on request ends its reply with the one-line mode offer under Output.
44
+ - A rules line in context changes this. `[archify explainer: proactive]`: also make a page, unasked, for an explanation, comparison, trade-off, decision, diagnosis, review or plan that needs a table, steps or several sections. `[archify explainer: always-on]`: every reply that reaches a conclusion also gets a compact page of at most four panels, delivered without opening it, its link closing the reply. `[archify explainer: on-demand]`: only when asked, and never offer a mode.
45
+ - In every mode a page needs a conclusion with some structure behind it: chat, one-line answers, raw command output and text-only requests get none.
46
+ - For `explainer`, read [Explainer authoring](references/explainer-authoring.md) for its conclusion, reasons, scope, board layout and optional native diagrams. Write the complete draft, then run `finalize explainer` for validation, atomic delivery and artifact checks. Use panel patch for local content revisions.
68
47
 
69
- A receipt with only 4 artifact checks is basic validation, never showcase acceptance. A showcase
70
- pass reports all 9 artifact checks with 0 composition errors and 0 warnings. For a workflow v2
71
- geometry diagnosis, run `validate workflow <candidate.json> --layout-json` and read the stable
72
- compiler receipt; solver internals are not authoring controls. A passing final validation freezes
73
- the candidate: do not edit it afterward.
74
- 5. Deliver once, as the final acceptance step:
48
+ ## Existing candidate handoff
75
49
 
76
- ```bash
77
- .claude/skills/stacks-technical-diagrams/bin/diagrams deliver <type> <candidate.json> <output.html> --quality showcase --json
78
- ```
50
+ When the user supplies a frozen candidate, run `finalize` first as one CLI invocation. Its passing receipt completes the automated gates; follow any visual review recommendation under Delivery before claiming visual quality. For repair, follow step 5.
79
51
 
80
- A non-zero exit is never success. On failure, change only the diagnosed `subject`, verify
81
- `evidence`, choose from `supportedFixes`, and rerun. Keep correcting while the objective error
82
- count reaches a new minimum; if two consecutive rounds do not improve that best count, stop and
83
- report the unresolved diagnostics truthfully.
84
-
85
- Inspect renderer or validator source only after an unsupported internal diagnostic or two failed
86
- focused repairs.
87
-
88
- ## Stacks repository workflow
89
-
90
- 1. Inspect the implementation before drawing. Treat `app/` as overrides and
91
- `storage/framework/defaults/app/` as fallbacks. Follow registrations in `app/Routes.ts`, route
92
- files, actions, jobs, listeners, middleware, models, config, resources, and the framework entry
93
- points that matter to the requested view.
94
- 2. Read the relevant Stacks domain skill before mapping an unfamiliar subsystem. Common companions
95
- are `stacks-router`, `stacks-actions`, `stacks-models`, `stacks-database`, `stacks-jobs`,
96
- `stacks-events`, `stacks-realtime`, and `stacks-cloud`.
97
- 3. Draw one question per diagram. For a runtime overview, prefer browser or client -> stx/router ->
98
- action or service -> model/query -> database, then add only the external systems and trust
99
- boundaries that story needs.
100
- 4. Write output to the user's requested path. When no path is given, use
101
- `docs/public/diagrams/<descriptive-name>/index.html` and keep the source JSON beside it. That
102
- path matters: BunPress only renders `docs/**/*.md` and copies `docs/public/**`, so a diagram
103
- written anywhere else under `docs/` never reaches the built site. The directory-plus-`index.html`
104
- shape is what the deployed docs host serves at the clean URL
105
- `/docs/diagrams/<descriptive-name>`; a bare `<name>.html` is redirected to an extensionless path
106
- that does not exist. Link to it from a docs page as `/diagrams/<descriptive-name>` (BunPress adds
107
- the `/docs` base).
108
-
109
- To pin architecture nodes to real code, pass `--repo-root .` and author `meta.repository`; nodes then
110
- mark themselves `SRC n` and open Git-verified files and line ranges at one pinned commit. See
111
- `references/authoring-contract.md`.
52
+ `finalize` includes a bounded update check in its delivery receipt; see Update awareness.
112
53
 
113
- ## Type router
54
+ ## Native diagram authoring
114
55
 
115
- | Type | Use for |
116
- |---|---|
117
- | `architecture` | Components, services, cloud/security boundaries, infrastructure |
118
- | `workflow` | Processes, approval gates, tool calls, runbooks, CI/CD, incident response |
119
- | `sequence` | API call chains, request lifecycles, cache fallback, async traces, returns |
120
- | `dataflow` | Pipelines, ETL/ELT, lineage, PII and governance boundaries, consumers |
121
- | `lifecycle` | State/status transitions, retries, waiting and terminal states |
56
+ Use this path for ordinary generation. Read branch references only when their stated trigger applies.
122
57
 
123
- Trigger phrases: "architecture/system/cloud diagram" -> `architecture` (unless clearly
124
- process-oriented). "workflow/flow/process/runbook/approval/CI-CD/incident" -> `workflow`.
125
- "sequence/interaction/call chain/who calls whom" -> `sequence`. "data
126
- flow/pipeline/ETL/lineage/PII/governance" -> `dataflow`. "state/status/lifecycle/state
127
- machine/retry/terminal" -> `lifecycle`.
58
+ 1. Choose `architecture`, `workflow`, `sequence`, `dataflow`, `lifecycle`, `erd`, `class`, `tree`, `timeline`, or `waterfall` from the question.
59
+ 2. Use the exact schema and example paths in the Type router without listing their directories. Read [Authoring defaults](references/authoring-defaults.md) and the mode's example in a bounded batch separate from project documents and complete schemas so neither is truncated; recover any missing section before writing. For Architecture, use the matching showcase example. For every mode except Architecture, also read the mode and common schemas. Read the relevant schema definition before choosing any new field, enum, or constrained text, especially boundary kinds. Examples teach shape, not facts. Use fresh IDs, wording, and layout. Go directly to the candidate without preliminary help, doctor, starter validation, temporary diagrams, or output-path listing. Query brands only for an explicitly requested mark; read [Brand marks](references/brand-marks.md) for an unknown mark with a user-provided URL.
60
+ 3. Once the requested scope and, for a real codebase, [source evidence](references/repository-authoring.md) are covered, write the complete candidate directly without planning coordinates in prose. Choose Architecture abstraction and connected placement using Authoring defaults before coordinates: show the main user journey and necessary branches, preserve control roles and behavior-changing conditions, and leave enough room for actual relationship labels. No node, relationship, source, view, card, or boundary count is a target or ceiling. Use automatic routes first; add explicit routing only for necessary branch, return, supplied geometry, or measured repair. Set `meta.quality_profile` to `"showcase"` unless the user requests dense `standard`. For ERD, use a table-first layout: show every physical column in `entities[].attributes`, keep its SQL type and source comment, state every key role a column carries (`key` takes a role or a list, so a junction column is `["pk", "fk"]`, and every `fk` column also needs `references` like `"orders.id"`), and never move columns into cards as a substitute for the table. Classify tables into functional domains before placement, give each domain a concise `tag`, and place its members in one solid rectangle of grid cells — a single row, a single column, or a filled rectangular block, not an L or diagonal. A tagged table always needs `row`/`col`, because absolute coordinates have no grid cells and a domain whose tables do not fill one rectangle cannot be drawn as a band: the renderer reports `erd/domain-not-drawn` instead of publishing a diagram that cannot name the domain. A multi-domain schema reads best as one domain per column — each `tag` a vertical run — because the reader scales a wide canvas up to the reader width and shrinks a tall one until the page fits, so the wide arrangement is the one that stays complete and legible inside a laptop viewport. A schema-first ERD over roughly 8 tables or 50 fields is itself a dense map: author its first complete-field pass at `standard` and upgrade only once the layout still reads.
61
+ 4. Once the complete first candidate is written, run `finalize` directly. Its first gate is showcase validation; successful first drafts need no separate pre-validation. Keep the candidate unchanged while the command runs:
128
62
 
129
- ## Mermaid input
63
+ ```bash
64
+ node bin/archify.mjs finalize <type> <candidate.json> <output.html> --quality showcase --json
65
+ ```
130
66
 
131
- Read Mermaid for topology and meaning, then author fresh JSON. Do not parse or re-render Mermaid
132
- styling.
133
-
134
- - `flowchart` / `graph` -> `workflow`, or `architecture` for a component map. `subgraph` becomes a
135
- lane or a boundary; a diamond node becomes a decision or security node.
136
- - `sequenceDiagram` -> `sequence`. `participant` becomes a semantic participant, `->>` a message,
137
- `-->>` a `return` variant, `Note` a message note, `rect` a segment.
138
- - `stateDiagram` -> `lifecycle`. `[*]` becomes the `start` type or the `terminal` lane; transition
139
- labels stay event-like.
140
-
141
- Drop Mermaid styling and keep only topology and meaning. Grouping, lane order, and emphasis are your
142
- judgment, and that judgment is the product.
143
-
144
- ## Authoring invariants
145
-
146
- - One obvious main path; side branches leave the nearest main-path node. Remove low-value edges
147
- before adding routing controls. If a diagram needs 20+ edges, remove edges until the main path is
148
- obvious.
149
- - Detail belongs in summary `cards`, not in extra arrows.
150
- - Omit `meta.visual_preset` by default so every diagram opens in `classic`. Color mode and visual
151
- preset are independent: switching light/dark preserves the preset. Set `signal-flow`, `blueprint`,
152
- or `editorial` only when the user asks for that style.
153
- - Omit `meta.subtitle` by default. Never invent one that restates the title, nodes, or cards.
154
- - Omit `meta.legend` for the truthful `auto` default. When needed, use only `mode: auto|all|hidden`
155
- and renderer-supported `entries.<kind>.label|visible`. Labels never change semantics.
156
- - Component types are `frontend`, `backend`, `database`, `cloud`, `security`, `messagebus`,
157
- `external`. Variants are `default`, `emphasis`, `security`, `dashed`.
158
- - Relationship labels are semantic data. When one collides, move the label, adjust the route or
159
- spacing, then shorten the wording while preserving meaning. Delete wording only when both endpoints
160
- fully imply it and it carries no protocol, action, direction, sync/async behavior, or
161
- cross-boundary mechanism. Deleting a meaningful label is not a geometry repair.
162
- - Spacing means clear gap, not center distance. A label's clear gap must exceed its measured mask
163
- width.
164
- - Automatic routes own their endpoint sides: the first and final segment leave and enter
165
- perpendicular to that side. Automatic Port Spread is default behavior for architecture, workflow,
166
- dataflow, and lifecycle; it stands down for explicit `via`, `channelX`, `channelY`, `labelAt`, or a
167
- non-`auto` route.
168
- - Never accept an edge crossing an unrelated opaque node, an ambiguous shared corridor, or a label
169
- masking another route.
170
- - For sequence diagrams, omit `meta.column_fit` for the stable `fixed` layout. Set `"spread"` when a
171
- wide viewBox leaves unused horizontal space or meaningful participant labels do not fit; do not
172
- shorten semantic labels first.
173
- - Lifecycle phase columns `0..4` occupy the main rail; an event or terminal column `N` in `0..2`
174
- aligns beneath main column `N + 2`. A recoverable state uses `type: "failure"` plus a real
175
- transition back to the active state.
176
- - Omit `meta.engineering_profile` by default. Enable `deployment-ownership` only when the user
177
- explicitly asks for production deployment topology, ownership handoff, or a fail-closed deployment
178
- review, and the facts are known. It fails closed on missing owners, region placement, private
179
- database scope, or named crossings; repair the facts rather than removing the profile.
180
- - Set `meta.animation: "trace"` only for a demo or presentation view. It respects
181
- `prefers-reduced-motion` and leaves static output unchanged.
182
- - `meta.views` is optional: at most five curated chapters built from stable node IDs.
183
- - `meta.locale` (`en` or `zh-CN`) localizes renderer-owned viewer UI only, never authored content.
184
- For any other language, omit it and say plainly that the fixed viewer UI and `<html lang>` fall
185
- back to English.
186
- - Treat the artifact as a first-screen desktop composition. One responsive artifact serves laptops
187
- and external displays; never emit device-specific HTML or alternate topology. Before handoff the
188
- page must not scroll horizontally or vertically at 1440x900, 1600x1000, and 1920x1080 (plus
189
- 2048x1320 for a large-display composition). Repair overflow by removing genuinely redundant content
190
- or compacting spacing before shrinking nodes or labels. Never counterfeit a pass with
191
- `overflow: hidden`, clipping, an internal scroller, a stretched SVG, or smaller typography.
192
-
193
- Read `references/authoring-contract.md` only when you need field enums, spacing math, geometry repair
194
- rules, repository evidence, or mode-specific placement.
195
-
196
- ## Delivery evidence
197
-
198
- `deliver` freezes the specification bytes into a private same-directory snapshot, renders and checks
199
- that snapshot, atomically commits the HTML, and reports SHA-256 plus byte counts for both
200
- specification and artifact. It proves deterministic artifact checks; it does not exercise the viewer
201
- in a browser.
67
+ For a repository-backed candidate, include evidence on the first draft and use the complete first command: `node bin/archify.mjs finalize <type> <candidate.json> <output.html> --repo-root <repo-root> --quality showcase --json`. Pass the `--quality` that matches `meta.quality_profile`, such as `standard` for a dense first ERD pass.
202
68
 
203
- ```bash
204
- .claude/skills/stacks-technical-diagrams/bin/diagrams visual-check <output.html> --json
205
- ```
69
+ A passing receipt proves the included `validate`, `deliver`, strict `check`, and real-browser `browser-check` gates passed. Use its compact summary; run standalone commands only for a separate request or focused failure diagnosis.
206
70
 
207
- `visual-check` drives a system Chrome over the DevTools Protocol against the exact delivered HTML,
208
- without rerendering it, and writes screenshots plus a machine-readable receipt. It exits 2 (skipped)
209
- when no Chrome is installed. Keep three claims separate: `deliver` proves artifact checks,
210
- `visual-check` proves bounded browser behavior, and perceptual review requires a human or an
211
- image-capable reviewer. Never run `visual-check` after a failed delivery: it would inspect the stale
212
- last-good artifact.
71
+ 5. A non-zero exit is never success. Read compact stdout or `evidence.summaryReceipt`, then [repair the failed gate](references/delivery-contract.md#failed-finalize-and-candidate-repair), including its repair limit. Preserve requested meaning and source evidence. For several tangled Architecture routes, read [Architecture layout repair](references/architecture-layout-repair.md); for measured field or geometry failures, read [Authoring contract](references/authoring-contract.md). Edit the connected neighborhood and rerun the complete `finalize` command from step 4. Once a run has reached `browser-check`, the output path owns that evidence: give every later run its own `--out-dir <folder>/review-<n>`.
213
72
 
214
- For an active authoring loop, `preview` watches one JSON file on a random loopback port and reloads
215
- only after a candidate passes every gate, keeping the last verified diagram visible through failures:
73
+ ## Update awareness
216
74
 
217
- ```bash
218
- .claude/skills/stacks-technical-diagrams/bin/diagrams preview <type> <input>.json <output>.html --quality showcase
219
- ```
75
+ This port is offline and versioned with Stacks. Do not install a second skill or run
76
+ upstream update helpers. Update the pinned sources in the Stacks repository, run
77
+ its focused verification and publish the changed defaults package when requested.
220
78
 
221
- Never start `preview` by default. `deliver --open` is an opt-in one-shot handoff after commit. Full
222
- receipt fields, coverage, sidecars, and exit behavior: `references/delivery-contract.md`.
79
+ ## Type router
223
80
 
224
- ## Architecture Delta
81
+ | Type | Use for | Schema | Example |
82
+ |---|---|---|---|
83
+ | `architecture` | Components, services, cloud/security boundaries, infrastructure; what something everyday is made of | `schemas/architecture.schema.json` | System descriptions, services, libraries, and CLI repos: `examples/web-app.architecture.json`; deployment repos: `examples/production-deployment.architecture.json` |
84
+ | `workflow` | Processes, approval gates, tool calls, runbooks, CI/CD; plans and step-by-step life processes | `schemas/workflow.schema.json` | `examples/agent-tool-call.workflow.json` |
85
+ | `sequence` | API call chains, request lifecycles, async traces, returns; back-and-forth between people | `schemas/sequence.schema.json` | `examples/cache-miss-request.sequence.json` |
86
+ | `dataflow` | Pipelines, ETL/ELT, lineage, governance, consumers; where money or documents go | `schemas/dataflow.schema.json` | `examples/product-analytics.dataflow.json` |
87
+ | `lifecycle` | State/status transitions, retries, waiting and terminal states; where an application or order stands | `schemas/lifecycle.schema.json` | `examples/deployment-release.lifecycle.json` |
88
+ | `erd` | Tables/entities, attributes, primary/foreign/unique keys, cardinality between them | `schemas/erd.schema.json` | `examples/orders.erd.json` |
89
+ | `tree` | Single-parent containment: repository/module trees, capability or feature breakdowns, org-style decomposition | `schemas/tree.schema.json` | `examples/payment-platform.tree.json` |
90
+ | `class` | Classes, interfaces, selected members, and dependency/association/inheritance/realization/composition between types | `schemas/class.schema.json` | `examples/payments.class.json` |
91
+ | `timeline` | When things happened: incident reviews, release histories, timestamped events on a proportional clock with source lanes | `schemas/timeline.schema.json` | `examples/payment-incident.timeline.json` |
92
+ | `waterfall` | Where the time went: span durations, overlap, and nesting of one request or agent run on a common time axis | `schemas/waterfall.schema.json` | `examples/checkout-request.waterfall.json` |
225
93
 
226
- For design or PR review, compare two validated architecture snapshots as Before / Delta / After with
227
- a machine receipt of exactly what was added, removed, changed, moved, and rerouted:
94
+ When choosing among native diagram types is ambiguous, run `node bin/archify.mjs guide "<scenario>" --json`. Scenario proof examples are structural references, not facts to copy.
228
95
 
229
- ```bash
230
- .claude/skills/stacks-technical-diagrams/bin/diagrams compare architecture base.json head.json delta.html --receipt delta.receipt.json --json
231
- ```
96
+ For an everyday subject, keep the same diagram modes and semantic types, then name them for the reader: use everyday `icon` values and `meta.legend` labels as in [Node icons](references/authoring-contract.md#node-icons). Ask for missing personal facts instead of inventing dates, amounts, or rules.
232
97
 
233
- Component identity is `components[].id`, relationship identity is `connections[].id` (required for
234
- compare), and boundary identity is derived from `kind` + `label`. The delta reports authored facts
235
- only; it infers no impact, risk, or merge safety.
98
+ ## Mermaid input
236
99
 
237
- ## Brand marks
100
+ Read Mermaid for topology and meaning, then author fresh Archify JSON; do not mechanically render Mermaid styling.
238
101
 
239
- Brand identity is optional and explicit. When a node names a real product, look up a canonical
240
- built-in ID from the bundled catalogue of 107 marks:
102
+ - `flowchart` / `graph` → `workflow`, or `architecture` for a component map.
103
+ - `sequenceDiagram` → `sequence`; participants become semantic participants and arrows become messages.
104
+ - `stateDiagram` → `lifecycle`; states and transitions retain meaning, not Mermaid style.
105
+ - `erDiagram` → `erd`; entity and relationship names, keys, and cardinality retain meaning, not Mermaid style.
106
+ - `classDiagram` → `class`; type kinds, selected members, and relationship kinds retain meaning, not Mermaid style.
241
107
 
242
- ```bash
243
- .claude/skills/stacks-technical-diagrams/bin/diagrams brands "postgres" --json
244
- ```
108
+ ## Delivery
109
+
110
+ Use the `finalize` command above for the first candidate and after a repair.
111
+
112
+ `finalize` stops at the first non-passing gate. Its compact stdout and `<output-stem>.finalize-summary.json` are ordinary evidence. A passing run creates no screenshots and reports `visualReview: "not-requested"`.
245
113
 
246
- Never infer a brand from a vague role such as "database", and never let a badge replace the semantic
247
- `type`, label, or relationship facts. `brands capture <url>` is the one command in this skill that
248
- makes a network request: it is user-initiated, it pins the result by SHA-256, and `render`,
249
- `validate`, `deliver`, and `compare` never perform an unpinned capture. See
250
- `references/brand-marks.md`.
114
+ When a passing Architecture receipt reports `visualReviewRecommendation.signals.resolvedCrossovers`, copy the candidate aside and apply the hints in one edit that changes only node positions and sizes: every node, relationship (including its `from` and `to`), label, and source stays as it was. Rerun the complete `finalize` once with `--out-dir <folder>/review-2`, because the previous HTML already owns its browser evidence. `--out-dir` relocates the new browser-check and default finalize receipts, not the HTML or its delivery receipt. Successful delivery rewrites that pair at the requested output path; earlier review evidence remains bound to its original artifact bytes. See [review evidence paths](references/delivery-contract.md#a-new-candidate-at-an-existing-output-path). If that run fails, reports more crossings, or reports the same crossings with more `signals.routesOverSuggestedBends`, restore the copy and finalize it with `--out-dir <folder>/review-3`. Do not start a second placement round. Hints about extra bends alone are optional.
251
115
 
252
- ## Dependency-free and offline contract
116
+ When `layoutReviewRecommendation.action` is `inspect-sequence-width`, follow [Sequence width review](references/delivery-contract.md#sequence-width-review) before handing off a newly authored Sequence.
253
117
 
254
- Do not install packages or fetch runtime assets. Standalone validators for all five schemas are
255
- checked in, the renderers use Bun's Node compatibility modules, and delivered HTML embeds its own
256
- subsetted JetBrains Mono, so a page renders with no network access. Upstream's update-notifier
257
- scripts are deliberately not vendored: this port is pinned by `metadata.source_commit` and is updated
258
- by re-porting, never by a runtime download.
118
+ Perceptual review is optional for ordinary generation, including a newly positioned Architecture. Use [Optional capture evidence](references/delivery-contract.md#optional-capture-evidence), with `--out-dir <folder>/visual-check`, when the user requests visual review, during development audits, or for a concrete route/browser concern. `visualReviewRecommendation` is advisory. Inspect captures before claiming visual quality; qualify any check claim as automated when perceptual review has not occurred.
259
119
 
260
- Verify the install with `diagrams doctor`, and generate a ready-to-open example with
261
- `diagrams demo <output-directory>` before the first custom diagram.
120
+ Read [Delivery contract](references/delivery-contract.md) for failed gates, standalone commands, provenance/recovery, repeated delivery, exports, or opening. Native diagram recovery follows `deliver` → strict provenance `check` → `browser-check`; captures require strict provenance. Explainer delivery uses validate, deliver and check as described in its authoring guide.
262
121
 
263
- ## Deeper references
122
+ For workflow viewport overflow, read [Workflow viewport repair](references/authoring-contract.md#workflow-viewport-repair) before the next layout edit.
264
123
 
265
- Read one of these only when the fast path calls for it.
124
+ When reporting verification details, distinguish artifact checks, browser evidence, captures, and actual perceptual review. For an explicitly requested immediate preview or active desktop loop, see [Optional opening](references/delivery-contract.md#optional-opening).
266
125
 
267
- | Need | Read |
268
- |---|---|
269
- | Field enums, spacing math, geometry repair, repository evidence, placement | `references/authoring-contract.md` |
270
- | Receipt fields, coverage, sidecars, exit behavior, preview, export receipts | `references/delivery-contract.md` |
271
- | Share cards, route/reach cards, motion, stories, deep links, presentation | `references/viewer-runtime.md` |
272
- | Brand catalogue rules and capture | `references/brand-marks.md`, `brand-marks/README.md` |
273
- | Per-mode layout budgets, route presets, semantic types | `renderers/<mode>/README.md` |
274
- | IR overview across all five modes | `schemas/README.md` |
126
+ ## Optional viewer capabilities
275
127
 
276
- ## Hand-placed fallback (no Bun available)
128
+ Live motion is enabled by default for every rendered diagram; omit `meta.animation`. The Viewer’s Live/Still button controls playback.
277
129
 
278
- When the CLI cannot run, copy `assets/template.html`, place SVG by hand using the design system
279
- below, and run the self-review checklist before delivering.
130
+ Read `references/viewer-runtime.md` only when the user explicitly asks for Share Cards, Route/Reach cards, motion, deep links, presentation, search/focus, or another Viewer Runtime feature.
280
131
 
281
- **The cardinal rule: CSS classes, not inline colors.** The theme toggle switches CSS custom
282
- properties, so `fill="rgba(...)"` or `stroke="#22d3ee"` will not follow the theme.
132
+ ## Setup and fallback
283
133
 
284
- ```svg
285
- <rect x="X" y="Y" width="W" height="H" rx="6" class="c-mask"/>
286
- <rect x="X" y="Y" width="W" height="H" rx="6" class="c-backend" stroke-width="1.5"/>
287
- <text x="CX" y="CY" class="t-primary" font-size="11" font-weight="600" text-anchor="middle">API Server</text>
288
- <text x="CX" y="CY+16" class="t-muted" font-size="9" text-anchor="middle">FastAPI :8000</text>
134
+ No install is required inside the skill package. For setup diagnosis, verify with:
135
+
136
+ ```bash
137
+ node bin/archify.mjs doctor
138
+ node bin/archify.mjs demo <output-directory>
289
139
  ```
290
140
 
291
- Component fills `c-frontend`, `c-backend`, `c-database`, `c-cloud`, `c-security`, `c-messagebus`,
292
- `c-external`; text accents `t-<same>` plus `t-primary` / `t-muted` / `t-dim`. Arrows `a-default`,
293
- `a-emphasis` (hot path), `a-security` (dashed), `a-dashed` (async), each with an explicit
294
- `stroke-width` and a matching `marker-end="url(#arrowhead[-variant])"`. Boundaries:
295
- `c-security-group` (dashed rose), `c-region` (dashed amber), `c-lane`. Typography inherits JetBrains
296
- Mono from the SVG root: 11-12px component names, 9px sublabels, 8px annotations, 7px tiny labels.
297
-
298
- Hard layout rules: an opaque `c-mask` rect immediately before every styled `c-<type>` rect; all
299
- arrows before all component rects in document order; at least 40px vertical gap between components;
300
- boundary `y` = inner `y` - 30 and boundary `height` = inner `height` + 50 with the label baseline 18px
301
- below the boundary top; the legend outside every boundary and at least 20px below the lowest one.
302
-
303
- Self-review before delivering:
304
-
305
- 1. `grep -E 'fill="(#|rgb)|stroke="(#|rgb)' out.html` inside the SVG returns nothing but the
306
- template's own defs.
307
- 2. Every `c-<type>` rect has an identical-geometry `c-mask` rect immediately before it.
308
- 3. All arrows appear before all component rects in document order.
309
- 4. max(y + height) over all SVG elements is at least 20px inside the viewBox height; same for x.
310
- 5. Legend y is below every boundary's y + height.
311
- 6. The `.toolbar`, `<script>` blocks, and `:root` / `[data-theme]` CSS are untouched. They are the
312
- theme toggle, viewer, and export menu.
141
+ For native diagrams, when shell access is unavailable, hand-place architecture SVG into `assets/template.html`, use CSS semantic classes rather than inline colors, and follow the visual review contract in `references/delivery-contract.md`. Explainers require their renderer and real delivery gates; if those are unavailable, report the limitation and give a text answer when useful, without claiming HTML delivery.
313
142
 
314
143
  ## Output
315
144
 
316
- Report the checked HTML path, the diagram type, the validation summary, the specification and
317
- artifact receipt, the browser-evidence status, and a truthful visual-review status. Never claim
318
- success for a non-zero command, and never claim a visual inspection you did not perform.
145
+ Reply in the user's language, as briefly as the result allows; the diagram carries the content, so a single diagram usually needs one line.
146
+
147
+ - Lead with a clickable Markdown link to the HTML: a descriptive title, not the file name, and its absolute path, wrapped in `<...>` when it contains spaces.
148
+ - When the user wants to understand a system or codebase rather than draw a described subject, add one or two sentences with the key takeaway. Skip sentences that only restate what the diagram obviously shows.
149
+ - State anything that changes how the diagram should be read: the abstraction level or deliberately omitted parts when a reader might expect them, illustrative rather than measured values, missing source evidence, or requested content dropped or merged during repair.
150
+ - For several diagrams, report completion once with a link to an existing overview or compact per-diagram links, not a directory path.
151
+
152
+ Do not recap commands, repair rounds, hashes, quality profiles, or check lists; they stay in the receipts. If asked whether the diagram was verified, answer in one line, such as “Automated checks passed; not visually reviewed.” Give receipt links and details only for reproducibility or troubleshooting. Disclose requested visual review that could not run, and claim visual inspection only when performed. Keep the required update notice under Update awareness.
153
+
154
+ Example: `Created [Checkout request timing](/abs/path/checkout-timing.html). Durations are illustrative, not measured.`
155
+
156
+ For an explainer, reply in two or three lines: the conclusion and the page link. Mention gates only when one failed or writing warnings remain; do not paste the draft.
157
+
158
+ After an explainer made on request, when no `[archify explainer: ...]` line is in context, end the reply with one optional line offering the proactive mode, once per conversation, for example: “需要的话,以后遇到解释、对比、排查这类问题,我可以主动做成这样的页面,要开启吗?” If the user accepts, add `[archify explainer: proactive] Make an Archify explainer page, unasked, for explanations, comparisons, decisions, diagnoses, reviews and plans that need a table, steps or several sections.` to the global rules file of the current agent (such as `~/.claude/CLAUDE.md`, `~/.codex/AGENTS.md` or `~/.config/devin/AGENTS.md`) and name the file; deleting the line turns it off. If the user declines, offer to add `[archify explainer: on-demand]` so the question does not return.
@@ -5,7 +5,8 @@ are provided only to identify technologies and services in user-authored
5
5
  diagrams. Their inclusion does not imply sponsorship, endorsement, partnership,
6
6
  or affiliation with Archify.
7
7
 
8
- The Archify MIT license applies to Archify's own code and content. It does not
8
+ Archify's license and historical MIT grants are described in LICENSE, NOTICE,
9
+ and LICENSE-MIT. The software license does not
9
10
  replace the copyright licenses, trademark policies, or brand guidelines that
10
11
  apply to third-party marks. Users are responsible for confirming that their
11
12
  particular use is permitted.
@@ -61,9 +62,17 @@ and is distributed under the SIL Open Font License 1.1. The complete license
61
62
  text is preserved in `assets/JetBrainsMono-OFL.txt` in the packaged Skill and
62
63
  in the font CSS carried by standalone HTML and SVG exports.
63
64
 
65
+ ## Pele
66
+
67
+ The explainer renders Mermaid chart fences with an unmodified subset of
68
+ [Pele 1.3.0](https://github.com/obsidianmd/pele), copyright (c) 2026 kepano,
69
+ distributed under the MIT License. The subset and its license text are in
70
+ `explainer/vendor/pele/` in the packaged Skill. Charts are rendered to static
71
+ SVG when a page is built; delivered pages contain no Pele code.
72
+
64
73
  ## No additional rights granted
65
74
 
66
75
  Brand names, logos, and trademarks remain the property of their respective
67
76
  owners. This notice records provenance and known terms; it does not grant rights
68
- that This skill does not hold, and it does not state that every packaged mark has
77
+ that Archify does not hold, and it does not state that every packaged mark has
69
78
  been cleared for every commercial, promotional, or redistributive use.
@@ -0,0 +1,12 @@
1
+ {
2
+ "repository": "https://github.com/tt-a1i/archify",
3
+ "commit": "d6059331abbddb49bca380ff46dca8ce33158b04",
4
+ "version": "3.2.0",
5
+ "license": "Apache-2.0",
6
+ "adaptations": [
7
+ "Bun runtime isolation for every child process",
8
+ "Pinned, offline delivery; no update network requests",
9
+ "Stacks launcher and publication guidance",
10
+ "Legacy technical-diagrams entrypoint retained"
11
+ ]
12
+ }
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: "Stacks Technical Diagrams"
3
- short_description: "Create dependency-free technical diagrams"
4
- default_prompt: "Use $stacks-technical-diagrams to map this Stacks application runtime architecture."
3
+ short_description: "Create validated diagrams, including native ERDs"
4
+ default_prompt: "Use $stacks-technical-diagrams to map this Stacks application's entities and relationships."