Skip to content

spec(t27mcp): visual_output.t27 -- every answer carries a T27F visual, by host (Closes #10531) - #10504

Merged
gHashTag merged 1 commit into
masterfrom
spec/visual-output
Oct 18, 2026
Merged

gHashTag merged 1 commit into
masterfrom
spec/visual-output

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Closes #10531

What

specs/t27mcp/visual_output.t27 holds one rule, written down once: every answer that explains a spec, a flow, numbers or a piece of work carries one visual, drawn the T27F way (gHashTag/trinity#1648). The spec says three things:

  • where the visual goes, by host;
  • when a tool's SVG may be embedded as it is, and when it has to be redrawn;
  • what makes a visual wrong.

Both consumers read the rule's text (RULE_CLAUDE_CODE, RULE_TRI_CLAW) from this spec, so the rule lives in one place:

  • the t27 MCP server's instructions, which Claude Code puts in the model's system prompt (gHashTag/t27-mcp);
  • TRI CLAW's chat-agent prompt (gHashTag/999-multibots-telegraf).

Epic #10066.

The rule

  • needs_visual(kind): a spec, a flow, numbers and a report carry a visual. A one-sentence reply or a question back to the user does not.

  • answer_channel(host, inline_tool, svg): hosts 0..3 and channels 0..3 reuse reel.t27's numbers. This spec adds TRI CLAW, the inline widget, the image URL and the markdown table.

    Host Has an inline visual tool No inline tool, has an SVG No SVG
    Claude Code desktop inline widget (show_widget) file path, opened in the pane markdown table
    Claude Code CLI — file path markdown table
    TRI CLAW chat — https .svg URL (the chat renders it as an image) markdown table

    MCP Apps → ui:// resource. Site → live player.

  • inline_readable(w, font): font * 680 >= 11 * w, for the drawing's smallest text.

  • inline_source(w, font, bytes): embed the SVG as it is only when it is readable and at most 16384 bytes. Otherwise redraw it 680 px wide from t27f_outline rows.

  • answer_verdict(...): returns one of ok, no visual, invented (a drawn node no tool row backs), no legend, no source and unreadable.

Measured, not assumed

These are the tests' numbers, measured from t27-mcp at db98153:

  • The t27f_graph reel fixture is 1860 px wide with 13 px text. Shown at 680 px, that text is about 4.75 px, so it must be redrawn.
  • t27f_view deck-evidence-wide is 1280 px wide. Its 26 px body text is readable inline. Its 15 px caption is not.

Evidence (lab, t27c 0.5.2, zig 0.16.0)

  • t27c check: typecheck OK, 0 errors. The one warning is that answer_verdict takes 9 parameters.
  • t27c test-report: 9 of 9 pass and 0 are vacuous. Of the 9 tests, 2 are negative controls.
  • Mutant: the readability rule replaced by font_px >= 11. Three tests fail: the measured drawings, the embed/redraw choice and the unreadable-text negative control.
  • Seal: .trinity/seals/t27mcp_T27mcpVisualOutput.json, with 9/9 passed and not forced. Its spec_hash matches the file.

Next (not here)

  • t27-mcp:
    • the initialize result carries instructions built from RULE_CLAUDE_CODE (gen-js table);
    • t27f_graph and t27f_view report the inline_source verdict;
    • the tool list exports the TRI CLAW rule.
  • TRI CLAW:
    • the chat prompt imports RULE_TRI_CLAW from the t27-mcp package;
    • a route serves the t27f SVGs by https URL.

🤖 Generated with Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-18 15:33:09 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 50
PRs with All Checks Green 0
READY 0
FAILING 50
PENDING 0
NO CHECKS YET 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=fad12492937a != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

gHashTag added a commit that referenced this pull request Oct 18, 2026
…the rule from t27mcp::visual_output (#10504) (Closes #10508)

The owner picked specs/t27mcp/visual_output.t27 as the single home of the
visual-output rule. The claw spec now imports needs_visual, answer_channel and
the K_/HOST_/CH_ numbers from it and adds only takes_still, still_channel,
place_for, still_ms_ok and still_report_ok. Lab: 6/6, 0 vacuous; t27mcp
spec 9/9, 0 vacuous. Resealed. Ledger row for specs/t27mcp/visual_output.t27
(t27b pass, per #10504's own ratchet run).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, by host, readable or redrawn (Closes #10531)

One rule for the t27 MCP server's instructions and TRI CLAW's chat prompt:
needs_visual, answer_channel (desktop inline widget, TRI CLAW image URL,
markdown table fallback), inline_readable (font * 680 >= 11 * width),
inline_source (embed or redraw from t27f_outline), answer_verdict.

Lab: t27c test-report 9/9, 0 vacuous; a mutant readability rule fails 3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Closes #10531
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-18 17:18:05 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 50
PRs with All Checks Green 0
READY 0
FAILING 50
PENDING 0
NO CHECKS YET 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=fad12492937a != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

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.

[spec] t27mcp/visual_output.t27 -- every answer carries a T27F visual, by host

1 participant