Nano Banana Pro
Agent skill for nano-banana-pro
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Sign in to like and favorite skills
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
DGX-Pixels is an AI-powered pixel art generation stack optimized for the NVIDIA DGX-Spark hardware, designed to generate game sprites and assets for Bevy game engine projects.
Current Status: Documentation Phase Complete ✅ - Implementation not yet started
The project is in its research and planning phase. All documentation is complete, but no code has been written yet. This is intentional - the comprehensive research and architecture proposals must be reviewed and a specific architecture path selected before implementation begins.
These are non-negotiable requirements that must be respected in all implementations:
docs/hardware.md for actual hardware specificationsdocs/adr/0001-dgx-spark-not-b200.md)The
docs/ directory contains comprehensive research and planning:
Critical: Read relevant documentation before implementing any component. The research phase identified best practices, pitfalls, and optimal approaches.
Hardware Context: The system runs on DGX-Spark GB10 (single GPU, unified memory), NOT a multi-GPU DGX B200. This changes many architectural decisions. Always consult
docs/hardware.md and docs/adr/0001-dgx-spark-not-b200.md when making hardware-related decisions.
Before writing any code, one of four architecture proposals must be selected:
Proposal 1: Rapid (1-2 weeks) - Automatic1111 + Simple CLI + Manual Bevy integration
Proposal 2: Balanced (4-6 weeks) - ComfyUI + FastAPI + MCP + LoRA Training
2B. Proposal 2B: Rust TUI + Python (5-6 weeks) - ratatui TUI + ZeroMQ + Python Worker + ComfyUI [NEW RECOMMENDED]
Recommendation: Proposal 2B (Rust TUI + Python) offers the best balance of performance, developer experience, and unique features like side-by-side model comparison. This architecture leverages dgx-spark-playbooks and provides a foundation for contributing back to the ecosystem.
See
docs/02-architecture-proposals.md and docs/07-rust-python-architecture.md for detailed comparison matrices and decision criteria.
These decisions were made after extensive research and should not be changed without strong justification:
docs/06-implementation-plan.mddocs/03-technology-deep-dive.md)For Proposal 2B (Rust + Python):
dgx-pixels/ ├── rust/ # Rust TUI application │ ├── src/ │ │ ├── main.rs # TUI entry point │ │ ├── ui/ # ratatui UI components │ │ ├── zmq_client.rs # ZeroMQ communication │ │ └── image_preview.rs # Sixel rendering │ └── Cargo.toml ├── python/ # Python backend worker │ ├── workers/ │ │ ├── generation_worker.py # ZMQ server + ComfyUI client │ │ └── zmq_server.py # Job queue management │ ├── requirements.txt │ └── pyproject.toml ├── workflows/ # ComfyUI workflow JSON templates ├── models/ # Model storage (use Git LFS) │ ├── checkpoints/ # Base SDXL models │ ├── loras/ # Trained LoRAs │ └── configs/ # Model metadata └── examples/ # Example Bevy integrations
For Proposal 2 (Python only):
dgx-pixels/ ├── src/ │ ├── api/ # FastAPI orchestration layer │ ├── cli/ # Command-line tools │ ├── training/ # LoRA training scripts │ └── processing/ # Post-processing pipeline ├── workflows/ # ComfyUI workflow JSON templates ├── models/ # Model storage └── examples/ # Example Bevy integrations
LoRA Training:
ComfyUI Workflows:
MCP Integration:
Performance Targets (from research):
Side-by-Side Model Comparison (Proposal 2B):
Two integration approaches are documented:
assets/ → Reference in codeFor MCP integration:
bevy_brp_mcp plugin enabledassets/ directory structureasset_server.load("sprites/character.png")AssetPlugin { watch_for_changes_override: Some(true) }See
docs/04-bevy-integration.md for complete patterns and code examples.
assets/ directoryWhen agents implement workstreams, they follow this workflow:
just branch WS-XX or gh-create-branch "wsXX-name"just ci (fmt, lint, test)just pr "Title" or gh-create-pr "Title"gh-rebase-main (before merge)gh-auto-merge --merge-method squash (after CI passes)See
CONTRIBUTING.md for detailed manual workflow guidelines.
The project uses
just for task automation. Key commands:
# Setup just init # Initialize project (first time) just validate-gpu # Verify DGX-Spark hardware # Development just tui # Run Rust TUI (debug) just backend # Start Python backend worker just comfyui # Start ComfyUI server # Testing just test # Run all tests just test-coverage # Run tests with coverage just ci # Run all CI checks (fmt, lint, test) # Code Quality just fmt # Format Rust code just lint # Run Rust clippy just fmt-python # Format Python code # Models just models-list # List available models just download-model # Download SDXL base model just train-lora DATASET # Train LoRA on dataset # Monitoring just gpu-status # Show GPU stats just gpu-watch # Monitor GPU (live) just hw-info # Show all hardware info # Git just status # Show git status just branch WS-XX # Create branch for workstream just pr "Title" # Create pull request just rebase # Rebase onto main # Documentation just docs # Generate and open Rust docs just docs-serve # Serve docs locally # Full list just --list # Show all available commands
The project uses nushell for automation scripts:
Location:
scripts/nu/
Modules:
config.nu - Project config, logging, utilitiesmodules/comfyui.nu - ComfyUI API wrappermodules/dgx.nu - DGX-Spark hardware utilitiesmodules/github.nu - GitHub automation (PR, branch, merge)Usage:
# Load config use scripts/nu/config.nu * # Check hardware use scripts/nu/modules/dgx.nu * dgx-validate-hardware dgx-gpu-stats # GitHub automation use scripts/nu/modules/github.nu * gh-create-branch "feature/new-tui" gh-create-pr "Add new TUI feature" --draft gh-auto-merge --merge-method squash # ComfyUI integration use scripts/nu/modules/comfyui.nu * comfyui-health-check comfyui-generate (open workflows/sprite-gen.json)
When building the system:
Before implementing any component:
docs/hardware.md and docs/adr/0001-dgx-spark-not-b200.md to understand single-GPU unified memory architecturedocs/ROADMAP.md for milestone-based development plan (M0-M5)docs/metrics.md for performance targets and benchmarking strategydocs/02-architecture-proposals.md § Comparison Matrix and Proposal 2Bdocs/03-technology-deep-dive.md § Stable Diffusion XL and LoRA sectionsdocs/03-technology-deep-dive.md § ComfyUI sectiondocs/04-bevy-integration.md § Asset System Basicsdocs/05-training-roadmap.md § Phase 2 before training first modelFor Proposal 2B (Rust + Python) - RECOMMENDED:
docs/07-rust-python-architecture.md § ZeroMQ Communication Patternsdocs/08-tui-design.md § Screen Layouts and Side-by-Side Comparisondocs/11-playbook-contribution.md § Installation StepsStart with the orchestration summary:
cat docs/orchestration/project-summary.md
Key documents:
docs/02-architecture-proposals.md (choose Proposal 2B recommended)docs/hardware.md (understand GB10 unified memory)docs/ROADMAP.md (M0-M5 milestones)docs/orchestration/meta-orchestrator.md (coordination strategy)docs/orchestration/workstream-plan.md (all 18 workstreams)# Clone and setup git clone https://github.com/raibid-labs/dgx-pixels.git cd dgx-pixels # Initialize project just init # Validate hardware just validate-gpu # View hardware info just hw-info
The project uses orchestrated workstreams. Start with Foundation:
# Review Foundation Orchestrator cat docs/orchestration/orchestrators/foundation.md # Review first workstream (WS-01) cat docs/orchestration/workstreams/ws01-hardware-baselines/README.md # Create branch for WS-01 just branch WS-01 # Implement following the workstream spec # (See CONTRIBUTING.md for detailed workflow)
After M0 completes, proceed through:
See
docs/orchestration/meta-orchestrator.md for coordination details.
Do not skip steps or mix architecture proposals - the plans are sequential and architecture-specific.
The research phase identified that no existing solution combines all these requirements, which is why this project exists.