From 78c2488144247681f4d158b48884c3ad3decb1dd Mon Sep 17 00:00:00 2001 From: qzl Date: Thu, 12 Mar 2026 16:42:25 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=B7=BB=E5=8A=A0=E5=8D=8F=E8=AE=AE?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E4=BD=9C=E4=B8=BA=E6=95=B0=E6=8D=AE=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E4=BF=A1=E6=BA=90=E7=9A=84=E7=BA=A6=E6=9D=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AGENTS.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 459e6fd..099485d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -40,6 +40,19 @@ If two rules conflict, use the stricter one. - Never push remote changes unless the user explicitly requests it. - Keep AGENTS chain lean: put domain details in sub-AGENTS, avoid duplicate rules across layers. +## Protocol as Source of Truth + +`docs/protocols/` is the single source of truth for data formats and protocols. + +- All data schemas, API contracts, and UI schema definitions MUST be documented in `docs/protocols/`. +- Frontend and backend implementations MUST conform to the protocols defined in `docs/protocols/`. +- Before modifying any data format or protocol: + 1. Update the corresponding document in `docs/protocols/` first + 2. Verify the change is backward compatible or plan migration + 3. Then implement the code changes + +This ensures frontend and backend stay synchronized and prevents drift. + ## Skills Index - `ag-ui`: AG-UI protocol implementation guidance.