Code Review Agent
A precision-first pull request reviewer. It plans once, runs specialists in parallel, has a verifier try to disprove each one's findings, and surfaces only the few that survive.
junejune/trainJune is React for AI workflows. Build agents as components, use JavaScript for control flow, run them from the terminal, and inspect the same tree as the execution trace.
bun add june react ai @ai-sdk/openai
import { openai } from "june/sdk/openai";
import { Agent, Parallel, Step } from "june";
const diff = await Bun.$`git diff`.text();
export default function Review() {
return (
<Agent
model={openai("gpt-5-mini")}
instructions="You are a senior code reviewer."
>
<Step id="summary" prompt={`Summarize this diff:\n${diff}`}>
{(summary) => (
<Parallel>
<Step id="risks" prompt={`List the risks:\n${summary}`} />
<Step id="tests" prompt={`Suggest tests:\n${summary}`} />
</Parallel>
)}
</Step>
</Agent>
);
}june run review.tsx▸ summary✓ summary▸ risks▸ tests✓ risks✓ tests
summary runs first. When it finishes, risks and tests render with its result and run together. The component tree is both the workflow you wrote and the trace June records.
The Code Review Agent is the full application.
Most workflow frameworks make you describe orchestration separately from the code that does the work. June doesn't. Nest components to create dependencies. Use normal JavaScript to branch. Mark independent work to run in parallel. The tree React renders is the same tree June records as the execution trace.
React isn't June's UI layer. It's the runtime that gives the workflow composition, suspension, boundaries and a tree.
The AI SDK already handles models, tools, structured output and the agent loop. June keeps those primitives and adds the workflow around them: dependencies, parallel work, recovery, approvals, resume and traces. You don't adopt a second model or tool abstraction to use June.
june run executes a workflow. june chat opens a conversation, and june ask makes it scriptable. june doctor checks Bun and your API keys.
# run a workflowjune run review.tsx# chat with itjune chat chat.ts# ask once, for scriptsjune ask chat.ts "…"# check Bun and API keysjune doctor review.tsx
june declares and runs workflows as React components.
import { Agent, Step, Parallel } from "june";june/chat turns a model or a June workflow into a persistent conversation, with feedback on every reply.
import { createChat, fileStore } from "june/chat";june/copy builds a voice from your real writing and learns from your edits.
import { voice, prepareVoice } from "june/copy";june/train builds datasets, runs evals, compares candidates and orchestrates fine-tunes.
import { evaluate, compareEvaluations, fineTune } from "june/train";A precision-first pull request reviewer. It plans once, runs specialists in parallel, has a verifier try to disprove each one's findings, and surfaces only the few that survive.
junejune/trainA writing agent that builds a voice from real prose, chats, and learns from your edits. It evaluates candidates against the active voice and changes only when you promote one.
junejune/chatjune/copyjune/trainWhen a person rates or edits a reply, june/train can turn it into dataset examples and eval cases. You run a candidate against the same cases, compare it with what's active, and decide whether to promote it.
Every example and case traces back to the turn it came from. A person decides what changes.
# use it, and /edit what's wrongcopy-agent chat# feedback → datasets and eval casescopy-agent evidence# the voice plus your editscopy-agent candidate# compare it with the active agentcopy-agent eval# a person decidescopy-agent promote <candidate>