Files
agentic-labs-challenge/underdepths/prompt.md
T

86 lines
4.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# PROMPT — The One Message
> Paste this as the first and only message in a fresh Pi session
> running in a directory containing `plan.md` and `AGENTS.md`.
---
Read `AGENTS.md` for build conventions and orchestration architecture.
Read `plan.md` for the complete game design document.
Both are in the current directory. They are your specification — follow them exactly.
You are building **Underdepths**, a turn-based roguelike in Python with pygame-ce.
## How to work
1. **Read both files completely before writing any code.**
2. **Your first action is to build a self-driving pipeline.** Write
`orchestrate.sh` — a bash script that drives the entire game build using
`pi -p` as the primitive. The pipeline:
- Tracks progress via `.build_state` (resumable across crashes)
- Dispatches each build phase to `pi -p` with a targeted prompt
- Runs verification gates after each phase (`python tests/smoke.py --phase N`)
- Feeds gate failures back into `pi -p` with the actual error output (Ralph loop)
- Parallelizes independent systems (FOV, A*, combat) as concurrent `pi -p` calls
- Goal backstop after all phases: verifies EVERY acceptance criterion in
`plan.md`, dispatches fixes for any that fail, loops until all pass
- Uses the DEFAULT model only — never passes `--model` or `--provider` to `pi -p`
(the whole build runs on whatever is configured as the default model)
- Wraps each dispatch in `timeout --kill-after=30`, and splits any phase too
large for one dispatch (e.g. phase 4) into sequential sub-builds before its gate
3. **Then execute the pipeline.** Run `./orchestrate.sh`. Let it drive the build
through all four phases to completion.
4. **Do not stop until every acceptance criterion in `plan.md` is met.** The
goal backstop is your guarantee — if any system is incomplete or broken, the
pipeline dispatches a fix and retries.
5. **Write real implementations.** No stubs, no TODO comments left behind. Every
function must work.
6. **Make controls discoverable and verify them.** Provide How to Play from the
main menu and before every New Game. Show `Press G to pick up` while standing
on an item and `Press F to descend` while standing on stairs. The
smoke suite must simulate both actions; rendering instructions alone is not enough.
7. **Add simple resilient audio.** Generate short sound effects in memory with
pygame/stdlib only, add an `m` mute toggle, and fall back silently when no
audio device is available. Do not add asset files or music.
8. **Make it look polished.** Draw every entity, tile, and item as procedural
pixel-art — hand-coded multi-color pixel patterns rendered with `pygame.draw`,
no external image files. The 7 enemies, player, items, and stairs must each be
visually distinct and recognizable (not recolors). Add radial torch-light,
explored-tile dimming, beveled walls, drop shadows, particle bursts on
combat/death/pickups, screen-shake on damage, and a bordered UI with HP/XP
bars and icons. Plain colored squares are unacceptable.
## Completion criteria
You are done when ALL of these are true:
- `python main.py` launches a playable game with a menu.
- All 7 enemy types exist with their specified AI behaviors and stats.
- A* pathfinding, recursive shadowcasting FOV, BSP dungeon generation, combat
with hit/damage/crit mechanics, XP/leveling, items/inventory/equipment, and
save/load all work.
- How to Play clearly explains every control. Context prompts make pickup (`g`)
and descent (`f`) discoverable, and input tests prove both work.
- Simple generated sound effects cover core events, mute works, and unavailable
audio never prevents launch or play.
- The game looks polished: distinct procedural pixel-art sprites, FOV-based
lighting, particle/juice effects, and a clean bordered UI — not flat squares.
- The game has a win state (kill the dragon on floor 10) and a lose state
(player death → game over, save deleted).
- `python tests/smoke.py` passes.
- You can play: move, explore, fight, stand on loot and press `g`, stand on
stairs and press `f`, level up, save, quit, relaunch, and continue
— all without crashes.
- Every level is winnable: floors 0–8 have stairs that EXIST, are REACHABLE
from spawn, and are VISIBLY RENDERED (the `>` staircase) so the player can
descend with `f`; floor 9 is won by slaying the dragon, who must be
defeatable with gear obtainable by floor 9 (total_power must exceed the
dragon's armor). The smoke gate must assert stairs exist + are reachable on
every floor 0–8 and that the renderer draws the stairs tile. A floor with
missing, unreachable, or invisible stairs — or an unkillable boss — is a
build failure. (A prior build shipped stairs only in map data, never drawn —
do not repeat that.)
Do not stop early. Do not ask for clarification. The specification is complete.
Build the game.