Building a full-stack app with Claude Code and AI agents
Steven Chen describes how he and a partner used Claude Code with custom agents and hooks to build Rally, a location-based social platform, shipping 162 tests and clean git history through automated TDD, code review, and validation workflows.
Score breakdown
Developers using Claude Code can dramatically reduce debugging time and prevent broken commits by configuring extensibility hooks and mandatory agents that enforce TDD, code review, and validation automatically—and can parallelize team development using git worktrees without merge conflicts.
- 01Rally is a location-based social platform where users post activities and others request to join, built over two 2-week sprints.
- 02CLAUDE.md evolved across 9 commits and served as AI instructions (not human documentation), including imports to PRD, architecture docs, and design system.
- 03Three hooks enforced workflow: PreToolUse blocked edits to schema/env files, PostToolUse auto-ran eslint --fix, Stop ran lint/typecheck/tests after every task.
Steven Chen describes building Rally, a location-based social platform where users post activities and others request to join, as a pair project using Claude Code for planning, coding, testing, review, and deployment. The team's key insight was treating CLAUDE.md not as human documentation but as detailed instructions for the AI, evolving it across 9 commits to include imports to their PRD, architecture docs, design system, and product discovery references. Specific import paths like "import Prisma from @/generated/prisma/client NOT @prisma/client" prevented hours of debugging.
They implemented three hooks: PreToolUse blocked edits to schema and environment files, PostToolUse auto-ran eslint --fix after every edit, and Stop ran lint, typecheck, and tests after task completion.
They implemented three hooks: PreToolUse blocked edits to schema and environment files, PostToolUse auto-ran eslint --fix after every edit, and Stop ran lint, typecheck, and tests after task completion. Four agents enforced quality gates: tdd-runner produced red-green-refactor commits with failing tests first; code-reviewer checked TypeScript quality, architecture, design compliance, and security; pr-validator verified lint, typecheck, tests, and generated manual testing checklists; security-reviewer checked OWASP Top 10 issues. The tdd-runner generated 162 tests, particularly effective for pure logic like scoring algorithms and validation. For the approve/decline flow, the code-reviewer agent flagged a race condition where simultaneous approvals could exceed capacity, leading them to wrap updates in a Prisma $transaction. In sprint 2, they used git worktrees to work on different features simultaneously without branch switching or conflicts. The Stop hook proved most valuable—it prevented broken code from being committed by making Claude unable to finish tasks in a broken state.
Key facts
- 01Rally is a location-based social platform where users post activities and others request to join, built over two 2-week sprints.
- 02CLAUDE.md evolved across 9 commits and served as AI instructions (not human documentation), including imports to PRD, architecture docs, and design system.
- 03Three hooks enforced workflow: PreToolUse blocked edits to schema/env files, PostToolUse auto-ran eslint --fix, Stop ran lint/typecheck/tests after every task.
- 04Four mandatory agents ensured consistency: tdd-runner (red-green-refactor), code-reviewer (quality/architecture/security), pr-validator (pre-PR checks), security-reviewer (OWASP Top 10).
- 05tdd-runner generated 162 tests, particularly effective for pure logic; TDD was skipped for React components and auth flows in favor of manual and integration testing.