# CastPrep

> I built CastPrep for my own CS2 broadcasts. Its resumable research agents produce cited matchup packs and fail honestly when the evidence is incomplete.

- **Role:** Creator & Full-Stack AI Engineer
- **Category:** Personal project
- **Status:** Used in broadcast preparation
- **Human-readable case study:** https://lutherminshull.com/projects/castprep

## Context

Before a Counter-Strike broadcast, I was piecing together tournament history, team form, lineups and storylines from disconnected notes. CastPrep turns that research into one visual rundown that I can use on air.

## Luther's role

- Designed and built the product independently around my real broadcast preparation.
- Defined the research contract, source hierarchy, completion rules and presentation of progressively generated material.
- Built the authentication, persistence, agent execution and user interface as one integrated product.
- Strengthened the system when early runs exposed gaps between citation quantity, source quality and reliable historical conclusions.

## What Luther built

- Structured matchup and event research spanning tournament context, head-to-head history, recent form, complete lineups and player profiles.
- Long-running Codex research decoupled from request lifetimes, with persisted events and resumable server-sent streams.
- Progressive section persistence so useful research remains available even when a later stage fails.
- Completion gates requiring distinct five-versus-five starter coverage, with repair turns for incomplete or stale research.
- Canonical series and map results with direct source provenance and explicit fallback rules when preferred data is unavailable.
- Per-user authentication and isolated Codex account state with allowance-aware run controls.

## How it works

- Next.js and Postgres application using Drizzle, Better Auth and a long-lived Codex app-server integration.
- Agent tools persist narrowly scoped sections and citations instead of treating a large model response as an indivisible document.
- Research runs continue on the same agent thread until explicit content requirements pass or the run fails honestly.
- Historical results are normalized and reused across later research while retaining source identity and provenance.
- Deployment design accounts for filesystem-backed per-user authentication and durable single-worker ownership.

## Outcomes

- Turned my own preparation process into a repeatable product, not an AI demo looking for a use case.
- Produced broadcast-ready material that I used to prepare for Counter-Strike coverage.
- Made incomplete research, conflicting history and weak provenance visible product states instead of silently presenting them as success.

## Technologies

TypeScript, React, Next.js, PostgreSQL, Drizzle, Better Auth, Codex, Docker

## Contact

- [Discuss an opportunity](https://cal.com/lutherminshull)
- [Email Luther](mailto:luther@lutherminshull.com)
- [Return to the portfolio overview](https://lutherminshull.com/index.md)

## Scope note

This case study covers Luther's own contribution and omits private repository data, credentials and private user information.
