bmad-method 6.2.1 → 6.2.3-next.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/.claude-plugin/marketplace.json +78 -0
- package/package.json +1 -1
- package/src/bmm-skills/module-help.csv +30 -30
- package/src/core-skills/bmad-help/SKILL.md +49 -68
- package/src/core-skills/bmad-init/scripts/bmad_init.py +35 -4
- package/src/core-skills/bmad-init/scripts/tests/test_bmad_init.py +64 -0
- package/src/core-skills/module-help.csv +11 -11
- package/tools/cli/external-official-modules.yaml +1 -1
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "bmad-method",
|
|
3
|
+
"owner": {
|
|
4
|
+
"name": "Brian (BMad) Madison"
|
|
5
|
+
},
|
|
6
|
+
"description": "Breakthrough Method of Agile AI-driven Development — a full-lifecycle framework with agents and workflows for analysis, planning, architecture, and implementation.",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"homepage": "https://github.com/bmad-code-org/BMAD-METHOD",
|
|
9
|
+
"repository": "https://github.com/bmad-code-org/BMAD-METHOD",
|
|
10
|
+
"keywords": ["bmad", "agile", "ai", "orchestrator", "development", "methodology", "agents"],
|
|
11
|
+
"plugins": [
|
|
12
|
+
{
|
|
13
|
+
"name": "bmad-pro-skills",
|
|
14
|
+
"source": "./",
|
|
15
|
+
"description": "Next level skills for power users — advanced prompting techniques, agent management, and more.",
|
|
16
|
+
"version": "6.3.0",
|
|
17
|
+
"author": {
|
|
18
|
+
"name": "Brian (BMad) Madison"
|
|
19
|
+
},
|
|
20
|
+
"skills": [
|
|
21
|
+
"./src/core-skills/bmad-help",
|
|
22
|
+
"./src/core-skills/bmad-init",
|
|
23
|
+
"./src/core-skills/bmad-brainstorming",
|
|
24
|
+
"./src/core-skills/bmad-distillator",
|
|
25
|
+
"./src/core-skills/bmad-party-mode",
|
|
26
|
+
"./src/core-skills/bmad-shard-doc",
|
|
27
|
+
"./src/core-skills/bmad-advanced-elicitation",
|
|
28
|
+
"./src/core-skills/bmad-editorial-review-prose",
|
|
29
|
+
"./src/core-skills/bmad-editorial-review-structure",
|
|
30
|
+
"./src/core-skills/bmad-index-docs",
|
|
31
|
+
"./src/core-skills/bmad-review-adversarial-general",
|
|
32
|
+
"./src/core-skills/bmad-review-edge-case-hunter"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "bmad-method-lifecycle",
|
|
37
|
+
"source": "./",
|
|
38
|
+
"description": "Full-lifecycle AI development framework — agents and workflows for product analysis, planning, architecture, and implementation.",
|
|
39
|
+
"version": "6.3.0",
|
|
40
|
+
"author": {
|
|
41
|
+
"name": "Brian (BMad) Madison"
|
|
42
|
+
},
|
|
43
|
+
"skills": [
|
|
44
|
+
"./src/bmm-skills/1-analysis/bmad-product-brief",
|
|
45
|
+
"./src/bmm-skills/1-analysis/bmad-agent-analyst",
|
|
46
|
+
"./src/bmm-skills/1-analysis/bmad-agent-tech-writer",
|
|
47
|
+
"./src/bmm-skills/1-analysis/bmad-document-project",
|
|
48
|
+
"./src/bmm-skills/1-analysis/research/bmad-domain-research",
|
|
49
|
+
"./src/bmm-skills/1-analysis/research/bmad-market-research",
|
|
50
|
+
"./src/bmm-skills/1-analysis/research/bmad-technical-research",
|
|
51
|
+
"./src/bmm-skills/2-plan-workflows/bmad-agent-pm",
|
|
52
|
+
"./src/bmm-skills/2-plan-workflows/bmad-agent-ux-designer",
|
|
53
|
+
"./src/bmm-skills/2-plan-workflows/bmad-create-prd",
|
|
54
|
+
"./src/bmm-skills/2-plan-workflows/bmad-edit-prd",
|
|
55
|
+
"./src/bmm-skills/2-plan-workflows/bmad-validate-prd",
|
|
56
|
+
"./src/bmm-skills/2-plan-workflows/bmad-create-ux-design",
|
|
57
|
+
"./src/bmm-skills/3-solutioning/bmad-agent-architect",
|
|
58
|
+
"./src/bmm-skills/3-solutioning/bmad-create-architecture",
|
|
59
|
+
"./src/bmm-skills/3-solutioning/bmad-check-implementation-readiness",
|
|
60
|
+
"./src/bmm-skills/3-solutioning/bmad-create-epics-and-stories",
|
|
61
|
+
"./src/bmm-skills/3-solutioning/bmad-generate-project-context",
|
|
62
|
+
"./src/bmm-skills/4-implementation/bmad-agent-dev",
|
|
63
|
+
"./src/bmm-skills/4-implementation/bmad-agent-sm",
|
|
64
|
+
"./src/bmm-skills/4-implementation/bmad-agent-qa",
|
|
65
|
+
"./src/bmm-skills/4-implementation/bmad-agent-quick-flow-solo-dev",
|
|
66
|
+
"./src/bmm-skills/4-implementation/bmad-dev-story",
|
|
67
|
+
"./src/bmm-skills/4-implementation/bmad-quick-dev",
|
|
68
|
+
"./src/bmm-skills/4-implementation/bmad-sprint-planning",
|
|
69
|
+
"./src/bmm-skills/4-implementation/bmad-sprint-status",
|
|
70
|
+
"./src/bmm-skills/4-implementation/bmad-code-review",
|
|
71
|
+
"./src/bmm-skills/4-implementation/bmad-create-story",
|
|
72
|
+
"./src/bmm-skills/4-implementation/bmad-correct-course",
|
|
73
|
+
"./src/bmm-skills/4-implementation/bmad-retrospective",
|
|
74
|
+
"./src/bmm-skills/4-implementation/bmad-qa-generate-e2e-tests"
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
}
|
package/package.json
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
module,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
module,skill,display-name,menu-code,description,action,args,phase,after,before,required,output-location,outputs
|
|
2
|
+
BMad Method,bmad-document-project,Document Project,DP,Analyze an existing project to produce useful documentation.,,anytime,,,false,project-knowledge,*
|
|
3
|
+
BMad Method,bmad-generate-project-context,Generate Project Context,GPC,Scan existing codebase to generate a lean LLM-optimized project-context.md. Essential for brownfield projects.,,anytime,,,false,output_folder,project context
|
|
4
|
+
BMad Method,bmad-quick-dev,Quick Dev,QQ,Unified intent-in code-out workflow: clarify plan implement review and present.,,anytime,,,false,implementation_artifacts,spec and project implementation
|
|
5
|
+
BMad Method,bmad-correct-course,Correct Course,CC,Navigate significant changes. May recommend start over update PRD redo architecture sprint planning or correct epics and stories.,,anytime,,,false,planning_artifacts,change proposal
|
|
6
|
+
BMad Method,bmad-agent-tech-writer,Write Document,WD,"Describe in detail what you want, and the agent will follow documentation best practices. Multi-turn conversation with subprocess for research/review.",write,,anytime,,,false,project-knowledge,document
|
|
7
|
+
BMad Method,bmad-agent-tech-writer,Update Standards,US,Update agent memory documentation-standards.md with your specific preferences if you discover missing document conventions.,update-standards,,anytime,,,false,_bmad/_memory/tech-writer-sidecar,standards
|
|
8
|
+
BMad Method,bmad-agent-tech-writer,Mermaid Generate,MG,Create a Mermaid diagram based on user description. Will suggest diagram types if not specified.,mermaid,,anytime,,,false,planning_artifacts,mermaid diagram
|
|
9
|
+
BMad Method,bmad-agent-tech-writer,Validate Document,VD,Review the specified document against documentation standards and best practices. Returns specific actionable improvement suggestions organized by priority.,validate,[path],anytime,,,false,planning_artifacts,validation report
|
|
10
|
+
BMad Method,bmad-agent-tech-writer,Explain Concept,EC,Create clear technical explanations with examples and diagrams for complex concepts.,explain,[topic],anytime,,,false,project_knowledge,explanation
|
|
11
|
+
BMad Method,bmad-brainstorming,Brainstorm Project,BP,Expert guided facilitation through a single or multiple techniques.,,1-analysis,,,false,planning_artifacts,brainstorming session
|
|
12
|
+
BMad Method,bmad-market-research,Market Research,MR,"Market analysis competitive landscape customer needs and trends.",,1-analysis,,,false,"planning_artifacts|project-knowledge",research documents
|
|
13
|
+
BMad Method,bmad-domain-research,Domain Research,DR,Industry domain deep dive subject matter expertise and terminology.,,1-analysis,,,false,"planning_artifacts|project_knowledge",research documents
|
|
14
|
+
BMad Method,bmad-technical-research,Technical Research,TR,Technical feasibility architecture options and implementation approaches.,,1-analysis,,,false,"planning_artifacts|project_knowledge",research documents
|
|
15
|
+
BMad Method,bmad-product-brief,Create Brief,CB,A guided experience to nail down your product idea.,,1-analysis,,,false,planning_artifacts,product brief
|
|
16
|
+
BMad Method,bmad-create-prd,Create PRD,CP,Expert led facilitation to produce your Product Requirements Document.,,2-planning,,,true,planning_artifacts,prd
|
|
17
|
+
BMad Method,bmad-validate-prd,Validate PRD,VP,,,[path],2-planning,bmad-create-prd,,false,planning_artifacts,prd validation report
|
|
18
|
+
BMad Method,bmad-edit-prd,Edit PRD,EP,,,[path],2-planning,bmad-validate-prd,,false,planning_artifacts,updated prd
|
|
19
|
+
BMad Method,bmad-create-ux-design,Create UX,CU,"Guidance through realizing the plan for your UX, strongly recommended if a UI is a primary piece of the proposed project.",,2-planning,bmad-create-prd,,false,planning_artifacts,ux design
|
|
20
|
+
BMad Method,bmad-create-architecture,Create Architecture,CA,Guided workflow to document technical decisions.,,3-solutioning,,,true,planning_artifacts,architecture
|
|
21
|
+
BMad Method,bmad-create-epics-and-stories,Create Epics and Stories,CE,,,3-solutioning,bmad-create-architecture,,true,planning_artifacts,epics and stories
|
|
22
|
+
BMad Method,bmad-check-implementation-readiness,Check Implementation Readiness,IR,Ensure PRD UX Architecture and Epics Stories are aligned.,,3-solutioning,bmad-create-epics-and-stories,,true,planning_artifacts,readiness report
|
|
23
|
+
BMad Method,bmad-sprint-planning,Sprint Planning,SP,Kicks off implementation by producing a plan the implementation agents will follow in sequence for every story.,,4-implementation,,,true,implementation_artifacts,sprint status
|
|
24
|
+
BMad Method,bmad-sprint-status,Sprint Status,SS,Anytime: Summarize sprint status and route to next workflow.,,4-implementation,bmad-sprint-planning,,false,,
|
|
25
|
+
BMad Method,bmad-create-story,Create Story,CS,"Story cycle start: Prepare first found story in the sprint plan that is next or a specific epic/story designation.",create,,4-implementation,bmad-sprint-planning,bmad-create-story:validate,true,implementation_artifacts,story
|
|
26
|
+
BMad Method,bmad-create-story,Validate Story,VS,Validates story readiness and completeness before development work begins.,validate,,4-implementation,bmad-create-story:create,bmad-dev-story,false,implementation_artifacts,story validation report
|
|
27
|
+
BMad Method,bmad-dev-story,Dev Story,DS,Story cycle: Execute story implementation tasks and tests then CR then back to DS if fixes needed.,,4-implementation,bmad-create-story:validate,,true,,
|
|
28
|
+
BMad Method,bmad-code-review,Code Review,CR,Story cycle: If issues back to DS if approved then next CS or ER if epic complete.,,4-implementation,bmad-dev-story,,false,,
|
|
29
|
+
BMad Method,bmad-qa-generate-e2e-tests,QA Automation Test,QA,Generate automated API and E2E tests for implemented code. NOT for code review or story validation — use CR for that.,,4-implementation,bmad-dev-story,,false,implementation_artifacts,test suite
|
|
30
|
+
BMad Method,bmad-retrospective,Retrospective,ER,Optional at epic end: Review completed work lessons learned and next epic or if major issues consider CC.,,4-implementation,bmad-code-review,,false,implementation_artifacts,retrospective
|
|
@@ -1,92 +1,73 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: bmad-help
|
|
3
|
-
description: 'Analyzes current state and user query to answer BMad questions or recommend the next
|
|
3
|
+
description: 'Analyzes current state and user query to answer BMad questions or recommend the next skill(s) to use. Use when user asks for help, bmad help, what to do next, or what to start with in BMad.'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# BMad Help
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Purpose
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
- **Numbered phases indicate sequence** — Phases like `1-discover` → `2-define` → `3-build` → `4-ship` flow in order (naming varies by module)
|
|
12
|
-
- **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.
|
|
13
|
-
- **Stay in module** — Guide through the active module's workflow based on phase+sequence ordering
|
|
14
|
-
- **Descriptions contain routing** — Read for alternate paths (e.g., "back to previous if fixes needed")
|
|
15
|
-
- **`required=true` blocks progress** — Required workflows must complete before proceeding to later phases
|
|
16
|
-
- **Artifacts reveal completion** — Search resolved output paths for `outputs` patterns, fuzzy-match found files to workflow rows
|
|
10
|
+
Help the user understand where they are in their BMad workflow and what to do next. Answer BMad questions when asked.
|
|
17
11
|
|
|
18
|
-
##
|
|
12
|
+
## Desired Outcomes
|
|
19
13
|
|
|
20
|
-
|
|
21
|
-
When `command` field has a value:
|
|
22
|
-
- Show the command as a skill name in backticks (e.g., `bmad-bmm-create-prd`)
|
|
14
|
+
When this skill completes, the user should:
|
|
23
15
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
16
|
+
1. **Know where they are** — which module and phase they're in, what's already been completed
|
|
17
|
+
2. **Know what to do next** — the next recommended and/or required step, with clear reasoning
|
|
18
|
+
3. **Know how to invoke it** — skill name, menu code, action context, and any args that shortcut the conversation
|
|
19
|
+
4. **Get offered a quick start** — when a single skill is the clear next step, offer to run it for the user right now rather than just listing it
|
|
20
|
+
5. **Feel oriented, not overwhelmed** — surface only what's relevant to their current position; don't dump the entire catalog
|
|
29
21
|
|
|
30
|
-
|
|
31
|
-
When `command` field is empty:
|
|
32
|
-
- User loads agent first by invoking the agent skill (e.g., `bmad-pm`)
|
|
33
|
-
- Then invokes by referencing the `code` field or describing the `name` field
|
|
34
|
-
- Do NOT show a slash command — show the code value and agent load instruction instead
|
|
22
|
+
## Data Sources
|
|
35
23
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
Agent: Tech Writer
|
|
41
|
-
Description: Create clear technical explanations with examples...
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
## MODULE DETECTION
|
|
45
|
-
|
|
46
|
-
- **Empty `module` column** → universal tools (work across all modules)
|
|
47
|
-
- **Named `module`** → module-specific workflows
|
|
24
|
+
- **Catalog**: `{project-root}/_bmad/_config/bmad-help.csv` — assembled manifest of all installed module skills
|
|
25
|
+
- **Config**: `config.yaml` and `user-config.yaml` files in `{project-root}/_bmad/` and its subfolders — resolve `output-location` variables, provide `communication_language` and `project_knowledge`
|
|
26
|
+
- **Artifacts**: Files matching `outputs` patterns at resolved `output-location` paths reveal which steps are possibly completed; their content may also provide grounding context for recommendations
|
|
27
|
+
- **Project knowledge**: If `project_knowledge` resolves to an existing path, read it for grounding context. Never fabricate project-specific details.
|
|
48
28
|
|
|
49
|
-
|
|
29
|
+
## CSV Interpretation
|
|
50
30
|
|
|
51
|
-
|
|
31
|
+
The catalog uses this format:
|
|
52
32
|
|
|
53
|
-
|
|
54
|
-
-
|
|
55
|
-
|
|
56
|
-
- Artifacts found matching `outputs` patterns
|
|
57
|
-
- If `index.md` exists, read it for additional context
|
|
58
|
-
- If still unclear, ask: "What workflow did you most recently complete?"
|
|
59
|
-
|
|
60
|
-
## EXECUTION
|
|
33
|
+
```
|
|
34
|
+
module,skill,display-name,menu-code,description,action,args,phase,after,before,required,output-location,outputs
|
|
35
|
+
```
|
|
61
36
|
|
|
62
|
-
|
|
37
|
+
**Phases** determine the high-level flow:
|
|
38
|
+
- `anytime` — available regardless of workflow state
|
|
39
|
+
- Numbered phases (`1-analysis`, `2-planning`, etc.) flow in order; naming varies by module
|
|
63
40
|
|
|
64
|
-
|
|
41
|
+
**Dependencies** determine ordering within and across phases:
|
|
42
|
+
- `after` — skills that should ideally complete before this one
|
|
43
|
+
- `before` — skills that should run after this one
|
|
44
|
+
- Format: `skill-name` for single-action skills, `skill-name:action` for multi-action skills
|
|
65
45
|
|
|
66
|
-
|
|
46
|
+
**Required gates**:
|
|
47
|
+
- `required=true` items must complete before the user can meaningfully proceed to later phases
|
|
48
|
+
- A phase with no required items is entirely optional — recommend it but be clear about what's actually required next
|
|
67
49
|
|
|
68
|
-
|
|
50
|
+
**Completion detection**:
|
|
51
|
+
- Search resolved output paths for `outputs` patterns
|
|
52
|
+
- Fuzzy-match found files to catalog rows
|
|
53
|
+
- User may also state completion explicitly, or it may be evident from the current conversation
|
|
69
54
|
|
|
70
|
-
|
|
55
|
+
**Descriptions carry routing context** — some contain cycle info and alternate paths (e.g., "back to DS if fixes needed"). Read them as navigation hints, not just display text.
|
|
71
56
|
|
|
72
|
-
|
|
73
|
-
- Completed workflows detected
|
|
74
|
-
- Phase/sequence ordering (ROUTING RULES)
|
|
75
|
-
- Artifact presence
|
|
57
|
+
## Response Format
|
|
76
58
|
|
|
77
|
-
|
|
78
|
-
|
|
59
|
+
For each recommended item, present:
|
|
60
|
+
- `[menu-code]` **Display name** — e.g., "[CP] Create PRD"
|
|
61
|
+
- Skill name in backticks — e.g., `bmad-create-prd`
|
|
62
|
+
- For multi-action skills: action invocation context — e.g., "tech-writer lets create a mermaid diagram!"
|
|
63
|
+
- Description if present in CSV; otherwise your existing knowledge of the skill suffices
|
|
64
|
+
- Args if available
|
|
79
65
|
|
|
80
|
-
|
|
81
|
-
- Workflow **name**
|
|
82
|
-
- **Command** OR **Code + Agent load instruction** (per DISPLAY RULES)
|
|
83
|
-
- **Agent** title and display name from the CSV (e.g., "🎨 Alex (Designer)")
|
|
84
|
-
- Brief **description**
|
|
66
|
+
**Ordering**: Show optional items first, then the next required item. Make it clear which is which.
|
|
85
67
|
|
|
86
|
-
|
|
87
|
-
- Present all output in `{communication_language}`
|
|
88
|
-
- Run each workflow in a **fresh context window**
|
|
89
|
-
- For **validation workflows**: recommend using a different high-quality LLM if available
|
|
90
|
-
- For conversational requests: match the user's tone while presenting clearly
|
|
68
|
+
## Constraints
|
|
91
69
|
|
|
92
|
-
|
|
70
|
+
- Present all output in `{communication_language}`
|
|
71
|
+
- Recommend running each skill in a **fresh context window**
|
|
72
|
+
- Match the user's tone — conversational when they're casual, structured when they want specifics
|
|
73
|
+
- If the active module is ambiguous, ask rather than guess
|
|
@@ -166,9 +166,27 @@ def resolve_project_root_placeholder(value, project_root):
|
|
|
166
166
|
"""Replace {project-root} placeholder with actual path."""
|
|
167
167
|
if not value or not isinstance(value, str):
|
|
168
168
|
return value
|
|
169
|
-
if '{project-root}' in value:
|
|
170
|
-
return value
|
|
171
|
-
|
|
169
|
+
if '{project-root}' not in value:
|
|
170
|
+
return value
|
|
171
|
+
|
|
172
|
+
# Strip the {project-root} token to inspect what remains, so we can
|
|
173
|
+
# correctly handle absolute paths stored as "{project-root}//absolute/path"
|
|
174
|
+
# (produced by the "{project-root}/{value}" template applied to an absolute value).
|
|
175
|
+
suffix = value.replace('{project-root}', '', 1)
|
|
176
|
+
|
|
177
|
+
# Strip the one path separator that follows the token (if any)
|
|
178
|
+
if suffix.startswith('/') or suffix.startswith('\\'):
|
|
179
|
+
remainder = suffix[1:]
|
|
180
|
+
else:
|
|
181
|
+
remainder = suffix
|
|
182
|
+
|
|
183
|
+
if os.path.isabs(remainder):
|
|
184
|
+
# The original value was an absolute path stored with a {project-root}/ prefix.
|
|
185
|
+
# Return the absolute path directly — no joining needed.
|
|
186
|
+
return remainder
|
|
187
|
+
|
|
188
|
+
# Relative path: join with project root and normalize to resolve any .. segments.
|
|
189
|
+
return os.path.normpath(os.path.join(str(project_root), remainder))
|
|
172
190
|
|
|
173
191
|
|
|
174
192
|
def parse_var_specs(vars_string):
|
|
@@ -222,9 +240,22 @@ def apply_result_template(var_def, raw_value, context):
|
|
|
222
240
|
if not result_template:
|
|
223
241
|
return raw_value
|
|
224
242
|
|
|
243
|
+
# If the user supplied an absolute path and the template would prefix it with
|
|
244
|
+
# "{project-root}/", skip the template entirely to avoid producing a broken path
|
|
245
|
+
# like "/my/project//absolute/path".
|
|
246
|
+
if isinstance(raw_value, str) and os.path.isabs(raw_value):
|
|
247
|
+
return raw_value
|
|
248
|
+
|
|
225
249
|
ctx = dict(context)
|
|
226
250
|
ctx['value'] = raw_value
|
|
227
|
-
|
|
251
|
+
result = expand_template(result_template, ctx)
|
|
252
|
+
|
|
253
|
+
# Normalize the resulting path to resolve any ".." segments (e.g. when the user
|
|
254
|
+
# entered a relative path such as "../../outside-dir").
|
|
255
|
+
if isinstance(result, str) and '{' not in result and os.path.isabs(result):
|
|
256
|
+
result = os.path.normpath(result)
|
|
257
|
+
|
|
258
|
+
return result
|
|
228
259
|
|
|
229
260
|
|
|
230
261
|
# =============================================================================
|
|
@@ -110,6 +110,37 @@ class TestResolveProjectRootPlaceholder(unittest.TestCase):
|
|
|
110
110
|
def test_non_string(self):
|
|
111
111
|
self.assertEqual(resolve_project_root_placeholder(42, Path('/test')), 42)
|
|
112
112
|
|
|
113
|
+
def test_absolute_path_stored_with_prefix(self):
|
|
114
|
+
"""Absolute output_folder entered by user is stored as '{project-root}//abs/path'
|
|
115
|
+
by the '{project-root}/{value}' template. It must resolve to '/abs/path', not
|
|
116
|
+
'/project//abs/path'."""
|
|
117
|
+
result = resolve_project_root_placeholder(
|
|
118
|
+
'{project-root}//Users/me/outside', Path('/Users/me/myproject')
|
|
119
|
+
)
|
|
120
|
+
self.assertEqual(result, '/Users/me/outside')
|
|
121
|
+
|
|
122
|
+
def test_relative_path_with_traversal_is_normalized(self):
|
|
123
|
+
"""A relative path like '../../sibling' produces '{project-root}/../../sibling'
|
|
124
|
+
after the template. It must resolve to the normalized absolute path, not the
|
|
125
|
+
un-normalized string '/project/../../sibling'."""
|
|
126
|
+
result = resolve_project_root_placeholder(
|
|
127
|
+
'{project-root}/../../sibling', Path('/Users/me/myproject')
|
|
128
|
+
)
|
|
129
|
+
self.assertEqual(result, '/Users/sibling')
|
|
130
|
+
|
|
131
|
+
def test_relative_path_one_level_up(self):
|
|
132
|
+
result = resolve_project_root_placeholder(
|
|
133
|
+
'{project-root}/../outside-outputs', Path('/project/root')
|
|
134
|
+
)
|
|
135
|
+
self.assertEqual(result, '/project/outside-outputs')
|
|
136
|
+
|
|
137
|
+
def test_standard_relative_path_unchanged(self):
|
|
138
|
+
"""Normal in-project relative paths continue to work correctly."""
|
|
139
|
+
result = resolve_project_root_placeholder(
|
|
140
|
+
'{project-root}/_bmad-output', Path('/project/root')
|
|
141
|
+
)
|
|
142
|
+
self.assertEqual(result, '/project/root/_bmad-output')
|
|
143
|
+
|
|
113
144
|
|
|
114
145
|
class TestExpandTemplate(unittest.TestCase):
|
|
115
146
|
|
|
@@ -147,6 +178,39 @@ class TestApplyResultTemplate(unittest.TestCase):
|
|
|
147
178
|
result = apply_result_template(var_def, 'English', {})
|
|
148
179
|
self.assertEqual(result, 'English')
|
|
149
180
|
|
|
181
|
+
def test_absolute_value_skips_project_root_template(self):
|
|
182
|
+
"""When the user enters an absolute path, the '{project-root}/{value}' template
|
|
183
|
+
must not be applied — doing so would produce '/project//absolute/path'."""
|
|
184
|
+
var_def = {'result': '{project-root}/{value}'}
|
|
185
|
+
result = apply_result_template(
|
|
186
|
+
var_def, '/Users/me/shared-outputs', {'project-root': '/Users/me/myproject'}
|
|
187
|
+
)
|
|
188
|
+
self.assertEqual(result, '/Users/me/shared-outputs')
|
|
189
|
+
|
|
190
|
+
def test_relative_traversal_value_is_normalized(self):
|
|
191
|
+
"""A relative path like '../../outside' combined with the project-root template
|
|
192
|
+
must produce a clean normalized absolute path, not '/project/../../outside'."""
|
|
193
|
+
var_def = {'result': '{project-root}/{value}'}
|
|
194
|
+
result = apply_result_template(
|
|
195
|
+
var_def, '../../outside-dir', {'project-root': '/Users/me/myproject'}
|
|
196
|
+
)
|
|
197
|
+
self.assertEqual(result, '/Users/outside-dir')
|
|
198
|
+
|
|
199
|
+
def test_relative_one_level_up_is_normalized(self):
|
|
200
|
+
var_def = {'result': '{project-root}/{value}'}
|
|
201
|
+
result = apply_result_template(
|
|
202
|
+
var_def, '../sibling-outputs', {'project-root': '/project/root'}
|
|
203
|
+
)
|
|
204
|
+
self.assertEqual(result, '/project/sibling-outputs')
|
|
205
|
+
|
|
206
|
+
def test_normal_relative_value_unchanged(self):
|
|
207
|
+
"""Standard in-project relative paths still produce the expected joined path."""
|
|
208
|
+
var_def = {'result': '{project-root}/{value}'}
|
|
209
|
+
result = apply_result_template(
|
|
210
|
+
var_def, '_bmad-output', {'project-root': '/project/root'}
|
|
211
|
+
)
|
|
212
|
+
self.assertEqual(result, '/project/root/_bmad-output')
|
|
213
|
+
|
|
150
214
|
|
|
151
215
|
class TestLoadModuleYaml(unittest.TestCase):
|
|
152
216
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
module,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
module,skill,display-name,menu-code,description,action,args,phase,after,before,required,output-location,outputs
|
|
2
|
+
Core,bmad-brainstorming,Brainstorming,BSP,Use early in ideation or when stuck generating ideas.,,anytime,,,false,{output_folder}/brainstorming,brainstorming session
|
|
3
|
+
Core,bmad-party-mode,Party Mode,PM,Orchestrate multi-agent discussions when you need multiple perspectives or want agents to collaborate.,,anytime,,,false,,
|
|
4
|
+
Core,bmad-help,BMad Help,BH,,,anytime,,,false,,
|
|
5
|
+
Core,bmad-index-docs,Index Docs,ID,Use when LLM needs to understand available docs without loading everything.,,anytime,,,false,,
|
|
6
|
+
Core,bmad-shard-doc,Shard Document,SD,Use when doc becomes too large (>500 lines) to manage effectively.,[path],anytime,,,false,,
|
|
7
|
+
Core,bmad-editorial-review-prose,Editorial Review - Prose,EP,Use after drafting to polish written content.,[path],anytime,,,false,report located with target document,three-column markdown table with suggested fixes
|
|
8
|
+
Core,bmad-editorial-review-structure,Editorial Review - Structure,ES,Use when doc produced from multiple subprocesses or needs structural improvement.,[path],anytime,,,false,report located with target document,
|
|
9
|
+
Core,bmad-review-adversarial-general,Adversarial Review,AR,"Use for quality assurance or before finalizing deliverables. Code Review in other modules runs this automatically, but also useful for document reviews.",[path],anytime,,,false,,
|
|
10
|
+
Core,bmad-review-edge-case-hunter,Edge Case Hunter Review,ECH,Use alongside adversarial review for orthogonal coverage — method-driven not attitude-driven.,[path],anytime,,,false,,
|
|
11
|
+
Core,bmad-distillator,Distillator,DG,Use when you need token-efficient distillates that preserve all information for downstream LLM consumption.,[path],anytime,,,false,adjacent to source document or specified output_path,distillate markdown file(s)
|