UPL-proof document templates + reliable bounce sync
Templates (22 files): - Replace "Reviewed By" with "Document prepared by" + consulting disclaimer - Add "not a law firm / not legal advice" footer to all CPNI, CALEA, RMD docs - Change "on behalf of" to "at the direction of" in discontinuance letter - Reframe RMD penalty language as client acknowledgment Bounce sync: - New listmonk-bounce-sync.py replaces unreliable bash tail watcher - Scans full mail.log, matches QIDs to campaign senders, inserts directly into Listmonk DB with proper subscriber_id foreign keys - Idempotent, runs via cron every 5 minutes Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d39e10485f
commit
ba2f6eb667
23 changed files with 367 additions and 17 deletions
|
|
@ -133,7 +133,7 @@ def add_pw_footer(doc, entity_name: str = "") -> None:
|
|||
p.alignment = WD_ALIGN_PARAGRAPH.CENTER
|
||||
|
||||
# "Prepared by Performance West Inc." text
|
||||
run = p.add_run("Prepared by Performance West Inc.")
|
||||
run = p.add_run("Prepared by Performance West Inc., a regulatory compliance consulting firm")
|
||||
run.font.size = PW.FOOTER_SIZE
|
||||
run.font.color.rgb = PW.LIGHT_GRAY
|
||||
run.font.name = PW.FONT_FAMILY
|
||||
|
|
|
|||
|
|
@ -203,7 +203,9 @@ def generate_calea_audio_bridge(
|
|||
_body(doc, f"{signatory_title}, {entity_name}")
|
||||
_body(doc, f"Effective Date: {effective}")
|
||||
if frn: _body(doc, f"FRN: {frn}")
|
||||
_body(doc, f"Reviewed By: {reviewer_name}, {reviewer_company}")
|
||||
_body(doc, f"Document prepared by {reviewer_name}, {reviewer_company}")
|
||||
_body(doc, "Performance West Inc. is a regulatory compliance consulting firm, not a law firm. "
|
||||
"This document does not constitute legal advice or legal representation.")
|
||||
_body(doc, f"Next Review Date: {next_review}")
|
||||
|
||||
out = Path(output_path)
|
||||
|
|
|
|||
|
|
@ -240,7 +240,9 @@ def generate_calea_clec_ss7(
|
|||
_body(doc, f"Effective Date: {effective}")
|
||||
if frn:
|
||||
_body(doc, f"FRN: {frn}")
|
||||
_body(doc, f"Reviewed By: {reviewer_name}, {reviewer_company}")
|
||||
_body(doc, f"Document prepared by {reviewer_name}, {reviewer_company}")
|
||||
_body(doc, "Performance West Inc. is a regulatory compliance consulting firm, not a law firm. "
|
||||
"This document does not constitute legal advice or legal representation.")
|
||||
_body(doc, f"Next Review Date: {next_review}")
|
||||
|
||||
out = Path(output_path)
|
||||
|
|
|
|||
|
|
@ -209,7 +209,9 @@ def generate_calea_ixc_ss7(
|
|||
_body(doc, f"{signatory_title}, {entity_name}")
|
||||
_body(doc, f"Effective Date: {effective}")
|
||||
if frn: _body(doc, f"FRN: {frn}")
|
||||
_body(doc, f"Reviewed By: {reviewer_name}, {reviewer_company}")
|
||||
_body(doc, f"Document prepared by {reviewer_name}, {reviewer_company}")
|
||||
_body(doc, "Performance West Inc. is a regulatory compliance consulting firm, not a law firm. "
|
||||
"This document does not constitute legal advice or legal representation.")
|
||||
_body(doc, f"Next Review Date: {next_review}")
|
||||
|
||||
out = Path(output_path)
|
||||
|
|
|
|||
|
|
@ -210,7 +210,9 @@ def generate_calea_satellite(
|
|||
_body(doc, f"{signatory_title}, {entity_name}")
|
||||
_body(doc, f"Effective Date: {effective}")
|
||||
if frn: _body(doc, f"FRN: {frn}")
|
||||
_body(doc, f"Reviewed By: {reviewer_name}, {reviewer_company}")
|
||||
_body(doc, f"Document prepared by {reviewer_name}, {reviewer_company}")
|
||||
_body(doc, "Performance West Inc. is a regulatory compliance consulting firm, not a law firm. "
|
||||
"This document does not constitute legal advice or legal representation.")
|
||||
_body(doc, f"Next Review Date: {next_review}")
|
||||
|
||||
out = Path(output_path)
|
||||
|
|
|
|||
|
|
@ -298,7 +298,9 @@ def generate_calea_ssi_plan(
|
|||
_body(doc, f"Effective Date: {effective}")
|
||||
if frn:
|
||||
_body(doc, f"FRN: {frn}")
|
||||
_body(doc, f"Reviewed By: {reviewer_name}, {reviewer_company}")
|
||||
_body(doc, f"Document prepared by {reviewer_name}, {reviewer_company}")
|
||||
_body(doc, "Performance West Inc. is a regulatory compliance consulting firm, not a law firm. "
|
||||
"This document does not constitute legal advice or legal representation.")
|
||||
_body(doc, f"Next Review Date: {next_review}")
|
||||
|
||||
out = Path(output_path)
|
||||
|
|
|
|||
|
|
@ -221,7 +221,9 @@ def generate_calea_wireless(
|
|||
_body(doc, f"{signatory_title}, {entity_name}")
|
||||
_body(doc, f"Effective Date: {effective}")
|
||||
if frn: _body(doc, f"FRN: {frn}")
|
||||
_body(doc, f"Reviewed By: {reviewer_name}, {reviewer_company}")
|
||||
_body(doc, f"Document prepared by {reviewer_name}, {reviewer_company}")
|
||||
_body(doc, "Performance West Inc. is a regulatory compliance consulting firm, not a law firm. "
|
||||
"This document does not constitute legal advice or legal representation.")
|
||||
_body(doc, f"Next Review Date: {next_review}")
|
||||
|
||||
out = Path(output_path)
|
||||
|
|
|
|||
|
|
@ -219,7 +219,9 @@ def generate_calea_wireless_mvno(
|
|||
_body(doc, f"{signatory_title}, {entity_name}")
|
||||
_body(doc, f"Effective Date: {effective}")
|
||||
if frn: _body(doc, f"FRN: {frn}")
|
||||
_body(doc, f"Reviewed By: {reviewer_name}, {reviewer_company}")
|
||||
_body(doc, f"Document prepared by {reviewer_name}, {reviewer_company}")
|
||||
_body(doc, "Performance West Inc. is a regulatory compliance consulting firm, not a law firm. "
|
||||
"This document does not constitute legal advice or legal representation.")
|
||||
_body(doc, f"Next Review Date: {next_review}")
|
||||
|
||||
out = Path(output_path)
|
||||
|
|
|
|||
|
|
@ -256,6 +256,18 @@ def generate_cpni_audio_bridge(
|
|||
dp = doc.add_paragraph(); dp.add_run(f"Date: {today}").font.size = Pt(10)
|
||||
_sp(dp, after=2)
|
||||
|
||||
# ── Consulting Disclosure ─────────────────────────────────────
|
||||
doc.add_paragraph() # spacer
|
||||
disc_p = doc.add_paragraph()
|
||||
disc_r = disc_p.add_run(
|
||||
"Document prepared with assistance from Performance West Inc., "
|
||||
"a regulatory compliance consulting firm. Performance West Inc. is not a law firm "
|
||||
"and this document does not constitute legal advice or legal representation."
|
||||
)
|
||||
disc_r.font.size = Pt(7)
|
||||
disc_r.font.color.rgb = RGBColor(0x99, 0x99, 0x99)
|
||||
disc_r.font.italic = True
|
||||
|
||||
out = Path(output_path)
|
||||
out.parent.mkdir(parents=True, exist_ok=True)
|
||||
doc.save(str(out))
|
||||
|
|
|
|||
|
|
@ -580,6 +580,18 @@ def generate_cpni_cert_letter(
|
|||
sig_email_p.add_run(f"Email: {contact_email}").font.size = Pt(10)
|
||||
_set_spacing(sig_email_p, after_pt=2)
|
||||
|
||||
# ── Consulting Disclosure ─────────────────────────────────────
|
||||
doc.add_paragraph() # spacer
|
||||
disc_p = doc.add_paragraph()
|
||||
disc_r = disc_p.add_run(
|
||||
"Document prepared with assistance from Performance West Inc., "
|
||||
"a regulatory compliance consulting firm. Performance West Inc. is not a law firm "
|
||||
"and this document does not constitute legal advice or legal representation."
|
||||
)
|
||||
disc_r.font.size = Pt(7)
|
||||
disc_r.font.color.rgb = RGBColor(0x99, 0x99, 0x99)
|
||||
disc_r.font.italic = True
|
||||
|
||||
# ── Save ──────────────────────────────────────────────────────
|
||||
output = Path(output_path)
|
||||
output.parent.mkdir(parents=True, exist_ok=True)
|
||||
|
|
|
|||
|
|
@ -359,6 +359,18 @@ def generate_cpni_clec(
|
|||
dp.add_run(f"Date: {today}").font.size = Pt(10)
|
||||
_set_spacing(dp, after_pt=2)
|
||||
|
||||
# ── Consulting Disclosure ─────────────────────────────────────
|
||||
doc.add_paragraph() # spacer
|
||||
disc_p = doc.add_paragraph()
|
||||
disc_r = disc_p.add_run(
|
||||
"Document prepared with assistance from Performance West Inc., "
|
||||
"a regulatory compliance consulting firm. Performance West Inc. is not a law firm "
|
||||
"and this document does not constitute legal advice or legal representation."
|
||||
)
|
||||
disc_r.font.size = Pt(7)
|
||||
disc_r.font.color.rgb = RGBColor(0x99, 0x99, 0x99)
|
||||
disc_r.font.italic = True
|
||||
|
||||
out = Path(output_path)
|
||||
out.parent.mkdir(parents=True, exist_ok=True)
|
||||
doc.save(str(out))
|
||||
|
|
|
|||
|
|
@ -300,6 +300,18 @@ def generate_cpni_clec_reseller(
|
|||
dp.add_run(f"Date: {today}").font.size = Pt(10)
|
||||
_set_spacing(dp, after_pt=2)
|
||||
|
||||
# ── Consulting Disclosure ─────────────────────────────────────
|
||||
doc.add_paragraph() # spacer
|
||||
disc_p = doc.add_paragraph()
|
||||
disc_r = disc_p.add_run(
|
||||
"Document prepared with assistance from Performance West Inc., "
|
||||
"a regulatory compliance consulting firm. Performance West Inc. is not a law firm "
|
||||
"and this document does not constitute legal advice or legal representation."
|
||||
)
|
||||
disc_r.font.size = Pt(7)
|
||||
disc_r.font.color.rgb = RGBColor(0x99, 0x99, 0x99)
|
||||
disc_r.font.italic = True
|
||||
|
||||
out = Path(output_path)
|
||||
out.parent.mkdir(parents=True, exist_ok=True)
|
||||
doc.save(str(out))
|
||||
|
|
|
|||
|
|
@ -282,6 +282,18 @@ def generate_cpni_ixc(
|
|||
dp = doc.add_paragraph(); dp.add_run(f"Date: {today}").font.size = Pt(10)
|
||||
_sp(dp, after=2)
|
||||
|
||||
# ── Consulting Disclosure ─────────────────────────────────────
|
||||
doc.add_paragraph() # spacer
|
||||
disc_p = doc.add_paragraph()
|
||||
disc_r = disc_p.add_run(
|
||||
"Document prepared with assistance from Performance West Inc., "
|
||||
"a regulatory compliance consulting firm. Performance West Inc. is not a law firm "
|
||||
"and this document does not constitute legal advice or legal representation."
|
||||
)
|
||||
disc_r.font.size = Pt(7)
|
||||
disc_r.font.color.rgb = RGBColor(0x99, 0x99, 0x99)
|
||||
disc_r.font.italic = True
|
||||
|
||||
out = Path(output_path)
|
||||
out.parent.mkdir(parents=True, exist_ok=True)
|
||||
doc.save(str(out))
|
||||
|
|
|
|||
|
|
@ -263,6 +263,18 @@ def generate_cpni_ixc_reseller(
|
|||
dp = doc.add_paragraph(); dp.add_run(f"Date: {today}").font.size = Pt(10)
|
||||
_sp(dp, after=2)
|
||||
|
||||
# ── Consulting Disclosure ─────────────────────────────────────
|
||||
doc.add_paragraph() # spacer
|
||||
disc_p = doc.add_paragraph()
|
||||
disc_r = disc_p.add_run(
|
||||
"Document prepared with assistance from Performance West Inc., "
|
||||
"a regulatory compliance consulting firm. Performance West Inc. is not a law firm "
|
||||
"and this document does not constitute legal advice or legal representation."
|
||||
)
|
||||
disc_r.font.size = Pt(7)
|
||||
disc_r.font.color.rgb = RGBColor(0x99, 0x99, 0x99)
|
||||
disc_r.font.italic = True
|
||||
|
||||
out = Path(output_path)
|
||||
out.parent.mkdir(parents=True, exist_ok=True)
|
||||
doc.save(str(out))
|
||||
|
|
|
|||
|
|
@ -218,6 +218,18 @@ def generate_cpni_private_line(
|
|||
dp = doc.add_paragraph(); dp.add_run(f"Date: {today}").font.size = Pt(10)
|
||||
_sp(dp, after=2)
|
||||
|
||||
# ── Consulting Disclosure ─────────────────────────────────────
|
||||
doc.add_paragraph() # spacer
|
||||
disc_p = doc.add_paragraph()
|
||||
disc_r = disc_p.add_run(
|
||||
"Document prepared with assistance from Performance West Inc., "
|
||||
"a regulatory compliance consulting firm. Performance West Inc. is not a law firm "
|
||||
"and this document does not constitute legal advice or legal representation."
|
||||
)
|
||||
disc_r.font.size = Pt(7)
|
||||
disc_r.font.color.rgb = RGBColor(0x99, 0x99, 0x99)
|
||||
disc_r.font.italic = True
|
||||
|
||||
out = Path(output_path)
|
||||
out.parent.mkdir(parents=True, exist_ok=True)
|
||||
doc.save(str(out))
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ Canonical section outline:
|
|||
9. Enforcement and Penalties
|
||||
10. Contact Information
|
||||
|
||||
Footer: Effective Date / Signatory / Reviewed By / Next Review Date.
|
||||
Footer: Effective Date / Signatory / Prepared By / Next Review Date.
|
||||
|
||||
Usage:
|
||||
from scripts.document_gen.templates.cpni_procedure_statement_generator import (
|
||||
|
|
@ -248,9 +248,23 @@ def generate_cpni_procedure_statement(
|
|||
title_suffix = f", {signatory_title}" if signatory_title else ""
|
||||
_body(doc, f"Signatory: {signatory_name}{title_suffix}, {entity_name}")
|
||||
if reviewer_name:
|
||||
_body(doc, f"Reviewed By: {reviewer_name}, {reviewer_company}")
|
||||
_body(doc, f"Document prepared by {reviewer_name}, {reviewer_company}")
|
||||
_body(doc, "Performance West Inc. is a regulatory compliance consulting firm, not a law firm. "
|
||||
"This document does not constitute legal advice or legal representation.")
|
||||
_body(doc, f"Next Review Date: {next_review}")
|
||||
|
||||
# ── Consulting Disclosure ─────────────────────────────────────
|
||||
doc.add_paragraph() # spacer
|
||||
disc_p = doc.add_paragraph()
|
||||
disc_r = disc_p.add_run(
|
||||
"Document prepared with assistance from Performance West Inc., "
|
||||
"a regulatory compliance consulting firm. Performance West Inc. is not a law firm "
|
||||
"and this document does not constitute legal advice or legal representation."
|
||||
)
|
||||
disc_r.font.size = Pt(7)
|
||||
disc_r.font.color.rgb = RGBColor(0x99, 0x99, 0x99)
|
||||
disc_r.font.italic = True
|
||||
|
||||
out = Path(output_path)
|
||||
out.parent.mkdir(parents=True, exist_ok=True)
|
||||
doc.save(str(out))
|
||||
|
|
|
|||
|
|
@ -265,6 +265,18 @@ def generate_cpni_satellite(
|
|||
dp = doc.add_paragraph(); dp.add_run(f"Date: {today}").font.size = Pt(10)
|
||||
_sp(dp, after=2)
|
||||
|
||||
# ── Consulting Disclosure ─────────────────────────────────────
|
||||
doc.add_paragraph() # spacer
|
||||
disc_p = doc.add_paragraph()
|
||||
disc_r = disc_p.add_run(
|
||||
"Document prepared with assistance from Performance West Inc., "
|
||||
"a regulatory compliance consulting firm. Performance West Inc. is not a law firm "
|
||||
"and this document does not constitute legal advice or legal representation."
|
||||
)
|
||||
disc_r.font.size = Pt(7)
|
||||
disc_r.font.color.rgb = RGBColor(0x99, 0x99, 0x99)
|
||||
disc_r.font.italic = True
|
||||
|
||||
out = Path(output_path)
|
||||
out.parent.mkdir(parents=True, exist_ok=True)
|
||||
doc.save(str(out))
|
||||
|
|
|
|||
|
|
@ -275,6 +275,18 @@ def generate_cpni_wireless(
|
|||
dp = doc.add_paragraph(); dp.add_run(f"Date: {today}").font.size = Pt(10)
|
||||
_sp(dp, after=2)
|
||||
|
||||
# ── Consulting Disclosure ─────────────────────────────────────
|
||||
doc.add_paragraph() # spacer
|
||||
disc_p = doc.add_paragraph()
|
||||
disc_r = disc_p.add_run(
|
||||
"Document prepared with assistance from Performance West Inc., "
|
||||
"a regulatory compliance consulting firm. Performance West Inc. is not a law firm "
|
||||
"and this document does not constitute legal advice or legal representation."
|
||||
)
|
||||
disc_r.font.size = Pt(7)
|
||||
disc_r.font.color.rgb = RGBColor(0x99, 0x99, 0x99)
|
||||
disc_r.font.italic = True
|
||||
|
||||
out = Path(output_path)
|
||||
out.parent.mkdir(parents=True, exist_ok=True)
|
||||
doc.save(str(out))
|
||||
|
|
|
|||
|
|
@ -266,6 +266,18 @@ def generate_cpni_wireless_mvno(
|
|||
dp = doc.add_paragraph(); dp.add_run(f"Date: {today}").font.size = Pt(10)
|
||||
_sp(dp, after=2)
|
||||
|
||||
# ── Consulting Disclosure ─────────────────────────────────────
|
||||
doc.add_paragraph() # spacer
|
||||
disc_p = doc.add_paragraph()
|
||||
disc_r = disc_p.add_run(
|
||||
"Document prepared with assistance from Performance West Inc., "
|
||||
"a regulatory compliance consulting firm. Performance West Inc. is not a law firm "
|
||||
"and this document does not constitute legal advice or legal representation."
|
||||
)
|
||||
disc_r.font.size = Pt(7)
|
||||
disc_r.font.color.rgb = RGBColor(0x99, 0x99, 0x99)
|
||||
disc_r.font.italic = True
|
||||
|
||||
out = Path(output_path)
|
||||
out.parent.mkdir(parents=True, exist_ok=True)
|
||||
doc.save(str(out))
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ def generate_discontinuance_letter(
|
|||
# Paragraph 1: Purpose
|
||||
_add_body(
|
||||
doc,
|
||||
f"On behalf of {entity_name}"
|
||||
f"At the direction of {entity_name}"
|
||||
f"{' (Filer ID: ' + filer_id + ')' if filer_id else ''}"
|
||||
f"{' (FRN: ' + frn + ')' if frn else ''}, "
|
||||
f"this letter serves as a formal request to deactivate the above-referenced "
|
||||
|
|
@ -283,8 +283,8 @@ def generate_discontinuance_letter(
|
|||
_add_body(doc, "", size=Pt(6))
|
||||
_add_body(
|
||||
doc,
|
||||
f"Prepared by Performance West Inc. on behalf of {entity_name}. "
|
||||
f"Generated {today_str}.",
|
||||
f"Document prepared by Performance West Inc., a regulatory compliance consulting firm (not a law firm), "
|
||||
f"at the direction of {entity_name}. Generated {today_str}.",
|
||||
italic=True, size=Pt(8), color=RGBColor(0x99, 0x99, 0x99),
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -556,10 +556,10 @@ def generate_exhibit_a(
|
|||
"Responds promptly to FCC deficiency notices, curing issues within specified timeframes to avoid RMD removal or traffic blocking.",
|
||||
])
|
||||
_add_body(doc, (
|
||||
"Noncompliance risks under the 2025 RMD R&O include a base forfeiture "
|
||||
"of $10,000 for false or inaccurate information and $1,000 per day "
|
||||
"until cured for failure to update RMD information within 10 "
|
||||
"business days of a material change."
|
||||
f"{entity_abbr} acknowledges that under the 2025 RMD R&O, noncompliance "
|
||||
"penalties include a base forfeiture of $10,000 for false or inaccurate "
|
||||
"information and $1,000 per day until cured for failure to update RMD "
|
||||
"information within 10 business days of a material change."
|
||||
))
|
||||
|
||||
# ── 6. Future Enhancements ──
|
||||
|
|
@ -610,6 +610,18 @@ def generate_exhibit_a(
|
|||
_add_body(doc, entity_name)
|
||||
_add_body(doc, f"Date: {today}")
|
||||
|
||||
# ── Consulting Disclosure ─────────────────────────────────────
|
||||
doc.add_paragraph() # spacer
|
||||
disc_p = doc.add_paragraph()
|
||||
disc_r = disc_p.add_run(
|
||||
"Document prepared with assistance from Performance West Inc., "
|
||||
"a regulatory compliance consulting firm. Performance West Inc. is not a law firm "
|
||||
"and this document does not constitute legal advice or legal representation."
|
||||
)
|
||||
disc_r.font.size = Pt(7)
|
||||
disc_r.font.color.rgb = RGBColor(0x99, 0x99, 0x99)
|
||||
disc_r.font.italic = True
|
||||
|
||||
# Save
|
||||
output = Path(output_path)
|
||||
output.parent.mkdir(parents=True, exist_ok=True)
|
||||
|
|
|
|||
|
|
@ -666,6 +666,18 @@ def generate_rmd_letter(
|
|||
italic=True,
|
||||
)
|
||||
|
||||
# ── Consulting Disclosure ─────────────────────────────────────
|
||||
doc.add_paragraph() # spacer
|
||||
disc_p = doc.add_paragraph()
|
||||
disc_r = disc_p.add_run(
|
||||
"Document prepared with assistance from Performance West Inc., "
|
||||
"a regulatory compliance consulting firm. Performance West Inc. is not a law firm "
|
||||
"and this document does not constitute legal advice or legal representation."
|
||||
)
|
||||
disc_r.font.size = Pt(7)
|
||||
disc_r.font.color.rgb = RGBColor(0x99, 0x99, 0x99)
|
||||
disc_r.font.italic = True
|
||||
|
||||
# Save
|
||||
output = Path(output_path)
|
||||
output.parent.mkdir(parents=True, exist_ok=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue