Skip to content

Plan graph --html and --output renderer work (3.4.5)#312

Draft
leynos wants to merge 2 commits into
mainfrom
3-4-5-extend-graph-subcommand-with-an-html-renderer
Draft

Plan graph --html and --output renderer work (3.4.5)#312
leynos wants to merge 2 commits into
mainfrom
3-4-5-extend-graph-subcommand-with-an-html-renderer

Conversation

@leynos
Copy link
Copy Markdown
Owner

@leynos leynos commented May 22, 2026

Summary

This branch carries the pre-implementation ExecPlan for roadmap item
3.4.5: extending netsuke graph with an --html renderer and a shared
--output <FILE> flag. No code lands in this branch — the plan must be
approved before implementation begins.

The plan introduces a GraphView domain projection consumed by a
GraphRenderer port, with separate adapters for DOT and HTML output, and
migrates the no-flag DOT path away from ninja -t graph to an in-process
renderer so a single pipeline owns ordering and escaping. The HTML
artefact is a single self-contained file with server-rendered SVG plus a
text outline, so it remains usable with JavaScript disabled. Renderer
technology selection happens at a Stage C prototyping gate: a pure-Rust
graph layout crate is the preferred path, with a vendored viz-js +
WebAssembly bundle documented as the fallback if the license,
determinism, binary-size, or artefact-size criteria fail. Structured
graph inspection (--json) is deferred to a follow-up roadmap item, but
the projection shape is designed to accommodate it.

Roadmap task: (3.4.5).

ExecPlan:
docs/execplans/3-4-5-extend-graph-subcommand-with-an-html-renderer.md.

Review walkthrough

  • Start with the Purpose / big picture section
    for the user-visible contract and the twelve observable-success
    criteria.
  • Then review Constraints
    and Tolerances
    for the hard invariants and the explicit escalation triggers — in
    particular the decision to remove ninja -t graph from the dispatch,
    and the binary-size and HTML-artefact ceilings.
  • Read Decision log
    for the captured choices from the planning consultation, including
    the rationale for rendering from the in-memory IR rather than the
    Ninja round-trip.
  • Step through the Plan of work
    stages: A (domain projection), B (CLI surface and DOT migration), C
    (HTML renderer behind a go/no-go gate), D (documentation, BDD, and
    accessibility polish).
  • The Interfaces and dependencies
    section names the exact types and signatures expected at each stage
    boundary; this is the contract a future implementing agent commits to.
  • The Referenced documents and skills
    block signposts every document and skill the implementing agent
    should load.

Validation

  • make markdownlint: 0 errors (55 files linted).

The plan does not introduce code, so no make check-fmt, make lint,
or make test change is in scope on this branch. Those gates will run
against the implementation pull request.

Notes

  • This pull request is pre-implementation. Future work is gated on
    explicit user approval of the plan.
  • Renderer technology selection deliberately escalates at Stage C if the
    pure-Rust path fails the documented acceptance gate. The vendored
    viz-js fallback is described but not adopted by default.
  • The plan removes the existing ninja -t graph dispatch for the
    graph subcommand and rewrites the associated tool-subcommand tests.
    This is allowed by ADR-003 (no compatibility aliases pre-0.1.0) and is
    recorded in the plan's Decision log.

References

Summary by Sourcery

Documentation:

  • Add a detailed ExecPlan describing the staged implementation, constraints, risks, and acceptance criteria for adding an HTML renderer and --output support to the graph subcommand.

Draft an ExecPlan for roadmap item 3.4.5 covering the new `--html` and
`--output` flags on `netsuke graph`. The plan introduces a `GraphView`
domain projection (sorted, deterministic) consumed by a `GraphRenderer`
port, with separate adapters for DOT and HTML output. The HTML adapter
produces a single self-contained file with server-rendered SVG plus a
text outline so the artefact remains usable without JavaScript.

The plan migrates the no-flag DOT path away from `ninja -t graph` to the
same in-process renderer so a single pipeline owns ordering and
escaping. Tests previously asserting Ninja-tool dispatch for `graph`
are updated rather than retained.

Renderer technology selection happens at a Stage C prototyping gate: a
pure-Rust layout crate is the preferred path, with a vendored viz-js
WebAssembly bundle documented as the fallback if license, determinism,
binary-size, or output-size criteria fail.

Structured graph inspection (`--json`) is deferred to a follow-up
roadmap item but the projection shape is designed to accommodate it.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 22, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 0576ed3b-c962-4309-9a82-28cb04d9cfa4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 3-4-5-extend-graph-subcommand-with-an-html-renderer

Comment @coderabbitai help to get the list of available commands and usage tips.

@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented May 22, 2026

Reviewer's Guide

Adds a detailed execution plan document for extending the netsuke graph subcommand with an --html renderer and shared --output flag, defining architecture, constraints, staged implementation steps, and testing/documentation requirements but no code changes yet.

File-Level Changes

Change Details Files
Introduce a comprehensive ExecPlan markdown document describing how to extend the graph subcommand with HTML rendering and an --output flag, migrate DOT generation in-process, and structure the work into staged milestones with constraints, risks, and validation steps.
  • Document user-facing goals and observable success criteria for the new graph behaviours, including DOT and HTML outputs and --output semantics.
  • Define architectural approach with a GraphView projection and GraphRenderer port, plus DOT and HTML adapters, and removal of ninja -t graph from the graph path.
  • Specify hard constraints, tolerances, and risks around determinism, binary and artefact size, licensing, localization, and configuration layering.
  • Lay out a four-stage plan (projection, CLI + DOT, HTML renderer with go/no-go gate, documentation/BDD/polish) including concrete steps and acceptance criteria for each stage.
  • Detail expected interfaces and type signatures for new modules (graph_view, renderers, CLI args, file I/O helpers) and enumerate required tests, docs updates, and external references/skills.
docs/execplans/3-4-5-extend-graph-subcommand-with-an-html-renderer.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

codescene-delta-analysis[bot]

This comment was marked as outdated.

`.claude/` holds local session state written by the Claude Code / lody
agent harness (for example `scheduled_tasks.lock`, which records the
session ID, process ID, and a wakeup timestamp). The contents are
specific to the developer running the harness and have no place in the
repository.

Ignore the directory so that contributors using the agent harness do not
accidentally stage its lock files alongside real changes, and so that
the harness's "uncommitted changes" check stops flagging it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant