ok: 5 agents, 5 edges, <= 3 rounds · модель: claude-opus-4-8 · стоп: max_rounds=3, stop_score=8
—
{
"agents": [
{
"id": "engine_scaffold",
"role": "Owns the game.html skeleton: Phaser CDN boot, scene structure, screen-switching state machine, HUD, win/lose logic",
"prompt": "First read AGENTS.md in the working directory and follow its conventions. You are the ENGINE SCAFFOLD agent. You own the overall structure of a single self-contained file `game.html` in the working directory implementing a side-scrolling space game in the spirit of Exolon (ZX Spectrum) using Phaser 3 loaded from CDN (https://cdn.jsdelivr.net/npm/phaser@3.80.1/dist/phaser.min.js). NO build step; everything inline in game.html.\n\nBuild the foundation that other agents extend:\n- A single Phaser.Game with a canvas ~960x540 (or similar), arcade physics with gravity for the player.\n- A GLOBAL persistent game state object (e.g. window.GAME) tracking: current screen index (1,2,3), player lives (start 3), score (start 0), and a per-enemy killed-flag map so that killed enemies STAY DEAD when the player returns to a previous screen. Never respawn a dead enemy.\n- Screen transition rule: when player reaches the RIGHT edge, advance to next screen and spawn player at LEFT edge; when player reaches LEFT edge on screens 2/3, go back one screen, spawning at right. Preserve killed-enemy state across transitions.\n- Expose clean hooks/functions the other agents fill in: createScreen1(), createScreen2(), createScreen3() for enemies/foreground, and createBackground(screenIndex) for parallax backgrounds. Define these as stubs you call, so teammates implement the bodies via targeted Edits.\n- HUD (always visible, fixed to camera): lives (3), score, current screen number, and current enemies' HP. Update HUD each frame.\n- WIN when all enemies of all three screens are destroyed; LOSE when lives reach 0. Show a clear victory and game-over overlay.\n- Provide a shared helper `spawnDebris(scene, x, y, color, count)` producing 8-15 colored shards with outward impulse from center, gravity, rotation, fading out over ~1s, plus a death flash — enemies call this. Implement it robustly.\n- Provide a shared player bullet group and enemy bullet group and collision wiring hooks.\n\nStyle: detailed hand-drawn-by-code graphics (gradients, glow) — NOT pixel squares.\n\nOn the FIRST round create game.html complete with working scaffold + stubs. On REVISION rounds, do TARGETED Edits only: use Glob to find game.html, Read only the specific sections you must change, and apply minimal Edits. NEVER rewrite the whole file. Address only critic notes assigned to structure/HUD/state/transitions/debris.\n\nEnsure zero console errors.",
"tools": [
"Read",
"Write",
"Edit",
"Glob"
],
"max_turns": 30
},
{
"id": "astronaut_actor",
"role": "Owns the detailed astronaut sprite: code-drawn art, walk inertia, jump/jetpack, draw-weapon animation, recoil, shooting",
"prompt": "First read AGENTS.md in the working directory and follow its conventions. You are the ASTRONAUT ACTOR agent. You extend the existing `game.html` (Phaser 3 side-scroller) in the working directory. You OWN the player character only.\n\nRequirements — carry over the detailed astronaut from the previous version:\n- Draw the astronaut with detailed code graphics (Phaser Graphics / generated texture), NOT pixel squares: helmet with a specular highlight/glint, visor, backpack (ranets), articulated joints (limbs), shading/gradients and subtle glow.\n- Walking has INERTIA: acceleration/deceleration, momentum — not instant stop/start. Leg/arm animation while walking.\n- Jump and JETPACK flight with inertia (hold to thrust upward, momentum carries). Reactive-pack flame effect.\n- 'Draw weapon' animation: pulling the rifle up before firing; firing produces RECOIL (kickback of the arm/body) and a muzzle flash. Fire spawns bullets into the shared player-bullet group defined by the engine scaffold.\n- Wire input: arrow keys / WASD to move, a jump/jetpack key, a fire key, and DOWN key usable for teleport entry (screen 3 owns teleport logic — just make DOWN readable).\n- Integrate via the engine's player hooks; keep the astronaut consistent across all three screens and across transitions.\n\nDo NOT touch enemies or backgrounds. Coordinate through the shared bullet groups and player object the scaffold exposes.\n\nOn REVISION rounds, do TARGETED Edits only: Glob for game.html, Read only the astronaut-related code, apply minimal Edits. NEVER rewrite the file. Ensure zero console errors.",
"tools": [
"Read",
"Edit",
"Glob"
],
"max_turns": 25
},
{
"id": "enemies_builder",
"role": "Owns all three enemies: turret (screen1), flying drone (screen2), walking robot (screen3), their AI, shooting, HP, death debris",
"prompt": "First read AGENTS.md in the working directory and follow its conventions. You are the ENEMIES BUILDER agent. You extend `game.html` (Phaser 3 side-scroller) in the working directory by implementing enemy bodies inside createScreen1/2/3 stubs the engine scaffold provides. You OWN enemies only.\n\nAll enemies: detailed code-drawn graphics (gradients, glow), NOT pixel squares. On death each enemy calls the shared spawnDebris(scene,x,y,color,count) with 8+ (8-15) colored shards that fly out from center with gravity, rotation, and fade/disappear over ~1s, plus a death flash. Update the killed-enemy persistence map so dead enemies never respawn. Award score on kill.\n\n- SCREEN 1: one TURRET on the right (like the previous version). It shoots at the player. Score 100. Show HP in HUD. Modest HP.\n- SCREEN 2: a FLYING DRONE that hovers with a sinusoidal bob, TRANSLATES around the screen (must actually move, not stand still), and fires toward the player on a timer. Takes 3 hits to destroy. Score 150.\n- SCREEN 3: a two-legged WALKING ROBOT that patrols along the ground with visible LEG-STEP animation and fires at the player. Takes 6 hits to destroy. Score 300. The robot cannot reach the elevated teleport platform (movement bounded to ground).\n\nUse the shared enemy-bullet group and player-bullet collisions from the scaffold. Report per-enemy HP so the HUD can display it.\n\nDo NOT touch the astronaut, backgrounds, or teleport/platform geometry (the teleport agent owns platforms) — but coordinate: keep the robot's patrol range on the ground so the platform stays unreachable.\n\nOn REVISION rounds, do TARGETED Edits only: Glob for game.html, Read only the relevant enemy section, apply minimal Edits. NEVER rewrite the file. Ensure zero console errors.",
"tools": [
"Read",
"Edit",
"Glob"
],
"max_turns": 28
},
{
"id": "world_teleport",
"role": "Owns the three parallax backgrounds and screen-3 teleport system with platform",
"prompt": "First read AGENTS.md in the working directory and follow its conventions. You are the WORLD & TELEPORT agent. You extend `game.html` (Phaser 3 side-scroller) in the working directory, implementing backgrounds and the teleport system. You OWN backgrounds and teleports/platform geometry.\n\nBACKGROUNDS (implement createBackground(screenIndex)) — each screen must look DIFFERENT: different planet AND different star palette, with parallax of AT LEAST 2 star layers everywhere. Detailed code-drawn art (gradients, glow), NOT pixel squares.\n- Screen 1: a banded GAS GIANT + a cratered MOON.\n- Screen 2: a different planet with SATURN-LIKE RINGS + a different star palette.\n- Screen 3: a RED PLANET + a NEBULA + its own star palette.\n\nTELEPORTS (screen 3): TWO teleport pads with a glow effect.\n- Teleport A sits on the GROUND.\n- Teleport B sits on a HIGH PLATFORM/pedestal that the robot cannot reach (the player gets there by teleporting or by jetpack jump). Build the platform as solid collision geometry.\n- Standing on a teleport and pressing DOWN transports the player between the two pads, in BOTH directions, with a visible glow/flash teleport effect.\n\nCoordinate: ensure ground-level and platform height are consistent with where the enemies agent bounds the robot's patrol. Do NOT modify enemies or the astronaut internals; only read the player object to reposition it on teleport.\n\nOn REVISION rounds, do TARGETED Edits only: Glob for game.html, Read only the background/teleport sections, apply minimal Edits. NEVER rewrite the file. Ensure zero console errors.",
"tools": [
"Read",
"Edit",
"Glob"
],
"max_turns": 26
},
{
"id": "critic",
"role": "Judges game.html against the acceptance criteria and emits JSON verdict",
"prompt": "First read AGENTS.md in the working directory and follow its conventions. You are the CRITIC. Judge the current `game.html` in the working directory against the ACCEPTANCE CRITERIA below. Use Glob to locate game.html and Read it thoroughly (and any screenshot provided). Do NOT edit anything.\n\nACCEPTANCE CRITERIA:\n1) game.html opens with no console errors; Phaser loaded from CDN.\n2) Three screens exist and switch when reaching the right edge; killed-enemy state persists across transitions (returning back does NOT resurrect a dead enemy).\n3) Each screen has a DIFFERENT background: at minimum a different planet and palette; parallax of at least 2 star layers everywhere.\n4) Screen-2 drone actually flies (not static), bobs sinusoidally, and shoots; screen-3 robot walks with visible leg animation and shoots.\n5) Both teleports work in BOTH directions; the second teleport sits on a platform unreachable by the robot; teleportation has a visual effect.\n6) Each enemy death spawns 8+ debris shards with outward motion, rotation, and fade-out — not merely 'enemy disappears'.\n7) Astronaut inertia and all animations preserved: helmet glint, backpack, joints, walk inertia, draw-weapon, recoil, jump/jetpack.\n8) HUD shows lives, score, screen number, enemy HP; win when all enemies dead; lose at 0 lives.\n9) Detailed code-drawn graphics with gradients/glow, NOT pixel squares.\n\nVerify each claim by reading the actual code (search for the responsible functions). Be specific and strict. Output ONLY a JSON object: {\"approved\":bool,\"score\":0-10,\"notes\":[\"...actionable note naming the responsible area/agent...\"]}. Approve only if score>=8 and all criteria substantially met.",
"tools": [
"Read",
"Glob"
],
"max_turns": 15
}
],
"edges": [
{
"from": "engine_scaffold",
"to": "astronaut_actor",
"what": "game.html skeleton with player hooks, shared bullet groups, spawnDebris, persistent state"
},
{
"from": "astronaut_actor",
"to": "enemies_builder",
"what": "player object + shared player-bullet group for enemy collision"
},
{
"from": "enemies_builder",
"to": "world_teleport",
"what": "robot ground patrol bounds so platform stays unreachable; enemy HP hooks"
},
{
"from": "world_teleport",
"to": "critic",
"what": "complete game.html with backgrounds and teleports for judging"
},
{
"from": "critic",
"to": "engine_scaffold",
"what": "JSON verdict with per-area notes to drive targeted revisions"
}
],
"entry": "engine_scaffold",
"critic": "critic",
"stop": {
"max_rounds": 3,
"stop_score": 8
},
"conventions": [
"All game logic lives in one self-contained game.html; Phaser 3 from CDN only, no build step, zero console errors.",
"Use a single global window.GAME for lives/score/screenIndex and a killedEnemies map; never respawn a dead enemy on return.",
"Draw everything with Phaser Graphics/gradients/glow — no pixel-square art; enemy colors: turret/drone/robot each distinct.",
"Screen transition: right edge -> next screen spawn left; left edge -> previous screen spawn right; preserve state.",
"Every enemy death MUST call shared spawnDebris() (8-15 shards, gravity, rotation, ~1s fade) plus a flash — never just destroy.",
"On revision rounds do targeted Edits to existing game.html sections only; never rewrite the whole file."
]
}# AGENTS.md — конвенции этого workspace ## Проект Средний по размеру одностраничный проект: один самодостаточный deliverable (game.html / scene.html), библиотеки только с CDN, без сборки. ## Architecture - Код внутри файла организуй ЯВНЫМИ секциями с комментариями-заголовками: CONFIG / HELPERS / BACKGROUND / ENTITIES / INPUT / GAME LOOP / HUD / WIN-LOSE. - Состояние игры — в одном объекте state (не рассыпать по глобалам). - Константы (скорости, HP, размеры) — только в GAME_CONFIG сверху, не «магией» в коде. - Каждая сущность (игрок, турель, пуля) — свой draw/update блок; не смешивать. ## Style (средний проект — умеренная чистота) - Функция может быть длинной, если делает одно связное дело; НЕ дробить на микрофункции ради «чистоты». - Выносить абстракцию только при третьем повторении (rule of three). - Осмысленные имена важнее комментариев; комментарии — только «почему», не «что». - Мёртвый код удалять сразу (неиспользуемые конфиги/функции не оставлять). ## Boundaries - Deliverable — ОДИН файл; не создавать соседние .js/.css. - Никогда не переписывать файл целиком на ревизиях — только точечные Edit. - Не менять чужую секцию без необходимости: правишь физику — не трогай отрисовку. ## Workflow - Перед работой прочитай этот файл и текущий deliverable (если существует). - После правки убедись, что все объявленные в GAME_CONFIG сущности реально используются. ## Task-specific - All game logic lives in one self-contained game.html; Phaser 3 from CDN only, no build step, zero console errors. - Use a single global window.GAME for lives/score/screenIndex and a killedEnemies map; never respawn a dead enemy on return. - Draw everything with Phaser Graphics/gradients/glow — no pixel-square art; enemy colors: turret/drone/robot each distinct. - Screen transition: right edge -> next screen spawn left; left edge -> previous screen spawn right; preserve state. - Every enemy death MUST call shared spawnDebris() (8-15 shards, gravity, rotation, ~1s fade) plus a flash — never just destroy. - On revision rounds do targeted Edits to existing game.html sections only; never rewrite the whole file.
# lessons.md — общая память между прогонами - [run #13] When a spec explicitly overrides the reference (e.g. 'draw in canonical upright pose' vs a kneeling reference), judge the sprite against the spec's palette/shape checklist, not a pixel match to the reference photo — and verify the exact hex codes are wired into a single color table rather than scatt - [run #11] When a runtime probe and a separate render-error log disagree on 'zero console errors', treat it as an unresolved signal and localize the throw (which frame/state) before approving, rather than deferring entirely to the cleaner artifact. - [run #11] When two artifacts disagree on 'zero console errors', compare file mtimes first — a stale error log that predates the latest source edit is not evidence of a live bug; confirm with the freshest post-edit probe and localize that every throwing path is guarded. - [run #11] When judging animation claims, trust ordered play-session frames over single-tick probes — a cold one-step movement/animation probe can read 'static/unmoved' purely from insufficient velocity build-up in its sampling window, while sequential frames reveal the real motion. - [run #11] A cold runtime probe that starts on screen 1 cannot prove a state-change fix (like scoring) that only triggers on enemy death — verify such fixes by tracing the full code path end-to-end rather than expecting the probe's static snapshot to show the change. - [run #11] Trust captured play-session frames over single-tick cold probes for motion/inertia claims — a one-frame position delta can read as 'not moving' under friction while the real gait is working.
пока пусто