3.5 KiB
3.5 KiB
Tasks — Add @suaveplan/currency-provider-virtual
Spec-completeness preflight (AGENTS.md §12a)
- Numbered checklist of every
### Requirementand#### Scenariodrafted inspecs/currency-provider-virtual/spec.md(5 requirements, 16 scenarios).
Package scaffold
packages/finance/currency-provider-virtual/package.json(0.0.0, universal,sideEffects: false)tsconfig.json,tsconfig.lib.jsonvite.config.ts(externals:@suaveplan/currency,@suaveplan/currency-providers,@suaveplan/error,@suaveplan/types,tslib)vitest.config.ts(istanbul, 100/100/100/100, polyfills setup)tests/setup/polyfills.tsREADME.md(≥200 words, Modules section)
Implementation
src/error-codes/error-codes.ts— re-exportUNKNOWN_CURRENCYcode +CurrencyProviderErrorfrom slim core for ergonomic accesssrc/error-codes/error-codes.mdsrc/provider/provider.types.ts—VirtualCurrencyProviderConfig,VirtualCurrencyProviderOptions,VirtualRateEntryshapessrc/provider/provider.ts—VirtualCurrencyProviderclasssrc/provider/provider.mdsrc/index.ts— explicit named barrelsrc/provider/index.ts(feature barrel)
Tests
src/provider/provider.test.ts— covers constructor,setRate,removeRate,clear,hasRate,getRate,listCurrencies,fetchRates(default base, custom base, target filter, empty table),UNKNOWN_CURRENCYerror path,FakeClock-driven timestamp,supportsVirtualflagtests/dep-graph.test.ts— root barrel has noexport *; feature barrels have noexport *; subpath exports match feature modules
Documentation
- Every implementation
.tshas a sibling.md(§13 step 5 grep returns zero) README.mdat package root with Install / Quick start / Features / Modules sections
Pre-archive gates (AGENTS.md §13)
- Step 0 — spec reconciliation: every
### Requirementand**Verified by:**resolves to a real file + verbatim test name - Step 1 —
bunx turbo lint typecheck test --filter=@suaveplan/currency-provider-virtual - Step 2 —
bunx turbo test:coverage --filter=@suaveplan/currency-provider-virtualreports 100/100/100/100 via istanbul - Step 3 —
bunx turbo build --filter=@suaveplan/currency-provider-virtualgreen - 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-
.mdgrep returns zero - Step 6 — README present
- Step 7 — bare-version grep returns zero
- Step 8 — subpath-export count matches feature module count
- Step 9 — security-scan grep returns zero
Root-doc refresh (AGENTS.md §13b)
- Re-run
bun scripts/folder-reorg/generate-manifest.tsto refreshMANIFEST.md - Re-run
bun scripts/generate-missing.tsto refreshMISSING.yml - Add
@suaveplan/currency-provider-virtualrow toSTATUS.md - Add
@suaveplan/currency-provider-virtualrow toSUMMARY.md bunx markdownlint-cli2 --fixacross touched root + change files
Archive (AGENTS.md §14)
- Fold
specs/currency-provider-virtual/spec.mdintoopenspec/specs/currency-provider-virtual/spec.md - Move
openspec/changes/add-currency-provider-virtual/→openspec/archive/2026-05-17-add-currency-provider-virtual/