diagram-quality

diagram-quality is a cursor rule for Cursor from jterratsdev/ableton-live-mcp. It costs 1,177 tokens per session, scanned A, original, MIT.

A set of rules for producing accurate, readable diagrams, including diagrams copied from a reference image.

In plain words
What is it for?
It helps classify diagram work, inventory visible elements, reflow layouts, compare rendered output with references, and perform visual quality checks.
Why use it?
It reduces layout errors, missing visual details, and diagrams that look structurally similar but do not match the intended result.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit It helps classify diagram work, inventory visible elements, reflow layouts, compare rendered…

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/jterratsdev/ableton-live-mcp/diagram-quality
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/jterratsdev/ableton-live-mcp

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for diagram-quality

README.md
[![agentmods](https://agentmods.dev/badge/rules/jterratsdev/ableton-live-mcp/diagram-quality.svg)](https://agentmods.dev/rules/jterratsdev/ableton-live-mcp/diagram-quality)
Your own site
<a href="https://agentmods.dev/rules/jterratsdev/ableton-live-mcp/diagram-quality"><img src="https://agentmods.dev/badge/rules/jterratsdev/ableton-live-mcp/diagram-quality.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,177 This file is loaded in full into every session.
When invoked 1,177 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01177 $0.01177
Opus 5 $0.00589 $0.00589
Sonnet 5 $0.00235 $0.00235
Haiku 4.5 $0.00118 $0.00118

Measured 5d ago against content hash 2ca1ebef0dc5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

diagram-quality scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

rules/diagram-quality.mdc · 38 lines

How it starts

The opening of the file, as written. The whole thing — 38 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Diagram Quality

  • Classify diagram work before drawing: semantic, inspired-by-reference, or recreation.
  • A recreation must be reviewed as pixel-perfect against its source reference. Do not treat structural similarity as acceptance.
  • For recreation, first inventory every visible source element: containers, labels, icons, connectors, arrowheads, line styles, colors, borders, spacing, rotations, z-order, and page/canvas bounds.
  • For recreation, compare the rendered output against the source after every iteration and record source-vs-output gaps by element ID or visual region.
  • If a recreation cannot be made pixel-perfect with the chosen target, reclassify it as an approximation, state the reason, and list residual fidelity gaps before handoff.
  • High-fidelity diagram work must include a post-render visual QA pass before handoff.
  • Re-evaluate container width, height, text fit, spacing, and visual balance after real labels are placed.
  • Run global layout reflow after the diagram is populated with real content. Recalculate whether parent containers, swimlanes, grouped boxes, and cards must grow to contain child nodes, subcards, chips, icons, labels, and internal connectors with minimum padding.
  • When a parent container grows, re-evaluate neighboring element positions, connector routes, label lanes, and page/canvas bounds. Do not accept a local fix that creates a new collision elsewhere.
  • Treat text wrapping as a geometry change. After a label, pill, badge, note, callout, or card text wraps, recalculate its rendered bounding box and revalidate connector lanes, parent containment, neighboring labels, and page bounds.
  • Text wrapping or smaller text is not the default fix for overflow. Prefer growing the containing element or repositioning children unless the source reference explicitly uses tighter text.
  • Avoid connector lines crossing over containers, labels, or important symbols whenever practical.
  • Use bend points and explicit connector routing when straight lines make the diagram harder to read.
  • Prefer the simplest readable connector route: straight if line-of-sight is clear, one orthogonal bend when needed, and curves or multi-bend paths only when avoiding a real obstacle or crossing.
  • Validate every connector endpoint visually: the line must start at the source element edge and terminate at the intended target element edge, not float near it or end deep inside the shape.
  • Validate label clearance after rendering; labels must not sit on container borders, connector lines, or arrowheads unless the source explicitly requires that overlap.
  • Validate connector-label lanes after rendering; labels must sit in intentional whitespace or have an explicit readable background. Move nodes, reroute connectors, or move labels when a label touches or visually collides with a connector.
  • Validate element order after rendering; connectors and arrowheads must not be hidden behind the states or containers they connect.
  • Validate connector anchor aesthetics after rendering; choose source and target boundary points that minimize bends, avoid unnecessary travel, and keep arrowheads on clean edge points.
  • Avoid diagonal connectors when an orthogonal route can preserve the same relationship, and use visible line jumps or bridges when crossings are unavoidable.
  • Before accepting connector bends, evaluate whether a small repositioning of the connected elements can reduce bends without harming nearby layout.
  • Keep editable diagram source and rendered output geometrically equivalent; do not make SVG-only corrections that cannot be reproduced from the draw.io XML.
  • Validate annotation target clarity; annotation arrows must visibly land on the element or line they describe, and annotation text must not obscure the target.
  • For diagrams without a source reference, create a diagram contract before drawing and validate the render against that contract before handoff.
  • Source-free diagrams still require a pixel-perfect pass against their own contract before delivery: no text overflow, no clipped containers, no floating or buried connector endpoints, no unintended overlaps, no hidden arrowheads, and no incoherent whitespace.
  • For deterministic SVG pipeline work, treat the typed diagram model as the source of truth. Layout, SVG rendering, validation findings, icon references, and final deliverables must be reproducible from model input without LLM-selected absolute coordinates.
  • Icon references in deterministic diagrams should use semantic purpose plus Iconify id, resolved from a cacheable source. Tests must not require network access to fetch icons.
  • For source-free diagrams, iterate after the first render until container sizes, line routing, connector anchors, label positions, and visual balance are correct. Do not deliver an unreviewed first render.
  • For every post-render correction, re-run the full diagram review rather than checking only the edited area. A diagram passes only when the whole canvas still satisfies container containment, label clearance, connector routing, z-order, and whitespace rules.
  • A regenerated diagram must materially change geometry for the finding it claims to fix. If two versions preserve the same collision, overflow, endpoint gap, or unnecessary route bend, change the layout strategy instead of only re-rendering.
  • Preserve source text orientation when labels are vertical or diagonal; use explicit draw.io rotation values instead of approximating rotated labels with spacing or line breaks.
  • Validate exported artifacts, then inspect the rendered output against the source PDF, screenshot, or design reference at the fidelity level declared for the task.
  • Record residual fidelity gaps explicitly when a diagram is an approximation rather than pixel-perfect.
  • Before final delivery, clean diagram artifacts. Keep only the accepted editable source, accepted render, prompt master or final prompt, and minimum QA evidence needed for traceability. Archive or exclude intermediate previews, failed renders, temporary prompts, and one-off correction notes from the final deliverable.
  • Do not delete iteration evidence that is needed for audit. Move it to workflow evidence, an explicit archive folder, or an ignored output location, then point the final handoff to the accepted artifact paths.

Read the full file on GitHub · 38 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 38 lines · 1,177 tokens per session scan A 2ca1ebef0dc5

Subscribe to this mod's changes

diagram-quality is a cursor rule published in the GitHub repository jterratsdev/ableton-live-mcp (0 stars, last pushed 13d ago), licensed MIT. It adds 1,177 tokens to every session, about $0.0059 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.