How anthropicbots/hiero-bot-py works
hydra-maintainer is a self-hosted GitHub App for maintainer operations. GitHub webhook deliveries are verified and dispatched through repository configuration into workflows for onboarding, PR quality and health, reviewer handling, contributor progression, and issue management; those workflows act through the GitHub client and persist results for audit and API queries. Optional AI review uses a provider backend layer. The graph also includes scheduled stale-issue work and authenticated REST access. Some workflow links rely on the SOURCE INDEX or README rather than complete source excerpts; uncertain implementation details are omitted.
Main entry points: webhooks.py Webhook router · client.py GitHub client · audit.py Audit trail · pullrequest.py PR gates and review
Components 22
App ingress
- FastAPI app
app/main.py - Webhook router
app/github/webhooks.py - Scheduled jobs
app/scheduler/jobs.py
Maintainer workflows
- Contributor onboarding
app/workflows/onboarding.py - PR gates and review
app/workflows/pullrequest.py - PR health scoring
app/workflows/prhealth.py - Reviewer assignment
app/workflows/reviewerassignment.py - Contributor progression
app/workflows/progression.py - Issue management
app/workflows/issuemanagement.py
Shared platform
- Repo configuration
app/config/loader.py - GitHub client
app/github/client.py - Database sessions
app/db/database.py - Persistent records
app/db/models.py - Audit trail
app/utils/audit.py
AI review
- AI review orchestration
app/ai/reviewer.py - Backend registry
app/ai/backends/registry.py - Backend contract
app/ai/backends/base.py - AI providers
app/ai/backends
API and identity
- REST API
app/api/routes.py - OAuth and sessions
app/auth/oauth.py - Route authentication
app/auth/dependencies.py
Other components
- GitHub
Connections 36
- GitHub → Webhook router: sends events
- FastAPI app → Webhook router: registers router
app/main.py - FastAPI app → REST API: registers routes
app/main.py - FastAPI app → Scheduled jobs: starts jobs
app/main.py - Webhook router → Repo configuration: loads repo config
app/github/webhooks.py - Repo configuration → GitHub client: fetches config
app/config/loader.py - Webhook router → Contributor onboarding: dispatches events
app/github/webhooks.py - Webhook router → PR gates and review: dispatches events
app/github/webhooks.py - Webhook router → PR health scoring: dispatches events
app/github/webhooks.py - Webhook router → Contributor progression: dispatches events
app/github/webhooks.py - Webhook router → Issue management: dispatches events
app/github/webhooks.py - Webhook router → Reviewer assignment: dispatches events
app/github/webhooks.py - Scheduled jobs → Issue management: runs stale scans
app/scheduler/jobs.py - Contributor onboarding → GitHub client: acts on GitHub
app/workflows/onboarding.py - PR gates and review → GitHub client: acts on GitHub
app/workflows/pullrequest.py - PR health scoring → GitHub client: posts scorecards
app/workflows/prhealth.py - Reviewer assignment → GitHub client: requests reviewers
app/workflows/reviewerassignment.py - Contributor progression → GitHub client: acts on GitHub
app/workflows/progression.py - Issue management → GitHub client: acts on GitHub
app/workflows/issuemanagement.py - GitHub client → GitHub: calls API
app/github/client.py - PR gates and review → AI review orchestration: requests AI review
app/workflows/pullrequest.py - AI review orchestration → Backend registry: selects backend
app/ai/reviewer.py - Backend registry → AI providers: creates providers
app/ai/backends/registry.py - AI providers → Backend contract: implements contract
app/ai/backends/base.py - REST API → Route authentication: requires identity
app/api/routes.py - Route authentication → Database sessions: gets database session
app/auth/dependencies.py - REST API → Database sessions: queries records
app/api/routes.py - Database sessions → Persistent records: persists models
app/db/database.py - OAuth and sessions → Persistent records: stores user sessions
app/auth/oauth.py - Contributor onboarding → Audit trail: records actions
app/workflows/onboarding.py - PR gates and review → Audit trail: records actions
app/workflows/pullrequest.py - PR health scoring → Audit trail: records actions
app/workflows/prhealth.py - Reviewer assignment → Audit trail: records actions
app/workflows/reviewerassignment.py - Contributor progression → Audit trail: records actions
app/workflows/progression.py - Issue management → Audit trail: records actions
app/workflows/issuemanagement.py - Audit trail → Persistent records: writes audit entries
app/utils/audit.py