From bb0280274e9b539a195bb78d44cb768d03dfb6e3 Mon Sep 17 00:00:00 2001 From: gahusb Date: Sat, 6 Jun 2026 12:56:21 +0900 Subject: [PATCH] =?UTF-8?q?feat(insta-lab):=20card=5Fwriter=20=ED=94=84?= =?UTF-8?q?=EB=A1=AC=ED=94=84=ED=8A=B8=EC=97=90=20=EA=B8=80=EC=9E=90?= =?UTF-8?q?=EC=88=98=20=EA=B0=80=EC=9D=B4=EB=93=9C(=EC=98=A4=EB=B2=84?= =?UTF-8?q?=ED=94=8C=EB=A1=9C=EC=9A=B0=20=EC=98=88=EB=B0=A9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- insta-lab/app/card_writer.py | 7 +++++++ insta-lab/app/test_card_writer_prompt.py | 9 +++++++++ 2 files changed, 16 insertions(+) create mode 100644 insta-lab/app/test_card_writer_prompt.py 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