4.2 KiB
4.2 KiB
Tasks — Add @suaveplan/currency-provider-binance
Spec-completeness preflight (AGENTS.md §12a)
- Numbered checklist of every
### Requirementand#### Scenariodrafted inspecs/currency-provider-binance/spec.md(5 requirements, 18 scenarios — see./specs/currency-provider-binance/spec.md).
Scaffold the package
- Create
packages/finance/currency-provider-binance/directory - Author
package.json— name, exports map (root + single subpath./binance/binance), deps on@suaveplan/currency,@suaveplan/currency-providers,@suaveplan/error,@suaveplan/types,tslib; dev-deps on@suaveplan/testing, vitest, vite, vite-plugin-dts,@vitest/coverage-istanbul - Author
tsconfig.json+tsconfig.lib.jsonmirroring the slim core - Author
vite.config.tswith the same external list as the slim core plus@suaveplan/currency-providers - Author
vitest.config.tswith 100/100/100/100 istanbul thresholds - Author
tests/setup/polyfills.ts(no polyfills needed — universal-tier)
Implement the provider
src/binance/binance.ts—BinanceProviderclass,BINANCE_PROVIDER_NAME,BINANCE_DEFAULT_BASE_URL,ensureTickerArrayshape guard,decodeRatessuffix decoder,filterTargetsraisingUNKNOWN_CURRENCY,httpRequestdelegation with caller signal + timeout forwarding,PARSE_ERRORwrapping ofresponse.json()src/binance/binance.md— sibling doc, six required sections, ≥200 wordssrc/binance/binance.test.ts— happy path (default + custom base), targets filter, custom baseUrl, sanitisation (zero, negative, non-finite, suffix-equals-symbol), every error code reachable, signal forwarding, timeout forwarding, default-fetch fallbacksrc/binance/index.ts— explicit named barrelsrc/index.ts— explicit named barrel re-exporting the three public symbols
Documentation
README.md— H1, one-paragraph description, install snippet, quick start, features list, Modules list linking the sibling.md, Status note- Confirm every
.tsinsrc/has a sibling.md(the §13 step-5 grep returns zero)
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-binancegreen andbun run checkgreen - Step 2 —
bunx turbo test:coverage --filter=@suaveplan/currency-provider-binancereports 100/100/100/100 via istanbul - Step 3 —
bunx turbo build --filter=@suaveplan/currency-provider-binancegreen - 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 = 1 (matches feature module count)
- Step 9 — security-scan grep returns zero
- Step 10 — dependent sweep
(
bunx turbo test --filter=...@suaveplan/currency-provider-binance)
Root-doc refresh (AGENTS.md §13b)
- Update
scripts/folder-reorg/assignment.yml— addcurrency-provider-binanceunder thecommerce:block - Re-run
bun scripts/folder-reorg/generate-manifest.tsto refreshMANIFEST.md - Re-run
bun scripts/generate-missing.tsto refreshMISSING.yml - Update
STATUS.mdcommercetable to add the@suaveplan/currency-provider-binancerow with the shipped surface summary - Update
SUMMARY.mdwith a per-package paragraph bunx markdownlint-cli2 --fixacross touched root + change files
Archive (AGENTS.md §14)
- Fold
specs/currency-provider-binance/spec.mdintoopenspec/specs/currency-provider-binance/spec.md - Move
openspec/changes/add-currency-provider-binance/→openspec/archive/2026-05-17-add-currency-provider-binance/(authored directly in archive per the task instructions)