---
work_item: {{work_item_id}}
intent: {{intent_id}}
created: {{created}}
mode: validate
checkpoint_1: {{checkpoint_status}}
---

# Design: {{title}}

## Summary

{{summary}}

## Scope

**In Scope:**
{{#each in_scope}}
- {{this}}
{{/each}}

**Out of Scope:**
{{#each out_of_scope}}
- {{this}}
{{/each}}

## Key Decisions

| Decision | Choice | Rationale |
|----------|--------|-----------|
{{#each decisions}}
| {{this.decision}} | {{this.choice}} | {{this.rationale}} |
{{/each}}

## Data Models Affected

{{#if models_created}}
### Creates
{{#each models_created}}
- **{{this.name}}**: {{this.fields}} — {{this.purpose}}
{{/each}}
{{/if}}

{{#if models_modified}}
### Modifies
{{#each models_modified}}
- **{{this.name}}**: {{this.changes}} — {{this.reason}}
{{/each}}
{{/if}}

## Technical Approach

### Architecture

```
{{component_diagram}}
```

{{#if api_changes}}
### API Changes

{{#each api_changes}}
- `{{this.method}} {{this.path}}` — {{this.description}}
{{/each}}
{{/if}}

{{#if database_changes}}
### Database Changes

```sql
{{database_changes}}
```
{{/if}}

{{#if dependencies}}
## Dependencies

{{#each dependencies}}
- {{this}}
{{/each}}
{{/if}}

## Affected Files

| File | Action | Purpose |
|------|--------|---------|
{{#each affected_files}}
| `{{this.path}}` | {{this.action}} | {{this.purpose}} |
{{/each}}

{{#if security_considerations}}
## Security Considerations

{{#each security_considerations}}
- **{{this.concern}}**: {{this.approach}}
{{/each}}
{{/if}}

{{#if integration_points}}
## Integration Points

| System | Type | Purpose |
|--------|------|---------|
{{#each integration_points}}
| {{this.system}} | {{this.type}} | {{this.purpose}} |
{{/each}}
{{/if}}

## Risks & Mitigations

| Risk | Impact | Mitigation |
|------|--------|------------|
{{#each risks}}
| {{this.risk}} | {{this.impact}} | {{this.mitigation}} |
{{/each}}

## Implementation Checklist

{{#each checklist}}
- [ ] {{this}}
{{/each}}

---
*Generated by specs.md - fabriqa.ai FIRE Flow | Checkpoint 1 approved: {{approved_at}}*
