--- id: CENG-WP-0001 type: workplan title: "Extract engine from citation-evidence umbrella" domain: citation_evidence repo: citation-engine status: done owner: codex topic_slug: citation_evidence_mvp created: "2026-06-21" updated: "2026-06-22" state_hub_workstream_id: "ccd217a2-572d-435d-9a29-e0a55b6a4311" --- # CENG-WP-0001 — Extract Engine from Umbrella Extract `citation-evidence/src/shared/` and `citation-evidence/src/engine/` into this repository as a standalone TypeScript package (`@citation-evidence/engine`). Prerequisite: umbrella MVP complete (CE-WP-0001..0008). ## Dependency order ``` T01 (toolchain scaffold) └─ T02 (copy shared/ + engine/ from umbrella) └─ T03 (conformance reference: wiki/SharedContracts.md) └─ T04 (test + typecheck + lint green) ``` --- ## T01 — Toolchain scaffold ```task id: CENG-WP-0001-T01 status: done priority: critical state_hub_task_id: "755e36b7-983d-48e8-af94-fd074db7f745" ``` Deliverables: - `package.json` with `test`, `lint`, `typecheck` scripts - `tsconfig.json` with `@shared/*` and `@engine/*` path aliases - `vitest.config.ts`, `eslint.config.js`, `.nvmrc` - Node-oriented `.gitignore` --- ## T02 — Extract shared/ and engine/ ```task id: CENG-WP-0001-T02 status: done priority: critical depends_on: [T01] ``` Copy the umbrella partitions verbatim: - `src/shared/` — domain types, enums, normalization - `src/engine/` — services, repos, events, rendering, persistence No import path changes required; aliases match the umbrella layout. --- ## T03 — SharedContracts conformance reference ```task id: CENG-WP-0001-T03 status: done priority: high depends_on: [T02] ``` Copy `wiki/SharedContracts.md` from the umbrella so enum conformance tests (`evidence-link.test.ts`) keep a local reference. --- ## T04 — Verification ```task id: CENG-WP-0001-T04 status: done priority: critical depends_on: [T02, T03] ``` - `pnpm test` — 89 tests pass - `pnpm typecheck` — clean - `pnpm lint` — clean (shared/engine boundary enforced) --- ## Follow-up - `CE-WP-0009` — wire `citation-evidence` to consume this package via `link:` and delete in-repo copies (`citation-evidence/workplans/CE-WP-0009-engine-workspace-wireup.md`). - `CENG-WP-0002` — ADR-0002, publish readiness, contract sync (`workplans/CENG-WP-0002-package-distribution.md`).