@sleighmaster/bmad 1.5.1 → 1.5.2

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "description": "BMad6GitHub 커스텀 파일 목록 - 동기화 시 보호할 파일들",
4
- "version": "1.0.0",
4
+ "schema_version": "1.0.0",
5
5
  "upstream": {
6
6
  "url": "https://github.com/bmad-code-org/BMAD-METHOD.git",
7
7
  "branch": "main"
@@ -1,3 +1,8 @@
1
+ distribution:
2
+ name: BMad6GitHub
3
+ version: 1.2.0
4
+ upstream: 6.0.0-Beta.4
5
+ repo: https://github.com/SleighMaster99/BMad6GitHub
1
6
  installation:
2
7
  version: 6.0.0-Beta.4
3
8
  installDate: 2026-01-30T08:02:42.183Z
@@ -62,7 +62,7 @@ You must fully embody this agent's persona and follow all activation instruction
62
62
  <item cmd="CP or fuzzy match on create-prd" exec="{project-root}/_bmad/bmm/workflows/2-plan-workflows/create-prd/workflow.md">[CP] Create PRD: Expert led facilitation to produce your Product Requirements Document</item>
63
63
  <item cmd="VP or fuzzy match on validate-prd" exec="{project-root}/_bmad/bmm/workflows/2-plan-workflows/create-prd/workflow.md">[VP] Validate PRD: Validate a Product Requirements Document is comprehensive, lean, well organized and cohesive</item>
64
64
  <item cmd="EP or fuzzy match on edit-prd" exec="{project-root}/_bmad/bmm/workflows/2-plan-workflows/create-prd/workflow.md">[EP] Edit PRD: Update an existing Product Requirements Document</item>
65
- <item cmd="CE or fuzzy match on epics-stories" exec="{project-root}/_bmad/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.md">[CE] Create Epics and Stories: Create the Epics and Stories Listing, these are the specs that will drive development</item>
65
+ <item cmd="CE or fuzzy match on epics" exec="{project-root}/_bmad/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.md">[CE] Create Epics: Create the Epics listing that organizes requirements into implementable units (stories are created separately via SM agent CS command)</item>
66
66
  <item cmd="IR or fuzzy match on implementation-readiness" exec="{project-root}/_bmad/bmm/workflows/3-solutioning/check-implementation-readiness/workflow.md">[IR] Implementation Readiness: Ensure the PRD, UX, and Architecture and Epics and Stories List are all aligned</item>
67
67
  <item cmd="CC or fuzzy match on correct-course" workflow="{project-root}/_bmad/bmm/workflows/4-implementation/correct-course/workflow.yaml">[CC] Course Correction: Use this so we can determine how to proceed if major need for change is discovered mid implementation</item>
68
68
  <item cmd="PM or fuzzy match on party-mode" exec="{project-root}/_bmad/core/workflows/party-mode/workflow.md">[PM] Start Party Mode</item>
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: 'step-01-validate-prerequisites'
3
- description: 'Validate required documents exist and extract all requirements for epic and story creation'
3
+ description: 'Validate required documents exist and extract all requirements for epic creation'
4
4
 
5
5
  # Path Definitions
6
6
  workflow_path: '{project-root}/_bmad/bmm/workflows/3-solutioning/create-epics-and-stories'
@@ -24,7 +24,7 @@ epicsTemplate: '{workflow_path}/templates/epics-template.md'
24
24
 
25
25
  ## STEP GOAL:
26
26
 
27
- To validate that all required input documents exist and extract all requirements (FRs, NFRs, and additional requirements from UX/Architecture) needed for epic and story creation.
27
+ To validate that all required input documents exist and extract all requirements (FRs, NFRs, and additional requirements from UX/Architecture) needed for epic creation.
28
28
 
29
29
  ## MANDATORY EXECUTION RULES (READ FIRST):
30
30
 
@@ -47,7 +47,7 @@ To validate that all required input documents exist and extract all requirements
47
47
  ### Step-Specific Rules:
48
48
 
49
49
  - 🎯 Focus ONLY on extracting and organizing requirements
50
- - 🚫 FORBIDDEN to start creating epics or stories in this step
50
+ - 🚫 FORBIDDEN to start creating epics in this step
51
51
  - 💬 Extract requirements from ALL available documents
52
52
  - 🚪 POPULATE the template sections exactly as needed
53
53
 
@@ -62,7 +62,7 @@ To validate that all required input documents exist and extract all requirements
62
62
 
63
63
  ### 1. Welcome and Overview
64
64
 
65
- Welcome {user_name} to comprehensive epic and story creation!
65
+ Welcome {user_name} to comprehensive epic creation!
66
66
 
67
67
  **CRITICAL PREREQUISITE VALIDATION:**
68
68
 
@@ -131,7 +131,7 @@ NFR2: [Performance/Security/Usability requirement]
131
131
 
132
132
  ### 5. Extract Additional Requirements from Architecture
133
133
 
134
- Review the Architecture document for technical requirements that impact epic and story creation:
134
+ Review the Architecture document for technical requirements that impact epic creation:
135
135
 
136
136
  **Look for:**
137
137
 
@@ -156,7 +156,7 @@ Review the Architecture document for technical requirements that impact epic and
156
156
 
157
157
  ### 6. Extract Additional Requirements from UX (if exists)
158
158
 
159
- Review the UX document for requirements that affect epic and story creation:
159
+ Review the UX document for requirements that affect epic creation:
160
160
 
161
161
  **Look for:**
162
162
 
@@ -7,7 +7,7 @@ workflow_path: '{project-root}/_bmad/bmm/workflows/3-solutioning/create-epics-an
7
7
 
8
8
  # File References
9
9
  thisStepFile: './step-02-design-epics.md'
10
- nextStepFile: './step-03-create-stories.md'
10
+ nextStepFile: './step-04-final-validation.md'
11
11
  workflowFile: '{workflow_path}/workflow.md'
12
12
  outputFile: '{planning_artifacts}/epics.md'
13
13
 
@@ -199,7 +199,7 @@ Ask user:
199
199
  ### 7. Get Final Approval
200
200
 
201
201
  **CRITICAL:** Must get explicit user approval:
202
- "Do you approve this epic structure for proceeding to story creation?"
202
+ "Do you approve this epic structure?"
203
203
 
204
204
  If user wants changes:
205
205
 
@@ -236,7 +236,7 @@ Display: "**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Cont
236
236
 
237
237
  ## CRITICAL STEP COMPLETION NOTE
238
238
 
239
- ONLY WHEN C is selected and the approved epics_list is saved to document, will you then read fully and follow: {nextStepFile} to begin story creation step.
239
+ ONLY WHEN C is selected and the approved epics_list is saved to document, will you then read fully and follow: {nextStepFile} to begin final validation step.
240
240
 
241
241
  ---
242
242
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: 'step-04-final-validation'
3
- description: 'Validate complete coverage of all requirements and ensure implementation readiness'
3
+ description: 'Validate complete coverage of all requirements by epics and ensure epic structure readiness'
4
4
 
5
5
  # Path Definitions
6
6
  workflow_path: '{project-root}/_bmad/bmm/workflows/3-solutioning/create-epics-and-stories'
@@ -22,7 +22,7 @@ epicsTemplate: '{workflow_path}/templates/epics-template.md'
22
22
 
23
23
  ## STEP GOAL:
24
24
 
25
- To validate complete coverage of all requirements and ensure stories are ready for development.
25
+ To validate complete coverage of all requirements by epics and ensure epic structure is ready for story creation.
26
26
 
27
27
  ## MANDATORY EXECUTION RULES (READ FIRST):
28
28
 
@@ -44,36 +44,35 @@ To validate complete coverage of all requirements and ensure stories are ready f
44
44
 
45
45
  ### Step-Specific Rules:
46
46
 
47
- - 🎯 Focus ONLY on validating complete requirements coverage
47
+ - 🎯 Focus ONLY on validating complete requirements coverage by epics
48
48
  - 🚫 FORBIDDEN to skip any validation checks
49
- - 💬 Validate FR coverage, story completeness, and dependencies
50
- - 🚪 ENSURE all stories are ready for development
49
+ - 💬 Validate FR coverage and epic structure
50
+ - 🚪 ENSURE all epics are well-defined for subsequent story creation
51
51
 
52
52
  ## EXECUTION PROTOCOLS:
53
53
 
54
- - 🎯 Validate every requirement has story coverage
55
- - 💾 Check story dependencies and flow
54
+ - 🎯 Validate every requirement is covered by at least one epic
55
+ - 💾 Check epic dependencies and flow
56
56
  - 📖 Verify architecture compliance
57
57
  - 🚫 FORBIDDEN to approve incomplete coverage
58
58
 
59
59
  ## CONTEXT BOUNDARIES:
60
60
 
61
- - Available context: Complete epic and story breakdown from previous steps
62
- - Focus: Final validation of requirements coverage and story readiness
61
+ - Available context: Complete epic breakdown from previous steps
62
+ - Focus: Final validation of requirements coverage and epic readiness
63
63
  - Limits: Validation only, no new content creation
64
- - Dependencies: Completed story generation from Step 3
64
+ - Dependencies: Completed epic design from Step 2
65
65
 
66
66
  ## VALIDATION PROCESS:
67
67
 
68
68
  ### 1. FR Coverage Validation
69
69
 
70
- Review the complete epic and story breakdown to ensure EVERY FR is covered:
70
+ Review the epic breakdown to ensure EVERY FR is covered:
71
71
 
72
72
  **CRITICAL CHECK:**
73
73
 
74
74
  - Go through each FR from the Requirements Inventory
75
- - Verify it appears in at least one story
76
- - Check that acceptance criteria fully address the FR
75
+ - Verify it appears in at least one epic's FR coverage
77
76
  - No FRs should be left uncovered
78
77
 
79
78
  ### 2. Architecture Implementation Validation
@@ -81,37 +80,18 @@ Review the complete epic and story breakdown to ensure EVERY FR is covered:
81
80
  **Check for Starter Template Setup:**
82
81
 
83
82
  - Does Architecture document specify a starter template?
84
- - If YES: Epic 1 Story 1 must be "Set up initial project from starter template"
85
- - This includes cloning, installing dependencies, initial configuration
83
+ - If YES: Note that Epic 1 should include project setup from the starter template
86
84
 
87
- **Database/Entity Creation Validation:**
88
-
89
- - Are database tables/entities created ONLY when needed by stories?
90
- - ❌ WRONG: Epic 1 creates all tables upfront
91
- - ✅ RIGHT: Tables created as part of the first story that needs them
92
- - Each story should create/modify ONLY what it needs
93
-
94
- ### 3. Story Quality Validation
95
-
96
- **Each story must:**
97
-
98
- - Be completable by a single dev agent
99
- - Have clear acceptance criteria
100
- - Reference specific FRs it implements
101
- - Include necessary technical details
102
- - **Not have forward dependencies** (can only depend on PREVIOUS stories)
103
- - Be implementable without waiting for future stories
104
-
105
- ### 4. Epic Structure Validation
85
+ ### 3. Epic Structure Validation
106
86
 
107
87
  **Check that:**
108
88
 
109
89
  - Epics deliver user value, not technical milestones
110
90
  - Dependencies flow naturally
111
- - Foundation stories only setup what's needed
112
- - No big upfront technical work
91
+ - Each epic has a clear goal statement
92
+ - No big upfront technical work without user value
113
93
 
114
- ### 5. Dependency Validation (CRITICAL)
94
+ ### 4. Dependency Validation (CRITICAL)
115
95
 
116
96
  **Epic Independence Check:**
117
97
 
@@ -121,17 +101,7 @@ Review the complete epic and story breakdown to ensure EVERY FR is covered:
121
101
  - ❌ WRONG: Epic 2 requires Epic 3 features to work
122
102
  - ✅ RIGHT: Each epic is independently valuable
123
103
 
124
- **Within-Epic Story Dependency Check:**
125
- For each epic, review stories in order:
126
-
127
- - Can Story N.1 be completed without Stories N.2, N.3, etc.?
128
- - Can Story N.2 be completed using only Story N.1 output?
129
- - Can Story N.3 be completed using only Stories N.1 & N.2 outputs?
130
- - ❌ WRONG: "This story depends on a future story"
131
- - ❌ WRONG: Story references features not yet implemented
132
- - ✅ RIGHT: Each story builds only on previous stories
133
-
134
- ### 6. Parallel Development Validation (병렬 개발 검증)
104
+ ### 5. Parallel Development Validation (병렬 개발 검증)
135
105
 
136
106
  **독립 실행 검증:**
137
107
  - 각 에픽이 다른 기능 에픽 없이 테스트 가능한가?
@@ -152,7 +122,7 @@ For each epic, review stories in order:
152
122
  - [ ] 머지 충돌 위험 영역 식별됨
153
123
  - [ ] 필요시 인터페이스로 분리됨
154
124
 
155
- ### 7. Complete and Save
125
+ ### 6. Complete and Save
156
126
 
157
127
  If all validations pass:
158
128
 
@@ -163,8 +133,19 @@ If all validations pass:
163
133
  **Present Final Menu:**
164
134
  **All validations complete!** [C] Complete Workflow
165
135
 
166
- When C is selected, the workflow is complete and the epics.md is ready for development.
136
+ When C is selected, the workflow is complete and the epics.md is ready.
137
+
138
+ Epics creation complete. Read fully and follow: `_bmad/core/tasks/bmad-help.md` with argument `Create Epics`.
139
+
140
+ Upon Completion of task output:
167
141
 
168
- Epics and Stories complete. Read fully and follow: `_bmad/core/tasks/bmad-help.md` with argument `Create Epics and Stories`.
142
+ 1. Inform the user: **"에픽 생성이 완료되었습니다. 개별 스토리는 SM 에이전트의 [CS] Create Story 명령을 사용하여 생성하세요."**
143
+ 2. Offer to answer any questions about the epics.
144
+
145
+ ---
169
146
 
170
- Upon Completion of task output: offer to answer any questions about the Epics and Stories.
147
+ > **🛑 PHASE BOUNDARY - MANDATORY HALT**
148
+ >
149
+ > Solutioning 워크플로우가 완료되었습니다.
150
+ > create-story, dev-story, sprint-planning 등 구현 워크플로우를 자동으로 시작하지 마세요.
151
+ > 사용자가 명시적으로 다음 작업을 선택해야 합니다. HALT하고 사용자 입력을 기다리세요.
@@ -7,7 +7,7 @@ inputDocuments: []
7
7
 
8
8
  ## Overview
9
9
 
10
- This document provides the complete epic and story breakdown for {{project_name}}, decomposing the requirements from the PRD, UX Design if it exists, and Architecture requirements into implementable stories.
10
+ This document provides the complete epic breakdown for {{project_name}}, organizing the requirements from the PRD, UX Design if it exists, and Architecture requirements into implementable epics.
11
11
 
12
12
  ## Requirements Inventory
13
13
 
@@ -37,21 +37,6 @@ This document provides the complete epic and story breakdown for {{project_name}
37
37
 
38
38
  {{epic_goal_N}}
39
39
 
40
- <!-- Repeat for each story (M = 1, 2, 3...) within epic N -->
40
+ **FRs covered:** {{epic_fr_list_N}}
41
41
 
42
- ### Story {{N}}.{{M}}: {{story_title_N_M}}
43
-
44
- As a {{user_type}},
45
- I want {{capability}},
46
- So that {{value_benefit}}.
47
-
48
- **Acceptance Criteria:**
49
-
50
- <!-- for each AC on this story -->
51
-
52
- **Given** {{precondition}}
53
- **When** {{action}}
54
- **Then** {{expected_outcome}}
55
- **And** {{additional_criteria}}
56
-
57
- <!-- End story repeat -->
42
+ <!-- End epic repeat -->
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  name: create-epics-and-stories
3
- description: 'Transform PRD requirements and Architecture decisions into comprehensive stories organized by user value. This workflow requires completed PRD + Architecture documents (UX recommended if UI exists) and breaks down requirements into implementation-ready epics and user stories that incorporate all available technical and design context. Creates detailed, actionable stories with complete acceptance criteria for development teams.'
3
+ description: 'Transform PRD requirements and Architecture decisions into user-value-focused epics. This workflow requires completed PRD + Architecture documents (UX recommended if UI exists) and organizes requirements into implementable epics with clear goals and FR coverage. Individual stories are created separately using the SM agent CS workflow.'
4
4
  web_bundle: true
5
5
  ---
6
6
 
7
- # Create Epics and Stories
7
+ # Create Epics
8
8
 
9
- **Goal:** Transform PRD requirements and Architecture decisions into comprehensive stories organized by user value, creating detailed, actionable stories with complete acceptance criteria for development teams.
9
+ **Goal:** Transform PRD requirements and Architecture decisions into user-value-focused epics that organize all requirements into implementable units. Individual stories for each epic are created separately using the SM agent's CS (Create Story) command.
10
10
 
11
11
  **Your Role:** In addition to your name, communication_style, and persona, you are also a product strategist and technical specifications writer collaborating with a product owner. This is a partnership, not a client-vendor relationship. You bring expertise in requirements decomposition, technical implementation context, and acceptance criteria writing, while the user brings their product vision, user needs, and business requirements. Work together as equals.
12
12
 
@@ -403,14 +403,11 @@
403
403
  - Issue: #{{issue_number}} ({{issue_url}})
404
404
  - Branch: {{branch_name}}
405
405
 
406
- **Next Steps:**
407
- 1. Review the comprehensive story in {{story_file}}
408
- 2. Run dev agents `dev-story` for optimized implementation
409
- 3. Run `code-review` when complete (auto-marks done)
410
- 4. Optional: If Test Architect module installed, run `/bmad:tea:automate` after `dev-story` to generate guardrail tests
411
-
412
406
  **The developer now has everything needed for flawless implementation!**
413
407
  </output>
408
+
409
+ <critical>🛑 PHASE BOUNDARY: create-story 워크플로우가 완료되었습니다. dev-story, code-review 등 다른 워크플로우를 자동으로 실행하지 마세요. 사용자의 다음 지시를 기다리세요.</critical>
410
+ <action>HALT - Workflow complete. Await user's next instruction.</action>
414
411
  </step>
415
412
 
416
413
  </workflow>
@@ -1,4 +1,5 @@
1
1
  <workflow>
2
+ <critical>🛑 USER INVOCATION REQUIRED: dev-story는 사용자가 에이전트 메뉴 또는 직접 명령으로 명시적으로 호출해야 합니다. create-story, create-epics-and-stories 등 다른 워크플로우에서 자동 체이닝으로 도달한 경우 즉시 중단하고 사용자에게 제어를 반환하세요.</critical>
2
3
  <critical>The workflow execution engine is governed by: {project-root}/_bmad/core/tasks/workflow.xml</critical>
3
4
  <critical>You MUST have already loaded and processed: {installed_path}/workflow.yaml</critical>
4
5
  <critical>Communicate all responses in {communication_language} and language MUST be tailored to {user_skill_level}</critical>
@@ -36,7 +36,7 @@ input_file_patterns:
36
36
  load_strategy: "SELECTIVE_LOAD"
37
37
  previous_retrospective:
38
38
  description: "Previous epic's retrospective (optional)"
39
- pattern: "{implementation_artifacts}/**/epic-{{prev_epic_num}}-retro-*.md"
39
+ pattern: "{retrospectives_folder}/epic-{{prev_epic_num}}-retro-*.md"
40
40
  load_strategy: "SELECTIVE_LOAD"
41
41
  architecture:
42
42
  description: "System architecture for context"
@@ -58,6 +58,6 @@ input_file_patterns:
58
58
  # Required files
59
59
  sprint_status_file: "{implementation_artifacts}/sprint-status.yaml"
60
60
  story_directory: "{stories_artifacts}"
61
- retrospectives_folder: "{implementation_artifacts}"
61
+ retrospectives_folder: "{implementation_artifacts}/retrospectives"
62
62
 
63
63
  standalone: true
@@ -105,8 +105,8 @@
105
105
 
106
106
  <execution-modes>
107
107
  <mode name="normal">Full user interaction and confirmation of EVERY step at EVERY template output - NO EXCEPTIONS except yolo MODE</mode>
108
- <mode name="yolo">Skip all confirmations and elicitation, minimize prompts and try to produce all of the workflow automatically by
109
- simulating the remaining discussions with an simulated expert user</mode>
108
+ <mode name="yolo">Skip all confirmations and elicitation WITHIN THE CURRENT WORKFLOW ONLY, minimize prompts and try to produce all of the workflow automatically by
109
+ simulating the remaining discussions with a simulated expert user. YOLO mode NEVER carries across workflow boundaries -- when the current workflow completes, YOLO mode ends and the agent MUST HALT and wait for the user to explicitly choose the next action.</mode>
110
110
  </execution-modes>
111
111
 
112
112
  <supported-tags desc="Instructions can use these tags">
@@ -0,0 +1,38 @@
1
+ #!/bin/bash
2
+ # BMad6GitHub - Post-merge Hook
3
+ # 원격에서 삭제된 브랜치의 로컬 사본을 자동 정리
4
+
5
+ # 원격 추적 정보 갱신 (삭제된 원격 브랜치 반영)
6
+ git fetch --prune --quiet 2>/dev/null
7
+
8
+ # [gone] 상태인 로컬 브랜치 추출
9
+ gone_branches=$(git branch -vv | grep '\[.*: gone\]' | awk '{print $1}')
10
+
11
+ if [ -z "$gone_branches" ]; then
12
+ exit 0
13
+ fi
14
+
15
+ echo ""
16
+ echo "=========================================="
17
+ echo " 로컬 브랜치 자동 정리"
18
+ echo "=========================================="
19
+ echo ""
20
+
21
+ deleted=0
22
+ skipped=0
23
+
24
+ for branch in $gone_branches; do
25
+ if git branch -d "$branch" 2>/dev/null; then
26
+ echo " 삭제: $branch"
27
+ deleted=$((deleted + 1))
28
+ else
29
+ echo " 건너뜀 (머지되지 않음): $branch"
30
+ skipped=$((skipped + 1))
31
+ fi
32
+ done
33
+
34
+ echo ""
35
+ echo " 결과: ${deleted}개 삭제, ${skipped}개 건너뜀"
36
+ echo ""
37
+
38
+ exit 0
@@ -1,9 +1,83 @@
1
1
  #!/bin/bash
2
2
  # BMad6GitHub - Pre-push Hook
3
- # 1. master/main 브랜치로 직접 푸시 방지
4
- # 2. 태그 푸시 CHANGELOG.md 업데이트 여부 검증
3
+ # 1. 로컬 기본 브랜치(master/main) 자동 동기화
4
+ # 2. master/main 브랜치로 직접 푸시 방지
5
+ # 3. 태그 푸시 시 CHANGELOG.md 업데이트 여부 검증
5
6
 
6
- # 푸시 대상 분석
7
+ # --- 로컬 기본 브랜치 자동 동기화 ---
8
+ _sync_default_branch() {
9
+ # 기본 브랜치 감지
10
+ local default_branch=""
11
+ if git show-ref --verify --quiet refs/heads/master; then
12
+ default_branch="master"
13
+ elif git show-ref --verify --quiet refs/heads/main; then
14
+ default_branch="main"
15
+ fi
16
+
17
+ if [ -z "$default_branch" ]; then
18
+ return
19
+ fi
20
+
21
+ # origin 최신 정보 fetch
22
+ git fetch origin "$default_branch" --quiet 2>/dev/null || return
23
+
24
+ # 로컬과 origin 비교
25
+ local local_sha remote_sha
26
+ local_sha=$(git rev-parse "refs/heads/$default_branch" 2>/dev/null)
27
+ remote_sha=$(git rev-parse "refs/remotes/origin/$default_branch" 2>/dev/null)
28
+
29
+ if [ "$local_sha" = "$remote_sha" ]; then
30
+ return
31
+ fi
32
+
33
+ local behind
34
+ behind=$(git rev-list --count "$default_branch..origin/$default_branch" 2>/dev/null)
35
+
36
+ if [ "$behind" -eq 0 ] 2>/dev/null; then
37
+ return
38
+ fi
39
+
40
+ echo ""
41
+ echo "=========================================="
42
+ echo " 로컬 $default_branch 브랜치 자동 동기화"
43
+ echo "=========================================="
44
+ echo ""
45
+ echo " 로컬 $default_branch가 origin/$default_branch보다 ${behind}커밋 뒤처져 있습니다."
46
+
47
+ # fast-forward 가능 여부 확인
48
+ if git merge-base --is-ancestor "$default_branch" "origin/$default_branch"; then
49
+ local current_branch
50
+ current_branch=$(git symbolic-ref --short HEAD 2>/dev/null)
51
+
52
+ if [ "$current_branch" != "$default_branch" ]; then
53
+ # 현재 브랜치가 기본 브랜치가 아니면 fetch로 직접 업데이트
54
+ git fetch origin "$default_branch:$default_branch" --quiet 2>/dev/null
55
+ else
56
+ # 현재 브랜치가 기본 브랜치면 pull
57
+ git pull origin "$default_branch" --ff-only --quiet 2>/dev/null
58
+ fi
59
+ echo " -> fast-forward 자동 업데이트 완료!"
60
+
61
+ # 피처 브랜치에서 작업 중이면 merge 안내
62
+ if [ -n "$current_branch" ] && [ "$current_branch" != "$default_branch" ]; then
63
+ local branch_behind
64
+ branch_behind=$(git rev-list --count "$current_branch..${default_branch}" 2>/dev/null)
65
+ if [ "$branch_behind" -gt 0 ] 2>/dev/null; then
66
+ echo ""
67
+ echo " 현재 브랜치($current_branch)에 최신 $default_branch 반영이 필요합니다:"
68
+ echo " git merge $default_branch"
69
+ fi
70
+ fi
71
+ else
72
+ echo " -> fast-forward 불가 (로컬 $default_branch에 독립 커밋 존재)"
73
+ echo " -> 수동으로 해결해 주세요: git checkout $default_branch && git pull"
74
+ fi
75
+ echo ""
76
+ }
77
+
78
+ _sync_default_branch
79
+
80
+ # --- 푸시 대상 분석 ---
7
81
  while read local_ref local_sha remote_ref remote_sha; do
8
82
  # master/main 직접 푸시 차단
9
83
  if echo "$remote_ref" | grep -qE "refs/heads/(master|main)$"; then
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sleighmaster/bmad",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "description": "BMad6GitHub CLI - BMAD + GitHub Integration installer",
5
5
  "type": "module",
6
6
  "bin": {