Skip to content

running-in-ci: anti-example for hard-wrapped PR/issue bodies - #321

Merged
max-sixty merged 1 commit into
mainfrom
fix/issue-320
Apr 21, 2026
Merged

max-sixty merged 1 commit into
mainfrom
fix/issue-320

Conversation

@tend-agent

Copy link
Copy Markdown
Collaborator

Problem

The running-in-ci skill already says "write each paragraph as a single long line and let the browser reflow," but PR #319 still shipped with a body hard-wrapped at ~72 chars. GitHub renders each source newline as <br>, so the description reads with mid-sentence breaks instead of reflowing to the reader's window.

Filed as #320 per @max-sixty's request.

Solution

Add an explicit do/don't <example> block to the existing line-wrapping paragraph, using the observed failure case from #319 as the anti-example. Also clarify two points the prior wording left implicit:

  • The rule applies to every delivery path — heredoc, --body "…", and --body-file — because the source newlines pass through unchanged.
  • The Write tool does not reflow paragraphs, so authoring the body to a file is not a fix on its own.

Code blocks, lists, and tables are called out as still keeping their newlines; only prose paragraphs need to be unwrapped.

Alternatives considered

The issue suggested two other angles:

  • Lint the composed body before gh pr create — more robust, but significantly more machinery, and the false-positive shape (prose that happens to line up near 80 chars) is awkward to spec.
  • Unify on Write tool + --body-file as the canonical path — doesn't actually solve it: the model can (and did) write a wrapped paragraph to the file.

Strengthening the wording is the smallest change with direct line-of-sight to the failure mode. If this recurs after merge, the lint angle stays on the table.

Testing

Skill text only — no automated test exists for skill compliance. The change is visible in the diff and follows the existing <example> block convention used elsewhere in the file.


Closes #320 — automated triage

The existing line-wrapping paragraph was not enough to prevent recurrences:
PR #319 shipped with a body hard-wrapped at ~72 chars, rendering as
mid-sentence `<br>` breaks on GitHub. Strengthen the guidance with an
explicit do/don't block using the observed case, and clarify that the
rule applies to every delivery path (heredoc, `--body`, `--body-file`) —
the Write tool does not reflow paragraphs, so authoring to a file is
not a fix on its own.

Closes #320

Co-Authored-By: Claude <[email protected]>
@max-sixty
max-sixty merged commit fa6c3c5 into main Apr 21, 2026
3 checks passed
@max-sixty
max-sixty deleted the fix/issue-320 branch April 21, 2026 21:02
max-sixty added a commit that referenced this pull request Apr 27, 2026
The previous bad/good pair showed a bare paragraph; the actual failure
mode is wrapping inside a `gh pr create` heredoc, so both examples now
show that form. Also folded the "Write tool doesn't reflow" sentence and
the scope disclaimer into adjacent prose to cut ~25% of the section.

Refs #321 — the prior anti-example didn't fully prevent the failure in
practice (e.g.
[worktrunk#2434](max-sixty/worktrunk#2434)).

> _This was written by Claude Code on behalf of Maximilian._

Co-authored-by: Claude <[email protected]>
max-sixty added a commit that referenced this pull request Apr 27, 2026
The skill tells Claude to write GitHub-bound prose as single-line
paragraphs, but the file itself was wrapped at ~100 chars — the
surrounding context taught the opposite of the rule, which is one
explanation for why bot PR/issue bodies kept shipping with hard wraps
even after the explicit rule landed in #321 / #338.

Mechanical unwrap with a small script (`.tmp/unwrap_md.py`, gitignored):
consecutive prose lines joined into single lines, list items joined
per-bullet. Fenced code blocks, HTML wrapper tags (`<example>`, `<bad>`,
`<good>`), frontmatter, and the bad/good example contents inside the
line-wrap section are preserved exactly — the bad example is *meant* to
demonstrate wrapping. 693 → 528 lines, no semantic changes. `pre-commit`
clean.

Follow-up to #338. If wrapped bot bodies still appear over the next
handful of PRs, next escalation is a PostToolUse hook with `flowmark
--width 0` (see #338 discussion).

> _This was written by Claude Code on behalf of Maximilian._

Co-authored-by: Claude <[email protected]>
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.

bot PR descriptions are hard-wrapped at ~72 chars, breaking mid-sentence on GitHub

2 participants