stetdoc

Let it stand.

stetdoc is how AI agents work in Word. Every change your agent makes lands in Word as a tracked change with its name on it, and everything it didn't touch comes back exactly as it was.

SuggestedOther ways to install

$ brew install clauseo-ai/tap/stetdoc

Free and open source, MIT or Apache-2.0.

msa.edited.docx

Clause 11. Payment

11.1 Payment for each Shipment of Products shall be due within deleted: thirty (30inserted: forty-five (45) days from the date of the Bill of Lading for the relevant Shipment (the “Due Date”). The amount payable shall be determined in accordance with the pricing provisions of Clause 5.

ClaudeDeleted: thirty (3031 Oct 2026, 08:24

11.2 Payment for each Shipment shall be made by the Buyer by means of an irrevocable documentary letter of credit, confirmed by a first-class international bank acceptable to the Seller.

$ stetdoc replace msa.docx 'due within thirty (30) days' 'due within forty-five (45) days'replace "due within thirty (30) days" with "due within forty-five (45) days": once, at p145 (clause 11.1)applied 1 operation, tracked as Claude 2026-10-31T08:24:25Zvalidated 1 unit: no problems, and this file needs no separate check.wrote msa.edited.docxmsa.docx is unchanged.
Unedited output from a 527-paragraph supply agreement. The edit took 20 milliseconds.

Word found unreadable content.

Every agent that edits a .docx's XML meets this dialog sooner or later. Word splits a sentence across many runs and stores tracked changes as XML structure. It refuses a file whose elements fall out of schema order. One slip in the XML and the document won't open.

stetdoc checks every edit against the schema and Word's own rules before it writes a byte. A batch of edits applies completely or not at all.

Microsoft Word

Word found unreadable content in contract.docx. Do you want to recover the contents of this document?

YesNo

validated 1 unit: no problems, and this file needs no separate check.

Done first, on every model.

We gave agents eight contract-editing tasks five ways: with stetdoc, with no plugin, with Anthropic's docx skill, with Anthropic's legal plugin and with Adeu. Then we opened every file they wrote in Word. The agents using stetdoc finished first on all three models.

Median time per task
ModelstetdocOther setups, fastest to slowest
Claude Haiku 5.521 s41 to 45 s
Claude Opus 5.525 s37 to 56 s
Gemini 3.8 Flash135 s274 to 538 s

docx-agent-bench, 639 runs in Claude Code 2.1.311 and Antigravity CLI 1.4.8. Five runs per task, medians per run, and every file opened in Microsoft Word for Mac 16.114.3.

  • 0 of 118 stetdoc runs that wrote a file Word offered to repair.
  • 6 of 6 long Harvey LAB markups, fully correct on every model.
  • 1 ms from launch to a ready MCP server.

Open, save, same bytes.

Run a document through stetdoc without editing it and you get the identical file back, byte for byte. Edit one clause and only that clause's elements change. Styles, numbering, comments, other people's tracked changes and macros stay where their authors left them.

We test this every night on about 48,000 documents from 77 public sources. Every build also puts 306 more through 50 random edit batches each.

p143

10.2 The Buyer shall, at its own cost and expense, maintain adequate insurance coverage for the Products from the point at which risk passes under Clause 10.1 through to the point of final delivery to the Buyer’s storage facilities or end customers.

p144

CLAUSE 11 — PAYMENT

p145 §11.1

11.1 Payment for each Shipment of Products shall be due within deleted: thirty (30inserted: forty-five (45) days from the date of the Bill of Lading for the relevant Shipment (the “Due Date”). The amount payable shall be determined in accordance with the pricing provisions of Clause 5.

p146

11.2 Payment for each Shipment shall be made by the Buyer by means of an irrevocable documentary letter of credit, confirmed by a first-class international bank acceptable to the Seller.

p147

11.3 The Buyer shall procure the issuance of the Letter of Credit not less than ten (10) Business Days prior to the first day of the loading window specified in the accepted Purchase Order for the relevant Shipment.

$ stetdoc unpack contract.docx && stetdoc pack contract.stet -o roundtrip.docx$ cmp contract.docx roundtrip.docx && echo identical

identical

It knows where 11.1 is.

Lawyers cite clauses by number. Word works those numbers out when it draws the page, so they appear nowhere in the file. stetdoc computes them, and a search hands your agent the clause, a stable paragraph ref and the exact text.

$ stetdoc view msa.docx --find 'thirty' --find 'governing law'p145 §11.1 …each Shipment of Products shall be due within thirty (30) days from the date of the Bill of Lading…p182 §14.3 …Party may terminate this Agreement by giving thirty (30) days' written notice to the other Party.…p211 §16.4(c) …22 (Dispute Resolution), Clause 23 (Governing Law), Clause 24 (Entire Agreement), and Clause…p272  CLAUSE 23 — GOVERNING LAW16 matches in 15 blocks

Twelve matches is not one.

replace matches text the way it reads, across bold, italics and run breaks. When the text appears more than once, stetdoc writes nothing and lists every match with its clause. Missing text gets the same refusal. stetdoc also refuses an edit aimed at a paragraph that changed after the agent read it, so a change never lands in the wrong place.

$ stetdoc replace msa.docx 'thirty (30) days' 'forty-five (45) days'error[ambiguous_match]: "thirty (30) days" is in the document 12 times, and it must be there once:p81 (clause 3.3) …d to the Seller not less than [thirty (30) days] prior to the first day of the…p126 (clause 7.5(a)) …cement to be completed within [thirty (30) days] of the date on which the non-…p145 (clause 11.1) … Products shall be due within [thirty (30) days] from the date of the Bill of …p182 (clause 14.3) …nate this Agreement by giving [thirty (30) days]' written notice to the other ……

next: Nothing was applied, so retry at once: to change every one, pass --all; to pick one place, pass --range with its ref, such as --range p81..p81, or make OLD longer so it matches once.

Hands off the XML.

stetdoc gives your agent the document as text, with a ref on every paragraph and a number on every clause. The zip and its XML stay with stetdoc. In Claude Code, the plugin adds a hook that stops Claude from unzipping a .docx, scripting it with python-docx or rewriting its XML. The only way into the file is the one stetdoc checks.

$ unzip -o msa.docx -d msa

stetdoc's guard blocked this: it opens a Word package with an archive tool. A Word file (.docx) is edited only through stetdoc, which records every change as a Word tracked change and leaves the rest of the file untouched. … Do not try another way around this.

One install for every agent you run.

stetdoc init puts its skill in Claude Code, Codex, Cursor, OpenCode, Copilot, Amp, Antigravity, Factory, Grok Build, Hermes, OpenClaw and cmx2. Agents that take tools instead of a shell get the same commands over MCP from stetdoc mcp. If you're building a product, the engine is also a Rust crate, stetdoc-core, and stetdoc mcp can serve it to cloud apps you host.

For agents

stetdoc is an open-source CLI, MCP server and Rust library that lets AI agents read and edit Word .docx files, with every edit recorded as a Word tracked change.

Install stetdoc and connect it to this agent. Run these yourself.1. brew install clauseo-ai/tap/stetdocWithout Homebrew, pick another channel at https://stetdoc.clauseo.chat/#install2. stetdoc --version
Show all five steps
3. stetdoc initThis puts the stetdoc skill in every agent it finds.4. To use stetdoc over MCP as well, register it with your agent:Claude Code: claude mcp add --scope user stetdoc -- stetdoc mcpCodex: codex mcp add stetdoc -- stetdoc mcpCursor: add {"mcpServers":{"stetdoc":{"command":"stetdoc","args":["mcp"]}}} to ~/.cursor/mcp.jsonAny other agent: stetdoc init --mcp prints the line for it5. Read https://stetdoc.clauseo.chat/docs/agents.md before you edit a document.

Install stetdoc.

Pick any channel. Every one installs the same binary.

Install with
$ brew install clauseo-ai/tap/stetdoc

macOS and Linux. Each call starts in about 5 ms.

$ uv tool install stetdoc

The wheel holds the native binary, so no Python runs after the install. Each call starts in about 5 ms.

$ pipx install stetdoc

The same wheel as uv. Each call starts in about 5 ms.

$ npm install -g stetdoc

npm swaps its Node launcher for the binary when install scripts run. Each call then starts in about 6 ms.

$ curl -fsSL https://raw.githubusercontent.com/clauseo-ai/stetdoc/main/packaging/install.sh | sh

macOS and Linux. It checks the SHA-256 and installs to ~/.local/bin. Each call starts in about 5 ms.

$ cargo install stetdoc --locked

Builds from source on crates.io, so it needs a Rust toolchain.

An agent can run stetdoc dozens of times in one task. Homebrew, uv, pipx and the install script put the binary itself on your PATH, so each call starts in about 5 ms. Through npx, every call starts Node and npm first, which costs a tenth of a second or more, so keep npx stetdoc mcp for the MCP server, which starts once per session.

Stet is the proofreader's mark for "let it stand". It goes under a word that was struck out by mistake, and the word stays.