Skip to content

visualizer: integration hooks (README diagram, PR plan-preview diagram, docs) #307

Description

@joshua-temple

Problem

The visualizer is most useful where people already look: a repo's README and a pull request.
Wire the rendered diagram into both, and document the feature.

Scope

  1. README diagram - a committable artifact. The user runs cascade graph and commits the
    Mermaid into their README; GitHub renders it natively. For v1 the baseline is a stable
    --format mermaid stdout that the user pastes/commits. An in-place marker-block update mode
    (rewriting a fenced ```mermaid block between sentinel comments so the diagram can be
    refreshed) is a follow-up, kept opt-in and non-destructive.

  2. PR plan-preview diagram (optional) - emit a diagram of what the pending change will do
    into the read-only PR plan-preview lane. The preview surface already exists: PRPreviewConfig
    (feat: optional PR plan-preview workflow #40) and the generated cascade-pr-preview.yaml via NewPRPreviewGenerator
    (internal/generate/command.go). The default surface is the GitHub job step-summary so a
    reviewer sees the change's shape (the exact surface is left flexible: step-summary, PR
    comment, or job-summary artifact). Gate it behind the existing pr-preview opt-in so manifests
    that do not use the preview lane are unaffected.

  3. Docs page - a page under docs/src/content/docs/ documenting cascade graph: the
    granularities, the --format/--theme flags, the README workflow, and the PR-preview
    integration. Include a rendered Mermaid example.

This may be split (README + docs as one issue, PR-preview as a follow-up) since the PR-preview
hook depends on touching the generator and warrants its own e2e.

Tests (TDD)

  • README marker-block update (if implemented): given a README with the sentinel block, the
    command rewrites only that block, idempotently; a README without the block is untouched.
  • PR-preview integration: a manifest with pr_preview enabled produces a preview workflow
    whose output includes the diagram; a manifest without it is unchanged. Cover with an e2e/
    scenario (generator surface).
  • Docs page builds (the docs site's existing check).

Acceptance

  • A user can commit a cascade graph Mermaid diagram into a README and refresh it.
  • With pr-preview enabled, the PR preview includes a pipeline diagram of the change.
  • The docs page documents the command and renders an example.

Dependencies

#302, #303.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationdxDeveloper experienceenhancementNew feature or requestvisualizerPipeline visualizer feature

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions