Skip to content

fix: /assess batch output corrupts with 9+ issues + label-priority spec-skip bug #494

Closed

Description

@admarble

Summary

/assess batch mode has two distinct problems: (1) output formatting degrades with 9+ issues, and (2) the workflow/phase selection logic incorrectly lets the bug label override domain-specific labels like auth and ui, skipping spec and security-review phases that should apply.

Observed with: /assess 143 144 145 146 147 148 149 150 151 152 153 (11 issues, different repo)

Problem 1: Formatting Corruption at Scale

Symptoms

Problem Example Root Cause
Command box overflow ╭─────────── never closes; content spills past border Box interior is hardcoded at ~60 chars; npx sequant run 143 144 ... 153 -q --phases exec,qa is ~73 chars
Table column truncation "getUser/getSessiec" instead of "getUser/getSession" Model abbreviates "Reason" column to maintain fixed-width alignment with many rows
Mojibake ────────────�t worktree remove Multi-byte box-drawing chars (3-byte UTF-8) split by Claude Code context compression or terminal wrapping
Doubled text assesssess:action=PROCEED Adjacent HTML comment lines merge during output rendering
Broken box corners ╭─── without matching ╰─── Content exceeds box width, model abandons alignment

Root Cause

The skill template (.claude/skills/assess/SKILL.md lines 153-180) was designed around a maximum of ~8 issues:

  1. Fixed box width (lines 160-163): 62-char box with 60-char interior. The largest example (lines 216-254) shows exactly 8 issues. Commands with 9+ issue numbers exceed the interior width.

  2. Fixed table column widths (line 154): Reason column is ~33 chars. With 11 rows the model aggressively abbreviates to maintain alignment, producing cut-off text.

  3. No batching guidance: The skill has no instruction for splitting large issue lists across multiple command blocks. Rule 6 ("if ALL issues share the same workflow, emit a single command") actively encourages cramming all issue numbers onto one line.

  4. Output volume: 11 issues × (table row + HTML comment + gh calls + codebase checks) produces significantly more intermediate and final output than the 8-issue example anticipated.

Note: The MAX_RESPONSE_SIZE (64KB) in src/mcp/tools/run.ts is not the cause — /assess runs as a Claude Code skill, not through the MCP run tool.

Problem 2: Label-Priority Spec-Skip Bug

Symptoms

The phase selection table (SKILL.md lines 113-121) lists workflows by label, but doesn't specify priority order when an issue has multiple labels. In the observed run:

# Labels (inferred) Assess gave Should have been
143 bug + auth exec → qa spec → security-review → exec → qa — auth label should override bug
145 bug + ui/frontend exec → qa spec → exec → test → qa — UI label should trigger test phase
146 bug exec → qa Borderline — "prevention" implies new logic, not just a fix
150 bug exec → qa Correct — one-line copy fix
151 bug exec → qa Correct — straightforward normalization

Root Cause

The spec-skip rule (line 124) says:

Skip spec when: bug/docs label, OR spec comment already exists on issue.

This is applied as a blanket override. When an issue has both bug AND a domain label (auth, security, ui, frontend), the bug label wins because:

  1. It appears first in the label table
  2. The skip-spec rule references bug without exception
  3. There is no explicit priority ordering between label categories

The domain-specific workflows (security-review, test phase) exist precisely for these categories and should not be bypassed just because the issue is also tagged as a bug. An auth bug still needs security review. A UI bug still needs browser testing.

Acceptance Criteria

Formatting (9+ issues)

  • AC-1: Dynamic command block width — Command block adapts to content length instead of using a hardcoded 60-char box. Either: (a) widen box to fit longest command, or (b) drop box-drawing and use indented code-style formatting for commands exceeding 60 chars.
  • AC-2: Command line splitting at threshold — When a single npx sequant run command would contain more than 6 issue numbers, split into multiple lines (e.g., npx sequant run 143 144 145 146 147 148 / npx sequant run 149 150 151 152 153), grouped by compatible workflow. Add guidance to "Command Block Rules" section.
  • AC-3: Table column minimum widths — Add explicit instruction that "Reason" column must not be truncated below a readable threshold. If the table would exceed terminal width, prefer wrapping or abbreviating the column header rather than truncating cell content mid-word.
  • AC-4: Large batch example — Add a second batch example showing 10+ issues with the new formatting rules applied, so the model has a concrete reference for large batches.
  • AC-5: Template consistency — Verify existing box-drawing examples in SKILL.md are internally consistent (current examples at lines 228-231 already overflow the declared 60-char interior). Fix all examples to match the new dynamic width rules.

Label-Priority / Phase Selection

  • AC-6: Explicit label priority order — Add a priority rule to the "Phase selection from labels" section: domain labels (security, auth, ui, frontend) take precedence over generic labels (bug, fix, docs). When both are present, use the domain-specific workflow.
  • AC-7: Spec-skip rule exception — Amend the "Skip spec when" rule to exclude issues with domain labels. New wording: "Skip spec when: (bug/docs label AND no domain labels like auth/security/ui/frontend), OR spec comment already exists on issue."
  • AC-8: Label-priority example — Add an example to the batch output section showing an issue with both bug and auth labels correctly receiving spec → security-review → exec → qa.

Sync

  • AC-9: Three-location sync — Changes applied to all three skill locations: .claude/skills/assess/SKILL.md, templates/skills/assess/SKILL.md, skills/assess/SKILL.md.

Non-goals

  • Changing how Claude Code renders long outputs (terminal-level issue, separate concern)
  • Adding runtime width detection (skill is a prompt, not executable code)
  • Limiting /assess to fewer issues (users legitimately assess 10+ issues at once)

Reproduction

# Formatting: In any repo with 9+ open issues:
# /assess <issue1> <issue2> ... <issue11>
# Observe: broken box-drawing, truncated table cells, mojibake in separators

# Label priority: assess any issue with both "bug" and "auth"/"ui" labels
# Observe: workflow defaults to exec → qa instead of the domain-specific path

Files to Modify

  • .claude/skills/assess/SKILL.md — Primary skill definition
    • Lines 111-125: Phase selection table + spec-skip rule (label priority)
    • Lines 153-277: Batch output format (formatting fixes)
  • templates/skills/assess/SKILL.md — Template copy
  • skills/assess/SKILL.md — Published copy

Activity

  1. added
    bug
    on Apr 6, 2026
  2. changed the title [-]fix: /assess batch output corrupts with 9+ issues (box overflow, table truncation)[/-] [+]fix: /assess batch output corrupts with 9+ issues + label-priority spec-skip bug[/+] on Apr 6, 2026
  3. admarble commented on Apr 9, 2026

    @admarble
    ContributorAuthor

    Spec Plan

    AC Checklist (9 items)

    Label-Priority / Phase Selection:

    • AC-1: Dynamic command block width — adaptive formatting instead of hardcoded 60-char box
    • AC-2: Command line splitting at >6 issue threshold
    • AC-3: Table column minimum widths — no mid-word truncation
    • AC-4: Large batch example (10+ issues)
    • AC-5: Template consistency — fix existing examples to match new rules

    Formatting (9+ issues):

    • AC-6: Explicit label priority order — domain labels override generic labels
    • AC-7: Spec-skip rule exception for domain labels
    • AC-8: Label-priority example in batch output

    Sync:

    • AC-9: Three-location sync (.claude/skills/, templates/skills/, skills/)

    Implementation Plan

    Phase 1: Label Priority Fix (AC-6, AC-7, AC-8)

    1. Add priority rule to label table: domain labels (security, auth, ui, frontend) override generic labels (bug, fix, docs)
    2. Amend skip-spec rule: "Skip spec when: bug/docs label AND no domain labels, OR spec comment already exists"
    3. Add batch example showing bug + auth → spec → security-review → exec → qa

    Phase 2: Formatting Fixes (AC-1, AC-2, AC-3, AC-4, AC-5)

    1. Replace hardcoded box-drawing with indented code-block style for commands
    2. Add Rule 7: split commands at >6 issue numbers
    3. Add table column minimum width guidance
    4. Add 11-issue batch example with new formatting
    5. Fix existing examples for consistency

    Phase 3: Three-Location Sync (AC-9)

    1. Apply all changes to .claude/skills/assess/SKILL.md
    2. Copy identical content to templates/skills/assess/SKILL.md and skills/assess/SKILL.md
    3. Verify with diff

    Design Decisions

    • Replace box-drawing with code blocks: Box-drawing chars break at width boundaries and produce mojibake. Indented code blocks have no width constraint and are universally supported.
    • 6-issue split threshold: Current example has 8 issues max. 6 provides a safety margin while being generous enough to avoid unnecessary splitting.
    • Domain label priority: Domain labels trigger specific workflows (security-review, test phase) that should never be skipped just because bug is also present.

    Workflow

    Phases: exec → qa (spec complete with this comment)
    Quality Loop: enabled (9 ACs, 2 concerns)

  4. added 2 commits that reference this issue on Apr 9, 2026
    5d74ae2
    1fec367
  5. admarble commented on Apr 9, 2026

    @admarble
    ContributorAuthor

    /fullsolve Complete

    Issue: #494
    Status: READY_FOR_MERGE
    PR: #512

    Summary

    • AC: 9/9 met
    • QA: All checks passed (1 issue caught & fixed during QA)
    • Build/Lint/Tests: All passing
    • CHANGELOG: Entry added

    Changes Made

    1. Label priority (AC-6, AC-7, AC-8): Added Category column to label table, domain labels override generic labels, amended skip-spec rule with domain label exception
    2. Formatting fixes (AC-1, AC-2, AC-3): Replaced box-drawing with indented commands, added Rule 7 (split at >6 issues), added table column rules
    3. Large batch example (AC-4): 11-issue example demonstrating new formatting
    4. Template consistency (AC-5): All box-drawing removed, all examples updated
    5. Three-location sync (AC-9): All 3 SKILL.md copies verified identical

    QA Fix

    Caught and fixed during QA: PARK issue #496 incorrectly had a command line in large batch example (violates Rule 1: "Only PROCEED and REWRITE issues get commands").

    Iterations

    Phase Iterations Status
    Spec 1/1 Complete
    Exec 1/1 Complete
    QA 1/2 Complete (1 fix applied)
  6. admarble commented on Apr 9, 2026

    @admarble
    ContributorAuthor

    Documentation Review Complete

    This issue contains documentation-only changes. No additional documentation generation required.

    Files Modified:

    • .claude/skills/assess/SKILL.md — Primary skill definition
    • templates/skills/assess/SKILL.md — Template copy
    • skills/assess/SKILL.md — Published copy
    • CHANGELOG.md — Release notes entry

    Status:

    ✅ Documentation changes are ready for review and merge.


    Ready to merge!

  7. added 3 commits that reference this issue on Apr 9, 2026
  8. added 2 commits that reference this issue on Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions