docs: remove duplicate CLAUDE.md lessons #47-48

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Michael Chihlas
2026-03-07 15:51:07 -05:00
parent 789f4373de
commit 44e3bfe474

View File

@@ -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`.