Why this matters
Improves readability and allows independent edits and caching.
Store long static templates/prompts in files and load them at runtime; avoid embedding huge multi-line strings in code.
Improves readability and allows independent edits and caching.
Side-by-side examples engineers can pattern-match during review.
PROMPT = """very long template ..."""from importlib import resources
PROMPT = resources.files('pkg').joinpath('prompt.txt').read_text(encoding='utf-8')HTML = """... 500 lines ..."""HTML = Path('template.html').read_text()From the same buckets as this rule.