82 lines
3.5 KiB
Markdown
82 lines
3.5 KiB
Markdown
# Tasks — Add @suaveplan/currency-provider-virtual
|
|
|
|
## Spec-completeness preflight (AGENTS.md §12a)
|
|
|
|
- [x] Numbered checklist of every `### Requirement` and `#### Scenario`
|
|
drafted in `specs/currency-provider-virtual/spec.md` (5 requirements,
|
|
16 scenarios).
|
|
|
|
## Package scaffold
|
|
|
|
- [x] `packages/finance/currency-provider-virtual/package.json` (0.0.0,
|
|
universal, `sideEffects: false`)
|
|
- [x] `tsconfig.json`, `tsconfig.lib.json`
|
|
- [x] `vite.config.ts` (externals: `@suaveplan/currency`,
|
|
`@suaveplan/currency-providers`, `@suaveplan/error`, `@suaveplan/types`,
|
|
`tslib`)
|
|
- [x] `vitest.config.ts` (istanbul, 100/100/100/100, polyfills setup)
|
|
- [x] `tests/setup/polyfills.ts`
|
|
- [x] `README.md` (≥200 words, Modules section)
|
|
|
|
## Implementation
|
|
|
|
- [x] `src/error-codes/error-codes.ts` — re-export `UNKNOWN_CURRENCY` code +
|
|
`CurrencyProviderError` from slim core for ergonomic access
|
|
- [x] `src/error-codes/error-codes.md`
|
|
- [x] `src/provider/provider.types.ts` — `VirtualCurrencyProviderConfig`,
|
|
`VirtualCurrencyProviderOptions`, `VirtualRateEntry` shapes
|
|
- [x] `src/provider/provider.ts` — `VirtualCurrencyProvider` class
|
|
- [x] `src/provider/provider.md`
|
|
- [x] `src/index.ts` — explicit named barrel
|
|
- [x] `src/provider/index.ts` (feature barrel)
|
|
|
|
## Tests
|
|
|
|
- [x] `src/provider/provider.test.ts` — covers constructor, `setRate`,
|
|
`removeRate`, `clear`, `hasRate`, `getRate`, `listCurrencies`,
|
|
`fetchRates` (default base, custom base, target filter, empty table),
|
|
`UNKNOWN_CURRENCY` error path, `FakeClock`-driven timestamp,
|
|
`supportsVirtual` flag
|
|
- [x] `tests/dep-graph.test.ts` — root barrel has no `export *`; feature
|
|
barrels have no `export *`; subpath exports match feature modules
|
|
|
|
## Documentation
|
|
|
|
- [x] Every implementation `.ts` has a sibling `.md` (§13 step 5 grep
|
|
returns zero)
|
|
- [x] `README.md` at package root with Install / Quick start / Features /
|
|
Modules sections
|
|
|
|
## 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-provider-virtual`
|
|
- [ ] Step 2 — `bunx turbo test:coverage --filter=@suaveplan/currency-provider-virtual`
|
|
reports 100/100/100/100 via istanbul
|
|
- [ ] Step 3 — `bunx turbo build --filter=@suaveplan/currency-provider-virtual` 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 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.ts` to refresh
|
|
`MANIFEST.md`
|
|
- [ ] Re-run `bun scripts/generate-missing.ts` to refresh `MISSING.yml`
|
|
- [ ] Add `@suaveplan/currency-provider-virtual` row to `STATUS.md`
|
|
- [ ] Add `@suaveplan/currency-provider-virtual` row to `SUMMARY.md`
|
|
- [ ] `bunx markdownlint-cli2 --fix` across touched root + change files
|
|
|
|
## Archive (AGENTS.md §14)
|
|
|
|
- [ ] Fold `specs/currency-provider-virtual/spec.md` into
|
|
`openspec/specs/currency-provider-virtual/spec.md`
|
|
- [ ] Move `openspec/changes/add-currency-provider-virtual/` →
|
|
`openspec/archive/2026-05-17-add-currency-provider-virtual/`
|