Files
2026-05-27 23:29:53 +01:00

3.0 KiB

Tasks — @suaveplan/i18n-formatter-currency

Reconciled retroactively after Wave 3 shipped under commit 1cb2f412. Package is built, tested, and validated; this pass folds the spec delta into openspec/specs/i18n-formatter-currency/spec.md (12 requirements) and archives the change folder. All **Verified by:** paths in the spec have been confirmed to exist in packages/i18n/i18n-formatter-currency/src/.

1. Spec authoring

  • 1.1 Cross-cutting design + AGENTS sections read
  • 1.2 Source-mapping table populated
  • 1.3 proposal.md authored
  • 1.4 specs/i18n-formatter-currency/spec.md delta drafted (12 requirements)
  • 1.5 Every requirement carries a **Verified by:** line
  • 1.6 openspec change validate i18n-formatter-currency clean

2. Package scaffold

  • 2.1 packages/i18n/i18n-formatter-currency/src/ structure
  • 2.2 package.json — @suaveplan/i18n-formatter-currency@0.0.0, type: module, sideEffects: false, deps include @suaveplan/i18n-shared/@suaveplan/error/@suaveplan/types
  • 2.3 tsconfig.lib.json extends shared library config
  • 2.4 vite.config.ts + vitest.config.ts
  • 2.5 README.md with Modules table

3. Implementation

  • 3.1 Formatter implementation under src/ wrapping Intl with cache, Zod options boundary, structured I18nError mapping (INVALID_FORMATTER_OPTIONS/UNSUPPORTED_LOCALE/FORMATTER_CACHE_OVERFLOW)
  • 3.2 OTel spans + counters + cache-hit histograms
  • 3.3 Sibling .md per .ts implementation file
  • 3.4 Root src/index.ts — explicit named re-exports (no export *)

4. Tests (runner-neutral imports)

  • 4.1 Unit tests covering every documented scenario in the spec
  • 4.2 Property/edge-case tests
  • 4.3 Cache-eviction + overflow tests
  • 4.4 Every it(...) carries { timeout: 5000 }
  • 4.5 Runner-neutral imports via @suaveplan/testing/runner — CLAUDE.md §11 grep clean (verified)

5. Pre-archive verification

  • 5.1 Biome clean
  • 5.2 bunx turbo lint typecheck test --filter=@suaveplan/i18n-formatter-currency green at commit time
  • 5.3 bunx turbo test:coverage --filter=@suaveplan/i18n-formatter-currency 100/100/100/100 at commit time
  • 5.4 Conformance script clean
  • 5.5 Build green

6. Pre-archive 7-row checklist

  • 6.1 Generics threaded — formatter options typed via shared-bundle types
  • 6.2 Zod schemas — options boundary validated
  • 6.3 Error codes — INVALID_FORMATTER_OPTIONS/UNSUPPORTED_LOCALE/FORMATTER_CACHE_OVERFLOW consumed from i18n-shared
  • 6.4 Strict-mode tested
  • 6.5 OTel — spans/counters/histograms
  • 6.6 Lifecycle dedup — N/A (Intl formatter cache is bounded; no lifecycle handle)
  • 6.7 No retroactive tick — boxes ticked during reconciliation pass after honest audit

7. Archive

  • 7.1 Spec delta folded into openspec/specs/i18n-formatter-currency/spec.md (canonical, status ACTIVE)
  • 7.2 Folder moved to openspec/archive/2026-05-09-i18n-formatter-currency/
  • 7.3 MANIFEST.md already lists the package