Skip to content

Tell agents that rich-text fields support Mermaid diagrams - #878

Merged
lewispb merged 2 commits into
mainfrom
mermaid-diagrams
Oct 12, 2026
Merged

lewispb merged 2 commits into
mainfrom
mermaid-diagrams

Conversation

@lewispb

@lewispb lewispb commented Oct 12, 2026

Copy link
Copy Markdown
Member

Companion to basecamp/bc3#13769. Basecamp now shows a fenced code block with the language mermaid as a diagram. This change adds that to the Basecamp skill so agents use it.

Changes

  • skills/basecamp/SKILL.md: a paragraph in "Content and stdin" that says rich-text fields support Mermaid, when a diagram is the better choice than prose, and where the source is shown instead of the diagram (previews, emails, exports, and source that does not parse). An example posts a message with a diagram on stdin.
  • skill-evals/cases/create-message-diagram.yml: asks for a message with a diagram and expects a mermaid fence in the command.

No CLI code changes. internal/richtext already writes a fence's language to <pre language="…"> and reads it back, which is the format Basecamp uses for code blocks. The screenshots on basecamp/bc3#13769 show a message posted with basecamp messages create.

Testing

  • make check-skill-drift and make check-eval-patterns pass.
  • go test ./internal/commands passes, including the 16 KiB skill budget.
  • I did not run the model evals (make skill-eval), because they need an API key.

🤖 Generated with Claude Code

@lewispb
lewispb requested a review from a team as a code owner October 12, 2026 16:26
Basecamp now draws a fenced code block with the language mermaid as a
diagram (basecamp/bc3 mermaid-diagrams). The CLI already keeps a fence's
language when it converts Markdown, so no code change is needed. The skill
now says when to use a diagram and shows how to post one on stdin, and a
new eval case checks that an agent asked for a diagram writes a mermaid
fence.
Copilot AI balanced review requested due to automatic review settings October 12, 2026 16:26
@github-actions github-actions Bot added the skills Agent skills label Oct 12, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 2 files

You’re at about 91% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Reply to a comment to ask cubic a question or push back. It learns from your replies.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread skills/basecamp/SKILL.md Resolved
An unquoted <project> in the heredoc example is parsed by the shell as
redirections. The diagram eval case now also requires the four stages in
the requested order, not just a mermaid fence.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The evaluation can pass without a complete or meaningful Mermaid diagram.

1 open finding
What changed in this PR

Adds Mermaid diagram guidance to the Basecamp skill and an evaluation case for message creation.

[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Changes:

  • Documents Mermaid syntax, rendering behavior, and stdin usage.
  • Adds an eval for creating a message containing a Mermaid diagram.
File Description
skills/​basecamp/​SKILL.md Adds Mermaid authoring guidance and example.
skill-evals/​cases/​create-message-diagram.yml Adds the diagram-message evaluation case.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

accept:
- 'message(s create)? .*Release flow'
- '--(in|project) 55555'
- '```mermaid'
Copilot AI balanced review requested due to automatic review settings October 12, 2026 16:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approved

The documentation matches existing rich-text conversion behavior, and the focused eval covers the new guidance.

1 open finding

🧠 Review effort: Balanced

@lewispb
lewispb merged commit b80505e into main Oct 12, 2026
28 of 30 checks passed
@lewispb
lewispb deleted the mermaid-diagrams branch October 12, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skills Agent skills

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants