$ show yizhiyanhua-ai/fireworks-tech-graph
This repository is a production-grade Agent Skill and CLI tool for generating geometry-safe technical diagrams from structured JSON or natural language descriptions. It produces SVG, PNG, animated GIF, and offline interactive HTML outputs across 12 visual styles (11 generator-driven, 1 AI-authored) and supports 14 UML diagram types with domain-specific semantic contracts for C4, cloud, event, and ops profiles. The system features a deterministic orthogonal routing engine, composition quality gates, a validated SVG-to-GIF motion pipeline with per-style animation contracts, and a strict validation framework. It is distributed as an npm package and a Claude Code skill, with a nested mirror for `npx skills add` installation. The codebase is well-tested with extensive regression and pixel-level gates, though it suffers from some duplication between the root and skill mirror directories and hardcoded contract constants.
The LLM identified 6 files worth highlighting for reuse:
Pure Python geometry library providing segment interaction, route crossing/overlap detection, text width estimation, and bridge path generation. Self-contained with no external dependencies, it is reusable for any SVG or path-based geometry project requiring deterministic spatial operations.
Configurable quality profiles (standard/showcase) with deterministic scoring for diagram composition constraints such as bend budgets, node gaps, route stretch, and bridge limits. Reusable as a quality gate for any diagram generation pipeline.
Strict SVG sanitizer that allows only safe elements and attributes, rejecting external URLs, scripts, event handlers, and DTDs. Reusable for securely embedding SVGs in HTML pages or interactive viewers.
Atomic PNG export with dimension readback via PNG header, renderer fallback (cairosvg → rsvg-convert), and bounded dimension enforcement. The atomic write pattern and fallback mechanism are reusable for any image generation pipeline.
Style resolution and domain-specific validation for C4, cloud, event, and ops diagram profiles. Fail-closed validators with machine-readable error codes enrich input data with semantic metadata. Reusable for any diagram tool requiring domain-specific enrichment and validation.
Schema v1 normalization layer with typed NodeIR/EdgeIR, validation of IDs, waypoints, and finite values. Provides a clean intermediate representation for diagram input that can be reused across different diagram generators.