Files
suaveplan/openspec/archive/2026-05-22-migrate-image/tasks.md
2026-05-27 23:29:53 +01:00

2.8 KiB

Tasks — Migrate @suaveplan/image to genesis

Every checkbox MUST reflect work actually done in this change.

1. Spec authoring

  • 1.1 Read ../suaveplan/enterprise/image.md end-to-end
  • 1.2 Read upstream source (../suaveplan/packages/universal/image/src/)
  • 1.3 Read openspec/AGENTS.md Sections 13 and 14
  • 1.4 Draft proposal.md from openspec/templates/proposal.md
  • 1.5 Fill in ## Source mapping table
  • 1.6 Draft specs/image/spec.md from openspec/templates/spec-delta.md
  • 1.7 Every requirement in the spec delta carries a **Verified by:** line

2. Implementation

  • 2.1 Scaffold package at packages/media/image/image/
  • 2.2 Implement src/error-codes/error-codes.ts with defineCodes
  • 2.3 Implement src/errors/errors.ts with ImageError + factories
  • 2.4 Implement src/types/image-types.ts with Zod schemas + pure functions
  • 2.5 Implement src/processor/processor.ts with ImageProcessor, PipelineBuilder, OTel
  • 2.6 Wire root barrel src/index.ts with explicit named exports

3. Tests

  • 3.1 Unit tests at src/error-codes/error-codes.test.ts
  • 3.2 Unit tests at src/errors/errors.test.ts
  • 3.3 Unit tests at src/types/image-types.test.ts
  • 3.4 Unit tests at src/processor/processor.test.ts
  • 3.5 Spec-conformance tests at src/processor/processor.spec-conformance.test.ts
  • 3.6 Integration tests at tests/dep-graph.test.ts and tests/tree-shake.test.ts
  • 3.7 Every it(...) carries { timeout: 5000 }

4. Documentation

  • 4.1 Sibling .md for every implementation .ts
  • 4.2 README with quick-start, modules, install
  • 4.3 Update CLAUDE.md package listing

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

  • 5.1 bun run check — Biome 0 errors / 0 warnings / 0 info
  • 5.2 bunx turbo lint typecheck test --filter=@suaveplan/image — green
  • 5.3 bunx turbo test:coverage --filter=@suaveplan/image — 100/100/100/100
  • 5.4 bun scripts/openspec-conformance.ts @suaveplan/image — exit 0
  • 5.5 bunx turbo build --filter=@suaveplan/image — green

6. Pre-archive 7-row checklist

  • 6.1 Generics threaded; expectTypeOf assertions on every literal-type claim
  • 6.2 Zod schemas wired at every declared boundary
  • 6.3 Every error code in error-codes.ts thrown by at least one production path
  • 6.4 Strict-mode behaviors tested both on and off
  • 6.5 OTel instruments emitted from production paths and asserted with real MeterProvider
  • 6.6 Lifecycle dedup tested where claimed
  • 6.7 No retroactive tick

7. Archive

  • 7.1 Fold spec delta into openspec/specs/image/spec.md
  • 7.2 Move openspec/changes/migrate-image/ → openspec/archive/<yyyy-mm-dd>-migrate-image/
  • 7.3 Refresh MANIFEST.md
  • 7.4 Update STATUS.md and SUMMARY.md