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

3.3 KiB
Raw Blame History

Tasks: enterprise-image-quantisation

Change ID: enterprise-image-quantisation Package: @suaveplan/image-quantisation Target path: packages/media/image/image-quantisation


1. Scaffold

  • Create directory packages/media/image/image-quantisation/ with src/, src/__benchmarks__/, and feature subdirectories.
  • Write package.json at version 0.1.0 with "type": "module", "sideEffects": false, full exports map.
  • Write tsconfig.lib.json extending tsconfig.base.json.
  • Write vitest.config.ts with istanbul thresholds at 100/100/100/100.
  • Write vite.config.ts with multi-entry lib build.
  • Add image-q to root package.json catalog.

2. Types + errors

  • Write src/types/common.ts — all domain types.
  • Write src/types/common.md.
  • Write src/errors/image-quantisation-error.ts — QuantisationError, QUANTISATION_CODES.
  • Write src/errors/image-quantisation-error.md and .test.ts.

3. Schemas

  • Write src/schemas/options.schema.ts — Zod schemas for all public options.
  • Write src/schemas/options.schema.md.

4. Analysis modules

  • Write src/analysis/colour/colour.ts + .test.ts + .md.
  • Write src/analysis/edges/edges.ts + .test.ts + .md.
  • Write src/analysis/pools/pools.ts + .test.ts + .md.
  • Write src/analysis/classify/classify.ts + .test.ts + .md.

5. Quantisation

  • Write src/quantise/quantise.ts — wraps image-q with Zod + OTel.
  • Write src/quantise/quantise.test.ts + .md.

6. Spatial cleanup

  • Write src/spatial/cleanup/cleanup.ts + .test.ts + .md.

7. Pipeline

  • Write src/pipeline/pipeline.ts — adaptive workflow with Zod + OTel.
  • Write src/pipeline/pipeline.test.ts + .md.

8. Benchmarks

  • Write src/__benchmarks__/quantisation.bench.ts.

9. Property tests

  • Write src/property.test.ts with fast-check invariants.

10. Root barrel + README

  • Write src/index.ts with explicit named re-exports.
  • Write README.md.

11. Gates

  • bunx turbo lint --filter=@suaveplan/image-quantisation — green.
  • bunx turbo typecheck --filter=@suaveplan/image-quantisation — green.
  • bunx turbo test --filter=@suaveplan/image-quantisation — green.
  • bunx turbo test:coverage --filter=@suaveplan/image-quantisation — 100/100/100/100.
  • bunx turbo build --filter=@suaveplan/image-quantisation — green.
  • bun run docs:check — 100%.
  • bun scripts/openspec-conformance.ts packages/media/image/image-quantisation — 0 errors.

12. Spec + archive

  • Write openspec/changes/enterprise-image-quantisation/specs/image-quantisation/spec.md.
  • Update openspec/changes/enterprise-image-quantisation/proposal.md with parity checklist.
  • Update openspec/changes/enterprise-image-quantisation/tasks.md.
  • Fold spec delta into openspec/specs/image-quantisation/spec.md.
  • Move openspec/changes/enterprise-image-quantisation/ → openspec/archive/2026-05-21-enterprise-image-quantisation/.

13. Manifest updates

  • Run bun scripts/folder-reorg/generate-manifest.ts.
  • Update STATUS.md — flip @suaveplan/image-quantisation from – to ✅.
  • Update SUMMARY.md with package description.