AI Mini Game Development
Use this skill to keep mini game development iterative, verifiable, and safe. Optimize for small playable increments: establish a stable base, expand gameplay, then polish.
For the complete original Chinese guide, read references/full_rules.md when the user asks for the full rules, wants to compare against the source guide, or when a project decision needs the more detailed rationale and examples. For a reusable kickoff prompt, read references/start_prompt.md.
Scope
Use directly for small and lightweight games:
- 2D casual games, 3D mini games, ball games, puzzle games, platformers, shooters/bullet hell, card/board games, idle/management games, and Web mini games.
- Unity, Cocos, Godot, pygame, Three.js, HTML Canvas, and similar lightweight game stacks.
Do not apply this workflow as-is to large multiplayer online games, strong real-time networked competitive games, full commercial game production, or projects requiring complex backend, payment, account security, or regulatory compliance. The phased delivery, authorization, documentation, and rollback principles may still be useful, but the process must be extended.
Core Rules
- Build in phases; every phase must have a runnable, checkable deliverable.
- Ask more in early phases, work more autonomously in later phases.
- Do low-risk tasks directly, choose and document defaults for medium-risk tasks, and stop for authorization on high-risk tasks.
- Do not continue building on an unverified or broken foundation.
- Stop when the next decision requires human judgment about core gameplay, feel, visuals, dependency changes, destructive edits, or project direction.
Autonomy Model
Use project maturity to decide how much to ask.
Early phase: low autonomy, high confirmation.
- Use for requirements, technical choices, project skeleton, and first runnable build.
- Summarize understanding, ask key questions, propose a short plan, then implement only the current phase.
- Do not install dependencies, overwrite assets, cross phases, or stack features when the project cannot be run.
Middle phase: medium autonomy, module delivery.
- Use once core gameplay runs.
- Complete low-risk work inside the current module: rules, UI, enemies, levels, save/settings, simple AI.
- Keep the core architecture and engine choices stable.
- End each module with verification steps and a checkpoint for user confirmation.
Late phase: high autonomy with backups.
- Use for feel tuning, visual polish, audio, particles, UI refinements, performance, and small experience details.
- Back up configs/scenes/key files before changes.
- Prefer configuration and data changes over core code changes.
- Tune one class of issue per round and state how to roll back.
Risk Levels
Low risk: proceed directly.
- Add non-conflicting files, tests, docs, logs, config entries, placeholders, versioned assets, README content.
- Fix clear syntax, compile, import, or local runtime errors.
- Perform narrow refactors within the current module.
Medium risk: choose a reasonable default, continue, and record the choice.
- Use conventional project structure, rendering/physics defaults, placeholder assets, basic UI, simple AI, default keybindings, or config-file-driven parameters.
- Add the decision to
docs/decisions.md when the choice could matter later.
High risk: stop and request authorization.
- Delete files or assets.
- Overwrite existing scenes, levels, prefabs, resources, user assets, or final art.
- Install, upgrade, or replace dependencies.
- Modify global project settings.
- Change engine, framework, render pipeline, core architecture, or core gameplay.
- Perform large directory refactors.
- Trade visual quality for performance, or gameplay feel for visuals.
- Introduce large third-party tools.
- Publish, upload, or package for a formal release environment.
Phase Workflow
Use these phases unless the existing project clearly maps to a later stage.
Requirements freeze
Confirm game type, target platform, engine/framework, input method, single/multiplayer, core loop, AI, save, networking, dependency permission, test/package expectations, and autonomy protocol. Do not start complex implementation before essentials are clear.
Project skeleton
Deliver directory structure, entry points, base config, empty modules, and initial development docs. Verify the project starts and dependencies are clear.
Minimal runnable version
Deliver empty scene/canvas, main loop, input reading, and visible base object. Verify it runs without errors and has acceptable frame behavior.
Core gameplay
Deliver player control, core entities, basic collision/rules, and reset. Verify whether it is playable, natural, and free of obvious blocking bugs.
Rules, levels, and AI
Deliver score, win/loss, levels, enemies/AI, and difficulty. Verify rules match expectations and difficulty is plausible.
Visuals and audio
Deliver materials/textures, animation, particles, sound effects, and UI polish. Verify the style is coherent and polish does not damage playability.
Feel and performance tuning
Deliver parameter tuning, optimization, caching, and object pooling as needed. Verify frame rate, responsiveness, stutter, and device compatibility.
Testing and packaging
Deliver automated tests where practical, package scripts, README, and controls/instructions. Verify the target platform can run the build without critical errors.
Phase Status On Continuation
When the user gives positive feedback and asks to continue, first state the current phase as major phase + minor focus, then proceed. Choose the major phase from the workflow above, and make the minor focus concrete to the current task.
Examples:
当前阶段:Minimal runnable version + ball bounce tuning
当前阶段:Core gameplay + player board control
当前阶段:Feel and performance tuning + input responsiveness
Use this especially after replies like "继续", "效果可以", "基本满足要求", "下一步", or "可以进行下一阶段". If the project is still a validation prototype, say so explicitly in the phase label, such as Minimal scene validation + repeated ball bounce optimization.
Tool Declaration
At the beginning of each phase, state which tools or integrations will be used when relevant, and which obvious tools will not be used.
Common tools include Git/GitHub for versioning and review, Figma for UI references, Unity or Godot editor integrations, Cocos tooling, image generation for textures/icons/characters, audio tools for sound effects or music, browser automation for Web game screenshots and interaction tests, and CI for tests/package checks.
Do not install or enable new tools, plugins, dependencies, editor integrations, or CI publishing without authorization.
Phase Gates
Do not continue past a failed gate.
- If phase 1 is not verified, do not implement gameplay.
- If phase 2 is not verified, do not add complex rules.
- If phase 3 is not verified, do not do visual polish.
- If phase 4 is not verified, do not finalize UI.
- If phase 5 is not verified, do not package.
- If phase 6 is not verified, do not publish.
When user confirmation is needed, say:
当前阶段已完成,但需要你运行并确认。
确认后我再进入下一阶段。
Stop Conditions
Stop and give the user concrete next steps when:
- The project cannot run or the result cannot be verified.
- Build/test failures are unclear.
- Key requirements are ambiguous.
- Work requires overwriting user files or assets.
- Work requires installing dependencies or changing the technical route.
- The decision depends on human judgment of feel, visuals, or rule intent.
Use this shape:
我已经完成本阶段代码,但当前无法验证运行结果。
请你执行:
<command or editor/browser steps>
然后把错误日志或截图发给我。
Avoid Step-by-Step Questioning
Do not ask about obvious low-value implementation details such as filenames, imports, basic README additions, clear syntax fixes, or necessary tests.
Ask about gameplay forks, overwrites, dependency installs, core structure changes, visual/feel tradeoffs, and whether to enter the next phase.
When defaults are reasonable, say:
我会按默认方案处理低风险事项。
本阶段结束后会停下等你确认。
Documentation
Prefer maintaining these files when the project has or needs docs:
docs/dev_log.md
docs/decisions.md
docs/pitfalls.md
docs/tuning.md
docs/asset_pipeline.md
docs/test_plan.md
At phase end, document what changed, which files changed, what was verified, user feedback, and next step.
For pitfalls, record:
问题:
原因:
修复:
复用教训:
For decisions, record:
决定:
原因:
替代方案:
风险:
回滚方式:
For tuning, record:
参数:
修改前:
修改后:
原因:
效果:
Backup And Rollback
In late-phase or high-autonomy work:
- Back up configs, scenes, levels, and key assets before changing them.
- Create
v2 or versioned assets instead of overwriting important resources.
- Prefer Git commits/checkpoints before larger changes.
- Avoid hardcoding tuning values when config/data can hold them.
- Explain what changed, why, and how to roll back.
Natural-Language Tuning
Translate subjective feedback into concrete, limited changes.
- "角色跳起来太轻": inspect gravity, jump velocity, fall speed, landing feedback.
- "画面不够高级": inspect lighting, materials, post-processing, camera, UI hierarchy; do not alter core rules.
- "操作有点粘": inspect input latency, acceleration, damping, and animation transitions.
Tune one concern per round, verify it, and update docs/tuning.md when present.
1---2name: ai-mini-game-development3description: Guide AI-assisted mini game development with phased delivery, risk-based autonomy, validation gates, documentation updates, backup/rollback discipline, and natural-language tuning. Use when Codex helps create, modify, polish, test, or package small games in Cocos, Unity, Godot, pygame, Three.js, HTML Canvas, Web games, or similar lightweight game projects.4---56# AI Mini Game Development78Use this skill to keep mini game development iterative, verifiable, and safe. Optimize for small playable increments: establish a stable base, expand gameplay, then polish.910For the complete original Chinese guide, read `references/full_rules.md` when the user asks for the full rules, wants to compare against the source guide, or when a project decision needs the more detailed rationale and examples. For a reusable kickoff prompt, read `references/start_prompt.md`.1112## Scope1314Use directly for small and lightweight games:1516- 2D casual games, 3D mini games, ball games, puzzle games, platformers, shooters/bullet hell, card/board games, idle/management games, and Web mini games.17- Unity, Cocos, Godot, pygame, Three.js, HTML Canvas, and similar lightweight game stacks.1819Do not apply this workflow as-is to large multiplayer online games, strong real-time networked competitive games, full commercial game production, or projects requiring complex backend, payment, account security, or regulatory compliance. The phased delivery, authorization, documentation, and rollback principles may still be useful, but the process must be extended.2021## Core Rules2223- Build in phases; every phase must have a runnable, checkable deliverable.24- Ask more in early phases, work more autonomously in later phases.25- Do low-risk tasks directly, choose and document defaults for medium-risk tasks, and stop for authorization on high-risk tasks.26- Do not continue building on an unverified or broken foundation.27- Stop when the next decision requires human judgment about core gameplay, feel, visuals, dependency changes, destructive edits, or project direction.2829## Autonomy Model3031Use project maturity to decide how much to ask.3233Early phase: low autonomy, high confirmation.3435- Use for requirements, technical choices, project skeleton, and first runnable build.36- Summarize understanding, ask key questions, propose a short plan, then implement only the current phase.37- Do not install dependencies, overwrite assets, cross phases, or stack features when the project cannot be run.3839Middle phase: medium autonomy, module delivery.4041- Use once core gameplay runs.42- Complete low-risk work inside the current module: rules, UI, enemies, levels, save/settings, simple AI.43- Keep the core architecture and engine choices stable.44- End each module with verification steps and a checkpoint for user confirmation.4546Late phase: high autonomy with backups.4748- Use for feel tuning, visual polish, audio, particles, UI refinements, performance, and small experience details.49- Back up configs/scenes/key files before changes.50- Prefer configuration and data changes over core code changes.51- Tune one class of issue per round and state how to roll back.5253## Risk Levels5455Low risk: proceed directly.5657- Add non-conflicting files, tests, docs, logs, config entries, placeholders, versioned assets, README content.58- Fix clear syntax, compile, import, or local runtime errors.59- Perform narrow refactors within the current module.6061Medium risk: choose a reasonable default, continue, and record the choice.6263- Use conventional project structure, rendering/physics defaults, placeholder assets, basic UI, simple AI, default keybindings, or config-file-driven parameters.64- Add the decision to `docs/decisions.md` when the choice could matter later.6566High risk: stop and request authorization.6768- Delete files or assets.69- Overwrite existing scenes, levels, prefabs, resources, user assets, or final art.70- Install, upgrade, or replace dependencies.71- Modify global project settings.72- Change engine, framework, render pipeline, core architecture, or core gameplay.73- Perform large directory refactors.74- Trade visual quality for performance, or gameplay feel for visuals.75- Introduce large third-party tools.76- Publish, upload, or package for a formal release environment.7778## Phase Workflow7980Use these phases unless the existing project clearly maps to a later stage.81820. Requirements freeze83 Confirm game type, target platform, engine/framework, input method, single/multiplayer, core loop, AI, save, networking, dependency permission, test/package expectations, and autonomy protocol. Do not start complex implementation before essentials are clear.84851. Project skeleton86 Deliver directory structure, entry points, base config, empty modules, and initial development docs. Verify the project starts and dependencies are clear.87882. Minimal runnable version89 Deliver empty scene/canvas, main loop, input reading, and visible base object. Verify it runs without errors and has acceptable frame behavior.90913. Core gameplay92 Deliver player control, core entities, basic collision/rules, and reset. Verify whether it is playable, natural, and free of obvious blocking bugs.93944. Rules, levels, and AI95 Deliver score, win/loss, levels, enemies/AI, and difficulty. Verify rules match expectations and difficulty is plausible.96975. Visuals and audio98 Deliver materials/textures, animation, particles, sound effects, and UI polish. Verify the style is coherent and polish does not damage playability.991006. Feel and performance tuning101 Deliver parameter tuning, optimization, caching, and object pooling as needed. Verify frame rate, responsiveness, stutter, and device compatibility.1021037. Testing and packaging104 Deliver automated tests where practical, package scripts, README, and controls/instructions. Verify the target platform can run the build without critical errors.105106## Phase Status On Continuation107108When the user gives positive feedback and asks to continue, first state the current phase as `major phase + minor focus`, then proceed. Choose the major phase from the workflow above, and make the minor focus concrete to the current task.109110Examples:111112- `当前阶段:Minimal runnable version + ball bounce tuning`113- `当前阶段:Core gameplay + player board control`114- `当前阶段:Feel and performance tuning + input responsiveness`115116Use this especially after replies like "继续", "效果可以", "基本满足要求", "下一步", or "可以进行下一阶段". If the project is still a validation prototype, say so explicitly in the phase label, such as `Minimal scene validation + repeated ball bounce optimization`.117118## Tool Declaration119120At the beginning of each phase, state which tools or integrations will be used when relevant, and which obvious tools will not be used.121122Common tools include Git/GitHub for versioning and review, Figma for UI references, Unity or Godot editor integrations, Cocos tooling, image generation for textures/icons/characters, audio tools for sound effects or music, browser automation for Web game screenshots and interaction tests, and CI for tests/package checks.123124Do not install or enable new tools, plugins, dependencies, editor integrations, or CI publishing without authorization.125126## Phase Gates127128Do not continue past a failed gate.129130- If phase 1 is not verified, do not implement gameplay.131- If phase 2 is not verified, do not add complex rules.132- If phase 3 is not verified, do not do visual polish.133- If phase 4 is not verified, do not finalize UI.134- If phase 5 is not verified, do not package.135- If phase 6 is not verified, do not publish.136137When user confirmation is needed, say:138139```text140当前阶段已完成,但需要你运行并确认。141确认后我再进入下一阶段。142```143144## Stop Conditions145146Stop and give the user concrete next steps when:147148- The project cannot run or the result cannot be verified.149- Build/test failures are unclear.150- Key requirements are ambiguous.151- Work requires overwriting user files or assets.152- Work requires installing dependencies or changing the technical route.153- The decision depends on human judgment of feel, visuals, or rule intent.154155Use this shape:156157```text158我已经完成本阶段代码,但当前无法验证运行结果。159请你执行:160<command or editor/browser steps>161然后把错误日志或截图发给我。162```163164## Avoid Step-by-Step Questioning165166Do not ask about obvious low-value implementation details such as filenames, imports, basic README additions, clear syntax fixes, or necessary tests.167168Ask about gameplay forks, overwrites, dependency installs, core structure changes, visual/feel tradeoffs, and whether to enter the next phase.169170When defaults are reasonable, say:171172```text173我会按默认方案处理低风险事项。174本阶段结束后会停下等你确认。175```176177## Documentation178179Prefer maintaining these files when the project has or needs docs:180181- `docs/dev_log.md`182- `docs/decisions.md`183- `docs/pitfalls.md`184- `docs/tuning.md`185- `docs/asset_pipeline.md`186- `docs/test_plan.md`187188At phase end, document what changed, which files changed, what was verified, user feedback, and next step.189190For pitfalls, record:191192```text193问题:194原因:195修复:196复用教训:197```198199For decisions, record:200201```text202决定:203原因:204替代方案:205风险:206回滚方式:207```208209For tuning, record:210211```text212参数:213修改前:214修改后:215原因:216效果:217```218219## Backup And Rollback220221In late-phase or high-autonomy work:222223- Back up configs, scenes, levels, and key assets before changing them.224- Create `v2` or versioned assets instead of overwriting important resources.225- Prefer Git commits/checkpoints before larger changes.226- Avoid hardcoding tuning values when config/data can hold them.227- Explain what changed, why, and how to roll back.228229## Natural-Language Tuning230231Translate subjective feedback into concrete, limited changes.232233- "角色跳起来太轻": inspect gravity, jump velocity, fall speed, landing feedback.234- "画面不够高级": inspect lighting, materials, post-processing, camera, UI hierarchy; do not alter core rules.235- "操作有点粘": inspect input latency, acceleration, damping, and animation transitions.236237Tune one concern per round, verify it, and update `docs/tuning.md` when present.