3.9 KiB
3.9 KiB
Tasks — add @suaveplan/currency-providers
Every checkbox MUST reflect work actually done in this change.
1. Spec authoring
- 1.1 Read
../suaveplan/enterprise/currency-providers.mdend-to-end - 1.2
openspec/specs/currency-providers/spec.mddoes not exist — confirmed - 1.3 Read
openspec/AGENTS.mdSections 13 and 14 - 1.4 Draft
proposal.mdfromopenspec/templates/proposal.md - 1.5 Fill in
## Source mappingtable — every requirement cites line range or is in "no source line" table - 1.6 Draft
specs/currency-providers/spec.mdfromopenspec/templates/spec-delta.md - 1.7 Every requirement carries a
**Verified by:**line naming concreteit(...)titles
2. Implementation
- 2.1 Scaffold
packages/finance/currency-providers/(package.json,tsconfig.json,tsconfig.lib.json,vite.config.ts,vitest.config.ts,tests/setup/polyfills.ts,README.md) - 2.2
src/types/configs.ts—ApiKeyConfig,NoKeyConfig,HttpFetchOptions(named interfaces, no inline shapes) - 2.3
src/error-codes/error-codes.ts—CURRENCY_PROVIDER_CODESregistry +CurrencyProviderErrordiscriminated class - 2.4
src/providers/ecb/ecb.ts— ECB XML provider with injectableFetchLike - 2.5
src/providers/fixer/fixer.ts— Fixer.io provider with API key - 2.6
src/providers/open-exchange-rates/open-exchange-rates.ts - 2.7
src/providers/binance/binance.ts - 2.8
src/providers/coingecko/coingecko.ts+getCoinGeckoId - 2.9
src/providers/coinmarketcap/coinmarketcap.ts - 2.10
src/providers/cryptocompare/cryptocompare.ts - 2.11
src/providers/kraken/kraken.ts - 2.12
src/providers/virtual/virtual.ts— virtual-currency provider with runtime mutators - 2.13
src/index.ts— explicit named re-exports (noexport *) - 2.14 Subpath exports declared in
package.jsonfor every public module
3. Tests
- 3.1 Per-provider
<name>.test.tscovering every scenario, with realFetchLikeinjection (novi.mock/vi.stubGlobal) - 3.2
src/error-codes/error-codes.test.ts— everyCURRENCY_PROVIDER.*code reachable; SuaveplanError contract preserved - 3.3 Every
it(...)carries{ timeout: 5000 } - 3.4 All test files import runner primitives from
@suaveplan/testing/runner
4. Documentation
- 4.1 Sibling
.mdfor every implementation.ts(≥200 words, basic + advanced examples, full API reference) - 4.2
README.mdlinks every co-located.mdunder## Modules
5. Pre-archive verification (the 5-gate triple)
- 5.1
bun run check— Biome 0 errors / 0 warnings / 0 info - 5.2
bunx turbo lint typecheck test --filter=@suaveplan/currency-providers— green - 5.3
bunx turbo test:coverage --filter=@suaveplan/currency-providers— 100/100/100/100 - 5.4
bun scripts/openspec-conformance.ts @suaveplan/currency-providers— exit 0 - 5.5
bunx turbo build --filter=@suaveplan/currency-providers— green
6. Pre-archive checklist (AGENTS.md Section 13)
- 6.1 Generics threaded — every public type uses named interfaces
- 6.2 Zod schemas N/A — package uses no Zod at boundary (configs are plain interfaces)
- 6.3 Every error code in
error-codes.tsthrown by at least one production path - 6.4 No strict-mode behaviors to test on/off — providers have no strict-mode setting
- 6.5 OTel N/A — deferred per
## Out of scope - 6.6 No lifecycle dedup claimed (deferred coalescing — see
## Out of scope) - 6.7 No retroactive tick
- 6.8 No
export *in any feature-module barrel - 6.9 No direct
vitest/bun:testimports
7. Archive
- 7.1 Fold spec delta into
openspec/specs/currency-providers/spec.md - 7.2 Move
openspec/changes/add-currency-providers/→openspec/archive/2026-05-17-add-currency-providers/ - 7.3 Refresh
MANIFEST.md,MISSING.yml,STATUS.md,SUMMARY.md