Plan graph --html and --output renderer work (3.4.5)#312
Conversation
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.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Reviewer's GuideAdds a detailed execution plan document for extending the File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
`.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.
Summary
This branch carries the pre-implementation ExecPlan for roadmap item
3.4.5: extendingnetsuke graphwith an--htmlrenderer and a shared--output <FILE>flag. No code lands in this branch — the plan must beapproved before implementation begins.
The plan introduces a
GraphViewdomain projection consumed by aGraphRendererport, with separate adapters for DOT and HTML output, andmigrates the no-flag DOT path away from
ninja -t graphto an in-processrenderer 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, butthe 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
for the user-visible contract and the twelve observable-success
criteria.
and Tolerances
for the hard invariants and the explicit escalation triggers — in
particular the decision to remove
ninja -t graphfrom the dispatch,and the binary-size and HTML-artefact ceilings.
for the captured choices from the planning consultation, including
the rationale for rendering from the in-memory IR rather than the
Ninja round-trip.
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).
section names the exact types and signatures expected at each stage
boundary; this is the contract a future implementing agent commits to.
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 testchange is in scope on this branch. Those gates will runagainst the implementation pull request.
Notes
explicit user approval of the plan.
pure-Rust path fails the documented acceptance gate. The vendored
viz-js fallback is described but not adopted by default.
ninja -t graphdispatch for thegraphsubcommand 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:
--outputsupport to thegraphsubcommand.