Docs writing

From MinBZK/regelrecht · View interactive version

Docs writing is an AI agent skill from the GitHub repository MinBZK/regelrecht. Writing rules for the regelrecht docs site (docs/). Use when writing or editing prose under docs/ — RFCs, guides, component docs, concept pages, and the NL/EN landing copy. Keeps docs prose free of AI-generated tells and consistent with the site's government-technical register. Not for code, commit

How to use this skill

Skill file

docs-writing

Prose in docs/ is read by lawmakers, civil servants, and developers outside the team. It must read as written by a person, and it must sit in one consistent register: precise, government-technical, unhurried. The failure mode is not "wrong" but prose that is technically fine yet pattern-matches to LLM output — a reader notices within a paragraph, and for a government transparency project that costs credibility.

This skill covers everything under docs/:

There is precedent for this problem in the repo: PR #888 stripped LLM stylistic tells from draft RFCs by hand. This skill is that cleanup made repeatable.

The tool detects; you decide

check-prose-style.mjs (next to this file) is a linter, not an arbiter. It catches mechanical signatures — em-dashes, banned phrases, "not X, but Y" contrasts — so your attention is free for the things a regex cannot see: rhythm, rule-of-three, register, whether a flagged contrast is actually a tell.

You are the arbiter. Run the script, read each finding, and judge it. An error from the script is almost always right (em-dashes and banned phrases have near-zero false positives), so clear them all. A warn is a candidate — a regex flagged a "not ... but" that may be a dramatic contrast or may be incidental. Read the sentence and decide. Do not blindly rewrite every warning, and do not blindly trust a green run either: the script is silent on cadence and rule-of-three, which are the tells it cannot mechanize. A clean script plus a careful human read is the bar, not the script alone.

# From the repo root. No args => the default docs prose set.
node .claude/skills/docs-writing/check-prose-style.mjs

# One file (e.g. the RFC you just touched):
node .claude/skills/docs-writing/check-prose-style.mjs docs/src/content/rfcs/rfc-025.md

# Make warnings fail too, for a final gate:
node .claude/skills/docs-writing/check-prose-style.mjs --strict

error findings exit 1; warn findings are reported but exit 0 unless --strict. Code is stripped before matching (fenced blocks, inline code, and everything outside string literals in .ts), so --no-verify, a - b, and dashes inside code never trip it.

What the script cannot see — check these by hand

The regex catches surface tells. These are the ones you read for:

The script is also blind to scope, which is a question of content rather than style:

Register for these docs

Docs-specific mechanics

Hard rules (unconditional)

These hold even without opening the checklist:

Before you ship a docs change

  1. Run check-prose-style.mjs on the files you touched. Clear every error.
  2. Read each warn and decide: real contrast → rewrite; incidental → leave it.
  3. Read your headings and ledes aloud. Rule-of-three? Rewrite.
  4. Scan for uniform rhythm — vary it.
  5. Name the page's concept in one sentence and check that everything you added belongs to it. Move the rest to the page of its own concept and leave one sentence with a link here.
  6. If you edited landing-content.ts, confirm NL and EN both changed and match register.
  7. Build still passes: just docs-build (or npm run build in docs/).

Then, if the prose is going to Anne to paste somewhere, pipe it through pbcopy.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.