diff --git a/insta-lab/app/card_writer.py b/insta-lab/app/card_writer.py index a763e5f..b8e3e7c 100644 --- a/insta-lab/app/card_writer.py +++ b/insta-lab/app/card_writer.py @@ -35,6 +35,13 @@ DEFAULT_PROMPT = """너는 인스타그램 카드 뉴스 카피라이터다. "suggested_caption": "<인스타 캡션 본문>", "hashtags": ["#태그1", "#태그2", ...] }} + +[글자수 제약 — 카드 디자인 박스에 맞게 반드시 준수] +- cover_copy.headline: 22자 이내 +- body_copies[].headline: 26자 이내 +- body_copies[].body: 120자 이내 (2~4문장) +- cta_copy.headline: 22자 이내 +초과하면 잘리므로 간결하고 임팩트 있게 작성한다. """ diff --git a/insta-lab/app/test_card_writer_prompt.py b/insta-lab/app/test_card_writer_prompt.py new file mode 100644 index 0000000..0ed70b6 --- /dev/null +++ b/insta-lab/app/test_card_writer_prompt.py @@ -0,0 +1,9 @@ +from app import card_writer + + +def test_default_prompt_has_length_guidance(): + p = card_writer.DEFAULT_PROMPT + # 글자수 가이드가 프롬프트에 포함됐는지 + assert "22자" in p and "120자" in p + # 포맷 placeholder는 유지 + assert "{category}" in p and "{keyword}" in p and "{articles}" in p