From 8717a52ab75bde0010fcb91f5b97404fbf77a793 Mon Sep 17 00:00:00 2001 From: hhs <386998068@qq.com> Date: Fri, 12 Jun 2026 16:51:28 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=8F=90=E4=BA=A4=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=94=B9=E7=94=A8=E4=B8=AD=E6=96=87=E6=8F=8F=E8=BF=B0=EF=BC=8C?= =?UTF-8?q?=E5=BC=BA=E5=8C=96=E6=96=87=E6=A1=A3=E4=BC=98=E5=85=88=E5=8E=9F?= =?UTF-8?q?=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CLAUDE.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 51cae6a..90e4ed4 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -6,7 +6,9 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co CamTalk is a multimodal real-time AI visual dialogue assistant. Users interact via camera and microphone — the app captures visual scenes and voice input, sends them to AI services, and responds with both text and speech. The project is currently in the design-document phase; source code is being built incrementally. -**Design docs (Chinese):** `docs/` contains the full architecture, API contracts, user stories, cost control strategies, and technology selection rationale. Read these before implementing any feature. +> **文档优先原则:** 执行任何开发任务前,先读取 `docs/` 下的相关设计文档(架构、接口、技术选型等),以文档为最高依据。代码实现应与文档一致;若有偏差,优先更新文档(尤其是接口文档)。 + +**Design docs (Chinese):** `docs/` contains the full architecture, API contracts, user stories, cost control strategies, and technology selection rationale. ## Architecture @@ -99,6 +101,6 @@ All messages are JSON text frames with `{type, request_id?, timestamp?}` envelop - **Go:** Follow standard Go conventions. Use `context.Context` for cancellation/timeout in all AI calls. Use `sync.RWMutex` for concurrent map access. Struct tags use `json:"snake_case"`. - **TypeScript:** Strict mode. Interfaces for all data models. WebSocket message types as discriminated unions (`type` field). -- **Commit messages:** Use conventional commits format: `feat:`, `fix:`, `docs:`, `refactor:`, `test:`, `chore:` -- **No auto-push:** Do not push to remote unless explicitly asked. -- **Docs-first:** When implementing a feature, update the relevant interface doc in `docs/` if the implementation diverges from the spec. +- **Commit messages:** Conventional commits 格式,描述用中文。示例:`feat: 添加 WebSocket 连接管理`, `fix: 修复心跳超时判断`, `docs: 更新接口文档` +- **No auto-push:** 禁止自动 push,除非用户明确要求。 +- **Docs-first:** 实现功能前先读取 `docs/` 下的相关设计文档,以文档为依据进行开发。实现与文档不一致时,优先更新 `docs/` 下的接口文档。