docs(work): archive shipped template epics and PRDs
Move the 8 shipped template epics and their 9 PRDs (incl.
coverage-architecture) to docs/work/archive/{epics,prds}/ so dispatch
context and prioritization only see live Veect work. The state builder
already walks docs/work/epics/ + docs/work/prds/ only; the one work-CLI
script that matched archive paths (bump-updated-timestamps.mjs, staged
docs/work/**/*.md) now excludes docs/work/archive/ so archived content
stays byte-identical.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016j8z4VHjedXDTjEDNg7qHK
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
---
|
||||
id: 06-analytics-protocol-bind-context
|
||||
epic: product-analytics-channel
|
||||
title: Add AnalyticsProtocol and BindContext.analytics
|
||||
type: technical-story
|
||||
status: done
|
||||
feature: core-shared
|
||||
depends-on: [05-assert-feature-conformance-analyzed]
|
||||
blocks: [09-documentation]
|
||||
created: 2026-05-18T12:05:00Z
|
||||
updated: 2026-05-18T15:40:20.464Z
|
||||
---
|
||||
|
||||
## Goal
|
||||
|
||||
Add `AnalyticsProtocol` to `core-shared/di/bind-protocols.ts` and an optional `analytics?: AnalyticsProtocol` field to `BindContext`. This is the DI seam that lets feature binders receive an analytics implementation at bind time without importing the concrete class.
|
||||
|
||||
## Why
|
||||
|
||||
Feature binders that need analytics accept `ctx.analytics` from the aggregator's `BindContext`. Without the protocol type and context field, there's no typed path for passing analytics through the DI layer. Mirrors how `IEventBus`, `IAuditLog`, and `IJobQueue` are threaded through `BindContext`.
|
||||
|
||||
## Done when
|
||||
|
||||
- `AnalyticsProtocol` structural type exists in `packages/core-shared/src/di/bind-protocols.ts` and is exported.
|
||||
- `BindContext` (and `BindProductionContext`) gain `analytics?: AnalyticsProtocol`.
|
||||
- Existing binder call-sites compile without changes (field is optional).
|
||||
- All gates pass.
|
||||
|
||||
## In scope
|
||||
|
||||
- `packages/core-shared/src/di/bind-protocols.ts` — `AnalyticsProtocol` type.
|
||||
- `packages/core-shared/src/di/bind-context.ts` — `analytics?:` field on both context shapes.
|
||||
- Exports from `@repo/core-shared/di` barrel.
|
||||
|
||||
## Out of scope
|
||||
|
||||
- Wiring analytics in any actual feature binder (no template feature adopts analytics per PRD).
|
||||
- `IAnalytics` class methods — `AnalyticsProtocol` is the structural type used for DI; it mirrors the `IAnalytics` shape but lives in `core-shared` to avoid a circular dependency.
|
||||
|
||||
## Tasks
|
||||
|
||||
- [x] Add `AnalyticsProtocol` structural type to `packages/core-shared/src/di/bind-protocols.ts` and `analytics?: AnalyticsProtocol` to `BindContext` + `BindProductionContext`; export from the `@repo/core-shared/di` barrel — all gates pass on this commit.
|
||||
Reference in New Issue
Block a user