Marklee

Annotations that travel
with the document.

A portable, format-agnostic annotation format for PDF, Markdown, and DOCX. Local-first sidecar JSON. Edit-tolerant text anchors. A directed lineage graph between snippets. MarkRank centrality over your reading.

Universal binary · macOS Intel + Apple Silicon · ~8.5 MB · unsigned dev build

What it is

The anchor layer for documents.

Six things Marklee gives you that a notes app or PDF reader doesn't.

Portable annotations

Plain JSON sidecars next to the source. No server, no account. Email someone paper.pdf + paper.pdf.annot.json — they get your annotations, fully.

Edit-tolerant anchoring

A normative four-tier algorithm finds your highlight even after the source has been edited: text + context → exact → fuzzy in section → orphaned.

Lineage graph

Connect snippets with labeled edges — supports, contradicts, elaborates. The graph is first-class data. MarkRank surfaces the most-cited ideas.

Permalinks

Share one annotation as a URL. Hash + anchor + optional text/context; the receiver opens the source PDF and lands on the right region. Like HTML #:~:text= Text Fragments — for documents.

Cross-format

One snippet schema covers PDF, Markdown, DOCX, and plain text. Lineage view mixes a page-3 PDF quote with a §Methods Markdown snippet on the same canvas.

Open spec

Every implementation detail in SPEC.md + a JSON Schema you can validate sidecars against in CI. The format is the contract; the tools are interchangeable.

How it works

Highlight, anchor, share.

Three views from inside Marklee. Drop your own screenshots into the placeholders below — see the comments in landing/index.html for what to capture and the suggested aspect.

① Capture by selection or drop

Drag-select text in any document to make a snippet. Drag a sticker from the groups panel onto a snippet to tag it. Paste from anywhere — text or image — directly into the workspace.

landing/screens/01-capture.png Whole window — annotated PDF + snippet pane + dock

② See your reading as a graph

The lineage view turns the snippets into a directed labeled graph — docs on the left, snippets in the middle, groups on the right. Edges you draw between snippets show your reasoning. MarkRank ranks them by graph centrality.

landing/screens/02-lineage.png Lineage view — doc → snippet → group columns with edges

③ Share a single annotation as a URL

Click share on any snippet. The Marklee Permalink format encodes hash + page + anchor + optional text/context. The receiver opens the source and lands on the right region — even if the source has been lightly edited since.

landing/screens/03-permalink.png Snippet card + share button + the URL it generates
The format

JSON, next to the source. That's it.

One sidecar per document. Every snippet, edge, and group lives inside. Self-describing, version-controllable, scriptable.

{
  "markleeVersion": "0.1",
  "kind":           "document",
  "source": {
    "path":        "genome.pdf",
    "kind":        "pdf",
    "contentHash": "sha256:ab12cd34…"
  },
  "snippets": [
    {
      "id":            "3f7e…",
      "page":          12,
      "text":          "Humans share roughly 98.8% of their DNA with chimpanzees.",
      "contextBefore": "…comparative genomics has revealed that ",
      "contextAfter":  " The remaining 1.2% accounts for…",
      "anchor":        "Chapter 3 > Common ancestors",
      "comment":       "Worth re-checking against the 2023 update.",
      "groups":        ["evidence", "biology"]
    }
  ],
  "edges": [
    {
      "source": "3f7e…",
      "target": "a9b2…",
      "label":  "supports"
    }
  ],
  "groups": [
    {
      "id":   "evidence",
      "name": "Evidence"
    }
  ]
}
Where it shines

Five reading workflows that get easier.

Marklee was built for situations where annotations need to live with the file, survive edits, and link to other ideas — not be locked inside a proprietary reader.

Literature review

Pull together quotes from twelve PDFs into a single workspace. Drag snippets from each into themed folders — methods, limitations, open questions. MarkRank surfaces the ideas the corpus references most.

Contract review

Anchor concerns to specific clauses with the exact quoted text plus context window. When the counterparty edits the surrounding language, your comments still resolve — the four-tier algorithm finds them.

Research synthesis

Connect a quote in paper A to a counter-claim in paper B with a labeled edge — supports, contradicts, elaborates. The lineage view shows your evolving argument as a graph, not a flat list.

Mixed-format research

A workspace that mixes PDF papers, Markdown notes, a DOCX policy memo, and plain-text scratch files — all annotated with the same snippet schema. Cross-document lineage works regardless of source kind.

Shareable citations

Right-click any highlight → copy share link. The URL encodes the document hash plus the anchor; the recipient opens the same source and lands on the exact passage. No server, no account, no expiry.

Why a new format

Edit-tolerant anchoring is the gap.

Existing annotation formats either lock you into a server, hard-code byte offsets that break, or stop at one document type. Marklee fills the space between them.

Marklee W3C WADM XFDF Hypothesis Sciwheel
PDF + Markdown + DOCX~PDF onlyHTML mostlyPDF + HTML
Sidecar / portableserverXMLservercloud-only
Edit-tolerant anchors4-tierpartialbyte offsetTextQuoteunknown
Labeled-edge graphreplies only
Per-annotation permalinkdefinedURIpage-only
Centrality algorithmMarkRank

Status

v0.1, working draft. Spec stable enough to write tools against; format may change incompatibly until 1.0. Reference implementation is the desktop app on this page. The web build (browser-mode + permalink bootstrap) and Chrome extension are next.

Built local-first because the data model demands it. Nothing about Marklee requires a server, and nothing it does will ever require an account.