# Story 10.0: Epic 10 Overview - Developer Experience and Ergonomics

## Context / Background

fapilog is async-first and production-ready, but its developer experience is behind loguru and structlog. This epic focuses on reducing boilerplate and enabling progressive disclosure: simple defaults for new users, with advanced controls still available.

## Story Status

| Story | Title | Status |
|-------|-------|--------|
| 10.1 | Configuration Presets | ✅ Complete |
| 10.2 | Pretty Console Output | ✅ Complete |
| 10.3 | One-Liner FastAPI Integration | ✅ Complete |
| 10.4 | Human-Readable Config Strings | 📝 Planned |
| 10.5 | Simplified File Rotation API | 📝 Planned |
| 10.6 | Enhanced Default Behaviors | 📝 Planned |
| 10.7 | Fluent Builder API | ✅ Complete |
| 10.8 | Smart Environment Auto-Detection | 📝 Planned |
| 10.9 | DX Documentation Migration Guide | 📝 Planned |

### Builder API Completion (10.22-10.28)

| Story | Title | Status |
|-------|-------|--------|
| 10.22 | Builder API Parity Foundation | ✅ Ready |
| 10.23 | Builder Core Settings Methods | ✅ Ready |
| 10.24 | Builder Cloud Sink Methods | ✅ Ready |
| 10.25 | Builder Filter & Processor Methods | ✅ Ready |
| 10.26 | Builder Advanced Features | ✅ Ready |
| 10.27 | Builder API Parity Enforcement | ✅ Ready |
| 10.28 | Builder API Documentation | ✅ Ready |

### Resource Management (10.29+)

| Story | Title | Status |
|-------|-------|--------|
| 10.29 | Async Logger Instance Caching | ✅ Ready |

## Completed Features Summary

### 10.1 Configuration Presets
- Four built-in presets: `dev`, `production`, `fastapi`, `minimal`
- `preset` parameter in `get_logger()` and `get_async_logger()`
- Location: `src/fapilog/core/presets.py`

### 10.2 Pretty Console Output
- `StdoutPrettySink` for human-readable console output
- ANSI color codes for log levels with TTY auto-detection
- `format` parameter ("json", "pretty", "auto")
- Location: `src/fapilog/plugins/sinks/stdout_pretty.py`

### 10.3 One-Liner FastAPI Integration
- `setup_logging()` returns configured lifespan for FastAPI
- `get_request_logger` dependency for routes
- Automatic middleware registration and logger cleanup
- Location: `src/fapilog/fastapi/setup.py`, `src/fapilog/fastapi/dependencies.py`

## Scope (In / Out)

### In Scope

- Add ergonomics improvements that reduce setup to 1-3 lines for common use cases.
- Keep all changes additive and backwards compatible.
- Deliver a cohesive story set (10.1 to 10.9) aligned to the epic goals.

### Out of Scope

- Breaking changes to the existing Settings API or plugin system.
- Removal of advanced configuration options.
- New external services or cloud dependencies.

## Acceptance Criteria

1. Stories 10.1 through 10.9 are created with clear scope, AC, tasks, and tests.
2. Each story is independently shippable or has explicit dependencies.
3. Success metrics are documented for validation after delivery.
4. No story proposes a breaking change.

## Implementation Notes

- This story maps Epic 10 content into the 10.x story series.
- Assumption: new APIs are optional and do not change default behavior unless explicitly enabled.
- Dependencies: 10.1 presets should land before 10.6 defaults and 10.8 auto-detection.

## Tasks

- [x] Confirm scope and ordering for stories 10.1 to 10.9.
- [x] Implement Story 10.1: Configuration Presets.
- [x] Implement Story 10.2: Pretty Console Output.
- [x] Implement Story 10.3: One-Liner FastAPI Integration.
- [ ] Validate dependency assumptions with maintainers.
- [ ] Add the 10.x stories to any roadmap tracking (if used).

## Tests

- N/A (planning and documentation only).

## Risks / Rollback / Monitoring

- Risk: scope creep due to multiple overlapping APIs.
- Rollback: remove story docs or reprioritize without code impact.
- Monitoring: track adoption metrics (time to first log, setup lines, README conversions).
