# Claude Code Fundamentals: Features + Tests Discipline

Category: Context & Config
Stack: Claude Code, MCP, Plan Mode, Ask User Question

## Overview
Turning vague feature requests into shippable code through Plan Mode, test-first specifications, and clarifying interview loops.

## The Problem
Jumping directly into code generation from a short prompt causes agents to guess architectural trade-offs and build the wrong feature.

## Production Rule
Force the agent into Plan Mode before code generation. Use clarifying questions to pin down edge cases, interfaces, and constraints before touching files.

## Code / Specification
File: `features_and_tests_spec.md`

```developer workflow
Feature Specification Protocol:
1. Clarification: Ask 2-3 specific questions regarding UI/UX and database constraints.
2. Plan: Draft an implementation plan covering files to create, edit, and test.
3. Tests First: Write failing pytest / vitest cases capturing expected behavior.
4. Implementation: Write minimal code required to pass the test suite.
```
