DEV Community

Clarence Eastcote
Clarence Eastcote

Posted on

A small draft checklist that runs before the next edit

When I prepare a business feature, the awkward mistakes are often small. A note still says “check this.” A heading promises a comparison that the draft never makes. The body refers to a figure that has disappeared from the latest version. None of these problems needs a complicated publishing system to become visible. A short script can put a few useful questions in front of me before I begin the next edit.

Laptop draft with review highlights beside a handwritten editing checklist

I would start with a plain text copy of the draft and a separate checklist. Keeping the checks separate matters. Editorial preferences change, and I want to change a phrase in a small configuration file without rewriting the part that reads the document. The script should remain easy enough to understand after a month away from it.

Choose checks that can answer a narrow question

The first version could look for three unfinished markers: CHECK, TODO, and TK. It could count headings and identify repeated empty lines. It could also flag a small list of vague phrases that I tend to overlook in an early draft. These are prompts for a reader, not instructions to rewrite the article automatically.

A basic JavaScript array is enough to hold those markers. After reading the draft, the script can split it into lines, compare each line with the list, and print a line number beside every match. A case-insensitive comparison makes the check less dependent on how I typed the note. Keeping the original line in the output gives me context without sending me hunting through the document.

Make the result easy to inspect

I prefer a short text report to a score. “Three review markers found” tells me something I can investigate. “Draft quality: 82” hides a collection of assumptions behind a number. If the script cannot find a heading, it should say that clearly. If the draft is empty or unreadable, it should stop with a useful message instead of producing a reassuring report.

The report should also distinguish a finding from a failure. A feature about workshop checklists may legitimately contain the word CHECK. That is a reason to inspect a match, not a reason to remove it. I would keep the original draft untouched and make every edit in the writing application.

Printed sample drafts with review tabs beside a laptop terminal

Try it on deliberately untidy examples

Before relying on the script, I would make a few small sample drafts. One would contain every marker. Another would contain none. A third would mix upper and lower case and place a marker on the final line. These examples help show what the check actually does, rather than what I hope it does.

I would then run it on a completed feature and read the results alongside the original text. False alarms are useful feedback. A rule that interrupts every paragraph probably needs a narrower definition.

The value of this little tool is the pause it creates. It brings a manageable set of unfinished details into view, while leaving questions of meaning, fairness, and explanation with the writer. That is a modest job for a script, and a useful one.

Top comments (0)