Skip to content

feat(visualization): bundle a shape-palette template for the excalidraw-file target - #17796

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-17128-44866416534-1
Nov 21, 2026
Merged

melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-17128-44866416534-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #17128

Summary

Opened by the work-resolve-issue lane. The run's own summary:

Builds the recorded decision on #17128 (option A, v1, excalidraw-file target only). It adds one bundled shape-palette scene, plugins/visualization/templates/shape-palette.excalidraw, with top-level type "excalidraw" and 10 elements: a lane frame, a step rectangle, a decision diamond and a start-or-end ellipse, each with a bound label, plus a bound arrow, a divider line and a note. No element carries created or originalText. The excalidraw-file block of the visualize SKILL.md gains a new step 2 that starts the draft from this template: copy the needed elements, give each a new id, and rename every frameId, containerId, binding and boundElements reference to match. The old steps 2-5 keep their text and are renumbered 3-6. Means chosen on evidence: the template sits in a plugin-level templates/ directory, which plugins/architecture/templates and plugins/work-items/templates already use. The tests go in the existing diagram-file-check suite, and its test-scope line now names the template, so a template change selects that suite. diagram-file-check.mjs is unchanged.

Not verified

  • node --test plugins/visualization/tests/diagram-file-check.test.mjs was not run: this lane cannot run node. Left to the PR's CI, where the test-scope line selects the suite. The same applies to the done-when CLI check (node plugins/visualization/lib/diagram-file-check.mjs <template>), which…
  • verify (build and tests): skipped, because node and the test suites cannot run in this lane. Left to the PR's CI.
  • tidy pass 5 (ai-slop): the deterministic detector, detect.sh, was not run because the lane's Bash allows only the named wrappers. The rubric was applied by reading the changed markdown lines and found no tells. The fix flow's semantic-diff verification therefore did not run.
  • Untracked files I did not create sit in the checkout root: .bash_profile, .bashrc, .gitconfig, .idea, .mcp.json, .profile, .ripgreprc, .vscode, .zprofile, .zshrc. They look like runner environment files. They are not part of this change and were left untouched.
  • Out of scope per the recorded decision: a consumer-template config key, use with the canvas targets, and a .excalidrawlib library export.

Fix

  • plugins/visualization/templates/shape-palette.excalidraw: new shape-palette scene file (type excalidraw, version 2, empty files, 10 elements, every reference resolves, no created key).
  • plugins/visualization/tests/diagram-file-check.test.mjs: a new describe block. One test asserts the template passes checkExcalidraw through the module and the CLI (exit 0, ok:true). One asserts no element has a created key. One builds a new scene by copying six template elements with renamed ids…
  • plugins/visualization/tests/diagram-file-check.test.sh: the test-scope line adds the template path.
  • plugins/visualization/skills/visualize/SKILL.md: the excalidraw-file block gains step 2 (start from the bundled shape palette). The existing steps keep their text and are renumbered 3-6.
  • .changes/visualization/work-resolve-issue-issue-17128-44866416534-1-f2b47b13.md: minor changelog fragment for the visualization plugin, made with new-changelog-fragment.

Verification

The runner ran each check from the base copy against dd0dacf:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • check-changelog-fragments: all 6 fragments valid (ran after the last edit).
  • check-changed-skills: CHECK-SKILL visualize PASS with 0 errors and 5 warnings. The warnings are about the skill's existing size and its description length. One notes the body grew from 474 to 478 lines.
  • check-affected: 15 passed, 8 skipped over 5 changed files (ran after the last edit). Skipped: typos (not installed), comment-hygiene (its fetch was blocked), size-check (script missing in the lane), three validate-plugins steps and changed-skills (they run code from the checked tree).
  • review: a fresh-context subagent reviewed the whole diff and traced checkExcalidraw by hand against the template and the copied scene. It found no correctness bugs and confirmed the expected results: {ok:true, elements:10} for the template and {ok:true, elements:6} for the copied scene. It flagged…
  • tidy: code-tidying:tidy-diff over the 10 changed hunks. It trimmed the new SKILL.md step (dropped a list of the palette's contents that restated the file) and reworded the changelog fragment. The simplify and comment passes found nothing; the one new code comment had already been removed under the…
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/44866416534

Left out: the items under Not verified.

Related

#17128

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

Copy link
Copy Markdown
Contributor

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

Security review: PR #17796

I found no security issues in this change. I read every hunk of all 5 changed files.

What changed: The PR adds a bundled Excalidraw shape-palette scene, plugins/visualization/templates/shape-palette.excalidraw, which holds static JSON. The visualize skill's excalidraw-file block gains a step that reads the palette from ${CLAUDE_PLUGIN_ROOT} and copies its elements into the draft. The PR also adds tests for the palette in diagram-file-check.test.mjs, adds the template path to the suite's test-scope line, and adds a changelog fragment.

What I checked:

  • Trusted paths: none of the changed files match a trusted-path glob.
  • Trust controls: no trust control, merge hold, token request, kill switch or workflow is touched.
  • Plugin manifests: no plugin.json or marketplace.json changes, and no userConfig key is added or changed.
  • Instruction surface: the SKILL.md change only adds a step and renumbers the old steps 2–5 to 3–6, with their text unchanged. No rule is deleted, narrowed or softened. The draft still goes through the unchanged check step (diagram-file-check.mjs), the ask-before-replace rule (replace nothing under --unattended), and the never-stage-or-commit rule.
  • Template file: it is static JSON. It points to no external file ("files": {}), and its only URL is the standard "source": "https://excalidraw.com" metadata field, which nothing fetches.
  • Tests: they read the in-repo template and run the checker CLI through spawnSync(process.execPath, [CHECK, TEMPLATE]). The arguments are fixed and there is no shell, so nothing can be injected.
  • PR context: it contains no embedded instructions aimed at the review lane.

Spend: none beyond the usual CI run of the diagram-file-check suite, which the new template path now also triggers.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

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

Code review: PR #17796, a shape-palette template for the excalidraw-file target

What this PR does. It adds plugins/visualization/templates/shape-palette.excalidraw, a 10-element .excalidraw scene file. It also adds a new step 2 to the excalidraw-file block in the visualize SKILL.md, which tells the agent to start from that template, and renumbers the old steps 2–5 as 3–6. Three tests are added to the existing diagram-file-check suite, the suite's test-scope line now names the template, and a minor changelog fragment is included.

What I checked, by reading the code (I ran nothing):

  • The template passes the checker. I traced checkExcalidraw in lib/diagram-file-check.mjs against the template by hand:
    • The top-level type is "excalidraw", version is 2, and files is empty.
    • Every element type is in ELEMENT_TYPES.
    • Every x and y is finite.
    • Shapes have non-zero sizes, and the arrow and the line have two points each.
    • Text elements have non-empty text and a positive fontSize.
    • Every frameId, containerId and binding resolves.
    • No element carries created.
    • The arrow's geometry (x 200→280, y 90) lines up with the step's right edge and the decision's left edge.
  • The copy test is sound. stampWithRenamedIds renames the ids and every reference, and the six-element scene it builds should pass with elements: 6. The test results the PR reports (it says CI will run them) are the author's claim; I did not confirm them.
  • The renumbering breaks nothing. No other text in the plugin refers to steps 2–6 of the excalidraw-file block by number.
  • The step order works. Building the elements in the new step 2, before step 3 makes the run directory, is coherent.
  • Closing issue feat(visualization): reusable templates for the Excalidraw file target #17128 (decision Q125 and its amendment):
    • Ship a .excalidraw scene file, not .excalidrawlib: met.
    • Add a separate SKILL.md step that starts a diagram from the template, with the check and write steps unchanged: met. Nothing would fail if this step were removed, though (see the inline comment).
    • One test asserts the template passes the checker: met, through both the module and the CLI.
    • One test builds a diagram from the template: met.
    • Carry no element-level created: met, and tested.
    • Leave out the config key, the canvas targets and an .excalidrawlib export: respected.
  • Changelog fragment. A minor bump fits a new capability, and the fragment's wording matches what ships. No plugin manifest changed, so there are no manifest lines.
  • Loosened checks. Nothing is loosened. The test-scope line only adds a path, which selects the suite more often.
  • Settings the prompt did not supply.
    • Loosened checks would be marked: fail (default; the prompt has no loosened_check_verdict: line); patterns: 0 (the prompt has no loosened_check_patterns: line).
    • The prompt has no loosened_check_decision_record: line, so the citation requirement was not checked.
  • Embedded text. The PR context and prior-findings files contain no directives aimed at this review.
  • Spend. None.

Verifier dropped 0 of 1 candidates.

critical-findings: 1

Findings not posted inline (their path, line or side is malformed):

  • plugins/visualization/skills/visualize/SKILL.md:236: Nothing fails if this new step is skipped or removed. Issue feat(visualization): reusable templates for the Excalidraw file target #17128 requires: "Add a separate SKILL.md step to the excalidraw-file block … that starts a diagram from the template." The step is here, but no test or eval checks it:

  • The new tests in tests/diagram-file-check.test.mjs only check the template file and a scene that the test builds itself.

  • The existing eval evals/viz-diagram-target-excalidraw-file/case.yaml grades only these: the file is written, diagram-file-check.mjs ran, a frame appears in the trace, nothing is staged, and the path is reported.

So if this step is deleted, or an agent ignores it and draws every shape from scratch, every test and grader still passes.

How to show it: revert lines 236–239 and run the eval. All five graders still pass.

Suggested fix: add a grader to that eval, for example:

  - name: palette-read
    type: 'tool_used'
    tool: 'Read'
    input_match: 'templates/shape-palette\.excalidraw'
    min: 1
    arm: 'with-only'

Add a matching sample under samples/ if the eval harness needs one per grader.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path is about to arm native auto-merge at head dd0dacf332178956df6bdffbc094b46672693f5f, the head its arming checks judged. The arm fails if the head moves first.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Merge-Risk: max=MEDIUM demote=false head=dd0dacf332178956df6bdffbc094b46672693f5f rubric=10.4.3 rater=claude-opus-5-5 checker=claude-opus-5-5

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit 34f4576 Nov 21, 2026
49 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-17128-44866416534-1 branch November 21, 2026 05:01
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 34f4576842d28f736fe402f79eeed7f6352596dc; later checks count it verified from this comment.

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.

feat(visualization): reusable templates for the Excalidraw file target

0 participants