From 93e2c0dae448e42f5ac1e0a1634f74fa07434e10 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 08:18:05 +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..8ebbe04 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 strictly valid JSON; use backslash +escapes for any double quotes inside strings. 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..1ba674b 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 strictly valid JSON; use backslash +escapes for any double quotes inside strings. 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..abf6ab9 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 strictly valid JSON; use backslash +escapes for any double quotes inside strings. 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..910f016 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 strictly valid JSON; use backslash +escapes for any double quotes inside strings. 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..7f6da1e 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 strictly valid JSON; use backslash +escapes for any double quotes inside strings. 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..f43a102 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 strictly valid JSON; use backslash +escapes for any double quotes inside strings. 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..0631f49 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 strictly valid JSON; use backslash +escapes for any double quotes inside strings. Output a single JSON array and nothing else: the quoted lines when the song expresses the theme, or an empty array