summaryrefslogtreecommitdiff
path: root/.github/instructions/python-backend.instructions.md
diff options
context:
space:
mode:
authorkboz <kutayboz@gmail.com>2026-04-18 20:29:14 +0200
committerkboz <kutayboz@gmail.com>2026-04-18 20:29:14 +0200
commit8cc70dfee2049772a2da9cfdeb15f64452bc390b (patch)
tree539dc2b4a314b45f8a9d024e57e196eab09653b4 /.github/instructions/python-backend.instructions.md
parent2c5b7da8165e3f8b90748e8ced1de0e3e8d52309 (diff)
downloadhaul-8cc70dfee2049772a2da9cfdeb15f64452bc390b.tar.gz
AI instructions
Diffstat (limited to '.github/instructions/python-backend.instructions.md')
-rw-r--r--.github/instructions/python-backend.instructions.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/.github/instructions/python-backend.instructions.md b/.github/instructions/python-backend.instructions.md
new file mode 100644
index 0000000..6bb9158
--- /dev/null
+++ b/.github/instructions/python-backend.instructions.md
@@ -0,0 +1,13 @@
+---
+description: "Use when editing the Python backend, FastAPI endpoints, ESI integration, or route-planning modules under backend/src. Covers service boundaries, side effects, and runtime assumptions."
+name: "Python Backend Boundaries"
+applyTo: "backend/src/**/*.py"
+---
+# Python Backend Boundaries
+
+- Keep `backend/src/main.py` thin. Add request/response wiring there, but keep orchestration in `backend/src/manager.py`.
+- Keep live ESI calls, token refresh, waypoint updates, and market-window side effects inside `backend/src/esi/`. Do not introduce direct ESI `requests` calls in `graph.py`, `market.py`, `arbitrage.py`, `pathfinder.py`, or `route.py`.
+- Treat `Manager` as the mutable state boundary. If you add background work, keep thread and polling ownership explicit instead of spreading shared state across modules.
+- Preserve the current data-oriented style in the route-planning pipeline: dataclasses, module-level constants, and functions that transform orders, trades, and graph data.
+- The active frontend depends on `/route`, `/route_info`, `/create_route`, `/data_stream`, and `/open_market_window/{type_id}` on `http://localhost:8000`. Keep those contracts stable unless the task includes coordinated frontend changes.
+- ESI-backed code needs local auth and data files that are not checked in. Avoid assuming clean-room execution unless the task is specifically about environment setup. \ No newline at end of file