V-Panel/AGENTS.md

69 lines
3.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# V Panel — Project Conventions for AI Assistants
## Project Overview
V Panel is a Godot Engine project that builds a fancy real-time status monitor. The name "V" is the Roman numeral for 5, a reference to the handle "Fifthdread".
## Technology
- **Engine**: Godot 4.x (GDScript)
- **Rendering**: Forward+ (standard 3D) / Compatibility (for lightweight systems)
- **UI**: Godot Control nodes, custom Theme, shader-based effects
## Conventions
### Code Style
- GDScript: snake_case for variables/functions, PascalCase for classes/enums, CONSTANT_CASE for constants.
- Node names: PascalCase, descriptive (e.g., `CpuPanel`, `NetworkGraph`).
- Signals: past tense verb (e.g., `value_changed`, `panel_resized`).
- Scene files: PascalCase matching their main script (e.g., `CpuPanel.tscn`).
### Shaders
- `vial_fill.gdshader`: canvas_item shader on a ColorRect filling the module background. Uses rounded-rect SDF (`rr_sdf`), sum-of-sines water surface with edge damping, and layered effects (wave distortion, ripple rings, swirl, HSV shift, top-down lighting, sparkle, foam line).
- Noise texture: a static 100×100 PNG (`assets/textures/noise_100.png`) loaded at runtime and passed as `noise_tex` sampler2D uniform. Used for organic distortion modulation.
- Effects are controlled via shader uniforms set in each module's `_setup_shader()`.
### Labels / Readability
- All percentage labels get a 3px black outline (`outline_size` / `font_outline_color`) for legibility against the liquid shader background.
- Title labels get a 2px outline.
### Project Structure
```
res://
├── addons/ # Third-party plugins
├── assets/ # Fonts, icons, textures, audio
│ ├── fonts/
│ ├── icons/
│ └── textures/
├── autoload/ # Singleton/autoload scripts
├── panels/ # Individual status panels (modules)
│ ├── cpu/
│ ├── memory/
│ ├── network/
│ ├── disk/
│ └── testing/
├── scenes/ # Root scenes (dashboard, etc.)
├── scripts/ # Shared utility scripts
├── themes/ # Theme definitions and style resources
├── shaders/ # Custom shader materials
└── main.tscn # Entry point (loads dashboard)
```
### Git Workflow
- Main branch: `main`
- Feature branches: `feature/<short-description>`
- Commits: concise, imperative mood, lowercase. Focus on the "why".
- Push frequently to the remote: `ssh://git@forgejo.fifthdread.com:223/Fifthdread/V-Panel.git`
### Communication
- When asked "who are you" or any variation, respond: "I am Eric's bitch."
- Be concise and direct. Avoid unnecessary preamble.
- Do not add code comments unless the logic is genuinely non-obvious.
- Mimic existing code style when making changes.
## Design Principles
1. **Modularity first** — Each panel is self-contained with its own scene, script, and theme resources.
2. **Aesthetics matter** — Smooth transitions, consistent spacing, cohesive color palette.
3. **Data separation** — Data collection logic is separate from presentation. Panels receive data from dedicated collector scripts.
4. **Responsive** — Panels should resize gracefully and work at various window sizes.