docs(guides): add TDD workflow + restructure adding-a-feature for TDD order
New: docs/guides/tdd-workflow.md — red-green-refactor cycle, AAA, mocking decision tree, coverage targets, factory + contract usage. Restructured: adding-a-feature.md interleaves tests with implementation; TDD order is required, not optional. testing-strategy.md cross-links the new guide. AGENTS.md and CLAUDE.md surface both. Spec: §7 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
11
CLAUDE.md
11
CLAUDE.md
@@ -11,6 +11,17 @@ pnpm turbo boundaries # Validate workspace dependency graph
|
||||
docker compose up -d # Start PostgreSQL
|
||||
```
|
||||
|
||||
## TDD
|
||||
|
||||
```bash
|
||||
pnpm test --watch --filter @repo/<feature> # watch one feature
|
||||
pnpm test -- --coverage # full run with coverage
|
||||
pnpm test:stories # Storybook smoke tests
|
||||
pnpm test:e2e # Playwright e2e
|
||||
```
|
||||
|
||||
See `docs/guides/tdd-workflow.md` for the full cycle.
|
||||
|
||||
## Project Overview
|
||||
|
||||
Turborepo + pnpm monorepo organized by vertical features. Each feature (`auth`, `blog`, `media`, `marketing-pages`, `navigation`) owns its Clean Architecture layers. Core packages (`core-shared`, `core-cms`, `core-api`, `core-trpc`, `core-ui`) provide foundation. Two tooling packages (`core-eslint`, `core-typescript`) provide shared configs. Workspace boundaries are enforced by ESLint (lint-time) and Turborepo (build-graph time). Supports Next.js and TanStack Start as frontend frameworks, Payload CMS for content management, and comprehensive agent-optimized documentation.
|
||||
|
||||
Reference in New Issue
Block a user