drawio-ai-kit  by sparklabx

AI agent framework for precise AWS architecture diagrams

Created 3 weeks ago

New!

293 stars

Top 90.0% on SourcePulse

GitHubView on GitHub
Project Summary

This framework enables AI agents to generate structurally precise and aesthetically standardized draw.io diagrams, particularly for AWS architectures. It addresses common AI-generated diagram flaws, such as invalid stencil IDs, by providing an orchestration and validation layer, benefiting engineers and power users by automating accurate and consistent diagram creation.

How It Works

The kit employs three core components: a Declarative Catalog mapping draw.io stencil IDs to taxonomies and colors, codified Design Principles for architectural and layout rules, and a Structural Validator that audits diagram XML for stencil validity and adherence to principles. Diagrams are defined declaratively, with a layout engine programmatically computing spatial coordinates, and AI agents can iterate through a render-analyze-rectify loop for self-correction. This approach ensures structural integrity and aesthetic standardization, mitigating AI hallucinations.

Quick Start & Requirements

Installation is performed via a local-only bash script: bash install.sh. The installer detects and registers supported AI agent runtimes (e.g., Claude Code, Cursor, Gemini CLI) and symlinks the necessary skill. Key requirements include Node.js (18+ recommended) for the orchestration layer and Python 3.11 for the data ingestion and compilation pipeline. The official @modelcontextprotocol/sdk is a runtime dependency. The draw.io desktop CLI is optionally needed for PNG rendering and vision self-checking.

Highlighted Details

  • Features a comprehensive catalog of 1256 icons, including 983 AWS icons and 273 from 8 OSS packs, searchable via keywords.
  • The layout engine programmatically computes spatial coordinates based on declarative topology (e.g., pipeline, network, hybrid), with auto-sizing frames and auto-spacing rows/columns.
  • Includes an extensive examples/ directory showcasing common AWS architectures generated entirely by the layout engine without manual coordinates.
  • The Structural Validator performs static analysis on diagram XML, checking for unknown stencils, dangling edges, incorrect nesting, geometry issues, and aesthetic compliance.

Maintenance & Community

No specific details regarding maintainers, community channels (like Discord/Slack), or sponsorships were found in the provided README content.

Licensing & Compatibility

The core code is licensed under MIT. However, bundled icons and logos, including AWS Architecture Icons and third-party project logos, are trademarks of their respective owners and are not covered by the MIT license. Official AWS Architecture Icons have separate usage terms that must be reviewed before redistribution.

Limitations & Caveats

Generating PNG outputs and performing vision self-checks requires the draw.io desktop CLI. Some icon pack building processes may necessitate macOS qlmanage. The usage terms for official AWS Architecture Icons must be carefully reviewed, especially for public redistribution.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
26
Issues (30d)
24
Star History
295 stars in the last 24 days

Explore Similar Projects

Feedback? Help us improve.