87 lines
3.3 KiB
Markdown
87 lines
3.3 KiB
Markdown
# Tasks: enterprise-image-quantisation
|
||
|
||
**Change ID**: enterprise-image-quantisation
|
||
**Package**: `@suaveplan/image-quantisation`
|
||
**Target path**: `packages/media/image/image-quantisation`
|
||
|
||
---
|
||
|
||
## 1. Scaffold
|
||
|
||
- [x] Create directory `packages/media/image/image-quantisation/` with `src/`, `src/__benchmarks__/`, and feature subdirectories.
|
||
- [x] Write `package.json` at version `0.1.0` with `"type": "module"`, `"sideEffects": false`, full `exports` map.
|
||
- [x] Write `tsconfig.lib.json` extending `tsconfig.base.json`.
|
||
- [x] Write `vitest.config.ts` with istanbul thresholds at 100/100/100/100.
|
||
- [x] Write `vite.config.ts` with multi-entry lib build.
|
||
- [x] Add `image-q` to root `package.json` catalog.
|
||
|
||
## 2. Types + errors
|
||
|
||
- [x] Write `src/types/common.ts` — all domain types.
|
||
- [x] Write `src/types/common.md`.
|
||
- [x] Write `src/errors/image-quantisation-error.ts` — `QuantisationError`, `QUANTISATION_CODES`.
|
||
- [x] Write `src/errors/image-quantisation-error.md` and `.test.ts`.
|
||
|
||
## 3. Schemas
|
||
|
||
- [x] Write `src/schemas/options.schema.ts` — Zod schemas for all public options.
|
||
- [x] Write `src/schemas/options.schema.md`.
|
||
|
||
## 4. Analysis modules
|
||
|
||
- [x] Write `src/analysis/colour/colour.ts` + `.test.ts` + `.md`.
|
||
- [x] Write `src/analysis/edges/edges.ts` + `.test.ts` + `.md`.
|
||
- [x] Write `src/analysis/pools/pools.ts` + `.test.ts` + `.md`.
|
||
- [x] Write `src/analysis/classify/classify.ts` + `.test.ts` + `.md`.
|
||
|
||
## 5. Quantisation
|
||
|
||
- [x] Write `src/quantise/quantise.ts` — wraps `image-q` with Zod + OTel.
|
||
- [x] Write `src/quantise/quantise.test.ts` + `.md`.
|
||
|
||
## 6. Spatial cleanup
|
||
|
||
- [x] Write `src/spatial/cleanup/cleanup.ts` + `.test.ts` + `.md`.
|
||
|
||
## 7. Pipeline
|
||
|
||
- [x] Write `src/pipeline/pipeline.ts` — adaptive workflow with Zod + OTel.
|
||
- [x] Write `src/pipeline/pipeline.test.ts` + `.md`.
|
||
|
||
## 8. Benchmarks
|
||
|
||
- [x] Write `src/__benchmarks__/quantisation.bench.ts`.
|
||
|
||
## 9. Property tests
|
||
|
||
- [x] Write `src/property.test.ts` with fast-check invariants.
|
||
|
||
## 10. Root barrel + README
|
||
|
||
- [x] Write `src/index.ts` with explicit named re-exports.
|
||
- [x] Write `README.md`.
|
||
|
||
## 11. Gates
|
||
|
||
- [x] `bunx turbo lint --filter=@suaveplan/image-quantisation` — green.
|
||
- [x] `bunx turbo typecheck --filter=@suaveplan/image-quantisation` — green.
|
||
- [x] `bunx turbo test --filter=@suaveplan/image-quantisation` — green.
|
||
- [x] `bunx turbo test:coverage --filter=@suaveplan/image-quantisation` — 100/100/100/100.
|
||
- [x] `bunx turbo build --filter=@suaveplan/image-quantisation` — green.
|
||
- [x] `bun run docs:check` — 100%.
|
||
- [x] `bun scripts/openspec-conformance.ts packages/media/image/image-quantisation` — 0 errors.
|
||
|
||
## 12. Spec + archive
|
||
|
||
- [x] Write `openspec/changes/enterprise-image-quantisation/specs/image-quantisation/spec.md`.
|
||
- [x] Update `openspec/changes/enterprise-image-quantisation/proposal.md` with parity checklist.
|
||
- [x] Update `openspec/changes/enterprise-image-quantisation/tasks.md`.
|
||
- [x] Fold spec delta into `openspec/specs/image-quantisation/spec.md`.
|
||
- [x] Move `openspec/changes/enterprise-image-quantisation/` → `openspec/archive/2026-05-21-enterprise-image-quantisation/`.
|
||
|
||
## 13. Manifest updates
|
||
|
||
- [x] Run `bun scripts/folder-reorg/generate-manifest.ts`.
|
||
- [x] Update `STATUS.md` — flip `@suaveplan/image-quantisation` from `–` to `✅`.
|
||
- [x] Update `SUMMARY.md` with package description.
|