Skip to content

refactor(core-skills): flatten 7 skills by inlining workflow.md#2077

Merged
alexeyv merged 2 commits intomainfrom
flatten-core-skills
Mar 20, 2026
Merged

refactor(core-skills): flatten 7 skills by inlining workflow.md#2077
alexeyv merged 2 commits intomainfrom
flatten-core-skills

Conversation

@alexeyv
Copy link
Copy Markdown
Collaborator

@alexeyv alexeyv commented Mar 20, 2026

Summary

  • Inlines workflow.md content directly into SKILL.md for 7 core skills: editorial-review-prose, editorial-review-structure, help, index-docs, review-adversarial-general, review-edge-case-hunter, and shard-doc
  • Deletes the now-redundant workflow.md files
  • Same pattern as advanced-elicitation in PR refactor(skill): flatten advanced-elicitation by inlining workflow #2076 — no behavioral change

Test plan

  • npm run quality passes (238 tests, lint, markdown lint, format all green)
  • Adversarial review: no content lost, no broken references, all frontmatter intact
  • Manual: invoke each flattened skill and verify it loads correctly

🤖 Generated with Claude Code

@augmentcode
Copy link
Copy Markdown

augmentcode bot commented Mar 20, 2026

🤖 Augment PR Summary

Summary: This PR flattens several core skills by embedding their former workflow.md instructions directly into SKILL.md, making each skill self-contained.

Changes:

  • Inlined workflow content into SKILL.md for 7 core skills: editorial-review-prose, editorial-review-structure, help, index-docs, review-adversarial-general, review-edge-case-hunter, and shard-doc.
  • Removed the now-redundant workflow.md files from those skill directories.
  • Preserved existing frontmatter (name/description) while expanding the body content to include full execution rules and output formats.

Technical Notes: This follows the same “flattened skill” pattern used elsewhere (e.g., advanced-elicitation), aiming for no functional/behavioral change while simplifying packaging and reducing cross-file indirection.

🤖 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. 2 suggestions posted.

Fix All in Augment

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


- **Empty `phase` = anytime** — Universal tools work regardless of workflow state
- **Numbered phases indicate sequence** — Phases like `1-discover` → `2-define` → `3-build` → `4-ship` flow in order (naming varies by module)
- **Phase with no Required Steps** - If an entire phase has no required, true items, the entire phase is optional. If it is sequentially before another phase, it can be recommended, but always be clear with the use what the true next required item is.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This sentence reads like a typo: "be clear with the use" (likely "user"), which could make the routing rule ambiguous for the agent.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

### Step 3: Execute Sharding

- Inform user that sharding is beginning
- Execute command: `npx @kayvan/markdown-tree-parser explode [source-document] [destination-folder]`
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Consider clarifying how to handle paths with spaces when forming this command (e.g., quoting [source-document]/[destination-folder]), otherwise copy/paste execution can fail on common inputs.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

…SKILL.md

Inline workflow.md content directly into SKILL.md for: editorial-review-prose,
editorial-review-structure, help, index-docs, review-adversarial-general,
review-edge-case-hunter, and shard-doc. Deletes the now-redundant workflow.md
files. No behavioral change — same pattern as advanced-elicitation in PR #2076.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@alexeyv alexeyv force-pushed the flatten-core-skills branch from 18471cc to f100d6f Compare March 20, 2026 17:24
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 20, 2026

📝 Walkthrough

Walkthrough

This PR consolidates workflow specifications across seven core skills by moving comprehensive procedural details from separate workflow.md files into SKILL.md files, then deletes the now-redundant workflow.md files. Each skill now contains a complete, self-contained specification in a single document.

Changes

Cohort / File(s) Summary
Editorial Review Skills
src/core-skills/bmad-editorial-review-prose/SKILL.md, src/core-skills/bmad-editorial-review-prose/workflow.md, src/core-skills/bmad-editorial-review-structure/SKILL.md, src/core-skills/bmad-editorial-review-structure/workflow.md
Inlined complete editorial-review specifications (role, goal, inputs with optional style_guide override, principles, step-by-step control flow, halt conditions, and output formatting) into SKILL.md files; deleted corresponding workflow.md files. Prose spec (+81/-1) adds four-step flow with deduplication and uncertainty handling. Structure spec (+174/-1) introduces six-step analysis with prioritized recommendations.
Review Skills
src/core-skills/bmad-review-adversarial-general/SKILL.md, src/core-skills/bmad-review-adversarial-general/workflow.md, src/core-skills/bmad-review-edge-case-hunter/SKILL.md, src/core-skills/bmad-review-edge-case-hunter/workflow.md
Consolidated review procedures into SKILL.md with explicit inputs, execution steps, and halt conditions. Adversarial-review spec (+32/-1) defines content validation and finding requirements. Edge-case-hunter spec (+62/-1) mandates exhaustive path enumeration, scope constraints, and strict JSON-only output schema.
Documentation/Organization Skills
src/core-skills/bmad-help/SKILL.md, src/core-skills/bmad-help/workflow.md, src/core-skills/bmad-index-docs/SKILL.md, src/core-skills/bmad-index-docs/workflow.md, src/core-skills/bmad-shard-doc/SKILL.md, src/core-skills/bmad-shard-doc/workflow.md
Moved complete specifications into SKILL.md files with detailed execution procedures and halt conditions. Help spec (+87/-1) adds routing rules, display rules, and module-detection logic. Index-docs spec (+61/-1) defines directory scanning, grouping, and index generation. Shard-doc spec (+100/-1) introduces six-step sharding flow and post-sharding user prompts with file-handling options.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • BMAD-METHOD#1875: Modifies the same bmad-editorial-review-structure skill, updating SKILL.md and workflow.md with overlapping semantic changes.
  • BMAD-METHOD#1868: Refactors skill representation to make SKILL.md the canonical entrypoint, updating installer/validation parsing—directly aligned with this PR's consolidation pattern.
  • BMAD-METHOD#1896: Performs the same code-level refactor for bmad-shard-doc, introducing SKILL.md and removing the previous workflow representation.

Suggested reviewers

  • bmadcode
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: inlining workflow.md into SKILL.md for 7 core skills.
Description check ✅ Passed The description accurately explains the refactoring work: inlining workflow.md content into SKILL.md, deleting redundant files, and references a similar pattern from PR #2076.
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
  • Commit unit tests in branch flatten-core-skills

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 (3)
src/core-skills/bmad-shard-doc/SKILL.md (1)

76-93: Use level-3 headings instead of #### in workflow sections.

The subsection headers under Step 6 should avoid level-4 headings to stay consistent with project formatting conventions.

✍️ Suggested markdown change
-#### If user selects `d` (delete)
+### If user selects `d` (delete)
...
-#### If user selects `m` (move)
+### If user selects `m` (move)
...
-#### If user selects `k` (keep)
+### If user selects `k` (keep)

As per coding guidelines, docs-style conventions for these skill/workflow instructions specify to avoid ####.

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

In `@src/core-skills/bmad-shard-doc/SKILL.md` around lines 76 - 93, Replace the
level-4 subsection headers under Step 6 with level-3 headers: change "#### If
user selects `d` (delete)", "#### If user selects `m` (move)" and "#### If user
selects `k` (keep)" to "### If user selects `d` (delete)", "### If user selects
`m` (move)" and "### If user selects `k` (keep)"; ensure the surrounding
workflow text (delete/move/keep steps and examples such as the default archive
path) remains unchanged and that heading levels are consistent with the rest of
SKILL.md.
src/core-skills/bmad-review-adversarial-general/SKILL.md (1)

27-37: Clarify findings threshold behavior (>=10 vs 0)

The contract is inconsistent: Line 27 requires at least ten issues, but Line 36 only halts on zero. Please define behavior for 1..9 findings (e.g., re-analyze once, then return best-effort with rationale).

Proposed wording adjustment
- Review with extreme skepticism — assume problems exist. Find at least ten issues to fix or improve in the provided content.
+ Review with extreme skepticism — assume problems exist. Target at least ten substantive issues to fix or improve in the provided content.

- - HALT if zero findings — this is suspicious, re-analyze or ask for guidance
+ - If findings < 10, re-analyze once for missed issues; if still < 10, return findings with a brief note explaining constraints
+ - HALT if zero findings after re-analysis; ask for guidance
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/core-skills/bmad-review-adversarial-general/SKILL.md` around lines 27 -
37, The SKILL.md contract is inconsistent about findings thresholds: "Step 3:
Present Findings" requires at least ten issues but "HALT CONDITIONS" only halts
on zero; update the text for Step 3 and HALT CONDITIONS to define explicit
behavior for 1..9 findings (e.g., attempt one re-analysis, then return a
best-effort list with a rationale), change the "at least ten" requirement to a
clear threshold statement (>=10) and add a new clause in HALT CONDITIONS that
describes re-analysis behavior and the required rationale when fewer than ten
findings are produced; modify the headings or sentences around "Step 3: Present
Findings" and "HALT CONDITIONS" so they reference the same numeric rule and
include the re-analysis and rationale steps.
src/core-skills/bmad-review-edge-case-hunter/SKILL.md (1)

27-27: Avoid duplicating the HALT payload in two places.

Line 27 and Line 67 repeat the same JSON literal; this can drift over time. Prefer one canonical definition (e.g., keep full payload in HALT CONDITIONS and reference it from Step 1).

Also applies to: 67-67

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

In `@src/core-skills/bmad-review-edge-case-hunter/SKILL.md` at line 27, The HALT
JSON payload is duplicated in Step 1 and again in HALT CONDITIONS; remove the
copy in Step 1 and replace it with a reference to the canonical HALT payload
declared under "HALT CONDITIONS" (keep the full JSON only once under HALT
CONDITIONS and reference it from Step 1 by name, e.g., "see HALT CONDITIONS
canonical payload: [HALT JSON]"). Update any mention in Step 1 to clearly point
to the HALT CONDITIONS definition so the single source of truth is the payload
under HALT CONDITIONS.
🤖 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/core-skills/bmad-review-adversarial-general/SKILL.md`:
- Line 10: The role description under the "**Your Role:**" header contains a
personal-insult phrase ("clueless weasel") that conflicts with the stated
requirement for a professional, non-personal-attacks tone; replace that phrase
in SKILL.md (the "**Your Role:**" section) with adversarial but non-insulting
wording such as "a careless or overconfident submitter" or "a submitter prone to
sloppy work," preserving the cynical, skeptical reviewer stance and the rest of
the sentence structure and instructions.

---

Nitpick comments:
In `@src/core-skills/bmad-review-adversarial-general/SKILL.md`:
- Around line 27-37: The SKILL.md contract is inconsistent about findings
thresholds: "Step 3: Present Findings" requires at least ten issues but "HALT
CONDITIONS" only halts on zero; update the text for Step 3 and HALT CONDITIONS
to define explicit behavior for 1..9 findings (e.g., attempt one re-analysis,
then return a best-effort list with a rationale), change the "at least ten"
requirement to a clear threshold statement (>=10) and add a new clause in HALT
CONDITIONS that describes re-analysis behavior and the required rationale when
fewer than ten findings are produced; modify the headings or sentences around
"Step 3: Present Findings" and "HALT CONDITIONS" so they reference the same
numeric rule and include the re-analysis and rationale steps.

In `@src/core-skills/bmad-review-edge-case-hunter/SKILL.md`:
- Line 27: The HALT JSON payload is duplicated in Step 1 and again in HALT
CONDITIONS; remove the copy in Step 1 and replace it with a reference to the
canonical HALT payload declared under "HALT CONDITIONS" (keep the full JSON only
once under HALT CONDITIONS and reference it from Step 1 by name, e.g., "see HALT
CONDITIONS canonical payload: [HALT JSON]"). Update any mention in Step 1 to
clearly point to the HALT CONDITIONS definition so the single source of truth is
the payload under HALT CONDITIONS.

In `@src/core-skills/bmad-shard-doc/SKILL.md`:
- Around line 76-93: Replace the level-4 subsection headers under Step 6 with
level-3 headers: change "#### If user selects `d` (delete)", "#### If user
selects `m` (move)" and "#### If user selects `k` (keep)" to "### If user
selects `d` (delete)", "### If user selects `m` (move)" and "### If user selects
`k` (keep)"; ensure the surrounding workflow text (delete/move/keep steps and
examples such as the default archive path) remains unchanged and that heading
levels are consistent with the rest of SKILL.md.
🪄 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: 8a6155db-f9d4-4692-af76-b9bda14182fe

📥 Commits

Reviewing files that changed from the base of the PR and between 9725b0a and 8d1e8c0.

📒 Files selected for processing (14)
  • src/core-skills/bmad-editorial-review-prose/SKILL.md
  • src/core-skills/bmad-editorial-review-prose/workflow.md
  • src/core-skills/bmad-editorial-review-structure/SKILL.md
  • src/core-skills/bmad-editorial-review-structure/workflow.md
  • src/core-skills/bmad-help/SKILL.md
  • src/core-skills/bmad-help/workflow.md
  • src/core-skills/bmad-index-docs/SKILL.md
  • src/core-skills/bmad-index-docs/workflow.md
  • src/core-skills/bmad-review-adversarial-general/SKILL.md
  • src/core-skills/bmad-review-adversarial-general/workflow.md
  • src/core-skills/bmad-review-edge-case-hunter/SKILL.md
  • src/core-skills/bmad-review-edge-case-hunter/workflow.md
  • src/core-skills/bmad-shard-doc/SKILL.md
  • src/core-skills/bmad-shard-doc/workflow.md
💤 Files with no reviewable changes (7)
  • src/core-skills/bmad-review-adversarial-general/workflow.md
  • src/core-skills/bmad-index-docs/workflow.md
  • src/core-skills/bmad-editorial-review-prose/workflow.md
  • src/core-skills/bmad-help/workflow.md
  • src/core-skills/bmad-editorial-review-structure/workflow.md
  • src/core-skills/bmad-shard-doc/workflow.md
  • src/core-skills/bmad-review-edge-case-hunter/workflow.md


**Goal:** Cynically review content and produce findings.

**Your Role:** You are a cynical, jaded reviewer with zero patience for sloppy work. The content was submitted by a clueless weasel and you expect to find problems. Be skeptical of everything. Look for what's missing, not just what's wrong. Use a precise, professional tone — no profanity or personal attacks.
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 | 🟡 Minor

Remove contradictory/insulting persona wording

“submitted by a clueless weasel” conflicts with the same line’s “professional tone” and “no personal attacks.” Keep the adversarial stance, but remove personal-insult language.

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

In `@src/core-skills/bmad-review-adversarial-general/SKILL.md` at line 10, The
role description under the "**Your Role:**" header contains a personal-insult
phrase ("clueless weasel") that conflicts with the stated requirement for a
professional, non-personal-attacks tone; replace that phrase in SKILL.md (the
"**Your Role:**" section) with adversarial but non-insulting wording such as "a
careless or overconfident submitter" or "a submitter prone to sloppy work,"
preserving the cynical, skeptical reviewer stance and the rest of the sentence
structure and instructions.

@alexeyv alexeyv merged commit 6a73623 into main Mar 20, 2026
5 checks passed
@alexeyv alexeyv deleted the flatten-core-skills branch March 20, 2026 17:29
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