From d39fcd5938eee87ee05956fa829c1740295828e1 Mon Sep 17 00:00:00 2001 From: Alex Verkhovsky Date: Thu, 12 Mar 2026 22:58:53 -0600 Subject: [PATCH] Convert create-story workflow to native skill package (#1939) * convert create-story workflow to native skill package * fix(create-story): update converted workflow path refs * fix(sm-agent): use skill reference for create-story --- src/bmm/agents/sm.agent.yaml | 2 +- src/bmm/module-help.csv | 4 ++-- .../workflows/4-implementation/bmad-create-story/SKILL.md | 6 ++++++ .../bmad-create-story/bmad-skill-manifest.yaml | 1 + .../{create-story => bmad-create-story}/checklist.md | 0 .../discover-inputs.md | 0 .../{create-story => bmad-create-story}/template.md | 0 .../{create-story => bmad-create-story}/workflow.md | 8 ++++---- .../create-story/bmad-skill-manifest.yaml | 3 --- test/test-workflow-path-regex.js | 6 +++--- tools/cli/installers/lib/modules/manager.js | 2 +- 11 files changed, 18 insertions(+), 14 deletions(-) create mode 100644 src/bmm/workflows/4-implementation/bmad-create-story/SKILL.md create mode 100644 src/bmm/workflows/4-implementation/bmad-create-story/bmad-skill-manifest.yaml rename src/bmm/workflows/4-implementation/{create-story => bmad-create-story}/checklist.md (100%) rename src/bmm/workflows/4-implementation/{create-story => bmad-create-story}/discover-inputs.md (100%) rename src/bmm/workflows/4-implementation/{create-story => bmad-create-story}/template.md (100%) rename src/bmm/workflows/4-implementation/{create-story => bmad-create-story}/workflow.md (99%) delete mode 100644 src/bmm/workflows/4-implementation/create-story/bmad-skill-manifest.yaml diff --git a/src/bmm/agents/sm.agent.yaml b/src/bmm/agents/sm.agent.yaml index 19506fae1..ef71f7681 100644 --- a/src/bmm/agents/sm.agent.yaml +++ b/src/bmm/agents/sm.agent.yaml @@ -24,7 +24,7 @@ agent: description: "[SP] Sprint Planning: Generate or update the record that will sequence the tasks to complete the full project that the dev agent will follow" - trigger: CS or fuzzy match on create-story - exec: "{project-root}/_bmad/bmm/workflows/4-implementation/create-story/workflow.md" + exec: "skill:bmad-create-story" description: "[CS] Context Story: Prepare a story with all required context for implementation for the developer agent" - trigger: ER or fuzzy match on epic-retrospective diff --git a/src/bmm/module-help.csv b/src/bmm/module-help.csv index 85f7bf6f8..3d7a47533 100644 --- a/src/bmm/module-help.csv +++ b/src/bmm/module-help.csv @@ -24,8 +24,8 @@ bmm,3-solutioning,Create Epics and Stories,CE,30,_bmad/bmm/workflows/3-solutioni bmm,3-solutioning,Check Implementation Readiness,IR,70,_bmad/bmm/workflows/3-solutioning/check-implementation-readiness/workflow.md,bmad-bmm-check-implementation-readiness,true,architect,Validate Mode,"Ensure PRD UX Architecture and Epics Stories are aligned",planning_artifacts,"readiness report", bmm,4-implementation,Sprint Planning,SP,10,_bmad/bmm/workflows/4-implementation/sprint-planning/workflow.md,bmad-bmm-sprint-planning,true,sm,Create Mode,"Generate sprint plan for development tasks - this kicks off the implementation phase by producing a plan the implementation agents will follow in sequence for every story in the plan.",implementation_artifacts,"sprint status", bmm,4-implementation,Sprint Status,SS,20,_bmad/bmm/workflows/4-implementation/sprint-status/workflow.md,bmad-bmm-sprint-status,false,sm,Create Mode,"Anytime: Summarize sprint status and route to next workflow",,, -bmm,4-implementation,Validate Story,VS,35,_bmad/bmm/workflows/4-implementation/create-story/workflow.md,bmad-bmm-create-story,false,sm,Validate Mode,"Validates story readiness and completeness before development work begins",implementation_artifacts,"story validation report", -bmm,4-implementation,Create Story,CS,30,_bmad/bmm/workflows/4-implementation/create-story/workflow.md,bmad-bmm-create-story,true,sm,Create Mode,"Story cycle start: Prepare first found story in the sprint plan that is next, or if the command is run with a specific epic and story designation with context. Once complete, then VS then DS then CR then back to DS if needed or next CS or ER",implementation_artifacts,story, +bmm,4-implementation,Validate Story,VS,35,skill:bmad-create-story,bmad-bmm-create-story,false,sm,Validate Mode,"Validates story readiness and completeness before development work begins",implementation_artifacts,"story validation report", +bmm,4-implementation,Create Story,CS,30,skill:bmad-create-story,bmad-bmm-create-story,true,sm,Create Mode,"Story cycle start: Prepare first found story in the sprint plan that is next, or if the command is run with a specific epic and story designation with context. Once complete, then VS then DS then CR then back to DS if needed or next CS or ER",implementation_artifacts,story, bmm,4-implementation,Dev Story,DS,40,_bmad/bmm/workflows/4-implementation/dev-story/workflow.md,bmad-bmm-dev-story,true,dev,Create Mode,"Story cycle: Execute story implementation tasks and tests then CR then back to DS if fixes needed",,, bmm,4-implementation,Code Review,CR,50,_bmad/bmm/workflows/4-implementation/code-review/workflow.md,bmad-bmm-code-review,false,dev,Create Mode,"Story cycle: If issues back to DS if approved then next CS or ER if epic complete",,, bmm,4-implementation,QA Automation Test,QA,45,_bmad/bmm/workflows/qa-generate-e2e-tests/workflow.md,bmad-bmm-qa-automate,false,qa,Create Mode,"Generate automated API and E2E tests for implemented code using the project's existing test framework (detects existing well known in use test frameworks). Use after implementation to add test coverage. NOT for code review or story validation - use CR for that.",implementation_artifacts,"test suite", diff --git a/src/bmm/workflows/4-implementation/bmad-create-story/SKILL.md b/src/bmm/workflows/4-implementation/bmad-create-story/SKILL.md new file mode 100644 index 000000000..5acb64e97 --- /dev/null +++ b/src/bmm/workflows/4-implementation/bmad-create-story/SKILL.md @@ -0,0 +1,6 @@ +--- +name: bmad-create-story +description: 'Creates a dedicated story file with all the context the agent will need to implement it later. Use when the user says "create the next story" or "create story [story identifier]"' +--- + +Follow the instructions in [workflow.md](workflow.md). diff --git a/src/bmm/workflows/4-implementation/bmad-create-story/bmad-skill-manifest.yaml b/src/bmm/workflows/4-implementation/bmad-create-story/bmad-skill-manifest.yaml new file mode 100644 index 000000000..d0f08abdb --- /dev/null +++ b/src/bmm/workflows/4-implementation/bmad-create-story/bmad-skill-manifest.yaml @@ -0,0 +1 @@ +type: skill diff --git a/src/bmm/workflows/4-implementation/create-story/checklist.md b/src/bmm/workflows/4-implementation/bmad-create-story/checklist.md similarity index 100% rename from src/bmm/workflows/4-implementation/create-story/checklist.md rename to src/bmm/workflows/4-implementation/bmad-create-story/checklist.md diff --git a/src/bmm/workflows/4-implementation/create-story/discover-inputs.md b/src/bmm/workflows/4-implementation/bmad-create-story/discover-inputs.md similarity index 100% rename from src/bmm/workflows/4-implementation/create-story/discover-inputs.md rename to src/bmm/workflows/4-implementation/bmad-create-story/discover-inputs.md diff --git a/src/bmm/workflows/4-implementation/create-story/template.md b/src/bmm/workflows/4-implementation/bmad-create-story/template.md similarity index 100% rename from src/bmm/workflows/4-implementation/create-story/template.md rename to src/bmm/workflows/4-implementation/bmad-create-story/template.md diff --git a/src/bmm/workflows/4-implementation/create-story/workflow.md b/src/bmm/workflows/4-implementation/bmad-create-story/workflow.md similarity index 99% rename from src/bmm/workflows/4-implementation/create-story/workflow.md rename to src/bmm/workflows/4-implementation/bmad-create-story/workflow.md index bd99a448f..47b0f8d23 100644 --- a/src/bmm/workflows/4-implementation/create-story/workflow.md +++ b/src/bmm/workflows/4-implementation/bmad-create-story/workflow.md @@ -1,5 +1,5 @@ --- -name: create-story +name: bmad-create-story description: 'Creates a dedicated story file with all the context the agent will need to implement it later. Use when the user says "create the next story" or "create story [story identifier]"' --- @@ -32,9 +32,9 @@ Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve: ### Paths -- `installed_path` = `{project-root}/_bmad/bmm/workflows/4-implementation/create-story` -- `template` = `{installed_path}/template.md` -- `validation` = `{installed_path}/checklist.md` +- `installed_path` = `.` +- `template` = `./template.md` +- `validation` = `./checklist.md` - `sprint_status` = `{implementation_artifacts}/sprint-status.yaml` - `epics_file` = `{planning_artifacts}/epics.md` - `prd_file` = `{planning_artifacts}/prd.md` diff --git a/src/bmm/workflows/4-implementation/create-story/bmad-skill-manifest.yaml b/src/bmm/workflows/4-implementation/create-story/bmad-skill-manifest.yaml deleted file mode 100644 index 13f0beb24..000000000 --- a/src/bmm/workflows/4-implementation/create-story/bmad-skill-manifest.yaml +++ /dev/null @@ -1,3 +0,0 @@ -canonicalId: bmad-create-story -type: workflow -description: "Creates a dedicated story file with all the context needed for implementation" diff --git a/test/test-workflow-path-regex.js b/test/test-workflow-path-regex.js index 488d69b76..5f57a0ab9 100644 --- a/test/test-workflow-path-regex.js +++ b/test/test-workflow-path-regex.js @@ -47,7 +47,7 @@ const INSTALL_REGEX = /\{project-root\}\/(?:_bmad)\/([^/]+)\/workflows\/(.+)/; // --------------------------------------------------------------------------- // Test data // --------------------------------------------------------------------------- -const sourcePath = '{project-root}/_bmad/bmm/workflows/4-implementation/create-story/workflow.md'; +const sourcePath = '{project-root}/_bmad/bmm/workflows/4-implementation/bmad-create-story/workflow.md'; const installPath = '{project-root}/_bmad/bmgd/workflows/4-production/create-story/workflow.md'; console.log(`\n${colors.cyan}Workflow Path Regex Tests${colors.reset}\n`); @@ -63,9 +63,9 @@ assert( `Expected "bmm", got "${sourceMatch && sourceMatch[1]}"`, ); assert( - sourceMatch && sourceMatch[2] === '4-implementation/create-story/workflow.md', + sourceMatch && sourceMatch[2] === '4-implementation/bmad-create-story/workflow.md', 'Source regex group [2] is the workflow sub-path', - `Expected "4-implementation/create-story/workflow.md", got "${sourceMatch && sourceMatch[2]}"`, + `Expected "4-implementation/bmad-create-story/workflow.md", got "${sourceMatch && sourceMatch[2]}"`, ); // --- Install regex tests (group [2] returns module name, not sub-path) --- diff --git a/tools/cli/installers/lib/modules/manager.js b/tools/cli/installers/lib/modules/manager.js index 7ac85678b..9bc027d85 100644 --- a/tools/cli/installers/lib/modules/manager.js +++ b/tools/cli/installers/lib/modules/manager.js @@ -1077,7 +1077,7 @@ class ModuleManager { const installWorkflowPath = item['workflow-install']; // Where to copy TO // Parse SOURCE workflow path - // Example: {project-root}/_bmad/bmm/workflows/4-implementation/create-story/workflow.md + // Example: {project-root}/_bmad/bmm/workflows/4-implementation/bmad-create-story/workflow.md const sourceMatch = sourceWorkflowPath.match(/\{project-root\}\/(?:_bmad)\/([^/]+)\/workflows\/(.+)/); if (!sourceMatch) { await prompts.log.warn(` Could not parse workflow path: ${sourceWorkflowPath}`);