How vikhayatrana0110-crypto/patchpilot works
PatchPilot is a repository-debugging application: a user uploads a codebase, describes a bug, reviews an automatically generated and validated patch, then approves, rejects, or requests a revision. Its main path runs from the Streamlit UI through the FastAPI API and repository indexing into a LangGraph debugging session. The graph retrieves context, generates and validates a patch, and pauses for human review. The README documents the graph stages and tool capabilities; several implementation files were not sampled, so those relationships are cited to the README rather than inferred from imports.
Main entry points: nodes.py Agent stages · routes.py HTTP API routes · workflow.py Graph workflow · app.py Streamlit interface
Components 20
User interface and API
- Streamlit interface
frontend/app.py - HTTP API routes
backend/api/routes.py - API schemas
backend/api/schemas.py
Repository indexing
- Repository loader
backend/rag/repository_loader.py - Code splitter
backend/rag/code_splitter.py - Vector index
backend/rag/vector_store.py
Debugging agent
- Graph workflow
backend/graph/workflow.py - Debugging state
backend/graph/state.py - Agent stages
backend/graph/nodes.py - Retry and routing
backend/graph/routing.py - Semantic code search
backend/tools/code_search.py - Stack trace analysis
backend/tools/stack_trace.py - Dependency inspection
backend/tools/dependency_inspector.py
Patch validation
- Syntax and lint checks
backend/tools/linter.py - Test runner
backend/tools/test_runner.py - Uploaded repository files
Review and persistence
- Session checkpoints
Other components
- Repository owner
- Groq model service
- Human reviewer
Connections 24
- Repository owner → Streamlit interface: uploads and describes
README.md - Streamlit interface → HTTP API routes: calls over HTTP
frontend/app.py - HTTP API routes → API schemas: validates and returns
backend/api/routes.py - HTTP API routes → Repository loader: loads repository
README.md - HTTP API routes → Code splitter: chunks source
README.md - HTTP API routes → Vector index: indexes chunks
README.md - HTTP API routes → Graph workflow: starts or resumes
backend/api/routes.py - Graph workflow → Agent stages: dispatches stages
README.md - Graph workflow → Retry and routing: routes transitions
README.md - Graph workflow → Debugging state: tracks session state
README.md - Agent stages → Semantic code search: searches repository
README.md - Agent stages → Stack trace analysis: analyzes traceback
README.md - Agent stages → Dependency inspection: inspects dependencies
README.md - Agent stages → Vector index: retrieves code context
README.md - Agent stages → Groq model service: requests patch
README.md - Agent stages → Syntax and lint checks: checks syntax and lint
README.md - Agent stages → Test runner: runs test suite
README.md - Syntax and lint checks → Uploaded repository files: checks target file
backend/tools/linter.py - Test runner → Uploaded repository files: tests repository
README.md - Retry and routing → Agent stages: retries failed patch
backend/graph/routing.py - Agent stages → Human reviewer: presents validated patch
README.md - Human reviewer → HTTP API routes: approves or revises
README.md - HTTP API routes → Session checkpoints: resumes sessions
README.md - Human reviewer → Streamlit interface: reviews results
README.md