name: vesper_ops description: Agentic rules and workflows for Vesper Insight (Rust/Python/Tauri)
Agent Guidelines: Vesper Insight
This skill defines the strict operational overrides you must follow when working on the vesper-insight project.
These are NOT suggestions; they are constraints to ensure system stability and consistency.
1. 🔍 Context Awareness (Read First)
- Root of Trust:
Taskfile.ymlis the Source of Truth for all build/run commands. Read it before proposing any shell commands. - Architecture:
src/(Root): Rust Backend (Data Ingestion).src/brain/: Python AI Engine (Anomaly Detection).src/portal/: Tauri v2 Frontend (Visualization).
2. ⚡ Execution Rules (Command Line)
所有核心操作必须通过 task 命令执行。
- 推荐: 使用
/dev工作流一键启动。 - 强制: 禁止直接使用
cargo run或python main.py进行常规开发。调试特定模块时请确保已执行task sync。
3. 🐍 Python Development Rules (src/brain)
- Package Manager: STRICTLY use
uv.- BANNED:
pip install,conda,poetry. - Add Package:
uv pip install <package>(active venv required) or propose adding toTaskfile.yml. - Env Init: Always suggest
task init-pyifImportErroroccurs.
- BANNED:
- Code Style:
- Use
icecream(ic()) for debugging instead ofprint(). - Type hints are MANDATORY.
- Use
4. 🦀 Rust Development Rules (src/)
- Safety: NO
unsafeblocks allowed unless you explicitly explain why RAII cannot handle the case. - Verification:
cargo check已集成在task build-rust中。
- Networking: 后端使用
pcap原始套接字。权限由task run-ingestion自动通过setcap处理,若报错请检查系统权限。
5. 🖥️ Frontend Rules (src/portal)
- Package Manager: STRICTLY
pnpm(Corepack).- BANNED:
npm,yarn,bun. - Install:
pnpm install.
- BANNED:
- Platform: Tauri v2 + React.
- Data Access:
- WARNING: The web browser (
localhost:5173) CANNOT access the SQLite database due to sandbox restrictions. - Agent Action: If debugging "no data" or "empty charts", verify if the user is checking the Tauri App Window, not Chrome/Edge.
- WARNING: The web browser (
6. 🐼 Infrastructure Rules (Redpanda)
- Role: High-performance Kafka-compatible broker.
- Endpoint:
localhost:19092(No Auth/SASL by default in dev). - Diagnostics:
- Connection Refused: First action -> Run
task check. - Topic Missing: Brain auto-creates topics, but Ingestion might fail if broker is down.
- Docker/Container: Managed externally (see
/home/j/dockge/). Do NOT try todocker runmanually; assumedockgemanages it.
- Connection Refused: First action -> Run
- Environment: Must set
KAFKA_BROKERif not usinglocalhost:19092.
7. 🧪 AI Model & GPU Rules
- VRAM Limit:
- Hardcoded to 60% fraction in
model.pyto protect the RTX 3060 (6GB). - Agent Action: If OOM occurs, DO NOT increase the fraction without checking
nvidia-smi.
- Hardcoded to 60% fraction in
- Warmup Phase:
- Model has a
window_size=50. No alerts will be saved to SQLite during the first 50 flows. - Agent Action: If "no data in DB", first check if >50 flows have been processed in the
task run-brainconsole.
- Model has a
7. 🧪 API Testing Rules (Bruno)
- Source: Collection files in
bruno/. - Command:
task run-api(FastAPI/Uvicorn). - Endpoint:
localhost:8888. - Agent Action:
- Before testing, always ensure
task checkpasses. - If API is down, suggest
task run-api. - Prefer using Bruno files for exploring endpoints over manual
curl.
- Before testing, always ensure
9. 🛑 Common Pitfalls (Troubleshooting)
- Redpanda: If Kafka connection fails, check
task check. Port19092MUST be open. - Database Path: Tauri
tauri.conf.jsonmaps directly tosrc/brain/alerts.db. DO NOT move this file without updating the Tauri config. - Paths:
- Python root is
src/brain. Do not runpythonfrom project root. - Frontend root is
src/portal.
- Python root is