Repository navigation
feat(visualization): add a diagram_target preference to visualize - #15201
Conversation
diagram_target (auto, terminal, local-page, excalidraw, tldraw; default auto) picks where /visualization:visualize draws a diagram. It resolves through userConfig, the team docs/conventions/visualization.yaml and the personal override, a later layer winning, and falls back to auto with a one-line notice when the target is unavailable or hosted_canvas forbids it. Registered in the config-cascade contract; new eval case viz-diagram-target-fallback. The README notes that hosted_canvas steers only visualize, and that a permission deny rule on the server's tools blocks it for every tool. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bd316f0070
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
claude-security-review reviewed Security review: PR #15201, incremental since
|
|
claude-review reviewed Code review: incremental pass on
|
…rget Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
No related issue: Workshop 2 follow-up owner decisions
Summary
/visualization:visualizegets adiagram_targetpreference:auto(default, today's behavior:pick by surface),
terminal,local-page,excalidrawortldraw. It flows through the same fourconfig layers as
hosted_canvas. When the chosen target is unavailable, the skill falls back toautoand says so in one line. The README also notes thathosted_canvassteers only this skill,and that a permission deny rule on the server's tools blocks it everywhere.
Fix
plugin.json: newuserConfig.diagram_targetoption (five values, defaultauto), declaredlike
hosted_canvas.schemas/visualization.schema.json: thediagram_targetkey for the team file and personaloverride, so a team file using it validates.
skills/visualize/SKILL.md, Step 3, a new Diagram target paragraph after thehosted_canvasrule:
userConfig, then the teamdocs/conventions/visualization.yaml, then the personal override, a later layer winning, elseauto; it prints one line with the value and its layer;autovalue decides where the diagram goes in place of medium layers 2 and 3; an explicitmedium argument still wins, and the committed-diagram rule, the pull-request diff exception and
the mermaid gate still apply;
(no such server connected, a surface that does not render it, or
hosted_canvasforbids it),the skill uses
autoand says so in one line.skills/visualize/context/decision-matrix.md: one sentence that a canvas target never widens thecanvas rule.
README.md: a Configuration bullet, an Option details paragraph, the regenerated optionsreference (
scripts/sync-plugin-options-docs.py), and thehosted_canvasnote: it steers onlyvisualize; the block across every tool is a permission deny rule such as
mcp__tldraw__*, citingthe MCP rule form (
mcp__<server>__*matchesevery tool of that server) and
Settings precedence (a tool
denied at any level cannot be allowed at another).
docs/contracts/config-cascade/README.md: avisualization(diagram_target) Implementers row(
no-floor, per-key, later layer wins), the key added to the Root rule row, and the semanticstable regenerated (
scripts/sync-config-cascade-semantics.py).viz-diagram-target-fallback. Its scaffold writes a gitignoredvisualization.local.yamlwithdiagram_target: excalidrawand connects no canvas server. Thegraders check the Read of the override, a fallback line naming
diagram_target,excalidrawandauto, and a local diagram fence. The shared fixturerendered-views-repo.shgains adiagram-target-filemode.One deliberate difference from
hosted_canvas: the team file is read from the working tree only.The default-branch second read exists so a branch cannot drop the team's
denyfloor;diagram_targetis a preference with no floor.Verification
validate-cases.py(/evals:validate) onplugins/visualization/evals: no FAIL, and no findingon the new case (its regex and
tool_usedsamples sort correctly). The WARN lines are the existingallowed_toolsgrant notices on other cases.scripts/check-changed-skills.sh origin/main: PASS, 0 errors. The warnings are existing ones plusthe SKILL.md body growing from 413 to 429 lines.
scripts/sync-config-cascade-semantics.py --check: up to date.scripts/check-convention-yaml.sh --check: 15 files validate.scripts/check-changelog-fragments.sh --check: valid.shellcheckon the fixture and the new scaffold: clean.check-affected: passed./evals:plugin-eval --tag canvas --runs 6ond0c455f(claude-opus-5-5, Claude Code 2.1.322),validity VALID:
viz-diagram-target-fallbackwith plugin 1.00 (6 of 6 pass, each printing theexact fallback line), without 0.50 (0 of 6);
viz-terminal-canvas-local1.00 in both arms. Earlierheads scored 2 of 3 and 1 of 3 with the plugin, every miss a prose explanation in place of the
line, which
d0c455frequires and86eb036's grader now checks exactly. The other cases were not run: the diff touches onlythe
diagram_targetpath, andautoleaves every other route unchanged.Follow-ups
viz-terminal-canvas-localcannot fail in the without-plugin arm,because that arm never loads the case's canvas stub, so it guards a regression but does not
measure the plugin's effect. It needs a baseline that also has the canvas tool, or a with-only
framing.
Related
and
hosted_canvasthis builds on.follow-up.
🤖 Generated with Claude Code