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

2.1 KiB

Tasks: campaigns

§0 Pre-flight (NON-NEGOTIABLE)

  • Run pwd && git worktree list && git status — confirm we are in an isolated .claude/worktrees/agent-* worktree, not main.
  • Sync via git merge-base --is-ancestor check + git fetch /home/paul/web/genesis genesis && git merge FETCH_HEAD if behind.

§1 Skeleton

  • Create packages/communication/emails/campaigns/ directory.
  • Author package.json with all 9 subpath exports.
  • Author vite.config.ts, vitest.config.ts, tsconfig.lib.json, tests/setup/polyfills.ts.
  • Update scripts/folder-reorg/assignment.yml (move campaigns from platform → emails).

§2 Source modules (5-file feature layout)

  • src/types/campaign.types.ts + index.ts (flat exemption).
  • src/error-codes/{error-codes.ts, error-codes.test.ts, error-codes.md, index.ts}.
  • src/telemetry/{telemetry.ts, telemetry.test.ts, telemetry.md, index.ts}.
  • src/state-machine/{state-machine.ts, state-machine.test.ts, state-machine.md, index.ts}.
  • src/batch-planner/{batch-planner.ts, batch-planner.test.ts, batch-planner.md, index.ts}.
  • src/store/{store.ts, store.test.ts, store.md, index.ts}.
  • src/engine/{engine.ts, engine.test.ts, engine.md, index.ts}.
  • src/workflow/{workflow.ts, workflow.test.ts, workflow.md, index.ts}.
  • src/index.ts root barrel with explicit named re-exports.

§3 Verification gate

  • bunx turbo lint typecheck test --filter=@suaveplan/campaigns — green.
  • bunx turbo test:coverage --filter=@suaveplan/campaigns — 100/100/100/100.
  • bunx turbo build --filter=@suaveplan/campaigns — emits dist/.
  • grep -rnE "from ['\"](vitest|bun:test)['\"]" packages/communication/emails/campaigns/src/ — empty.
  • grep -rn "biome-ignore\|TODO\|FIXME\|XXX" packages/communication/emails/campaigns/src/ — empty.
  • bun scripts/lint/check-feature-layout.ts | grep campaigns — no violations.
  • bun scripts/folder-reorg/generate-manifest.ts to refresh MANIFEST.md.

§4 Commit

  • Single feat(campaigns): ... commit on the worktree branch. Never --no-verify, never auto-push.