Skip to content

feat(visualization): add a tldraw file diagram target #17140

Closed as not planned
Closed as not planned

Description

@kyle-sexton

What is wanted

A tldraw-file value for diagram_target in /visualization:visualize, which writes a diagram to docs/diagrams/<name>.tldr for editing in VS Code, beside the excalidraw-file target that shipped in #17052.

Why it did not ship with the Excalidraw target

The tldraw loader rejects a file that does not match its schema, and which schema version the VS Code extension accepts is unconfirmed. The Excalidraw format is plain JSON with a documented top level, so it shipped first.

Steps

  1. Test first: write a minimal .tldr file and open it in the tldraw VS Code extension. Record the schema version that loads.
  2. If it loads, add the value to the plugin option, the schema and the skill, and follow the excalidraw-file rules: resolve the path from the repository top level, replace no existing file without asking, and never stage or commit the file.
  3. Add a structural check of the written file. A file that fails the check is not left behind, and the skill falls back to auto.
  4. If the test fails, record why here and keep the target out of the option list.

Done when

  • A generated .tldr diagram opens in the VS Code extension.
  • Tests cover the structural check and the fallback.
  • The README and option descriptions list the new value.

Activity

  1. added
    needs-triage
    on Nov 18, 2026
  2. github-actions commented on Nov 18, 2026

    @github-actions
    Contributor

    Size: Medium
    Complexity: Medium
    Uncertainty: Unknown
    Flags: none
    Blocked by: none
    Blast radius: the visualization plugin's diagram_target option, its schema, the visualize skill, its tests and README; read by anyone running /visualization:visualize.
    Reversible: yes; remove the tldr-file value and its skill rules in one revert.
    Open questions: none
    Understood: add a tldr-file value (written to docs/diagrams/<name>.tldr) beside excalidraw-file. It needs a structural check and a fallback to auto. The target is added only if a minimal file loads in the tldraw VS Code extension, so the schema version is settled by experiment. The "opens in the VS Code extension" check needs a host with VS Code, which an unattended lane run cannot do. It is a separate step from the lane-checkable work (structural check, fallback tests, docs). No duplicate found: #17128 covers Excalidraw templates, not tldraw. No merged PR already covers this.

    Automated triage. A maintainer reviews it.

  3. removed
    needs-triage
    on Nov 18, 2026
  4. melodic-automation-lanes commented on Nov 18, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane: Uncertainty unknown is not one of known, knowable; no trusted-human acceptance criteria: a listed human must put the confirmed - [ ] criteria in the body or post them as their own comment, or, on an issue a listed human filed, intake's newest refinement comment must hold them unedited. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).

  5. melodic-automation-lanes commented on Nov 18, 2026

    @melodic-automation-lanes
    Contributor

    Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.

    Intended outcome: Add a tldraw-file value to diagram_target that writes docs/diagrams/&lt;name>.tldr, with a structural check and fallback to auto, but only if a minimal file is confirmed to load in the tldraw VS Code extension.

    Related work

    Open questions

    1. Which .tldr schema version loads in the tldraw VS Code extension? The issue makes this test step 1, and an unattended run has no VS Code. Should a person run it and record the version here before the lane starts?
      RECOMMENDED: Yes: a person opens a minimal .tldr in the extension and records the loading schemaVersion and tldraw release in the issue; the lane then builds against that fixed version. Basis: judgment
    2. What is the exact option value? The issue says tldraw-file, but intake's triage says tldr-file, and tldraw already means the connected canvas server.
      RECOMMENDED: Use tldraw-file, matching the issue body and the excalidraw-file naming, distinct from the tldraw canvas value. Basis: .base/plugins/visualization/.claude-plugin/plugin.json:52
    3. Should the 'opens in the VS Code extension' done-when item be a manual check by a person, with the lane delivering the option, schema, skill rules, structural check, fallback tests and docs?
      RECOMMENDED: Yes: rewrite the issue as a task list with lane-checkable items plus one person-run load check; if the load test fails, the lane instead records why and leaves the option list unchanged. Basis: judgment

    Sources read

    • .base/plugins/visualization/lib/diagram-file-check.mjs:58: checkExcalidraw is Excalidraw-only (FILE_TYPE excalidraw, ELEMENT_TYPES, .excalidraw suffix at line 88); a tldraw check needs a new function or file
    • .base/plugins/visualization/.claude-plugin/plugin.json:50: option description and options list at line 52 hold tldraw and excalidraw-file but no tldraw-file
    • .base/plugins/visualization/schemas/visualization.schema.json:19: enum lists the same values and needs the new one
    • .base/plugins/visualization/skills/visualize/SKILL.md:218: the excalidraw-file target rules (path from repo top, no replace without asking, never stage) to mirror
    • .base/plugins/visualization/README.md:159: option table to update
    • .base/plugins/visualization/skills/visualize/context/decision-matrix.md:104: excalidraw-file section to mirror
    • .base/plugins/visualization/tests/diagram-file-check.test.mjs: existing structural check tests to extend

    To answer, post a comment that starts with this line:

    **Decision recorded.** <answer>
    

    Automated refinement by the lanes App. Answer with a comment whose first line is **Decision recorded.**.

  6. kyle-sexton commented on Nov 21, 2026

    @kyle-sexton
    MemberAuthor

    Closed on the owner's decision, 2026-11-21, typed in session GitHub Work (verbatim): "Okay, go with recommendations then." Basis: live tldraw diagrams already work through a connected tldraw MCP server (diagram_target: tldraw, plugins/visualization/README.md:91, skills/visualize/SKILL.md:160), and excalidraw-file covers diagrams saved in the repo. A probe found the tldraw VS Code extension is not installed on the owner's machine, and a faithful .tldr check needs tldraw's own strict loader (parseTldrawJsonFile, tldraw 5.6.2), which would make tldraw the plugins' first pinned dependency. Reopen if the VS Code extension comes into use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    Work status

    needs-owner-decision

    Priority

    medium

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions