A peer-reviewed journal platform for theoretical AI alignment research, with an AI-powered reviewer discovery agent that helps editors find, evaluate, and invite qualified peer reviewers.
Live demo: alignment-journal.vercel.app
The core deliverable is the editor's reviewer discovery workflow:
-
PDF upload — Authors submit papers as PDFs. Claude Haiku extracts text and runs automated triage (scope, formatting, citations, claims).
-
Agent-powered candidate search — Editors open the discovery agent sidebar and chat naturally: "Find reviewers with expertise in mechanistic interpretability". The agent searches Semantic Scholar and Exa, enriches candidates with h-index, citation counts, relevant papers, email addresses, and homepages.
-
Candidate panel — Discovered candidates appear reactively in the main view with tier labels (great/good/exploring), save/dismiss controls, and expandable detail cards showing relevant papers with direct links.
-
Email invitation composer — Editor asks the agent to draft an invitation email. The agent creates a draft via tool call; it appears instantly in the Email Drafts panel. The editor opens a split-view dialog (markdown editor on the left, rendered preview on the right), edits as needed, and clicks Send (simulated).
The agent-driven approach replaces the traditional static template system. Instead of #[reviewer name] placeholders, the agent composes personalized emails with full context about why each candidate was selected. This is more useful because the agent already knows the paper, the candidate's expertise, and the editor's preferences from the conversation. See decision-log.md for the full rationale.
- Bun (v1.2+)
- A Convex project (free tier works)
- A Clerk application (free tier works)
- Claude Max plan or Anthropic API key (for the agent bridge)
# 1. Install dependencies
bun install
# 2. Configure environment
cp .env.example .env.local
# Fill in: PUBLIC_CONVEX_URL, PUBLIC_CONVEX_SITE_URL, CONVEX_DEPLOYMENT,
# PUBLIC_CLERK_PUBLISHABLE_KEY, CLERK_SECRET_KEY
# Convex Dashboard vars: CLERK_JWT_ISSUER_DOMAIN, ANTHROPIC_API_KEY,
# OPENAI_API_KEY, EXA_API_KEY, RESEND_API_KEY,
# RESEND_WEBHOOK_SECRET
# 3. Push schema & seed data
bunx convex dev --once
bunx convex run seed:seedData
# 4. Start everything
bun dev # Starts Vite dev server + Convex (concurrently)
bun run agent # Starts the discovery agent WebSocket bridge (separate terminal)Then open http://localhost:5173. Log in, switch to editor role, open a submission in TRIAGE_COMPLETE status, and use the discovery agent sidebar to search for reviewers.
Or just use the deployed version: alignment-journal.vercel.app
src/
routes/ # SvelteKit file-based routing (+page.svelte, +layout.svelte)
app/ # Authenticated app shell
editor/ # Editor dashboard, per-submission views, contacts, templates
submit/ # Author submission flow
review/ # Reviewer queue and review forms
article/ # Published articles
open/ # Open discussions
admin/ # Admin tools
lib/
components/ # Svelte 5 UI primitives (hand-rolled, no shadcn)
stores/ # Svelte stores (Clerk context, etc.)
services/ # Clerk + Convex client setup
wrappers/ # ClerkWrapper, ConvexWrapper layout wrappers
app/ # App-level helpers (roles, status, user-state rune)
convex/ # Backend (Convex reactive database)
schema.ts # 23 tables incl. submissions, reviews, emailDrafts,
# externalCandidates, contacts, reminders
authed/ # Client-facing functions (Clerk JWT protected)
private/ # Backend-only functions (API key protected)
helpers/ # Auth wrappers, state machine, typed errors
{name}.ts # Queries/mutations (default Convex runtime)
{name}Actions.ts # Actions using "use node" (Node.js runtime)
agent/ # Discovery agent (Claude Agent SDK) — separate Bun process
agent.ts # Agent setup: MCP tools, system prompt, streaming chat
server.ts # WebSocket bridge (Bun.serve)
cli.ts # Entry point (bun run agent)
tools/
discovery.ts # Semantic Scholar + Exa search tools
candidates.ts # Save/read candidates via Convex
email.ts # create_email_draft tool
shared/agent/ # Shared types between frontend and agent bridge
| Command | Description |
|---|---|
bun dev |
Start dev servers (Vite + Convex) |
bun run build |
Production build (Vercel adapter) |
bun run check |
svelte-check TypeScript validation |
bun run lint |
Prettier check + ESLint (via vite-plus) |
bun run test |
Vitest |
bun run format |
Prettier write |
bun run convex:gen |
Regenerate Convex API types |
bun run agent |
Start discovery agent WebSocket bridge |
- Framework: SvelteKit + Svelte 5 (runes), Vercel adapter (
nodejs22.x) - Backend: Convex (reactive database, serverless functions, real-time subscriptions) — functions in
src/convex/ - Auth: Clerk via
@clerk/clerk-js+@clerk/backend+@clerk/ui, wrapped in a Svelte context store - Agent: Claude Agent SDK with an in-process MCP server, bridged over WebSocket
- Search APIs: Semantic Scholar API, Exa API (people search + research paper search)
- AI triage: Vercel AI SDK with Claude Haiku (single multimodal
generateObjectcall per PDF) - Styling: Tailwind CSS v4 (hand-rolled primitives, no shadcn)
- Build tooling:
vite-plus(Vite + lint + fmt + test, voidzero fork) - Backend services: Effect v4 for server-side code
- Package manager: Bun exclusively
- Testing: Vitest