Source: summerfang-jolli/code-to-doc-demo Last Updated: 2/11/2026
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Introducetion
This is a test for one.joli.dev
Project Overview
This is a Code-to-Documentation AI Agent System that uses LangGraph to orchestrate the conversion of source code into comprehensive documentation, with PostgreSQL vector storage for RAG capabilities.
Architecture
- LangGraph for multi-agent workflow orchestration
- PostgreSQL + pgvector for vector storage and semantic search
- OpenAI for embeddings and documentation generation
- Custom RAG pipeline (Phase 1) followed by RAGFlow integration (Phase 2)
Key Components
Agents
- Code Analyzer Agent: Parses AST, extracts functions/classes/methods
- Documentation Generator Agent: Creates comprehensive docs using LLM
- Embedding & Chunking Agent: Splits docs and generates vectors
- Search & Retrieval Agent: Semantic search with PostgreSQL vectors
- Quality Validator Agent: Assesses and scores documentation quality
Database Schema
projects,code_files,code_elements- Code structure storagedocumentation,document_embeddings- Generated docs and vectors- Uses pgvector extension for efficient similarity search
Development Commands
Database Setup
# Install PostgreSQL with pgvector
# Create database and run migrations
python -m alembic upgrade headDevelopment
# Install dependencies
pip install -r requirements.txt
# Run the application
python src/main.py
# Run tests
pytest tests/
# Start demo interface
streamlit run demo/streamlit_app.pyImplementation Phases
- Phase 1: Custom RAG with PostgreSQL vectors
- Phase 2: RAGFlow integration for comparison
- Phase 3: Unified demo interface
Key Files
DESIGN.md- Comprehensive system design documentsrc/workflow/graph.py- LangGraph workflow definitionsrc/agents/- Individual agent implementationsdatabase/schema.sql- PostgreSQL schema with pgvector