Skip to content

[P1] Add dry-run/validate-only mode to renderers #9

Description

@tt-a1i

Problem

Currently the renderer has two outcomes: validation passes and HTML is generated, or validation fails with errors. There is no way to inspect the computed layout without generating output.

For agents iterating on a diagram, being able to "preview" the layout would dramatically reduce trial-and-error.

Suggested Improvement

Add a --dry-run or --validate flag:

node renderers/architecture/render-architecture.mjs input.json --dry-run

Output should include:

  • All computed component coordinates (id, x, y, width, height)
  • All computed label positions
  • All boundary rects
  • All connection paths
  • Validation results (pass/fail)

This lets the agent inspect the layout numerically before committing to a render — catching issues like "component X is too far right" without a full render cycle.

Acceptance Criteria

  • --dry-run exits 0 on validation pass, non-zero on failure.
  • Output is machine-readable (JSON or structured text).
  • No HTML file is generated.
  • Works for all 5 diagram types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions