Summary
Build a system scanner that detects everything about the user's environment — hardware capabilities, OS, installed developer tools, environment variables, network connectivity, and existing GAIA state. The output is a `SystemProfile` dataclass consumed by the onboarding agent, lifecycle manager, and recommendation engine.
What to Detect
Hardware
- RAM: Total and available (via `psutil.virtual_memory()`)
- Disk: Free space per drive/mount (`shutil.disk_usage()`)
- CPU: Model, core count, architecture (`platform.processor()`, `os.cpu_count()`)
- GPU: AMD GPU model and driver version (check `rocm-smi`, Windows driver registry)
- NPU: AMD Ryzen AI NPU presence (check driver/device nodes)
Software
- OS: Platform, version, build number (`platform.system()`, `platform.version()`)
- Python: Version, pip, uv availability
- Node.js: Version, npm (`shutil.which("node")`)
- Docker: Installed and running (`docker info`)
- Git: Version (`git --version`)
- Blender: Installed (`blender --version`)
- Lemonade Server: Status, version, loaded models, context size
Environment
- Jira credentials: `ATLASSIAN_SITE_URL`, `ATLASSIAN_API_KEY`, `ATLASSIAN_USER_EMAIL`
- Lemonade URL: `LEMONADE_BASE_URL`
- GAIA state: `~/.gaia/` directory contents, cached models, databases
- Network: Internet connectivity, can reach GitHub releases and PyPI
Output
@dataclass
class SystemProfile:
# Hardware
os_platform: str # "windows", "linux", "macos"
os_version: str # "Windows 11 23H2", "Ubuntu 24.04"
ram_total_gb: float
ram_available_gb: float
disk_free_gb: float
cpu_model: str
cpu_cores: int
gpu_model: Optional[str] # AMD GPU if detected
gpu_driver: Optional[str]
npu_available: bool # Ryzen AI NPU
# Software
python_version: str
node_version: Optional[str]
docker_available: bool
docker_running: bool
git_available: bool
blender_available: bool
# Lemonade
lemonade_installed: bool
lemonade_version: Optional[str]
lemonade_running: bool
loaded_models: List[str]
context_size: Optional[int]
# Environment
jira_configured: bool
gaia_initialized: bool
cached_models: List[str]
network_available: bool
# Recommendations
recommended_context_size: int # Based on RAM
max_model_size_gb: float # Based on disk + RAM
def to_dict(self) -> dict: ...
def summary(self) -> str: ... # Human-readable summary
Implementation Notes
- All detection must be non-destructive and permission-aware (no installing, no modifying)
- Each check should have a timeout (2-3 seconds) to avoid hanging on unresponsive services
- Failed detection should return `None`/`False`, not raise exceptions
- GPU/NPU detection is AMD-specific — check `rocm-smi` on Linux, driver registry on Windows
- Cache results for the session (don't re-scan on every call)
Files to Create
- `src/gaia/installer/system_scanner.py` (NEW, ~400 lines) — SystemProfile + detection logic
- `tests/unit/installer/test_system_scanner.py` (NEW) — Mocked detection tests
Acceptance Criteria
Depends On
None — can be developed in parallel with Phase 1.
Enables
Summary
Build a system scanner that detects everything about the user's environment — hardware capabilities, OS, installed developer tools, environment variables, network connectivity, and existing GAIA state. The output is a `SystemProfile` dataclass consumed by the onboarding agent, lifecycle manager, and recommendation engine.
What to Detect
Hardware
Software
Environment
Output
Implementation Notes
Files to Create
Acceptance Criteria
Depends On
None — can be developed in parallel with Phase 1.
Enables