Coding
Pull request review triage
Review incoming pull requests against repo conventions, then approve, request changes, or route the PR to a human reviewer.
[ workflow / coding ]
Pull request review triage
Whenever a PR opens, Cosmos gathers the diff, nearby files, repository conventions, and prior review notes. It runs an AI review pass, posts what it found, and routes the PR based on confidence: approve simple changes, request fixes, or escalate to a human reviewer.
07 nodes
04 edges
Webhook from GitHub / GitLab
Diff, related files, conventions
Spots bugs, style and risk
Decision
Safe to auto-approve?
Confidence ≥ threshold
Assign repo CODEOWNERS
Cosmos posts approval
Assign repo CODEOWNERS
Decision
Safe to auto-approve?
Confidence ≥ threshold
Cosmos posts approval
Inline comments + checklist
Workflow prompt
Paste this into Augment to reproduce the workflow end-to-end.
Build a Cosmos workflow that triages every new pull request on our GitHub repositories. Trigger: a webhook fires whenever a pull request is opened or updated. Steps: 1. Cosmos gathers context: the diff, related files, the repo's conventions and any prior review notes. 2. Run an AI review pass that flags bugs, style issues and risky changes. 3. Decision: "Safe to auto-approve?". Compare the AI confidence score against a configurable threshold: - If yes, post an approval review on behalf of Cosmos. - If no, request a human review and assign the matching CODEOWNERS. 4. Either path ends by posting a single summary comment on the PR with inline review comments and a checklist. Keep the flow auditable: every action posts back to the PR so reviewers can see what Cosmos saw, what it decided, and why.