2.8 KiB
2.8 KiB
Tasks — restore-crypto-fold-keys-vault
1. Pre-move audit
- 1.1 Confirm no consumer outside
crypto-vault's own tests importsChainSigner - 1.2 List every
@suaveplan/crypto-keysand@suaveplan/crypto-vaultconsumer withgrep -rln(expected: onlyauth/auth) - 1.3 Snapshot test count + coverage across the three packages so post-move parity is measurable
2. Move files (preserve git history with git mv)
- 2.1
git mv crypto-keys/src/keypair/* crypto/src/keychain/keypair/ - 2.2
git mv crypto-keys/src/keychain/* crypto/src/keychain/storage/ - 2.3
git mv crypto-vault/src/mnemonic/* crypto/src/vault/mnemonic/ - 2.4
git mv crypto-vault/src/vault/* crypto/src/vault/legacy-vault/ - 2.5 Merge
crypto-keys/src/errors/codes/*andcrypto-vault/src/errors/codes/*intocrypto/src/errors/codes/(resolve any code collisions; document in the diff) - 2.6 Walk every internal import in moved files and re-point relative paths to the new home
- 2.7 Update
crypto/src/index.tsto re-export the moved surface from the new locations
3. Delete ChainSigner
- 3.1
git rm -r crypto-vault/src/chain-signer/ - 3.2 Confirm no remaining import of
ChainSigneranywhere inpackages/
4. Delete the two old packages
- 4.1
git rm -r packages/crypto/crypto-keys/ - 4.2
git rm -r packages/crypto/crypto-vault/ - 4.3 Run
bun installto refresh the workspace lockfile
5. Migrate consumers
- 5.1
auth/auth/package.json: remove@suaveplan/crypto-keysdep; add@suaveplan/cryptodep - 5.2 Codemod-update every
auth/auth/src/**/*.tsimport from@suaveplan/crypto-keysto@suaveplan/crypto(subpath form may need adjustment to match the new layout) - 5.3 If any other consumer surfaces in the audit (Section 1.2), repeat for it
6. Manifest + docs
- 6.1 Update
CLAUDE.mdpackage list: removecrypto-keys,crypto-vault - 6.2
bun scripts/folder-reorg/generate-manifest.tsto refreshMANIFEST.md
7. Verification gates
- 7.1
bun run check— Biome 0/0/0 across monorepo - 7.2
bunx turbo lint typecheck test --filter=@suaveplan/cryptogreen - 7.3
bunx turbo lint typecheck test --filter=@suaveplan/authgreen - 7.4
bunx turbo test:coverage --filter=@suaveplan/crypto100/100/100/100 over folded modules - 7.5
bunx turbo test --filter=...@suaveplan/crypto(dependent sweep) green - 7.6
grep -rln "@suaveplan/crypto-keys\|@suaveplan/crypto-vault" packages/returns zero (excludingarchive/)
8. Archive
- 8.1 Fold spec delta into
openspec/specs/crypto/spec.md - 8.2 Delete
openspec/specs/crypto-keys/andopenspec/specs/crypto-vault/if those dirs exist - 8.3 Move
openspec/changes/restore-crypto-fold-keys-vault/→openspec/archive/<yyyy-mm-dd>-restore-crypto-fold-keys-vault/