# Tasks — add @suaveplan/slack-client > Every checkbox MUST reflect work actually done in this change. No retroactive ticking. ## 1. Spec authoring - [x] 1.1 Read `../suaveplan/enterprise/slack-client.md` end-to-end - [x] 1.2 No prior `openspec/specs/slack-client/spec.md` (new capability) - [x] 1.3 Read `openspec/AGENTS.md` workflow (CLAUDE.md ref) + skill `enterprise-package-migration` - [x] 1.4 Draft `proposal.md` from `openspec/templates/proposal.md` - [x] 1.5 Source-mapping table filled — every requirement cites a line range or appears under "no source line" - [x] 1.6 Draft `specs/slack-client/spec.md` from `openspec/templates/spec-delta.md` - [x] 1.7 Every requirement carries a `**Verified by:**` line ## 2. Implementation - [x] 2.1 `package.json` + `tsconfig.lib.json` + `vite.config.ts` + `vitest.config.ts` at 0.1.0 - [x] 2.2 `src/error-codes.ts` — `defineCodes("SLACK", […])` registry + 8 typed error subclasses - [x] 2.3 `src/types/slack-client.types.ts` — public shapes (`SlackMessage`, `SlackChannel`, `SlackUser`, `SlackResponse`, `SlackDeliveryReport`, options bags) - [x] 2.4 `src/schemas/schemas.ts` — Zod schemas for every public boundary input - [x] 2.5 `src/otel/metrics.ts` — meter + four instruments wired via `@opentelemetry/api` - [x] 2.6 `src/client/retry-after.ts` — parser for delay-seconds, HTTP-date, x-ratelimit-reset - [x] 2.7 `src/client/classify.ts` — HTTP-status and slack-error-string classifiers - [x] 2.8 `src/client/slack-api-client.ts` — `SlackApiClient` with injectable `FetchLike`/`Clock`/`Rng`/`LoggerLike` - [x] 2.9 `src/webhook/slack-webhook.ts` — `SlackWebhook` with injectable transport bag - [x] 2.10 `src/fakes/fake-fetch.ts` — deterministic test double (no `vi.mock`) - [x] 2.11 `src/index.ts` — explicit named re-exports, side-effect `import "./error-codes.js"` ## 3. Tests - [x] 3.1 Unit tests at every `.test.ts` site, ≥1 test per scenario in the spec delta — 121 tests, 8 files - [x] 3.2 OTel test asserts emission via real in-memory `MeterProvider` - [x] 3.3 Every `it(...)` carries `{ timeout: 5000 }` (or 30000 for genuinely async) - [x] 3.4 Test files import ONLY from `@suaveplan/testing/runner` — zero direct `vitest` / `bun:test` imports ## 4. Documentation - [x] 4.1 Sibling `.md` for every implementation `.ts` (≥200 words, basic + advanced examples, full API reference) - [x] 4.2 README at package root only ## 5. Pre-archive verification (5-gate triple) - [x] 5.1 `bun run check` — slack-client clean (one pre-existing root-level failure in `packages/api/api-plugin-vault/src/plugin/plugin.ts:217` is out of scope; verified slack-client itself is biome-clean) - [x] 5.2 `bunx turbo lint typecheck test --filter=@suaveplan/slack-client` — green (121 tests pass) - [x] 5.3 `bunx turbo test:coverage --filter=@suaveplan/slack-client` — 100/100/100/100 istanbul - [x] 5.4 `bun scripts/openspec-conformance.ts @suaveplan/slack-client` — `PASS @suaveplan/slack-client (0 error, 5 warn, 0 info)` - [x] 5.5 `bunx turbo build --filter=@suaveplan/slack-client` — green, 9 modules in dist ## 6. Pre-archive 9-row checklist - [x] 6.1 Generics threaded; literal types preserved through public surface (`SlackErrorCode` literal union, `SLACK_CODES` frozen record) - [x] 6.2 Zod schemas wired at every declared boundary (constructors call `.safeParse` and throw `SlackConfigMissingError` with the `ZodError` as cause) - [x] 6.3 Every error code in `error-codes.ts` thrown by ≥1 production path (all 8 verified via conformance script) - [x] 6.4 Strict-mode behaviors tested — constructor rejection on empty/invalid options AND Block-Kit `.strict()` rejection of unknown keys - [x] 6.5 OTel instruments emitted from production paths and asserted with real in-memory `MeterProvider` (4 tests in `src/otel/metrics.test.ts`) - [x] 6.6 Lifecycle dedup tested — delivery-report Map idempotency, webhook message-id monotonicity - [x] 6.7 No retroactive tick — every box above reflects work done in this change - [x] 6.8 No `export *` in any feature barrel (verified — every export is named) - [x] 6.9 No direct `vitest` / `bun:test` imports in test files (every test imports from `@suaveplan/testing/runner`) ## 7. Archive - [x] 7.1 Fold spec delta into `openspec/specs/slack-client/spec.md` - [x] 7.2 Move `openspec/changes/add-slack-client/` → `openspec/archive/2026-05-18-add-slack-client/`