Using the workflow
Everything runs through one playbook: WORKFLOW.md — parallel,
self-converging builders gated by a deterministic pixel diff, with exactly two
user sittings per issue.
Entry point
- Run
/aqua-cli-issue <N>— the installed slash command fetches issue<N>(body + comments), parses the intake fields, and runsWORKFLOW.md. - Issue routing is by the fields in the issue body:
| Fields | Scope |
|---|---|
COMPONENT_NAME:… / COMPONENT_CATEGORY:… | one component triple (.tsx / .scss / .stories.tsx) — the degenerate case: one builder, no page assembly |
PAGE_PATH:… / PAGE_TITLE:…, or the page label | a full URL under src/pages/ (page shell + N sections) |
New issues are authored with /aqua-cli-create-issue.
The four phases
- Intake (serial, one user gate) — shallow Figma recon, section
inventory, reuse decisions against the component catalog, per-unit
reference PNG export (
figma-refs/<N>/<unit>/figma-{pc,sp}.png). - Build (parallel) — one
section-builderagent per unit. Each builder carries only the ≤3KBdevelopment-docs/build-card.md(neverRULES.mdor the workflow doc) and self-converges: build → render in Storybook →scripts/converge.mjs(SSIM diff vs the Figma reference) → fix flagged regions → repeat, hard-capped at 3 iterations. Shared-component edits serialize on the orchestrator. - Assemble (serial) — compose the page, wire link URLs from the
project's link-URL source of truth, one
scripts/page-parity.mjspass, arules-checkeragent fixes mechanical convention violations, thenscripts/evidence-pack.mjsbuildsfigma-refs/<N>/evidence.html. - Review (one user sitting) — the evidence pack shows Figma vs render side by side per section with diff scores; findings dispatch fix agents; then commit, PR, and the hand-off report.
Key mechanics
- No
spec.html, no per-unit approval. The Figma node data (REST API) plus the reference PNG is the spec; convergence is gated byscripts/visual-diff.py(windowed SSIM + per-band localization), not by a human sitting. - Unconverged ≠ blocked. A section that doesn't reach the threshold after 3 iterations is surfaced in the evidence pack with its heatmap — a review item, never an automatic blocker.
- Threshold calibration.
verification.convergeThresholdincpdk.config.json(default 0.90). Calibrate against 2–3 known-good units before trusting the loop; re-calibrate when fonts or the rendering pipeline change. - The build card.
/aqua-cli-initdistillsRULES.mdintodevelopment-docs/build-card.md(≤3KB): tokens, the blessed SCSS pattern, file layout, and the handful of rules whose violation forces a rewrite. Re-run/aqua-cli-initafter editingRULES.md. - Figma is a moving source of truth — reference PNGs are exported at intake; if the design changes mid-issue, re-export and re-converge.
Pace targets
A 4–6-section page targets ≤30 min agent wall-clock and exactly 2 user sittings. Targets are signals, not gates — never thin a check to make a budget.