fix: use double quotes in skill templates to prevent YAML parse errors
Default skill templates used single-quoted YAML values for name and description fields. When descriptions contain apostrophes (e.g., "agent's workflow"), the generated YAML frontmatter would be invalid, causing parse failures in IDEs like Antigravity. Switches templates to double quotes and escapes any double quotes in the description during template rendering. Fixes #1744
This commit is contained in:
parent
32693f1a6b
commit
b696e9a246
|
|
@ -403,8 +403,8 @@ class ConfigDrivenIdeSetup extends BaseIdeSetup {
|
||||||
getDefaultTemplate(artifactType) {
|
getDefaultTemplate(artifactType) {
|
||||||
if (artifactType === 'agent') {
|
if (artifactType === 'agent') {
|
||||||
return `---
|
return `---
|
||||||
name: '{{name}}'
|
name: "{{name}}"
|
||||||
description: '{{description}}'
|
description: "{{description}}"
|
||||||
disable-model-invocation: true
|
disable-model-invocation: true
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -418,8 +418,8 @@ You must fully embody this agent's persona and follow all activation instruction
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
return `---
|
return `---
|
||||||
name: '{{name}}'
|
name: "{{name}}"
|
||||||
description: '{{description}}'
|
description: "{{description}}"
|
||||||
---
|
---
|
||||||
|
|
||||||
# {{name}}
|
# {{name}}
|
||||||
|
|
@ -468,7 +468,7 @@ LOAD and execute from: {project-root}/{{bmadFolderName}}/{{path}}
|
||||||
.replaceAll('{{name}}', artifact.name || '')
|
.replaceAll('{{name}}', artifact.name || '')
|
||||||
.replaceAll('{{module}}', artifact.module || 'core')
|
.replaceAll('{{module}}', artifact.module || 'core')
|
||||||
.replaceAll('{{path}}', pathToUse)
|
.replaceAll('{{path}}', pathToUse)
|
||||||
.replaceAll('{{description}}', artifact.description || `${artifact.name} ${artifact.type || ''}`)
|
.replaceAll('{{description}}', (artifact.description || `${artifact.name} ${artifact.type || ''}`).replaceAll('"', String.raw`\"`))
|
||||||
.replaceAll('{{workflow_path}}', pathToUse);
|
.replaceAll('{{workflow_path}}', pathToUse);
|
||||||
|
|
||||||
return rendered;
|
return rendered;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue