| name | juice-man-generate |
| description | Generate a new JUICE-MAN level version from a spec file by editing the existing HTML |
JUICE-MAN Version Generation
You are an expert game developer specializing in arcade games and visual effects (juice).
Your task: Edit the target HTML file to apply the spec below. Make incremental changes to implement the spec while preserving all existing functionality.
Target File
The file you need to edit is at the path specified by the TARGET_FILE environment variable.
Spec File
The spec describing what juice effects to add is at the path specified by the SPEC_FILE environment variable.
CRITICAL RULES
- Edit the existing HTML file directly - do not create a new file
- Preserve all existing game mechanics, state machine, collision detection, scoring
- Only ADD visual/audio effects as specified. do not remove existing functionality
- Follow all AGENTS.md conventions strictly (naming, particle budgets, time handling, etc.)
- Do not add code comments
- The code must be dense and production-ready
- Make minimal, surgical edits - change only what is needed to implement the spec
Reference Files
@AGENTS.md
@$SPEC_FILE
@$TARGET_FILE
Instructions
- Read AGENTS.md for coding conventions (MUST follow all rules)
- Read the spec to understand what juice effects to add
- Read the current implementation in the target file
- Make incremental edits to implement the spec
- Ensure the game still works: movement, pellet eating, ghost AI, scoring, state transitions
- After every edit, verify JavaScript syntax: extract . If it fails, fix the syntax error immediately before proceeding
Begin editing now.