3.3 KiB
3.3 KiB
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/withsrc/,src/__benchmarks__/, and feature subdirectories. - Write
package.jsonat version0.1.0with"type": "module","sideEffects": false, fullexportsmap. - Write
tsconfig.lib.jsonextendingtsconfig.base.json. - Write
vitest.config.tswith istanbul thresholds at 100/100/100/100. - Write
vite.config.tswith multi-entry lib build. - Add
image-qto rootpackage.jsoncatalog.
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.mdand.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— wrapsimage-qwith 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.tswith fast-check invariants.
10. Root barrel + README
- Write
src/index.tswith 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.mdwith 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-quantisationfrom–to✅. - Update
SUMMARY.mdwith package description.