Skip to content

Add pre-approval email notice templates for DC SUN Bucks#262

Draft
jamesmblair wants to merge 14 commits into
mainfrom
feature/dc-pre-approval-email-template
Draft

Add pre-approval email notice templates for DC SUN Bucks#262
jamesmblair wants to merge 14 commits into
mainfrom
feature/dc-pre-approval-email-template

Conversation

@jamesmblair
Copy link
Copy Markdown
Member

Summary

  • Add 9 pre-approval email notice templates: English / Spanish / Amharic × New Card / Existing Card / SNAP-TANF
  • Source docx authored copy committed to email-templates/test-inputs/; HTML generated via pandoc + email-template skill matching the validated PreApprovalNotice.html reference patterns
  • DC SUN Bucks logo inlined as base64 from email-templates/assets/sun-bucks-logo-inline.html
  • verify.mjs enforces 19 structural lint rules on every template (email-client safety, brand colors, table-only layout, base64 integrity)

Test plan

  • All 10 templates pass node email-templates/verify.mjs (19/19 checks)
  • Visual rendering verified at 375px (mobile) and 600px (desktop) — logos, callouts, section ordering, typography
  • Reviewer: spot-check Amharic and Spanish body content for translation fidelity against the docx sources
  • Reviewer: confirm flagged source typo in NewCardEs appeal rights ("calque medida") gets fixed in the source spreadsheet

🤖 Generated with Claude Code

James Blair and others added 14 commits March 30, 2026 12:47
Mobile-first, email-client-safe HTML template for the DC SUN Bucks
pre-approval notice sent to parents/guardians of eligible students.
Includes DC branding, multi-language help links, USDA non-discrimination
statement, and appeal rights sections.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds email-templates/verify.mjs — a zero-dependency Node.js script that
lints HTML email templates for email-safe structure (18 checks across
required structure, CSS safety, brand consistency, and content safety).
Passes against PreApprovalNotice.html; exits non-zero on violations.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ation workflow

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Restrict Bash permissions from broad wildcards (node:*, rm:*) to
specific commands the skill actually needs (verify.mjs, _snapshots/).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Four of nine pre-approval email templates (ExistingCardEn, NewCardEs,
NewCardAm, ExistingCardAm) shipped with corrupted inline base64 logo
images — truncated, duplicated, or subtly miscoded. Visual review caught
the broken renders; the existing 18 structural lint checks did not.

- Replace the corrupted data URIs in those four templates with the
  canonical bytes from email-templates/assets/sun-bucks-logo-inline.html
- Add verify.mjs check #19 (logo-base64-integrity) that compares any
  embedded data URI against the canonical asset and fails on mismatch
- Update the email-template skill workflow with a placeholder + script
  substitution pattern, since pasting >10KB base64 blobs directly into
  Write produces silent corruption

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
*/
function extractCssPropertyValues(source, property) {
// Escape hyphens in the property name for use in a regex.
const escapedProp = property.replace(/-/g, '\\-');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants