Writing Tool · AI Pattern Detector · Operate Surface · 2026 · Solo — pattern engine (lib/pattern-engine.ts), annotation renderer, per-annotation accept/reject with position-delta recomputation, paragraph heatmap rail, Operate surface design, TDD (22 tests), Vercel production deployment

Prose Sharp

Pure-TypeScript inline annotation engine: 12 AI-writing pattern detectors using character-position regex matching, per-annotation accept/reject with offset-delta accumulation to recompute all subsequent annotation positions after each edit, and a paragraph-density heatmap rail (color-coded bins: rose/amber/green) — all browser-local, zero network calls.

The problem

AI-generated prose carries recognizable fingerprints — hedging qualifiers, empty intensifiers, passive voice, pseudo-profound abstractions — that editors and writers want to spot and fix inline rather than receive as a bulk rewrite score or a one-shot batch replacement.

Architecture

Key decisions

01

Position-delta accumulation for accept/reject

When a user accepts a fix that changes text length, every subsequent annotation's start and end positions shift by the character delta of the substitution. applyFix() computes this delta and adjusts all downstream annotations in a single pass, keeping the overlay coherent without re-running the full pattern engine on the modified text.

02

Per-annotation fix over batch rewrite

A batch rewrite would replace all detected patterns at once, stripping the user's agency over which suggestions to accept. Per-annotation accept/reject preserves the original text for rejected patterns, giving writers editorial control over each fix.

03

12 named pattern types over a score

A readability score is opaque — the user cannot act on it. Naming each pattern (hedging, filler intensifier, passive, pseudo-profound qualifier, etc.) lets the user understand exactly what fired and why the fix is appropriate.

04

Browser-local over LLM API

All 12 detectors are deterministic regex rules. No LLM call is needed for the detection or the fix suggestions, keeping latency near-zero and preserving privacy — no prose text leaves the browser.

Metrics

22 tests
TDD tests covering all 12 pattern detectors and the offset-delta accumulator
12 patterns
AI-writing pattern types detected: hedging, filler intensifiers, passive, pseudo-profound, and more
0/10
Slop audit score