enhance(#3028): responsive Markdown separators instead of fixed-width rules (#3789)

* feat(#3028): responsive Markdown separators instead of fixed-width rules

Stage banners, checkpoints, completion and error panels used fixed-width
runs of box-drawing characters -- a 53-column heavy rule and a 62-column
double-line box. Those runs are ordinary text to a Markdown-rendering
host, so in a narrower pane they wrap and the border comes apart from
the heading it framed.

Shipped content now emits an ATX heading for a titled section and a
blank-line-delimited --- for a break between sections, both of which
adapt to the available width. The same convention is applied to the
three code sites that built these strings at runtime: the UAT
checkpoint renderer, the milestone-close audit report, and the TDD
review checkpoint table.

Removing the box also removes its only reason to exist -- the
east-asian-width padding helpers that kept its right border aligned
(checkpointBoxLine, displayWidth, isWideCodePoint, ZERO_WIDTH_MARK_RE,
CHECKPOINT_BOX_WIDTH). RTL directional isolation is unchanged.

The convention is specified in gsd-core/references/ui-brand.md and
enforced across all shipped content by tests/responsive-separators.test.cjs.

Refs #3028

* test(#3028): pin the heading form in checkpoint and audit-report assertions

These suites asserted the exact box borders and the 62-column padded
banner interior. With the box gone they assert the ### heading form,
the --- break and the bolded instruction line, and each now carries a
positive assertion that no box character remains -- which is what pins
the fix rather than merely tolerating it.

Language coverage is converted, not dropped: Japanese, Chinese, Korean,
Hindi and Arabic all still assert their rendered banner, and the Arabic
case still asserts the RTL directional isolates the box removal must
not disturb. Adds a case for a banner longer than the old inner width,
which previously produced a ragged border and now has none.

Refs #3028

* chore(#3028): acknowledge execute-plan.md growth from the checkpoint display spec

The checkpoint_protocol display spec described the drawn box; it now
describes the heading, the --- break and the bolded action prompt,
which costs 22 bytes (40111 -> 40133, 827 under the cap).

Appended to the existing #3370 fragment rather than filed as a new one:
a growth ack keys on the bare filename and #3370 already declares
execute-plan.md, so a second source naming it would be a hard
duplicate-key error. Same supersede-by-append route #3370 took for the
spent #2652 fragment.

Refs #3028

* docs(#3028): state the load-bearing half of the separator rule, and amend the zh-CN reference

Review found three things.

The rule as first written demanded a blank line above AND below every
---. Only the one above is load-bearing: it is what stops CommonMark
reading the rule as a setext underline for the line above. The one below
is cosmetic, because a thematic break is a leaf block. The rule now says
that, with the reason, instead of asserting a stricter form the content
does not keep.

The zh-CN reference had received the mechanical box-to-heading swap but
none of the prose behind it: it still claimed a 62-character checkpoint
width and still listed --- among forbidden mixed banner styles, so it
contradicted the convention it was translating. It now carries the
separator section, the setext reasoning, the unconditional-vs-per-runtime
rationale and a corrected anti-pattern list, in Chinese.

The user guide asserted that a heading is not a degradation anywhere.
That is an assertion, not a demonstration. It now says what was actually
traded away in a plain terminal, points at the recorded rationale, and
invites the report that would justify the capability flag instead.

Refs #3028

* chore(#3028): backfill changeset PR number

Refs #3028

---------

Co-authored-by: sim <sim@local>
This commit is contained in:
Tom Boucher
2026-08-23 22:38:12 -04:00
committed by GitHub
parent 107eb8c1d9
commit cf15682d1c
74 changed files with 849 additions and 699 deletions

View File

@@ -323,9 +323,7 @@ When Claude encounters `type="checkpoint:*"`:
**For checkpoint:human-verify:**
```
╔═══════════════════════════════════════════════════════╗
║ CHECKPOINT: Verification Required ║
╚═══════════════════════════════════════════════════════╝
### CHECKPOINT: Verification Required
Progress: 5/8 tasks complete
Task: Responsive dashboard layout
@@ -338,16 +336,14 @@ How to verify:
3. Tablet (768px): Sidebar collapses to icons
4. Mobile (375px): Sidebar hidden, hamburger menu appears
────────────────────────────────────────────────────────
→ YOUR ACTION: Type "approved" or describe issues
────────────────────────────────────────────────────────
---
**→ YOUR ACTION: Type "approved" or describe issues**
```
**For checkpoint:decision:**
```
╔═══════════════════════════════════════════════════════╗
║ CHECKPOINT: Decision Required ║
╚═══════════════════════════════════════════════════════╝
### CHECKPOINT: Decision Required
Progress: 2/6 tasks complete
Task: Select authentication provider
@@ -369,16 +365,14 @@ Options:
Pros: Free, no vendor lock-in, widely adopted
Cons: More setup work, DIY security updates
────────────────────────────────────────────────────────
→ YOUR ACTION: Select supabase, clerk, or nextauth
────────────────────────────────────────────────────────
---
**→ YOUR ACTION: Select supabase, clerk, or nextauth**
```
**For checkpoint:human-action:**
```
╔═══════════════════════════════════════════════════════╗
║ CHECKPOINT: Action Required ║
╚═══════════════════════════════════════════════════════╝
### CHECKPOINT: Action Required
Progress: 3/8 tasks complete
Task: Deploy to Vercel
@@ -393,9 +387,9 @@ What you need to do:
I'll verify: vercel whoami returns your account
────────────────────────────────────────────────────────
→ YOUR ACTION: Type "done" when authenticated
────────────────────────────────────────────────────────
---
**→ YOUR ACTION: Type "done" when authenticated**
```
</execution_protocol>

View File

@@ -40,9 +40,7 @@ The executor MUST:
2. Emit a structured halt report:
```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
MVP+TDD GATE TRIPPED — Plan {plan_id}, Task {task_id}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
### MVP+TDD GATE TRIPPED — Plan {plan_id}, Task {task_id}
Reason: {missing_red_commit | red_commit_not_failing | feat_before_test}

View File

@@ -2,7 +2,7 @@
Reusable prompt patterns for structured gate checks in workflows and agents.
**For checkpoint box format details, see `gsd-core/references/ui-brand.md`** -- checkpoint boxes use double-line border drawing with 62-character inner width.
**For checkpoint format details, see `gsd-core/references/ui-brand.md`** -- a checkpoint is a `### CHECKPOINT: {Type}` heading followed by its content, then a `---` break and the bolded action prompt. Never a fixed-width drawn border: it wraps in a narrow pane.
## Rules

View File

@@ -4,7 +4,6 @@
extraction restores byte-budget headroom the frozen ceiling exists to provide.
-->
**Exception:** If `gaps_found`, the `verify_phase_goal` step already presents the gap-closure path (`/gsd:plan-phase {X} --gaps`). No additional routing needed — skip auto-advance.
**No-transition check (spawned by auto-advance chain):**
@@ -41,10 +40,9 @@ STOP. Do not proceed to auto-advance or transition.
**If `--auto` flag present OR `AUTO_MODE` is true (AND verification passed with no gaps):**
```
╔══════════════════════════════════════════╗
║ AUTO-ADVANCING → TRANSITION ║
║ Phase {X} verified, continuing chain ║
╚══════════════════════════════════════════╝
### AUTO-ADVANCING → TRANSITION
Phase {X} verified, continuing chain
```
Execute the transition workflow inline (do NOT use Agent — orchestrator context is ~10-15%, transition needs phase completion data already in context):

View File

@@ -289,9 +289,7 @@ When `workflow.tdd_mode` is enabled, the execute-phase orchestrator inserts a co
### Review Checkpoint Format
```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
TDD REVIEW — Phase {X}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
### TDD REVIEW — Phase {X}
TDD Plans: {count} | Gate violations: {count}

View File

@@ -2,14 +2,51 @@
Visual patterns for user-facing GSD output. Orchestrators @-reference this file.
## Separators and Banners
**Never emit a fixed-width run of box-drawing characters.** A run of `━`, `─` or
`═` is ordinary text to the host that renders your output. In a narrower pane it
wraps, leaving orphan glyphs on a second line and coming apart from the heading it
was meant to frame. Markdown adapts to the available width; a 53-character rule
does not.
Three forms, and nothing else:
| Need | Emit |
|---|---|
| A titled section — stage, phase, checkpoint, completion, error | `### {TITLE}` (ATX heading) |
| A break between two sections | `---` on its own line, **with a blank line above it** |
| A framed panel of rows | `### {TITLE}` followed by the rows as plain lines |
**The blank line above `---` is load-bearing, not cosmetic.** A `---` placed
directly under a line of text is parsed as a setext heading underline for that
line, not as a thematic break — the rule silently swallows the line above it. A
blank line is what makes it a thematic break. (A blank line *after* `---` is
optional: a thematic break is a leaf block, so whatever follows starts a new
block either way. Add one where it reads better.)
**A stage banner is a heading alone — do not put a `---` above it.** An ATX
heading already separates, and it cannot be misparsed the way a bare `---` can.
### Why this is unconditional, not per-runtime
The alternative considered was a `rendersMarkdown` capability key, keeping
line-art for terminal-oriented runtimes and Markdown for Markdown hosts. It was
rejected: it needs a new descriptor key across every runtime plus the resolver,
and it leaves two output conventions to keep in sync forever — the divergence
class this repo already has a defect entry for. A heading and a thematic break
carry the same structure in a plain terminal that a rule pair did, without
committing to a width, so the second convention buys nothing. If a runtime ever
turns up that genuinely needs line-art, add the key then, against that evidence.
---
## Stage Banners
Use for major workflow transitions.
```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
GSD ► {STAGE NAME}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
### GSD ► {STAGE NAME}
```
**Stage names (uppercase):**
@@ -25,20 +62,18 @@ Use for major workflow transitions.
---
## Checkpoint Boxes
## Checkpoint Panels
User action required. 62-character width.
User action required.
```
╔══════════════════════════════════════════════════════════════╗
║ CHECKPOINT: {Type} ║
╚══════════════════════════════════════════════════════════════╝
### CHECKPOINT: {Type}
{Content}
──────────────────────────────────────────────────────────────
→ {ACTION PROMPT}
──────────────────────────────────────────────────────────────
---
**→ {ACTION PROMPT}**
```
**Types:**
@@ -60,6 +95,9 @@ User action required. 62-character width.
🎉 Milestone complete (only in banner)
```
Status symbols are single characters, not runs — they do not wrap and are
unaffected by the separator rule above.
---
## Progress Display
@@ -79,6 +117,9 @@ Tasks: 2/4 complete
Plans: 3/5 complete
```
The bar itself is a fixed 10-cell gauge, not a separator; it is intentionally
fixed-width and stays as it is.
---
## Spawning Indicators
@@ -104,7 +145,7 @@ Plans: 3/5 complete
Always at end of major completions.
```
───────────────────────────────────────────────────────────────
---
## ▶ Next Up
@@ -114,23 +155,19 @@ Always at end of major completions.
`{copy-paste command}`
───────────────────────────────────────────────────────────────
---
**Also available:**
- `/gsd-alternative-1` — description
- `/gsd-alternative-2` — description
───────────────────────────────────────────────────────────────
```
---
## Error Box
## Error Panel
```
╔══════════════════════════════════════════════════════════════╗
║ ERROR ║
╚══════════════════════════════════════════════════════════════╝
### ERROR
{Error description}
@@ -149,14 +186,21 @@ Always at end of major completions.
| 3 | ○ | 0/2 | 0% |
```
Table rules use ASCII `-`, never box-drawing characters.
---
## Anti-Patterns
- Varying box/banner widths
- Mixing banner styles (`===`, `---`, `***`)
- Fixed-width runs of `━`, `─` or `═` as separators — they wrap in a narrow pane
- Box panels drawn with double-line box characters (U+2554, U+2557, U+255A, U+255D, U+2551, U+2560, U+2563) — the borders wrap independently of their contents. They are named here by code point rather than shown, because the guard below rejects the characters themselves anywhere in shipped content.
- A `---` directly under a line of text with no blank line between — that is a setext heading underline, not a break, and it swallows the line above
- Boxing a heading between two rules — the heading is the separator
- Mixing banner styles (`===`, `***`)
- Skipping `GSD ►` prefix in banners
- Random emoji (`🚀`, `✨`, `💫`)
- Missing Next Up block after completions
Enforced by `tests/responsive-separators.test.cjs`.
</ui_patterns>