Repository navigation
feat(t27f): visual-output rule -- initialize instructions and an inline verdict on every t27f SVG - #27
Open
gHashTag wants to merge 1 commit into
Open
feat(t27f): visual-output rule -- initialize instructions and an inline verdict on every t27f SVG#27gHashTag wants to merge 1 commit into
gHashTag wants to merge 1 commit into
Conversation
…ne verdict on every t27f SVG specs/t27mcp/visual_output.t27 (gHashTag/t27#10504) is compiled to wasm/visual_output.wasm and wasm/visual_output_table.mjs (both generated, rebuild steps in wasm/BUILD). The server now: - sends RULE_CLAUDE_CODE as the initialize `instructions`, so Claude Code puts the rule "every answer that explains a spec, flow, numbers or work carries one visual" in the model's system prompt; - ends t27f_graph and t27f_view with an `inline:` line from inline_source: embed the SVG as it is, or redraw it 680 wide from t27f_outline rows. visual.mjs is the glue: it measures an SVG's viewBox width, smallest font-size and bytes, and exports RULE_TRI_CLAW for TRI CLAW's chat prompt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary by t27-beesThis PR adds the visual-output rule from Worth a look
Read: 6 files, +132 -8, the whole diff. Head |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The t27 MCP server now carries the visual-output rule from
specs/t27mcp/visual_output.t27(gHashTag/t27#10504):initializereturnsinstructionsbuilt fromRULE_CLAUDE_CODE. Claude Code puts server instructions in the model's system prompt, so every session that loads this server is told: an answer that explains a spec, a flow, numbers or a piece of work carries one visual; in the desktop app it goes inline, otherwise the SVG path is opened in the pane, otherwise a markdown table.t27f_graphandt27f_viewend with aninline:line, the spec'sinline_sourceverdict: embed the SVG as it is, or redraw it 680 px wide fromt27f_outlinerows. The verdict comes from the drawing's own numbers (viewBox width, smallest font-size, bytes).t27-mcp/visualexportsRULE_TRI_CLAWand the helpers, so TRI CLAW's chat prompt reads the same rule from the same spec.Stacked on #26 (base
t27mcp/one-service).Files
wasm/visual_output.wasm,wasm/visual_output_table.mjswasm/BUILDvisual.mjsserver.mjsinstructions, theinline:line, two tool descriptionspackage.json./visual, ships the three filesvisual.mjsand theserver.mjslines are hand-written JavaScript, so this PR needs the owner'sowner-approved-foreignlabel.Evidence (lab, node 20, at 5166b13)
node smoke.mjs: rc 0, all checks pass.initializecarries"instructions":"Visual output (specs/t27mcp/visual_output.t27):\n- Every answer that explains a spec, ...t27f_graphfixture 1:inline: redraw it 680 wide from t27f_outline rows (1860 wide, smallest text 13 px, 5923 bytes; ...)t27f_viewscene 3:inline: redraw ... (1280 wide, smallest text 15 px, 8557 bytes; ...)t27f_viewscene 3, look 0:inline: redraw ... (1280 wide, smallest text 20 px, 6839 bytes; ...)All three tool drawings are too wide for their smallest text to read at 680 px, which matches the spec's measured tests.
🤖 Generated with Claude Code