feat: add model frontmatter to workflow prompts

This commit is contained in:
Sjoerd Bozon 2026-01-19 11:00:32 +01:00
parent 015c74c46f
commit bdb5e79bb2
No known key found for this signature in database
GPG Key ID: CECA93E5B0E2F8E0
1 changed files with 7 additions and 3 deletions

View File

@ -45,9 +45,13 @@ class WorkflowPromptGenerator {
const recommendations = {};
for (const prompt of prompts) {
const promptContent = ['---', `agent: ${prompt.agent}`, `description: "${prompt.description}"`, '---', '', prompt.prompt, ''].join(
'\n',
);
const frontmatter = ['---', `agent: ${prompt.agent}`, `description: "${prompt.description}"`];
if (prompt.model) {
frontmatter.push(`model: ${prompt.model}`);
}
const promptContent = [...frontmatter, '---', '', prompt.prompt, ''].join('\n');
const promptFilePath = path.join(promptsDir, `bmd-${prompt.name}.prompt.md`);
await fs.writeFile(promptFilePath, promptContent);