feat: extract review-workspace slice into @citation-evidence/work (CWORK-WP-0001)
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 3s

Establishes citation-work as the standalone home of the review workspace,
migrated out of the citation-evidence umbrella app.

- Package/tooling scaffold: package.json, tsconfig, vite/vitest/eslint configs
  with eslint-plugin-boundaries enforcing engine/anchor/source-only imports
- Providers/hooks: EngineProvider, SessionProvider + use* hooks (T02)
- Panes: CollectionList, ViewerShell, EvidenceSidebar (T03/T04/T05)
- Capture/edit: InlineCaptureForm, EvidenceFormBody; UploadDropzone owned here
- ReviewShell: repo-owned three-pane layout with an upload slot seam
- Tests: CollectionList, InlineCaptureForm capture flow, EvidenceSidebar
  export/edit/activation (11 tests, all green)
- Anchor consumed as @citation-evidence/evidence-anchor package; @source kept
  on the umbrella facade for its local viewer-url policy
- Docs (README/SCOPE) refreshed; deferred gaps recorded

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
tegwick 2026-07-09 01:49:28 +02:00
parent c51ef94812
commit 0cd2ca5d04
30 changed files with 7958 additions and 342 deletions

View file

@ -8,110 +8,94 @@
## One-liner
<!-- Describe the purpose of this repository in one precise sentence. -->
<!-- Example: "Provides a lightweight event router for Kubernetes-native systems." -->
Provides the standalone review-workspace package for citation-evidence: collection pane, viewer shell, annotation capture flow, and evidence sidebar.
---
## Core Idea
<!-- What is the main capability or idea behind this repository? -->
<!-- What problem does it try to solve? -->
Extract the human-facing review workflow out of the umbrella app so the review
workspace can evolve as its own package with clear subsystem boundaries.
---
## In Scope
<!-- What this repository is responsible for. -->
<!-- Be explicit and concrete. -->
-
-
-
- Review-mode React surfaces: collection list, viewer shell, evidence sidebar, capture/edit flow
- Workspace-local providers, hooks, and package exports for the review slice
- Review-shell composition and related tests/docs
---
## Out of Scope
<!-- What this repository deliberately does NOT do. -->
<!-- This is often more important than "In Scope". -->
-
-
-
- Engine domain model, persistence contracts, and citation renderers
- Selector-resolution internals and document-ingestion internals
- Binder-owned evidence-to-form workflows and form UI composition
---
## Relevant When
<!-- When should someone consider using or exploring this repository? -->
-
-
-
- You are extracting or changing the review workspace from `citation-evidence`
- You need collection/viewer/sidebar UX without pulling binder concerns into the package
- You are defining the package surface that the umbrella app will consume for review mode
---
## Not Relevant When
<!-- When should someone ignore this repository? -->
-
-
-
- You are changing engine contracts or storage semantics
- You are working on selector algorithms or PDF/HTML/Markdown ingestion internals
- You are building form-binding, overlays, or evidence-link workflows
---
## Current State
<!-- Rough indication of maturity. No strict format required. -->
- Status: extracted (CWORK-WP-0001 complete)
- Implementation: standalone `@citation-evidence/work` package; review-workspace
slice migrated out of the umbrella app
- Stability: evolving
- Usage: internal only
- 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. -->
This repo is now the code of record for the review workspace. The umbrella app's
`@work` alias resolves here and it no longer carries a local `src/work/`
implementation.
---
## How It Fits
<!-- Where does this repository sit in the bigger picture? -->
- Upstream dependencies:
- Downstream consumers:
- Often used with:
- Upstream dependencies: `citation-engine`, anchor contracts, source contracts
- Downstream consumers: `citation-evidence` umbrella app review mode
- Often used with: `citation-engine`, future `evidence-anchor`, future `evidence-source`
---
## 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: review workspace, collection pane, viewer shell, evidence sidebar
- Also known as: formerly `src/work/` in the umbrella repo (now extracted here)
- Potentially confusing terms: binder/form workflows are adjacent but not owned here
---
## Related / Overlapping Repositories
<!-- List repositories that have similar or adjacent responsibilities. -->
<!-- Helps detect duplication and navigate the ecosystem. -->
- <repo-name><!-- how it relates -->
- `citation-evidence` — umbrella app that currently hosts the source implementation
- `citation-engine` — shared types, services, persistence, rendering
- `evidence-anchor` — selector creation/resolution and viewer-adapter contracts
- `evidence-source` — document ingestion and source-side PDF helpers
- `evidence-binder` — adjacent but intentionally not a dependency
---
## Getting Oriented
<!-- If someone decides to look deeper, where should they start? -->
- Start with:
- Key files / directories:
- Entry points:
- Start with: `workplans/CWORK-WP-0001-extract-review-workspace.md`
- Key files / directories: `README.md`, `INTENT.md`, `src/work/`
- Entry points: `src/work/index.ts` (the `@citation-evidence/work` package barrel)
---
@ -134,4 +118,8 @@ keywords: [keyword1, keyword2, keyword3]
## Notes
<!-- Anything else worth knowing. Keep it short. -->
Anchor is consumed as the extracted `@citation-evidence/evidence-anchor`
package. `@source/*` still resolves into `../citation-evidence/src/source`
(the umbrella façade) because that façade owns the local `viewer-url` policy not
present in the extracted `evidence-source` package — the one remaining
transitional edge, tracked in the workplan's deferred list.