How sakthimurugan03/patchcourt works
PatchCourt reviews GitHub pull requests and returns an evidence-tiered report and verdict. The principal workflow accepts a PR through the CLI, API, or webhook, fetches PR context, gathers retrieved and static-analysis evidence, runs specialist agents in parallel, resolves conflicts through bounded debate, and scores the result. The dashboard presents reports and related evidence; separate capabilities provide SonarQube baseline/live views and audit history. README statements support several product-level links; unsampled implementation details and UI wiring are not inferred.
Main entry points: graph.py Review graph · app.py REST API · api.ts Dashboard API client · tasks.py Celery worker
Components 28
Review entry points
- Review CLI
patchcourt/cli.py - REST API
patchcourt/api/app.py - GitHub webhook
patchcourt/api/webhook.py - Celery worker
patchcourt/worker/tasks.py
Review pipeline
- PR ingestion
patchcourt/ingest/github.py - Review graph
patchcourt/graph.py - Specialist agents
patchcourt/agents - Conflict detection
patchcourt/debate/conflict.py - Bounded debate
patchcourt/debate/debate.py - Scoring and verdict
patchcourt/judge/scoring.py - Review data models
patchcourt/agents/schemas.py
Evidence and analysis
- Repository retrieval
patchcourt/rag/store.py - Evidence engine
patchcourt/evidence.py - Static analysis tools
patchcourt/tools - Isolated scanner
patchcourt/sandbox/runner.py - LLM client
patchcourt/llm.py - Sonar baseline
patchcourt/baseline/sonarqube_baseline.py - Sonar live queries
patchcourt/sonar_live.py
Persistence and integrations
- Audit storage
patchcourt/db/audit.py - Redis queue
- PostgreSQL
- Runtime LLM settings
patchcourt/runtime_llm_config.py
Dashboard
- Review dashboard
dashboard/src/app/page.tsx - Dashboard API client
dashboard/src/lib/api.ts - Evidence and review views
dashboard/src/app/evidence/page.tsx - Baseline view
dashboard/src/components/sonar-baseline-panel.tsx - Sonar live view
dashboard/src/components/sonar-live-panel.tsx
Other components
- GitHub PR
Connections 33
- GitHub PR → REST API: submits PR
README.md - GitHub PR → GitHub webhook: sends events
README.md - Review CLI → Review graph: runs review
README.md - Review dashboard → REST API: requests review
README.md - REST API → Review graph: runs review
patchcourt/api/app.py - GitHub webhook → Celery worker: enqueues task
patchcourt/api/webhook.py - Celery worker → Review graph: runs review
patchcourt/worker/tasks.py - Celery worker → Redis queue: uses broker
patchcourt/worker/tasks.py - Review graph → PR ingestion: fetches PR
patchcourt/graph.py - Review graph → Repository retrieval: indexes and queries
patchcourt/graph.py - Review graph → Evidence engine: analyzes files
patchcourt/graph.py - Review graph → Specialist agents: runs in parallel
README.md - Review graph → Conflict detection: detects conflicts
patchcourt/graph.py - Review graph → Bounded debate: runs if needed
patchcourt/graph.py - Review graph → Scoring and verdict: builds report
patchcourt/graph.py - Review graph → Audit storage: persists report
patchcourt/graph.py - Evidence engine → Static analysis tools: runs scanners
README.md - Review graph → Isolated scanner: runs isolated scans
patchcourt/graph.py - Isolated scanner → Static analysis tools: dispatches scans
patchcourt/sandbox/runner.py - Specialist agents → LLM client: requests claims
patchcourt/agents/base.py - Bounded debate → LLM client: requests rebuttals
patchcourt/debate/debate.py - Bounded debate → Repository retrieval: retrieves fresh evidence
README.md - Scoring and verdict → Review data models: produces report
patchcourt/judge/scoring.py - Audit storage → PostgreSQL: stores audit trail
README.md - REST API → Sonar baseline: serves baseline
patchcourt/api/app.py - REST API → Sonar live queries: serves live queries
patchcourt/api/app.py - REST API → Runtime LLM settings: updates settings
patchcourt/api/app.py - Runtime LLM settings → LLM client: resets client
patchcourt/runtime_llm_config.py - Review dashboard → Dashboard API client: requests data
- Evidence and review views → Review dashboard: shows review evidence
- Baseline view → Dashboard API client: loads baseline
- Sonar live view → Dashboard API client: loads Sonar data
- Dashboard API client → REST API: calls backend