Guidelines and constraints for writing or modifying reqm exporters. Use when touching any file in reqm/export/ or adding a new exporter to the project.
Load this skill before touching anything in reqm/export/.
AbstractExporter from reqm/export/base.py — never subclass anything else.cli.py.openpyxl only — no other Excel library.AbstractExporter unless a requirement explicitly calls for it.Read reqm/export/base.py to confirm the current AbstractExporter interface before writing a single line.
Create reqm/export/<name>.py. Implement:
name: str — CLI subcommand name (class attribute)description: str — one-line description (class attribute)export(requirements, folders, output) — the only required methodAdd to pyproject.toml under [project.entry-points."reqm.exporters"]:
<name> = "reqm.export.<name>:<ClassName>"
Write tests/test_export_<name>.py. Cover at minimum:
Run: pytest tests/test_export_<name>.py
Add the exporter to docs/exporters.md.
| Setting | Value |
|---|---|
| Header fill | Bold, light blue #BDD7EE |
| Freeze pane | Row immediately below the header |
| Auto-filter | On every sheet |
| Column widths | Set explicitly — never rely on defaults |
| Tab colour | Must be set on every sheet |
| Merged cells | Cover/summary areas only — not data rows |
AbstractExporter and nothing elsename and description set as class attributesexport() implemented with a Google-style docstringpyproject.tomlpytest tests/test_export_<name>.py passesdocs/exporters.md