chore(correct-course): convert workflow.yaml to unified workflow.md#1858
Conversation
🤖 Augment PR SummarySummary: This PR consolidates the “Correct Course” (course correction) workflow into the unified Markdown workflow format. Changes:
Technical Notes: Orchestration metadata (name/description) now lives in Markdown frontmatter, aligning this workflow with other unified 🤖 Was this summary useful? React with 👍 or 👎 |
📝 WalkthroughWalkthroughThis 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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 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: 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*.mdglobs and the explicit "be flexible" instruction, this can pull the wrong artifact whenplanning_artifactscontains 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
⛔ Files ignored due to path filters (1)
src/bmm/module-help.csvis excluded by!**/*.csv
📒 Files selected for processing (5)
src/bmm/agents/pm.agent.yamlsrc/bmm/agents/sm.agent.yamlsrc/bmm/workflows/4-implementation/correct-course/checklist.mdsrc/bmm/workflows/4-implementation/correct-course/workflow.mdsrc/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>
9cb6664 to
3aee4f5
Compare
Summary
workflow.mdworkflow.yamland renamesinstructions.mdtoworkflow.md, merging orchestration metadata into frontmatterpm.agent.yaml,sm.agent.yaml,module-help.csv, andchecklist.mdTest plan
🤖 Generated with Claude Code