From 8936abd8cd8e644afc379baa23efcb25c05a7424 Mon Sep 17 00:00:00 2001 From: dave Date: Tue, 14 Apr 2026 16:23:18 +0000 Subject: [PATCH] docs: add project architecture section to README for agent context Agents need to know the gateway is a mode of the binary, not a separate app, and that UI stories are frontend React work, not Rust backend restructuring. Co-Authored-By: Claude Opus 4.6 (1M context) --- .huskies/README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.huskies/README.md b/.huskies/README.md index 2fd9ae01..f699a6e6 100644 --- a/.huskies/README.md +++ b/.huskies/README.md @@ -81,7 +81,19 @@ Consult `specs/tech/STACK.md` for project-specific quality gates. --- -## 7. Deployment Modes +## 7. Project Architecture + +Huskies is a single Rust binary with an embedded React frontend. Key things to know: + +- **Backend:** `server/src/` — Rust, built with Poem (HTTP framework) +- **Frontend:** `frontend/src/` — React + TypeScript, built with Vite +- **Gateway mode:** `huskies --gateway` is a deployment mode of the same binary, NOT a separate application. The gateway backend code lives in `server/src/gateway.rs`. Gateway frontend components live in `frontend/src/` alongside everything else. +- **Stories that say "UI":** These are primarily frontend (TypeScript/React) work. Check what backend endpoints already exist before adding new ones. Keep Rust changes minimal. +- **Stories that say "gateway":** The gateway is just a mode. Don't restructure `gateway.rs` unless the story specifically asks for backend changes. + +--- + +## 8. Deployment Modes Huskies has three modes, all from the same binary: