refactor: standardize output delimiters with <display> tag#1452
refactor: standardize output delimiters with <display> tag#1452alexeyv wants to merge 5 commits intobmad-code-org:mainfrom
Conversation
|
This came out of the discussion in #1434 — @arcaven flagged what looked like an orphaned closing quote in step-04-review.md. Turned out both quotes were intentional output block delimiters, but the conversation raised a valid question: are those quotes actually doing anything useful? We ran a structured A/B test across 5 models and 5 delimiter styles to find out. Full methodology and results are in the PR description above. The short version: quotes work for LLMs but are invisible as block boundaries to humans, confuse linters, and — most importantly — we found 15 existing blocks across 13 files that already have double quotes inside quote-delimited blocks (JSON objects, template fallbacks like Thanks to @arcaven for surfacing this — what started as a one-character fix turned into a real improvement. |
📝 WalkthroughWalkthroughReplaced raw user-facing prompts and headings with Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-04-review.md`:
- Around line 34-46: The markdown inside custom <output-block> tags is being
treated as raw HTML and the Markdown markers (**, -, backticks) will render
literally after sanitization; update occurrences of the <output-block> element
(lines referenced in the diff) to either replace the tag with HTML
equivalents—use <strong> for bold, <ul><li>…</li></ul> for lists and
<pre><code>…</code></pre> for code blocks—or remove the <output-block> wrapper
and use native Markdown or a supported <details><summary> block so the bold,
lists, and code fences render correctly (apply changes for the <output-block>
instances shown in the diff).
🧹 Nitpick comments (1)
src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-04-review.md (1)
34-52: Delimiter style is now mixed within the same step.This section uses
<output-block>, while the later “Tech-Spec Complete!” menu still uses a fenced block. If the intent is to standardize delimiters, consider aligning the Section 4 completion block to the same convention or documenting why it’s intentionally different.
src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-04-review.md
Outdated
Show resolved
Hide resolved
|
We agreed that it should be output-block XML style tags and it should be applied consistently across the board. So marking this PR "draft" untilI have that change worked out. |
cf12697 to
e474696
Compare
c5e6e95 to
2205001
Compare
- Register <display> as supported tag in workflow.xml - Replace <output-block>, Display: "...", and bare quote blocks - Fix PRD step-07: remove misapplied tag from subprocess instructions
c87aa90 to
7746b8f
Compare
alexeyv
left a comment
There was a problem hiding this comment.
🐦⬛ The Raven's Review
The conversions that ARE here are clean and correct. Tags open and close properly, no content was accidentally modified, the workflow.xml registration is semantically sound, and the PRD step-07 fix is spot-on. CodeRabbit's concern about GFM sanitization was rightly dismissed — these are AI-agent processing markers, not rendered HTML.
That said, the raven found a few things worth picking at:
🔴 Finding 1: Orphaned closing quote in step-09-functional.md:179
**What would you like to do?**"
The Display: "..." wrapper was removed, but the trailing " on this line survived. This is the only actual bug in the converted files — a leftover artifact. It's cosmetic to the AI agent (which will likely ignore it), but it's sloppy.
File: src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-09-functional.md:179
🟡 Finding 2: Three Display: " left unconverted in step-e-04-complete.md
This file was partially converted by the PR, but three instances in the menu handling logic were missed:
- Line 135:
Display: "**Additional Edits**" - Line 145:
Display: "**Edit Workflow Complete**" - Line 150:
Display: "**Edit Workflow Complete**"
File: src/bmm/workflows/2-plan-workflows/create-prd/steps-e/step-e-04-complete.md
🟡 Finding 3: Scope vs. claim mismatch
The PR description says "Delimiter migration (73 files)" and "Converted all output delimiters to <display> tags," but there are significant unconverted instances remaining:
document-project/— 15+Display: "instances acrossinstructions.mdandfull-scan-instructions.mdcreate-ux-design/— 50+ bare quote output blocks across steps 02-13create-architecture/— multiple bare quote blocks across steps 01-07create-product-brief/steps 02-06 — unconverted bare quotes (only steps 01/01b were converted)check-implementation-readiness/— unconverted bare quotes in steps 02-06 (only step 01 was converted)
This isn't necessarily a blocker — it's reasonable to scope incrementally — but the PR description should say "Converted output delimiters in [subset]" rather than implying completeness. Otherwise someone grepping for remaining old patterns will be surprised.
✅ What looks good
- All
<output-block>instances: fully eliminated (zero remaining insrc/) workflow.xmltag registration: correctly placed in the<output>group with clear semantics- PRD step-07 fix: correctly identifies and removes misapplied delimiters from subprocess instructions
- No accidental content modifications in any converted file
- All
<display>tags properly opened and closed, no nesting issues
Verdict: Fix the orphaned quote (Finding 1) and the three missed conversions in step-e-04-complete.md (Finding 2). Consider updating the PR description to accurately scope what was converted, or convert the remaining files. The work itself is clean.
Convert remaining bare quote output blocks and Display: patterns to <display> tags in 48 files across product-brief, ux-design, architecture, check-implementation-readiness, quick-spec, research, brainstorming, party-mode, generate-project-context, and document-project workflows. Fix orphaned quote artifact in step-09-functional.md.
- Restore emojis/checkmarks stripped during delimiter conversion - Unwrap subprocess instructions incorrectly wrapped in <display> - Convert Present: "..." to <display> tags for consistency - Strip redundant Display: labels preceding <display> blocks - Wrap bare Display: + content blocks in <display> tags
Remove redundant Display: label before display block, wrap bare Display/Present keyword content in proper <display> tags, and remove misplaced code fence pair in architecture step-03-starter.
Split display blocks containing AI meta-instructions like [Show the complete markdown content from step X] into separate display blocks with the instruction outside the tags.
|
Agree, why was this closed? |
Summary
Replaces all inconsistent output delimiter conventions (
Display: "...", bare quote blocks,<output-block>) with a single<display>XML tag — registered as an official supported tag inworkflow.xml. Also fixes a misapplied delimiter in PRD step-07 that was wrapping subprocess instructions instead of user-facing output.What Changed
New
<display>tag in workflow.xmlAdded
<display>to the<supported-tags>output group with clear semantics: "Present enclosed content to user verbatim (no file save, no pause)." This distinguishes it from<template-output>which saves to file and pauses for user input.Delimiter migration (73 files)
Converted all output delimiters to
<display>tags across:Conversion rules applied
Converted:
<display>wrappedDisplay: "..."→<display>wrapped (quotes stripped)Display:with backtick-wrapped text →<display>wrapped (backticks stripped)<output-block>→ renamed to<display>Preserved (not converted):
PRD step-07 fix
<display>tag from subprocess lookup instructions (lines 58-69) — these are instructions to a subprocess, not user-facing outputDisplay: "..."line that was missed in the original passTest plan
Relates to #1433