From a4f8ac719a3c5a5ef2e2f28091fc2fb81d3b8037 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Wed, 5 Aug 2026 06:15:14 +0800 Subject: [PATCH] Require valid JSON with escaped quotes in the definition files Co-Authored-By: Claude Fable 5 --- prompts/01-01-01-tag.md | 2 ++ prompts/01-02-01-merge.md | 2 ++ prompts/01-03-01-cap.md | 2 ++ prompts/01-04-01-code.md | 2 ++ prompts/01-04-02-code-arb.md | 2 ++ prompts/02-01-01-screen.md | 2 ++ prompts/02-01-02-screen-arb.md | 2 ++ 7 files changed, 14 insertions(+) diff --git a/prompts/01-01-01-tag.md b/prompts/01-01-01-tag.md index b8a265f..b5cd02f 100644 --- a/prompts/01-01-01-tag.md +++ b/prompts/01-01-01-tag.md @@ -15,6 +15,8 @@ Rules: that ground it; do not give a keyword you cannot ground. Do not wrap the output in a Markdown code fence. +The output must be valid JSON; escape any double quote +inside a string as \". Output a single JSON object mapping each keyword to its list of quotes, and nothing else: diff --git a/prompts/01-02-01-merge.md b/prompts/01-02-01-merge.md index 9db3561..0e85508 100644 --- a/prompts/01-02-01-merge.md +++ b/prompts/01-02-01-merge.md @@ -18,6 +18,8 @@ Rules: names must be unique. Do not wrap the output in a Markdown code fence. +The output must be valid JSON; escape any double quote +inside a string as \". Output a single JSON object mapping each group name to the list of its member keywords, and nothing else: diff --git a/prompts/01-03-01-cap.md b/prompts/01-03-01-cap.md index 9a73867..a8bb05c 100644 --- a/prompts/01-03-01-cap.md +++ b/prompts/01-03-01-cap.md @@ -21,6 +21,8 @@ Rules: names must be unique. Do not wrap the output in a Markdown code fence. +The output must be valid JSON; escape any double quote +inside a string as \". Output a single JSON object mapping each group name to the list of its member keywords, and nothing else: diff --git a/prompts/01-04-01-code.md b/prompts/01-04-01-code.md index ca0bf20..17daa10 100644 --- a/prompts/01-04-01-code.md +++ b/prompts/01-04-01-code.md @@ -22,6 +22,8 @@ Rules: cannot ground. Do not wrap the output in a Markdown code fence. +The output must be valid JSON; escape any double quote +inside a string as \". Output a single JSON object mapping each assigned keyword to its list of quotes (an empty object when no keyword applies), diff --git a/prompts/01-04-02-code-arb.md b/prompts/01-04-02-code-arb.md index 28641ed..fe3af89 100644 --- a/prompts/01-04-02-code-arb.md +++ b/prompts/01-04-02-code-arb.md @@ -31,6 +31,8 @@ Rules: - Do not add any keyword that is not listed. Do not wrap the output in a Markdown code fence. +The output must be valid JSON; escape any double quote +inside a string as \". Output a single JSON object mapping each kept keyword to your list of quotes, and nothing else. A dropped keyword is simply diff --git a/prompts/02-01-01-screen.md b/prompts/02-01-01-screen.md index 1c17326..d0e673e 100644 --- a/prompts/02-01-01-screen.md +++ b/prompts/02-01-01-screen.md @@ -13,6 +13,8 @@ Rules: ground it in a quote, the answer is no. Do not wrap the output in a Markdown code fence. +The output must be valid JSON; escape any double quote +inside a string as \". Output a single JSON array and nothing else: the quoted lines when the song expresses the theme, or an empty array diff --git a/prompts/02-01-02-screen-arb.md b/prompts/02-01-02-screen-arb.md index cd844d7..794b6dc 100644 --- a/prompts/02-01-02-screen-arb.md +++ b/prompts/02-01-02-screen-arb.md @@ -22,6 +22,8 @@ Rules: ground it in a quote, the answer is no. Do not wrap the output in a Markdown code fence. +The output must be valid JSON; escape any double quote +inside a string as \". Output a single JSON array and nothing else: the quoted lines when the song expresses the theme, or an empty array