Skip to content

Enhance Azure Resource Visualizer with Draw.io#2045

Open
Ba4bes wants to merge 5 commits intomicrosoft:mainfrom
Ba4bes:resource-visualizer-clean
Open

Enhance Azure Resource Visualizer with Draw.io#2045
Ba4bes wants to merge 5 commits intomicrosoft:mainfrom
Ba4bes:resource-visualizer-clean

Conversation

@Ba4bes
Copy link
Copy Markdown

@Ba4bes Ba4bes commented Apr 24, 2026

Replaces #1893 after I broke that PR with a few git-adventures.

Adds draw.io functionality to the azure resource visualizer. Split from #1834. Replaces #1893 (closed after a git history rewrite removed an accidentally committed file with personal information).

Description

Checklist

  • Tests pass locally (cd tests && npm test)
  • If modifying skill descriptions: verified routing correctness with integration tests (npm run test:skills:integration -- <skill>)
  • If modifying skill USE FOR / DO NOT USE FOR / PREFER OVER clauses: confirmed no routing regressions for competing skills
  • Version bumped in skill frontmatter (if skill files changed)

Related Issues

Adds draw.io functionality to the azure resource visualizer. Split from microsoft#1834. Replaces microsoft#1893 (closed after a git history rewrite removed an accidentally committed file with personal information).
Copilot AI review requested due to automatic review settings April 24, 2026 20:56
@Ba4bes Ba4bes requested review from jongio and tmeschter as code owners April 24, 2026 20:56
@Ba4bes
Copy link
Copy Markdown
Author

Ba4bes commented Apr 24, 2026

@tmeschter @jongio Sorry, have to continue here. The old PR is completely unworkable after a small git crisis.
I had worked through all the comments that were open and resolved them, just some comments from Copilot left (who I trust will find something new here as well ;) )

Final comment on the old PR:

I have restructured this Skill.
First I brought back the original skill file. Then I put the focus in skill.md to the shared process of resource discovery. After discovery, the skill decides, based on the original prompt, if it will continue in mermaid or in draw.io. Both procedures are written out and referenced in the skill.md. I tried to keep the mermaid part completely as it was before, only updated the draw.io part. I also added testing for draw.io.

I have not added draw.io as a mandatory MCP server, as people can choose if they want to use this specific functionality or not. I believe it actually works on some level without the MCP server, but with MCP will always be better.

I kept Mermaid as the default whenever a user just asked for a diagram without specifying if it should be a mermaid or draw.io file. I prefer draw.io, but mermaid could be more light weight. I think that is a judgement call that I probably shouldn't be making :)

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Draw.io as an additional output format for the azure-resource-visualizer skill, including new Draw.io-specific workflows/conventions and expanded discovery procedures, plus updated unit/trigger/integration tests to validate the new routing and outputs.

Changes:

  • Extend azure-resource-visualizer skill to support Draw.io output and sketch/description-to-diagram routing.
  • Add reference documentation for relationship discovery, resource filtering, auth gating, Draw.io conventions/layout rules, and stencil mappings.
  • Update unit/trigger/integration tests and snapshots for the new Draw.io triggers and outputs.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/azure-resource-visualizer/unit.test.ts Updates content assertions and adds Draw.io coverage checks.
tests/azure-resource-visualizer/triggers.test.ts Adds Draw.io prompts to the “should trigger” set.
tests/azure-resource-visualizer/integration.test.ts Adds an end-to-end Draw.io invocation + file-generation test.
tests/azure-resource-visualizer/snapshots/triggers.test.ts.snap Updates snapshots for the expanded description/keyword set.
plugin/skills/azure-resource-visualizer/SKILL.md Adds Draw.io support, routing table, and references to new procedures/workflows.
plugin/skills/azure-resource-visualizer/references/sketch-to-diagram-workflow.md New sketch/description → model → Draw.io/Mermaid handoff workflow.
plugin/skills/azure-resource-visualizer/references/procedures/resource-filtering.md New centralized resource filtering rules for diagram-focused inventories.
plugin/skills/azure-resource-visualizer/references/procedures/relationship-discovery.md New detailed probe table/process for discovering hidden relationships.
plugin/skills/azure-resource-visualizer/references/procedures/azure-authentication.md New explicit Azure authentication hard-gate procedure.
plugin/skills/azure-resource-visualizer/references/mermaid-diagram-workflow.md New Mermaid-specific renderer workflow doc.
plugin/skills/azure-resource-visualizer/references/drawio-diagram-workflow.md New Draw.io-specific renderer workflow doc.
plugin/skills/azure-resource-visualizer/references/drawio-diagram-conventions.md New Draw.io XML/styling/edge/layout conventions.
plugin/skills/azure-resource-visualizer/references/layout-rules.md New Draw.io layout rules and anti-pattern guidance.
plugin/skills/azure-resource-visualizer/references/azure-resource-model.md New shared resource-model schema used by workflows.
plugin/skills/azure-resource-visualizer/references/azure-stencil-mapping.json New resource-type → Draw.io stencil mapping and style metadata.

Comment thread plugin/skills/azure-resource-visualizer/SKILL.md Outdated
Comment thread plugin/skills/azure-resource-visualizer/SKILL.md Outdated
Copy link
Copy Markdown
Collaborator

@jongio jongio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean restructuring - shared discovery piped into format-specific renderers makes sense and follows the progressive disclosure pattern well. The Draw.io stencil mapping and relationship discovery probes are the standout additions here; they'll genuinely help both workflows.

The routing keyword concern raised in the existing review comment is worth addressing - bicep and templates now appear in the extracted keyword set (confirmed in the snapshot diff) and can pull this skill into unrelated prompts.

One thing that hasn't been flagged yet: the sketch-to-diagram workflow claims format flexibility in its context paragraph but locks to Draw.io output in Step 5 and the Output section. If someone says "convert this sketch to Mermaid", the routing table sends them to this workflow, which then only produces .drawio. See my inline comment for details.

Minor: SKILL.md is missing a trailing newline.

Comment thread plugin/skills/azure-resource-visualizer/references/sketch-to-diagram-workflow.md Outdated
Ba4bes and others added 2 commits April 25, 2026 14:01
…mentation

Co-authored-by: Copilot <copilot@github.com>
Copy link
Copy Markdown
Collaborator

@jongio jongio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The two new commits address my earlier feedback and the Copilot reviewer's comments. DO NOT USE FOR keywords are generic now (no routing pollution), the conditional wording is clearer, and sketch-to-diagram Step 5 routes to both formats.

One thing the format fix missed: Step 6 still assumes Draw.io output. See inline comment.

@kvenkatrajan - this PR adds Draw.io as an output format for the resource visualizer skill. It lists a Draw.io MCP server as a recommended (not required) prerequisite. Do we want to take a dependency on draw.io in this repo? The Draw.io MCP server and VS Code extension are external tools.

Comment thread plugin/skills/azure-resource-visualizer/references/sketch-to-diagram-workflow.md Outdated
…ss verification steps

Co-authored-by: Copilot <copilot@github.com>
tmeschter
tmeschter previously approved these changes Apr 27, 2026
@Ba4bes
Copy link
Copy Markdown
Author

Ba4bes commented Apr 29, 2026

@tmeschter @jongio the workflows failed because somewhere in the process I forgot to rebuild the snapshots. I have done so now.

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.

4 participants