Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Chapter 23: Project Practice: AI Coding Assistant

Build an AI coding assistant from scratch that can understand code, generate code, write tests, and fix bugs.


Chapter Overview

This chapter is the first comprehensive hands-on project. We will apply the core Agent technologies learned so far — tool calling, memory systems, RAG, planning and reasoning — to build an AI coding assistant that truly helps developers.

Run the offline patch verification workshop to see a candidate fix fail and a second one pass the same acceptance tests. You only need Git and Python 3.10+. The remaining sections explain how to assemble the model-backed assistant from code snippets.

Chapter Goals

  • ✅ Design the overall architecture of a coding assistant
  • ✅ Implement code indexing and semantic search
  • ✅ Build code generation and modification capabilities
  • ✅ Implement automatic test generation and bug fixing
  • ✅ Integrate everything into a complete, usable tool

Chapter Structure

SectionContentDifficulty
23.1 Project Architecture DesignOverall plan and component design⭐⭐
23.2 Code Understanding and AnalysisAST parsing, semantic search⭐⭐⭐
23.3 Code Generation and ModificationStructured generation, diff modification⭐⭐⭐
23.4 Test Generation and Bug FixingAutomated testing, diagnostic repair⭐⭐⭐
23.5 Integration Design: From Components to AssistantIntegrating all components⭐⭐⭐⭐

🔗 Learning Path

Core Prerequisites: Chapter 3: Tool Calling, Chapter 6: RAG, Chapter 13: LangGraph Recommended but not required: Chapter 20: Agent Evaluation and Optimization

Related Projects:


Next: 23.1 Project Architecture Design