Output from `pnpm work decompose 2026-05-13-binder-wrap-helper
--execute` — sandcastle ran the decomposer agent with subscription
auth (after the macOS keychain workaround + Dockerfile fix from
prior commits). The agent wrote files but hit `Max iterations: 1`
before committing, so this commit carries its output unchanged.
Epic: docs/work/binder-wrap-helper/
- _epic.md links to PRD 2026-05-13-binder-wrap-helper
- features: [core-shared, auth, blog, media, marketing-pages,
navigation, tooling]
Stories (8 total, with dependency edges):
01-wire-use-case-helper prereq (blocks 02..07)
Goal: helper at core-shared/conformance/wire-use-case.ts +
tests covering brand stacking, span/capture/audit composition,
idempotent bind. depends-on: [], blocks 02..07.
02-migrate-auth-binders depends-on [01]
03-migrate-blog-binders depends-on [01]
04-migrate-media-binders depends-on [01]
05-migrate-marketing-pages- depends-on [01]
binders
06-migrate-navigation-binders depends-on [01]
07-update-feature-generator depends-on [01]
08-holistic-validation depends-on [02..07], blocks: []
Final gate suite + fallow dupes check to verify the 5 binder-
pair clone groups have disappeared.
After 01 lands, stories 02..07 are parallelisable; 08 collects them.
Pre-commit hook regenerates _state.json + re-stages it so `pnpm
work next` immediately surfaces the new ready story.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
29 lines
1.5 KiB
Markdown
29 lines
1.5 KiB
Markdown
---
|
||
id: binder-wrap-helper
|
||
prd: 2026-05-13-binder-wrap-helper
|
||
title: Collapse binder duplication via wireUseCase helper
|
||
type: epic
|
||
status: in-progress
|
||
features: [core-shared, auth, blog, media, marketing-pages, navigation, tooling]
|
||
created: 2026-05-13
|
||
---
|
||
|
||
## Goal
|
||
|
||
Introduce a `wireUseCase(...)` helper in `@repo/core-shared/conformance/` that encapsulates the `withSpan + withCapture (+ optional withAudit)` composition, then migrate all five features' binder pairs to call it. Update the feature generator template so new features scaffold with the helper by default.
|
||
|
||
## Why
|
||
|
||
Five of `pnpm fallow`'s top-ten clone groups come from binder pairs. The inline wrapping is ~30–79 lines per binder pair, repeated identically across 10 files. Any change to the wrapping shape requires N × 2 simultaneous edits; forgetting one is silent drift.
|
||
|
||
## Stories
|
||
|
||
- [ ] [01 — wireUseCase helper + tests (core-shared)](01-wire-use-case-helper/_story.md)
|
||
- [ ] [02 — Migrate auth binders](02-migrate-auth-binders/_story.md)
|
||
- [ ] [03 — Migrate blog binders](03-migrate-blog-binders/_story.md)
|
||
- [ ] [04 — Migrate media binders](04-migrate-media-binders/_story.md)
|
||
- [ ] [05 — Migrate marketing-pages binders](05-migrate-marketing-pages-binders/_story.md)
|
||
- [ ] [06 — Migrate navigation binders](06-migrate-navigation-binders/_story.md)
|
||
- [ ] [07 — Update feature generator template](07-update-feature-generator/_story.md)
|
||
- [ ] [08 — Holistic validation](08-holistic-validation/_story.md)
|