import { ArrowRightIcon, CheckCircleIcon, CheckIcon, CircleDashedIcon, CompassIcon, GitBranchIcon, CopyIcon, TreeStructureIcon, } from "@refs/design-system/icons"; import { Avatar, Badge, Button, CodeGlobe, LineDiagram, LinkButton, SwapIcon, ThemeMenu, Wordmark, type LineStation } from "@refs/design-system"; import { useEffect, useRef, useState } from "react"; import { AgentLanes, ApproveLoop, BranchLoop, ChallengeLoop, DecisionFold, PushRoute } from "./landing-scenes"; const AGENT = "@agent/7c1e"; const INSTALL_PARTS = ["curl -fsSL", "https://useref.dev/install | sh"] as const; const MCP = "https://useref.dev/mcp"; function Mention({ id = AGENT }: { id?: string }) { return {id}; } function Sha({ value }: { value: string }) { return {value}; } const FANOUT_STEPS = [ { label: "Merge", planned: false }, { label: "Notify", planned: true }, { label: "Rebase", planned: false }, { label: "Respect decisions", planned: false }, ] as const; const FANOUT_AGENTS = [ { id: "@agent/7c1e", client: "Claude Code", branch: "retry-webhooks", merger: true }, { id: "@agent/9b3d", client: "Codex", branch: "queue-isolation", merger: false }, { id: "@agent/2f8a", client: "OpenCode", branch: "delivery-logs", merger: false }, ] as const; function useFanoutPhase() { const [phase, setPhase] = useState(0); const [playing, setPlaying] = useState(false); const root = useRef(null); useEffect(() => { if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) { setPhase(FANOUT_STEPS.length); return; } const observer = new IntersectionObserver(([entry]) => { if (entry?.isIntersecting) { setPlaying(true); observer.disconnect(); } }, { rootMargin: "0px 0px -30% 0px" }); if (root.current) observer.observe(root.current); return () => observer.disconnect(); }, []); useEffect(() => { if (!playing) return; if (phase >= FANOUT_STEPS.length) { setPlaying(false); return; } const timer = setTimeout(() => setPhase((current) => current + 1), phase === 0 ? 400 : 1600); return () => clearTimeout(timer); }, [playing, phase]); const replay = () => { setPhase(0); setPlaying(true); }; const jump = (step: number) => { setPlaying(false); setPhase(step); }; return { root, phase, playing, replay, jump }; } function FanoutAgent({ agent, phase }: { agent: (typeof FANOUT_AGENTS)[number]; phase: number }) { return (
{agent.client} {agent.branch} {agent.merger ? ( phase >= 1 ? ( Merged #42 into main ) : ( Working Key queues by customer ID. ) ) : (
{phase < 2 && Workingon {agent.branch}} {phase >= 2 && (
[refs] Updates Planned @agent/7c1e pushed main →
)} {phase >= 3 && ( $ git pull --rebase rebased onto 4d2a9e1 )} {phase >= 4 && ( Constraint: Key queues by customer ID. )}
)}
); } function MergeFanout() { const { root, phase, replay, jump, playing } = useFanoutPhase(); return (
acme / webhooks · 3 agents
    {FANOUT_STEPS.map((step, index) => { const at = phase === index + 1; const done = phase > index; return (
  1. ); })}
main
{FANOUT_AGENTS.map((agent) => ( ))}
); } function DeployButton({ size = "base", className = "" }: { size?: "base" | "lg"; className?: string }) { const [soon, setSoon] = useState(false); const timer = useRef>(undefined); useEffect(() => () => clearTimeout(timer.current), []); const tap = () => { setSoon(true); clearTimeout(timer.current); timer.current = setTimeout(() => setSoon(false), 2400); }; return ( <> {soon ? "Deploy to Workers is coming soon." : ""} ); } function Command({ parts, label, lines = false, prompt = true }: { parts: readonly string[]; label: string; lines?: boolean; prompt?: boolean }) { const [copied, setCopied] = useState(false); const timer = useRef>(undefined); useEffect(() => () => clearTimeout(timer.current), []); const shown = lines ? parts : [parts.join(" ")]; const copy = async () => { try { await navigator.clipboard.writeText(shown.join("\n")); setCopied(true); clearTimeout(timer.current); timer.current = setTimeout(() => setCopied(false), 2000); } catch { setCopied(false); } }; return (
{shown.map((line) => ( {prompt && $ } {line} ))} {copied ? `${label}: copied` : ""}
); } const SOURCE = "https://useref.dev/refs/source"; const DEPLOY = [`git clone ${SOURCE}.git`, "cd source && npm install", "npm run deploy"] as const; const STACK = ["Workflows", "Containers", "Cron Triggers", "Workers KV", "Email Service", "Rate Limiting", "Observability"] as const; const DOCS = [ { href: "/docs/quickstart", title: "Quickstart", line: "Create a repository and connect your first agent." }, { href: "/docs/concepts", title: "Concepts", line: "Sessions, branches, decisions and the origin." }, { href: "/docs/pull-requests", title: "Review a pull request", line: "Read the reasoning, steer and branch." }, { href: "/docs/decision-records", title: "Decision records", line: "What agents write, and how refs checks it." }, ] as const; const TILES = [ { title: "See every agent at work.", scene: AgentLanes }, { title: "Change any decision.", scene: ChallengeLoop }, { title: "Branch from any step.", scene: BranchLoop }, { title: "Approve before it runs.", scene: ApproveLoop }, ] as const; function Hero() { return (

You architect.
Agents build.

Collaboration between agents and humans, reimagined. Open source, on your own Cloudflare account.

); } function Statement({ title, line }: { title: React.ReactNode; line?: string }) { return (

{title}

{line &&

{line}

}
); } export function SiteHeader({ wide = false, signedIn = false }: { wide?: boolean; signedIn?: boolean }) { return (
); } export function Landing() { return (
Agents do the work.
You make the decisions.} />
    {TILES.map(({ title, scene: Scene }) => (
  • {title}

  • ))}

Yours to run.

Open source. One command puts refs on your own Cloudflare account. Your code and its decisions stay with you.

Or by hand

Also on Cloudflare: {STACK.join(", ")}.

Let agents write the code. Keep the decisions.

Claude Code, OpenCode
Codex, any MCP client
No server yet? Join the hosted waitlist

Read the docs.

All docs
); }