feat(examples): flagship research demo — server (slice 1)#311
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @blove's task in 3m 17s —— View job Code Review
Overall this is a well-structured PR that mirrors the Medium — harness/DB ordering hazard
beforeAll(cleanMemoryDb)
const h = await createAgentHarness({ appRoot, route: "/research#agent" })
Fix: either move the harness creation inside cleanMemoryDb()
const h = await createAgentHarness({ appRoot, route: "/research#agent" })
afterAll(async () => { await h.close(); cleanMemoryDb() })Low — path jail has no negative-path test
function assertCorpusPath(path: string): void {
if (!path.startsWith("corpus/") || path.includes("..") || path.startsWith("/")) {
throw new Error(`readDoc only accepts workspace corpus paths, got "${path}"`)
}
}The guard is correct ( Low — redundant eval scorers
contains("[corpus/", { threshold: 1 }),
custom((run) => (run.finalMessage.includes("corpus/") ? 1 : 0), {
name: "cites-source",
threshold: 1,
}),Any message that passes Nit —
|
Design for a standalone examples/research app (server + web UI monorepo, like examples/chat) that dogfoods research workflow, memory candidates, Docker sandbox, subagents, HITL, evals, and deterministic tests. Scaffold slimming and docs-recipe extraction are later slices. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…emplate) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
9fb5ac0 to
031d274
Compare
Summary
Slice 1 of the polished flagship research demo: a new standalone in-repo example
examples/research/server(@dawn-example/research-server), created by promoting the default scaffold templatepackages/devkit/templates/app-researchinto a concrete example that mirrorsexamples/chat/server. The default scaffold template is untouched.This is the first of four planned slices (see design + plan docs in this PR). Later slices add the web UI + no-key demo mode, slim/align the default scaffold, and extract a docs recipe.
What it dogfoods (the demo's point): a research coordinator +
researchersubagent, custom corpus tools (searchCorpus/readDoc) with tool-output offloading, semantic memory with candidate → CLI-approve → recall, planning/todos, skills, HITL permissions (interrupt + resume), an optional Docker execution sandbox, workspace path-jail, evals with an LLM judge, and a deterministic test suite.Determinism: the capability suite and evals run entirely on
aimockfixtures — no API key required. Live/model paths are gated behindOPENAI_API_KEY+--live. The Docker sandbox is explicit but env-gated (DAWN_DEMO_DOCKER_SANDBOX=1) and skips cleanly without Docker.CI wiring: the package is discovered automatically by the
examples/*/*workspace glob (turbobuild/typecheck) plus one line registering its test project invitest.workspace.ts— the same treatmentexamples/chat/servergets.Design:
docs/superpowers/specs/2026-07-06-research-demo-design.mdPlan:
docs/superpowers/plans/2026-07-06-research-demo-slice1-server.mdTest Plan
pnpm --filter @dawn-example/research-server test→ 7 passed | 1 skipped (offline, no key)pnpm --filter @dawn-example/research-server eval→ PASS, mean 1.00 across scorers (offline)pnpm --filter @dawn-example/research-server test:sandbox:docker→ 1 passed (Docker present)pnpm --filter @dawn-example/research-server typecheck/build→ greenpnpm --filter @dawn-example/research-server checkgenerates.dawn/types (gitignored)vitest.workspace.ts) → 7 passedpnpm ci:validateon CI (standard gate for a new workspace package)🤖 Generated with Claude Code