Editorial Review
Reviews prose against a fixed set of editorial principles and returns structured findings plus a revised draft. The principles combine Benjamin Dreyer on correctness, Verlyn Klinkenborg on the sentence, a catalogue of anti-patterns common in generated prose, and a short house style.
Workflow — @webframp/editorial-review
Give it draftPath (a file inside the repo) or draftText. The
@webframp/editorial-review model's prepare method hashes the draft,
splits it into sentences and loads the bundled principles. Claude then
reviews the draft through @keeb/anthropic/claude cli_generate_many, which
uses the local claude CLI login and needs no API key. The answer must
match a JSON schema. By default a second pass re-reviews the revision for
violations that remain or that the revision introduced.
Set voiceModel to a @dougschaefer/writing-voice behavior to add its
prose rules, kill list and anti-patterns to the principles. That behavior
must have run its get method so its voice-profile data exists.
Report — @webframp/editorial-review (workflow scope)
- Findings from each pass, grouped by guide section, each with the offending sentence, the problem and a suggested fix.
- The sentence-shape self-check over the original draft: sentence lengths, opener counts, and the openers the guide asks you to question.
- Word counts before and after, with a warning when the revision grew.
- A line diff and the final revised draft.
The report degrades instead of throwing. When a step is missing or its data cannot be read, the report still renders and says what is missing.
Usage
swamp extension pull @webframp/editorial-review
swamp workflow run @webframp/editorial-review \
--input draftPath=docs/posts/draft.md --input contentKind="blog post"
swamp report get @webframp/editorial-review \
--workflow @webframp/editorial-reviewRelease Notes — @webframp/editorial-review
2026.10.21.1
Initial release.
Added
- Model
@webframp/editorial-review.prepareresolves a draft from a repo path or inline text, hashes it, splits its prose into sentences and writes a review request. The request embeds the bundled principles and, whenvoiceModelis set, a@dougschaefer/writing-voiceprofile.recheckbuilds the second-pass request from the first pass's revised draft. Draft paths must resolve inside the repository; symlinks are resolved before the check. - Workflow
@webframp/editorial-review. prepare, a first Claude pass, and an optional second pass (recheck, default on), each pass through@keeb/anthropic/claudecli_generate_manywith a JSON schema and followed by an assert on the answer's shape. The model (claude-opus-5-5by default), effort, timeout and instance name are inputs. - Workflow-scope report
@webframp/editorial-review. Findings grouped by guide section, the sentence-shape self-check, before and after word counts with a warning when the revision grew, a line diff and the final draft. - Bundled principles in
guides/editorial-principles.md. The request records their sha256, so each review is tied to the guide version it used.
| Argument | Type | Description |
|---|---|---|
| draftPath? | string | Path to the draft, relative to the repo root (or absolute inside it). Leave empty to use draftText. |
| draftText? | string | Inline draft text, used when draftPath is empty. Stored in plaintext either way. |
| contentKind? | string | What the draft is, e.g. 'PR description' or 'blog post' |
| voiceModel? | string | Name of a @dougschaefer/writing-voice behavior whose prose rules, kill list and anti-patterns join the principles. Leave empty to skip. |
| maxBytes? | number | Refuse drafts larger than this many bytes |
| Argument | Type | Description |
|---|---|---|
| revisedDraft | string | The first pass's revisedDraft, wired from its cli_generate_many result |
Resources
Review a draft against the writing-editorial principles (Dreyer for correctness, Klinkenborg for the sentence, the anti-patterns and house style), optionally joined by a @dougschaefer/writing-voice profile. Claude, through the local claude CLI, returns structured findings and a revised draft; a second pass re-reviews the revision for violations that remain or were introduced. The attached workflow-scope report groups the findings by guide section, runs the sentence-shape self-check, and flags re
Editorial review findings grouped by guide section, the sentence-shape self-check, an economy warning when the revision grew, a diff, and the final revised draft.
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License2/2earned
- Verified public repository2/2earned