Imported from rozsival/panther-minor (
AGENTS.md). Install upstream withnpx skills add rozsival/panther-minor. Copyright stays with the author.
AGENTS.md
This file provides guidance to AI assistants (Claude, Gemini, Copilot, OpenCode etc.) when working with code in this repository.
Project Overview
Panther Minor is a self-hosted AI workstation setup designed for running LLMs and AI services on AMD hardware with ROCm support. It includes configurations for llama.cpp, stable-diffusion.cpp, Open WebUI, Prometheus, Grafana, and exporters for monitoring GPU and node performance.
Stack
- Host: Ubuntu 26.04 LTS+ (Linux kernel 7), ROCm 10, kernel params
amdgpu.mes=1 iommu=pt - Services: llama.cpp, llama-manager (proxy/idle unloader), stable-diffusion.cpp (sd-server image generation), sd-manager (proxy), Open WebUI, Prometheus, Grafana, GPU/node exporters
- Network: See PORTS.md. SSH on 2222, services on 3000/5000/8000/8001/8080/9090
- Config:
.env(from.env.example),docker-compose.yml,bin/src/*
Critical Rules
- Code Style – Ultracite preset for Biome (use
pnpm run checkorpnpm run fixto check or auto-fix) - Custom ROCm builds only — llama.cpp (
llama-cpp/Dockerfile) for LLMs and stable-diffusion.cpp (stable-diffusion-cpp/Dockerfile) for image generation, both ROCm v10 withgfx1201support - Package manager —
apt-getonly in scripts and Dockerfiles (neverapt):apthas no stable CLI interface and warns on every scripted call. Useapt-get upgrade --with-new-pkgswhereapt upgradewas meant, andapt-cache/apt-markfor queries - Commits — Conventional Commits v1.0.0, lowercase, no final punctuation, 100 chars max
Key Files
README.md— setup instructions, architecture overview, service access detailsPORTS.md— detailed port configuration and access methodsbin/README.md— overview of the./bin/clicommand tree (strictly follow rules there for CLI changes)models/README.md— overview for LLMs (./bin/cli models llm *,models/llm.config.json,llama-cpp/preset.ini) and text-to-image models (./bin/cli models t2i *,models/t2i.config.json)docker-compose.yml— service definitions with health checksllama-cpp/manager.js— activity-aware reverse proxy; records inference activity, exposes/statusfor the exporter; unloads idle models and arbitrates large-model switches before proxying inferencellama-cpp/models.js— shared model helpers, including normalization and the static list of model IDs treated as large by the managerllama-cpp/metrics-exporter.js— Prometheus exporter; queriesllama-manager /statusto decide idle vs. active scrape cyclestable-diffusion-cpp/Dockerfile+entrypoint.sh— buildssd-server(ROCm/HIP, gfx1201) and serves Ideogram 4 with an OpenAI-compatible image APIstable-diffusion-cpp/manager.js— thin activity-tracking reverse proxy in front ofsd-server(no model unload;sd-serverhas none), exposes/statusstable-diffusion-cpp/metrics-exporter.js— Prometheus exporter derivingsd_*gauges fromsd-manager /statusandsd-server /v1/modelsmonitoring/prometheus.yml— node, GPU, llama.cpp, and stable-diffusion.cpp exporter targets for Prometheusmonitoring/grafana/dashboards/gpu.json— Grafana dashboard for GPU metrics
Planning
When requested to plan a new feature or change, provide a clear outline that can be reviewed and approved before implementation.
It should also be a complete guide to any agent taking over the work and implementing it. Go straight to the point, and avoid unnecessary verbosity.
Each plan is written in a separate file in the .agents/plans directory, with a name constructed as YYYY-MM-DD-<short-description>.md.