Fix Codex task prompt metadata for task artifacts

This commit is contained in:
bodote 2026-01-31 16:09:41 +01:00
parent 98b97cf4fd
commit cfdecf948d
1 changed files with 4 additions and 0 deletions

View File

@ -94,6 +94,8 @@ class CodexSetup extends BaseIdeSetup {
const tasks = await getTasksFromBmad(bmadDir, options.selectedModules || []); const tasks = await getTasksFromBmad(bmadDir, options.selectedModules || []);
const taskArtifacts = []; const taskArtifacts = [];
for (const task of tasks) { for (const task of tasks) {
const relativeTaskPath = path.relative(projectDir, task.path).replaceAll('\\', '/');
const taskPromptPath = `{project-root}/${relativeTaskPath}`;
const content = await this.readAndProcessWithProject( const content = await this.readAndProcessWithProject(
task.path, task.path,
{ {
@ -105,7 +107,9 @@ class CodexSetup extends BaseIdeSetup {
taskArtifacts.push({ taskArtifacts.push({
type: 'task', type: 'task',
module: task.module, module: task.module,
name: task.name,
sourcePath: task.path, sourcePath: task.path,
path: taskPromptPath,
relativePath: path.join(task.module, 'tasks', `${task.name}.md`), relativePath: path.join(task.module, 'tasks', `${task.name}.md`),
content, content,
}); });