Skip to content

feat(assess): fence chat output; Considered: block restores why-not flag reasoning - #857

Merged
admarble merged 1 commit into
mainfrom
fix/assess-chat-fence-considered
Jul 29, 2026
Merged

admarble merged 1 commit into
mainfrom
fix/assess-chat-fence-considered

Conversation

@admarble

@admarble admarble commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes two /assess output regressions observed in a real batch run (2026-07-29):

1. Chat dashboard misalignment. The renderer's table header starts with # Action …, and #823's paste-verbatim rule forbade a code fence — but chat output is markdown-rendered, so the unfenced leading # parses as an H1: the column header is swallowed, the row is bolded/underlined, and the header misaligns from its own data rows. The skill now requires wrapping the renderer's stdout in a fenced code block for chat only (content still verbatim; the no-editing rule is unchanged). Posted issue comments stay unfenced so the <!-- assess:… --> markers remain invisible and machine-readable on GitHub.

2. Missing why-not flag reasoning. The original /solve format carried Also consider: <flag> — explanation. The v3.0 streamline (#453 / 8f38dca) dropped it; #522 restored reasons only for flags actually used, plus an omit-when-obvious carve-out that in practice deletes the Flags: section from bug-fix batches. This PR:

  • adds considered[] to the schema (top-level and per-issue): flags whose trigger was evaluated and declined, each with a one-line reason
  • renders it as a Considered: block after Flags: in both batch and single modes (same two-column geometry)
  • removes the omit-when-obvious carve-out: every applied non-default flag, -Q included, gets a reason
  • skill guidance: record --chain why-not whenever a batch has 2+ PROCEED issues without a detected dependency, and --testgen/--security-review when their triggers were checked and not met

Example:

Flags:
  -Q                 multi-file scope across most PROCEED issues

Considered:
  --testgen  no ui/frontend labels or testable-AC signals in the batch

Changes

  • src/lib/assess/types.ts — AssessConsideredSchema (reuses the flag shape), optional considered[] on AssessResult and AssessIssue
  • src/lib/assess/renderer.ts — consideredLines() builder; wired after Flags: in the batch annotation group and the single-mode workflow body
  • src/lib/assess/renderer.test.ts — placement/geometry/empty-section tests for the new block
  • src/lib/assess/skill-examples.test.ts — worked-example payload extended (byte-for-byte guard still enforced)
  • skills/assess/SKILL.md + both mirrors — fence rule, considered[] schema/annotation/visibility/checklist updates, regenerated worked example

Testing

  • vitest run src/lib/assess/ — 64 passed (includes the byte-for-byte SKILL.md example guard across all three mirrors)
  • vitest run src/commands/assess-render.test.ts — 10 passed
  • tsc, eslint, npm run lint:skill-calls — clean
  • E2E: rebuilt dist and ran the npm-linked sequant assess-render against a payload with considered[] — block renders as shown above

🤖 Generated with Claude Code

…lag reasoning

Two /assess output regressions surfaced by a real batch run:

1. Chat alignment. The renderer's table header starts with ` #    Action`,
   and #823's paste-verbatim rule explicitly forbade a code fence — but
   chat output is markdown-rendered, so the unfenced leading `#` parses as
   a heading: the column header is swallowed, the row is bolded, and the
   header misaligns from its own data rows. The skill now requires wrapping
   the renderer's stdout in a fenced code block for chat (content still
   verbatim). Posted issue comments stay unfenced so the
   `<!-- assess:… -->` markers remain invisible and machine-readable on
   GitHub.

2. Why-not reasoning. The original /solve format carried "Also consider:
   <flag> — explanation"; the v3.0 streamline (#453/8f38dca) dropped it and
   #522 restored reasons only for flags actually used, plus an
   omit-when-obvious carve-out that in practice deletes the Flags: section
   from bug-fix batches. This adds `considered[]` to the schema (top-level
   and per-issue): flags whose trigger was evaluated and declined, each
   with a one-line reason, rendered as a `Considered:` block after
   `Flags:` in both batch and single modes. The skill now requires a
   reason for every applied non-default flag (including -Q, carve-out
   removed) and a considered entry for declined triggers (--chain with 2+
   PROCEED issues, --testgen/--security-review when checked).

Skill worked example regenerated from the renderer (skill-examples.test.ts
payload extended to match); all three mirrored skill dirs synced.

Entire-Checkpoint: 30076aa7db24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant