Skip to content

Keep a details fold written in Markdown - #1024

Merged
jorgemanrubia merged 3 commits into
mainfrom
markdown-keeps-details
Nov 10, 2026
Merged

jorgemanrubia merged 3 commits into
mainfrom
markdown-keeps-details

Conversation

@jorgemanrubia

Copy link
Copy Markdown
Member

An agent can now fold the work behind an answer from Markdown. A <details> block typed in Markdown reaches Basecamp as a fold, instead of showing its tags as text.

Basecamp's rich text allows details and summary (bc3 doc/api/sections/rich_text.md), and posts written as HTML already fold. The Markdown path escaped both tags, so the only way to fold was to hand-write the whole post as HTML, which the basecamp skill tells agents not to do. In 392 agent posts on 37signals' Basecamp, only 5 folded, all of them HTML, and one post typed in Markdown showed <details> as literal text.

What changes:

  • richTextTags keeps details and summary. The Markdown between them still converts, the way it does in any other kept HTML block.
  • The basecamp skill says how to write a fold. The skill is still under its 16 KiB cap: I shortened the Mermaid paragraph to make room.
  • The connector's subagent instructions say how, and when: only when a reply combines its answer with the details of the work behind it, never folding the answer, an ask or a blocker.

Tests: two new cases, one fold with Markdown inside and one written inline. Both fail with the tag change reverted. The old "unsupported inline tag is text" case now uses <abbr>. bin/ci passes locally.

One thing to know: the separators the Markdown path adds put an empty line just inside the top and bottom of an open fold.

Paired with basecamp/coworker#325, which tells agents when to fold. For a person to review and merge.

Basecamp's rich text keeps <details> and <summary>, but the Markdown
path escaped them, so an agent could fold the work behind an answer
only by hand-writing the whole post as HTML, which the skill tells it
not to do. Keep both tags, and say in the basecamp skill and the
connector's subagent instructions how to write a fold in Markdown.
@jorgemanrubia
jorgemanrubia requested a review from a team as a code owner November 10, 2026 10:54
Copilot AI balanced review requested due to automatic review settings November 10, 2026 10:54
@github-actions github-actions Bot added tests Tests (unit and e2e) skills Agent skills labels Nov 10, 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 4 files

Reply with feedback, questions, or to request a fix.

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

Comment thread skills/basecamp/SKILL.md Resolved
Copilot AI previously approved these changes Nov 10, 2026

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

No active review issues block the change to preserve Markdown fold tags.

No open issues 🎉

What changed in this PR

This PR lets Markdown posts retain <details> and <summary> tags, so agents can fold supporting details without writing the entire post as HTML.

Changes:

  • Preserve fold tags while continuing to convert the Markdown inside.
  • Add regression cases for block and inline folds, retaining unsupported-tag coverage.
  • Document fold syntax and instruct connector agents to keep answers, asks, and blockers visible.

[!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.

File Description
skills/​basecamp/​SKILL.md Documents fold syntax and shortens Mermaid guidance.
skills/​basecamp-connect/​subagent.md Explains when to fold supporting details and what must remain visible.
internal/​richtext/​richtext.go Adds details and summary to preserved rich-text tags.
internal/​richtext/​richtext_test.go Covers block and inline folds and updates unsupported-tag coverage.

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 10, 2026 12:49
Copilot AI dismissed their stale review, a newer Copilot review was requested November 10, 2026 12:49
Copilot AI previously approved these changes Nov 10, 2026

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

No active review issues are reported for the Markdown fold-tag support change.

No open issues 🎉

Review effort: Balanced

@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 1 file (changes from recent commits).

Reply with feedback, questions, or to request a fix.

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

Comment thread skills/basecamp/SKILL.md Resolved
Copilot AI balanced review requested due to automatic review settings November 10, 2026 12:59
Copilot AI dismissed their stale review, a newer Copilot review was requested November 10, 2026 12:59

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

No active review issues are blocking the change to preserve collapsible details in Markdown posts.

No open issues 🎉

Review effort: Balanced

@jorgemanrubia
jorgemanrubia merged commit da36c00 into main Nov 10, 2026
32 checks passed
@jorgemanrubia
jorgemanrubia deleted the markdown-keeps-details branch November 10, 2026 14:58
jeremy added a commit that referenced this pull request Nov 10, 2026
…950575

* origin/main:
  Keep a details fold written in Markdown (#1024)
  Add basecamp feedback, shipped dark behind endpoint detection (#1021)
  Stamp v0.26.0 (#1023)
  Let connectors hear selected Campfires without mentions (#1022)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skills Agent skills tests Tests (unit and e2e)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants