Connect evidence items to structured targets such as form fields, claims, requirements.
Find a file
codex 4f115e38b8
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s
fix(workplans): adopt ADR-007 derived identifiers for unregistered records
These workplans exist only in the retired local hub. Their random pre-ADR-007
identifiers are refused by C-06 as stale references, so they cannot be
registered. Deriving from the canonical record id takes no identity from
anything: central does not hold them and the old ids die with the cache.

Records central already holds were deliberately left untouched.

Refs CUST-WP-0068-T06

Assistant: claude-code
Assistant-Model: opus
Assistant-Process: 2583210@bnt-lap001
Assistant-Session: f2bff2d5-e9b2-4338-92ca-10282a927006
2026-08-25 20:09:52 +02:00
.claude/rules docs: workplan-first agent guidance prose (CUST-WP-0055 T04 batch 5) 2026-07-08 19:51:22 +02:00
.forgejo/workflows Add Forgejo CI smoke workflow (enablement template) 2026-07-08 12:31:21 +02:00
docs Extract binder package from citation-evidence (EBIND-WP-0001) 2026-07-09 01:36:33 +02:00
registry Align capability index domain 2026-08-21 11:59:37 +02:00
src Repair capability federation index 2026-08-21 08:58:31 +02:00
workplans fix(workplans): adopt ADR-007 derived identifiers for unregistered records 2026-08-25 20:09:52 +02:00
.custodian-brief.md chore(consistency): sync task status from DB [auto] 2026-08-25 19:50:04 +02:00
.gitignore Extract binder package from citation-evidence (EBIND-WP-0001) 2026-07-09 01:36:33 +02:00
.nvmrc Extract binder package from citation-evidence (EBIND-WP-0001) 2026-07-09 01:36:33 +02:00
.repo-classification.yaml Add .repo-classification.yaml (CUST-WP-0050 T11 agent first-pass) 2026-06-22 17:47:36 +02:00
AGENTS.md docs(agents): repoint remote State Hub URL to the in-cluster address 2026-08-25 00:20:56 +02:00
CLAUDE.md Normalize agent instructions and workplan frontmatter (STATE-WP-0067) 2026-06-22 23:16:24 +02:00
eslint.config.js Extract binder package from citation-evidence (EBIND-WP-0001) 2026-07-09 01:36:33 +02:00
INTENT.md Extract binder package from citation-evidence (EBIND-WP-0001) 2026-07-09 01:36:33 +02:00
LICENSE Adopt Target Revenue Source License V1C1 (org-wide preliminary rollout) 2026-07-30 00:07:31 +02:00
package.json Extract binder package from citation-evidence (EBIND-WP-0001) 2026-07-09 01:36:33 +02:00
pnpm-lock.yaml Extract binder package from citation-evidence (EBIND-WP-0001) 2026-07-09 01:36:33 +02:00
README.md Extract binder package from citation-evidence (EBIND-WP-0001) 2026-07-09 01:36:33 +02:00
SCOPE.md Close capability federation repair workplan 2026-08-21 23:09:13 +02:00
tsconfig.json Extract binder package from citation-evidence (EBIND-WP-0001) 2026-07-09 01:36:33 +02:00
vitest.config.ts Extract binder package from citation-evidence (EBIND-WP-0001) 2026-07-09 01:36:33 +02:00
WORK-RECORDS.md Close capability federation repair workplan 2026-08-21 23:09:13 +02:00

evidence-binder

@citation-evidence/evidence-binder — connect evidence items to structured targets (form fields, claims, requirements, …) and render the visual guide that ties a target, its evidence card, and the source highlight together.

This is the canonical home of the binder implementation, extracted from citation-evidence/src/binder/ (EBIND-WP-0001).

What this package owns

  • Evidence linksEvidenceLink repository + binding service (services/bindings.ts, repos/in-memory-links.ts). Two query directions: all evidence for a target and all targets for an evidence item. Emits the canonical engine bus events (EvidenceLinkCreated/Updated/Removed, EvidenceItemActivated).
  • Active state — the (activeTarget, activeEvidenceItemId, activeAnnotationId) machine and React provider (state/active.ts) that the form UI, evidence sidebar, and viewer adapter coordinate through.
  • Rect registry contract (SharedContracts §7) — a single registry into which independent renderers publish field / evidence-card / highlight rects, plus the change pumps, React hooks, and the SVG Overlay that draws the guide (visual-guide/).
  • Reference form UIFormRenderer and FieldDefinitionForm, kept as supported, target-neutral exports (see docs/adr/ADR-0001-reference-ui-surface.md).

BinderProvider composes all four concerns behind one mount.

Dependency boundary

Per citation-evidence/wiki/DependencyMap.md §2, this package may depend on citation-engine and evidence-anchor, and must not depend on evidence-source, citation-work, or the umbrella citation-evidence. The MVP slice imports only citation-engine (shared types + event bus). The boundary is enforced by eslint.config.js. Shared-contract authority stays in the umbrella wiki.

Develop

pnpm install        # links @citation-evidence/engine from ../citation-engine
pnpm test           # vitest (node + happy-dom suites)
pnpm typecheck      # tsc -b --noEmit
pnpm lint           # eslint (enforces the dependency boundary)

Requires a sibling checkout of citation-engine (see .nvmrc for the Node version). See docs/extraction-inventory.md for the extraction boundary and resolved contract deltas.