Implement CE-WP-0001 Foundations: TS scaffold, lint boundaries, normalize v1, fixtures
T01 Toolchain — vite + pnpm 9.15 + React 18 + strict TS (ADR-0001).
T02 Folder layout — src/{shared,engine,anchor,source,binder,work,app}/
mirroring the future subsystem split, with path aliases.
T03 Boundary lint — eslint-plugin-boundaries enforcing the dependency
edges from wiki/DependencyMap.md §4; verified by a violating fixture.
T04 Canonical normalization v1 — src/shared/text/normalize.ts with
NORMALIZE_VERSION=1; 10/10 vitest covering ligatures, CRLF, soft
hyphens (including line-break reassembly), mixed whitespace.
T05 PDF fixture corpus — 7 user-supplied German PDFs in fixtures/pdfs/
(gitignored binaries) plus a manifest with verbatim known-good
quotes and page counts, ready for CE-WP-0002 selector tests.
T06 README upgrade — umbrella README points at wiki/docs/workplans
and documents the dev workflow.
T07 ADR-0002..0006 stubs in docs/decisions/.
Toolchain end-to-end: pnpm install + lint + typecheck + test all green.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 00:13:03 +02:00
|
|
|
# ADR-0002 — Monorepo vs polyrepo for the six subsystems
|
|
|
|
|
|
2026-06-22 19:45:11 +02:00
|
|
|
- Status: accepted
|
Implement CE-WP-0001 Foundations: TS scaffold, lint boundaries, normalize v1, fixtures
T01 Toolchain — vite + pnpm 9.15 + React 18 + strict TS (ADR-0001).
T02 Folder layout — src/{shared,engine,anchor,source,binder,work,app}/
mirroring the future subsystem split, with path aliases.
T03 Boundary lint — eslint-plugin-boundaries enforcing the dependency
edges from wiki/DependencyMap.md §4; verified by a violating fixture.
T04 Canonical normalization v1 — src/shared/text/normalize.ts with
NORMALIZE_VERSION=1; 10/10 vitest covering ligatures, CRLF, soft
hyphens (including line-break reassembly), mixed whitespace.
T05 PDF fixture corpus — 7 user-supplied German PDFs in fixtures/pdfs/
(gitignored binaries) plus a manifest with verbatim known-good
quotes and page counts, ready for CE-WP-0002 selector tests.
T06 README upgrade — umbrella README points at wiki/docs/workplans
and documents the dev workflow.
T07 ADR-0002..0006 stubs in docs/decisions/.
Toolchain end-to-end: pnpm install + lint + typecheck + test all green.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 00:13:03 +02:00
|
|
|
- Date: 2026-05-24
|
2026-06-22 19:45:11 +02:00
|
|
|
- Decided: 2026-06-22
|
|
|
|
|
- Workplan: CENG-WP-0002-T01
|
Implement CE-WP-0001 Foundations: TS scaffold, lint boundaries, normalize v1, fixtures
T01 Toolchain — vite + pnpm 9.15 + React 18 + strict TS (ADR-0001).
T02 Folder layout — src/{shared,engine,anchor,source,binder,work,app}/
mirroring the future subsystem split, with path aliases.
T03 Boundary lint — eslint-plugin-boundaries enforcing the dependency
edges from wiki/DependencyMap.md §4; verified by a violating fixture.
T04 Canonical normalization v1 — src/shared/text/normalize.ts with
NORMALIZE_VERSION=1; 10/10 vitest covering ligatures, CRLF, soft
hyphens (including line-break reassembly), mixed whitespace.
T05 PDF fixture corpus — 7 user-supplied German PDFs in fixtures/pdfs/
(gitignored binaries) plus a manifest with verbatim known-good
quotes and page counts, ready for CE-WP-0002 selector tests.
T06 README upgrade — umbrella README points at wiki/docs/workplans
and documents the dev workflow.
T07 ADR-0002..0006 stubs in docs/decisions/.
Toolchain end-to-end: pnpm install + lint + typecheck + test all green.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 00:13:03 +02:00
|
|
|
|
|
|
|
|
## Context
|
|
|
|
|
|
|
|
|
|
The umbrella-first MVP lives entirely in `citation-evidence/` under
|
2026-06-22 19:45:11 +02:00
|
|
|
`src/{anchor,source,binder,work,app}/` with shared types and engine services
|
|
|
|
|
in the extracted `@citation-evidence/engine` package (`citation-engine` repo).
|
|
|
|
|
|
|
|
|
|
Each remaining folder is named after its eventual extracted package. At some
|
|
|
|
|
point — driven by an external consumer needing one subsystem, or by independent
|
|
|
|
|
release cadence — code will move out into its sister repo.
|
Implement CE-WP-0001 Foundations: TS scaffold, lint boundaries, normalize v1, fixtures
T01 Toolchain — vite + pnpm 9.15 + React 18 + strict TS (ADR-0001).
T02 Folder layout — src/{shared,engine,anchor,source,binder,work,app}/
mirroring the future subsystem split, with path aliases.
T03 Boundary lint — eslint-plugin-boundaries enforcing the dependency
edges from wiki/DependencyMap.md §4; verified by a violating fixture.
T04 Canonical normalization v1 — src/shared/text/normalize.ts with
NORMALIZE_VERSION=1; 10/10 vitest covering ligatures, CRLF, soft
hyphens (including line-break reassembly), mixed whitespace.
T05 PDF fixture corpus — 7 user-supplied German PDFs in fixtures/pdfs/
(gitignored binaries) plus a manifest with verbatim known-good
quotes and page counts, ready for CE-WP-0002 selector tests.
T06 README upgrade — umbrella README points at wiki/docs/workplans
and documents the dev workflow.
T07 ADR-0002..0006 stubs in docs/decisions/.
Toolchain end-to-end: pnpm install + lint + typecheck + test all green.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 00:13:03 +02:00
|
|
|
|
|
|
|
|
We need a written answer to: when that moment comes, do we (a) keep one
|
|
|
|
|
repository with pnpm workspaces, (b) split into six independent repos with
|
|
|
|
|
published packages, or (c) something in between?
|
|
|
|
|
|
|
|
|
|
The decision affects: dependency management, release cadence, CI surface
|
|
|
|
|
area, contributor friction, and how `wiki/SharedContracts.md` is enforced
|
|
|
|
|
across the boundary.
|
|
|
|
|
|
|
|
|
|
## Options
|
|
|
|
|
|
|
|
|
|
- **A. Single repo, pnpm workspaces**
|
|
|
|
|
- Pros: one CI, one version of every dep, atomic cross-package PRs, easy
|
|
|
|
|
refactors. Shared contracts enforced by the type checker.
|
|
|
|
|
- Cons: any consumer outside this repo needs a private registry or
|
|
|
|
|
git-tag-based installs. Release cadence is shared.
|
|
|
|
|
|
|
|
|
|
- **B. Six independent repos, published packages**
|
|
|
|
|
- Pros: clean external publish story, independent versioning. Forces the
|
|
|
|
|
contract to be a real package boundary.
|
|
|
|
|
- Cons: dependency upgrades require coordinated PR trains. Refactors that
|
|
|
|
|
span subsystems become multi-repo dances. Hard to keep
|
|
|
|
|
`SharedContracts.md` in sync across repos.
|
|
|
|
|
|
|
|
|
|
- **C. Hybrid — monorepo with publishable workspaces**
|
|
|
|
|
- Pros: best of both: one repo for dev, but `pnpm publish` from any
|
|
|
|
|
workspace package. Tools: changesets / nx / turbo.
|
|
|
|
|
- Cons: more tooling to learn; per-workspace `package.json` cuts to
|
|
|
|
|
maintain.
|
|
|
|
|
|
|
|
|
|
## Decision
|
|
|
|
|
|
2026-06-22 19:45:11 +02:00
|
|
|
**B — six independent repos with published packages**, using **`link:` sibling
|
|
|
|
|
dependencies during local development** until a registry is configured.
|
|
|
|
|
|
|
|
|
|
Rationale:
|
|
|
|
|
|
|
|
|
|
1. The ecosystem is already organized as six sister repos plus the umbrella;
|
|
|
|
|
independent repos match the documented architecture.
|
|
|
|
|
2. `citation-engine` extraction (`CENG-WP-0001`) and umbrella wireup
|
|
|
|
|
(`CE-WP-0009`) prove the `link:../citation-engine` dev workflow.
|
|
|
|
|
3. Publishing can be deferred — no registry is configured yet — without
|
|
|
|
|
blocking extraction of the remaining subsystems.
|
|
|
|
|
4. Option C adds tooling overhead before any external consumer exists.
|
Implement CE-WP-0001 Foundations: TS scaffold, lint boundaries, normalize v1, fixtures
T01 Toolchain — vite + pnpm 9.15 + React 18 + strict TS (ADR-0001).
T02 Folder layout — src/{shared,engine,anchor,source,binder,work,app}/
mirroring the future subsystem split, with path aliases.
T03 Boundary lint — eslint-plugin-boundaries enforcing the dependency
edges from wiki/DependencyMap.md §4; verified by a violating fixture.
T04 Canonical normalization v1 — src/shared/text/normalize.ts with
NORMALIZE_VERSION=1; 10/10 vitest covering ligatures, CRLF, soft
hyphens (including line-break reassembly), mixed whitespace.
T05 PDF fixture corpus — 7 user-supplied German PDFs in fixtures/pdfs/
(gitignored binaries) plus a manifest with verbatim known-good
quotes and page counts, ready for CE-WP-0002 selector tests.
T06 README upgrade — umbrella README points at wiki/docs/workplans
and documents the dev workflow.
T07 ADR-0002..0006 stubs in docs/decisions/.
Toolchain end-to-end: pnpm install + lint + typecheck + test all green.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 00:13:03 +02:00
|
|
|
|
|
|
|
|
## Consequences
|
|
|
|
|
|
2026-06-22 19:45:11 +02:00
|
|
|
- **Local dev:** sister repos sit as siblings under `~/` (or equivalent).
|
|
|
|
|
Consumers declare `"@citation-evidence/engine": "link:../citation-engine"`.
|
|
|
|
|
- **Publishing:** when a registry is chosen, bump `@citation-evidence/engine`
|
|
|
|
|
semver and replace `link:` with the registry version in consumer repos.
|
|
|
|
|
- **Contracts:** `citation-evidence/wiki/SharedContracts.md` stays authoritative;
|
|
|
|
|
`citation-engine/wiki/SharedContracts.md` is a conformance copy (see
|
|
|
|
|
`citation-engine/wiki/README.md`).
|
|
|
|
|
- **Versioning:** engine package semver tracks API/contract changes; umbrella
|
|
|
|
|
and sister repos pin or range-pin on publish.
|
|
|
|
|
- **CI:** each repo runs its own test/lint pipeline; cross-repo integration
|
|
|
|
|
tests remain in `citation-evidence` until subsystems extract fully.
|