Skip to content

Convert code-review workflow to native skill packaging#1941

Merged
alexeyv merged 3 commits intomainfrom
convert-code-review-skill
Mar 14, 2026
Merged

Convert code-review workflow to native skill packaging#1941
alexeyv merged 3 commits intomainfrom
convert-code-review-skill

Conversation

@alexeyv
Copy link
Copy Markdown
Collaborator

@alexeyv alexeyv commented Mar 12, 2026

Summary

  • convert src/bmm/workflows/4-implementation/code-review into native skill directory src/bmm/workflows/4-implementation/bmad-code-review
  • set workflow packaging to type: skill and add SKILL.md
  • keep workflow/checklist/discover-inputs content mechanically identical aside from required name/path updates
  • update dependent references in module-help.csv, dev.agent.yaml, and quick-flow-solo-dev.agent.yaml

Validation

  • node tools/cli/bmad-cli.js install --directory /Users/alex/src/bmad --modules bmm --tools claude-code --yes
  • verified installed output at /Users/alex/src/bmad/.claude/skills/bmad-code-review/
  • verified manifest placement: present in _bmad/_config/skill-manifest.csv; absent from _bmad/_config/workflow-manifest.csv after clean reinstall pass
  • functional equivalence (mechanical protocol): normalized old-vs-new workflow parity PASS; discover-inputs.md hash parity PASS; checklist.md hash parity PASS
  • npm test

@augmentcode
Copy link
Copy Markdown

augmentcode bot commented Mar 12, 2026

🤖 Augment PR Summary

Summary: Migrates the BMM code-review workflow into a native skill (bmad-code-review) by adding SKILL.md and switching packaging to type: skill.

Changes: Renames the workflow directory, updates workflow frontmatter/path assumptions for the new layout, and repoints agent menu triggers to the new location.

🤖 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. No suggestions at this time.

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

@alexeyv alexeyv force-pushed the convert-code-review-skill branch from b114de0 to d206560 Compare March 14, 2026 11:31
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 14, 2026

📝 Walkthrough

Walkthrough

The PR converts the bmad-code-review workflow into a native skill by creating a skill metadata structure (SKILL.md and manifest), removing the old workflow manifest, updating path references, and modifying two agent files to reference the skill via "skill:bmad-code-review" instead of filesystem paths.

Changes

Cohort / File(s) Summary
Agent Configuration
src/bmm/agents/dev.agent.yaml, src/bmm/agents/quick-flow-solo-dev.agent.yaml
Updated code-review execution targets from workflow filesystem paths to skill reference "skill:bmad-code-review".
New Skill Metadata
src/bmm/workflows/4-implementation/bmad-code-review/SKILL.md, src/bmm/workflows/4-implementation/bmad-code-review/bmad-skill-manifest.yaml
Added skill documentation and manifest files declaring the bmad-code-review skill resource.
Workflow Migration
src/bmm/workflows/4-implementation/bmad-code-review/workflow.md
Updated installed_path from absolute project-root reference to relative current directory path (.).
Legacy Cleanup
src/bmm/workflows/4-implementation/code-review/bmad-skill-manifest.yaml
Removed obsolete workflow manifest file.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • BMAD-METHOD#1936: Performs the same workflow-to-skill conversion pattern with SKILL.md, skill manifest addition, old manifest removal, and agent exec reference updates.
  • BMAD-METHOD#1933: Implements identical refactoring pattern converting workflows into native skill packages and updating agent exec references to use "skill:".
  • BMAD-METHOD#1939: Applies the same conversion approach for bmad-create-story, including SKILL.md/skill manifest addition, workflow manifest removal, and agent YAML updates to skill references.

Suggested reviewers

  • bmadcode
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and specifically describes the main change: converting a workflow to native skill packaging.
Description check ✅ Passed The description is directly related to the changeset, detailing the conversion of code-review workflow to skill packaging with validation steps performed.
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
  • Commit unit tests in branch convert-code-review-skill
📝 Coding Plan
  • Generate coding plan for human review comments

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: 1

🧹 Nitpick comments (2)
src/bmm/workflows/4-implementation/bmad-code-review/SKILL.md (1)

3-3: Description text is over-coupled to literal trigger phrasing.

Line 3 hard-codes specific English utterances ("run code review", "review this code"). That will drift from actual trigger sources (agent menus/module-help) and is brittle for non-English sessions. Keep SKILL metadata capability-focused and keep trigger logic in dispatch configs.

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

In `@src/bmm/workflows/4-implementation/bmad-code-review/SKILL.md` at line 3, The
SKILL metadata's description currently hard-codes example trigger phrases ("run
code review", "review this code"); remove those literal utterances from the
description field in SKILL.md and replace with a capability-focused sentence
describing what the skill does (e.g., "Perform adversarial code review to
identify issues and suggest fixes"), leaving trigger phrasing to
dispatch/trigger configs; update the description key in SKILL.md (the
'description' value) only—do not add trigger logic here and ensure no
language-specific examples remain.
src/bmm/agents/dev.agent.yaml (1)

37-37: Hardcoded skill ID is duplicated across agent menus.

skill:bmad-code-review is now repeated in multiple agents. Centralize this mapping (single source of truth) to avoid future drift when IDs or routing change.

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

In `@src/bmm/agents/dev.agent.yaml` at line 37, The exec entry
"skill:bmad-code-review" is hardcoded and duplicated across agent menus;
centralize this mapping by moving the skill ID into a single source (e.g., a
shared skills mapping file or YAML anchor/alias) and reference that centralized
symbol from each agent instead of embedding "skill:bmad-code-review" directly;
update the dev.agent.yaml exec field to use the shared identifier (the
centralized key you create) and change other agent YAMLs to reference the same
key so all agents use one canonical mapping (search for exec:
"skill:bmad-code-review" to locate all occurrences and replace them with the
centralized reference).
🤖 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/bmad-code-review/SKILL.md`:
- Line 6: The skill entrypoint currently launches the workflow directly ("Follow
the instructions in workflow.md.") and must not auto-run high-impact fixes
without confirmation; modify the entry logic that invokes the workflow to
present an explicit modal/CLI prompt or flag check distinguishing read-only
(scan-only) vs fix-mode (auto-fix) before proceeding, require the user to
affirmatively choose fix-mode (e.g., `--apply` or an interactive "Apply fixes?
(yes/no)") and clearly log the chosen mode; update any references in SKILL.md
and the workflow invocation code to document and enforce this confirmation step.

---

Nitpick comments:
In `@src/bmm/agents/dev.agent.yaml`:
- Line 37: The exec entry "skill:bmad-code-review" is hardcoded and duplicated
across agent menus; centralize this mapping by moving the skill ID into a single
source (e.g., a shared skills mapping file or YAML anchor/alias) and reference
that centralized symbol from each agent instead of embedding
"skill:bmad-code-review" directly; update the dev.agent.yaml exec field to use
the shared identifier (the centralized key you create) and change other agent
YAMLs to reference the same key so all agents use one canonical mapping (search
for exec: "skill:bmad-code-review" to locate all occurrences and replace them
with the centralized reference).

In `@src/bmm/workflows/4-implementation/bmad-code-review/SKILL.md`:
- Line 3: The SKILL metadata's description currently hard-codes example trigger
phrases ("run code review", "review this code"); remove those literal utterances
from the description field in SKILL.md and replace with a capability-focused
sentence describing what the skill does (e.g., "Perform adversarial code review
to identify issues and suggest fixes"), leaving trigger phrasing to
dispatch/trigger configs; update the description key in SKILL.md (the
'description' value) only—do not add trigger logic here and ensure no
language-specific examples remain.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5767030b-c6f9-4273-afe1-f5b845ff774b

📥 Commits

Reviewing files that changed from the base of the PR and between 405fd93 and d206560.

⛔ Files ignored due to path filters (1)
  • src/bmm/module-help.csv is excluded by !**/*.csv
📒 Files selected for processing (8)
  • src/bmm/agents/dev.agent.yaml
  • src/bmm/agents/quick-flow-solo-dev.agent.yaml
  • src/bmm/workflows/4-implementation/bmad-code-review/SKILL.md
  • src/bmm/workflows/4-implementation/bmad-code-review/bmad-skill-manifest.yaml
  • src/bmm/workflows/4-implementation/bmad-code-review/checklist.md
  • src/bmm/workflows/4-implementation/bmad-code-review/discover-inputs.md
  • src/bmm/workflows/4-implementation/bmad-code-review/workflow.md
  • src/bmm/workflows/4-implementation/code-review/bmad-skill-manifest.yaml
💤 Files with no reviewable changes (1)
  • src/bmm/workflows/4-implementation/code-review/bmad-skill-manifest.yaml

description: 'Perform adversarial code review finding specific issues. Use when the user says "run code review" or "review this code"'
---

Follow the instructions in [workflow.md](workflow.md).
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Skill entrypoint does not warn about write side effects.

Line 6 directly launches a workflow that can auto-fix code and update story/sprint files. That is high-impact behavior for a command users may invoke as “just review.” Add an explicit read-only vs fix-mode confirmation at entry.

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

In `@src/bmm/workflows/4-implementation/bmad-code-review/SKILL.md` at line 6, The
skill entrypoint currently launches the workflow directly ("Follow the
instructions in workflow.md.") and must not auto-run high-impact fixes without
confirmation; modify the entry logic that invokes the workflow to present an
explicit modal/CLI prompt or flag check distinguishing read-only (scan-only) vs
fix-mode (auto-fix) before proceeding, require the user to affirmatively choose
fix-mode (e.g., `--apply` or an interactive "Apply fixes? (yes/no)") and clearly
log the chosen mode; update any references in SKILL.md and the workflow
invocation code to document and enforce this confirmation step.

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