Files
suaveplan/openspec/archive/2026-05-24-campaigns/tasks.md
2026-05-27 23:29:53 +01:00

40 lines
2.1 KiB
Markdown

# Tasks: campaigns
## §0 Pre-flight (NON-NEGOTIABLE)
- [x] Run `pwd && git worktree list && git status` — confirm we are in an isolated `.claude/worktrees/agent-*` worktree, not main.
- [x] Sync via `git merge-base --is-ancestor` check + `git fetch /home/paul/web/genesis genesis && git merge FETCH_HEAD` if behind.
## §1 Skeleton
- [x] Create `packages/communication/emails/campaigns/` directory.
- [x] Author `package.json` with all 9 subpath exports.
- [x] Author `vite.config.ts`, `vitest.config.ts`, `tsconfig.lib.json`, `tests/setup/polyfills.ts`.
- [x] Update `scripts/folder-reorg/assignment.yml` (move `campaigns` from `platform` → `emails`).
## §2 Source modules (5-file feature layout)
- [x] `src/types/campaign.types.ts` + `index.ts` (flat exemption).
- [x] `src/error-codes/{error-codes.ts, error-codes.test.ts, error-codes.md, index.ts}`.
- [x] `src/telemetry/{telemetry.ts, telemetry.test.ts, telemetry.md, index.ts}`.
- [x] `src/state-machine/{state-machine.ts, state-machine.test.ts, state-machine.md, index.ts}`.
- [x] `src/batch-planner/{batch-planner.ts, batch-planner.test.ts, batch-planner.md, index.ts}`.
- [x] `src/store/{store.ts, store.test.ts, store.md, index.ts}`.
- [x] `src/engine/{engine.ts, engine.test.ts, engine.md, index.ts}`.
- [x] `src/workflow/{workflow.ts, workflow.test.ts, workflow.md, index.ts}`.
- [x] `src/index.ts` root barrel with explicit named re-exports.
## §3 Verification gate
- [x] `bunx turbo lint typecheck test --filter=@suaveplan/campaigns` — green.
- [x] `bunx turbo test:coverage --filter=@suaveplan/campaigns` — 100/100/100/100.
- [x] `bunx turbo build --filter=@suaveplan/campaigns` — emits `dist/`.
- [x] `grep -rnE "from ['\"](vitest|bun:test)['\"]" packages/communication/emails/campaigns/src/` — empty.
- [x] `grep -rn "biome-ignore\|TODO\|FIXME\|XXX" packages/communication/emails/campaigns/src/` — empty.
- [x] `bun scripts/lint/check-feature-layout.ts | grep campaigns` — no violations.
- [x] `bun scripts/folder-reorg/generate-manifest.ts` to refresh `MANIFEST.md`.
## §4 Commit
- [x] Single `feat(campaigns): ...` commit on the worktree branch. Never `--no-verify`, never auto-push.