SMF·LEX
Can a prompt replace Lex?
AI writing — AI drafting, research and content optimization
Exhibit tracking slip
Verdict
The AI part is easy: send the paragraph, get a continuation or a critique back. The document part is not. Lex is a real editor with version history, threaded comments and shareable drafts, and rebuilding that layer properly is a multi-day job before any model is wired in. A personal build gets you the writing loop; it does not get you the thing you hand to an editor for comments.
Exhibit A — The prompt
Received on31.07.2026Build a local writing app for long-form drafts where AI actions operate on the document itself rather than in a separate chat panel.
Core loop: a two-pane Markdown editor (source left, rendered preview right) over a folder of .md files on disk. Three AI actions, each bound to a keyboard shortcut and each scoped differently:
1. Continue — takes the last 800 words before the cursor and drafts the next paragraph in the same voice, inserted inline as a suggestion the user accepts or rejects.
2. Rewrite selection — takes the highlighted passage plus a short instruction typed by the user ("tighter", "less formal", "cut by half") and returns a replacement shown as a word-level diff.
3. Critique — sends the whole document and returns structured feedback: where the argument is thin, which paragraphs repeat each other, which claims are asserted without support. Render it as a list anchored to line numbers, not as prose.
Write a snapshot into a .history/ directory on every save so any past version can be diffed and restored from inside the app. Use Anthropic or OpenAI, whichever key is present in the environment. With no key configured the editor and the version history must still work completely; only the three AI actions are disabled, with a message saying why.
Out of scope: multi-user editing, comment threads with replies, share links, and any hosted backend. This is a single-writer tool over local files.
Opening prefills the prompt — press enter to run it.
Exhibit B — What you lose
- B.1 threaded comments and shareable review links
- B.2 real-time collaborative editing
- B.3 rich-text editor polish (tables, footnotes, paste fidelity)
- B.4 cross-device sync of drafts in progress
Prior art
Exhibit C — Why people still pay: workflow, data, and model tuning
Because Lex is where the writing actually happens, and an editor you trust with a manuscript has to be boringly reliable: undo that always works, paste that never mangles formatting, a draft that is still there tomorrow on another machine.
Questions
Can I move my existing Lex documents over?
Lex exports documents as Markdown and this build reads a folder of Markdown files directly, so it is a copy rather than a migration. What does not come across is comment history, which lives in Lex's database and not in the exported text.
How much does it cost to run?
Only the model calls. Continuations and rewrites send a few hundred words at a time and cost fractions of a cent. The whole-document critique is the expensive one: on a 5,000-word draft it lands in the low tens of cents. A heavy writing day still comes in under a dollar.
Is the AI any good without Lex's own tuning?
For continuing and rewriting, yes, that is the model doing what models are good at. Lex's advantage is a prompt layer refined against a lot of real manuscripts, so its critiques are more consistently useful than a first-draft prompt of your own. Budget time for tuning the critique prompt before it earns its keep.
What breaks the moment someone else needs to read the draft?
Everything collaborative. There is no link to send, no place for a reader to leave a comment, and no way to watch their edits arrive. You are back to emailing a file and merging notes by hand, which is the workflow Lex exists to end.
Related tools
Receipt