Post WP-0002/0003 hygiene: update docs and archive finished workplans
Some checks are pending
CI Smoke / host-smoke (push) Waiting to run
CI Smoke / container-smoke (push) Waiting to run

Refresh README and SCOPE to reflect stale/fuzzy/DOM capabilities. Move
EANCH-WP-0001 through EANCH-WP-0003 to workplans/archived/260709-*.
This commit is contained in:
tegwick 2026-07-09 09:29:50 +02:00
parent a1af0c6a45
commit 113358c13c
5 changed files with 30 additions and 33 deletions

View file

@ -21,9 +21,10 @@ The anchor slice has been extracted from the umbrella and now lives here.
`@anchor` alias is retired. Shared-contract changes still happen in the umbrella
(`citation-evidence/wiki/`), not here.
Remaining anchor work beyond this MVP slice (stale/orphan semantics, fuzzy
re-anchoring, HTML/Markdown selectors, promoting the PDF spike to a production
adapter) is tracked as follow-on work — see `workplans/`.
EANCH-WP-0002 and EANCH-WP-0003 delivered stale/orphan/fuzzy resolution,
`PdfViewerAdapter`, and HTML/Markdown selectors plus `evidence-anchor/dom`.
Remaining work (FragmentSelector, umbrella viewer wiring) is tracked in
`workplans/`.
## Install model
@ -44,20 +45,19 @@ src/
HighlightRenderOptions, DocumentViewerAdapter
css.d.ts ambient decl for side-effect .css imports
selectors/ pure core — no viewer/UI deps
index.ts createSelectors, resolveSelectors, DEFAULT_CONTEXT_CHARS
create.ts selector creation from a captured selection
resolve.ts resolution + the exact-match confidence ladder
create.test.ts
resolve.test.ts
pdf/ adapter boundary — the only place viewer libs live
index.ts createSelectors, resolveSelectors, fuzzy, orphan helpers
create.ts selector creation (PDF + DOM branches)
resolve.ts resolution ladder + stale/fuzzy recovery
fuzzy.ts / orphan.ts / dom-path.ts
*.test.ts
pdf/ PDF adapter boundary
index.ts subpath entry `evidence-anchor/pdf`
pdf-selector-math.ts pure page + normalized-rect math (capture↔selectors)
pdf-selector-math.test.ts
pdf-viewer-adapter-spike.tsx concrete PDF adapter (PdfSpikeViewer)
scroll-job.ts retryable scroll-to-highlight helper
scroll-job.test.ts
highlight-styles.css highlight rendering styles
debug-textlayer.css optional text-layer debugging styles
pdf-viewer-adapter-spike.tsx PdfViewerAdapter (+ PdfSpikeViewer alias)
pdf-selector-math.ts / scroll-job.ts / *.css
dom/ HTML/Markdown adapter boundary
index.ts subpath entry `evidence-anchor/dom`
html-viewer-adapter.tsx HtmlViewerAdapter
dom-path.ts Range ↔ DomNodePath serialization
```
Boundary rules for the layout (enforced by `eslint.config.js`):
@ -70,10 +70,9 @@ Boundary rules for the layout (enforced by `eslint.config.js`):
creation/resolution, the adapter types/contract, and the PDF adapter — so
consumers resolve every anchor symbol (and their test `vi.mock(...)` calls)
from a single specifier, matching the umbrella's prior `@anchor/index`;
- a focused, viewer-free entry is also published at **`evidence-anchor/pdf`**
for consumers that want the PDF surface explicitly. The concrete adapter is
still the explicitly-named `PdfSpikeViewer` spike; promoting it to a
production `PDFViewerAdapter` is registered follow-on work (T06).
- focused subpath entries: **`evidence-anchor/pdf`** (PDF adapter) and
**`evidence-anchor/dom`** (HTML/Markdown adapter). The root barrel re-exports
both for consumers that want a single import path.
## Public API (target surface)

View file

@ -28,9 +28,10 @@ guess. It also owns the `DocumentViewerAdapter` contract every viewer implements
- selector **creation** from a captured viewer selection (`createSelectors`)
- selector **resolution** against a document representation (`resolveSelectors`)
- the exact-match confidence ladder and selector-redundancy rules
- the exact-match confidence ladder, fuzzy recovery floor, and selector-redundancy rules
- PDF selector math (page number + normalized page rectangles, page-local text)
- the format-neutral `DocumentViewerAdapter` contract and the first PDF adapter
- DOM/structural selector creation and resolution for HTML/Markdown
- the format-neutral `DocumentViewerAdapter` contract, the PDF adapter, and the HTML viewer
- scroll-to-target and highlight-render contracts + helpers
- anchor confidence scoring and ambiguous/unresolved/stale reporting
@ -50,14 +51,11 @@ Selector *behavior* lives here; selector *type interfaces* live in
During the umbrella-first MVP these belong to the appropriate citation-evidence
subsystem. This repo may depend on **`citation-engine` only** (DependencyMap §4).
### Not in this extraction slice (EANCH-WP-0001)
### Still deferred (beyond EANCH-WP-0002 / EANCH-WP-0003)
- full HTML/Markdown (`DomSelectionCapture`) selector implementation
- production-grade fuzzy / recovery-oriented re-anchoring
- `stale` and orphaned-annotation semantics beyond what upstream already ships
These are real INTENT.md goals but are **registered as follow-on work**, not
built during the initial extract-and-verify pass.
- `FragmentSelector` (export-only deep links)
- wiring `HtmlViewerAdapter` into `citation-work` / the umbrella review shell
- human-confirmation UI for ambiguous/fuzzy matches
---
@ -80,10 +78,10 @@ built during the initial extract-and-verify pass.
## Current State
- Status: experimental — extracting from the umbrella into a standalone package
- Implementation: partial — pure selector + PDF adapter slice exists upstream in
`../citation-evidence/src/anchor/`; extraction tracked by EANCH-WP-0001
- Stability: evolving — shared contracts stable, this repo's package API forming
- Status: active — standalone package consumed by `citation-evidence`
- Implementation: PDF + HTML/Markdown selector paths, stale/orphan/fuzzy resolution,
`PdfViewerAdapter`, and `HtmlViewerAdapter` (`evidence-anchor/dom`)
- Stability: evolving — shared contracts stable; viewer wiring in the umbrella is next
- Usage: internal (consumed by `citation-evidence` during MVP)
---