{"id":"68QPczf2SD","url":"https://pastebin.ca/68QPczf2SD","raw_url":"https://raw.anybin.ca/68QPczf2SD","visibility":"public","access":"public","created_at":1793149683008,"expires_at":1793754483008,"fetch_limit":null,"fetches_used":0,"reads_remaining":null,"size_bytes":2828,"syntax_hint":null,"title":null,"filename":null,"change_note":null,"cipher":null,"cipher_meta":null,"parent_id":null,"root_id":"68QPczf2SD","version":1,"owner_id":null,"recipient_id":null,"body":"# Worked Example: example-handoff-1.md\n\nA complete handoff doc following the SKILL.md template, for a single-file HTML game task.\n\n```\n# Handoff: Pac-Man HTML game\n\n## Completed\n- Built initial Pac-Man HTML skeleton with maze, rendering, and game loop\n- Found canonical maze layout from pacman-parameterized-html repo\n- Identified maze tile count issues (240 dots vs 204 expected)\n\n## State at Handoff\n- Working dir: /opt/data\n- File: /opt/data/pacman.html (870 lines, needs rewrite)\n- Canonical maze: 28x31 string array from philpilkington/pacman-parameterized-html\n\n## What's Left\n1. Rewrite maze to canonical layout (string-based: # wall, . dot, o pellet, = gate, space path)\n2. Fix dot count to match classic (204 dots + 4 pellets = 208 eatable items)\n3. Fix ghost house rendering and door mechanics\n4. Fix ghost AI (proper BFS for eaten ghosts, house release logic)\n5. Fix collision detection (distance-based)\n6. Improve rendering (wall outlines, ghost shapes, death animation)\n7. Verify audio works\n\n## Next Session Instructions\n- Read /opt/data/pacman.html for current state\n- Rewrite using canonical maze from philpilkington repo\n- Key maze chars: #=wall .=dot o=energizer ==gate =space\n- Ghost house: rows 13-15, cols 11-16, gate at row 12 cols 13-14\n- Pac-Man start: col 13, row 23\n- Tunnel: row 14, wraps at cols 0/27\n\n## Full Spec Reference\nBuild a Pac-Man-style arcade game as a SINGLE self-contained HTML file.\nNo external dependencies. One <canvas> element. All graphics procedural. All sound via Web Audio API.\nMaze: classic 28x31 tile arcade maze with ghost house, tunnel, 204 dots, 4 power pellets.\nPac-Man: 28px yellow circle with animated mouth, WASD/arrow controls.\n4 Ghosts: Blinky (red, chases), Pinky (pink, 4-ahead), Inky (cyan, reflection), Clyde (orange, scatter when close).\nScoring: dot=10, pellet=50, ghosts 200/400/800/1600.\n3 lives, level complete on dot clear, game over at 0 lives.\nArcade cabinet aesthetic with CRT scanlines.\n60fps with requestAnimationFrame, fixed timestep logic.\n\n## Context for Next Session\n- Using canonical maze from https://github.com/philpilkington/pacman-parameterized-html\n- Maze uses character-based strings, not numeric arrays\n- Ghost house interior is type ' ' (space), not type 7\n- Gate tiles are '=' at row 12, cols 13-14\n- Tunnel is at row 14 (the middle row)\n\n## Discovery Queue\n- `dot_count`: Current maze has 240 dots, should be 204 (canonical maze has fewer dots on tunnel rows)\n- `ghost_house`: Ghost house row 13 has dots on sides that shouldn't be there\n- `tunnel_rendering`: Tunnel rows need proper empty space rendering\n- `door_placement`: Only 2 doors needed at (13,12) and (14,12) for classic ghost house exit\n\n## Counter\nturns_on_file: 2\n- `last-modified`: /opt/data/pacman.html\n- `next-first-action`: \"Read this handoff, clear the discovery queue\"\n"}