Conversation
… rich types in help) Motivated by the agent-compat journey tests: after #219 made `push` reject unknown --type values, agents self-corrected to a VALID but often WRONG type (e.g. falling back to `mermaid`) because the error listed the valid set but not which fits the intent. Two nudges close that gap: - validateContent: map common wrong --type values (Mermaid keywords like "flowchart"/"erDiagram", semantic names like "comparison"/"line") to the termchart type that renders that intent, surfaced as `Did you mean "X"?` plus a one-line intent->type guide in the reject message. - CLI --help: a "Push --type" block listing the rich viewer types (component / flow / vegalite / panes / calltree / datatable / markdown) so agents stop anchoring on the tool's Mermaid heritage. Measured (scripts/experiments/agent-compat): journey activation 0/5->4/5 (Claude), 2/5->3/5 (Gemini). +1 unit test.
ivanmkc
pushed a commit
that referenced
this pull request
Jul 4, 2026
…), 2/5->3/5 (Gemini) The #229 did-you-mean/intent hint closes the journey-selection gap: agents now self-correct to the RIGHT type (comparison->component, architecture->flow, etc.), not just a valid one. Only ER residual (agents prefer mermaid's native erDiagram).
ivanmkc
pushed a commit
that referenced
this pull request
Jul 4, 2026
…o-activate them Installing termchart's skills into the sandbox (diagram-recipes etc.) did NOT improve journey activation (Claude 1/5, Gemini 2/5) — transcripts show Claude never read the skill (read-skill=False) and kept using Mermaid keywords. Passive availability != activation. The #229 in-error did-you-mean hint (4/5) remains the effective lever because it lands where the agent is already looking.
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
Two small nudges that guide coding-agents (and anyone) to the correct termchart
--type.Motivation (from the agent-compat journey tests): after #219 made
pushreject unknown--typevalues, agents self-corrected to a valid but often wrong type — Claude repeatedly fell back tomermaidfor architecture/ER/dashboards — because the error listed the valid set but not which one fits the intent.Changes
validateContent(core): a small alias map from the wrong--typevalues agents actually reach for — Mermaid keywords (flowchart,erDiagram,sequenceDiagram), semantic names (comparison,architecture,line,status,table) — to the termchart type that renders that intent. The reject message now addsDid you mean "component"?plus a one-line intent→type guide. Both the CLI fast-fail and the server 400 inherit it (single source of truth).--help: a new "Push --type" block listing the rich viewer types (component / flow / vegalite / panes / calltree / datatable / markdown) with the intent for each, so agents stop anchoring on termchart's Mermaid-for-terminals heritage.validate.test.ts) covering the did-you-mean mapping.Measured impact
Re-ran the
scripts/experiments/agent-compatjourney suite (scenario-only prompts; agent must pick the type):Only ER still misses: agents prefer Mermaid's native
erDiagram(a valid, error-free push) over the richflowentity-node journey.Test
packages/viewer/test/validate.test.ts— 28 pass (incl. new did-you-mean case). No behavior change for valid types.