diff --git a/packages/auth/src/feature.manifest.ts b/packages/auth/src/feature.manifest.ts new file mode 100644 index 0000000..0a36f54 --- /dev/null +++ b/packages/auth/src/feature.manifest.ts @@ -0,0 +1,42 @@ +import { defineFeature } from "@repo/core-shared/conformance"; + +/** + * The auth feature's conformance manifest. Drives binding-slot types in + * `di/bind-production.ts` and is read by ESLint, the boot assertion, and + * the CI drift gate (later milestones). + * + * Conventions: + * - `mutates: true` for any use case that creates, updates, or deletes state + * - `audits` lists every audit event the use case emits (must match calls + * to `auditLog.record(...)` in the factory body — ESLint enforces this + * in a later story) + * - `publishes` / `consumes` cover cross-feature events through `IEventBus` + */ +export const authManifest = defineFeature({ + name: "auth", + requiredCores: [], + useCases: { + signIn: { + mutates: false, + audits: [], + publishes: [], + consumes: [], + }, + signUp: { + mutates: true, + audits: [], + publishes: [], + consumes: [], + }, + signOut: { + mutates: true, + audits: [], + publishes: [], + consumes: [], + }, + }, + realtimeChannels: [], + jobs: [], +} as const); + +export type AuthManifest = typeof authManifest;