How aayushii-code/repopilot works
RepoPilot accepts a repository and task, then runs a background workflow that validates the request, resolves and clones the repository, inspects and profiles its files, ranks relevant files, and asks a configured model for a grounded implementation plan. Users can follow run state and streamed events through the API, WebSocket, or terminal UI. The README describes later editing, test diagnosis/retry, and pull-request capabilities as future work; they are not implemented in the current status. Source excerpts are partial, so uncertain internal links are omitted.
Main entry points: engine.py Run engine · runs.py Runs API · steps.py Pipeline steps · main.py Application setup
Components 21
User interfaces
- Terminal UI
frontend/src/App.tsx - Frontend API
frontend/src/api.ts - Run stream hook
frontend/src/useRunStream.ts
Run management
- Runs API
backend/repopilot/api/runs.py - WebSocket stream
backend/repopilot/api/ws.py - Run models
backend/repopilot/domain/models.py - Repository reference
backend/repopilot/domain/repository.py - Run and event store
backend/repopilot/domain/store.py - Application setup
backend/repopilot/main.py - Runtime settings
backend/repopilot/config.py
Execution and discovery
- Run engine
backend/repopilot/execution/engine.py - Pipeline steps
backend/repopilot/execution/steps.py - Event bus
backend/repopilot/execution/bus.py - GitHub client
backend/repopilot/github/client.py - Repository profile
backend/repopilot/analysis/profile.py - File relevance ranking
backend/repopilot/analysis/relevance.py
Planning and providers
- Implementation planning
backend/repopilot/agent/plan.py - LLM client
backend/repopilot/agent/llm.py
Other components
- User
- GitHub
- Model provider
Connections 29
- User → Terminal UI: submits task
README.md - Terminal UI → Frontend API: calls API
frontend/src/App.tsx - Terminal UI → Run stream hook: subscribes to stream
frontend/src/App.tsx - Frontend API → Runs API: requests run endpoints
README.md - Run stream hook → WebSocket stream: opens event stream
README.md - Runs API → Run and event store: reads and writes runs
backend/repopilot/api/runs.py - Runs API → Run engine: starts run
backend/repopilot/api/runs.py - Runs API → Repository reference: normalizes repository
backend/repopilot/api/runs.py - Runs API → Run models: uses run model
backend/repopilot/api/runs.py - WebSocket stream → Run and event store: replays events
backend/repopilot/api/ws.py - WebSocket stream → Event bus: subscribes live
backend/repopilot/api/ws.py - Application setup → Runs API: registers routes
backend/repopilot/main.py - Application setup → Runtime settings: loads configuration
backend/repopilot/main.py - Application setup → Run and event store: configures store
backend/repopilot/main.py - Application setup → Run engine: configures engine
backend/repopilot/main.py - Run engine → Run and event store: updates run state
backend/repopilot/execution/engine.py - Run engine → Event bus: publishes events
backend/repopilot/execution/engine.py - Run engine → Pipeline steps: executes steps
backend/repopilot/execution/engine.py - Run engine → Run models: tracks run status
backend/repopilot/execution/engine.py - Pipeline steps → GitHub client: resolves repository
backend/repopilot/execution/steps.py - GitHub client → GitHub: fetches repository metadata
backend/repopilot/github/client.py - Pipeline steps → Repository profile: profiles checkout
backend/repopilot/execution/steps.py - Pipeline steps → File relevance ranking: ranks candidate files
backend/repopilot/execution/steps.py - Pipeline steps → Implementation planning: creates implementation plan
backend/repopilot/execution/steps.py - Implementation planning → Repository profile: grounds plan
backend/repopilot/agent/plan.py - Implementation planning → File relevance ranking: uses file shortlist
backend/repopilot/agent/plan.py - Implementation planning → LLM client: requests completion
backend/repopilot/agent/plan.py - LLM client → Model provider: sends model request
backend/repopilot/agent/llm.py - Run engine → Runtime settings: configures collaborators
backend/repopilot/execution/engine.py