From 97a533e298aeca9da529b8a9e68e4ea1416ea048 Mon Sep 17 00:00:00 2001 From: PinkyD Date: Tue, 24 Feb 2026 16:43:33 -0800 Subject: [PATCH] fix(installer): remove double-escaping of quotes in CSV manifest pipeline (#1746) * fix(installer): remove double-escaping of quotes in CSV manifest pipeline cleanForCSV() pre-escaped " to "" before storing in memory, then escapeCsv() escaped again at CSV write time. After csv-parse round-trip (which only un-escapes once), descriptions retained doubled quotes instead of originals, corrupting generated output files. Fix: remove the redundant quote escaping from cleanForCSV() since escapeCsv() already handles CSV quoting correctly at write time. Co-Authored-By: Claude Opus 4.6 * fix(installer): use single quotes for description in Gemini workflow templates Replace triple-quoted """{{description}}""" with single-quoted '{{description}}' to avoid TOML escaping issues in Gemini workflow templates. Co-Authored-By: Claude Opus 4.6 --------- Co-authored-by: Claude Opus 4.6 --- tools/cli/installers/lib/core/manifest-generator.js | 10 ++++------ .../ide/templates/combined/gemini-workflow-yaml.toml | 2 +- .../lib/ide/templates/combined/gemini-workflow.toml | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/tools/cli/installers/lib/core/manifest-generator.js b/tools/cli/installers/lib/core/manifest-generator.js index bc4694a6d..06e2e3f4b 100644 --- a/tools/cli/installers/lib/core/manifest-generator.js +++ b/tools/cli/installers/lib/core/manifest-generator.js @@ -24,16 +24,14 @@ class ManifestGenerator { } /** - * Clean text for CSV output by normalizing whitespace and escaping quotes + * Clean text for CSV output by normalizing whitespace. + * Note: Quote escaping is handled by escapeCsv() at write time. * @param {string} text - Text to clean - * @returns {string} Cleaned text safe for CSV + * @returns {string} Cleaned text */ cleanForCSV(text) { if (!text) return ''; - return text - .trim() - .replaceAll(/\s+/g, ' ') // Normalize all whitespace (including newlines) to single space - .replaceAll('"', '""'); // Escape quotes for CSV + return text.trim().replaceAll(/\s+/g, ' '); // Normalize all whitespace (including newlines) to single space } /** diff --git a/tools/cli/installers/lib/ide/templates/combined/gemini-workflow-yaml.toml b/tools/cli/installers/lib/ide/templates/combined/gemini-workflow-yaml.toml index 063ca0d0b..bc6c8da39 100644 --- a/tools/cli/installers/lib/ide/templates/combined/gemini-workflow-yaml.toml +++ b/tools/cli/installers/lib/ide/templates/combined/gemini-workflow-yaml.toml @@ -1,4 +1,4 @@ -description = """{{description}}""" +description = '{{description}}' prompt = """ Execute the BMAD '{{name}}' workflow. diff --git a/tools/cli/installers/lib/ide/templates/combined/gemini-workflow.toml b/tools/cli/installers/lib/ide/templates/combined/gemini-workflow.toml index 526241061..3306cce04 100644 --- a/tools/cli/installers/lib/ide/templates/combined/gemini-workflow.toml +++ b/tools/cli/installers/lib/ide/templates/combined/gemini-workflow.toml @@ -1,4 +1,4 @@ -description = """{{description}}""" +description = '{{description}}' prompt = """ Execute the BMAD '{{name}}' workflow.