{
  "id": 22915990,
  "title": "Stop Shipping Mermaid Slop: Building a Zero-LLM Editorial SVG Compiler & Architecture Drift Gate in TypeScript",
  "url": "https://urgent.news/2026/12/01/stop-shipping-mermaid-slop-building-a-zero-llm-editorial-svg-compiler",
  "topic": "ai",
  "section": "AI",
  "published": "2026-12-01T06:47:38.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/md1qamar/stop-shipping-mermaid-slop-building-a-zero-llm-editorial-svg-compiler-architecture-drift-gate-in-23g"
  },
  "original_language": null,
  "account": "Archink is an open-source TypeScript CLI and library designed to compile architecture diagrams as verifiable build artifacts, ensuring they align with the real codebase. It addresses common issues with diagrams generated by hand or through AI prompts by providing a deterministic, zero-LLM approach.\n\nThe tool extracts module dependency graphs from various programming languages, including TypeScript, JavaScript, Python, and Go, using the official TypeScript compiler parser to avoid issues with different file extensions and aliases. It detects circular dependencies using Tarjan's Strongly Connected Components algorithm and solves Sugiyama layered DAG layouts for consistent diagram representation.\n\nKey features of Archink include:\n1. Extraction of real module dependency graphs from ASTs of multiple languages.\n2. Detection of circular dependencies using Tarjan's SCC algorithm.\n3. Deterministic Sugiyama layered DAG layouts for sequence and matrix diagrams.\n4. Rendering zero-shadow vector SVGs in four editorial themes and offline interactive HTML viewers.\n5. Failing CI with SARIF 2.1.0 or Markdown reports when diagrams drift from real code or violate layer rules.\n\nArchink's architecture consists of nine single-responsibility TypeScript modules under the src/ folder. The key stages include extracting and parsing the codebase, analyzing topology, solving coordinates, and rendering or gating the diagrams. This ensures that the diagrams are not only aesthetically pleasing but also grounded in the actual code structure, avoiding visual slop and hallucinated elements often found in manually generated or AI-generated diagrams.",
  "summary": "Every developer has seen the same lifecycle play out in a growing repository: Someone writes a clean Mermaid diagram in README.md on day one. Three months later, half the files have been renamed, two modules silently formed a circular dependency, and a parser started importing directly from the CLI entrypoint. Meanwhile, AI coding agents asked to \"document the architecture\" either hallucinate…",
  "summary_source": "publisher",
  "key_points": [
    "Archink compiles architecture diagrams as verifiable build artifacts",
    "Extracts module dependency graphs from ASTs of multiple languages",
    "Fails CI with SARIF 2.1.0 or Markdown reports when diagrams drift"
  ],
  "editors_take": "By using deterministic code analysis instead of AI, developers can prevent diagram drift and ensure their architecture visualizations always match the actual codebase.",
  "opinion": false,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "machine_translated": false,
  "ai_generated": true,
  "disclaimer": "Accounts, briefs, key points, the editor’s take and translations are written by software from other outlets’ reporting and may contain errors. A summary whose summary_source is \"publisher\" is the outlet’s own feed text. Always check the linked original."
}