DEV Community

Gabe Garcia
Gabe Garcia

Posted on

How to reword README and docs text so developers actually get it

Most docs aren't wrong. They're written by the person who knows the code best, at the moment they know it best. That's the problem. Every shortcut makes sense to the author and almost none of it makes sense to someone cloning the repo for the first time.

You don't need to rewrite your docs from scratch. You need to reword the parts people read first and the parts they hit when something breaks. Here's how to do that for README intros, API descriptions, error messages and jargon.

Rule zero. Protect the literal strings

Before you change a single word, mark everything that has to stay exact. That means function names, flags, environment variables, file paths, config keys, version numbers and status codes. Wrap them in backticks if they aren't already.

Rewording is about the prose around the code. If MAX_RETRIES turns into "the maximum retry setting" in one paragraph and stays MAX_RETRIES in another, readers will wonder if those are two different things. Keep identifiers frozen and let the sentences around them move.

README intros. Say what it is before how it works

A README intro has one job. In two or three sentences, a stranger should know what the project does, who it's for and whether to keep reading. A lot of intros skip straight to architecture.

Before

Queuebox is a lightweight, pluggable, event driven orchestration layer
leveraging a reactive core to enable composable pipeline primitives.
Enter fullscreen mode Exit fullscreen mode

After

Queuebox runs a series of small jobs in order and retries any that fail.
Use it when a cron script has grown too big to trust.
Enter fullscreen mode Exit fullscreen mode

The rewrite trades five abstract words for a concrete action and a real situation. You can still describe the reactive core lower down. Put it after the reader knows why they'd care.

API descriptions. Answer the four questions

A good description of a function or endpoint answers four things. What does it return? What does it change? What are the units? What happens by default?

Before

fetchUsage gets usage data for the account.
Enter fullscreen mode Exit fullscreen mode

After

fetchUsage returns API calls made by one account, grouped by day.
Times are in UTC. It covers the last 30 days unless you pass a start date.
It only reads data and never changes the account.
Enter fullscreen mode Exit fullscreen mode

"Gets usage data" sounds complete until someone asks which usage, over what period and in what time zone. The rewrite answers before they have to open an issue.

Watch for verbs that hide side effects too. "Handles the order" could mean reads it, updates it or deletes it. Say which.

Error messages. What happened, why, and what to do next

An error message is documentation that shows up at the worst moment. The reader is stuck and probably annoyed. Give them three things in plain words.

Before

ERR_CFG_LOAD failed
Enter fullscreen mode Exit fullscreen mode

After

Couldn't load queuebox.yaml because line 12 isn't valid YAML.
Check the indentation on that line, then run the command again.
Enter fullscreen mode Exit fullscreen mode

Keep the error code if people search for it. Just don't let the code be the whole message. And skip blame words like invalid user input or illegal operation. "Line 12 isn't valid YAML" is just as precise and a lot less hostile.

Jargon. Define it once or drop it

Jargon isn't always bad. If your readers are platform engineers, "idempotent" is the right word. The trouble starts when a doc mixes audiences or uses a team's private shorthand.

Ask two questions about each technical term. Would my least experienced reader know it? Is it a public term or something only my team says?

Before

Run the bootstrap before hydrating the sidecar or the shim will 409.
Enter fullscreen mode Exit fullscreen mode

After

Run the setup script first. If the helper container starts before setup
finishes, requests to it fail with a 409 Conflict error.
Enter fullscreen mode Exit fullscreen mode

Internal nicknames like "the shim" are the worst offenders. They feel normal because you've said them a hundred times in standups. If a public term exists, use it. If you must keep a term, define it the first time it appears and use that same word every time after.

Acronyms and the curse of the second sentence

Spell out an acronym the first time, unless it's something every reader knows, like API or URL. Then check the next sentence. A common pattern is defining a term in sentence one and switching to a different name for it in sentence two. Pick one name and stick with it through the whole page.

Read it as a new contributor

When you're done, open the page in a private window and pretend you just found the repo. Can you tell what it does from the first screen? If a command fails, does the error point you somewhere useful? If you'd have to ask a teammate what a word means, that word needs work.

Better yet, ask someone who hasn't touched the project to follow the README and narrate where they get stuck. You'll learn more in ten minutes than in an hour of rereading your own text.

Using a rewording tool on docs

For a paragraph you've rewritten three times, a second version can help you see it fresh. Rephrase AI lets you paste a section, pick the Professional profile and lower complexity, then compare the result against your original. Paste one section at a time, and check that every identifier, number and code reference came back unchanged before you commit anything. The Free plan allows as many as 3,000 characters per rephrase, which is about right for one README section. More at Rephrase AI.

Top comments (0)