41 lines
2.1 KiB
Markdown
41 lines
2.1 KiB
Markdown
# Tasks — restore-crypto-cleanup-duplicates
|
|
|
|
## 1. Snapshot
|
|
|
|
- [ ] 1.1 Build `@suaveplan/crypto` and capture public symbol set from `dist/index.d.ts` to `tests/before.dts.txt`
|
|
|
|
## 2. Rewrite the barrel
|
|
|
|
- [ ] 2.1 Rewrite `crypto/src/index.ts` so every primitive-surface symbol re-exports from `@suaveplan/crypto-core` (typed `export { ... } from "@suaveplan/crypto-core"`)
|
|
- [ ] 2.2 Verify the symbol set still matches by re-running the dist diff
|
|
|
|
## 3. Delete duplicate modules
|
|
|
|
- [ ] 3.1 Delete `crypto/src/aead/` (5 files)
|
|
- [ ] 3.2 Delete `crypto/src/agree/` (6 files)
|
|
- [ ] 3.3 Delete `crypto/src/auth-box/` (5 files)
|
|
- [ ] 3.4 Delete `crypto/src/sealed-box/` (5 files)
|
|
- [ ] 3.5 Delete `crypto/src/sign/` (9 files)
|
|
- [ ] 3.6 Delete `crypto/src/primitives/` (10 files)
|
|
- [ ] 3.7 Delete `crypto/src/engines/` (6 files)
|
|
- [ ] 3.8 Walk every internal import in the retained `crypto/src/` modules and re-point any reference that resolved into a deleted directory at `@suaveplan/crypto-core` (subpath imports as needed)
|
|
|
|
## 4. Trim `package.json`
|
|
|
|
- [ ] 4.1 Audit `crypto/package.json` deps: keep `crypto-core`, `bitpacker`, `error`, `types`, `tslib`, `zod`; remove any of `crypto-cipher`, `crypto-curve`, `crypto-hash`, `crypto-utils` that are no longer directly imported by retained modules
|
|
- [ ] 4.2 Re-run typecheck to verify no transitive-dep gap
|
|
|
|
## 5. Verification gates
|
|
|
|
- [ ] 5.1 `bun run check` — Biome 0/0/0 across monorepo
|
|
- [ ] 5.2 `bunx turbo lint typecheck test --filter=@suaveplan/crypto` green
|
|
- [ ] 5.3 `bunx turbo test:coverage --filter=@suaveplan/crypto` 100/100/100/100 over retained modules
|
|
- [ ] 5.4 `bunx turbo build --filter=@suaveplan/crypto` produces a `dist/index.d.ts` byte-identical to the pre-change snapshot
|
|
- [ ] 5.5 `bunx turbo test --filter=...@suaveplan/crypto` (dependent sweep) green
|
|
- [ ] 5.6 OpenSpec conformance script clean for `@suaveplan/crypto`
|
|
|
|
## 6. Archive
|
|
|
|
- [ ] 6.1 Fold spec delta into `openspec/specs/crypto/spec.md` (preserves the new "primitives sourced from crypto-core" requirement)
|
|
- [ ] 6.2 Move `openspec/changes/restore-crypto-cleanup-duplicates/` → `openspec/archive/<yyyy-mm-dd>-restore-crypto-cleanup-duplicates/`
|