@clfhhc/bmad-methods-skills 0.1.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/config.json CHANGED
@@ -5,17 +5,13 @@
5
5
  "tempDir": "./.temp/bmad-method",
6
6
  "modules": [
7
7
  "bmm",
8
- "bmb",
9
- "cis",
10
8
  "core"
11
9
  ],
12
10
  "agentPaths": [
13
- "src/core/agents",
14
- "src/modules/*/agents"
11
+ "src/*/agents"
15
12
  ],
16
13
  "workflowPaths": [
17
- "src/core/workflows",
18
- "src/modules/*/workflows"
14
+ "src/*/workflows"
19
15
  ],
20
16
  "enhancements": {
21
17
  "optional": {
@@ -29,17 +25,17 @@
29
25
  },
30
26
  "auxiliaryResources": [
31
27
  {
32
- "src": "src/modules/bmm/data/documentation-standards.md",
28
+ "src": "src/bmm/agents/tech-writer/tech-writer-sidecar/documentation-standards.md",
33
29
  "dest": "bmm/tech-writer/data/documentation-standards.md",
34
30
  "name": "Documentation Standards"
35
31
  },
36
32
  {
37
- "src": "src/modules/bmm/testarch/tea-index.csv",
33
+ "src": "src/bmm/testarch/tea-index.csv",
38
34
  "dest": "bmm/tea/tea-index.csv",
39
35
  "name": "TEA Index"
40
36
  },
41
37
  {
42
- "src": "src/modules/bmm/testarch/knowledge",
38
+ "src": "src/bmm/testarch/knowledge",
43
39
  "dest": "bmm/tea/knowledge",
44
40
  "name": "TEA Knowledge Base",
45
41
  "isDirectory": true
package/convert.js CHANGED
@@ -11,7 +11,7 @@ import { writeSkill } from './src/utils/skill-writer.js';
11
11
  // Default config templates (fallback if BMAD repo doesn't have templates)
12
12
  const DEFAULT_CONFIG_TEMPLATES = {
13
13
  core: `# Your name/handle for personalized interactions
14
- user_name: ''
14
+ user_name: 'BMad'
15
15
 
16
16
  # Language for AI communication
17
17
  communication_language: English
@@ -20,7 +20,7 @@ communication_language: English
20
20
  document_output_language: English
21
21
 
22
22
  # Base output folder for BMAD artifacts
23
- output_folder: "{project-root}/documents/bmad"
23
+ output_folder: "_bmad-output"
24
24
  `,
25
25
  bmm: `# Your project name
26
26
  project_name: ''
@@ -29,33 +29,24 @@ project_name: ''
29
29
  # Affects how agents explain concepts
30
30
  user_skill_level: intermediate
31
31
 
32
- # Where to store planning artifacts (Briefs, PRDs, UX Designs, Architecture)
33
- planning_artifacts: "{project-root}/documents/bmad/planning-artifacts"
32
+ # Where to store planning artifacts
33
+ planning_artifacts: "{output_folder}/planning-artifacts"
34
34
 
35
- # Where to store implementation artifacts (Sprint status, stories, reviews)
36
- implementation_artifacts: "{project-root}/documents/bmad/implementation-artifacts"
35
+ # Where to store implementation artifacts
36
+ implementation_artifacts: "{output_folder}/implementation-artifacts"
37
37
 
38
38
  # Where to store long-term project knowledge (docs, research)
39
- project_knowledge: "{project-root}/docs"
39
+ project_knowledge: "docs"
40
40
 
41
41
  # TEA (Test Engineering Architect) options
42
42
  tea_use_mcp_enhancements: false
43
43
  tea_use_playwright_utils: false
44
44
 
45
45
  # Core Configuration Values (inherited)
46
- user_name: ''
46
+ user_name: 'BMad'
47
47
  communication_language: English
48
48
  document_output_language: English
49
- output_folder: "{project-root}/documents/bmad"
50
- `,
51
- bmb: `# Where to save custom agents, workflows, and modules
52
- bmb_creations_output_folder: "{project-root}/documents/bmad/bmb-creations"
53
-
54
- # Core Configuration Values (inherited)
55
- user_name: ''
56
- communication_language: English
57
- document_output_language: English
58
- output_folder: "{project-root}/documents/bmad"
49
+ output_folder: "_bmad-output"
59
50
  `,
60
51
  };
61
52
 
@@ -413,8 +404,8 @@ async function main() {
413
404
  // Normalize path to match BMAD content conventions
414
405
  if (relPath.startsWith('src/modules/')) {
415
406
  relPath = relPath.replace('src/modules/', '');
416
- } else if (relPath.startsWith('src/core/')) {
417
- relPath = relPath.replace('src/core/', 'core/');
407
+ } else if (relPath.startsWith('src/')) {
408
+ relPath = relPath.replace('src/', '');
418
409
  }
419
410
  skillMap.set(relPath, { module: agent.module, name: agent.name });
420
411
  }
@@ -424,8 +415,8 @@ async function main() {
424
415
  // Normalize path to match BMAD content conventions
425
416
  if (relPath.startsWith('src/modules/')) {
426
417
  relPath = relPath.replace('src/modules/', '');
427
- } else if (relPath.startsWith('src/core/')) {
428
- relPath = relPath.replace('src/core/', 'core/');
418
+ } else if (relPath.startsWith('src/')) {
419
+ relPath = relPath.replace('src/', '');
429
420
  }
430
421
  skillMap.set(relPath, { module: workflow.module, name: workflow.name });
431
422
  }
@@ -15,10 +15,22 @@ BMAD-Methods-Skills/
15
15
  │ └── utils/ # Utility functions
16
16
  │ ├── bmad-fetcher.js
17
17
  │ ├── file-finder.js
18
+ │ ├── path-rewriter.js # Dynamic path adaptation
19
+ │ ├── resource-migrator.js # Auxiliary resource handler
18
20
  │ └── skill-writer.js
19
21
  └── skills/ # Converted skills (committed to repo)
20
22
  ```
21
23
 
24
+ ## Testing
25
+
26
+ Use the built-in test suite to verify path rewriting logic:
27
+
28
+ ```bash
29
+ pnpm test
30
+ ```
31
+
32
+ Tests for `path-rewriter.js` ensure that both `skillMap` resolutions and fallback regex patterns produce correct, portable paths.
33
+
22
34
  ## Adding New Conversion Rules
23
35
 
24
36
  To customize conversion:
@@ -8,7 +8,7 @@ This tool converts BMAD-METHOD (Breakthrough Method for Agile AI-Driven Developm
8
8
  - Discovers all agents (`.agent.yaml`) and workflows (`workflow.yaml` + `instructions.md`)
9
9
  - Converts them to Claude Skills format (`SKILL.md`)
10
10
  - Applies path rewriting for portability
11
- - Organizes output by module (bmm, bmb, cis, core)
11
+ - Organizes output by module (bmm, core)
12
12
 
13
13
  ## Quick Start
14
14
 
@@ -26,13 +26,13 @@ This single command:
26
26
  1. ✅ Fetches and converts all BMAD agents/workflows
27
27
  2. ✅ Applies automatic path rewriting
28
28
  3. ✅ Installs skills to your tool's directory
29
- 4. ✅ Generates `config.yaml` for each module (core, bmm, bmb)
29
+ 4. ✅ Generates `config.yaml` for each module (core, bmm)
30
30
  5. ✅ Cleans up temporary files
31
31
 
32
32
  **After installation**, customize the generated config files at:
33
33
  - `{skills-dir}/core/config.yaml` - User preferences
34
34
  - `{skills-dir}/bmm/config.yaml` - Project settings
35
- - `{skills-dir}/bmb/config.yaml` - Custom agent/workflow output
35
+ - `{skills-dir}/{module}/config.yaml` - Module specific configuration
36
36
 
37
37
  ### Option B: AI-Guided Workflow
38
38
 
@@ -91,7 +91,8 @@ This will:
91
91
  1. Clone or update the BMAD-METHOD repository (from `config.json`)
92
92
  2. Discover all agents and workflows
93
93
  3. Convert them to SKILL.md format with default enhancements
94
- 4. Write output to `./skills/` organized by module (version controlled)
94
+ 4. Detect BMAD repository version and validate structure
95
+ 5. Write output to `./skills/` organized by module (version controlled)
95
96
 
96
97
  **Default Settings:**
97
98
  - Full identity text (no truncation)
@@ -146,18 +147,35 @@ Edit `config.json` to customize:
146
147
  "bmadBranch": "main",
147
148
  "outputDir": "./skills",
148
149
  "tempDir": "./.temp/bmad-method",
149
- "modules": ["bmm", "bmb", "cis", "core"],
150
+ "modules": ["bmm", "core"],
150
151
  "agentPaths": [
151
152
  "src/core/agents",
152
- "src/modules/*/agents"
153
+ "src/*/agents"
153
154
  ],
154
155
  "workflowPaths": [
155
156
  "src/core/workflows",
156
- "src/modules/*/workflows"
157
+ "src/*/workflows"
158
+ ],
159
+ "auxiliaryResources": [
160
+ {
161
+ "src": "src/bmm/agents/tech-writer/tech-writer-sidecar/documentation-standards.md",
162
+ "dest": "bmm/tech-writer/data/documentation-standards.md",
163
+ "name": "Documentation Standards"
164
+ }
165
+ ],
166
+ "pathPatterns": [
167
+ {
168
+ "pattern": "\\{project-root\\}/_bmad/core/resources/excalidraw/([^/\\\\s'\\\"]+)",
169
+ "replacement": "{skill-root}/core/resources/excalidraw/$1",
170
+ "description": "Excalidraw helper resources"
171
+ }
157
172
  ]
158
173
  }
159
174
  ```
160
175
 
176
+ - **`auxiliaryResources`**: Define extra files or folders to migrate. Supported for recursive path rewriting.
177
+ - **`pathPatterns`**: Custom regex rules for path adaptation. Applied before standard rewriting.
178
+
161
179
  ### Clean Up
162
180
 
163
181
  Remove temporary files (keeps `skills/` directory):
@@ -10,21 +10,11 @@ skills/
10
10
  │ │ └── SKILL.md
11
11
  │ ├── pm/
12
12
  │ │ └── SKILL.md
13
- │ ├── prd/
14
- └── SKILL.md
15
- │ ├── create-ux-design/
16
- │ │ └── SKILL.md
17
- │ └── ...
18
- ├── bmb/
19
- │ ├── module/
20
- │ │ └── SKILL.md
21
- │ ├── workflow/
22
- │ │ └── SKILL.md
23
- │ └── ...
13
+ │ ├── config.yaml # Project configuration
14
+ │ └── (skills...) # BMM methodology skills
24
15
  ├── core/
25
- │ ├── advanced-elicitation/
26
- └── SKILL.md
27
- │ └── ...
16
+ │ ├── config.yaml # Core user settings
17
+ │ └── (skills...) # Core system skills
28
18
  ```
29
19
 
30
20
  Each skill folder contains:
@@ -69,28 +59,41 @@ For legacy or XML-only workflows (where instructions are embedded), the converte
69
59
 
70
60
  ## Auxiliary Resource Migration
71
61
 
72
- The converter automatically handles non-standard resources that are referenced by skills but live outside the normal agent/workflow structure in BMAD:
62
+ The converter automatically handles non-standard resources referenced by skills that live outside the normal agent/workflow structure. Resource migration is **configurable via `config.json`** under the `auxiliaryResources` key.
63
+
64
+ ### Core Migrations
73
65
 
74
66
  1. **`documentation-standards.md`**:
75
- - Source: `bmm/data/documentation-standards.md`
76
- - Destination: `skills/bmm/tech-writer/data/documentation-standards.md`
67
+ - Source: `src/bmm/agents/tech-writer/tech-writer-sidecar/documentation-standards.md`
68
+ - Destination: `bmm/tech-writer/data/documentation-standards.md`
77
69
  - Purpose: Critical reference for technical writing skills
78
70
 
79
71
  2. **TEA Knowledge Base**:
80
- - Source: `bmm/testarch/knowledge/`
81
- - Destination: `skills/bmm/tea/knowledge/`
72
+ - Source: `src/bmm/testarch/knowledge/`
73
+ - Destination: `bmm/tea/knowledge/`
82
74
  - Purpose: Extensive testing patterns and practices
83
75
 
84
76
  3. **TEA Index**:
85
- - Source: `bmm/testarch/tea-index.csv`
86
- - Destination: `skills/bmm/tea/tea-index.csv`
77
+ - Source: `src/bmm/testarch/tea-index.csv`
78
+ - Destination: `bmm/tea/tea-index.csv`
87
79
  - Purpose: Index of testing architecture components
88
80
 
81
+ 4. **Excalidraw Resources**:
82
+ - Source: `src/core/resources/excalidraw`
83
+ - Destination: `core/resources/excalidraw`
84
+ - Purpose: Visual assets for diagramming skills
85
+
86
+ ### Recursive Path Rewriting
87
+ Migrated resources are processed recursively. Any text-based files within these resources (e.g., Markdown in the TEA knowledge base) have their internal paths rewritten to be compatible with the new skill structure.
88
+
89
89
  ## Path Rewriting
90
90
 
91
- To make skills portable, path rewriting uses a dynamic map of all discovered skills to accurately resolve references:
91
+ To make skills portable, path rewriting uses a dynamic map of all discovered skills combined with configurable regex patterns:
92
92
 
93
- - **Exact Skill Resolution**: Uses a `skillMap` to resolve paths like `testarch/ci/workflow.yaml` to their correct installed name e.g. `testarch-ci`, ensuring prefixes are handled correctly.
93
+ - **Configurable Patterns**: Custom rewriting rules can be added to `config.json` under `pathPatterns`. These are applied first.
94
+ - **Pattern Optimization**: Regex patterns are pre-compiled once at startup for maximum performance during large conversion runs.
95
+ - **Exact Skill Resolution**: Uses a `skillMap` to resolve paths like `testarch/ci/workflow.yaml` to their correct installed name e.g. `testarch-ci`.
96
+ - **Global Normalization**: Path normalization ensures that both module paths (`src/*/`) and core paths (`src/core/*`) are correctly mapping to their destination equivalents.
94
97
  - **Skill Root Variable**: Replaces fragile relative paths (`../../`) with `{skill-root}`.
95
98
  - **Variable Consolidation**: `{skill-config}` has been merged into `{skill-root}`.
96
99
  - **Standardized Paths**:
@@ -100,13 +103,10 @@ To make skills portable, path rewriting uses a dynamic map of all discovered ski
100
103
 
101
104
  This ensures skills work correctly regardless of where the root `skills` directory is installed and that cross-skill references are robust.
102
105
 
103
- ## Module Configuration
106
+ The converter creates `config.yaml` files for each module. The generation logic prioritizes templates from the BMAD repository:
104
107
 
105
- The converter creates `config.yaml` files for each module, matching the BMAD installer behavior:
106
-
107
- - `core/config.yaml` - Core module configuration
108
- - `bmm/config.yaml` - BMM module configuration
109
- - `bmb/config.yaml` - BMB module configuration (if present)
108
+ 1. **BMAD Template**: Checks for `config-template.yaml` within the module directory in the BMAD repo.
109
+ 2. **Fallback Defaults**: If no template exists in the repo, hardcoded defaults from `convert.js` are used.
110
110
 
111
111
  Skills reference these configs using `{skill-root}/{module}/config.yaml`. Users should customize these files for their project settings.
112
112
 
@@ -143,6 +143,8 @@ After running the conversion, you'll see:
143
143
  📥 Fetching BMAD-METHOD repository...
144
144
  ✓ Repository ready at: ./.temp/bmad-method
145
145
 
146
+ 📌 BMAD-METHOD version: 6.0.0-alpha.23
147
+
146
148
  🔍 Discovering agents and workflows...
147
149
  ✓ Found 13 agents and 38 workflows
148
150
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clfhhc/bmad-methods-skills",
3
- "version": "0.1.2",
3
+ "version": "0.2.0",
4
4
  "description": "Convert BMAD-METHOD agents and workflows to Claude Skills format",
5
5
  "type": "module",
6
6
  "repository": {
@@ -59,6 +59,12 @@ npx @clfhhc/bmad-methods-skills --output-dir .temp/converted-skills
59
59
  npx @clfhhc/bmad-methods-skills install --from=.temp/converted-skills --tool=[TOOL] --force
60
60
  ```
61
61
 
62
+ ### Step 5: Clean up
63
+
64
+ ```bash
65
+ rm -rf .temp
66
+ ```
67
+
62
68
  ---
63
69
 
64
70
  ## Configure Installation
@@ -69,33 +75,27 @@ Prompt the user for each configuration setting. Offer the defaults shown:
69
75
 
70
76
  | Setting | Question | Default |
71
77
  |---------|----------|---------|
72
- | `user_name` | What name should I use to address you? | *(OS username)* |
73
- | `communication_language` | What language should I communicate in? | English |
74
- | `document_output_language` | What language for generated documents? | English |
75
- | `output_folder` | Where should BMAD output artifacts? | `{project-root}/documents/bmad` |
78
+ | `user_name` | What should agents call you? (Use your name or a team name) | BMad |
79
+ | `communication_language` | What language should agents use when chatting with you? | English |
80
+ | `document_output_language` | Preferred document output language? | English |
81
+ | `output_folder` | Where should output files be saved? | `_bmad-output` |
76
82
 
77
83
  ### BMM Configuration (`{skill-root}/bmm/config.yaml`)
78
84
 
79
85
  | Setting | Question | Default |
80
86
  |---------|----------|---------|
81
87
  | `project_name` | What is your project called? | *(directory name)* |
82
- | `user_skill_level` | What's your development experience? | `intermediate` |
83
- | `planning_artifacts` | Where to store planning docs? | `{output_folder}/planning-artifacts` |
84
- | `implementation_artifacts` | Where to store implementation docs? | `{output_folder}/implementation-artifacts` |
85
- | `project_knowledge` | Where to store project knowledge? | `{project-root}/docs` |
86
-
87
- ### BMB Configuration (`{skill-root}/bmb/config.yaml`)
88
-
89
- | Setting | Question | Default |
90
- |---------|----------|---------|
91
- | `bmb_creations_output_folder` | Where to store BMB outputs? | `{output_folder}/bmb-creations` |
88
+ | `user_skill_level` | What is your development experience level? | `intermediate` |
89
+ | `planning_artifacts` | Where should planning artifacts be stored? (Brainstorming, Briefs, PRDs, UX Designs, Architecture, Epics) | `{output_folder}/planning-artifacts` |
90
+ | `implementation_artifacts` | Where should implementation artifacts be stored? (Sprint status, stories, reviews, retrospectives, Quick Flow output) | `{output_folder}/implementation-artifacts` |
91
+ | `project_knowledge` | Where should long-term project knowledge be stored? (docs, research, references) | `docs` |
92
92
 
93
93
  ---
94
94
 
95
95
  ## Verify
96
96
 
97
97
  1. Skills installed at the correct destination
98
- 2. Config files exist (core, bmm, bmb)
98
+ 2. Config files exist (core, bmm)
99
99
  3. Paths use `{skill-root}` variable
100
100
 
101
101
  ## Guidelines
@@ -241,18 +241,14 @@ export async function findAgentsAndWorkflows(
241
241
  return { agents, workflows };
242
242
  }
243
243
 
244
- /**
245
- * Extracts module name from file path
246
- * @param {string} relativePath - Path relative to BMAD root
247
- * @returns {string|null} Module name or null
248
- */
249
244
  function extractModule(relativePath) {
250
- // Match patterns like: src/core/agents/... or src/modules/bmm/agents/...
251
- const coreMatch = relativePath.match(/^src\/core\//);
252
- if (coreMatch) return 'core';
245
+ // Support legacy structure: src/modules/bmm/agents/...
246
+ const modulesMatch = relativePath.match(/^src\/modules\/([^/]+)\//);
247
+ if (modulesMatch) return modulesMatch[1];
253
248
 
254
- const moduleMatch = relativePath.match(/^src\/modules\/([^/]+)\//);
255
- if (moduleMatch) return moduleMatch[1];
249
+ // Support new structure (and core): src/bmm/agents/... or src/core/agents/...
250
+ const srcMatch = relativePath.match(/^src\/([^/]+)\//);
251
+ if (srcMatch) return srcMatch[1];
256
252
 
257
253
  return null;
258
254
  }
package/docs/PLAN.md DELETED
@@ -1,523 +0,0 @@
1
- # Enhance BMAD Skills Generation
2
-
3
- ## Overview
4
- Analyze why generated skills are less detailed than the reference repo and create a plan to enhance the conversion process with additional sections, examples, and better structure.
5
-
6
- ## Current State Analysis
7
-
8
- ### Why Generated Skills Are Less Detailed
9
-
10
- After analyzing the conversion code and comparing with the reference repository structure, here are the key differences:
11
-
12
- 1. **Content Truncation and Loss**
13
-
14
- - Identity text is truncated to 200 characters (line 48-51 in agent-converter.js)
15
- - Description is truncated to 1024 characters (line 57-60 in agent-converter.js)
16
- - Full persona identity is not fully presented
17
-
18
- 2. **Incomplete Content Extraction**
19
-
20
- - All metadata fields may not be utilized
21
- - Input/output descriptions from workflow.yaml may not be fully extracted
22
- - Step descriptions from workflow.yaml may not be fully utilized
23
- - Related files (template.md, checklist.md) are referenced but their content isn't summarized
24
-
25
- 3. **Formatting and Presentation Issues**
26
-
27
- - Principles are presented as simple bullet points (could be better formatted)
28
- - Menu items could have better formatting with clearer command patterns
29
- - XML instructions parsing could preserve more structure
30
- - Inputs/Outputs are shown but without detailed descriptions if they exist in workflow.yaml
31
-
32
- ### What Are CLAUDE.md and SUBAGENT-PATTERNS.md?
33
-
34
- Based on Claude Code skills repository patterns:
35
-
36
- **CLAUDE.md** - Likely contains:
37
-
38
- - Instructions for how Claude should use these skills
39
- - Skill interaction patterns
40
- - Best practices for skill composition
41
- - Guidelines for when to use which skill
42
- - Cross-skill workflows and dependencies
43
-
44
- **SUBAGENT-PATTERNS.md** - Likely contains:
45
-
46
- - Patterns for creating subagents (specialized AI assistants)
47
- - How to structure subagent prompts
48
- - Subagent communication patterns
49
- - Examples of effective subagent configurations
50
- - Integration patterns between main agents and subagents
51
-
52
- These are **meta-documentation files** that help users understand how to effectively use the skills ecosystem, not individual skill files.
53
-
54
- ## Improvement Plan
55
-
56
- ### Categorization: BMAD-Implied vs Our Additions
57
-
58
- **BMAD-Implied Enhancements (Always Enabled):**
59
- These improvements extract and present content that already exists in BMAD source files but isn't fully utilized:
60
-
61
- 1. **Remove Content Truncation**
62
- - Remove 200-char limit on identity summary (show full identity)
63
- - Keep 1024-char limit on description (Claude Skills requirement) but use full content when possible
64
- - Preserve all metadata fields
65
-
66
- 2. **Better Content Extraction**
67
- - Extract all metadata fields (title, version, etc.) if they exist
68
- - Extract detailed input/output descriptions from workflow.yaml if they exist
69
- - Extract step descriptions from workflow.yaml steps array
70
- - Include summary of template.md and checklist.md content
71
-
72
- 3. **Better Formatting of Existing Content**
73
- - Format principles with better structure (preserve existing content, just format better)
74
- - Improve menu item formatting (command patterns, clearer descriptions)
75
- - Better XML instruction parsing (preserve more structure, better markdown conversion)
76
- - Format inputs/outputs with descriptions if available in workflow.yaml
77
-
78
- 4. **Examples Section** (from menu items)
79
- - Generate usage examples from menu items
80
- - Show command patterns: `WS` → workflow-status workflow
81
- - Create example invocations based on triggers
82
-
83
- 5. **Related Skills Section** (from workflow dependencies)
84
- - Analyze menu items to find referenced workflows
85
- - Map agent → workflow relationships
86
- - Find complementary agents in the same module
87
- - All from BMAD structure
88
-
89
- 6. **Enhanced Best Practices** (from principles)
90
- - Better formatting of principles (better structure, preserve content)
91
- - Extract patterns from existing principles
92
- - Group related principles together
93
-
94
- **Our Additions (Optional, Config-Controlled):**
95
- These are enhancements we add that don't exist in BMAD source:
96
-
97
- 1. **Context-Aware Examples** (optional)
98
- - Domain-specific use cases
99
- - Real-world scenarios
100
- - Integration examples
101
-
102
- 2. **Advanced Troubleshooting** (optional)
103
- - Common errors and solutions
104
- - Validation checkpoints
105
- - Edge cases
106
-
107
- 3. **Enhanced Narratives** (optional)
108
- - Better explanations and context
109
- - Customized guidance per skill type
110
-
111
- 4. **Meta-Documentation** (optional)
112
- - `CLAUDE.md` - Instructions for using skills ecosystem
113
- - `SUBAGENT-PATTERNS.md` - Subagent creation patterns
114
-
115
- ## Implementation Plan
116
-
117
- ### Phase 1: BMAD-Implied Enhancements (Always Enabled) ✅ COMPLETED
118
-
119
- **File**: `src/converters/agent-converter.js`
120
-
121
- 1. ✅ **Remove Identity Truncation**
122
- - Removed the 200-character limit on identity summary (line 48-51)
123
- - Use full identity text in description (up to 1024 chars total)
124
- - Full identity is already shown in Overview section, so progressive disclosure is maintained
125
- - The 200-char limit was arbitrary, not a Claude Skills requirement
126
-
127
- 2. ✅ **Extract All Metadata**
128
- - Include all metadata fields (title, version, tags, etc.) if present
129
- - Add metadata section if rich metadata exists
130
- - Check for additional fields in metadata object
131
-
132
- 3. ✅ **Examples Section** (from menu items)
133
- - Generate usage examples from menu items
134
- - Show command patterns: `WS` → workflow-status workflow
135
- - Create example invocations based on triggers
136
- - More concise format (removed redundancy)
137
-
138
- 4. ✅ **Related Skills Section** (from workflow dependencies)
139
- - Analyze menu items to find referenced workflows
140
- - Map agent → workflow relationships
141
- - Find complementary agents in the same module
142
- - All from BMAD structure
143
-
144
- 5. ✅ **Enhanced Best Practices** (from principles)
145
- - Better formatting of principles (better structure, preserve content)
146
- - Extract patterns from existing principles
147
-
148
- 6. ✅ **Better Formatting**
149
- - Enhance menu item formatting in Commands section (better command pattern display)
150
- - Better presentation of startup_message
151
- - Improve overall section structure and readability
152
-
153
- **File**: `src/converters/workflow-converter.js`
154
-
155
- 1. ✅ **Extract Input/Output Descriptions**
156
- - Check if workflow.yaml inputs/outputs have description, type, required, default fields
157
- - Include full descriptions in Inputs/Outputs sections
158
- - Show type information if available
159
- - Indicate required vs optional if available
160
-
161
- 2. ✅ **Extract Step Descriptions**
162
- - Use step.name, step.description, step.depends_on from workflow.yaml steps array
163
- - Include step descriptions in Workflow Steps section
164
- - Show dependency relationships more clearly
165
-
166
- 3. ✅ **Better XML Parsing**
167
- - Preserve more structure from XML instructions
168
- - Better markdown conversion for nested elements (check, action, ask, etc.)
169
- - Preserve formatting from original instructions
170
- - Handle conditional flows better (<check if="...">)
171
- - Added support for `<output>` tags
172
-
173
- 4. ✅ **Related Files Summary**
174
- - If template.md or checklist.md exist, include brief summary or excerpt
175
- - Reference their purpose more clearly
176
- - Consider including first few lines as preview
177
-
178
- 5. ✅ **Support workflow.md format**
179
- - Added discovery of workflow.md files (core workflows use this format)
180
- - Parse frontmatter YAML + markdown content
181
- - Handle both workflow.yaml and workflow.md formats
182
-
183
- **File**: `src/utils/file-finder.js`
184
-
185
- 1. ✅ **Support workflow.md discovery**
186
- - Search for both workflow.yaml and workflow.md files
187
- - Handle core workflows that use workflow.md format
188
- - Improved path handling for glob patterns
189
-
190
- **File**: `convert.js`
191
-
192
- 1. ✅ **CLI Flag Support**
193
- - Added `--output-dir` flag for custom output directories
194
- - Added `--identity-limit` flag to control identity truncation
195
- - Added flags for optional enhancements (examples, best-practices, troubleshooting, related-skills, meta-docs)
196
- - Added `--help` flag
197
-
198
- 2. ✅ **Configuration Management**
199
- - Default output directory (`./skills`) is version controlled
200
- - Custom output directories for non-default configurations
201
- - Default enhancement settings in config.json
202
-
203
- ### Phase 2: Path Adaptation for Claude Skills
204
-
205
- **Status**: In Progress
206
-
207
- The BMAD-METHOD repository uses `{project-root}/_bmad/...` paths for a specific installation structure. These need adaptation for Claude Skills format.
208
-
209
- #### Path Categories
210
-
211
- After automated rewriting, remaining `{project-root}` references fall into three categories:
212
-
213
- ---
214
-
215
- **Category A: Documentation Examples (KEEP AS-IS) ✅ COMPLETE**
216
-
217
- > **Note:** These are intentionally kept as documentation/teaching content. They are NOT addressed in Phase 2 - they demonstrate BMAD path patterns to users learning the system.
218
-
219
- These paths appear in:
220
- - Code blocks showing example output (e.g., JSON subprocess returns)
221
- - "Wrong/Fix" examples showing anti-patterns
222
- - Bash/grep commands that search for patterns
223
- - Variable documentation tables
224
-
225
- | File | Line(s) | Content | Reason to Keep |
226
- |------|---------|---------|----------------|
227
- | `module-agent-validation.md` | L120-122 | Wrong/Fix example with ellipsis | Teaching anti-pattern |
228
- | `subprocess-optimization-patterns.md` | L43 | JSON example output | Code block example |
229
- | `step-02b-path-violations.md` | L102 | "What we're catching" example | Teaching what to detect |
230
- | `step-02b-path-violations.md` | L164 | grep command in bash block | Shell command documentation |
231
-
232
- ---
233
-
234
- **Category B: Template Placeholders (SCRIPT-FIXABLE)**
235
-
236
- These use template placeholders like `{module-code}`, `{module-id}`, `[module]` and can be batch-replaced:
237
-
238
- | File | Line(s) | Pattern | Script Fix |
239
- |------|---------|---------|------------|
240
- | `module-agent-validation.md` | L21 | `{project-root}/_bmad/{module-code}/...` | → `../../{module-code}/...` |
241
- | `step-07c-build-module.md` | L95, L97 | `{project-root}/_bmad/{module-id}/...` | → `../../{module-id}/...` |
242
- | `e-08c-edit-module.md` | L95 | `{project-root}/_bmad/{module-id}/...` | → `../../{module-id}/...` |
243
- | `v-02c-validate-menu.md` | L104 | `{project-root}/_bmad/{module}/...` | → `../../{module}/...` |
244
- | `v-02d-validate-structure.md` | L96 | `{project-root}/_bmad/{module}/...` | → `../../{module}/...` |
245
- | `step-06-workflows.md` | L85 | `{project-root}/_bmad/{module_code}/...` | → `../../{module_code}/...` |
246
- | `architecture.md` | L93 | `{project-root}/_bmad/[module]/...` | → `../../[module]/...` |
247
- | `step-type-patterns.md` | L144-145 | `{project-root}/.../workflow.*` | → `../../module/skill/...` |
248
- | `step-01-init-continuable-template.md` | L16 | `{project-root}/_bmad/[module-path]/...` | → `../../[module-path]/...` |
249
- | `step-1b-template.md` | L16 | `{project-root}/_bmad/[module-path]/...` | → `../../[module-path]/...` |
250
- | `step-template.md` | L14 | `{project-root}/_bmad/[module]/...` | → `../../[module]/...` |
251
- | `workflow-template.md` | L56 | `{project-root}/_bmad/[MODULE FOLDER]/...` | → `../../[MODULE FOLDER]/...` |
252
-
253
- **Action**: Add regex patterns to `path-rewriter.js` to handle template placeholders.
254
-
255
- ---
256
-
257
- **Category C: Semantic Content Changes (AI-AGENT REQUIRED)**
258
-
259
- These references are embedded in instructional content and need semantic understanding to adapt:
260
-
261
- | File | Line(s) | Content | Issue |
262
- |------|---------|---------|-------|
263
- | `critical-actions.md` | L45 | `Review {project-root}/finances/...` | User project path - needs context |
264
- | `trend-analyst.agent.yaml` | L48 | `exec: "{project-root}/_bmad/cis/tasks/..."` | CIS module doesn't exist in skills |
265
- | `tea/SKILL.md` | L27 | `Load ... from {project-root}/_bmad/bmm/testarch/knowledge/` | Path to knowledge files not in skill |
266
- | `tech-writer/SKILL.md` | L25-26 | `Load COMPLETE file {project-root}/_bmad/bmm/data/documentation-standards.md` | Critical action referencing external file |
267
-
268
- These require AI understanding to:
269
- 1. Determine if the referenced content exists in converted skills
270
- 2. Adapt instructions to use relative skill paths
271
- 3. Potentially restructure instructions if content doesn't exist
272
-
273
- #### Phase 2 Implementation Tasks
274
-
275
- **2.1 Script Improvements** (Automated) ✅ COMPLETED
276
- - ✅ Add regex patterns for template placeholders (`{module}`, `{module-code}`, `{module-id}`, `[module]`)
277
- - ✅ Handle remaining `{project-root}/_bmad/...` and `{project-root}/_bmm/...` patterns with template variables
278
-
279
- **2.2 Automation & Data Migration** (Automated) ✅ COMPLETED
280
- - ✅ Implemented `resource-migrator.js` to automatically move data/knowledge assets
281
- - ✅ Integrated into `init --bootstrap` command for one-click setup
282
- - ✅ Updated `path-rewriter.js` to handle migrated resource paths relative to skills
283
-
284
- **2.3 AI-Agent Content Adaptation** (Manual/AI-assisted)
285
-
286
- Create an `enhance-bmad-skills` skill that:
287
- 1. Reviews skills for semantic path references in instructions
288
- 2. Identifies if referenced content exists in converted skill structure
289
- 3. Proposes adapted instructions using relative skill paths
290
- 4. Handles cases where content doesn't exist (add to skill, or note as external dependency)
291
-
292
- **Skills requiring AI review:**
293
- - `skills/bmb/agent/data/critical-actions.md`
294
- - `skills/bmb/agent/data/reference/module-examples/trend-analyst.agent.yaml`
295
- - `skills/bmm/tea/SKILL.md` (partially handled by migration)
296
- - `skills/bmm/tech-writer/SKILL.md` (partially handled by migration)
297
-
298
- **2.4 Content Migration** (Manual) ✅ COMPLETED
299
- - ✅ `bmm/testarch/knowledge/` fragments migrated to `skills/bmm/tea/knowledge/`
300
- - ✅ `bmm/data/documentation-standards.md` migrated to `skills/bmm/tech-writer/data/`
301
-
302
-
303
- - `CLAUDE.md` - Instructions for Claude on using the skills ecosystem
304
- - Generated from analyzing all agents and their menu items
305
- - Maps agent-to-workflow relationships
306
- - Documents skill interaction patterns
307
-
308
- - `SUBAGENT-PATTERNS.md` - Patterns for creating and using subagents
309
- - Generated from agent persona patterns
310
- - Extracts communication styles and principles
311
- - Documents subagent creation patterns
312
-
313
- ## Implementation Details
314
-
315
- ### Key Files Modified
316
-
317
- 1. **`src/converters/agent-converter.js`** ✅
318
- - Enhanced `buildAgentSkillContent()` function
319
- - Added Examples section generation
320
- - Added Related Skills section generation
321
- - Enhanced guidelines formatting
322
- - Removed identity truncation
323
-
324
- 2. **`src/converters/workflow-converter.js`** ✅
325
- - Enhanced `buildWorkflowSkillContent()` function
326
- - Added support for workflow.md format
327
- - Improved input/output documentation
328
- - Enhanced step descriptions
329
- - Better XML parsing
330
- - Related files preview
331
-
332
- 3. **`src/utils/file-finder.js`** ✅
333
- - Added support for discovering workflow.md files
334
- - Improved path handling for glob patterns
335
- - Better error handling
336
-
337
- 4. **`convert.js`** ✅
338
- - Added CLI argument parsing
339
- - Added post-processing step after conversion
340
- - Added enhancement options to config
341
- - Passes all agents/workflows for relationship analysis
342
-
343
- 5. **`config.json`** ✅
344
- - Added enhancement configuration options
345
-
346
- ### Configuration
347
-
348
- Add to `config.json`:
349
-
350
- ```json
351
- {
352
- "enhancements": {
353
- "optional": {
354
- "addExamples": true,
355
- "addBestPractices": true,
356
- "addTroubleshooting": false,
357
- "addRelatedSkills": true,
358
- "generateMetaDocs": false
359
- },
360
- "identityCharLimit": null
361
- }
362
- }
363
- ```
364
-
365
- **Default Settings:**
366
-
367
- - `addExamples`: **true** - Helpful for understanding usage
368
- - `addBestPractices`: **true** - Provides helpful guidance
369
- - `addRelatedSkills`: **true** - Helps discover related skills
370
- - `addTroubleshooting`: **false** - May not be applicable to all skills, can be verbose
371
- - `generateMetaDocs`: **false** - Only needed once at root level, not per-skill
372
-
373
- **Note**: BMAD-implied enhancements are always enabled (no config needed). Only optional enhancements are controlled by config.
374
-
375
- ## Expected Outcomes
376
-
377
- After Phase 1 (BMAD-Implied, Always Enabled): ✅ COMPLETED
378
-
379
- - Full identity text preserved (no truncation)
380
- - All metadata fields extracted and presented
381
- - Better formatted principles and commands
382
- - Complete input/output descriptions from workflow.yaml
383
- - Better structured instructions from XML parsing
384
- - Examples section from menu items
385
- - Related skills section from workflow dependencies
386
- - Skills will be more complete and faithful to BMAD source
387
-
388
- After Phase 2 (Optional Enhancements, if enabled):
389
-
390
- - Additional context-aware examples
391
- - Advanced troubleshooting guidance
392
- - Enhanced narratives
393
- - Meta-documentation for ecosystem understanding
394
-
395
- ## Key Design Decisions
396
-
397
- 1. **BMAD-Implied Enhancements**: Always enabled, no config needed
398
- - These extract and present existing BMAD content better
399
- - No new content is added, just better extraction and formatting
400
-
401
- 2. **Optional Enhancements**: Config-controlled, most enabled by default
402
- - These add new content not in BMAD source
403
- - Defaults: Examples=true, BestPractices=true, RelatedSkills=true, Troubleshooting=false, MetaDocs=false
404
- - User can disable if they want minimal output
405
-
406
- 3. **Content Fidelity**: Priority is on accurately representing BMAD content
407
- - No content generation that isn't based on BMAD source
408
- - All enhancements must be traceable to BMAD source files
409
-
410
- 4. **CLI Flags**: Provide flexibility for custom configurations
411
- - Default output (`./skills`) is version controlled
412
- - Custom output directories for non-default settings
413
- - All optional enhancements can be toggled via flags
414
-
415
- ## Findings from Analysis
416
-
417
- ### BMAD Structure Analysis
418
-
419
- Based on code analysis:
420
-
421
- **Agent Structure (agent.yaml):**
422
-
423
- - `agent.metadata` - id, name, title (possibly version, tags)
424
- - `agent.persona` - role, identity, communication_style, principles, startup_message
425
- - `agent.menu` - array of items with trigger, description
426
- - `agent.critical_actions` - array of action strings
427
-
428
- **Workflow Structure:**
429
-
430
- - `workflow.yaml` format: name, description, standalone flag, inputs, outputs, steps, plus separate instructions.md/xml
431
- - `workflow.md` format: frontmatter YAML + markdown content (used by core workflows)
432
-
433
- ### About the 200-Character Limit
434
-
435
- The 200-character limit on identity (line 48-51 in agent-converter.js) is used to create a shorter description for the frontmatter `description` field. This is NOT a Claude Skills requirement - the 1024-char limit on the final description is the actual Claude Skills requirement.
436
-
437
- **Current behavior:**
438
-
439
- - Identity is truncated to 200 chars for the frontmatter description
440
- - Full identity IS shown in the Overview section (line 138)
441
- - The truncation is only for the frontmatter `description` field
442
-
443
- **Progressive Disclosure:**
444
-
445
- - The frontmatter `description` is what shows in skill lists/search
446
- - The full content is in the Overview section
447
- - The 200-char limit appears to be arbitrary, not a hard requirement
448
-
449
- **Recommendation:** Remove the 200-char limit on identity. Use full identity in description (up to 1024 chars total). The Overview section already shows full identity, so progressive disclosure is maintained.
450
-
451
- ### Optional Enhancements - Default Settings
452
-
453
- **Should be enabled by default:**
454
-
455
- - `addExamples` - true (helpful for understanding usage)
456
- - `addBestPractices` - true (helpful guidance)
457
- - `addRelatedSkills` - true (helps discover related skills)
458
-
459
- **Should be disabled by default:**
460
-
461
- - `addTroubleshooting` - false (may not be applicable to all skills, can be verbose)
462
- - `generateMetaDocs` - false (only needed once, not per-skill)
463
-
464
- ### Meta-Documentation Generation
465
-
466
- Generate from BMAD structure:
467
-
468
- - Analyze agent menu items to find workflow dependencies
469
- - Map agent-to-workflow relationships
470
- - Extract common patterns from workflow instructions
471
- - Generate CLAUDE.md with skill interaction patterns
472
- - Generate SUBAGENT-PATTERNS.md from agent persona patterns
473
-
474
- ## Next Steps
475
-
476
- ### Phase 2: AI-Enhanced Optional Enhancements
477
-
478
- 1. **Create `enhance-bmad-skills` skill** (SKILL.md file)
479
- - Instructions for AI models to enhance existing skills
480
- - Takes a SKILL.md file and adds context-aware enhancements
481
- - Maintains consistency with BMAD principles
482
- - Outputs enhanced version
483
-
484
- 2. **Implement enhancement logic** (if script-based approach preferred)
485
- - Context-aware example generation
486
- - Advanced troubleshooting scenarios
487
- - Enhanced narrative generation
488
-
489
- ### Phase 3: Meta-Documentation
490
-
491
- 1. **Generate CLAUDE.md**
492
- - Analyze all agents and workflows
493
- - Map relationships and dependencies
494
- - Document interaction patterns
495
-
496
- 2. **Generate SUBAGENT-PATTERNS.md**
497
- - Extract patterns from agent personas
498
- - Document subagent creation guidelines
499
- - Provide examples and best practices
500
-
501
- ## Completed Tasks
502
-
503
- - ✅ Remove identity truncation (200 char limit) - use full identity in description up to 1024 chars
504
- - ✅ Extract all metadata fields from agent.yaml and workflow.yaml (title, version, tags, etc.)
505
- - ✅ Improve formatting of principles, menu items, and instructions in both converters
506
- - ✅ Extract input/output descriptions, types, and required flags from workflow.yaml
507
- - ✅ Extract step descriptions and dependencies from workflow.yaml steps array
508
- - ✅ Enhance XML instruction parsing to preserve more structure and better markdown conversion
509
- - ✅ Add brief summary or preview of template.md and checklist.md content
510
- - ✅ Add Examples section generated from menu items with command patterns
511
- - ✅ Add Related Skills section from workflow dependencies and same-module agents
512
- - ✅ Enhance Best Practices section formatting from principles
513
- - ✅ Support workflow.md format for core workflows
514
- - ✅ Add CLI flags for configuration control
515
- - ✅ Update config.json with default enhancement settings
516
-
517
- ## Remaining Tasks
518
-
519
- - ✅ Create `enhance-bmad-skills` skill for AI-driven enhancements
520
- - [ ] Phase 2: Implement context-aware example generation (if script-based)
521
- - [ ] Phase 2: Implement advanced troubleshooting (if script-based)
522
- - [ ] Phase 3: Generate CLAUDE.md from BMAD structure analysis
523
- - [ ] Phase 3: Generate SUBAGENT-PATTERNS.md from agent persona patterns