diff --git a/AGENTS.md b/AGENTS.md index fb742ffc82..d5102485e1 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,6 +1,6 @@ # RAGFlow Instructions -Use this file as the local operating guide for the current codebase. Prefer the code and the current CLAUDE.md over any older convention or remembered project shape. +Use this file as the local operating guide for the current codebase. Prefer the code and the current AGENTS.md over any older convention or remembered project shape. ## Core Stance - Treat legacy code as liability, not as a compatibility target. @@ -12,7 +12,7 @@ Use this file as the local operating guide for the current codebase. Prefer the ## Current stack - Backend: Python 3.13+, Quart-based API server, Peewee ORM, async workers. -- Frontend: React + TypeScript + Vite in `web/`. When working under `web/`, read and follow `web/CLAUDE.md` — it holds the frontend conventions (dual-backend Go/Python variants, test placement, styling, data fetching). +- Frontend: React + TypeScript + Vite in `web/`. When working under `web/`, read and follow `web/AGENTS.md` — it holds the frontend conventions (dual-backend Go/Python variants, test placement, styling, data fetching). - Go: the repository also has a substantial Go module for servers, ingestion, parser/runtime, CLI, and supporting services. - Runtime services commonly include MySQL/PostgreSQL, Redis, MinIO, and Elasticsearch/Infinity/OpenSearch depending on configuration. diff --git a/internal/service/bot_completion.go b/internal/service/bot_completion.go index 9b98663938..316cdcabca 100644 --- a/internal/service/bot_completion.go +++ b/internal/service/bot_completion.go @@ -328,7 +328,7 @@ func (s *BotService) ChatbotCompletion( // async_iframe_completion saves `user_id=kwargs.get("user_id", "")`). // The Go BotHandler routes pass `user.ID` through the // "tenantID" parameter (the Go User struct collapses user and - // tenant into one identifier — see project CLAUDE.md), so + // tenant into one identifier — see project AGENTS.md), so // writing `tenantID` here actually stores the requester's // user-id (== tenant-id) in the python user-id slot. The // session-tenant check on the read path compares against the diff --git a/lefthook.yml b/lefthook.yml index 596a15a070..1ede6b3571 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -104,13 +104,13 @@ web-checks: root: "web/" run: '"$(../tools/hooks/web_tools.sh)/oxlint" {files}' # Convention guard: frontend tests grouped in a directory must use - # __tests__/, never tests/ (see web/CLAUDE.md "Test File Placement"). + # __tests__/, never tests/ (see web/AGENTS.md "Test File Placement"). # Lefthook skips a job whose glob matches no files, so this job only runs # — and fails — when a changed file sits inside a tests/ directory. - name: web-no-tests-dir glob: "web/**/tests/**" root: "web/" run: | - echo "Forbidden test directory: frontend tests belong in __tests__/, not tests/ (web/CLAUDE.md):" + echo "Forbidden test directory: frontend tests belong in __tests__/, not tests/ (web/AGENTS.md):" printf ' %s\n' {files} exit 1 diff --git a/web/AGENTS.md b/web/AGENTS.md index 603e318bab..d581ec1920 100644 --- a/web/AGENTS.md +++ b/web/AGENTS.md @@ -1,4 +1,4 @@ -# CLAUDE.md +# AGENTS.md This file provides guidance to Claude Code (claude.ai/code) when working with the RAGFlow frontend (`web/`). diff --git a/web/src/services/chat-completion-stream.ts b/web/src/services/chat-completion-stream.ts index 58b242daee..4d078d10ec 100644 --- a/web/src/services/chat-completion-stream.ts +++ b/web/src/services/chat-completion-stream.ts @@ -1,7 +1,7 @@ /** * Chat completion SSE streaming. * - * NOTE on the network layering convention (see web/CLAUDE.md): this file + * NOTE on the network layering convention (see web/AGENTS.md): this file * deliberately uses the native `fetch` API instead of the shared axios instance * in `@/utils/next-request`. Streaming requires access to the raw * `Response.body` `ReadableStream`, which axios cannot expose in the browser. diff --git a/web/src/utils/backend-variant.tsx b/web/src/utils/backend-variant.tsx index b9054bb8b1..9162f6c79c 100644 --- a/web/src/utils/backend-variant.tsx +++ b/web/src/utils/backend-variant.tsx @@ -23,7 +23,7 @@ * oxlint `no-restricted-imports`); the only other exception is the bootstrap * gate in `main.tsx`. * - * Conventions (see web/CLAUDE.md): + * Conventions (see web/AGENTS.md): * - JSX divergence: dispatch through `` * at a dispatcher file (page `index.tsx` / form dispatcher), never inline * in business components.