feat(conformance): wire cross-feature reader pattern into docs and schema

Add reads field to UseCaseManifest, update CLAUDE.md with Q0-Q3 rules,
add ./reader subpath to AGENTS.md exports table, and cascade reader
conventions through conformance quickref, adding-a-feature guide, and
scaffolding guide. Moves gen reader from deferred to planned.
This commit is contained in:
danijel-lf
2026-05-28 20:55:34 +02:00
parent d4ce68d738
commit b97e6105d3
8 changed files with 33 additions and 11 deletions

View File

@@ -4,14 +4,17 @@ import type { RateLimitBudget } from "../rate-limit/rate-limit.interface";
/**
* Per-use-case manifest entry. Declares what the use case does at the contract
* level: whether it mutates state, what audit events it emits, what cross-feature
* events it publishes or consumes. The conformance system reads these to
* derive binding-slot types and to verify code against manifest declarations.
* events it publishes or consumes, and what cross-feature readers it depends on.
* The conformance system reads these to derive binding-slot types and to verify
* code against manifest declarations.
*/
export type UseCaseManifest = {
readonly mutates: boolean;
readonly audits: readonly string[];
readonly publishes: readonly string[];
readonly consumes: readonly string[];
/** Feature names whose readers this use case queries. */
readonly reads?: readonly string[];
readonly analyticsEvents?: readonly string[];
readonly rateLimit?: readonly RateLimitBudget[];
};