Stage 4 — backend exports the clarification questions table as either
.xlsx (openpyxl, with priority colour-coded column + free-text answer
column) or .docx (python-docx, grouped by category, RED→AMBER→GREEN
inside each group, with rationale and a labelled answer slot per
question). Both include an opportunity title, client/region header
and a generation timestamp.
Stage 4 — frontend renders the existing clarification list with summary
stats (total / red / amber / green / answered) and two download buttons
that fetch via the authed axios client (so dev bypass + MSAL tokens
behave the same as every other request) then trigger a Blob download.
Buttons are disabled when there are zero clarifications.
Stage 5 — pure frontend (no new endpoints needed; reuses
PUT /clarifications/{id}). Per-question editor with a textarea for the
client's answer, save button (disabled when text is unchanged), and
quick status buttons (Mark answered / Dismiss / Reopen). Stats card
tracks pending / answered / dismissed and a "reds resolved" counter
since RED items are the actual blockers for Stage 6 (Normalize).
Smoke tests:
- Excel: HTTP 200, 7,445 bytes, valid Microsoft Excel 2007+ file.
- Word: HTTP 200, 38,823 bytes, valid OOXML.
- Both render the 15 Versuni clarifications from earlier sessions.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>