From 44e3bfe474df7db08ae2f2891dc1e420bce546c1 Mon Sep 17 00:00:00 2001 From: Michael Chihlas Date: Sat, 7 Mar 2026 15:51:07 -0500 Subject: [PATCH] docs: remove duplicate CLAUDE.md lessons #47-48 Co-Authored-By: Claude Opus 4.6 --- CLAUDE.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 80830aa6..1e08a8e8 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -329,10 +329,6 @@ navigate(`/trees/${newTree.id}/edit`) **48. Tree orphan validation uses dynamic root ID:** `treeEditorStore.ts` orphan check compares against `state.treeStructure?.id` (NOT hardcoded `'root'`). AI-generated trees use descriptive root IDs like `"verify-account-exists"`. -**47. AI provider architecture:** `AI_PROVIDER` in `config.py` selects `"anthropic"` or `"gemini"`. `get_ai_provider()` in `ai_provider.py` returns the configured provider with automatic fallback. `assistant_chat_service.py` calls Anthropic directly (with prompt caching + MCP), while copilot and Flow Assist go through the generic provider abstraction. - -**48. Three chat input components:** `ChatInput.tsx` (Flow Assist/AI Chat Builder), `CopilotPanel.tsx` (in-session copilot side panel), `AssistantChatPage.tsx` (standalone AI assistant). All use Shift+Enter for newlines, Enter to send. - **49. Full-stack features — verify both ends:** When adding a field to a backend API response (e.g., `working_tree` in `AIChatMessageResponse`), always verify the frontend consumer actually reads and uses it. Similarly, when a frontend hook/component expects data from an API, confirm the backend populates it. Check the full data flow: schema → endpoint → API client → hook → store → UI. **50. Anthropic SDK retry behavior:** Default `max_retries=2` with exponential backoff can cause requests to take 3× the timeout (e.g., 45s × 3 = 135s). Set `max_retries=1` in `AnthropicProvider` to fail fast. Current timeout is `AI_REQUEST_TIMEOUT_SECONDS=120`.