# Tasks — Add `@suaveplan/audio-ir-core` > Every checkbox MUST reflect work actually done in this change. No retroactive ticking. ## 1. Spec authoring - [ ] 1.1 Read `openspec/AGENTS.md` §§ 13, 14, 14a, 2c, 6a, 193 - [ ] 1.2 `proposal.md` (this change) — including `## Impact` per §14a - [ ] 1.3 `design.md` — cross-cutting model for the IR family (referenced by every sibling change) - [ ] 1.4 `specs/audio-ir-core/spec.md` — every requirement carries `**Verified by:**` - [ ] 1.5 Working-notes checklist enumerates every `### Requirement` and `#### Scenario` ## 2. Package scaffold - [ ] 2.1 `mkdir -p packages/audio-ir/audio-ir-core/src/{types,registry,otel,error-codes}` - [ ] 2.2 `package.json` — `version: 0.0.0`, `sideEffects: false`, deps `@suaveplan/{error,types,opentelemetry}`, `zod`, `tslib` - [ ] 2.3 `tsconfig.lib.json`, `vite.config.ts`, `biome.json` - [ ] 2.4 Subpath exports: `.`, `./types`, `./registry`, `./error-codes` - [ ] 2.5 `README.md` linking every `.md` under `## Modules` ## 3. Implementation - [ ] 3.1 `src/types/manifest-entry.ts` + `.md` + Zod schema + frozen invariant - [ ] 3.2 `src/types/manifest.ts` + `.md` + Zod schema with id-prefix & family refinements - [ ] 3.3 `src/types/impulse-response.ts` + `.md` + Zod schema (used by `audio-ir-loader`) - [ ] 3.4 `src/error-codes/error-codes.ts` + `.md` — `defineCodes("AUDIO_IR", [...])` - [ ] 3.5 `src/registry/registry.ts` + `.md` — `createIrRegistry`, all five methods - [ ] 3.6 `src/registry/register-manifest.ts` + `.md` — `registerManifest` helper - [ ] 3.7 `src/otel/otel.ts` + `.md` — tracer, counters, observable gauge - [ ] 3.8 `src/index.ts` — explicit named re-exports (rule 10) ## 4. Tests - [ ] 4.1 `src/types/manifest-entry.test.ts` — Zod parsing + freeze invariant - [ ] 4.2 `src/types/manifest.test.ts` — manifest-level refinements - [ ] 4.3 `src/registry/registry.test.ts` — every scenario from registry requirement - [ ] 4.4 `src/registry/registry.spec-conformance.test.ts` — strict-mode + insertion-order invariants - [ ] 4.5 `src/registry/register-manifest.test.ts` — well-formed + partial-failure paths - [ ] 4.6 `src/otel/otel.test.ts` — real in-memory `MeterProvider` - [ ] 4.7 `src/error-codes/error-codes.test.ts` — exhaustion - [ ] 4.8 Every `it(...)` carries `{ timeout: 5000 }` (or 30000 for async) ## 5. Documentation - [ ] 5.1 Sibling `.md` for every `.ts` (≥200 words, basic + advanced examples) - [ ] 5.2 README `## Modules` section - [ ] 5.3 Update root `CLAUDE.md` Packages section — add new "Audio IR" subsection ## 6. Pre-archive verification (5-gate triple) - [ ] 6.1 `bun run check` — 0/0/0/0 - [ ] 6.2 `bunx turbo lint typecheck test --filter=@suaveplan/audio-ir-core` — green - [ ] 6.3 `bunx turbo test:coverage --filter=@suaveplan/audio-ir-core` — 100/100/100/100 - [ ] 6.4 `bun scripts/openspec-conformance.ts @suaveplan/audio-ir-core` — exit 0 - [ ] 6.5 `bunx turbo build --filter=@suaveplan/audio-ir-core` — green ## 7. Pre-archive 7-row checklist (AGENTS §13) - [ ] 7.1 Generics threaded; `expectTypeOf` assertions on literal-type claims - [ ] 7.2 Zod schemas wired at every boundary - [ ] 7.3 Every `AUDIO_IR_CODES` code thrown by at least one production path - [ ] 7.4 Strict-mode behaviors tested both on and off - [ ] 7.5 OTel instruments asserted with real in-memory `MeterProvider` - [ ] 7.6 Lifecycle dedup tested (registry idempotency, freeze invariant) - [ ] 7.7 No retroactive tick ## 8. Archive - [ ] 8.1 Fold delta into new `openspec/specs/audio-ir-core/spec.md` - [ ] 8.2 Move folder to `openspec/archive/-add-audio-ir-core/` - [ ] 8.3 Refresh `MANIFEST.md`