diff --git a/AGENTS.md b/AGENTS.md index 3e62041..5e76dc9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -366,6 +366,22 @@ Each feature binder signature is `(ctx: BindProductionContext): void` for produc --- +### Conformance contract (every feature) + +Every feature package MUST declare a `src/feature.manifest.ts` using `defineFeature` from `@repo/core-shared/conformance`. The manifest declares the use cases, what they audit/publish/consume, and which optional cores they require. + +The feature's `src/di/bind-production.ts` MUST call `assertFeatureConformance(container, manifest, symbols, ctx)` at the tail of `bindProduction` so `pnpm dev` refuses to boot if a binding loses its brand. + +Re-export the manifest from `src/index.ts`: + +```ts +export { fooManifest, type FooManifest } from "./feature.manifest"; +``` + +See `docs/guides/conformance-quickref.md` for the canonical pattern; the generator (`pnpm turbo gen feature `) emits all of this correctly by default. + +--- + ### Cross-feature events and background jobs (Plan 10, ADR-015) Three rules: