Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 33 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ sudo apt-get install jq # Ubuntu/Debian

# Optional: Set API key for research features
export ANTHROPIC_API_KEY="your-key"

# Optional: Set Mem0 API key for intelligent memory
export MEM0_API_KEY="your-mem0-key"
```

## Architecture
Expand Down Expand Up @@ -71,11 +74,40 @@ Each phase uses Claude Code with specific prompts and up to 50 turns. The build
- State persistence for resumable builds
- MCP servers for enhanced capabilities
- Automatic validation after each phase
- Intelligent memory with Mem0 MCP (when API key is set)

## Development Tips

- The build creates a `claude-code-builder` directory with the complete Python package
- Use `--resume` flag to continue interrupted builds
- Build state is saved in `.build-state.json`
- Each phase produces specific modules as defined in tasks.md
- The final tool can build any project from markdown specifications
- The final tool can build any project from markdown specifications

## Mem0 Integration

When `MEM0_API_KEY` is set, the builder uses Mem0's intelligent memory system instead of the standard MCP memory server. This provides:

### Key Benefits
- **Semantic Search**: Find memories using natural language queries instead of exact keys
- **Intelligent Extraction**: Mem0 uses LLMs to automatically extract important information
- **Contradiction Resolution**: Automatically updates and resolves conflicting memories
- **Persistent Storage**: Memories persist across sessions for better continuity
- **Context Understanding**: Mem0 understands relationships between memories

### Memory Usage
- Init phase stores comprehensive project analysis
- Start phase saves dependency research and patterns
- Each build phase tracks progress and decisions
- All memories are searchable across sessions

### Configuration
```bash
# Enable Mem0 integration
export MEM0_API_KEY="your-mem0-api-key"

# Run the builder - it will automatically use Mem0
./builder-claude-code-builder.sh
```

Without `MEM0_API_KEY`, the builder falls back to the standard memory MCP server.
36 changes: 31 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,15 +237,15 @@ You will find:

## 🛠️ The Magic: MCP Servers

The script configures THREE MCP servers that transform Claude's capabilities:
The script configures FOUR MCP servers that transform Claude's capabilities:

```json
[
{
"id": "memory",
"id": "mem0-mcp", // or "memory" if MEM0_API_KEY not set
"command": "npx",
"arguments": ["-y", "@modelcontextprotocol/server-memory"],
"description": "Persistent memory across all phases"
"arguments": ["-y", "@mem0/mcp"],
"description": "Intelligent memory with semantic search (when MEM0_API_KEY is set)"
},
{
"id": "sequential-thinking",
Expand All @@ -256,12 +256,35 @@ The script configures THREE MCP servers that transform Claude's capabilities:
{
"id": "filesystem",
"command": "npx",
"arguments": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp", "/Users"],
"arguments": ["-y", "@modelcontextprotocol/server-filesystem", "."],
"description": "Enhanced file operations"
},
{
"id": "git",
"command": "npx",
"arguments": ["-y", "@modelcontextprotocol/server-git"],
"description": "Git operations for version control"
}
]
```

### 🧠 NEW: Mem0 Integration

When you set `MEM0_API_KEY`, the builder uses Mem0's intelligent memory system:

```bash
# Enable Mem0 for semantic memory search
export MEM0_API_KEY="your-mem0-api-key"

# Now memories are stored with AI understanding:
# Instead of: memory__create_memory('phase_1_complete', 'true')
# You get: mem0-mcp__add-memory('Phase 1: Created project foundation with...')

# Search semantically instead of by exact keys:
# Instead of: memory__retrieve_memory('phase_1_interfaces')
# You can: mem0-mcp__search-memories('interfaces created in phase 1')
```

## 🎓 Tutorial: Try It Yourself

### Step 1: See What Gets Built
Expand All @@ -285,6 +308,9 @@ cat phases.md
npm install -g @anthropic-ai/claude-code
brew install jq # or apt-get install jq

# Optional: Enable Mem0 intelligent memory
export MEM0_API_KEY="your-mem0-api-key"

# Run the build in current directory (default)
./builder-claude-code-builder.sh

Expand Down
Loading