Build Module 2 on top of your Module 1 work (or checkpoint-1-foundations).
The goal
REVIEWBOT should look at real code and form an opinion:
- a
fetchPullRequesttool that pulls and noise-filters a PR diff, - a
reviewDifftool that sends the diff to a model on Workers AI and parses structured findings, - both routed through AI Gateway via
AI_GATEWAY_ID.
Getting started
Have your agent scaffold the tools. Remember each tool needs a description, a Zod inputSchema, and an execute. Then register them in the tools map inside onChatMessage, or the model cannot see them.
Watch out
- Unauthenticated GitHub is limited to 60 requests/hour. Set a
GITHUB_TOKENsecret to raise it.
Stuck?
git checkout checkpoint-2-tools-ai -- src/
Done when
- REVIEWBOT fetches a real public PR and returns a structured finding with a file reference.
- You can explain the three parts of a tool.