Files
suaveplan/openspec/archive/2026-05-17-add-currency-provider-ecb/tasks.md
2026-05-27 23:29:53 +01:00

2.7 KiB

Tasks — add @suaveplan/currency-provider-ecb

1. Spec authoring

  • 1.1 Read ../suaveplan/enterprise/currency-providers.md end-to-end (ECB row)
  • 1.2 Read slim-core archive openspec/archive/2026-05-17-slim-currency-providers/
  • 1.3 Read openspec/AGENTS.md §0c, §13, §14
  • 1.4 Draft proposal.md with ## Source mapping and ## Parity Checklist
  • 1.5 Draft design.md with file layout, algorithm, error matrix
  • 1.6 Draft specs/currency-provider-ecb/spec.md — every requirement carries **Verified by:**

2. Implementation

  • 2.1 Create packages/finance/currency-provider-ecb/ skeleton (package.json, tsconfig, vite.config, vitest.config, tests/setup/polyfills.ts)
  • 2.2 Implement src/ecb/ecb.ts — EcbProvider class consuming httpRequest from slim core
  • 2.3 Wire FetchLike from @suaveplan/types (NOT re-imported from slim core)
  • 2.4 Raise typed CurrencyProviderError with HTTP_ERROR / PARSE_ERROR / UNSUPPORTED_BASE / UNKNOWN_CURRENCY
  • 2.5 Forward RateFetchOptions.signal through httpRequest
  • 2.6 Author src/ecb/index.ts + src/index.ts explicit named barrels
  • 2.7 Add subpath exports to package.json (., ./ecb/ecb, ./package.json)

3. Tests

  • 3.1 src/ecb/ecb.test.ts — every scenario in the spec delta
  • 3.2 Tests import runner primitives from @suaveplan/testing/runner
  • 3.3 No vi.mock / vi.stubGlobal — use injected FetchLike closure
  • 3.4 Every it(...) carries { timeout: 5000 }

4. Documentation

  • 4.1 Sibling src/ecb/ecb.md (≥200 words, basic + advanced examples, full API)
  • 4.2 README.md with Install + Quick start + Modules section linking src/ecb/ecb.md

5. Pre-archive verification (5-gate triple)

  • 5.1 bunx turbo lint typecheck test --filter=@suaveplan/currency-provider-ecb — green
  • 5.2 bunx turbo test:coverage --filter=@suaveplan/currency-provider-ecb — 100/100/100/100
  • 5.3 bunx turbo build --filter=@suaveplan/currency-provider-ecb — green
  • 5.4 Banned-pattern scan zero output
  • 5.5 Barrel-shape scan zero output (no export * in feature barrels)
  • 5.6 Test-runner import scan zero output

6. Root-doc refresh (§13b)

  • 6.1 Add row to STATUS.md under Completed
  • 6.2 Add paragraph to SUMMARY.md
  • 6.3 Regenerate MANIFEST.md (bun scripts/folder-reorg/generate-manifest.ts)
  • 6.4 Regenerate MISSING.yml (bun scripts/generate-missing.ts) — skip if generator fails

7. Archive

  • 7.1 Fold specs/currency-provider-ecb/spec.md into openspec/specs/currency-provider-ecb/spec.md
  • 7.2 Move openspec/changes/add-currency-provider-ecb/ → openspec/archive/2026-05-17-add-currency-provider-ecb/