All pastes #68QPczf2SD Raw Edit

text paste

public text v1 · immutable
·published 2026-10-28 01:08 UTC
rendered paste body
# Worked Example: example-handoff-1.mdA complete handoff doc following the SKILL.md template, for a single-file HTML game task.```# Handoff: Pac-Man HTML game## Completed- Built initial Pac-Man HTML skeleton with maze, rendering, and game loop- Found canonical maze layout from pacman-parameterized-html repo- Identified maze tile count issues (240 dots vs 204 expected)## State at Handoff- Working dir: /opt/data- File: /opt/data/pacman.html (870 lines, needs rewrite)- Canonical maze: 28x31 string array from philpilkington/pacman-parameterized-html## What's Left1. Rewrite maze to canonical layout (string-based: # wall, . dot, o pellet, = gate, space path)2. Fix dot count to match classic (204 dots + 4 pellets = 208 eatable items)3. Fix ghost house rendering and door mechanics4. Fix ghost AI (proper BFS for eaten ghosts, house release logic)5. Fix collision detection (distance-based)6. Improve rendering (wall outlines, ghost shapes, death animation)7. Verify audio works## Next Session Instructions- Read /opt/data/pacman.html for current state- Rewrite using canonical maze from philpilkington repo- Key maze chars: #=wall .=dot o=energizer ==gate =space- Ghost house: rows 13-15, cols 11-16, gate at row 12 cols 13-14- Pac-Man start: col 13, row 23- Tunnel: row 14, wraps at cols 0/27## Full Spec ReferenceBuild a Pac-Man-style arcade game as a SINGLE self-contained HTML file.No external dependencies. One <canvas> element. All graphics procedural. All sound via Web Audio API.Maze: classic 28x31 tile arcade maze with ghost house, tunnel, 204 dots, 4 power pellets.Pac-Man: 28px yellow circle with animated mouth, WASD/arrow controls.4 Ghosts: Blinky (red, chases), Pinky (pink, 4-ahead), Inky (cyan, reflection), Clyde (orange, scatter when close).Scoring: dot=10, pellet=50, ghosts 200/400/800/1600.3 lives, level complete on dot clear, game over at 0 lives.Arcade cabinet aesthetic with CRT scanlines.60fps with requestAnimationFrame, fixed timestep logic.## Context for Next Session- Using canonical maze from https://github.com/philpilkington/pacman-parameterized-html- Maze uses character-based strings, not numeric arrays- Ghost house interior is type ' ' (space), not type 7- Gate tiles are '=' at row 12, cols 13-14- Tunnel is at row 14 (the middle row)## Discovery Queue- `dot_count`: Current maze has 240 dots, should be 204 (canonical maze has fewer dots on tunnel rows)- `ghost_house`: Ghost house row 13 has dots on sides that shouldn't be there- `tunnel_rendering`: Tunnel rows need proper empty space rendering- `door_placement`: Only 2 doors needed at (13,12) and (14,12) for classic ghost house exit## Counterturns_on_file: 2- `last-modified`: /opt/data/pacman.html- `next-first-action`: "Read this handoff, clear the discovery queue"