Files
citation-evidence/workplans
tegwick 2a7b05c190 Implement CE-WP-0002 T01-T02: engine types + PDF viewer adapter spike
T01: shared engine types (Document, Selector union, Annotation, EvidenceItem,
branded IDs with newId factory) per wiki/SharedContracts.md §1-§3.

T02: react-pdf-highlighter-plus v1.1.4 spike behind the §5
DocumentViewerAdapter contract in src/anchor/. Pure round-trip math
extracted to pdf-selector-math.ts with 11 unit tests proving lossless
capture → selectors → JSON → restored-rects. ADR-0004 accepted; full
user-flow Playwright verification deferred to T09.

Adds Vite app shell (index.html, src/app/SpikeApp.tsx) so the spike is
exercisable via pnpm dev. tsconfig --noEmit prevents tsc -b from
littering src/ with stray .js outputs.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 02:21:31 +02:00
..

MVP Workplans

These four workplans implement the first reference scenario from wiki/ProductRequirementsDocument.md §20 — end-to-end PDF evidence capture → form binding → citation card export — entirely inside the citation-evidence repository.

Workplan Title Status
CE-WP-0001 Foundations — scaffold, folders, lint rules, normalize, fixtures todo
CE-WP-0002 PDF review slice — engine types, anchor, source, viewer, sidebar todo
CE-WP-0003 Form binding + visual guide — EvidenceLink, rect registry, overlay todo
CE-WP-0004 Citation card export — Markdown + HTML renderers, sidebar export todo

Order

Strictly sequential. CE-WP-0002 depends on the folder/lint scaffolding from CE-WP-0001. CE-WP-0003 and CE-WP-0004 depend on the engine types, viewer adapter, and sidebar from CE-WP-0002.

How to run a workplan

/ralph-workplan workplans/CE-WP-0001-foundations.md

Ralph drives the loop and retires automatically when all tasks in the workplan are marked done. See ~/.claude/plugins/ralph-workplan/ralph-workplan.md.

Acceptance for MVP

The first reference scenario from PRD §20 runs end-to-end:

  1. Create a collection
  2. Upload a PDF
  3. Select a passage, add commentary, create an evidence item
  4. Open a side-by-side form
  5. Link the evidence item to a form field
  6. Focus the field → field, evidence card, and PDF passage all highlighted
  7. SVG guide visible between field → card → highlight
  8. Export evidence as a Markdown citation card