Skip to content

Expand CLAUDE.md with comprehensive AI assistant guide#248

Open
Wei Wang (weiwangdd) wants to merge 2 commits intolangchain-ai:mainfrom
weiwangdd:claude/claude-md-mlzcx6ze22eq5k70-QWLhA
Open

Expand CLAUDE.md with comprehensive AI assistant guide#248
Wei Wang (weiwangdd) wants to merge 2 commits intolangchain-ai:mainfrom
weiwangdd:claude/claude-md-mlzcx6ze22eq5k70-QWLhA

Conversation

@weiwangdd
Copy link

Summary

Significantly expanded CLAUDE.md from a brief project overview into a comprehensive guide for AI assistants working with the codebase. The new documentation provides detailed architectural information, configuration reference, and development patterns to enable effective code modifications and maintenance.

Key Changes

  • Project Overview: Added package metadata, entry points, and Python version requirements
  • Repository Structure: Detailed directory tree with file descriptions and deprecation notices for legacy code
  • Graph Architecture: Three-layer nested LangGraph workflow documentation with node descriptions, state flow diagrams, and termination conditions
  • State Definitions: Complete reference for all Pydantic models and TypedDict state classes, including the override_reducer pattern
  • Configuration Reference: Comprehensive table of all Configuration settings with defaults and descriptions; documented SearchAPI enum and model string format
  • Utilities Documentation: Cataloged all tools and key functions in utils.py, including API key resolution and token limit handling
  • Environment Variables: Template showing all required and optional environment variables with descriptions
  • Development Commands: Added common development workflows (dev server, linting, type checking, evaluation)
  • Prompts Reference: Table mapping all prompt constants to their placeholders and purposes
  • Security: Documented JWT authentication and access control patterns in src/security/auth.py
  • Evaluation: Explained LangSmith integration and available evaluators
  • Key Conventions: Documented async-first patterns, structured output retry logic, token limit recovery, command pattern usage, and MCP authentication flow
  • Common Modification Patterns: Added step-by-step guides for adding search providers, models, prompts, and graph nodes

Notable Details

  • Emphasized that only src/open_deep_research/ and tests/ should be modified; src/legacy/ is deprecated
  • Documented the override_reducer pattern for list field updates in state
  • Included MODEL_TOKEN_LIMITS dictionary as a key reference point for token limit recovery
  • Explained the GET_API_KEYS_FROM_CONFIG environment variable for Open Agent Platform deployments
  • Documented ruff configuration with Google docstring style requirements
  • Added architecture diagram reference (architecture.png)

https://claude.ai/code/session_01SQoRgmVTSTSq1YkcnVxpLH

Rewrites the existing CLAUDE.md with a thorough reference guide covering:
- Full graph architecture (3-layer: main graph → supervisor subgraph → researcher subgraph)
- All state classes and their fields (AgentState, SupervisorState, ResearcherState, etc.)
- Complete Configuration field reference with defaults and descriptions
- SearchAPI enum options and provider compatibility notes
- All utility functions and tools with descriptions
- Environment variable reference
- Prompt template inventory with placeholders
- Security/auth architecture
- Evaluation system overview
- Key conventions: async patterns, structured output, token limit recovery, Command routing, MCP auth
- Guidelines for common modifications (new search provider, new model, new node)

https://claude.ai/code/session_01SQoRgmVTSTSq1YkcnVxpLH
Visual PNG diagram covering:
- Layer 1: Main Graph (clarify → brief → supervisor → report)
- Layer 2: Supervisor Subgraph (supervisor ⇄ supervisor_tools loop)
- Layer 3: Researcher Subgraph (researcher ⇄ tools → compress)
- Tool breakdown: Search Tools, MCP Tools, think_tool
- State Classes reference (AgentState, SupervisorState, etc.)
- Configuration field reference with defaults

White background, large font, 150 dpi.

https://claude.ai/code/session_01SQoRgmVTSTSq1YkcnVxpLH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants