bmad-fh 6.0.0-alpha.23.6390fcb0 → 6.0.0-alpha.23.6874ced1
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/.github/workflows/publish.yaml +17 -3
- package/.husky/post-checkout +12 -0
- package/.husky/pre-commit +17 -2
- package/.husky/pre-push +10 -0
- package/README.md +13 -7
- package/docs/migration-guide.md +27 -7
- package/docs/multi-scope-guide.md +69 -33
- package/docs/plans/multi-scope-parallel-artifacts-plan.md +112 -91
- package/package.json +3 -3
- package/src/core/lib/scope/scope-context.js +13 -2
- package/src/core/lib/scope/scope-manager.js +1 -1
- package/src/core/lib/scope/scope-validator.js +6 -4
- package/test/test-cli-arguments.js +686 -0
- package/test/test-scope-cli.js +171 -2
- package/tools/bmad-npx-wrapper.js +12 -2
- package/tools/build-docs.js +1 -0
- package/tools/cli/commands/scope.js +37 -2
|
@@ -41,12 +41,26 @@ jobs:
|
|
|
41
41
|
env:
|
|
42
42
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
43
43
|
run: |
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
VERSION="${{ steps.version.outputs.version }}"
|
|
45
|
+
echo "Checking if bmad-fh@${VERSION} already exists..."
|
|
46
|
+
|
|
47
|
+
# Check if version already exists on npm
|
|
48
|
+
if npm view "bmad-fh@${VERSION}" version 2>/dev/null; then
|
|
49
|
+
echo "Version ${VERSION} already exists on npm, skipping publish"
|
|
50
|
+
echo "SKIPPED=true" >> $GITHUB_ENV
|
|
51
|
+
else
|
|
52
|
+
echo "Publishing bmad-fh@${VERSION}"
|
|
53
|
+
npm publish --ignore-scripts
|
|
54
|
+
echo "SKIPPED=false" >> $GITHUB_ENV
|
|
55
|
+
fi
|
|
46
56
|
|
|
47
57
|
- name: Summary
|
|
48
58
|
run: |
|
|
49
|
-
|
|
59
|
+
if [ "$SKIPPED" = "true" ]; then
|
|
60
|
+
echo "## Skipped - bmad-fh@${{ steps.version.outputs.version }} already exists" >> $GITHUB_STEP_SUMMARY
|
|
61
|
+
else
|
|
62
|
+
echo "## Published bmad-fh@${{ steps.version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
|
|
63
|
+
fi
|
|
50
64
|
echo "" >> $GITHUB_STEP_SUMMARY
|
|
51
65
|
echo "### Installation" >> $GITHUB_STEP_SUMMARY
|
|
52
66
|
echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
|
|
3
|
+
# =============================================================================
|
|
4
|
+
# Call .githooks/post-checkout first (if exists)
|
|
5
|
+
# =============================================================================
|
|
6
|
+
if [ -x ".githooks/post-checkout" ]; then
|
|
7
|
+
.githooks/post-checkout "$@"
|
|
8
|
+
fi
|
|
9
|
+
|
|
10
|
+
# =============================================================================
|
|
11
|
+
# Husky-specific post-checkout logic can be added below
|
|
12
|
+
# =============================================================================
|
package/.husky/pre-commit
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env sh
|
|
2
2
|
|
|
3
|
+
# =============================================================================
|
|
4
|
+
# Call .githooks/pre-commit first (if exists)
|
|
5
|
+
# =============================================================================
|
|
6
|
+
if [ -x ".githooks/pre-commit" ]; then
|
|
7
|
+
.githooks/pre-commit "$@"
|
|
8
|
+
GITHOOKS_EXIT=$?
|
|
9
|
+
if [ $GITHOOKS_EXIT -ne 0 ]; then
|
|
10
|
+
exit $GITHOOKS_EXIT
|
|
11
|
+
fi
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
# =============================================================================
|
|
15
|
+
# Husky-specific: lint-staged and tests
|
|
16
|
+
# =============================================================================
|
|
17
|
+
|
|
3
18
|
# Auto-fix changed files and stage them
|
|
4
19
|
npx --no-install lint-staged
|
|
5
20
|
|
|
@@ -10,11 +25,11 @@ npm test
|
|
|
10
25
|
if command -v rg >/dev/null 2>&1; then
|
|
11
26
|
if git diff --cached --name-only | rg -q '^docs/'; then
|
|
12
27
|
npm run docs:validate-links
|
|
13
|
-
|
|
28
|
+
npm run docs:build
|
|
14
29
|
fi
|
|
15
30
|
else
|
|
16
31
|
if git diff --cached --name-only | grep -Eq '^docs/'; then
|
|
17
32
|
npm run docs:validate-links
|
|
18
|
-
|
|
33
|
+
npm run docs:build
|
|
19
34
|
fi
|
|
20
35
|
fi
|
package/.husky/pre-push
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
|
|
3
|
+
# Delegate to .githooks/pre-push for comprehensive checks
|
|
4
|
+
# (upstream sync, rebase check, single-commit enforcement)
|
|
5
|
+
|
|
6
|
+
if [ -x ".githooks/pre-push" ]; then
|
|
7
|
+
.githooks/pre-push "$@"
|
|
8
|
+
else
|
|
9
|
+
echo "Warning: .githooks/pre-push not found, skipping custom checks"
|
|
10
|
+
fi
|
package/README.md
CHANGED
|
@@ -74,22 +74,28 @@ BMad supports running multiple workflows in parallel across different terminal s
|
|
|
74
74
|
# Initialize scope system
|
|
75
75
|
npx bmad-fh scope init
|
|
76
76
|
|
|
77
|
-
# Create
|
|
77
|
+
# Create a scope (you'll be prompted to activate it)
|
|
78
78
|
npx bmad-fh scope create auth --name "Authentication Service"
|
|
79
|
-
|
|
79
|
+
# ✓ Scope 'auth' created successfully!
|
|
80
|
+
# ? Set 'auth' as your active scope for this session? (Y/n)
|
|
80
81
|
|
|
81
|
-
#
|
|
82
|
-
|
|
82
|
+
# Run workflows - artifacts now go to _bmad-output/auth/
|
|
83
|
+
# The active scope is stored in .bmad-scope file
|
|
83
84
|
|
|
84
|
-
#
|
|
85
|
-
# Terminal 1:
|
|
86
|
-
|
|
85
|
+
# For parallel development in different terminals:
|
|
86
|
+
# Terminal 1:
|
|
87
|
+
npx bmad-fh scope set auth # Activate auth scope
|
|
88
|
+
# Terminal 2:
|
|
89
|
+
npx bmad-fh scope set payments # Activate payments scope
|
|
87
90
|
|
|
88
91
|
# Share artifacts between scopes
|
|
89
92
|
npx bmad-fh scope sync-up auth # Promote to shared layer
|
|
90
93
|
npx bmad-fh scope sync-down payments # Pull shared updates
|
|
91
94
|
```
|
|
92
95
|
|
|
96
|
+
> **Important:** Workflows only use scoped directories when a scope is active.
|
|
97
|
+
> After creating a scope, accept the prompt to activate it, or run `scope set <id>` manually.
|
|
98
|
+
|
|
93
99
|
### CLI Reference
|
|
94
100
|
|
|
95
101
|
| Command | Description |
|
package/docs/migration-guide.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Migration Guide: Multi-Scope Parallel Artifacts'
|
|
3
|
+
description: 'Guide for migrating existing BMAD installations to the multi-scope system'
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Migration Guide: Multi-Scope Parallel Artifacts
|
|
2
7
|
|
|
3
8
|
> Guide for migrating existing BMAD installations to the multi-scope system.
|
|
@@ -23,11 +28,13 @@ The multi-scope system introduces isolated artifact workspaces while maintaining
|
|
|
23
28
|
If you have a single-team, single-product workflow, you can continue using BMAD without migration. The scope system is entirely opt-in.
|
|
24
29
|
|
|
25
30
|
**When to choose this path:**
|
|
31
|
+
|
|
26
32
|
- Small to medium projects
|
|
27
33
|
- Single developer or tightly coordinated team
|
|
28
34
|
- No need for parallel feature development
|
|
29
35
|
|
|
30
36
|
**What happens:**
|
|
37
|
+
|
|
31
38
|
- Workflows continue to use `_bmad-output/` directly
|
|
32
39
|
- No scope variable in paths
|
|
33
40
|
- All existing commands work unchanged
|
|
@@ -49,6 +56,7 @@ bmad scope info default
|
|
|
49
56
|
```
|
|
50
57
|
|
|
51
58
|
**What happens:**
|
|
59
|
+
|
|
52
60
|
- Creates backup at `_bmad-output/_backup_migration_<timestamp>/`
|
|
53
61
|
- Initializes scope system
|
|
54
62
|
- Creates `default` scope
|
|
@@ -89,6 +97,7 @@ bmad scope migrate --analyze
|
|
|
89
97
|
```
|
|
90
98
|
|
|
91
99
|
**Example output:**
|
|
100
|
+
|
|
92
101
|
```
|
|
93
102
|
Migration Analysis
|
|
94
103
|
==================
|
|
@@ -128,6 +137,7 @@ bmad scope migrate
|
|
|
128
137
|
```
|
|
129
138
|
|
|
130
139
|
**Interactive prompts:**
|
|
140
|
+
|
|
131
141
|
```
|
|
132
142
|
? Ready to migrate existing artifacts to 'default' scope? (Y/n)
|
|
133
143
|
? Create scope-specific project-context.md? (y/N)
|
|
@@ -147,6 +157,7 @@ bmad scope info default
|
|
|
147
157
|
```
|
|
148
158
|
|
|
149
159
|
**Expected structure after migration:**
|
|
160
|
+
|
|
150
161
|
```
|
|
151
162
|
_bmad-output/
|
|
152
163
|
├── _shared/
|
|
@@ -172,13 +183,15 @@ _bmad-output/
|
|
|
172
183
|
If you have custom workflow configurations, update paths:
|
|
173
184
|
|
|
174
185
|
**Before:**
|
|
186
|
+
|
|
175
187
|
```yaml
|
|
176
|
-
output_dir:
|
|
188
|
+
output_dir: '{output_folder}/planning-artifacts'
|
|
177
189
|
```
|
|
178
190
|
|
|
179
191
|
**After:**
|
|
192
|
+
|
|
180
193
|
```yaml
|
|
181
|
-
output_dir:
|
|
194
|
+
output_dir: '{scope_planning}'
|
|
182
195
|
# Or: "{output_folder}/{scope}/planning-artifacts"
|
|
183
196
|
```
|
|
184
197
|
|
|
@@ -261,7 +274,7 @@ subscriptions:
|
|
|
261
274
|
frontend:
|
|
262
275
|
watch:
|
|
263
276
|
- scope: api
|
|
264
|
-
patterns: [
|
|
277
|
+
patterns: ['contracts/*']
|
|
265
278
|
notify: true
|
|
266
279
|
```
|
|
267
280
|
|
|
@@ -272,6 +285,7 @@ subscriptions:
|
|
|
272
285
|
**Cause:** Migration path resolution issue.
|
|
273
286
|
|
|
274
287
|
**Solution:**
|
|
288
|
+
|
|
275
289
|
```bash
|
|
276
290
|
# Check backup location
|
|
277
291
|
ls _bmad-output/_backup_migration_*/
|
|
@@ -285,6 +299,7 @@ mv _bmad-output/_backup_migration_*/planning-artifacts/* _bmad-output/default/pl
|
|
|
285
299
|
**Cause:** Scope system not initialized.
|
|
286
300
|
|
|
287
301
|
**Solution:**
|
|
302
|
+
|
|
288
303
|
```bash
|
|
289
304
|
bmad scope init
|
|
290
305
|
```
|
|
@@ -294,6 +309,7 @@ bmad scope init
|
|
|
294
309
|
**Cause:** Cross-scope write protection.
|
|
295
310
|
|
|
296
311
|
**Solution:**
|
|
312
|
+
|
|
297
313
|
```bash
|
|
298
314
|
# Either switch scope
|
|
299
315
|
bmad workflow --scope default
|
|
@@ -308,6 +324,7 @@ bmad scope sync-down default
|
|
|
308
324
|
**Cause:** References not updated during migration.
|
|
309
325
|
|
|
310
326
|
**Solution:**
|
|
327
|
+
|
|
311
328
|
```bash
|
|
312
329
|
# Re-run migration with force update
|
|
313
330
|
bmad scope migrate --force --update-refs
|
|
@@ -330,6 +347,7 @@ bmad scope migrate --force --update-refs
|
|
|
330
347
|
### Q: Can I rename scopes?
|
|
331
348
|
|
|
332
349
|
**A:** Not directly. Create new scope, copy artifacts, remove old scope:
|
|
350
|
+
|
|
333
351
|
```bash
|
|
334
352
|
bmad scope create new-name --name "New Name"
|
|
335
353
|
cp -r _bmad-output/old-name/* _bmad-output/new-name/
|
|
@@ -343,6 +361,7 @@ bmad scope remove old-name --force
|
|
|
343
361
|
### Q: Do I need to update my CI/CD?
|
|
344
362
|
|
|
345
363
|
**A:** Only if your CI/CD references specific artifact paths. Update paths to include scope:
|
|
364
|
+
|
|
346
365
|
```bash
|
|
347
366
|
# Before
|
|
348
367
|
cat _bmad-output/planning-artifacts/prd.md
|
|
@@ -353,13 +372,14 @@ cat _bmad-output/default/planning-artifacts/prd.md
|
|
|
353
372
|
|
|
354
373
|
## Version History
|
|
355
374
|
|
|
356
|
-
| Version | Changes
|
|
357
|
-
|
|
358
|
-
| 6.1.0
|
|
359
|
-
| 6.0.0
|
|
375
|
+
| Version | Changes |
|
|
376
|
+
| ------- | ----------------------------- |
|
|
377
|
+
| 6.1.0 | Multi-scope system introduced |
|
|
378
|
+
| 6.0.0 | Initial v6 release |
|
|
360
379
|
|
|
361
380
|
---
|
|
362
381
|
|
|
363
382
|
For more details, see:
|
|
383
|
+
|
|
364
384
|
- [Multi-Scope Guide](multi-scope-guide.md)
|
|
365
385
|
- [Implementation Plan](plans/multi-scope-parallel-artifacts-plan.md)
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Multi-Scope Parallel Artifacts Guide'
|
|
3
|
+
description: 'Run multiple workflows in parallel across different terminal sessions with isolated artifacts'
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Multi-Scope Parallel Artifacts Guide
|
|
2
7
|
|
|
3
8
|
> Run multiple workflows in parallel across different terminal sessions with isolated artifacts.
|
|
@@ -16,10 +21,11 @@ The multi-scope system enables parallel development by isolating artifacts into
|
|
|
16
21
|
### Initialize Scope System
|
|
17
22
|
|
|
18
23
|
```bash
|
|
19
|
-
bmad scope init
|
|
24
|
+
npx bmad-fh scope init
|
|
20
25
|
```
|
|
21
26
|
|
|
22
27
|
This creates:
|
|
28
|
+
|
|
23
29
|
- `_bmad/_config/scopes.yaml` - Scope registry
|
|
24
30
|
- `_bmad-output/_shared/` - Shared knowledge layer
|
|
25
31
|
- `_bmad/_events/` - Event system
|
|
@@ -27,22 +33,41 @@ This creates:
|
|
|
27
33
|
### Create Your First Scope
|
|
28
34
|
|
|
29
35
|
```bash
|
|
30
|
-
bmad scope create auth --name "Authentication Service"
|
|
36
|
+
npx bmad-fh scope create auth --name "Authentication Service"
|
|
31
37
|
```
|
|
32
38
|
|
|
39
|
+
**Important:** After creation, you'll be prompted to activate the scope:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
✓ Scope 'auth' created successfully!
|
|
43
|
+
? Set 'auth' as your active scope for this session? (Y/n)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Accept this prompt (or run `npx bmad-fh scope set auth` later) to ensure workflows use the scoped directories.
|
|
47
|
+
|
|
33
48
|
### List Scopes
|
|
34
49
|
|
|
35
50
|
```bash
|
|
36
|
-
bmad scope list
|
|
51
|
+
npx bmad-fh scope list
|
|
37
52
|
```
|
|
38
53
|
|
|
39
|
-
###
|
|
54
|
+
### Activate a Scope
|
|
40
55
|
|
|
41
56
|
```bash
|
|
42
|
-
#
|
|
43
|
-
bmad
|
|
57
|
+
# Set the active scope for your terminal session
|
|
58
|
+
npx bmad-fh scope set auth
|
|
59
|
+
|
|
60
|
+
# Or use environment variable (useful for CI/CD)
|
|
61
|
+
export BMAD_SCOPE=auth
|
|
44
62
|
```
|
|
45
63
|
|
|
64
|
+
Workflows automatically detect the active scope from:
|
|
65
|
+
|
|
66
|
+
1. `.bmad-scope` file (set by `scope set` command)
|
|
67
|
+
2. `BMAD_SCOPE` environment variable
|
|
68
|
+
|
|
69
|
+
> **Warning:** If no scope is active, artifacts go to root `_bmad-output/` directory (legacy mode).
|
|
70
|
+
|
|
46
71
|
## Directory Structure
|
|
47
72
|
|
|
48
73
|
```
|
|
@@ -74,26 +99,30 @@ project-root/
|
|
|
74
99
|
|
|
75
100
|
### Scope Management
|
|
76
101
|
|
|
77
|
-
| Command
|
|
78
|
-
|
|
79
|
-
| `bmad scope init`
|
|
80
|
-
| `bmad scope
|
|
81
|
-
| `bmad scope
|
|
82
|
-
| `bmad scope
|
|
83
|
-
| `bmad scope
|
|
84
|
-
| `bmad scope
|
|
85
|
-
| `bmad scope
|
|
102
|
+
| Command | Description |
|
|
103
|
+
| --------------------------------- | -------------------------------------- |
|
|
104
|
+
| `npx bmad-fh scope init` | Initialize scope system |
|
|
105
|
+
| `npx bmad-fh scope create <id>` | Create new scope (prompts to activate) |
|
|
106
|
+
| `npx bmad-fh scope set <id>` | **Set active scope (required!)** |
|
|
107
|
+
| `npx bmad-fh scope list` | List all scopes |
|
|
108
|
+
| `npx bmad-fh scope info <id>` | Show scope details |
|
|
109
|
+
| `npx bmad-fh scope remove <id>` | Remove a scope |
|
|
110
|
+
| `npx bmad-fh scope archive <id>` | Archive a scope |
|
|
111
|
+
| `npx bmad-fh scope activate <id>` | Activate archived scope |
|
|
86
112
|
|
|
87
113
|
### Create Options
|
|
88
114
|
|
|
89
115
|
```bash
|
|
90
|
-
bmad scope create auth \
|
|
116
|
+
npx bmad-fh scope create auth \
|
|
91
117
|
--name "Authentication" \
|
|
92
118
|
--description "User auth and SSO" \
|
|
93
119
|
--deps payments,users \
|
|
94
120
|
--context # Create scope-specific project-context.md
|
|
95
121
|
```
|
|
96
122
|
|
|
123
|
+
> **Note:** After creation, you'll be prompted to set this as your active scope.
|
|
124
|
+
> Accept the prompt to ensure workflows use the scoped directories.
|
|
125
|
+
|
|
97
126
|
### Remove with Backup
|
|
98
127
|
|
|
99
128
|
```bash
|
|
@@ -114,6 +143,7 @@ bmad scope sync-up auth
|
|
|
114
143
|
```
|
|
115
144
|
|
|
116
145
|
Promotes:
|
|
146
|
+
|
|
117
147
|
- `architecture/*.md`
|
|
118
148
|
- `contracts/*.md`
|
|
119
149
|
- `principles/*.md`
|
|
@@ -128,10 +158,10 @@ bmad scope sync-down payments
|
|
|
128
158
|
|
|
129
159
|
## Access Model
|
|
130
160
|
|
|
131
|
-
| Operation | Scope: auth | Scope: payments | _shared
|
|
132
|
-
|
|
133
|
-
| **Read**
|
|
134
|
-
| **Write** | auth only
|
|
161
|
+
| Operation | Scope: auth | Scope: payments | \_shared |
|
|
162
|
+
| --------- | ----------- | --------------- | ----------- |
|
|
163
|
+
| **Read** | Any scope | Any scope | Yes |
|
|
164
|
+
| **Write** | auth only | payments only | Use sync-up |
|
|
135
165
|
|
|
136
166
|
### Isolation Modes
|
|
137
167
|
|
|
@@ -139,7 +169,7 @@ Configure in `_bmad/_config/scopes.yaml`:
|
|
|
139
169
|
|
|
140
170
|
```yaml
|
|
141
171
|
settings:
|
|
142
|
-
isolation_mode: strict
|
|
172
|
+
isolation_mode: strict # strict | warn | permissive
|
|
143
173
|
```
|
|
144
174
|
|
|
145
175
|
- **strict**: Block cross-scope writes (default)
|
|
@@ -155,18 +185,18 @@ Workflows use `{scope}` variable:
|
|
|
155
185
|
```yaml
|
|
156
186
|
# workflow.yaml
|
|
157
187
|
variables:
|
|
158
|
-
test_dir:
|
|
188
|
+
test_dir: '{scope_tests}' # Resolves to _bmad-output/auth/tests
|
|
159
189
|
```
|
|
160
190
|
|
|
161
191
|
### Scope-Aware Paths
|
|
162
192
|
|
|
163
|
-
| Variable
|
|
164
|
-
|
|
165
|
-
| `{scope}`
|
|
166
|
-
| `{scope_path}`
|
|
167
|
-
| `{scope_planning}`
|
|
168
|
-
| `{scope_implementation}` | _bmad-output/implementation-artifacts | _bmad-output/auth/implementation-artifacts |
|
|
169
|
-
| `{scope_tests}`
|
|
193
|
+
| Variable | Non-scoped | Scoped (auth) |
|
|
194
|
+
| ------------------------ | -------------------------------------- | ------------------------------------------- |
|
|
195
|
+
| `{scope}` | (empty) | auth |
|
|
196
|
+
| `{scope_path}` | \_bmad-output | \_bmad-output/auth |
|
|
197
|
+
| `{scope_planning}` | \_bmad-output/planning-artifacts | \_bmad-output/auth/planning-artifacts |
|
|
198
|
+
| `{scope_implementation}` | \_bmad-output/implementation-artifacts | \_bmad-output/auth/implementation-artifacts |
|
|
199
|
+
| `{scope_tests}` | \_bmad-output/tests | \_bmad-output/auth/tests |
|
|
170
200
|
|
|
171
201
|
## Session-Sticky Scope
|
|
172
202
|
|
|
@@ -175,7 +205,7 @@ The `.bmad-scope` file in project root stores active scope:
|
|
|
175
205
|
```yaml
|
|
176
206
|
# .bmad-scope (gitignored)
|
|
177
207
|
active_scope: auth
|
|
178
|
-
set_at:
|
|
208
|
+
set_at: '2026-01-21T10:00:00Z'
|
|
179
209
|
```
|
|
180
210
|
|
|
181
211
|
Workflows automatically use this scope when no `--scope` flag provided.
|
|
@@ -192,7 +222,7 @@ subscriptions:
|
|
|
192
222
|
payments:
|
|
193
223
|
watch:
|
|
194
224
|
- scope: auth
|
|
195
|
-
patterns: [
|
|
225
|
+
patterns: ['contracts/*', 'architecture.md']
|
|
196
226
|
notify: true
|
|
197
227
|
```
|
|
198
228
|
|
|
@@ -250,6 +280,7 @@ bmad scope migrate
|
|
|
250
280
|
```
|
|
251
281
|
|
|
252
282
|
This:
|
|
283
|
+
|
|
253
284
|
1. Creates backup
|
|
254
285
|
2. Creates `default` scope
|
|
255
286
|
3. Moves artifacts to `_bmad-output/default/`
|
|
@@ -260,6 +291,7 @@ This:
|
|
|
260
291
|
### Naming Scopes
|
|
261
292
|
|
|
262
293
|
Use clear, descriptive IDs:
|
|
294
|
+
|
|
263
295
|
- `auth` - Authentication service
|
|
264
296
|
- `payments` - Payment processing
|
|
265
297
|
- `user-service` - User management
|
|
@@ -268,6 +300,7 @@ Use clear, descriptive IDs:
|
|
|
268
300
|
### Scope Granularity
|
|
269
301
|
|
|
270
302
|
Choose based on:
|
|
303
|
+
|
|
271
304
|
- **Team boundaries** - One scope per team
|
|
272
305
|
- **Deployment units** - One scope per service
|
|
273
306
|
- **Feature sets** - One scope per major feature
|
|
@@ -282,11 +315,13 @@ Choose based on:
|
|
|
282
315
|
### Dependencies
|
|
283
316
|
|
|
284
317
|
Declare dependencies explicitly:
|
|
318
|
+
|
|
285
319
|
```bash
|
|
286
320
|
bmad scope create payments --deps auth,users
|
|
287
321
|
```
|
|
288
322
|
|
|
289
323
|
This helps:
|
|
324
|
+
|
|
290
325
|
- Track relationships
|
|
291
326
|
- Get notifications on dependency changes
|
|
292
327
|
- Plan integration work
|
|
@@ -310,6 +345,7 @@ Error: Cannot write to scope 'payments' while in scope 'auth'
|
|
|
310
345
|
```
|
|
311
346
|
|
|
312
347
|
Solutions:
|
|
348
|
+
|
|
313
349
|
1. Switch to correct scope
|
|
314
350
|
2. Use sync-up to promote to shared
|
|
315
351
|
3. Change isolation mode (not recommended)
|
|
@@ -320,7 +356,7 @@ Solutions:
|
|
|
320
356
|
# Keep local version
|
|
321
357
|
bmad scope sync-down payments --resolution keep-local
|
|
322
358
|
|
|
323
|
-
# Keep shared version
|
|
359
|
+
# Keep shared version
|
|
324
360
|
bmad scope sync-down payments --resolution keep-shared
|
|
325
361
|
|
|
326
362
|
# Backup and update
|
|
@@ -366,7 +402,7 @@ const { ArtifactResolver } = require('./src/core/lib/scope');
|
|
|
366
402
|
|
|
367
403
|
const resolver = new ArtifactResolver({
|
|
368
404
|
currentScope: 'auth',
|
|
369
|
-
basePath: '_bmad-output'
|
|
405
|
+
basePath: '_bmad-output',
|
|
370
406
|
});
|
|
371
407
|
|
|
372
408
|
// Check access
|