Skip to content

feat(tasks): convert review-adversarial-general XML task to native skill#1857

Merged
alexeyv merged 4 commits intobmad-code-org:mainfrom
alexeyv:convert-task-to-skill
Mar 8, 2026
Merged

feat(tasks): convert review-adversarial-general XML task to native skill#1857
alexeyv merged 4 commits intobmad-code-org:mainfrom
alexeyv:convert-task-to-skill

Conversation

@alexeyv
Copy link
Copy Markdown
Collaborator

@alexeyv alexeyv commented Mar 8, 2026

Summary

  • Converts the simplest core task (review-adversarial-general.xml) from XML type:task to markdown type:skill, establishing the pattern for converting remaining XML tasks
  • Extends the manifest generator getTasksFromDir to recurse into subdirectories and detect type:skill entries (mirrors existing workflow skill detection)
  • Updates all consumers (quick-dev, quick-spec, quick-dev-new-preview) to invoke by skill name instead of _bmad/ file path references

What changed

File Change
src/core/tasks/bmad-review-adversarial-general/workflow.md New markdown skill (replaces XML)
src/core/tasks/bmad-review-adversarial-general/bmad-skill-manifest.yaml type: skill manifest
src/core/tasks/review-adversarial-general.xml Deleted
src/core/tasks/bmad-skill-manifest.yaml Removed old entry
src/core/module-help.csv Path changed to skill: prefix
tools/cli/installers/lib/core/manifest-generator.js getTasksFromDir now supports skill subdirectories
4 workflow step files invoke-task replaced with skill name invocation

Test plan

  • npm test - all 197 tests pass
  • Installer produces correct skill-manifest.csv entry
  • .claude/skills/bmad-review-adversarial-general/ contains SKILL.md + workflow.md
  • Before/after behavioral test: OLD (XML) and NEW (markdown) formats reviewed the same JS diff, producing 14 findings each with ~85% overlap and 0 conversion bugs

@augmentcode
Copy link
Copy Markdown

augmentcode bot commented Mar 8, 2026

🤖 Augment PR Summary

Summary: This PR migrates the core adversarial review task from an XML type:task artifact to a native Markdown type:skill, and updates discovery + workflow consumers to use the skill name.

Changes:

  • Added new skill directory src/core/tasks/bmad-review-adversarial-general/ with workflow.md and a bmad-skill-manifest.yaml marking it as type: skill.
  • Removed the legacy src/core/tasks/review-adversarial-general.xml and deleted its entry from the core task manifest.
  • Extended the CLI manifest generator to scan task subdirectories for type:skill entries and emit them into skill-manifest.csv.
  • Updated quick-dev / quick-spec / quick-dev-new-preview workflow steps to invoke the adversarial review by skill name (bmad-review-adversarial-general) instead of an _bmad/ file path.

Technical notes: Skill discovery for task-subdirectories relies on reading workflow.md frontmatter (name/description) and a sidecar bmad-skill-manifest.yaml with type: skill.

🤖 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. 5 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 PR transitions the adversarial review functionality from an XML task-based approach to a skill-based architecture. This involves updating multiple workflows to invoke the new bmad-review-adversarial-general skill instead of the old task, creating a new skill definition with manifest and workflow, removing the legacy XML task file, and updating the manifest generator to recognize skill-type directories.

Changes

Cohort / File(s) Summary
Quick-flow workflow updates
src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-04-review.md, src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/workflow.md, src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-05-adversarial-review.md, src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-04-review.md
Updated review invocations to use bmad-review-adversarial-general skill instead of XML task file. Enhanced step-04-review.md to handle zero findings with HALT directive, evaluate severity and validity, order findings, and format results as numbered items or TODO conversions.
New skill definition
src/core/tasks/bmad-review-adversarial-general/bmad-skill-manifest.yaml, src/core/tasks/bmad-review-adversarial-general/workflow.md
Introduced new skill manifest and workflow defining adversarial review process with three execution steps: receive content, perform adversarial analysis (minimum ten issues), and present findings as Markdown list. Includes halt conditions for empty content or zero findings.
Legacy task removal
src/core/tasks/bmad-skill-manifest.yaml, src/core/tasks/review-adversarial-general.xml
Removed review-adversarial-general.xml task entry and its manifest declaration from core tasks registry.
Manifest generator updates
tools/cli/installers/lib/core/manifest-generator.js
Added subdirectory recursion in getTasksFromDir to identify and process skill-type directories via their bmad-skill-manifest.yaml. Extracts skill metadata (name, description, canonicalId) and populates skills array with computed install paths.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • bmadcode
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and clearly describes the main change: converting an XML task to a native skill format.
Description check ✅ Passed The description is well-structured and directly relates to the changeset, providing clear context about the conversion and test validation.
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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (5)
src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-05-adversarial-review.md (5)

10-10: ⚠️ Potential issue | 🟡 Minor

Stale "task" terminology in Goal.

Line 10 says "invoke adversarial review task" — should be "skill" for consistency.

📝 Proposed fix
-**Goal:** Construct diff of all changes, invoke adversarial review task, present findings.
+**Goal:** Construct diff of all changes, invoke adversarial review skill, present findings.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-05-adversarial-review.md`
at line 10, Update the Goal line that currently reads "invoke adversarial review
task" to use the consistent terminology "invoke adversarial review skill";
specifically find the string "invoke adversarial review task" in the document
and replace "task" with "skill" so the Goal becomes "Construct diff of all
changes, invoke adversarial review skill, present findings."

96-96: ⚠️ Potential issue | 🟡 Minor

Stale "task" in failure modes.

Line 96 says "Invoking task without providing diff input" — should be "skill."

📝 Proposed fix
-- Invoking task without providing diff input
+- Invoking skill without providing diff input
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-05-adversarial-review.md`
at line 96, Update the stale wording in the document: replace the phrase
"Invoking task without providing diff input" with "Invoking skill without
providing diff input" in quick-dev/step-05-adversarial-review.md (look for the
sentence currently using "task") so the failure mode correctly references
"skill" instead of "task".

68-68: ⚠️ Potential issue | 🟡 Minor

Stale "task output" reference.

Line 68 says "Capture the findings from the task output" but the invocation is now a skill.

📝 Proposed fix
-Capture the findings from the task output.
+Capture the findings from the skill output.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-05-adversarial-review.md`
at line 68, Update the stale phrase "Capture the findings from the task output"
in step-05-adversarial-review.md to reference the new invocation type (e.g.,
"Capture the findings from the skill output"); search for and replace any other
occurrences of "task output" within this step to "skill output" (or equivalent
consistent wording) so the documentation matches the current implementation and
invocation model.

3-3: ⚠️ Potential issue | 🟡 Minor

Stale "task" terminology in frontmatter description.

Line 3 description says "invoke adversarial review task" but the PR converts this to a skill. Should be "invoke adversarial review skill" for consistency.

📝 Proposed fix
-description: 'Construct diff and invoke adversarial review task'
+description: 'Construct diff and invoke adversarial review skill'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-05-adversarial-review.md`
at line 3, Update the YAML frontmatter "description" value in the quick-dev step
for the adversarial review (the frontmatter key named description in
step-05-adversarial-review.md) to replace the stale word "task" with "skill" so
it reads "Construct diff and invoke adversarial review skill" (maintain
punctuation and casing).

88-88: ⚠️ Potential issue | 🟡 Minor

Stale "Task invoked" in success metrics.

Line 88 says "Task invoked with diff as input" — should reference "Skill."

📝 Proposed fix
-- Task invoked with diff as input
+- Skill invoked with diff as input
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-05-adversarial-review.md`
at line 88, Replace the stale success-metric string "Task invoked with diff as
input" in step-05-adversarial-review.md with a referent to "Skill" (e.g., "Skill
invoked with diff as input") so the metric correctly references the Skill;
locate the exact string "Task invoked with diff as input" and update it to the
new phrasing wherever it appears in the document.
🧹 Nitpick comments (3)
tools/cli/installers/lib/core/manifest-generator.js (1)

459-485: Silent failure when type:skill directory lacks workflow.md or required frontmatter.

If a directory has type: skill in its manifest but workflow.md is missing (line 462 check fails) or lacks name/description (line 467 check fails), the code silently continues without any warning. This could cause confusion when a skill doesn't appear in the generated manifest.

Consider adding debug logging consistent with the workflow branch (e.g., lines 217-220, 231-234).

🔍 Proposed debug logging
         if (subArtifactType === 'skill') {
           // This subdirectory is a type:skill — process its workflow.md
           const workflowPath = path.join(fullPath, 'workflow.md');
           if (await fs.pathExists(workflowPath)) {
             // ... existing code ...
+          } else {
+            if (process.env.BMAD_DEBUG_MANIFEST === 'true') {
+              console.log(`[DEBUG] Skipped skill (no workflow.md): ${fullPath}`);
+            }
           }
         }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tools/cli/installers/lib/core/manifest-generator.js` around lines 459 - 485,
When encountering a subArtifactType === 'skill' that doesn't add a skill entry,
add diagnostic logging so missing workflow.md or missing frontmatter fields are
visible: in the block handling subArtifactType === 'skill' (use symbols
workflowPath, frontmatterMatch, frontmatter, canonicalId, this.skills,
this.getInstallToBmad, this.cleanForCSV to find the code), log a warning when
fs.pathExists(workflowPath) is false and another warning when frontmatter exists
but frontmatter.name or frontmatter.description are missing; mirror the logging
style used in the workflow branch so messages clearly state the moduleName and
entry.name/canonicalId and indicate whether the file or required fields are
missing.
src/core/tasks/bmad-review-adversarial-general/workflow.md (2)

23-23: Content type identification has no downstream effect.

Step 1 instructs to "Identify content type (diff, branch, uncommitted changes, document, etc.)" but the subsequent steps never reference or use this classification. Either remove the instruction or explain how content type should influence the review.

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

In `@src/core/tasks/bmad-review-adversarial-general/workflow.md` at line 23, The
instruction "Identify content type (diff, branch, uncommitted changes, document,
etc.)" in Step 1 of workflow.md has no downstream effect; either remove that
line or augment it to state how the identified content type affects later steps
(e.g., by mapping content types to different review actions or checklists).
Update the Step 1 text so it either deletes the content-type identification or
replaces it with guidance such as "Identify content type and use X checklist for
diffs, Y checklist for branches, Z checklist for uncommitted changes" and
reference the affected steps or checklists so the classification is actually
used.

27-27: Hardcoded "at least ten issues" may be inappropriate for small artifacts.

Requiring "at least ten issues" for every review—regardless of artifact size—could force padding with noise for trivial changes (e.g., a 5-line config change). Consider softening to "identify as many issues as exist, targeting at least ten for substantive artifacts."

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

In `@src/core/tasks/bmad-review-adversarial-general/workflow.md` at line 27,
Replace the hardcoded sentence "Review with extreme skepticism — assume problems
exist. Find at least ten issues to fix or improve in the provided content." with
a softened, size-aware instruction: keep the "extreme skepticism" guidance but
change the requirement to something like "Identify as many issues as exist; for
substantive artifacts aim for at least ten issues" so small artifacts aren't
forced to pad reviews; update the line in workflow.md (the quoted instruction
string) and any related examples or tests that assert exactly ten issues to
accept a flexible target or document thresholds for trivial vs substantive
artifacts.
🤖 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/bmad-quick-flow/quick-spec/steps/step-04-review.md`:
- Line 159: Update the stale phrase "Capture the findings from the task output"
to reference the new skill invocation—replace it with something like "Capture
the findings from the skill invocation" or "Capture the findings from the skill
result" in step-04-review.md (search for that exact sentence and update it).
Ensure any surrounding instructions that mention "task output" are also adjusted
to consistently refer to the skill invocation/result so consumers of the step
are not confused.

In `@src/core/tasks/bmad-review-adversarial-general/workflow.md`:
- Around line 22-23: The workflow currently says "If content to review is empty,
ask for clarification and abort" which conflicts with subagent usage that
provides no conversation context (see the "Review subagents get NO conversation
context" note in step-04-review.md); update the logic in workflow.md so that
when invoked as a subagent and the content is empty it does not attempt to ask
for clarification but instead fails immediately with a clear, machine-readable
error message (e.g., "empty_content_for_subagent") and aborts; locate the rule
text "If content to review is empty, ask for clarification and abort" and
replace or augment it to branch on subagent invocation, returning a clear error
message when no conversation context is present.

In `@tools/cli/installers/lib/core/manifest-generator.js`:
- Around line 463-467: The YAML frontmatter parse in manifest-generator.js uses
yaml.parse(frontmatterMatch[1]) without error handling, so wrap that parse in a
try-catch around the call to yaml.parse (referencing frontmatterMatch,
frontmatter and workflowPath) and on parse failure log a warning (consistent
with the existing workflow handling style) and skip processing that workflow
rather than letting the exception bubble up; ensure the catch includes the error
details in the warning message.

---

Outside diff comments:
In
`@src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-05-adversarial-review.md`:
- Line 10: Update the Goal line that currently reads "invoke adversarial review
task" to use the consistent terminology "invoke adversarial review skill";
specifically find the string "invoke adversarial review task" in the document
and replace "task" with "skill" so the Goal becomes "Construct diff of all
changes, invoke adversarial review skill, present findings."
- Line 96: Update the stale wording in the document: replace the phrase
"Invoking task without providing diff input" with "Invoking skill without
providing diff input" in quick-dev/step-05-adversarial-review.md (look for the
sentence currently using "task") so the failure mode correctly references
"skill" instead of "task".
- Line 68: Update the stale phrase "Capture the findings from the task output"
in step-05-adversarial-review.md to reference the new invocation type (e.g.,
"Capture the findings from the skill output"); search for and replace any other
occurrences of "task output" within this step to "skill output" (or equivalent
consistent wording) so the documentation matches the current implementation and
invocation model.
- Line 3: Update the YAML frontmatter "description" value in the quick-dev step
for the adversarial review (the frontmatter key named description in
step-05-adversarial-review.md) to replace the stale word "task" with "skill" so
it reads "Construct diff and invoke adversarial review skill" (maintain
punctuation and casing).
- Line 88: Replace the stale success-metric string "Task invoked with diff as
input" in step-05-adversarial-review.md with a referent to "Skill" (e.g., "Skill
invoked with diff as input") so the metric correctly references the Skill;
locate the exact string "Task invoked with diff as input" and update it to the
new phrasing wherever it appears in the document.

---

Nitpick comments:
In `@src/core/tasks/bmad-review-adversarial-general/workflow.md`:
- Line 23: The instruction "Identify content type (diff, branch, uncommitted
changes, document, etc.)" in Step 1 of workflow.md has no downstream effect;
either remove that line or augment it to state how the identified content type
affects later steps (e.g., by mapping content types to different review actions
or checklists). Update the Step 1 text so it either deletes the content-type
identification or replaces it with guidance such as "Identify content type and
use X checklist for diffs, Y checklist for branches, Z checklist for uncommitted
changes" and reference the affected steps or checklists so the classification is
actually used.
- Line 27: Replace the hardcoded sentence "Review with extreme skepticism —
assume problems exist. Find at least ten issues to fix or improve in the
provided content." with a softened, size-aware instruction: keep the "extreme
skepticism" guidance but change the requirement to something like "Identify as
many issues as exist; for substantive artifacts aim for at least ten issues" so
small artifacts aren't forced to pad reviews; update the line in workflow.md
(the quoted instruction string) and any related examples or tests that assert
exactly ten issues to accept a flexible target or document thresholds for
trivial vs substantive artifacts.

In `@tools/cli/installers/lib/core/manifest-generator.js`:
- Around line 459-485: When encountering a subArtifactType === 'skill' that
doesn't add a skill entry, add diagnostic logging so missing workflow.md or
missing frontmatter fields are visible: in the block handling subArtifactType
=== 'skill' (use symbols workflowPath, frontmatterMatch, frontmatter,
canonicalId, this.skills, this.getInstallToBmad, this.cleanForCSV to find the
code), log a warning when fs.pathExists(workflowPath) is false and another
warning when frontmatter exists but frontmatter.name or frontmatter.description
are missing; mirror the logging style used in the workflow branch so messages
clearly state the moduleName and entry.name/canonicalId and indicate whether the
file or required fields are missing.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b3a42270-75cb-4a8e-922e-2af5be004eb5

📥 Commits

Reviewing files that changed from the base of the PR and between dc8293e and 711e882.

⛔ Files ignored due to path filters (1)
  • src/core/module-help.csv is excluded by !**/*.csv
📒 Files selected for processing (9)
  • src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-04-review.md
  • src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/workflow.md
  • src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-05-adversarial-review.md
  • src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-04-review.md
  • src/core/tasks/bmad-review-adversarial-general/bmad-skill-manifest.yaml
  • src/core/tasks/bmad-review-adversarial-general/workflow.md
  • src/core/tasks/bmad-skill-manifest.yaml
  • src/core/tasks/review-adversarial-general.xml
  • tools/cli/installers/lib/core/manifest-generator.js
💤 Files with no reviewable changes (3)
  • src/core/tasks/bmad-skill-manifest.yaml
  • src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/workflow.md
  • src/core/tasks/review-adversarial-general.xml

alexeyv added a commit to alexeyv/BMAD-METHOD that referenced this pull request Mar 8, 2026
Address review findings from PR bmad-code-org#1857: replace remaining "task"
references with "skill" in workflow steps and test documentation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
alexeyv and others added 4 commits March 8, 2026 06:51
…ve skill

Convert the simplest core task (review-adversarial-general.xml) from
type:task XML format to type:skill markdown format. This establishes
the pattern for converting remaining XML tasks to self-contained skills.

- Convert XML task to workflow.md with frontmatter, role, execution steps
- Add type:skill manifest for verbatim directory copying
- Extend manifest-generator getTasksFromDir to recurse into subdirectories
  and detect type:skill entries (mirrors existing workflow skill detection)
- Update cross-references in quick-dev-new-preview, quick-dev, quick-spec
- Update module-help.csv to use skill: prefix
Consumers of review-adversarial-general now invoke by skill name
instead of loading via _bmad/ file path. Removes the indirection
variable from frontmatter and inlines the skill name directly.
Teach collectWorkflows to also scan the tasks/ subdirectory for
type:skill entries. Skills can live anywhere in the source tree —
the workflow scanner just needs to look in more places.
Address review findings from PR bmad-code-org#1857: replace remaining "task"
references with "skill" in workflow steps and test documentation.

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