Skip to content

chore(correct-course): convert workflow.yaml to unified workflow.md#1858

Merged
alexeyv merged 1 commit intobmad-code-org:mainfrom
alexeyv:convert-correct-course-yaml-to-md
Mar 8, 2026
Merged

chore(correct-course): convert workflow.yaml to unified workflow.md#1858
alexeyv merged 1 commit intobmad-code-org:mainfrom
alexeyv:convert-correct-course-yaml-to-md

Conversation

@alexeyv
Copy link
Copy Markdown
Collaborator

@alexeyv alexeyv commented Mar 8, 2026

Summary

  • Converts the correct-course workflow from split YAML+instructions format to a single unified workflow.md
  • Removes workflow.yaml and renames instructions.md to workflow.md, merging orchestration metadata into frontmatter
  • Updates agent references in pm.agent.yaml, sm.agent.yaml, module-help.csv, and checklist.md

Test plan

  • Verify correct-course workflow loads and executes correctly with the new unified format
  • Confirm agent references resolve to the renamed file

🤖 Generated with Claude Code

@augmentcode
Copy link
Copy Markdown

augmentcode bot commented Mar 8, 2026

🤖 Augment PR Summary

Summary: This PR consolidates the “Correct Course” (course correction) workflow into the unified Markdown workflow format.

Changes:

  • Replaces the split workflow.yaml + instructions.md structure with a single workflow.md containing YAML frontmatter and embedded workflow steps.
  • Removes the legacy workflow.yaml file and updates workflow references in the PM/SM agent configs to point to workflow.md.
  • Updates the Correct Course checklist to reference the renamed workflow file.
  • Minor tweak to the completion message text in the workflow.

Technical Notes: Orchestration metadata (name/description) now lives in Markdown frontmatter, aligning this workflow with other unified workflow.md patterns in the repo.

🤖 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. 1 suggestion posted.

Fix All in Augment

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

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. 1 suggestion 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

This PR migrates the Correct Course workflow definition from YAML format to Markdown format, updating all related references in agent configurations and workflow metadata files. The workflow.md file is restructured with YAML front matter and expanded initialization and execution sections.

Changes

Cohort / File(s) Summary
Agent Trigger Workflow References
src/bmm/agents/pm.agent.yaml, src/bmm/agents/sm.agent.yaml
Updated CC trigger workflow references from workflow.yaml to workflow.md for the Correct Course workflow.
Correct Course Workflow Definition
src/bmm/workflows/4-implementation/correct-course/workflow.yaml, src/bmm/workflows/4-implementation/correct-course/workflow.md
Replaced YAML workflow configuration with Markdown-based specification; new workflow.md includes YAML front matter, expanded initialization (configuration loading, path definitions, input artifact strategies), detailed execution plan with document discovery sections, and improved semantic structure.
Workflow Metadata
src/bmm/workflows/4-implementation/correct-course/checklist.md
Updated executed-workflow reference from workflow.yaml to workflow.md in checklist header.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • PR #1842: Performs the same workflow.yaml-to-workflow.md refactor pattern with agent YAML reference updates.
  • PR #1358: Modifies the Correct Course workflow checklist.md to add sprint-status synchronization logic.
  • PR #1164: Updates agent trigger workflow references to correct or remove dead workflow paths.

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 concisely summarizes the main change: converting a workflow from YAML format to a unified Markdown format.
Description check ✅ Passed The description is well-related to the changeset, explaining the conversion from split YAML+instructions to unified workflow.md, listing updated references, and providing a test 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: 6

🧹 Nitpick comments (2)
src/bmm/workflows/4-implementation/correct-course/workflow.md (2)

69-69: Prefer the maintained source, not whichever layout is flatter.

Always choosing the whole document when both whole and sharded layouts exist is brittle if the whole file is a generated snapshot and the shard tree is the maintained source of truth. The precedence rule should be source-of-truth based, not shape based.

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

In `@src/bmm/workflows/4-implementation/correct-course/workflow.md` at line 69,
Update the precedence rule in step "4. **Priority**" so it prefers the
maintained/source-of-truth version rather than always choosing the whole layout;
replace the current wording "use the whole document" with a rule that selects
the document marked as maintained (e.g., via metadata, a "source-of-truth" flag,
or repository maintenance indicators) and falls back to whole/sharded only when
maintenance status is unavailable; reference the existing step title "Priority"
and the rule text currently reading "If both whole and sharded versions exist,
use the whole document" to make this change.

42-47: Make discovery deterministic before falling back to fuzzy wildcards.

Between *epic*.md / *ux*.md globs and the explicit "be flexible" instruction, this can pull the wrong artifact when planning_artifacts contains drafts, backups, summaries, or alternate versions. Try canonical names first, then fallback to fuzzy matching.

Also applies to: 78-78

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

In `@src/bmm/workflows/4-implementation/correct-course/workflow.md` around lines
42 - 47, Reorder and narrow the discovery globs so canonical filenames are tried
before fuzzy matches: for each entry using a fuzzy pattern (e.g., the
Epics/UX/PRD/Architecture/Tech Spec rows with `{planning_artifacts}/*epic*.md`,
`{planning_artifacts}/*ux*.md`, `{planning_artifacts}/*prd*.md`,
`{planning_artifacts}/*architecture*.md`, `{planning_artifacts}/*tech-spec*.md`)
add a stricter canonical-first pattern (e.g., `{planning_artifacts}/*epic.md`
then `{planning_artifacts}/*epic*.md`) and similarly for `ux`, `prd`,
`architecture`, and `tech-spec`; update the table rows in workflow.md (and the
other occurrence referenced at 78) so the loader attempts the exact/canonical
glob first and only falls back to the fuzzy wildcard afterwards.
🤖 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/correct-course/workflow.md`:
- Around line 32-37: The workflow Paths section is missing an explicit artifact
for the required write target sprint-status.yaml; add a new path variable (e.g.,
`sprint_status` or `sprint_status_file`) set to
`{installed_path}/sprint-status.yaml` alongside `installed_path`, `checklist`,
and `default_output_file` so the checklist step that updates sprint-status.yaml
has a declared artifact to write to; ensure the checklist.md references this new
variable name where it instructs updating sprint-status.yaml (lines around the
update in checklist.md) so the agent doesn't need to guess the file location.
- Around line 40-47: The table lists sharded inputs like
`{planning_artifacts}/*prd*/*.md` and marks them as INDEX_GUIDED, but the
discovery algorithm only treats directories with an index.md as sharded, causing
a mismatch; update the discovery logic (the code path that detects sharded
documents / INDEX_GUIDED inputs) to consider a directory containing matching .md
files as a valid sharded input (not only when `index.md` exists) or
alternatively change the table to restrict sharded patterns to directories that
contain `index.md`; specifically modify the discovery check that currently looks
for `index.md` to also accept directories with any `*.md` matches under
`{planning_artifacts}/*prd*/`, `{planning_artifacts}/*epic*/`,
`{planning_artifacts}/*architecture*/`, `{planning_artifacts}/*ux*/` so the
declared patterns and the INDEX_GUIDED behavior are consistent.
- Around line 27-30: Update the declared output contract in workflow.md so it
matches actual behavior: expand the "DOCUMENT OUTPUT" and related contract lines
to explicitly include Architecture, UI/UX changes, and the Sprint Change
Proposal file (in addition to epics, stories, PRD sections), and clarify that
`{communication_language}` and `{user_skill_level}` only control agent
communication style while `{document_output_language}` governs produced
artifacts; modify the lines containing `{communication_language}`,
`{user_skill_level}`, and `{document_output_language}` to reflect these
additions and remove the narrower wording that omits Architecture/UI/UX and
Sprint Change Proposal.
- Around line 18-30: Validate required config keys (planning_artifacts,
communication_language, document_output_language, user_name) immediately after
loading the config in the workflow initialization and fail fast if any are
missing: detect which keys are absent, log a clear error message listing the
missing placeholders, and halt execution (throw/return an error) so unresolved
placeholders never propagate into outputs; update the code paths that reference
these symbols ({planning_artifacts}, {communication_language},
{document_output_language}, {user_name}) to rely on the validated config and add
a single centralized validation function to perform this check before any
document generation or agent communication.
- Around line 65-68: When handling a sharded version (per the step that reads
index.md and "Process the combined content as a single document"), preserve
shard provenance by attaching source metadata for each section (e.g., source
file path or section ID from index.md) rather than flattening without origin
info; update the loader so that the combined document is constructed as an
ordered collection of section objects containing both text and a source field,
and ensure downstream steps that generate exact edit proposals use that source
field to name the file to edit.
- Around line 26-36: The config injects a raw `date` into `default_output_file`,
which can produce invalid filenames; change the variable so `date` (or a new
`date_safe`) is generated/formatted for filenames (e.g., ISO-like or
YYYY-MM-DD[-HHMMSS] or epoch) with no spaces or colons, and update
`default_output_file` to use that safe variable; adjust references to `date`
elsewhere if you introduce `date_safe` and ensure `installed_path`,
`planning_artifacts`, and `default_output_file` use the sanitized value.

---

Nitpick comments:
In `@src/bmm/workflows/4-implementation/correct-course/workflow.md`:
- Line 69: Update the precedence rule in step "4. **Priority**" so it prefers
the maintained/source-of-truth version rather than always choosing the whole
layout; replace the current wording "use the whole document" with a rule that
selects the document marked as maintained (e.g., via metadata, a
"source-of-truth" flag, or repository maintenance indicators) and falls back to
whole/sharded only when maintenance status is unavailable; reference the
existing step title "Priority" and the rule text currently reading "If both
whole and sharded versions exist, use the whole document" to make this change.
- Around line 42-47: Reorder and narrow the discovery globs so canonical
filenames are tried before fuzzy matches: for each entry using a fuzzy pattern
(e.g., the Epics/UX/PRD/Architecture/Tech Spec rows with
`{planning_artifacts}/*epic*.md`, `{planning_artifacts}/*ux*.md`,
`{planning_artifacts}/*prd*.md`, `{planning_artifacts}/*architecture*.md`,
`{planning_artifacts}/*tech-spec*.md`) add a stricter canonical-first pattern
(e.g., `{planning_artifacts}/*epic.md` then `{planning_artifacts}/*epic*.md`)
and similarly for `ux`, `prd`, `architecture`, and `tech-spec`; update the table
rows in workflow.md (and the other occurrence referenced at 78) so the loader
attempts the exact/canonical glob first and only falls back to the fuzzy
wildcard afterwards.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4b852c2f-8ef6-4290-9545-359691f0e97d

📥 Commits

Reviewing files that changed from the base of the PR and between dc8293e and 9cb6664.

⛔ Files ignored due to path filters (1)
  • src/bmm/module-help.csv is excluded by !**/*.csv
📒 Files selected for processing (5)
  • src/bmm/agents/pm.agent.yaml
  • src/bmm/agents/sm.agent.yaml
  • src/bmm/workflows/4-implementation/correct-course/checklist.md
  • src/bmm/workflows/4-implementation/correct-course/workflow.md
  • src/bmm/workflows/4-implementation/correct-course/workflow.yaml
💤 Files with no reviewable changes (1)
  • src/bmm/workflows/4-implementation/correct-course/workflow.yaml

Step 5 of 9 in yaml-to-md conversion plan. Merges workflow.yaml config
(6 input_file_patterns including INDEX_GUIDED) and instructions.md
execution logic into a single self-contained workflow.md. Updates
references in sm.agent.yaml, pm.agent.yaml, module-help.csv, and
checklist.md. Deletes workflow.yaml and instructions.md.

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