| name | orchestrate-pixel-office |
| description | Orchestrates the full Pixel Office build pipeline by dispatching parallel sub-agents, managing shared type contracts, and performing final integration verification. Triggers when user requests building, rebuilding, or modifying the Pixel Office app.
|
Pixel Office Build Orchestrator
์ด ์คํฌ์ Pixel Office ์ฑ ๋น๋์ ์ ์ฒด ํ์ดํ๋ผ์ธ์ ์กฐ์จํ๋ค.
์ฌ์ ์กฐ๊ฑด ํ์ธ
node --version
cd /Users/ldm/work/iosys-pixel-lab
Step 1: ํ๋ก์ ํธ ์ค์บํด๋ฉ
๊ธฐ์กด ํ์ผ์ด ์์ผ๋ฉด ์ด๊ธฐํ:
npm init -y
npm install react react-dom
npm install -D typescript vite @vitejs/plugin-react @types/react @types/react-dom chokidar ws @types/ws express @types/express concurrently
ํ์ ์ค์ ํ์ผ ์์ฑ:
tsconfig.json (strict mode, JSX preserve)
vite.config.ts (React plugin, proxy /ws โ backend)
package.json scripts: dev = concurrently server + vite
Step 2: ๊ณต์ ํ์
๊ณ์ฝ ์์ฑ
src/shared/types.ts โ ๋ชจ๋ ์์ด์ ํธ๊ฐ ์ด ๊ณ์ฝ์ ๊ธฐ์ค์ผ๋ก ๊ฐ๋ฐ:
export type AgentStatus = 'idle' | 'typing' | 'reading' | 'executing' | 'waiting' | 'done' | 'error';
export interface AgentEvent {
timestamp: number;
sessionId: string;
type: string;
content: string;
raw: unknown;
}
export interface AgentState {
id: string;
name: string;
sessionId: string;
status: AgentStatus;
lastAction: string;
lastUpdated: number;
position: { x: number; y: number };
}
export interface WSMessage {
type: 'agent-update' | 'agent-added' | 'agent-removed';
payload: AgentState | AgentState[];
}
export interface TileInfo {
type: 'floor' | 'wall' | 'desk' | 'chair' | 'decoration';
walkable: boolean;
spriteIndex: number;
}
export interface Seat {
id: string;
tileX: number;
tileY: number;
deskTileX: number;
deskTileY: number;
facing: 'down' | 'left' | 'right' | 'up';
assignedAgentId?: string;
}
export interface OfficeLayout {
width: number;
height: number;
tileSize: number;
tiles: TileInfo[][];
seats: Seat[];
}
export interface SpriteAnimation {
frames: number[];
fps: number;
loop: boolean;
}
export interface CharacterSprite {
sheetUrl: string;
frameWidth: number;
frameHeight: number;
animations: Record<AgentStatus, SpriteAnimation>;
}
export interface AssetManifest {
tileSheet: { url: string; tileSize: number; columns: number };
characters: Record<string, CharacterSprite>;
}
Step 3: Phase A โ ๋ณ๋ ฌ ์์ด์ ํธ ๋์คํจ์น
Agent ๋๊ตฌ๋ฅผ ์ฌ์ฉํ์ฌ 3๊ฐ ์์ด์ ํธ๋ฅผ ๋์์ ๋์คํจ์น:
- asset-preparer: MetroCity ์์
๋ค์ด๋ก๋ + ์คํ๋ผ์ดํธ์ํธ + ํ์ผ๋งต ๊ตฌ์ฑ
- backend-builder: Express + WebSocket + JSONL ๊ฐ์ + ์ํ ๋จธ์
- game-engine-builder: Canvas 2D ๋ ๋๋ง ์์ง ์ ์ฒด
๊ฐ ์์ด์ ํธ์๊ฒ ์ ๋ฌํ ํ๋กฌํํธ:
- ํ๋ก์ ํธ ๋ฃจํธ ๊ฒฝ๋ก
src/shared/types.ts ๋ด์ฉ (ํ์
๊ณ์ฝ)
- ํด๋น ์์ด์ ํธ์
.claude/agents/{name}.md ์คํ ์ ์ฒด
Step 4: Phase B โ ํ๋ก ํธ์๋ ํตํฉ
Phase A 3๊ฐ ์์ด์ ํธ ์๋ฃ ํ:
- ๊ฐ ์์ด์ ํธ ์ฐ์ถ๋ฌผ ํ์ธ (ํ์ผ ์กด์ฌ ์ฌ๋ถ)
- frontend-builder ์์ด์ ํธ ๋์คํจ์น
- Phase A ์ฐ์ถ๋ฌผ ๊ฒฝ๋ก ์ ๋ฌ
- engine์ public API ์์ฝ ์ ๋ฌ
Step 5: Phase C โ ๊ฒ์ฆ
- TypeScript ์ปดํ์ผ:
npx tsc --noEmit
- ๊ฐ๋ฐ ์๋ฒ ์์:
npm run dev
- ํ์ผ ๊ตฌ์กฐ ํ์ธ: ๋ชจ๋ ์์ ํ์ผ ์กด์ฌ ์ฌ๋ถ
- ์๋ฒ ํฌ์ค ์ฒดํฌ:
curl http://localhost:3333/api/agents
์๋ฌ ๋ณต๊ตฌ
| ์๋ฌ ์ํฉ | ๋์ |
|---|
| ์์ด์ ํธ๊ฐ ํ์
๊ณ์ฝ ์๋ฐ | ํด๋น ์์ด์ ํธ ์ฌ๋์คํจ์น (ํ์
๋ช
์ ๊ฐ์กฐ) |
| ์์
๋ค์ด๋ก๋ ์คํจ | ํ๋ ์ด์คํ๋ ๋ชจ๋๋ก ์ ํ |
| ์ปดํ์ผ ์๋ฌ | ์๋ฌ ๋ฉ์์ง ๋ถ์ ํ ํด๋น ๋ชจ๋ ์์ด์ ํธ ์ฌ๋์คํจ์น |
| ํฌํธ ์ถฉ๋ | ๋์ฒด ํฌํธ (3334) ์ฌ์ฉ |