prd.json at the app root, alongside the test files that back it:
Features vs. API access
The PRD view presents the app through two top-level sections:- Features — what the app does: user-visible flows, business behaviors, side-effects, cross-service merges. Verified end-to-end in a browser and recorded.
- API Access & Rules — the rules the backend enforces: who can call each endpoint, how each endpoint’s rows are scoped to the caller, and the invariants the boundary rejects on. Verified headlessly with real requests, in both directions: the permitted call succeeds and really changes the data, and the denied call is rejected.
Anatomy of a feature entry
Each feature belongs to a section and gets exactly one hero test: the canonical end-to-end flow a reviewer watches. Visible details of that flow (“the completed task shows a strikethrough”) are assertions inside the hero, not separate entries. Splitting them out would produce many near-identical videos. A feature may nest one level of children for what the hero flow doesn’t show:- A visual child — a distinct state or screen the hero never passes through: the empty state, the error state, the at-limit view. Each gets its own small recording.
- A calculation child — the internal logic powering the feature (a score formula, tax math, a validation rule), where the input space is combinatorial and there is nothing distinct to watch. Verified as a table of checked values; see Verifying calculations.
Anatomy of an access entry
The access side ofprd.json carries one entry per backend procedure. Each entry declares a structured access contract: whether the caller must be signed in, which scopes are required, and how rows are scoped to the caller (own rows only, rows reachable through a relationship such as a reporting chain, rows in the caller’s org, and so on).
The contract is a machine-checked decision table, not prose. The build derives from it the exact set of scenarios the entry’s test must cover (anonymous denied, wrong scope denied, the owner’s call works, another user’s doesn’t, each business rule rejects) and fails until every one exists. The plain-language “who can do this” text in the PRD view is generated from the contract, never hand-written. See Access verification.

