Skip to content

refactor: convert create-story workflow.yaml to workflow.md (step 7)#1862

Merged
alexeyv merged 2 commits intobmad-code-org:mainfrom
alexeyv:convert-create-story-yaml-to-md
Mar 8, 2026
Merged

refactor: convert create-story workflow.yaml to workflow.md (step 7)#1862
alexeyv merged 2 commits intobmad-code-org:mainfrom
alexeyv:convert-create-story-yaml-to-md

Conversation

@alexeyv
Copy link
Copy Markdown
Collaborator

@alexeyv alexeyv commented Mar 8, 2026

Summary

  • Merge workflow.yaml config + instructions.xml execution logic into a single self-contained workflow.md
  • Drop 2 engine scaffolding <critical> directives; preserve all 7 behavioral constraints in Role section
  • Update 4 workflow.yaml references in checklist.md to workflow.md
  • template.md and bmad-skill-manifest.yaml unchanged

Step 7 of the 9-step yaml-to-md conversion plan.

Test plan

  • Verify workflow.md contains all config variables from original workflow.yaml
  • Verify all 6 XML steps from instructions.xml are present with identical logic
  • Verify only engine scaffolding directives were dropped (not behavioral ones)
  • Verify checklist.md references updated, no content changes
  • Verify template.md and bmad-skill-manifest.yaml byte-identical to baseline

🤖 Generated with Claude Code

@augmentcode
Copy link
Copy Markdown

augmentcode bot commented Mar 8, 2026

🤖 Augment PR Summary

Summary: This PR migrates the create-story implementation workflow from a split workflow.yaml + instructions.xml format into a single self-contained workflow.md file.

Changes:

  • Deletes src/bmm/workflows/4-implementation/create-story/workflow.yaml (config) and instructions.xml (execution logic).
  • Adds src/bmm/workflows/4-implementation/create-story/workflow.md containing YAML frontmatter, initialization/config guidance, and the full embedded <workflow> execution steps.
  • Updates create-story/checklist.md references from workflow.yaml to workflow.md for workflow-variable context.
  • Preserves the original step structure and the six major workflow phases (story selection, artifact loading, architecture analysis, web research, story generation, sprint-status update).

Technical Notes: The new Markdown workflow keeps the same variable names and paths (e.g., {installed_path}, {planning_artifacts}, {implementation_artifacts}) while consolidating the previous YAML config and XML instruction content into one file for easier maintenance as part of the yaml-to-md conversion plan.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 8, 2026

📝 Walkthrough

Walkthrough

The create-story workflow configuration is being consolidated from a split YAML+XML model into a single Markdown-based workflow definition. The instructions.xml and workflow.yaml files are being replaced by a new comprehensive workflow.md, with updated references in related documentation.

Changes

Cohort / File(s) Summary
Workflow Configuration Migration
src/bmm/workflows/4-implementation/create-story/instructions.xml, src/bmm/workflows/4-implementation/create-story/workflow.yaml, src/bmm/workflows/4-implementation/create-story/workflow.md
Removal of XML workflow definitions and YAML configuration file, replaced by a consolidated Markdown-based workflow defining all six steps (target story determination, artifact loading, architecture analysis, web research, story file creation, and sprint status finalization) with complete procedural guidance and automation orchestration.
Reference Updates
src/bmm/workflows/4-implementation/create-story/checklist.md
Updated cross-references from workflow.yaml to workflow.md for variable loading and input sources.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • PR #1842: Implements the same refactoring pattern of consolidating workflow.yaml and instructions into workflow.md across multiple workflows (sprint-status, retrospective, qa).
  • PR #1837: Modifies the instructions.xml validation step that is being completely removed in this PR, addressing the same file's role in story workflow orchestration.
  • PR #1107: Related changes to create-story workflow files and story status transitions (drafted → ready-for-dev).

Suggested reviewers

  • pbean
  • bmadcode
  • cecil-the-coder
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: refactoring the create-story workflow by converting from workflow.yaml to workflow.md as part of step 7 of a larger conversion plan.
Description check ✅ Passed The description is directly related to the changeset, explaining the consolidation of workflow.yaml and instructions.xml into workflow.md, reference updates in checklist.md, and the step number in the conversion plan.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (2)
src/bmm/workflows/4-implementation/create-story/workflow.md (1)

161-216: Collapse the duplicated backlog-discovery block.

This is a second copy of the auto-discovery path that already exists in Lines 101-159. Keeping two near-identical versions of the same step is asking for divergence, especially in a conversion PR that is supposed to preserve logic exactly once.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/bmm/workflows/4-implementation/create-story/workflow.md` around lines 161
- 216, This block duplicates the backlog-discovery/auto‑discovery flow already
defined earlier; remove this entire duplicate section (starting at the "Load the
FULL file: {{sprint_status}}" action through the final "GOTO step 2a") and keep
only the original occurrence (the earlier backlog discovery block), then ensure
any references like "GOTO step 2a" or epic/status checks still point to the
canonical flow and update cross‑refs if necessary so there is exactly one
backlog-discovery implementation.
src/bmm/workflows/4-implementation/create-story/checklist.md (1)

39-39: Scope the workflow.md load to the variable-bearing sections.

After this conversion, workflow.md is no longer just config; it also contains the executable workflow. Telling the validator to load it broadly “for variable inclusion” is sloppy and makes it easy to pull orchestration text into the validation context. Restrict this to the frontmatter / Configuration / Paths sections, or define an explicit variable block.

Also applies to: 52-52, 64-68

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/bmm/workflows/4-implementation/create-story/checklist.md` at line 39, The
validator currently loads the entire workflow.md for variable inclusion;
restrict the loader so it only parses the variable-bearing sections (frontmatter
and the "Configuration"/"Paths" sections) or require an explicit variable block
instead—update the code that performs "Load workflow variables from
`{installed_path}/workflow.md`" to read and parse only those specific sections
(or a named variables block) and ensure similar changes are applied to the other
occurrences referenced in the checklist (the entries around the second and third
mentions).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/bmm/workflows/4-implementation/create-story/workflow.md`:
- Around line 135-157: The "this is first story in epic {{epic_num}}" check
incorrectly looks for any key matching "{{epic_num}}-1-*" which only proves an
epic has a first story, not that the story being created is the first; change
the condition to compare the current story's ordinal (e.g., variable story_num
or selected_story_num derived from the new story id) and only treat it as
"first" when story_num == 1. Update the check labeled "this is first story in
epic {{epic_num}}" and any pattern match logic (the "{{epic_num}}-1-*" usage) to
instead compute/extract the new story's sequence number and use an equality
test, and apply the same fix to the duplicate block referenced at 193-214.
- Around line 95-97: The "user provides story docs path" branch doesn't set the
required identifiers ({{epic_num}}, {{story_num}}, {{story_key}}, {{story_id}});
update that branch so it resolves story identity before proceeding (e.g., invoke
the same ResolveStoryIdentity logic used in the other path or run the Step 1a
parsing/lookup routine) and populate those four variables so Steps 2, 5, and 6
have the values they need; ensure the branch either parses the provided path to
extract epic/story numbers and looks up story_key/story_id or calls the existing
function/step that produces them.
- Around line 63-66: The workflow contains GOTO targets named "2a" that don't
exist (e.g., the action "GOTO step 2a") while only a <step n="2"> exists; update
these branches to point to the actual step label or create the missing step
label. Either change all "GOTO step 2a" references (and the other invalid GOTOs
called out) to "GOTO step 2" so they jump to the existing <step n="2">, or add a
new <step n="2a"> definition that implements the intended behavior and then
leave the GOTOs as-is; search for the exact token "GOTO step 2a" (and the
similar invalid GOTOs mentioned) and apply one consistent fix.

---

Nitpick comments:
In `@src/bmm/workflows/4-implementation/create-story/checklist.md`:
- Line 39: The validator currently loads the entire workflow.md for variable
inclusion; restrict the loader so it only parses the variable-bearing sections
(frontmatter and the "Configuration"/"Paths" sections) or require an explicit
variable block instead—update the code that performs "Load workflow variables
from `{installed_path}/workflow.md`" to read and parse only those specific
sections (or a named variables block) and ensure similar changes are applied to
the other occurrences referenced in the checklist (the entries around the second
and third mentions).

In `@src/bmm/workflows/4-implementation/create-story/workflow.md`:
- Around line 161-216: This block duplicates the
backlog-discovery/auto‑discovery flow already defined earlier; remove this
entire duplicate section (starting at the "Load the FULL file:
{{sprint_status}}" action through the final "GOTO step 2a") and keep only the
original occurrence (the earlier backlog discovery block), then ensure any
references like "GOTO step 2a" or epic/status checks still point to the
canonical flow and update cross‑refs if necessary so there is exactly one
backlog-discovery implementation.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 633c3d88-84bb-4cf9-92cf-429b57e81458

📥 Commits

Reviewing files that changed from the base of the PR and between 140ae57 and 73a1127.

📒 Files selected for processing (4)
  • src/bmm/workflows/4-implementation/create-story/checklist.md
  • src/bmm/workflows/4-implementation/create-story/instructions.xml
  • src/bmm/workflows/4-implementation/create-story/workflow.md
  • src/bmm/workflows/4-implementation/create-story/workflow.yaml
💤 Files with no reviewable changes (2)
  • src/bmm/workflows/4-implementation/create-story/instructions.xml
  • src/bmm/workflows/4-implementation/create-story/workflow.yaml

@alexeyv alexeyv force-pushed the convert-create-story-yaml-to-md branch from 954cd88 to 5316efe Compare March 8, 2026 18:10
alexeyv and others added 2 commits March 8, 2026 12:12
Merge workflow.yaml config and instructions.xml execution logic into a
single self-contained workflow.md. Drop engine scaffolding directives,
preserve all behavioral constraints. Update checklist.md references.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant