docs(help): add platform checks and audit to the dogfood workflow

TH
2h ago
+20-1

Summary

help dogfood now has a Platform checks: block after Goal/Loop: on the first screen and after a screen changes meaningfully, run audit first and then snapshot -i (audit performs its own capture, so it goes first), act on the snapshot refs or the pinned refs audit prints, and report its findings as accessibility findings; on iOS test Back and the edge-back swipe where a screen was pushed; on Android test system Back and applicable sheet dismissal; probe a dismissible sheet's unchanged swipe-down (expect dismiss), edited dismissal (expect confirm or save), and explicit Cancel; check destructive confirmation or undo, swipe-action alternatives, and each field's return key against its task; exercise each control once with reversible test data. One line carries the exceptions: autosave, explicit discard semantics, mandatory flows, nondismissible presentations. It links the Apple Human Interface Guidelines and Material accessibility guidance and does not restate what audit already checks (target size, names).

The new command is discoverable outside that topic: one audit line each in skills/agent-device/SKILL.md and skills/dogfood/SKILL.md, and the recommended agent rule in website/docs/docs/agent-setup.md now points at audit for the per-screen pass. Each carries the same trigger — first screen, and after a screen changes meaningfully — and the skill line applies only when the target supports snapshots, so snapshotless targets (Vega) skip it.

Stacked on #4592.

Evidence

  • agent-device help dogfood renders the block on lines 18-25, inside the first 30 lines.
  • Bench (--case dogfood-mode, Sonnet, 3 runs): 3/3 with the block, 9/9 checks each, and every planned pass now emits audit before snapshot -i. With the earlier draft that only said "run audit", Sonnet stopped planning snapshot -i and the case failed usesSnapshotI (2/3), which is why the line names both commands in order. The new runsPlatformAudit expectation is falsified by the base text: base runs produce plans with no audit command.

Test plan

  • pnpm format
  • pnpm build
  • npx vitest run src/commands/schema/cli-help-first-screen.test.ts src/commands/schema/cli-help-workflows.test.ts scripts/__tests__/help-conformance-{topic-coverage,expectation-falsification,error-recovery-coverage}.test.ts scripts/__tests__/agent-setup-startup-contract.test.ts (88 tests)
  • node scripts/help-conformance-bench.mjs --case dogfood-mode --runner claude:sonnet --repeat 3 → 3/3, 9/9 checks each
  • node scripts/check-affected/run.ts --run --base origin/feat/static-accessibility-audit-v2 --head HEAD → 42 runnable checks passed, 0 failed, 25 skipped as GitHub-authoritative, exactCommit=true on aadf30b47e over base 2e90b576c5. Device commands are unchanged.

🤖 Generated with Apex