From df660a19a49a1898ca5df30a94850fddf90bb900 Mon Sep 17 00:00:00 2001 From: yoav0gal Date: Fri, 5 Sep 2025 22:29:45 +0300 Subject: [PATCH] moved prompt to the inside of the command --- tools/installer/lib/ide-setup.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tools/installer/lib/ide-setup.js b/tools/installer/lib/ide-setup.js index c8d4bad9..3b8bc31f 100644 --- a/tools/installer/lib/ide-setup.js +++ b/tools/installer/lib/ide-setup.js @@ -1327,13 +1327,16 @@ class IdeSetup extends BaseIdeSetup { // Get relative path from installDir to agent file for @{file} reference const relativeAgentPath = path.relative(installDir, agentPath).replaceAll('\\', '/'); + // Read the agent content + const agentContent = await fileManager.readFile(agentPath); + const tomlContent = `description = " Activates the ${agentTitle} agent from the BMad Method." prompt = """ CRITICAL: You are now the BMad '${agentTitle}' agent. Adopt its persona, follow its instructions, and use its capabilities. -READ THIS FILE BEFORE ANSWERING AS THE PERSONA! +READ THIS BEFORE ANSWERING AS THE PERSONA! -@${relativeAgentPath} +${agentContent} """`; await fileManager.writeFile(commandPath, tomlContent); @@ -1358,13 +1361,16 @@ READ THIS FILE BEFORE ANSWERING AS THE PERSONA! // Get relative path from installDir to task file for @{file} reference const relativeTaskPath = path.relative(installDir, taskPath).replaceAll('\\', '/'); + // Read the task content + const taskContent = await fileManager.readFile(taskPath); + const tomlContent = `description = " Executes the BMad Task: ${taskTitle}" prompt = """ CRITICAL: You are to execute the BMad Task defined below. -READ THIS FILE BEFORE EXECUTING THE TASK AS THE INSTRUCTIONS SPECIFIED! +READ THIS BEFORE EXECUTING THE TASK AS THE INSTRUCTIONS SPECIFIED! -@${relativeTaskPath} +${taskContent} """`; await fileManager.writeFile(commandPath, tomlContent);