Skip to content

feat(diagram): include other diagrams with include "<path>" - #211

Merged
ionos-landgraf-vin merged 3 commits into
mainfrom
feat/asd-include
Oct 27, 2026
Merged

ionos-landgraf-vin merged 3 commits into
mainfrom
feat/asd-include

Conversation

@ionos-landgraf-vin

@ionos-landgraf-vin ionos-landgraf-vin commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • New include "<path>" directive for .asd diagrams, so shared parts are written once:
    • archsight://<Kind>/<name> → the architecture/diagram of that resource
    • file://<path> → an .asd file, relative to the resources dir (never outside it; no absolute paths, dotfiles or symlinks out)
  • Allowed at the top level and inside containers (not leaf blocks, not with columns); the included content appears at that position. Edges are resolved by id after the graph is built, so links work across the parts.
  • Includes nest (max depth 8, max 100 includes); cycles, missing targets and broken included diagrams are errors naming the include and line.
  • A dataflow or theme/legend/ranks in an include inside a container is ignored with a warning (server log, archsight lint warnings); kept at the top level.
  • Render cache keys / ETags cover the included sources; depicts follows includes.
  • Standalone archsight diagram: file:// only, rooted at the new --resources DIR (default: input's directory).

Known limits: errors from inside an included diagram show that file's line numbers; Typst analysis output has no database, so includes there show the diagram error box.

Test plan

  • bundle exec rake (tests, steep, rubocop)
  • archsight diagram with a file:// include
  • Check an including diagram in archsight serve, edit the included resource and reload

🤖 Generated with Claude Code

ionos-landgraf-vin and others added 3 commits October 27, 2026 12:22
include "archsight://Kind/name" splices the architecture/diagram of a
resource, include "file://path.asd" an .asd file of the resources
directory (never outside it), at the position of the directive: top
level or inside any container. Includes nest (depth and count limits,
cycles are errors). Dataflows and settings of a diagram included inside
a container are ignored with a warning (server log, archsight lint).

Render caches and ETags cover the included sources. Standalone
archsight diagram supports file:// with --resources.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…iagram

A prefix goes in front of every id the included diagram defines (nodes and
dataflows) and the references to them inside it, so the same diagram can be
included more than once. Nodes without a label keep showing their own id.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
include "..." { namespace "cs" } puts "cs." in front of the ids the included
diagram defines (cs.web), instead of a free-form string prefix. Namespaces nest
(o.in.x).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@ionos-landgraf-vin
ionos-landgraf-vin merged commit c93394b into main Oct 27, 2026
8 checks passed
@ionos-landgraf-vin
ionos-landgraf-vin deleted the feat/asd-include branch October 27, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant