Extract binder package from citation-evidence (EBIND-WP-0001)
Extracts citation-evidence/src/binder/ into this repo as the standalone @citation-evidence/evidence-binder package: headless binding service + in-memory link repo, active-state machine, the SharedContracts §7 rect-registry contract (registry, change pumps, hooks, SVG overlay), and the target-neutral reference FormRenderer. - toolchain mirrors sibling extracted repos (pnpm/tsc/vitest/eslint); imports rewritten from @shared/@engine aliases to the engine's @citation-evidence/engine package specifiers - dependency boundary (engine + anchor only; no source/work/umbrella) enforced via eslint no-restricted-imports - docs: extraction inventory + contract deltas, ADR-0001 (reference UI kept as supported exports), refreshed README/SCOPE/INTENT, populated capabilities index - typecheck + lint green, 37 tests passing Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
87d4eb3006
commit
a10f080f12
36 changed files with 6643 additions and 170 deletions
118
SCOPE.md
118
SCOPE.md
|
|
@ -8,130 +8,118 @@
|
|||
|
||||
## One-liner
|
||||
|
||||
<!-- Describe the purpose of this repository in one precise sentence. -->
|
||||
<!-- Example: "Provides a lightweight event router for Kubernetes-native systems." -->
|
||||
Binds evidence items to structured targets and owns the rect-registry contract
|
||||
that drives the citation-evidence visual guide.
|
||||
|
||||
---
|
||||
|
||||
## Core Idea
|
||||
|
||||
<!-- What is the main capability or idea behind this repository? -->
|
||||
<!-- What problem does it try to solve? -->
|
||||
Turn collected evidence into structured, target-bound relationships — "what does
|
||||
this evidence support, explain, contradict, or source?" — and coordinate the
|
||||
active `(target, evidence, annotation)` triple so the workspace can draw a visual
|
||||
guide from a form field to its evidence card to the source highlight.
|
||||
|
||||
---
|
||||
|
||||
## In Scope
|
||||
|
||||
<!-- What this repository is responsible for. -->
|
||||
<!-- Be explicit and concrete. -->
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
- `EvidenceLink` storage + binding service (link/unlink/update, two query
|
||||
directions, canonical bus events)
|
||||
- active-target / active-evidence / active-annotation state machine + provider
|
||||
- the SharedContracts §7 rect-registry contract: registry, change pumps, React
|
||||
hooks, and the SVG overlay
|
||||
- a target-neutral reference `FormRenderer` (+ `FieldDefinitionForm`)
|
||||
|
||||
---
|
||||
|
||||
## Out of Scope
|
||||
|
||||
<!-- What this repository deliberately does NOT do. -->
|
||||
<!-- This is often more important than "In Scope". -->
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
- document ingestion, selector creation/resolution, or viewer internals (that is
|
||||
`evidence-anchor` / the engine)
|
||||
- evidence capture / source panels (`evidence-source`)
|
||||
- the review workspace and app composition (`citation-work`, umbrella `app/`)
|
||||
- changing canonical enum vocabularies (owned by the umbrella shared contracts)
|
||||
- publish/distribution beyond sibling-checkout linking
|
||||
|
||||
---
|
||||
|
||||
## Relevant When
|
||||
|
||||
<!-- When should someone consider using or exploring this repository? -->
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
- linking evidence to form fields, claims, requirements, decisions, or sections
|
||||
- coordinating which target/evidence/annotation is active
|
||||
- drawing or consuming the visual guide between panes
|
||||
|
||||
---
|
||||
|
||||
## Not Relevant When
|
||||
|
||||
<!-- When should someone ignore this repository? -->
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
- you need to import, render, or re-anchor documents (use `evidence-anchor`)
|
||||
- you need to capture or ingest evidence sources (use `evidence-source`)
|
||||
- you are wiring the whole app together (that is the umbrella `citation-evidence`)
|
||||
|
||||
---
|
||||
|
||||
## Current State
|
||||
|
||||
<!-- Rough indication of maturity. No strict format required. -->
|
||||
|
||||
- Status: <!-- e.g. concept / experimental / active / stable / deprecated -->
|
||||
- Implementation: <!-- e.g. idea / partial / substantial / complete -->
|
||||
- Stability: <!-- e.g. unstable / evolving / stable -->
|
||||
- Usage: <!-- e.g. none / personal / internal / production -->
|
||||
|
||||
<!-- Add any notes that help set expectations. -->
|
||||
- Status: active
|
||||
- Implementation: substantial (headless core + rect-registry + reference UI extracted, tests green)
|
||||
- Stability: evolving
|
||||
- Usage: internal (consumed by the citation-evidence umbrella)
|
||||
|
||||
---
|
||||
|
||||
## How It Fits
|
||||
|
||||
<!-- Where does this repository sit in the bigger picture? -->
|
||||
|
||||
- Upstream dependencies:
|
||||
- Downstream consumers:
|
||||
- Often used with:
|
||||
- Upstream dependencies: `citation-engine` (shared types + event bus); `evidence-anchor` (allowed, currently unused)
|
||||
- Downstream consumers: `citation-evidence` umbrella app
|
||||
- Often used with: `evidence-anchor`, `citation-engine`
|
||||
|
||||
---
|
||||
|
||||
## Terminology
|
||||
|
||||
<!-- Terms that are important to understand this repo. -->
|
||||
<!-- Especially useful if naming differs from other repos. -->
|
||||
|
||||
- Preferred terms:
|
||||
- Also known as:
|
||||
- Potentially confusing terms:
|
||||
- Preferred terms: evidence link, evidence target, rect registry, active triple, visual guide
|
||||
- Also known as: "binder"
|
||||
- Potentially confusing terms: dropped legacy relations `derived-from` / `needs-check` are NOT part of the canonical `EvidenceRelation` enum
|
||||
|
||||
---
|
||||
|
||||
## Related / Overlapping Repositories
|
||||
|
||||
<!-- List repositories that have similar or adjacent responsibilities. -->
|
||||
<!-- Helps detect duplication and navigate the ecosystem. -->
|
||||
|
||||
- <repo-name> — <!-- how it relates -->
|
||||
- citation-engine — owns shared domain types + the event bus this package emits on
|
||||
- evidence-anchor — selector/resolution + highlight/scroll contracts (allowed dependency)
|
||||
- citation-evidence — umbrella app that composes the binder with the rest of the workspace
|
||||
|
||||
---
|
||||
|
||||
## Getting Oriented
|
||||
|
||||
<!-- If someone decides to look deeper, where should they start? -->
|
||||
|
||||
- Start with:
|
||||
- Key files / directories:
|
||||
- Entry points:
|
||||
- Start with: `README.md`, then `docs/extraction-inventory.md`
|
||||
- Key files / directories: `src/services/bindings.ts`, `src/state/active.ts`, `src/visual-guide/rect-registry.ts`, `src/BinderProvider.tsx`
|
||||
- Entry points: `src/index.ts`
|
||||
|
||||
---
|
||||
|
||||
## Provided Capabilities
|
||||
|
||||
<!-- What can this repo's domain provide to other domains on request? -->
|
||||
<!-- Each capability block is parsed by the state-hub capability catalog ingest. -->
|
||||
<!-- Remove the examples and add your own, or leave empty if none. -->
|
||||
|
||||
<!--
|
||||
```capability
|
||||
type: infrastructure
|
||||
title: Example capability title
|
||||
description: What this capability provides, in one or two sentences.
|
||||
keywords: [keyword1, keyword2, keyword3]
|
||||
type: library
|
||||
title: Evidence-to-target binding
|
||||
description: Links evidence items to structured targets (form fields, claims, requirements) with relation/status/confidence and two query directions, emitting canonical engine bus events.
|
||||
keywords: [evidence, binding, evidence-link, form-field, citation-evidence]
|
||||
```
|
||||
|
||||
```capability
|
||||
type: library
|
||||
title: Visual-guide rect registry
|
||||
description: The SharedContracts §7 rect-registry contract — independent renderers publish field/evidence-card/highlight rects into one registry; an SVG overlay draws the active-triple guide without polling.
|
||||
keywords: [rect-registry, visual-guide, overlay, active-state, citation-evidence]
|
||||
```
|
||||
-->
|
||||
|
||||
---
|
||||
|
||||
## Notes
|
||||
|
||||
<!-- Anything else worth knowing. Keep it short. -->
|
||||
Extracted from `citation-evidence/src/binder/` under EBIND-WP-0001. Shared-contract
|
||||
authority remains in the umbrella wiki.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue