Generate notes & Directors Report
Who does this: FS Preparer · Senior Accountant · Platform Admin When: Statements are generated, every mandatory disclosure rule is answered, and you want the notes + Directors Report. Result:
FsNoterows populated for every mandatory note + every dynamic note triggered by the TB. Engagement transitions toNOTES_COMPLETE.
This is one Claude Sonnet call — single, consolidated, 16K-token by design. The LLM receives the generated statements, the disclosure responses, the verbatim mandatory policy texts, and the engagement metadata in one prompt. Output is a structured {notes, directors_report} JSON.
Before you start
- [ ] Engagement at
STATEMENTS_GENERATEDandis_balanced = true. - [ ] Every triggered mandatory rule answered (the handler refuses otherwise).
- [ ] Anthropic API key configured in the worker.
- [ ] You hold
GENERATE_NOTES.
Steps
- Open the engagement → Notes tab.
- Click Generate notes.
- The handler enqueues
generate-notes(background). The UI shows a polling indicator. - After ~20–45 seconds the notes table populates with mandatory + dynamic notes. The status badge moves to
NOTES_COMPLETE.
How to know it worked
- The Notes tab lists at minimum:
directors_report,note_general,note_basis,note_policies, plus dynamic notes per TB content (note_ppe,note_trade_receivables,note_revenue, etc.). - Open
note_policies. The income-tax / employee-benefits / provisions paragraphs match the constitution Markdown files verbatim. - Open
directors_report. The Financial Results table appears at the right place (it is post-processed in deterministically, not produced by the LLM). - The activity log shows
fs.notes.generatedwith token counts and the model id.
Common situations
| If you see… | It means… | What to do |
|---|---|---|
Status moved to NOTES_ERROR | Claude call failed, returned malformed JSON, or hit a schema mismatch | Open the failure record (model id, request id, error class). Retry if transient. See Notes error |
directors_report body is empty / placeholder text only | LLM didn't pick up the engagement metadata or the disclosure responses | Verify DISC-020 (Directors / Auditors) is answered. Regenerate |
| Mandatory policy text appears paraphrased | LLM paraphrased the verbatim block despite instructions | The DOCX export will refuse. Regenerate. If recurring, escalate |
A dynamic note is missing for a note_trigger taxonomy key | LLM returned partial output | Regenerate. If recurring, check the disclosure interrogation completeness |
Two parallel Generate notes calls | Second is rejected (409 Conflict) | Wait for the first to finish; or check Worker logs |
Regenerate
You can regenerate notes any time the engagement is at NOTES_COMPLETE or NOTES_ERROR. Each regeneration replaces the FsNote rows; the activity log captures both attempts.
CAUTION
If the client has already signed off on the engagement and you regenerate, you have invalidated the signed artifact. The audit trail captures the timeline, but communicate the regeneration to the client and re-send the portal link.