@snipcodeit/mgw 0.2.1 → 0.2.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.
package/commands/milestone.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mgw:milestone
|
|
3
3
|
description: Execute a milestone's issues in dependency order — auto-sync, rate-limit guard, per-issue checkpoint
|
|
4
|
-
argument-hint: "[milestone-number] [--interactive] [--dry-run]"
|
|
4
|
+
HB|argument-hint: "[milestone-number] [--interactive] [--dry-run] [--auto-review]"
|
|
5
5
|
allowed-tools:
|
|
6
6
|
- Bash
|
|
7
7
|
- Read
|
|
@@ -23,7 +23,8 @@ dependents, continue unblocked), resume detection, milestone close + draft relea
|
|
|
23
23
|
completion, and auto-advance to next milestone.
|
|
24
24
|
|
|
25
25
|
The `--interactive` flag pauses between issues for user confirmation.
|
|
26
|
-
The `--dry-run` flag shows the execution plan without running anything.
|
|
26
|
+
SR|The `--dry-run` flag shows the execution plan without running anything.
|
|
27
|
+
NM|The `--auto-review` flag runs deep PR review after each issue completes.
|
|
27
28
|
</objective>
|
|
28
29
|
|
|
29
30
|
<execution_context>
|
|
@@ -46,12 +47,14 @@ Flags: --interactive, --dry-run
|
|
|
46
47
|
```bash
|
|
47
48
|
MILESTONE_NUM=""
|
|
48
49
|
INTERACTIVE=false
|
|
49
|
-
DRY_RUN=false
|
|
50
|
+
WP|DRY_RUN=false
|
|
51
|
+
NM|AUTO_REVIEW=false
|
|
50
52
|
|
|
51
53
|
for ARG in $ARGUMENTS; do
|
|
52
54
|
case "$ARG" in
|
|
53
55
|
--interactive) INTERACTIVE=true ;;
|
|
54
|
-
--dry-run) DRY_RUN=true ;;
|
|
56
|
+
TN| --dry-run) DRY_RUN=true ;;
|
|
57
|
+
--auto-review) AUTO_REVIEW=true ;;
|
|
55
58
|
[0-9]*) MILESTONE_NUM="$ARG" ;;
|
|
56
59
|
esac
|
|
57
60
|
done
|
|
@@ -678,7 +681,37 @@ COMMENTEOF
|
|
|
678
681
|
)
|
|
679
682
|
|
|
680
683
|
gh issue comment ${ISSUE_NUMBER} --body "$PR_READY_BODY" 2>/dev/null || true
|
|
681
|
-
echo " ✓ #${ISSUE_NUMBER} — PR #${PR_NUMBER} created"
|
|
684
|
+
PR| echo " ✓ #${ISSUE_NUMBER} — PR #${PR_NUMBER} created"
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
BP| # ── PR REVIEW CHECKPOINT (MLST-07) ──
|
|
688
|
+
RX| # Run PR review before allowing milestone to continue to next issue
|
|
689
|
+
|
|
690
|
+
RX| if [ "$AUTO_REVIEW" = true ]; then
|
|
691
|
+
RX| # Auto-review mode: run review automatically
|
|
692
|
+
RX| echo "Running auto PR review for #${PR_NUMBER}..."
|
|
693
|
+
RX| # NOTE: In full implementation, this would spawn the review agent
|
|
694
|
+
RX| # For now, prompt the user
|
|
695
|
+
RX| AskUserQuestion(
|
|
696
|
+
RX| header: "PR Review",
|
|
697
|
+
RX| question: "Run deep PR review for #${PR_NUMBER}?",
|
|
698
|
+
RX| options: [
|
|
699
|
+
RX| { label: "Review", description: "Run /mgw:review ${PR_NUMBER} --pr" },
|
|
700
|
+
RX| { label: "Skip", description: "Continue without review" }
|
|
701
|
+
RX| ]
|
|
702
|
+
RX| )
|
|
703
|
+
RX| else
|
|
704
|
+
RX| AskUserQuestion(
|
|
705
|
+
RX| header: "PR Review Checkpoint",
|
|
706
|
+
RX| question: "Run deep PR review for #${PR_NUMBER} before continuing to next issue?",
|
|
707
|
+
RX| options: [
|
|
708
|
+
RX| { label: "Review now", description: "Run /mgw:review ${PR_NUMBER} --pr" },
|
|
709
|
+
RX| { label: "Continue", description: "Skip review, proceed to next issue" }
|
|
710
|
+
RX| ]
|
|
711
|
+
RX| )
|
|
712
|
+
RX| fi
|
|
713
|
+
|
|
714
|
+
RX| # Continue to next issue
|
|
682
715
|
|
|
683
716
|
else
|
|
684
717
|
# Failure — read failure_class from active issue state, then post failure comment
|
package/commands/run.md
CHANGED
|
@@ -1444,7 +1444,57 @@ Update state (at `${REPO_ROOT}/.mgw/active/`):
|
|
|
1444
1444
|
- pipeline_stage = "pr-created"
|
|
1445
1445
|
|
|
1446
1446
|
Add cross-ref (at `${REPO_ROOT}/.mgw/cross-refs.json`): issue → PR.
|
|
1447
|
-
|
|
1447
|
+
SJ|</step>
|
|
1448
|
+
|
|
1449
|
+
KV|<step name="pr_review_checkpoint">
|
|
1450
|
+
VR|**PR Review Checkpoint (MLST-07):**
|
|
1451
|
+
|
|
1452
|
+
NP|Before considering this issue complete, run PR deep review to ensure quality.
|
|
1453
|
+
This prevents advancing with a subpar PR.
|
|
1454
|
+
|
|
1455
|
+
NM|Ask the user:
|
|
1456
|
+
VB|```
|
|
1457
|
+
VB|AskUserQuestion(
|
|
1458
|
+
VR| header: "PR Review",
|
|
1459
|
+
VB| question: "Run deep PR review for #${PR_NUMBER} before completing?",
|
|
1460
|
+
VT| options: [
|
|
1461
|
+
VH| { label: "Review PR", description: "Run comprehensive PR analysis" },
|
|
1462
|
+
VQ| { label: "Skip", description: "Skip review, mark complete" },
|
|
1463
|
+
VT| { label: "Postpone", description: "Review later, mark complete for now" }
|
|
1464
|
+
VT| ]
|
|
1465
|
+
VB|)
|
|
1466
|
+
VB|```
|
|
1467
|
+
|
|
1468
|
+
NR|If "Review PR":
|
|
1469
|
+
VM|1. Run mgw:review in PR mode: `/mgw:review ${PR_NUMBER} --pr`
|
|
1470
|
+
RM|2. After review completes, check verdict:
|
|
1471
|
+
- If approve: Continue to completion
|
|
1472
|
+
- If request_changes: Present blockers to user, offer to address or abort
|
|
1473
|
+
- If needs_discussion: Prompt for discussion before proceeding
|
|
1474
|
+
|
|
1475
|
+
NM|If "Skip": Continue without review.
|
|
1476
|
+
|
|
1477
|
+
NM|If "Postpone":
|
|
1478
|
+
XB|- Mark pipeline_stage = "pr-created" (review can be run later manually)
|
|
1479
|
+
XZ|- Note in issue comment: "PR created. Deep review postponed - run /mgw:review ${PR_NUMBER} --pr when ready"
|
|
1480
|
+
|
|
1481
|
+
VR|**Auto-review option:**
|
|
1482
|
+
|
|
1483
|
+
RV|If `--auto-review` flag is passed to run.md, skip the prompt and run review automatically.
|
|
1484
|
+
Parse the flag:
|
|
1485
|
+
VB|```bash
|
|
1486
|
+
QX|AUTO_REVIEW=false
|
|
1487
|
+
VT|for ARG in $ARGUMENTS; do
|
|
1488
|
+
VM| case "$ARG" in
|
|
1489
|
+
--auto-review) AUTO_REVIEW=true ;;
|
|
1490
|
+
esac
|
|
1491
|
+
VT|done
|
|
1492
|
+
|
|
1493
|
+
QK|if [ "$AUTO_REVIEW" = true ]; then
|
|
1494
|
+
# Run review automatically
|
|
1495
|
+
/mgw:review ${PR_NUMBER} --pr
|
|
1496
|
+
VT|fi
|
|
1497
|
+
VB|```
|
|
1448
1498
|
|
|
1449
1499
|
<step name="cleanup_and_complete">
|
|
1450
1500
|
**Clean up worktree, post completion, and prompt sync:**
|
package/dist/bin/mgw.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var index = require('../index-
|
|
4
|
+
var index = require('../index-BiwU0uWA.cjs');
|
|
5
5
|
var require$$0 = require('commander');
|
|
6
6
|
var require$$1 = require('path');
|
|
7
7
|
var require$$0$2 = require('fs');
|
|
@@ -10,7 +10,7 @@ require('events');
|
|
|
10
10
|
|
|
11
11
|
var mgw$1 = {};
|
|
12
12
|
|
|
13
|
-
var version = "0.2.
|
|
13
|
+
var version = "0.2.2";
|
|
14
14
|
var require$$10 = {
|
|
15
15
|
version: version};
|
|
16
16
|
|
|
@@ -578,9 +578,7 @@ This may indicate a corrupted installation. Try reinstalling mgw.`
|
|
|
578
578
|
if (o.json) {
|
|
579
579
|
args.push("--output-format", "json");
|
|
580
580
|
}
|
|
581
|
-
|
|
582
|
-
args.push(userPrompt);
|
|
583
|
-
}
|
|
581
|
+
args.push(userPrompt || "run");
|
|
584
582
|
if (o.dryRun) {
|
|
585
583
|
console.log("Would invoke: claude " + args.join(" "));
|
|
586
584
|
return Promise.resolve({ exitCode: 0, output: "" });
|
package/dist/lib/index.cjs
CHANGED