Assert exact values
In the hero test, the seeded world is chosen so the right answer is unambiguous, and the assertion names it:Calculation children: the permutation table
A formula usually has more cases than one video should carry: boundaries, caps, empty inputs, rounding edges. Those become a calculation child under the feature, confirmed by reading a ✓/✗ table rather than watching.check(label, fn) is one row of the table the reviewer reads, so the label is a plain-language claim, bound 1:1 to the assertion inside. Checks are collect-and-continue: every row runs and reports its ✓/✗, then the entry fails if any row failed. The reviewer sees exactly which cases hold, not just the first failure.
The division of labor with the hero: the hero proves the value is wired to the screen correctly (one representative case, on camera); the calculation child proves the formula itself across the input space. A calculation test is never used to check that a value shows up in the UI; that is the hero’s job.
How the assertions are verified
The obvious way to fake a calculation test is to restate the formula inside the test: compute 67% with the test’s own arithmetic and assert the test agrees with itself. Such a test stays green when the app’s real implementation breaks. The build closes this at several levels:- The test must import the app’s implementation. A static gate fails the entry if the test’s imports never leave the
prd/directory. Fixtures don’t count, and neither do direct database queries with the test’s own filters. If the logic lives inline in a component or procedure, it gets extracted into a pure exported function the app itself calls. - Every assertion must be computed from it. A second gate analyzes the test’s syntax tree and fails any assertion whose value doesn’t derive from an imported app call, directly (
expect(score(9)).toBe(100)) or through intermediate values. Asserting locally computed arithmetic fails the build, as does a conditional with identical branches (x ? 100 : 100) or loading app code dynamically to sidestep the analysis. - The calls are recorded at runtime. When the suite runs, every call the test makes into the app’s implementation is captured (function, arguments, and the value it actually returned) and shown in the PRD view’s “App code calls” section, grouped under the check that made them:
completionRate(2, 3) → 67. A checks-style test that makes no such calls fails at runtime, and a passing check whose recorded outputs don’t contain its asserted value is flagged for review.

