Skip to content

chore(skills): enforce soft-wrap in every md-writing skill & agent#35

Merged
skapoor8 merged 2 commits into
mainfrom
feature/md-soft-wrap
Jul 21, 2026
Merged

chore(skills): enforce soft-wrap in every md-writing skill & agent#35
skapoor8 merged 2 commits into
mainfrom
feature/md-soft-wrap

Conversation

@skapoor8

Copy link
Copy Markdown
Contributor

Intent

Make every skill and agent that emits prose markdown state the soft-wrap rule (one line per paragraph, no mid-paragraph hard-wrap "endlines"), so generated .md artifacts reflow correctly and produce clean diffs. Several skills already had it (spec, dev, em, pm, ux, docs, ed, qa); coverage was inconsistent and most agents — the code that actually writes the files — lacked it. This closes those gaps.

The problem (rationale for review)

LLM-generated markdown sometimes hard-wraps prose (manual newlines mid-paragraph at ~80 cols). That:

  • reflows badly on narrow screens and non-reflowing renderers (a paragraph becomes a ragged column), and
  • corrupts diffs — a one-word edit re-wraps the whole paragraph, so the diff shows every line changed.

The repo convention is soft-wrap: each paragraph is one continuous line; the renderer wraps. Newlines still separate paragraphs, list items, headings, and code fences.

Why embedded instructions, not a wired-in tool

You asked whether a "standard tool" is the correct way. Key consideration: these skills are installed into other people's repos (npx skills add …) and run there. A formatter config or mise task in this repo cannot enforce anything in the repo where a skill actually executes — only the instruction embedded in the skill/agent travels with it. So the portable, always-on mechanism is the embedded rule, and that's what this PR makes ubiquitous and identically worded (no drift).

The deterministic sanitizer still has a place: the standard tool for "collapse hard-wrapped prose to one line, preserving code fences / lists / tables / front-matter" is Prettier with prose-wrap: never (prettier --prose-wrap never). A naive sed/fmt line-join would corrupt code blocks and tables, so Prettier is the right one. Each added rule now names it as the optional deterministic pass a consumer can run in their own repo/CI — but we deliberately do not hard-wire it as a per-skill runtime dependency (it would not be reliably present at skill-run time and would add latency to fast skills).

Changes

  • Skills (added the Critical Rule where missing): pr, flow, skill, usage, gh, glab, changelog, linear.
  • Agents (added a "Markdown output" note — these are the actual writers): spec/* (3), pm/* (7), pr/* (3), skill/* (3), dev/{researcher, linear-tasks-agent}, em/linear-push-agent — 19 agents.
  • Wording reused verbatim from spec/SKILL.md so the rule is identical everywhere.

Deliberately excluded (please sanity-check at review)

  • git commit messages — commit bodies follow the ~72-column wrap convention, so soft-wrap would be wrong there. The git skill is untouched.
  • Code-pattern / context / lookup skills (aws, cpp, docker, gcp, hpc, llm, mise, mle, python, react, sveltekit, tanstack, terraform, typescript, compgeo, cz, icons, vim, odin, task/tasks) — they help write code or are keybinding lookups; they do not emit prose markdown artifacts.

Validation

  • mise run skills:validate — all pass
  • Coverage verified: 8 skills + 19 agents now carry the rule; git confirmed untouched

Future work

  • If you want CI-level enforcement on this repo's own committed markdown, a follow-up can add a .prettierrc (proseWrap: never) + a mise fmt:md task — kept out of this PR because it is a separate, opt-in concern from the portable per-skill instruction.

Add the canonical soft-wrap rule (one line per paragraph, no mid-paragraph
hard-wrap) to every skill and agent that emits prose markdown, so generated
.md artifacts reflow correctly and produce clean diffs.

- Skills: pr, flow, skill, usage, gh, glab, changelog, linear (the ones that
  lacked it; spec/dev/em/pm/ux/docs/ed/qa already had it).
- Agents (the actual writers): spec/*, pm/*, pr/*, skill/*, dev/{researcher,
  linear-tasks-agent}, em/linear-push-agent.
- Each rule notes the optional deterministic sanitizer: prettier --prose-wrap
  never.
- Deliberately excluded: git commit messages (72-col convention) and
  code-pattern/lookup skills that don't emit prose markdown.
@skapoor8 skapoor8 self-assigned this Jul 21, 2026
@skapoor8

Copy link
Copy Markdown
Contributor Author

Addressed the one review finding: added the soft-wrap rule to the deprecated dev-docs alias for parity (it still ships a doc-writing workflow). Review confirmed all 19 agent appends land at clean EOF, the 8 skill insertions are valid markdown, coverage is complete, and git + code/lookup skills are correctly untouched.

@skapoor8
skapoor8 marked this pull request as ready for review July 21, 2026 01:04
@skapoor8
skapoor8 merged commit 116b1a6 into main Jul 21, 2026
2 checks passed
@skapoor8
skapoor8 deleted the feature/md-soft-wrap branch July 21, 2026 01:05
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.67.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant