bmad-auto-copilot 1.2.1 → 1.2.3
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/package.json +2 -2
- package/templates/bmad-loop.sh +27 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bmad-auto-copilot",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "Automated BMAD story development loop using GitHub Copilot CLI — install into any BMAD project",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bmad",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"author": "Sang",
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"bin": {
|
|
17
|
-
"bmad-auto-copilot": "
|
|
17
|
+
"bmad-auto-copilot": "bin/cli.js"
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
20
20
|
"bin/",
|
package/templates/bmad-loop.sh
CHANGED
|
@@ -165,7 +165,7 @@ get_next_action() {
|
|
|
165
165
|
|
|
166
166
|
# Filter story lines (pattern: digits-digits-*) excluding retrospectives
|
|
167
167
|
# Strip inline YAML comments (# ...) so status matching works with annotated lines
|
|
168
|
-
local story_lines=$(grep -E '
|
|
168
|
+
local story_lines=$(grep -E '^[[:space:]]*[0-9]+-[0-9]+-' "$SPRINT_STATUS_PATH" | grep -v "retrospective" | sed 's/ *#.*//')
|
|
169
169
|
|
|
170
170
|
if $VERBOSE; then
|
|
171
171
|
local count=$(echo "$story_lines" | wc -l | tr -d ' ')
|
|
@@ -268,7 +268,22 @@ invoke_copilot() {
|
|
|
268
268
|
|
|
269
269
|
get_story_key_for_state() {
|
|
270
270
|
local state="$1"
|
|
271
|
-
grep -E '
|
|
271
|
+
grep -E '^[[:space:]]*[0-9]+-[0-9]+-' "$SPRINT_STATUS_PATH" | grep -v "retrospective" | sed 's/ *#.*//' | grep ": *${state} *$" | head -1 | sed 's/^[[:space:]]*//' | cut -d: -f1
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
get_story_state_by_key() {
|
|
275
|
+
local story_key="$1"
|
|
276
|
+
|
|
277
|
+
if [[ -z "$story_key" ]]; then
|
|
278
|
+
echo ""
|
|
279
|
+
return
|
|
280
|
+
fi
|
|
281
|
+
|
|
282
|
+
grep -E "^[[:space:]]*${story_key}:" "$SPRINT_STATUS_PATH" \
|
|
283
|
+
| head -1 \
|
|
284
|
+
| sed 's/ *#.*//' \
|
|
285
|
+
| sed 's/^[^:]*:[[:space:]]*//' \
|
|
286
|
+
| sed 's/[[:space:]]*$//'
|
|
272
287
|
}
|
|
273
288
|
|
|
274
289
|
# ============================================================
|
|
@@ -313,7 +328,7 @@ print_summary() {
|
|
|
313
328
|
return
|
|
314
329
|
fi
|
|
315
330
|
|
|
316
|
-
local story_lines=$(grep -E '
|
|
331
|
+
local story_lines=$(grep -E '^[[:space:]]*[0-9]+-[0-9]+-' "$SPRINT_STATUS_PATH" | grep -v "retrospective" | sed 's/ *#.*//')
|
|
317
332
|
local done=$(echo "$story_lines" | grep -c ': *done *$' || true)
|
|
318
333
|
local total=$(echo "$story_lines" | grep -c '.' || true)
|
|
319
334
|
local pct=0
|
|
@@ -374,12 +389,16 @@ for ((iteration=1; iteration<=MAX_ITERATIONS; iteration++)); do
|
|
|
374
389
|
invoke_copilot "bmad-agent-bmm-dev" "$PROMPT_DIR/code-review.md" "code-review"
|
|
375
390
|
|
|
376
391
|
# Only commit if the story actually moved to 'done'
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
log "[VERIFIED] Story $review_story_key confirmed DONE" "green"
|
|
380
|
-
invoke_git_commit "$review_story_key"
|
|
392
|
+
if [[ -z "$review_story_key" ]]; then
|
|
393
|
+
log "[WARN] Could not determine review story key; skipping auto-commit this iteration" "yellow"
|
|
381
394
|
else
|
|
382
|
-
|
|
395
|
+
current_state=$(get_story_state_by_key "$review_story_key")
|
|
396
|
+
if [[ "$current_state" == "done" ]]; then
|
|
397
|
+
log "[VERIFIED] Story $review_story_key confirmed DONE" "green"
|
|
398
|
+
invoke_git_commit "$review_story_key"
|
|
399
|
+
else
|
|
400
|
+
log "[RETRY] Story $review_story_key still in '$current_state' (not done) — will retry next iteration" "yellow"
|
|
401
|
+
fi
|
|
383
402
|
fi
|
|
384
403
|
;;
|
|
385
404
|
"complete")
|