Danish-first writing linter, agent-driven rubric scoring, sentence-level naturalness rewrites, and a portable writer profile that moves between machines.
pks writing <command> [options]$ pks writing initCreate the global and per-project writing layout
$ pks writing lint blog-posts/Deterministic anglicism pass over a folder
$ pks writing prompt post.mdEmit a critique prompt bundle for your own LLM
$ pks writing accept post.md --from reply.jsonValidate the reply and write the report sidecar
$ pks writing naturalness review post.mdPick sentence rewrites interactively
pks writing is the writing side of the pks CLI: a Danish-first terminology linter, an LLM-agnostic critique loop, a sentence-level rewrite loop, and a writer profile that carries all of it between machines. It exists because generic grammar tools do not know your voice, and because a critique that vanishes after one post teaches nothing.
The commands split into two independent flows that share one profile store. The first flow is terminology and rubric work: lint finds anglicisms deterministically, prompt and accept run a full rubric critique through an agent's own model, and learn, corpus, and apply turn accumulated findings into permanent profile entries. The second flow is naturalness — a finer-grained loop that flags awkward sentences, proposes three labelled rewrites each, and lets you pick one.
prompt emits a bundle, the agent calls its own LLM, accept validates the reply against a JSON schema. Only the deprecated score spawns a local claude process.~/.pks-cli/writing/; per-project overrides live in ./.pks/writing/.pks writing lint scans markdown against your anglicism list and allowlist, writes a report sidecar per file, and exits 0 regardless of finding count so it never breaks a build — it only exits 1 if the profile's anglicism list is empty (run pks writing init first).pks writing prompt bundles the post body, writer profile, channel rubric, and reference samples into one JSON payload; pks writing accept validates the reply against a five-dimension schema before persisting it.pks writing learn proposes profile edits from findings, pks writing corpus keeps only terms recurring across several posts, and pks writing apply commits the accepted ones to the global profile.pks writing naturalness flags awkward sentences, collects three labelled alternatives per sentence from one or more named critics, and applies your picks in place with a versioned archive of the original.pks writing profile export and import move the entire learned profile as a single .tgz.Start with pks writing init, which creates ~/.pks-cli/writing/ and seeds a profile.md template. Author that profile — either by hand in your editor or by pasting the profile prompt output into a chat session and ingesting the JSON reply. From then on, every other command reads that profile.
For a single post the loop is: lint for free deterministic findings, then prompt → your LLM → accept for the rubric critique. Both write into <postdir>/_review/<stem>.WRITING-REPORT.{json,md}. When the report has taught you something worth keeping, learn turns it into a <stem>.LEARN.json proposal with per-action accept flags, and apply commits the ones still flagged true.
The naturalness loop is separate and runs on the same file: naturalness prompt → your LLM → naturalness accept writes a per-critic candidates sidecar and merges all critics into a canonical one, naturalness review walks it interactively, and naturalness apply rewrites the source markdown.
init · lint · score (deprecated) · prompt · accept · learn · apply · corpus · skill install · profile show · profile author · profile prompt · profile ingest · profile export · profile import · naturalness prompt · naturalness accept · naturalness review · naturalness apply · naturalness merge · naturalness patterns show · naturalness patterns export
Full flag surface for every command is on the pks writing CLI reference.
| Command | What it does |
|---|---|
pks writing init | Creates the global and per-project writing layout. |
pks writing lint | Deterministic anglicism pass over a file or folder. |
pks writing prompt | Emits a rubric-critique prompt bundle for an agent's own LLM. |
pks writing accept | Validates the critique reply and writes the report sidecar. |
pks writing score | Deprecated one-shot lint plus critique via a local claude process. |
pks writing learn | Turns report findings into a reviewable profile-edit proposal. |
pks writing corpus | Aggregates per-post proposals, keeping only recurring terms. |
pks writing apply | Commits accepted proposal actions to the global profile. |
pks writing skill install | Installs the bundled skill so Claude Code discovers the workflow. |
pks writing profile … | Shows, authors, ingests, exports, and imports the writer profile. |
pks writing naturalness … | Sentence-level rewrite loop plus the learned-patterns store. |
lint, prompt, and accept cycle in detail, including the reply schema.Turn accumulated lint and critique findings into permanent writer-profile entries, with a corpus step that filters out one-off false positives first.
pks writing learn <path> && pks writing apply <proposal>
Flag awkward sentences, collect three labelled rewrites each from one or more critics, pick interactively, and apply them in place with a versioned archive.
pks writing naturalness <prompt|accept|review|apply|merge|patterns>
Author, inspect, ingest, and move the writer profile that every pks writing command reads — including the cowork bootstrap and the portable tarball handoff.
pks writing profile <show|author|prompt|ingest|export|import>
Bootstrap the writing store, author a writer profile, run a deterministic anglicism lint, and get a full rubric critique from your own LLM in one pass.
pks writing init && pks writing lint post.md
Complete command, flag, argument, exit-code, and file-path reference for the pks writing group — lint, score, learn, profile, and naturalness.
pks writing <command> [options]
Run the deterministic anglicism lint, then drive a full rubric critique through your own LLM with the prompt and accept pair instead of score.
pks writing lint <path> && pks writing prompt <file>