skills/dot-as-analysis/SKILL.md
Use when analyzing a system to surface hidden issues — draw what you believe exists, then reconcile against what actually exists
npx skillsauth add microsoft/amplifier-bundle-dot-graph dot-as-analysisInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
DOT diagrams are not just documentation — they are analysis instruments. Drawing a system forces you to make structural claims. Those claims can be verified, and the gaps between belief and reality reveal bugs, missing paths, and hidden coupling.
Core principle: Completeness pressure is the mechanism. You cannot leave a box disconnected without asking why. You cannot draw a flow without tracing where it actually goes. The act of drawing forces reconciliation.
A 4-phase process for using diagrams to surface system truth:
Write down what you believe the system does. List the components, the flows, the states. Do not look at the code yet. This captures your current mental model.
Draw your belief as a DOT diagram. Use the correct shape vocabulary (services as boxes, data stores as cylinders, decisions as diamonds). Every node must connect to something — floating nodes are a forcing function.
Read the actual code, configs, and logs. For each element in your diagram, verify it exists and behaves as drawn. Fill in the findings table:
| Element | Believed | Actual | Status | Issue | |---------|----------|--------|--------|-------| | Auth Service | validates JWT | delegates to external | WRONG | undocumented dependency | | Retry logic | 3 attempts | no retry | MISSING | silent data loss possible | | DB connection | pooled | new conn per request | WRONG | performance risk | | Event queue | async | synchronous call | WRONG | blocking main thread | | Cache layer | present | not implemented | MISSING | latency assumption invalid | | Error path | logged | swallowed | WRONG | debugging blind spot |
Update the diagram to reflect reality. The delta between Phase 2 and Phase 4 is your finding report. Each discrepancy is a candidate bug, design debt, or documentation gap.
When reconciling, these thoughts will arise. Resist them:
| Rationalization | Correction | |-----------------|------------| | "That path probably exists, I'll add it anyway" | Only draw what you can verify. Unverified paths are hypotheses, not facts. | | "The diagram is close enough" | Close enough hides the discrepancy. Draw the delta explicitly. | | "It works in practice so the diagram doesn't matter" | If it works differently than drawn, the diagram is wrong. Fix the diagram or document the reason. | | "That component is internal, I don't need to show it" | Hidden internals are where bugs live. Show it. | | "The error path is obvious, I'll skip it" | Error paths are where the interesting failures happen. Draw them explicitly. | | "That's just infrastructure, not worth diagramming" | Infrastructure failures are system failures. Include it. | | "I'll add the legend later" | Legends are added before sharing, not after. A diagram without a legend is ambiguous. |
Scenario: A developer believed a payment service retried failed transactions. They drew the believed flow:
digraph believed_payment_flow {
label="Payment Flow (Believed)"
labelloc=t
rankdir=LR
node [shape=box style="rounded,filled" fillcolor="#E8F0FE" fontname="Helvetica"]
Request [label="Payment\nRequest"]
Validate [label="Validate"]
Charge [label="Charge\nGateway"]
Retry [label="Retry\n(3 attempts)" fillcolor="#FFF9C4"]
Record [label="Record\nTransaction"]
Done [label="Done" shape=ellipse fillcolor="#C8E6C9"]
Failed [label="Failed" shape=ellipse fillcolor="#FFCDD2"]
Request -> Validate -> Charge
Charge -> Record [label="success"]
Charge -> Retry [label="failure" color="#E57373"]
Retry -> Charge [label="attempt again" style=dashed]
Retry -> Failed [label="exhausted"]
Record -> Done
}
After reconciliation: The retry node did not exist. Charge failures went directly to a log entry and returned an error to the caller. The caller had no retry either. The discrepancy revealed that a production outage during a transient gateway failure had silently dropped transactions.
Outcome: The diagram delta — one missing retry node and two missing edges — became the bug report. The fix was targeted because the analysis was precise.
development
Use when you need true understanding of a complex system — not a quick answer. Parallax Discovery is a multi-agent, multi-pass investigation methodology that combines three perspectives (code tracing, behavior observation, integration mapping) to produce verified, evidence-backed findings.
development
Use when writing or reading DOT/Graphviz code and needing quick syntax reference — node declarations, edge syntax, attributes, subgraphs, HTML labels, and common gotchas
testing
Use when enforcing quality standards on DOT diagrams — checking completeness, structure, and visual clarity before sharing or committing
tools
Use when you need copy-paste DOT templates for common diagram types — start from a working pattern rather than blank canvas