How bua9595/pets works
Hatch Desktop Pet is a local multi-pet application with a Tk desktop runtime and a separate CLI hatch/interaction flow. Its principal runtime workflow loads a pet’s manifest and sprite atlas, selects animations in response to automatic behavior or user actions, and displays them in a movable desktop window. A second major capability is preparing and reviewing approved sprite sources, building per-pet atlases with QA outputs, and exporting Ruffy for Codex. Runtime and builder excerpts support the core links; some documented subsystems are represented at their existing directory paths because their source was not sampled.
Main entry points: main.py Hatch CLI · pets Pet manifests and atlases · pet.py Pet state and actions · hatch_flow.py Hatch flow
Components 20
Pet runtime
- Desktop window
src/desktop_pet.py - Sprite animator
src/sprite_animator.py - Pet manifests and atlases
assets/pets
CLI interactions
- Hatch CLI
src/main.py - Hatch flow
src/hatch_flow.py - Pet state and actions
src/pet.py - Pet state model
src/pet_state.py - Action handler
src/actions.py - Look and asset loader
src/asset_loader.py
Sprite assets
- Approved sprite sources
assets/source_approved - Source review workflow
assets/review - Ruffy atlas builder
src/pet1_ruffy_builder.py - Chibi atlas builder
src/pet2_chibi_builder.py - Sprite QA
src/sprite_qa.py
Exports and skills
- Skill loader
src/skill_loader.py - Skill definitions
src/skills.py - Codex pet export
src/codex_pet_builder.py - Codex pet package
assets/codex/ruffy - Hatch pet skill
assets/hatch-skill/hatch-real-pet
Other components
- Pet owner
Connections 23
- Pet owner → Desktop window: starts or controls
- Desktop window → Sprite animator: plays animations
- Sprite animator → Pet manifests and atlases: reads manifest and atlas
- Pet owner → Hatch CLI: runs commands
- Hatch CLI → Look and asset loader: loads look
- Hatch CLI → Hatch flow: starts hatch flow
- Hatch CLI → Pet state and actions: creates pet
- Hatch CLI → Action handler: dispatches action
- Hatch flow → Pet state and actions: applies gear or skill
- Pet state and actions → Pet state model: updates state
- Action handler → Pet state and actions: performs action
- Skill loader → Skill definitions: loads skills
- Hatch flow → Skill loader: loads skills
- Source review workflow → Approved sprite sources: approves sources
- Approved sprite sources → Ruffy atlas builder: provides source sprites
- Approved sprite sources → Chibi atlas builder: provides source sprites
- Ruffy atlas builder → Pet manifests and atlases: writes Ruffy atlas and manifest
- Chibi atlas builder → Pet manifests and atlases: writes Chibi atlas and manifest
- Ruffy atlas builder → Sprite QA: produces QA results
- Chibi atlas builder → Sprite QA: produces QA results
- Pet manifests and atlases → Codex pet export: supplies runtime atlas
- Codex pet export → Codex pet package: writes pet package
- Hatch pet skill → Pet owner: guides asset creation