# spec.md Template for AI Coding

```md
# Feature Spec: <feature name>

Owner:
Status: Draft | Ready for review | Approved
Last updated:

## Context
- What system, user, or workflow is changing?
- What is the current behavior?
- Why does this need to change now?

## Goal
- What behavior should exist after this change ships?

## Non-goals
- What should this work explicitly not change?
- Which adjacent features, refactors, or policy decisions are out of scope?

## Requirements
1. The system must...
2. The user must be able to...
3. Existing behavior must continue to...

## Edge cases
- Empty or missing input:
- Permission or role mismatch:
- Retry, duplicate request, or idempotency:
- Legacy client or old data state:

## Constraints
- Allowed files or services:
- Public API or database contracts:
- Performance, security, privacy, or rollout constraints:

## Open questions
- [ ] Question:
  Owner:
  Required before:
```

