test: update fixtures to remove workflow.yaml references
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
cdd8f9db47
commit
01927f35e6
|
|
@ -1,3 +1,3 @@
|
||||||
module,phase,name,code,sequence,workflow-file,command,required,agent,options,description,output-location,outputs,
|
module,phase,name,code,sequence,workflow-file,command,required,agent,options,description,output-location,outputs,
|
||||||
bmm,anytime,Document Project,DP,,_bmad/bmm/workflows/document-project/workflow.yaml,bmad-bmm-document-project,false,analyst,Create Mode,"Analyze project",project-knowledge,*,
|
bmm,anytime,Document Project,DP,,_bmad/bmm/workflows/document-project/workflow.md,bmad-bmm-document-project,false,analyst,Create Mode,"Analyze project",project-knowledge,*,
|
||||||
bmm,1-analysis,Brainstorm Project,BP,10,_bmad/core/workflows/brainstorming/workflow.md,bmad-brainstorming,false,analyst,data=template.md,"Brainstorming",planning_artifacts,"session",
|
bmm,1-analysis,Brainstorm Project,BP,10,_bmad/core/workflows/brainstorming/workflow.md,bmad-brainstorming,false,analyst,data=template.md,"Brainstorming",planning_artifacts,"session",
|
||||||
|
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ test('bmm-style.csv: extracts workflow-file refs with trailing commas', () => {
|
||||||
const { fullPath, content } = loadFixture('valid/bmm-style.csv');
|
const { fullPath, content } = loadFixture('valid/bmm-style.csv');
|
||||||
const refs = extractCsvRefs(fullPath, content);
|
const refs = extractCsvRefs(fullPath, content);
|
||||||
assert(refs.length === 2, `Expected 2 refs, got ${refs.length}`);
|
assert(refs.length === 2, `Expected 2 refs, got ${refs.length}`);
|
||||||
assert(refs[0].raw === '_bmad/bmm/workflows/document-project/workflow.yaml', `Wrong raw[0]: ${refs[0].raw}`);
|
assert(refs[0].raw === '_bmad/bmm/workflows/document-project/workflow.md', `Wrong raw[0]: ${refs[0].raw}`);
|
||||||
assert(refs[1].raw === '_bmad/core/workflows/brainstorming/workflow.md', `Wrong raw[1]: ${refs[1].raw}`);
|
assert(refs[1].raw === '_bmad/core/workflows/brainstorming/workflow.md', `Wrong raw[1]: ${refs[1].raw}`);
|
||||||
assert(refs[0].type === 'project-root', `Wrong type: ${refs[0].type}`);
|
assert(refs[0].type === 'project-root', `Wrong type: ${refs[0].type}`);
|
||||||
assert(refs[0].line === 2, `Wrong line for row 0: ${refs[0].line}`);
|
assert(refs[0].line === 2, `Wrong line for row 0: ${refs[0].line}`);
|
||||||
|
|
|
||||||
|
|
@ -183,9 +183,7 @@ class ManifestGenerator {
|
||||||
const content = rawContent.replaceAll('\r\n', '\n').replaceAll('\r', '\n');
|
const content = rawContent.replaceAll('\r\n', '\n').replaceAll('\r', '\n');
|
||||||
|
|
||||||
const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
|
const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
|
||||||
if (!frontmatterMatch) {
|
if (frontmatterMatch) {
|
||||||
if (debug) console.log(`[DEBUG] collectSkills: skipped (no frontmatter): ${workflowPath}`);
|
|
||||||
} else {
|
|
||||||
const workflow = yaml.parse(frontmatterMatch[1]);
|
const workflow = yaml.parse(frontmatterMatch[1]);
|
||||||
|
|
||||||
if (!workflow || !workflow.name || !workflow.description) {
|
if (!workflow || !workflow.name || !workflow.description) {
|
||||||
|
|
@ -228,6 +226,8 @@ class ManifestGenerator {
|
||||||
console.log(`[DEBUG] collectSkills: claimed skill "${workflow.name}" as ${canonicalId} at ${dir}`);
|
console.log(`[DEBUG] collectSkills: claimed skill "${workflow.name}" as ${canonicalId} at ${dir}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (debug) console.log(`[DEBUG] collectSkills: skipped (no frontmatter): ${workflowPath}`);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (debug) console.log(`[DEBUG] collectSkills: failed to parse ${workflowPath}: ${error.message}`);
|
if (debug) console.log(`[DEBUG] collectSkills: failed to parse ${workflowPath}: ${error.message}`);
|
||||||
|
|
@ -334,10 +334,7 @@ class ManifestGenerator {
|
||||||
// Recurse into subdirectories
|
// Recurse into subdirectories
|
||||||
const newRelativePath = relativePath ? `${relativePath}/${entry.name}` : entry.name;
|
const newRelativePath = relativePath ? `${relativePath}/${entry.name}` : entry.name;
|
||||||
await findWorkflows(fullPath, newRelativePath);
|
await findWorkflows(fullPath, newRelativePath);
|
||||||
} else if (
|
} else if (entry.name === 'workflow.md' || (entry.name.startsWith('workflow-') && entry.name.endsWith('.md'))) {
|
||||||
entry.name === 'workflow.md' ||
|
|
||||||
(entry.name.startsWith('workflow-') && entry.name.endsWith('.md'))
|
|
||||||
) {
|
|
||||||
// Parse workflow file (both YAML and MD formats)
|
// Parse workflow file (both YAML and MD formats)
|
||||||
if (debug) {
|
if (debug) {
|
||||||
console.log(`[DEBUG] Found workflow file: ${fullPath}`);
|
console.log(`[DEBUG] Found workflow file: ${fullPath}`);
|
||||||
|
|
|
||||||
|
|
@ -772,7 +772,6 @@ class ModuleManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compile .agent.yaml files to .md format in modules
|
* Compile .agent.yaml files to .md format in modules
|
||||||
* @param {string} sourcePath - Source module path
|
* @param {string} sourcePath - Source module path
|
||||||
|
|
@ -1124,7 +1123,6 @@ class ModuleManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create directories declared in module.yaml's `directories` key
|
* Create directories declared in module.yaml's `directories` key
|
||||||
* This replaces the security-risky module installer pattern with declarative config
|
* This replaces the security-risky module installer pattern with declarative config
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue