How harshadcse/local-coding-agent works
Local Coding Agent is an offline coding assistant: a developer asks about a project, requests a guarded code change, or reviews a file against supplied standards. The principal workflow runs from the VS Code chat through the local HTTP server into retrieval or the LangGraph edit loop; edits return as proposals for user approval. Indexing, standards review, project tools, and local-model access are distinct supporting stages. The README documents the product flow; sampled source confirms key Python and extension connections, but not every server route or internal step.
Main entry points: server.py HTTP API · graph.py Edit agent loop · cli.py Command line · retriever.py Search and rerank
Components 18
VS Code experience
- Chat interface
vscode-extension/src/chatView.ts - HTTP client
vscode-extension/src/api.ts - Server control
vscode-extension/src/server.ts - Proposal review
vscode-extension/src/proposals.ts
Local agent service
- HTTP API
agent/server.py - Command line
agent/cli.py
Project knowledge
- Project indexer
agent/indexer.py - Chunk index
agent/indexer.py - Search and rerank
agent/retriever.py
Editing and review
- Edit agent loop
agent/graph.py - Edit safeguards
agent/editor.py - Standards review
agent/standards.py
Local model and tools
- Project tools
agent/tools.py - Ollama client
agent/llm.py
Other components
- Developer
- Ollama
- Project files
- Project analyzer
Connections 30
- Developer → Chat interface: asks or edits
README.md - Chat interface → HTTP client: sends requests
vscode-extension/src/chatView.ts - HTTP client → HTTP API: calls HTTP API
vscode-extension/src/api.ts - Server control → HTTP API: starts process
vscode-extension/src/server.ts - Chat interface → Proposal review: shows proposal
vscode-extension/src/chatView.ts - Proposal review → Developer: offers approval
README.md - Developer → Command line: runs commands
agent/cli.py - HTTP API → Project indexer: starts indexing
agent/server.py - Project indexer → Ollama client: embeds chunks
agent/indexer.py - Project indexer → Chunk index: saves chunks
agent/indexer.py - Search and rerank → Chunk index: searches chunks
README.md - Search and rerank → Ollama client: embeds and reranks
agent/retriever.py - HTTP API → Search and rerank: answers with search
README.md - HTTP API → Edit agent loop: requests edit
README.md - Edit agent loop → Search and rerank: retrieves context
agent/graph.py - Edit agent loop → Ollama client: generates edits
agent/graph.py - Edit agent loop → Edit safeguards: applies guarded edits
agent/graph.py - Edit safeguards → Project files: reads and writes
agent/editor.py - Edit agent loop → Project tools: verifies changes
agent/graph.py - Project tools → Project analyzer: runs checks
agent/tools.py - HTTP API → Standards review: reviews files
agent/server.py - Standards review → Ollama client: checks with model
agent/standards.py - Standards review → Project tools: uses project tools
agent/standards.py - Project tools → Project files: reads project
agent/tools.py - Ollama client → Ollama: sends model requests
agent/llm.py - HTTP API → Ollama: checks model status
agent/server.py - Command line → Project indexer: indexes projects
agent/cli.py - Command line → Search and rerank: answers questions
agent/cli.py - Command line → Edit agent loop: runs edits
agent/cli.py - Command line → Standards review: checks standards
agent/cli.py