From 2c28cdbf9efda0a5d2d38afa291e7bf1898233aa Mon Sep 17 00:00:00 2001 From: mstfyldz Date: Sun, 9 Aug 2026 22:05:37 +0300 Subject: [PATCH] fix: forbid markdown formatting in AI-generated petition drafts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The draft prompt didn't say anything about output format, so the model would sometimes emit **bold**/## headers like it does elsewhere - wrong for a document meant to go straight into a court filing. Now explicitly instructed to use plain text with conventional Turkish petition section labels (AÇIKLAMALAR:, SONUÇ VE İSTEM: etc.) instead. Co-Authored-By: Claude Sonnet 5 --- src/controllers/drafting.controller.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/controllers/drafting.controller.ts b/src/controllers/drafting.controller.ts index a6a2a76..1e9cb1f 100644 --- a/src/controllers/drafting.controller.ts +++ b/src/controllers/drafting.controller.ts @@ -14,6 +14,12 @@ const DRAFT_SYSTEM_PROMPT = ` ESKİ dosyaya ait somut bilgileri ASLA kullanma veya kopyalama — onların yerine SADECE aşağıda verilen YENİ dosyanın gerçek bilgilerini koy. + ÖNEMLİ — BİÇİMLENDİRME: Bu çıktı doğrudan bir dilekçe belgesine dönüştürülecek, o yüzden + KESİNLİKLE Markdown biçimlendirmesi kullanma (**, ##, -, *, 1. gibi işaretler YASAK). + Sadece düz metin yaz. Başlık/vurgu gerekiyorsa BÜYÜK HARF veya standart dilekçe + başlıkları (örn. "AÇIKLAMALAR:", "HUKUKİ SEBEPLER:", "SONUÇ VE İSTEM:") kullan, + yıldız veya diyez işareti asla kullanma. + Sadece dilekçe taslağının kendisini döndür — başlık, açıklama veya ek yorum ekleme. `;