Skip to content

Mandatory policy text doesn't appear in note_policies ​

You inspected note_policies after Generate notes and the verbatim Income-Tax / Employee-Benefits / Provisions paragraph is missing or paraphrased.

What this means ​

The notes generator is instructed to insert the verbatim constitution text. The constitution lives at:

  • packages/financial-statements/constitution/mandatory_policies/income_tax.md
  • packages/financial-statements/constitution/mandatory_policies/employee_benefits.md
  • packages/financial-statements/constitution/mandatory_policies/provisions.md

If the text in the note differs from the constitution by anything more than whitespace normalisation, the DOCX export will refuse with mandatory_policy_mismatch.

Causes ​

  1. Claude paraphrased. The LLM occasionally restates the verbatim block despite the instruction. The fix is regenerate.
  2. Constitution file changed. A PR updated the constitution; the prior note was generated against the old text. The fix is regenerate.
  3. Loader cache. In long-lived dev sessions, the constitution is cached on first read. If you edited a constitution file and didn't restart the worker, the worker is using the stale cache. Restart the worker or call clearPolicyCache() in the loader.

Diagnose ​

Compare the note text to the constitution:

sql
SELECT content FROM fs_notes
  WHERE engagement_id = '<engagementId>' AND note_key = 'note_policies';
bash
cat packages/financial-statements/constitution/mandatory_policies/income_tax.md

If the body of the relevant paragraph block in the note differs from the markdown file, regenerate.

Fix ​

  1. Open the Notes tab.
  2. Click Regenerate notes.
  3. Spot-check note_policies again. If the same paraphrase appears, file an issue with the failure record and the engagement id.

Why we don't auto-replace ​

The renderer asserts at export time but does not rewrite the note's stored body. A reviewer must be able to see what the LLM produced before it lands in a DOCX — silent rewrites would hide drift.

Internal use only — BreezyCorp