Design small, typed, agent-friendly harnesses for hard-to-automate device and TV platforms. Use when shaping tools for Tizen, Roku, Android TV, Apple TV/tvOS, emulator wrappers, screenshot collectors, remote-control drivers, runtime assertion tools, or similar proof loops.
72
90%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Passed
No known issues
A device harness is a small, typed, agent-friendly wrapper around a hard-to-automate platform. Its job is to turn platform ceremony into repeatable commands and proof artifacts.
Use these layers when designing a harness.
Wrap vendor or community tools instead of replacing them.
Examples:
sdbroku-deploy and Roku External Control ProtocoladbThe adapter owns device communication and platform mechanics:
Keep the adapter thin. It should make the platform predictable without hiding important platform constraints.
Expose a small command surface that works for humans and agents.
Good commands are:
Prefer structured output for agent-facing commands:
status=ok
device=<placeholder-device-name>
app=<placeholder-app-id>
artifact=artifacts/live/screenshot.pngUse JSON only when downstream tools need it. Human commands may print concise summaries, but proof commands should leave files behind.
Do not put app-specific business logic in generic platform commands. Keep platform verbs like install, launch, keypress, screenshot, logs, and state separate from scenario verbs like play-video or open-transfer.
The runtime driver operates the app through the platform.
Core capabilities:
Prefer waits tied to observable state:
playingAvoid arbitrary sleeps except as a platform backoff with a comment or named helper that explains the platform constraint.
Assertions should describe user-visible or runtime-meaningful behavior.
Useful assertions:
Keep assertion failures compact but useful:
Do not overfit assertions to unstable text, coordinates, animation timing, network timing, or device-specific chrome unless that is the behavior under test.
The harness should leave reviewable evidence.
Common artifacts:
Use a local ignored working directory for generated artifacts, such as .harness/, .taizn/, .roku-live/, or artifacts/live/, depending on the repo's convention.
Name artifacts by scenario, device, and timestamp only when that helps review. Keep paths deterministic for smoke checks that compare or upload known filenames.
Make the harness easy to run from the repo that owns it.
Expected repo shape:
verify, smoke, or live-test entrypoints.env.examplePrefer one command that a future agent can run after setup:
make live-smokeor:
pnpm harness:smokeWhen a command requires real hardware, fail early with a clear missing-config message rather than silently skipping proof.
Keep local and secret values out of checked-in files:
Checked-in examples use placeholders.
Generic harness code should know about platform primitives. App-specific flows live in the app repo or scenario files, where product behavior belongs.