Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ rather than as someone's browser state.
| Research agent — hackathon in, approved records out | **working** |
| Docs agent — questions answered from indexed documentation | **working** |
| Shared memory — Postgres + pgvector, hybrid retrieval, served over MCP | **working** |
| Web app — see what it knows, teach it, ask it | **working** |
| Web app — see what it knows, research a hackathon, ask it | **working** |
| Integration agent — repo in, sandboxed change out, pull request gated | **in progress** |

## Quickstart
Expand All @@ -77,8 +77,8 @@ Then open:
|---|---|
| `/` | What this is |
| `/hackathons` | What it knows — overview, rules, schedule, resources |
| `/ui/run` | Teach it a hackathon, with what it learned appearing beside the chat |
| `/ui/docs` | Ask questions against the indexed documentation |
| `/research` | Research a hackathon, with what it learned appearing beside the chat |
| `/docs` | Ask questions against the indexed documentation |

It starts knowing nothing. The research agent fills it by calling `save_hackathon`,
`save_product` and `ingest_source` — each one pausing for your approval. The path a judge
Expand Down Expand Up @@ -156,7 +156,7 @@ Not as a model wrapper. The harness does work this project would otherwise have
on demand rather than loaded into context up front.
- **Subagents.** Research fans out across a hackathon's sponsors in parallel and merges
only the results.
- **Sessions that survive.** `/ui/run` reads a session's own event log to work out which
- **Sessions that survive.** `/research` reads a session's own event log to work out which
hackathon it produced, so reopening an old conversation shows what it learned.

The shared memory is served over MCP rather than wired into one runtime, so it is not
Expand Down
16 changes: 10 additions & 6 deletions app/ui/docs/page.tsx → app/docs/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Link from "next/link";
import { ArrowLeft } from "lucide-react";
import { ChatPanel } from "@/components/chat-panel";
import { ThemeToggle } from "@/components/theme-toggle";
import { DOC_AGENT_NAME } from "@/lib/trueforge/client";

export const dynamic = "force-dynamic";
Expand Down Expand Up @@ -29,12 +30,15 @@ export default function DocsChatPage() {
<span className="rounded-full bg-secondary px-2 py-0.5 text-xs text-muted-foreground">
{DOC_AGENT_NAME}
</span>
<Link
href="/ui/run"
className="ml-auto text-xs text-muted-foreground hover:text-foreground"
>
Teach it
</Link>
<div className="ml-auto flex items-center gap-3">
<Link
href="/research"
className="text-xs text-muted-foreground hover:text-foreground"
>
Research
</Link>
<ThemeToggle />
</div>
</header>

<div className="min-h-0 flex-1">
Expand Down
136 changes: 77 additions & 59 deletions app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,82 +4,94 @@

@custom-variant dark (&:is(.dark *));

/* Graft theme — pine-green accent on cool-neutral surfaces.
Drop-in replacement for the amber/rust scale in app/globals.css.
Structure follows that file exactly (same token names, same @theme inline
block, same @layer base) so only the values differ. Accent hue held at ~166
and neutrals at ~155 so tints never fight each other. */

:root {
--background: oklch(1 0 0);
--foreground: oklch(0.147 0.004 49.3);
--background: oklch(0.982 0.003 155);
--foreground: oklch(0.198 0.014 162);
--card: oklch(1 0 0);
--card-foreground: oklch(0.147 0.004 49.3);
--card-foreground: oklch(0.198 0.014 162);
--popover: oklch(1 0 0);
--popover-foreground: oklch(0.147 0.004 49.3);
--primary: oklch(0.555 0.163 48.998);
--primary-foreground: oklch(0.987 0.022 95.277);
--secondary: oklch(0.967 0.001 286.375);
--secondary-foreground: oklch(0.21 0.006 285.885);
--muted: oklch(0.96 0.002 17.2);
--muted-foreground: oklch(0.547 0.021 43.1);
--accent: oklch(0.96 0.002 17.2);
--accent-foreground: oklch(0.214 0.009 43.1);
--popover-foreground: oklch(0.198 0.014 162);
--primary: oklch(0.512 0.055 166);
--primary-foreground: oklch(0.995 0.002 155);
--secondary: oklch(0.958 0.004 155);
--secondary-foreground: oklch(0.268 0.014 162);
--muted: oklch(0.958 0.004 155);
--muted-foreground: oklch(0.492 0.013 158);
--accent: oklch(0.948 0.012 165);
--accent-foreground: oklch(0.352 0.042 166);
--destructive: oklch(0.577 0.245 27.325);
--border: oklch(0.922 0.005 34.3);
--input: oklch(0.922 0.005 34.3);
--ring: oklch(0.714 0.014 41.2);
--chart-1: oklch(0.868 0.007 39.5);
--chart-2: oklch(0.547 0.021 43.1);
--chart-3: oklch(0.438 0.017 39.3);
--chart-4: oklch(0.367 0.016 35.7);
--chart-5: oklch(0.268 0.011 36.5);
--border: oklch(0.908 0.005 155);
--input: oklch(0.908 0.005 155);
--ring: oklch(0.512 0.055 166);
/* Sequential ramp off the accent hue — readable side by side, unlike the
default five-grey scale which is indistinguishable in a legend. */
--chart-1: oklch(0.512 0.055 166);
--chart-2: oklch(0.612 0.048 172);
--chart-3: oklch(0.702 0.042 178);
--chart-4: oklch(0.788 0.034 184);
--chart-5: oklch(0.862 0.026 190);
--radius: 0.875rem;
/* The chat SDK names two of its own tokens --border and --radius, so pointing
those at ours would be self-referential and resolve to nothing. These aliases
give it a different name to read the same value from. */
--app-radius: 0.875rem;
--sidebar: oklch(0.986 0.002 67.8);
--sidebar-foreground: oklch(0.147 0.004 49.3);
--sidebar-primary: oklch(0.666 0.179 58.318);
--sidebar-primary-foreground: oklch(0.987 0.022 95.277);
--sidebar-accent: oklch(0.96 0.002 17.2);
--sidebar-accent-foreground: oklch(0.214 0.009 43.1);
--sidebar-border: oklch(0.922 0.005 34.3);
--sidebar-ring: oklch(0.714 0.014 41.2);
--sidebar: oklch(0.968 0.004 155);
--sidebar-foreground: oklch(0.198 0.014 162);
--sidebar-primary: oklch(0.512 0.055 166);
--sidebar-primary-foreground: oklch(0.995 0.002 155);
--sidebar-accent: oklch(0.948 0.012 165);
--sidebar-accent-foreground: oklch(0.352 0.042 166);
--sidebar-border: oklch(0.908 0.005 155);
--sidebar-ring: oklch(0.512 0.055 166);
}

.dark {
--background: oklch(0.147 0.004 49.3);
--foreground: oklch(0.986 0.002 67.8);
--card: oklch(0.214 0.009 43.1);
--card-foreground: oklch(0.986 0.002 67.8);
--popover: oklch(0.214 0.009 43.1);
--popover-foreground: oklch(0.986 0.002 67.8);
--primary: oklch(0.473 0.137 46.201);
--primary-foreground: oklch(0.987 0.022 95.277);
--secondary: oklch(0.274 0.006 286.033);
--secondary-foreground: oklch(0.985 0 0);
--muted: oklch(0.268 0.011 36.5);
--muted-foreground: oklch(0.714 0.014 41.2);
--accent: oklch(0.268 0.011 36.5);
--accent-foreground: oklch(0.986 0.002 67.8);
--background: oklch(0.178 0.012 162);
--foreground: oklch(0.962 0.004 155);
--card: oklch(0.222 0.014 162);
--card-foreground: oklch(0.962 0.004 155);
--popover: oklch(0.222 0.014 162);
--popover-foreground: oklch(0.962 0.004 155);
--primary: oklch(0.702 0.062 168);
--primary-foreground: oklch(0.178 0.018 166);
--secondary: oklch(0.268 0.014 162);
--secondary-foreground: oklch(0.962 0.004 155);
--muted: oklch(0.268 0.014 162);
--muted-foreground: oklch(0.712 0.014 158);
--accent: oklch(0.288 0.022 165);
--accent-foreground: oklch(0.928 0.018 165);
--destructive: oklch(0.704 0.191 22.216);
--border: oklch(1 0 0 / 10%);
--border: oklch(1 0 0 / 11%);
--input: oklch(1 0 0 / 15%);
--ring: oklch(0.547 0.021 43.1);
--chart-1: oklch(0.868 0.007 39.5);
--chart-2: oklch(0.547 0.021 43.1);
--chart-3: oklch(0.438 0.017 39.3);
--chart-4: oklch(0.367 0.016 35.7);
--chart-5: oklch(0.268 0.011 36.5);
--sidebar: oklch(0.214 0.009 43.1);
--sidebar-foreground: oklch(0.986 0.002 67.8);
--sidebar-primary: oklch(0.769 0.188 70.08);
--sidebar-primary-foreground: oklch(0.279 0.077 45.635);
--sidebar-accent: oklch(0.268 0.011 36.5);
--sidebar-accent-foreground: oklch(0.986 0.002 67.8);
--sidebar-border: oklch(1 0 0 / 10%);
--sidebar-ring: oklch(0.547 0.021 43.1);
--ring: oklch(0.702 0.062 168);
--chart-1: oklch(0.702 0.062 168);
--chart-2: oklch(0.628 0.052 174);
--chart-3: oklch(0.548 0.044 180);
--chart-4: oklch(0.462 0.036 186);
--chart-5: oklch(0.382 0.028 192);
--sidebar: oklch(0.222 0.014 162);
--sidebar-foreground: oklch(0.962 0.004 155);
--sidebar-primary: oklch(0.702 0.062 168);
--sidebar-primary-foreground: oklch(0.178 0.018 166);
--sidebar-accent: oklch(0.288 0.022 165);
--sidebar-accent-foreground: oklch(0.928 0.018 165);
--sidebar-border: oklch(1 0 0 / 11%);
--sidebar-ring: oklch(0.702 0.062 168);
}

@theme inline {
--font-sans: var(--font-sans);
--font-heading: var(--font-heading);
/* One typeface. `font-heading` stays a valid class — pages already use it —
but resolves to the sans; headings are differentiated by weight and
tracking in @layer base below, not by a second family. */
--font-heading: var(--font-sans);
--font-mono: var(--font-mono);
--color-sidebar-ring: var(--sidebar-ring);
--color-sidebar-border: var(--sidebar-border);
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
Expand Down Expand Up @@ -133,4 +145,10 @@
html {
@apply font-sans;
}
}
/* What --font-heading used to do, done with weight and tracking instead. */
h1, h2, h3, h4 {
font-weight: 500;
letter-spacing: -0.025em;
text-wrap: pretty;
}
}
26 changes: 3 additions & 23 deletions app/hackathons/[slug]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { notFound, redirect } from "next/navigation";
import { Trophy } from "lucide-react";
import { EmptySection, Section, TitledList } from "@/components/section";
import { EmptySection, Section, TitledList, TrackList } from "@/components/section";
import { getHackathon, sectionsFor } from "@/lib/hackathons";

export const dynamic = "force-dynamic";
Expand Down Expand Up @@ -32,7 +31,7 @@ export default async function OverviewPage({
<div className="space-y-0">
{h.description ? (
<Section title="About">
<p className="max-w-2xl text-sm leading-relaxed whitespace-pre-wrap text-muted-foreground">
<p className="max-w-[66ch] text-base leading-relaxed whitespace-pre-wrap text-foreground/85">
{h.description}
</p>
</Section>
Expand All @@ -46,26 +45,7 @@ export default async function OverviewPage({

{h.tracks.length > 0 ? (
<Section title="Tracks & prizes" count={h.tracks.length}>
<ul className="grid gap-3 sm:grid-cols-2">
{h.tracks.map((t) => (
<li key={t.name} className="rounded-xl border bg-card p-4">
<div className="flex items-start justify-between gap-3">
<h3 className="text-sm font-semibold text-balance">{t.name}</h3>
{t.prize ? (
<span className="inline-flex shrink-0 items-center gap-1 rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary">
<Trophy className="size-3" />
{t.prize}
</span>
) : null}
</div>
{t.criteria ? (
<p className="mt-1.5 text-sm leading-relaxed text-muted-foreground">
{t.criteria}
</p>
) : null}
</li>
))}
</ul>
<TrackList tracks={h.tracks} showCriteria />
</Section>
) : null}

Expand Down
6 changes: 5 additions & 1 deletion app/hackathons/[slug]/sub-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ export function SubNav({
}

return (
<nav className="mt-7 flex gap-1 overflow-x-auto">
// `overflow-y-hidden` is load-bearing. `overflow-x: auto` alone computes the other
// axis to `auto` as well, and the tabs' `-mb-px` overlap leaves exactly one pixel of
// vertical overflow — enough for Chrome to hang a full vertical scrollbar off the
// right of the tab strip.
<nav className="mt-7 flex gap-1 overflow-x-auto overflow-y-hidden">
{visible.map((tab) => {
const href = tab.segment ? `${base}/${tab.segment}` : base;
const active = pathname === href;
Expand Down
4 changes: 2 additions & 2 deletions app/hackathons/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default async function HackathonsPage() {
return (
<>
<SiteHeader />
<main className="mx-auto w-full max-w-6xl px-5 py-10">
<main className="mx-auto w-full max-w-6xl px-5 py-10 2xl:max-w-7xl">
<header className="max-w-2xl">
<h1 className="font-heading text-3xl tracking-tight text-balance">Hackathons</h1>
<p className="mt-2 text-sm leading-relaxed text-muted-foreground">
Expand All @@ -33,7 +33,7 @@ export default async function HackathonsPage() {
</Empty>
) : items.length === 0 ? (
<Empty>
Nothing learned yet. Open <Code>Teach it</Code> and give the agent a hackathon URL.
Nothing learned yet. Open <Code>Research</Code> and give the agent a hackathon URL.
</Empty>
) : (
<div className="mt-8 grid gap-4 sm:grid-cols-2">
Expand Down
33 changes: 13 additions & 20 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
import type { Metadata } from "next"
import { Geist_Mono, DM_Sans, Noto_Serif } from "next/font/google"
import { Geist, Geist_Mono } from "next/font/google"

import "./globals.css"
import { ThemeProvider } from "@/components/theme-provider"
import { cn } from "@/lib/utils"

/**
* One sans, one mono.
*
* `--font-heading` is not a second family any more — globals.css aliases it to the
* sans and gives headings weight and tracking in `@layer base`, so every existing
* `font-heading` className keeps working and headings are differentiated by shape
* rather than by typeface.
*/
const fontSans = Geist({ subsets: ["latin"], variable: "--font-sans" })
const fontMono = Geist_Mono({ subsets: ["latin"], variable: "--font-mono" })

/** `template` means pages set only their own name — the brand is owned here. */
export const metadata: Metadata = {
title: {
Expand All @@ -15,18 +26,6 @@ export const metadata: Metadata = {
"Learns with you at one hackathon. Builds with you at the next. Graft reads each stack from its own documentation, remembers it, and wires it into your repository behind a pull request you approve.",
}

const notoSerifHeading = Noto_Serif({
subsets: ["latin"],
variable: "--font-heading",
})

const dmSans = DM_Sans({ subsets: ["latin"], variable: "--font-sans" })

const fontMono = Geist_Mono({
subsets: ["latin"],
variable: "--font-mono",
})

export default function RootLayout({
children,
}: Readonly<{
Expand All @@ -36,13 +35,7 @@ export default function RootLayout({
<html
lang="en"
suppressHydrationWarning
className={cn(
"antialiased",
fontMono.variable,
"font-sans",
dmSans.variable,
notoSerifHeading.variable
)}
className={cn("antialiased", fontSans.variable, fontMono.variable, "font-sans")}
>
<body>
<ThemeProvider>{children}</ThemeProvider>
Expand Down
Loading