Skip to content

feat(visualization): add a diagram_target preference to visualize - #15201

Merged
kyle-sexton merged 6 commits into
mainfrom
feat/visualize-diagram-target
Nov 11, 2026
Merged

kyle-sexton merged 6 commits into
mainfrom
feat/visualize-diagram-target

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

No related issue: Workshop 2 follow-up owner decisions

Summary

/visualization:visualize gets a diagram_target preference: auto (default, today's behavior:
pick by surface), terminal, local-page, excalidraw or tldraw. It flows through the same four
config layers as hosted_canvas. When the chosen target is unavailable, the skill falls back to
auto and says so in one line. The README also notes that hosted_canvas steers only this skill,
and that a permission deny rule on the server's tools blocks it everywhere.

Fix

  • plugin.json: new userConfig.diagram_target option (five values, default auto), declared
    like hosted_canvas.
  • schemas/visualization.schema.json: the diagram_target key for the team file and personal
    override, so a team file using it validates.
  • skills/visualize/SKILL.md, Step 3, a new Diagram target paragraph after the hosted_canvas
    rule:
    • resolved only when the form is a diagram, from userConfig, then the team
      docs/conventions/visualization.yaml, then the personal override, a later layer winning, else
      auto; it prints one line with the value and its layer;
    • a non-auto value decides where the diagram goes in place of medium layers 2 and 3; an explicit
      medium argument still wins, and the committed-diagram rule, the pull-request diff exception and
      the mermaid gate still apply;
    • a canvas target draws only where the existing canvas rule would; when the target is unavailable
      (no such server connected, a surface that does not render it, or hosted_canvas forbids it),
      the skill uses auto and says so in one line.
  • skills/visualize/context/decision-matrix.md: one sentence that a canvas target never widens the
    canvas rule.
  • README.md: a Configuration bullet, an Option details paragraph, the regenerated options
    reference (scripts/sync-plugin-options-docs.py), and the hosted_canvas note: it steers only
    visualize; the block across every tool is a permission deny rule such as mcp__tldraw__*, citing
    the MCP rule form (mcp__<server>__* matches
    every tool of that server) and
    Settings precedence (a tool
    denied at any level cannot be allowed at another).
  • docs/contracts/config-cascade/README.md: a visualization (diagram_target) Implementers row
    (no-floor, per-key, later layer wins), the key added to the Root rule row, and the semantics
    table regenerated (scripts/sync-config-cascade-semantics.py).
  • Eval: new case viz-diagram-target-fallback. Its scaffold writes a gitignored
    visualization.local.yaml with diagram_target: excalidraw and connects no canvas server. The
    graders check the Read of the override, a fallback line naming diagram_target, excalidraw and
    auto, and a local diagram fence. The shared fixture rendered-views-repo.sh gains a
    diagram-target-file mode.
  • Changelog fragment for visualization (minor, Added).

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 deny floor;
diagram_target is a preference with no floor.

Verification

  • validate-cases.py (/evals:validate) on plugins/visualization/evals: no FAIL, and no finding
    on the new case (its regex and tool_used samples sort correctly). The WARN lines are the existing
    allowed_tools grant notices on other cases.
  • scripts/check-changed-skills.sh origin/main: PASS, 0 errors. The warnings are existing ones plus
    the 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.
  • shellcheck on the fixture and the new scaffold: clean.
  • Pre-push check-affected: passed.
  • /evals:plugin-eval --tag canvas --runs 6 on d0c455f (claude-opus-5-5, Claude Code 2.1.322),
    validity VALID: viz-diagram-target-fallback with plugin 1.00 (6 of 6 pass, each printing the
    exact fallback line), without 0.50 (0 of 6); viz-terminal-canvas-local 1.00 in both arms. Earlier
    heads scored 2 of 3 and 1 of 3 with the plugin, every miss a prose explanation in place of the
    line, which d0c455f requires and 86eb036's grader now checks exactly. The other cases were not run: the diff touches only
    the diagram_target path, and auto leaves every other route unchanged.

Follow-ups

  • Pre-existing (advisory): viz-terminal-canvas-local cannot 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

  • #15141 added the surface rule
    and hosted_canvas this builds on.
  • #15199, the other Workshop 2
    follow-up.

🤖 Generated with Claude Code

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]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 10, 2026 22:13
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T22:21:49.513086Z bd316f0 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 8a6ed2a218ddfd6e16c1df90b110b2a1fc991a36: read 1 of 1 changed file(s); 1 finding(s), 0 as inline comments.

Security review: PR #15201, incremental since 86eb036

This push adds no new security issues. One IMPORTANT manifest flag from an earlier review is carried forward and counted below. This lane has already reviewed earlier heads, so this review was blocking only and SUGGESTION findings were dropped.

Scope. I read the only hunk of the only file in the incremental list, plugins/visualization/README.md. It does not match a trusted path.

What changed. One line of the diagram_target docs was reworded: auto now reads "pick by where the session runs" where it used to read "pick by surface". The change is documentation prose only. It touches no workflow, token, trusted-actor list, kill switch, merge hold, manifest, or skill or agent instruction text. It deletes, narrows or softens no standing rule.

Finding carried forward (counted, no new inline comment)

  • manifest userConfig.diagram_target: flag, an added string key whose listed values excalidraw and tldraw send diagram content to a canvas server. Severity IMPORTANT.
    • First posted at feat(visualization): add a diagram_target preference to visualize #15201 (comment).
    • The owner resolved that thread with a stated decision on 2026-11-10: diagram egress is a user or team preference, the hosted_canvas deny setting is the floor, and a permission deny rule is the hard block. The settled-threads file says its lines have not changed since then.
    • The skill never drops a manifest flag line as settled, so it is restated here and cites that thread. plugin.json is outside this incremental scope and unchanged, so I posted no new inline comment.

Embedded text: none found in the PR context or the settled threads.

Spend: nothing in this push uses API credits or can bill.

critical-findings: 0

@kyle-sexton kyle-sexton added the do-not-merge Hard merge gate: do not merge while applied. label Nov 10, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on bd316f00700a46db3e8ae8d3c9dad413003c75fd; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 8a6ed2a218ddfd6e16c1df90b110b2a1fc991a36: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Code review: incremental pass on 8a6ed2a2 (since 86eb0362)

Blocking only. This lane has already reviewed earlier heads of this pull request (blocking only: yes), so this pass reports only blocking findings and manifest flag lines. I found no blocking findings.

Scope. This push changed one file, and I read its whole hunk (1 of 1 listed files):

  • plugins/visualization/README.md

What changed. One line was reworded at README.md#L90. The diagram_target auto default now reads "pick by where the session runs" instead of "pick by surface". It still agrees with the skill: SKILL.md#L205-L208 says auto is the existing surface-based behavior. The rewording changes no behavior.

Settled and prior threads.

  • The plugin.json manifest thread was settled by an owner decision. Its lines have not changed since, so I have not raised it again.
  • The earlier finding about a team-file diagram_target overriding a person's medium was addressed in 9a107363. This push does not touch SKILL.md.

Closing issue. None. The PR states it has no related issue, so there are no acceptance criteria to check.

Manifest. This push changes no plugin.json or marketplace.json, so this round has no manifest lines.

Verification. I ran nothing, because this lane has no shell. I compared the wording against the skill text by reading both.

Spend. This push has no billing or paid-plan change and no new spend.

@kyle-sexton kyle-sexton removed the do-not-merge Hard merge gate: do not merge while applied. label Nov 10, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-security-review: 1 inline finding(s) on 9a107363559078ca0e75046ef2d69f8b48a5889e; the summary is in this lane's pull request comment.

claude-lane: claude-security-review

@kyle-sexton kyle-sexton added the do-not-merge Hard merge gate: do not merge while applied. label Nov 10, 2026
@kyle-sexton kyle-sexton removed the do-not-merge Hard merge gate: do not merge while applied. label Nov 10, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 11, 2026
Merged via the queue into main with commit d6f2f78 Nov 11, 2026
46 checks passed
@kyle-sexton
kyle-sexton deleted the feat/visualize-diagram-target branch November 11, 2026 00:13
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant