# Tasks — Slim @suaveplan/currency-providers ## Spec-completeness preflight (AGENTS.md §12a) - [x] Numbered checklist of every `### Requirement` and `#### Scenario` drafted in `specs/currency-providers/spec.md` (10 requirements kept/added; see `./specs/currency-providers/spec.md`). ## Remove concrete provider modules - [x] Delete `src/providers/ecb/` - [x] Delete `src/providers/fixer/` - [x] Delete `src/providers/open-exchange-rates/` - [x] Delete `src/providers/binance/` - [x] Delete `src/providers/coingecko/` - [x] Delete `src/providers/coinmarketcap/` - [x] Delete `src/providers/cryptocompare/` - [x] Delete `src/providers/kraken/` - [x] Delete `src/providers/virtual/` - [x] Delete now-empty `src/providers/` directory - [x] Drop the 9 `./providers//` subpath exports from `package.json` - [x] Drop `@suaveplan/currency` and `@suaveplan/money` from `dependencies` iff no remaining surface needs them — actually `@suaveplan/currency` stays (registry stores `CurrencyProvider` instances from that pkg) and `@suaveplan/money` drops (only the deleted `VirtualCurrencyProvider` used `registerCurrency`). ## Add slim-core surface - [x] Add `PROVIDER_NOT_REGISTERED` + `PROVIDER_ALREADY_REGISTERED` codes to `CURRENCY_PROVIDER_CODES` (`src/error-codes/error-codes.ts`) - [x] Build `src/registry/registry.ts` — `CurrencyProviderRegistry` class with `register` / `get` / `has` / `list` / `unregister` - [x] Build `src/registry/registry.md` (sibling doc, ≥200 words) - [x] Build `src/registry/registry.test.ts` — covers every method, both registry error codes, `list()` sort determinism - [x] Build `src/factory/factory.ts` — `defineCurrencyProvider` factory - [x] Build `src/factory/factory.md` - [x] Build `src/factory/factory.test.ts` - [x] Build `src/http/http.ts` — `httpRequest` + `composeAbortSignal` - [x] Build `src/http/http.md` - [x] Build `src/http/http.test.ts` — happy path, HTTP_ERROR on non-2xx, header forwarding, caller-signal abort, timeout-signal abort, both signals abort, `composeAbortSignal` all four combinations - [x] Update `src/error-codes/error-codes.test.ts` to assert the two new codes and prove they are reachable from registry call sites - [x] Update `src/index.ts` — explicit named barrel with new exports + drop removed provider exports - [x] Update `package.json` `exports` map: 5 subpaths total (`.`, `./error-codes/error-codes`, `./types/configs`, `./registry/registry`, `./factory/factory`, `./http/http`) - [x] Update `tests/dep-graph.test.ts` to match the new subpath list (or delete the per-subpath assertions and replace with a check that every `/index.ts` is referenced from a subpath export) - [x] Update `vite.config.ts` external list (drop `@suaveplan/money`) ## Documentation - [x] Update `README.md` Modules + Provider summary sections to describe the slim core (registry / factory / httpRequest / shared types) and link to the future sibling packages - [x] Confirm every `.ts` in `src/` has a sibling `.md` (the §13 step-5 grep returns zero) ## Pre-archive gates (AGENTS.md §13) - [ ] Step 0 — spec reconciliation: every `### Requirement` and `**Verified by:**` resolves to a real file + verbatim test name - [ ] Step 1 — `bunx turbo lint typecheck test --filter=@suaveplan/currency-providers` and `bun run check` both green - [ ] Step 2 — `bunx turbo test:coverage --filter=@suaveplan/currency-providers` reports 100/100/100/100 via istanbul - [ ] Step 3 — `bunx turbo build --filter=@suaveplan/currency-providers` green - [ ] Step 4 — banned-pattern grep returns zero - [ ] Step 4a — barrel-shape grep returns zero - [ ] Step 4b — test-runner-import grep returns zero - [ ] Step 5 — missing-`.md` grep returns zero - [ ] Step 6 — README present - [ ] Step 7 — bare-version grep returns zero - [ ] Step 8 — subpath-export count = 5 (matches feature module count) - [ ] Step 9 — security-scan grep returns zero - [ ] Step 10 — dependent sweep (`bunx turbo test --filter=...@suaveplan/currency-providers`) ## Root-doc refresh (AGENTS.md §13b) - [ ] Re-run `bun scripts/folder-reorg/generate-manifest.ts` to refresh `MANIFEST.md` - [ ] Re-run `bun scripts/generate-missing.ts` to refresh `MISSING.yml` - [ ] Update `STATUS.md` row for `@suaveplan/currency-providers` to describe the slim shape - [ ] Update `SUMMARY.md` row for `@suaveplan/currency-providers` likewise - [ ] `bunx markdownlint-cli2 --fix` across touched root + change files ## Archive (AGENTS.md §14) - [ ] Fold `specs/currency-providers/spec.md` into `openspec/specs/currency-providers/spec.md` (apply REMOVED + ADDED to the canonical spec landed by the 2026-05-17 change) - [ ] Move `openspec/changes/slim-currency-providers/` → `openspec/archive/2026-05-17-slim-currency-providers/`