zudo-diagram-gen

Type to search...

to open search from anywhere

GitHub repository

Local-agent quickstart — your first diagram

Set up the available local capability, ask an agent, and review a saved drawing.

Use a coding agent to create your first diagram in a local workspace, then review real drawings at their intended size. Expect saved SVG candidates with stable IDs and a local review URL. The engine and initializer are available as locally packed archives; registry publication is not established. The engine includes a core diagram-gen skill file. Your agent must explicitly read it or discover it through a supported project-local skill setup. The initializer does not install a personal skill.

Set up once

Follow Local archive setup to create a new installed review workspace and copy the packaged core skill into that workspace for the prompt below. If you skip the copy, tell your agent to read node_modules/@takazudo/zudo-diagram-gen/skills/diagram-gen/SKILL.md and its relative references instead. Use Node.js 22–24 and pnpm 10.30.3. Keep the printed archive path available for reinstalls.

In the new workspace, ask your coding agent:

Read .claude/skills/diagram-gen/SKILL.md and its relative references.
Use this existing session; resume it rather than creating over it.
Explain this public review workflow at 360 × 200 CSS pixels:
an agent saves SVG candidates, a person inspects them and chooses a direction,
then transfers Keep/Change feedback to refine the saved drawing.
Show up to three useful directions. Keep these facts and labels fixed.
Ground brief.md, validate the files, capture and actually inspect the images
when browser support is available. Present the saved IDs and the review URL.
This practice request does not approve a project-wide style.

This explicit file-reading request works without assuming automatic slash-command discovery. If your agent host verifies discovery, /diagram-gen --session . can express the same continuation. Slash invocations are agent instructions, not shell commands. Without a skill-capable agent, use the manual session tutorial.

The agent authors SVGs; the CLI creates and inspects content but calls no model. The brief records Intent, Must show, May drop, References, Lock, Target, and Language and fonts. session.json.target is authoritative. Request one diagram directly when you need one; a bounded exploration defaults to at most four candidates. See Generation and refinement for source grounding and ownership.

Inspect the actual results

Run in the installed workspace:

pnpm check
pnpm dev

Open the URL printed by zfb. Use Inspect and Compare, then judge labels, meaning, contrast and fit in Placement preview at the actual CSS dimensions. Light/dark artwork and the backdrop are separate controls. Missing dark artwork is unavailable, not synthesized.

A successful check establishes structural validity. A successful capture establishes that a PNG and provenance were saved. The agent must open the actual image and assess it; neither action establishes factual accuracy or user approval. Optional capture setup is explicit and may require browser and OS dependencies.

Shortlist, choose and transfer

Shortlist retains possibilities. Choose direction names the drawing baseline for this session. Write Keep, Change and Next action, then use Copy feedback or download Review JSON. Supply that text or actual downloaded file to the agent explicitly. Browser-local notes do not write source files or automatically resume a conversation.

For example:

Use the saved candidate I named in this review.
Keep the labels, reading order and palette. Increase connector contrast.
Create a new later-round candidate from its saved SVG; preserve the original.
Read the attached review JSON and report stale evidence before using it.

The agent can run resume . --review <downloaded-file> --json; the file must be the structured JSON record, not copied prose. Stale fingerprints require actual inspection and renewed review. See Reviewing candidates.

Refine the saved drawing and export

The agent reads the named saved SVG, current fingerprint and feedback, then creates a new ID in a later round with that parent. The saved-baseline example copies exact bytes before editing. Validate, capture and inspect changes at the same placement. Keep earlier rounds available.

Use the actual candidate ID shown by your session in place of r02-c01 below:

pnpm exec zudo-diagram-gen export r02-c01 --session . --theme light --out exports/selected.svg --json
pnpm exec zudo-diagram-gen export-html . --out exports/review.html --json

SVG export copies the exact saved asset; it does not redraw using a newer tone kit. The offline HTML contains a content snapshot; download review JSON separately to transfer decisions. Integrating a result into a product is a separate requested action.

Choosing one drawing, switching tones or capturing an image never locks a project style. For explicit reuse across several sessions, use immutable style lock and adoption.

Next: refine and export or choose another task in Guides.