Quick overview
This workflow ingests GitHub push events, merged pull requests, and scheduled contributor baselines, batches them through an external ownership-signal buffer, scores bus-factor risk per repo/component, uses Anthropic Claude to resolve borderline cases, then creates knowledge-transfer tickets and posts a notification to Slack.
How it works
- Receives GitHub push and pull_request webhooks and runs a scheduled GitHub API scan to collect contributor statistics.
- Normalizes push commits, merged PR activity, and contributor stats into a shared ownership-signal format with repo, component, contributor, and timestamp fields.
- Sends each normalized ownership signal to an external ownership-buffer API for later batch processing.
- Runs on a weekly schedule to fetch the most recent window of buffered signals and compute commit-concentration and active-contributor counts per repo/component.
- Routes clearly healthy and clearly critical clusters directly, and sends ambiguous clusters to an Anthropic Claude agent to classify them as critical-risk or acceptable.
- Merges the resolved results, creates or updates critical-risk knowledge-transfer/documentation tasks in a ticketing system via HTTP API, and posts a summary message to a Slack channel.
Setup
- Configure GitHub webhooks for push and pull_request events to point to the workflow’s two webhook URLs.
- Add GitHub HTTP Header Auth credentials (PAT) and replace
your-org in the GitHub API URL used to list repositories.
- Provide HTTP Header Auth credentials and endpoints for the ownership-buffer API and the ticketing system bulk upsert API.
- Add Anthropic credentials for the Claude chat model used by the AI risk agent.
- Connect Slack credentials and set the target channel ID (for example,
code-ownership-alerts) for notifications.
- Review the schedules and adjust the risk thresholds in the scoring logic (contributor count and commit-share cutoffs) to match your team’s policy.