Create an interactive before/after architecture diagram for solidifying implementation details after a plan is approved. Generates a draggable SVG-based comparison with component nodes, data flow edges, tooltips, code snippets, and change annotations. Usage - /architecture <TT-XXX> <title>
Creates an interactive before/after architecture comparison diagram from the architecture-compare template. Used after a plan is approved to solidify implementation details — component layouts, data flows, file paths, code snippets, and what changes.
docs/plans/features/architecture-compare-template.html to docs/plans/features/TT-XXX-<slug>-architecture.htmlBEFORE_NODES, BEFORE_EDGES, AFTER_NODES, AFTER_EDGES arrays with component datadocs/plans/features//architecture TT-105 MCP Migration
When this skill is invoked:
TT-105), remaining args form the titledocs/plans/features/<ticket>-<slugified-title>-architecture.htmldocs/plans/features/architecture-compare-template.html as the base template| Property | Required | Description |
|---|---|---|
id | Yes | Unique identifier (used in edges) |
x, y | Yes | Initial position on canvas (user can drag to rearrange) |
layer | Yes | Color group: orchestration, routing, queue, or signal |
label | Yes | Component name displayed on the node |
type | Yes | Subtitle text (e.g., "Async Manager", "EventHandler") |
file | No | Source file path (shown in detail panel) |
desc | Yes | Tooltip description — what this component does |
code | No | Code snippet shown in detail panel (use \n for newlines) |
badge | No | Pill text below label (e.g., "7 channels") |
note | No | Warning/callout text |
change | No | After pane only: new, modified, or removed — highlights changes |
| Property | Required | Description |
|---|---|---|
from | Yes | Source node id |
to | Yes | Target node id |
label | No | Edge label text |
style | No | new (green, for After pane changes) or callback (dashed) |
Replace the four data arrays in the template:
BEFORE_NODES — components in the current architectureBEFORE_EDGES — data flow connections in current architectureAFTER_NODES — components after the change (with change annotations)AFTER_EDGES — data flow connections after the changeUpdate identifiers:
<title> tag — TICKET — TITLE: Before / After Architecture<h1> — TICKET TITLEAUTOSAVE_KEY — ticket-arch-compare-autosave (lowercase)LAYOUTS_FILE — TICKET-architecture-compare-layouts.jsonStart the devserver if not running: cd docs/plans/features && python3 docs/architecture-map/_devserver.py <port> &
Return the URL: http://localhost:<port>/<filename>.html
The generated playground includes:
new (green), modified (amber), removed (red)This skill fits into the development workflow as:
/plan-review TT-XXX Title — high-level plan, section-by-section approval/architecture TT-XXX Title — solidify implementation details with visual architectureArrange nodes as a top-down tree, not a circular web. The user expects a clear directional flow:
y values (smallest numbers)y valuesx axis on the same rowTypical spacing: ~170px vertical gap between tiers, ~200px horizontal gap between siblings.
Before pane example (3-tier):
Source: x:150, y:30 (centered)
Process: x:100, y:200 (centered)
Sinks: x:-90/130/360, y:420 (fanned out left-to-right)
After pane with new intermediate tier:
Source: x:310, y:44
Process: x:260, y:206
Middle: x:466, y:372 / x:466, y:511 (new nodes between process and sinks)
Sinks: x:-70/96/288, y:682 (fanned out, pushed down)
Avoid circular layouts where edges loop back up. Every edge should flow downward or horizontally — never upward except for explicit feedback/hydration paths.
| Layer | Color | Use For |
|---|---|---|
orchestration | Blue | Managers, coordinators, databases |
routing | Default | Routers, handlers, middleware |
queue | Purple | Processors, queues, buffers |
signal | Green | Signals, events, sinks |
See existing architecture diagrams for reference:
docs/plans/features/TT-85-architecture-compare.html — Shared InfluxDB processor refactordocs/plans/features/TT-64-architecture-compare.html — Reconnect signal refactordocs/plans/features/TT-60-architecture-compare.html — Order events scoping