---
estimated_steps: 8
estimated_files: 2
skills_used: []
---

# T03: Wire post-processing + /engine/simplify endpoint

1. Integrate post-processing into /engine/trace pipeline
2. Add output_format parameter routing (svg/dxf/json)
3. Create /engine/simplify endpoint:
   - Accepts SVG file upload + epsilon + output_format
   - Parses SVG, applies RDP simplification, outputs result
   - Same response shape as /engine/trace
4. Update metadata to include all fields: format, path_count, node_count_total, open_paths, warnings, processing_ms
5. Integration tests for all format combinations

## Inputs

- `engine/pipeline/postprocess.py`
- `engine/output/dxf.py`
- `engine/output/json_output.py`

## Expected Output

- `engine/api/routes.py (updated)`

## Verification

cd engine && python -m pytest tests/test_api.py -v
