refactor: convert create-story workflow.yaml to workflow.md (step 7)#1862
Conversation
🤖 Augment PR SummarySummary: This PR migrates the Changes:
Technical Notes: The new Markdown workflow keeps the same variable names and paths (e.g., 🤖 Was this summary useful? React with 👍 or 👎 |
📝 WalkthroughWalkthroughThe 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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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 theworkflow.mdload to the variable-bearing sections.After this conversion,
workflow.mdis 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
📒 Files selected for processing (4)
src/bmm/workflows/4-implementation/create-story/checklist.mdsrc/bmm/workflows/4-implementation/create-story/instructions.xmlsrc/bmm/workflows/4-implementation/create-story/workflow.mdsrc/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
954cd88 to
5316efe
Compare
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>
5316efe to
511a71e
Compare
Summary
workflow.yamlconfig +instructions.xmlexecution logic into a single self-containedworkflow.md<critical>directives; preserve all 7 behavioral constraints in Role sectionworkflow.yamlreferences inchecklist.mdtoworkflow.mdtemplate.mdandbmad-skill-manifest.yamlunchangedStep 7 of the 9-step yaml-to-md conversion plan.
Test plan
workflow.mdcontains all config variables from originalworkflow.yamlinstructions.xmlare present with identical logicchecklist.mdreferences updated, no content changestemplate.mdandbmad-skill-manifest.yamlbyte-identical to baseline🤖 Generated with Claude Code