Skip to content
Ahmed Hamza

Flagship independent browser-extension project

PromptReady

A local-first Chrome extension for turning rendered pages into source-aware Markdown, now using Defuddle extraction, DOMPurify, Joplin Turndown, and deterministic parity evaluation.

WXTReactTypeScriptChrome MV3DefuddleJoplin TurndownDOMPurify

Repository snapshot

PromptReady

Offline-first webpage capture to structured Markdown.

Commits
215
Status
Published
Capture
Offline-first

Work done

Defuddle extractionJoplin TurndownQuality-gated AI cleanup

PromptReady

A clean Markdown export is only useful if the source survived the pipeline.

PromptReady Defuddle extraction pipeline Rendered page capture moves through Defuddle HTML extraction, DOMPurify sanitization, Joplin Turndown conversion, canonical Markdown finalization, and optional quality-gated AI cleanup. PromptReady / current extraction authority CAPTURE ONCE · EXTRACT ONCE · CONVERT ONCE · FINALIZE ONCE Settled pagedocument + metadata DefuddleHTML extraction DOMPurifysanitize HTML Joplin TurndownHTML → Markdown Canonical Markdownmetadata + finalizer Optional AI cleanupreceives finalized offline Markdown Quality gaterejects cleanup that loses source structure PARITY WORKPlain Markdown is a quality reference; PromptReady keeps its own offscreen architecture.
The current pipeline has one extraction authority and one invoked Markdown-conversion authority; optional AI starts after the offline document exists.

The product boundary stayed local-first

PromptReady captures the active page and turns articles, documentation, discussions, research sources, notes, and everyday prompt context into Markdown and structured JSON.

Core capture, cleanup, Markdown export, and JSON export run locally. Optional AI cleanup is BYOK through OpenRouter and starts from the finalized offline Markdown rather than raw page HTML.

The core rule has not changed: AI is allowed to clean the document; it is not allowed to become the extraction engine.

The extraction architecture did change

Earlier portfolio notes described a Readability-style extraction path. That is no longer the current implementation.

PromptReady now pins defuddle@0.19.1 and uses Defuddle as the sole content-extraction engine. Defuddle returns HTML. PromptReady deliberately keeps Defuddle’s Markdown output disabled so the active conversion path stays explicit:

settled captured document
  -> offscreen Defuddle extraction
  -> DOMPurify HTML boundary
  -> Joplin Turndown conversion
  -> one canonical Markdown finalizer
  -> cache / export / optional AI cleanup

Strategies can change Defuddle reply handling or output formatting. They do not switch to a second extractor.

Why one extractor matters

The older architecture accumulated fallback and cleanup logic because difficult pages kept exposing new failure modes. More branches made individual cases easier to patch and the system harder to reason about.

The current direction is stricter: give Defuddle one coherent document, preserve the browser-extension process boundaries, sanitize once, convert once, finalize once, and make the evaluation corpus the release authority.

That also makes failures easier to localize. If content disappears, the system can inspect whether the loss happened during capture, Defuddle extraction, sanitization, Turndown conversion, or finalization instead of hiding everything behind a generic quality score.

Plain Markdown is a reference, not a code path

I am also using the local plain-markdown artifact as a quality reference for difficult extraction cases.

The goal is semantic/output parity where it matters, not copying Plain Markdown’s implementation topology or minified bundle. PromptReady keeps its own offscreen architecture, pinned Defuddle runtime, DOMPurify boundary, Joplin Turndown conversion, recovery policy, citation metadata, and deterministic cache contract.

The parity-hardening program is still in progress. Phase 0 established the deterministic corpus and repaired several extraction contracts; the broader program has not been presented as complete.

That distinction belongs on the public page because “we are evaluating against a stronger reference” is not the same claim as “we reached parity.”

The eval corpus is the useful proof

The current Phase-0 authority covers deterministic cases for articles/head metadata, GitHub/code/table structure, Reddit and old-Reddit ordering, Discourse and Hacker News threads, liveblogs, complex tables, hostile markup, client-rendered documentation, and bounded provider recovery.

The release question is not “did the Markdown get longer?” It is whether required content, order, structure, URLs, and safety invariants survive consistently.

That is a much better target than a subjective cleanliness score.

Optional AI still has to earn acceptance

When BYOK AI cleanup is enabled, it receives the offline Markdown as source context. The result is checked against the local baseline before it is accepted.

If cleanup loses headings, technical tokens, code structure, or too much source material, PromptReady keeps the local result instead of shipping the prettier but weaker document.

This keeps the product useful without an API key and keeps AI failure from erasing the deterministic path.

Current boundaries

PromptReady is not a crawler, website mirror, hosted content store, provider marketplace, or layout-preserving renderer. Deep capture can help with long or lazy-loaded pages, but it does not make every site extractable.

The current hardening work is intentionally unfinished. Difficult social/app pages, extraction policy, and parity evidence still need to be earned by the corpus rather than claimed from a demo.