--- id: 03-migrate-blog-binders epic: binder-wrap-helper title: Migrate blog feature binders to wireUseCase type: technical-story status: todo feature: blog depends-on: [01-wire-use-case-helper] blocks: [08-holistic-validation] --- ## Goal Replace the inline `withSpan + withCapture (+ optional withAudit)` blocks in `packages/blog/src/di/bind-production.ts` and `packages/blog/src/di/bind-dev-seed.ts` with `wireUseCase` calls for all three blog use cases (getArticles, getArticleBySlug, createArticle). ## Why Blog's binder pair contributes one of the five top-ten `pnpm fallow` clone groups. The inline wrap blocks are mechanical boilerplate identical in shape to auth, media, marketing-pages, and navigation. ## Done when - `bind-production.ts` and `bind-dev-seed.ts` call `wireUseCase` for getArticles, getArticleBySlug, and createArticle — no inline `withSpan(... withCapture(...))` pattern remains in either file. - Audit-bearing use cases (per manifest check) pass `auditLog` + audit schema; non-audit use cases omit it. - `pnpm test --filter @repo/blog` green. - `pnpm typecheck --filter @repo/blog` green. - `assertFeatureConformance` does not throw at boot for blog. ## In scope - `packages/blog/src/di/bind-production.ts` — use-case binding blocks only. - `packages/blog/src/di/bind-dev-seed.ts` — use-case binding blocks only. - Repository and service bindings stay as-is. - Controller bindings stay as-is. ## Out of scope - Controller bindings — deferred follow-up per PRD. - Changes to blog use-case implementations, schemas, or tests outside the binder. ## Tasks - [ ] Read `packages/blog/src/feature.manifest.ts` — identify audit-bearing vs non-audit use cases - [ ] Read `packages/blog/src/di/bind-production.ts` — understand inline wrap shape and deps - [ ] Read `packages/blog/src/di/bind-dev-seed.ts` — same for dev-seed mode - [ ] Update `packages/blog/src/di/bind-production.ts` — replace three inline wrap blocks with `wireUseCase` calls - [ ] Update `packages/blog/src/di/bind-dev-seed.ts` — same - [ ] Run `pnpm test --filter @repo/blog` — verify all tests pass - [ ] Run `pnpm typecheck --filter @repo/blog` — verify no type regressions