Skip to main content

Editorial Review

@webframp/editorial-reviewv2026.10.21.1· Apache-2.0· 5d agoBEHAVIORSWORKFLOWSREPORTS
01README

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-review
02Release Notes

Release Notes — @webframp/editorial-review

2026.10.21.1

Initial release.

Added

  • Model @webframp/editorial-review. prepare resolves 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, when voiceModel is set, a @dougschaefer/writing-voice profile. recheck builds 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/claude cli_generate_many with a JSON schema and followed by an assert on the answer's shape. The model (claude-opus-5-5 by 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.
03Behaviors1
@webframp/editorial-reviewv2026.10.21.1editorial-review/mod.ts
fn prepare(draftPath?: string, draftText?: string, contentKind?: string, voiceModel?: string, maxBytes?: number)
Resolve the draft, load the bundled principles and an optional writing-voice profile, and write the first-pass review request
ArgumentTypeDescription
draftPath?stringPath to the draft, relative to the repo root (or absolute inside it). Leave empty to use draftText.
draftText?stringInline draft text, used when draftPath is empty. Stored in plaintext either way.
contentKind?stringWhat the draft is, e.g. 'PR description' or 'blog post'
voiceModel?stringName of a @dougschaefer/writing-voice behavior whose prose rules, kill list and anti-patterns join the principles. Leave empty to skip.
maxBytes?numberRefuse drafts larger than this many bytes
fn recheck(revisedDraft: string)
Write the second-pass request: re-review the first pass's revised draft for violations that remain or were introduced
ArgumentTypeDescription
revisedDraftstringThe first pass's revisedDraft, wired from its cli_generate_many result

Resources

request(infinite)— A prepared review request: the draft, principle and voice hashes, and the cli_generate_many request
04Workflows1
@webframp/editorial-review5de5172a-25bd-4be6-8d28-8f3acbebcb29

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

prepareResolve the draft, load the bundled principles and the optional voice, and write the first-pass request.
1.prepare— Write the review request with hashes and prompts.
reviewFirst pass. Claude applies the principles to the draft.
1.review— One headless claude CLI call. The principles are the system prompt, the draft is the user prompt, and the answer must match the request's JSON schema. The request is a method input, not a global argument, so it resolves when the step runs, after prepare has written it.
2.assert-review-shape— The first pass returned a findings list and a revised draft.
recheckSecond pass. Re-review the revised draft for violations that remain or that the revision introduced. Skipped when recheck is false.
1.prepare-recheck— Write the second-pass request from the revised draft.
2.recheck-review— Second headless claude CLI call over the revised draft.
3.assert-recheck-shape— The second pass returned a findings list and a revised draft.
05Reports1
@webframp/editorial-reviewworkflow
editorial_review.ts

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.

writingeditorialprose
06Stats
A
100 / 100
Downloads
10
Archive size
35.5 KB
  • 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
07Platforms
08Labels