export interface TemplateValidationResult { templateId: string; valid: boolean; errors: string[]; warnings: string[]; } /** * Enforce the `statutory_compliance_representation` contract against the rendered * template text. This is the load-bearing guard that the decided `confirm=` * behavior actually shipped — three checks per field: * * 1. The clause renders the highlighted `[CONFIRM before signing: …; see ]` * bracket gated on `{IF !}`. Presence of a bare `{IF !field}` is NOT * sufficient (the legacy `when=field omitted="…"` mechanism also emits one), * so the negated conditional MUST be immediately followed by the literal * bracket. * 2. The URL and note inside the bracket EQUAL the field's metadata * `authority_url` / `confirm_note`. These now have a single authoring source * (metadata.yaml — the directive no longer restates them), so this is no * longer an author-drift check between two hand-edited files. It is an * integrity check between metadata.yaml and the COMMITTED rendered artifact: * `validateTemplate` scans the committed `template.docx`, so a stale DOCX (or * `.template.generated.json`) — e.g. a metadata edit shipped without * regenerating — is caught here, as are hand-authored JSON templates that * carry `confirm`/`authority_url`/`confirm_note` directly. Equality, not * substring: a value with an extra suffix must fail. * 3. The clause body always renders — i.e. the affirmative `{IF }` form * is absent. A `confirm=` clause only ever emits `{IF !}`; a legacy * `when=` clause wraps its body in `{IF }`. Asserting the * affirmative form is absent proves the body is unconditional and closes the * spoof where an `omitted="[CONFIRM …]"` string mimics the bracket. */ export declare function checkStatutoryComplianceReps(searchableText: string, fields: { name: string; statutory_compliance_representation?: boolean; authority_url?: string; confirm_note?: string; }[], errors: string[]): void; /** * Validate that a template's metadata fields match the placeholders in its DOCX file. */ export declare function validateTemplate(templateDir: string, templateId: string): TemplateValidationResult; //# sourceMappingURL=template.d.ts.map