Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

1.4 KB
Raw Blame
Act as a game programmer on Harness. Create a polished small keyboard-only canvas game called Signal Run: the player moves through a grid collecting signal packets while avoiding moving hazards. Arrow keys or WASD move, Space pauses, R restarts, Enter starts. Include scoring, win and loss states, and a clear compact control legend. Use only HTML, CSS and vanilla JavaScript, no dependencies, no external assets. Keep simulation logic deterministic with a seeded random source and export the core state/update logic so meaningful Node tests can cover movement, wall bounds, collection, hazard collision, pause and restart. Add index.html, styles.css, game.mjs, simulation.mjs and test.mjs. Draw immediately on load and respond to resize. Expose window.harnessGame with setMode(mode), setPaused(boolean), restart(), stats() reporting state/score/player position, captureState(), restoreState(state); dispatch new CustomEvent("harness:ready") after the first real canvas render. Save a studio.json with title, description and controls. Run node --test test.mjs and fix failures. Document how to serve it with python3 -m http.server. Do the work now without questions or subagents.
The stats() contract is {score:number,player:{x:number,y:number},paused:boolean,status:string}. Paused is false after start. Restart sets score=0 and a fresh player state. Start the player at an open grid position with at least one unobstructed neighboring cell.