AI Quick Start
This is the entry point for AI coding agents. Read /llms.txt for the index, or /llms-full.txt for standalone context. The README.md, STABILITY.md, and llms-full.txt in each GitHub repository are authoritative for package APIs.
Open the Sprite Playground to inspect the PixiJS/ai*js editor. The hosted build is a read-only procedural demo; image generation and frame submission use the local AI Sprite Studio.
Select the smallest package set
Section titled “Select the smallest package set”- Sprite state graphs and PixiJS v8:
aispritejs,aispritejs/pixi - Game data:
aiecsjs - Game logic FSM:
aifsmjs - Events:
aieventjs - Audio:
aiaudiojs, plus itshowlerpeer dependency - Object reuse:
aipooljs - 2D broadphase:
aiquadtreejs - Cross-context iframe or Flutter WebView communication:
aibridgejs
The packages do not require one another. Do not install the whole family to use one module.
PixiJS sprite pipeline
Section titled “PixiJS sprite pipeline”pnpm add aispritejs pixi.jsimport { createPixiSpriteAnimator } from "aispritejs/pixi";
const animator = createPixiSpriteAnimator(sprite, graph, spritesheet);animator.setInput("speed", 1);animator.update(deltaMs);AI Sprite Studio provides atlas generation, QA, packing, and a web editor. Its existing generated artwork is failed test material, not shippable output or a style reference. Deterministic and visual QA must both pass before packing.
Agent validation checklist
Section titled “Agent validation checklist”- Read package
exportsbefore choosing a subpath. - Use the repository’s package manager and run its
typecheck,test, andbuildscripts. - Treat external atlases, bridge messages, and snapshots as untrusted boundary input.
- Keep renderer binding separate from game-state logic and install only required packages.
Let an AI generate frames
Section titled “Let an AI generate frames”After cloning aisprite-studio, run these commands from the repository root:
npm cinpm testnpm run serveCopy the MCP client configuration from the local editor’s AI Agent Handoff card. A connected AI first calls aisprite_studio_list_assets. Because every checked-in generated image is unapproved, it should use the reference-task and reference-submission tools to repair the canonical reference, wait for human visual review, then request and submit exact frame tasks and run deterministic QA. The bridge stores no model API key, and neither submission nor deterministic checks count as visual approval.
- Codex: copy the
config.tomlform. - Claude Code/Desktop and Gemini CLI: copy the
mcpServersJSON form. - Antigravity or another image agent without an MCP client: copy the active frame task, generate the image, and hand the PNG to an MCP-connected agent for validated submission.
The hosted container and editor use the exact-origin aibridgejs iframe adapter. A browser agent can call window.aispriteStudioBridge.requestContext() and observe the aisprite-studio:context event, or use the bounded selectAsset(asset) and reloadAssets() commands. Image generation and filesystem writes remain local MCP-only operations.