From eedb940799eb005cc003ee65f45dd2993e7fc83f Mon Sep 17 00:00:00 2001 From: Rogee Date: Thu, 18 Dec 2025 17:39:14 +0800 Subject: [PATCH] update llm.txt --- backend/llm.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/llm.txt b/backend/llm.txt index 01009b6..2f829a3 100644 --- a/backend/llm.txt +++ b/backend/llm.txt @@ -215,6 +215,10 @@ Generator will convert snake_case columns to Go struct field names (e.g. `class_ ## 3) Service layer injection (when adding services) - Services are in `backend/app/services`. +- Data access boundary: + - MUST: only the `services` layer may query the database via `models.*Query`, `models.Q.*`, `gorm.DB`, or raw SQL. + - DO NOT: perform any direct database query from HTTP modules (`backend/app/http/**`) including controllers, DTO binders, or middlewares. + - HTTP modules must call `services.*` for all read/write operations. - After creating/updating a service provider, regenerate wiring: - `atomctl gen service` - `atomctl gen provider`