Fix review findings: importer DoS, sync data loss, views/profile rendering, docs

Source importers: lstat before open so FIFOs no longer hang the directory
walk; replace the quadratic Rust macro regex with a linear scan.
Three-way sync: report page add/add and delete-vs-modify as conflicts
instead of silently overwriting or resurrecting; canonical comparison so
key order is not a change; the sync action withholds output and fails on
conflicts unless --force. Story publishing escapes <, >, & and U+2028/9
inside the embedded JSON.
Views: drop parentId of unselected containers, re-layout instead of
manual geometry, validate before serialising; flatten() merges identical
nodes repeated across pages so C4 output works with every analysis
action. Dark theme edge labels get a background; tube-map corridors sit
above the stations; C4 containers keep the swimlane style and orphan
relationships land on the matching page; router keeps container header
bands as obstacles; sequence self-messages loop on one side.
Docs: SKILL.md lists all 23 CLI actions and how each capability family
is invoked, task wrappers for query/test/what-if/doctor, capability
tables and --page scope corrected, maintenance snippet uses the real
synchronous action signature, duplicated rule bullets moved to the rule
references, coverage matrix wording made verifiable.

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
2026-09-06 17:01:50 +03:00
co-authored by Claude Code
parent 7610235781
commit 6584df0666
32 changed files with 801 additions and 209 deletions
+45 -3
View File
@@ -20,8 +20,8 @@ tasks:
run:
desc: |
Run any drawio-tools action against a .drawio file.
Usage: task run -- --file="/path/to/diagram.drawio" --action=<action> [--page <index>]
Run any drawio-tools action against a .drawio file or Diagram IR model (see `task cli:run` for the action list).
Usage: task run -- --file="/path/to/diagram.drawio" --action=<action> [--page <index>] [--output <path>]
cmds:
- task: cli:run
vars:
@@ -62,14 +62,56 @@ tasks:
CLI_ARGS: "--action=views {{ .CLI_ARGS }}"
silent: true
query:
desc: |
Filter a Diagram IR v2 model by kind/property, or find a directed path.
Usage: task query -- --file="model.yaml" --kind=service | --property=k=v | --from=<id> --to=<id>
cmds:
- task: cli:run
vars:
CLI_ARGS: "--action=query {{ .CLI_ARGS }}"
silent: true
test:
desc: |
Run built-in architecture policy rules against a Diagram IR v2 model.
Usage: task test -- --file="model.yaml" [--spec="policy-rules.yaml"] [--strict]
cmds:
- task: cli:run
vars:
CLI_ARGS: "--action=test {{ .CLI_ARGS }}"
silent: true
what-if:
desc: |
Calculate outgoing failure impact from one node; requires --file and --fail.
Usage: task what-if -- --file="model.yaml" --fail=<node-id>
cmds:
- task: cli:run
vars:
CLI_ARGS: "--action=what-if {{ .CLI_ARGS }}"
silent: true
sync:
desc: Three-way stable-ID synchronization; requires --base, --file, and --spec.
desc: |
Three-way stable-ID synchronization; requires --base, --file, and --spec.
Usage: task sync -- --base="before.yaml" --file="edited.yaml" --spec="after.yaml" --output="synced.drawio" [--prune] [--dry-run]
cmds:
- task: cli:run
vars:
CLI_ARGS: "--action=sync {{ .CLI_ARGS }}"
silent: true
doctor:
desc: |
Report optional local backend availability without launching anything; no --file needed.
Usage: task doctor
cmds:
- task: cli:run
vars:
CLI_ARGS: "--action=doctor {{ .CLI_ARGS }}"
silent: true
story:
desc: Publish a self-contained accessible offline architecture story.
cmds: