@codedrifters/configulator 0.0.220 → 0.0.222
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/lib/index.js +273 -22
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +273 -22
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -4439,8 +4439,14 @@ var issueWorkerSubAgent = {
|
|
|
4439
4439
|
"",
|
|
4440
4440
|
"## Phase 7: Open a PR",
|
|
4441
4441
|
"",
|
|
4442
|
+
"Every PR you open must carry the `origin:issue-worker` label so downstream",
|
|
4443
|
+
"agents can identify bot-authored PRs. Always include",
|
|
4444
|
+
"`--label 'origin:issue-worker'` in the `gh pr create` invocation:",
|
|
4445
|
+
"",
|
|
4442
4446
|
"```bash",
|
|
4443
|
-
'gh pr create --title "<type>(<scope>): <description>"
|
|
4447
|
+
'gh pr create --title "<type>(<scope>): <description>" \\',
|
|
4448
|
+
" --label 'origin:issue-worker' \\",
|
|
4449
|
+
' --body "## Summary',
|
|
4444
4450
|
"",
|
|
4445
4451
|
"<bullet points>",
|
|
4446
4452
|
"",
|
|
@@ -4492,7 +4498,12 @@ var issueWorkerSubAgent = {
|
|
|
4492
4498
|
"3. **Follow CLAUDE.md conventions** for branch naming, commits, and PRs.",
|
|
4493
4499
|
"4. **Do not assign PRs to a project board** \u2014 this repo has no GitHub project.",
|
|
4494
4500
|
"5. **Do not add AI co-author** attribution to commits.",
|
|
4495
|
-
"6. **
|
|
4501
|
+
"6. **Always label PRs with `origin:issue-worker`.** Every PR opened by",
|
|
4502
|
+
" the issue-worker must carry the `origin:issue-worker` label so",
|
|
4503
|
+
" downstream agents (notably the `pr-reviewer`) can identify",
|
|
4504
|
+
" bot-authored PRs. Pass `--label 'origin:issue-worker'` on every",
|
|
4505
|
+
" `gh pr create` call.",
|
|
4506
|
+
"7. **On failure:** If you cannot complete the issue, update labels and leave a comment:",
|
|
4496
4507
|
" ```bash",
|
|
4497
4508
|
' gh issue edit <number> --remove-label "status:in-progress" --add-label "status:needs-attention"',
|
|
4498
4509
|
' gh issue comment <number> --body "Worker could not complete: <reason>"',
|
|
@@ -5371,6 +5382,25 @@ var prReviewerSubAgent = {
|
|
|
5371
5382
|
"---",
|
|
5372
5383
|
"",
|
|
5373
5384
|
...PROJECT_CONTEXT_READER_SECTION,
|
|
5385
|
+
"## Invocation Flags",
|
|
5386
|
+
"",
|
|
5387
|
+
"Your invocation prompt may include flags that modify how you select and",
|
|
5388
|
+
"process PRs. Parse the prompt for these flags before starting Phase 1:",
|
|
5389
|
+
"",
|
|
5390
|
+
"- **`--allow-human-author`** \u2014 opt-in flag that allows the reviewer to",
|
|
5391
|
+
" process PRs authored by humans in addition to bot-authored PRs",
|
|
5392
|
+
" (those carrying the `origin:issue-worker` label). When absent, the",
|
|
5393
|
+
" reviewer only processes bot-authored PRs; when present, human-authored",
|
|
5394
|
+
" PRs are also eligible for this invocation only. The flag does **not**",
|
|
5395
|
+
" persist across invocations.",
|
|
5396
|
+
"",
|
|
5397
|
+
"Note: the behaviour wiring for `--allow-human-author` (the bot-only",
|
|
5398
|
+
"guard that the flag opts out of) lands in a follow-up issue. This",
|
|
5399
|
+
"agent currently acknowledges the flag so consumers can start passing",
|
|
5400
|
+
"it through; full gating on author identity arrives later.",
|
|
5401
|
+
"",
|
|
5402
|
+
"---",
|
|
5403
|
+
"",
|
|
5374
5404
|
"## Phase 1: Identify the PR",
|
|
5375
5405
|
"",
|
|
5376
5406
|
"If a PR number was provided in your instructions, use that. Otherwise stop",
|
|
@@ -5409,7 +5439,7 @@ var prReviewerSubAgent = {
|
|
|
5409
5439
|
"## Phase 2: Gather Context",
|
|
5410
5440
|
"",
|
|
5411
5441
|
"```bash",
|
|
5412
|
-
"gh pr view <pr-number> --json number,title,body,headRefName,baseRefName,isDraft,state,labels,reviews",
|
|
5442
|
+
"gh pr view <pr-number> --json number,title,body,headRefName,baseRefName,isDraft,state,labels,reviews,files,additions,deletions",
|
|
5413
5443
|
"gh pr diff <pr-number>",
|
|
5414
5444
|
"gh pr checks <pr-number>",
|
|
5415
5445
|
"```",
|
|
@@ -5417,12 +5447,84 @@ var prReviewerSubAgent = {
|
|
|
5417
5447
|
"Extract the linked issue number from the PR body using the closing keywords",
|
|
5418
5448
|
"(`Closes #N`, `Fixes #N`, or `Resolves #N`) identified in Phase 1.5.",
|
|
5419
5449
|
"",
|
|
5420
|
-
"Then fetch the linked issue
|
|
5450
|
+
"Then fetch the linked issue, including its `issueType` so Phase 2.75 can",
|
|
5451
|
+
"evaluate the issue-type portion of the review policy:",
|
|
5421
5452
|
"",
|
|
5422
5453
|
"```bash",
|
|
5423
|
-
"gh issue view <issue-number>",
|
|
5454
|
+
"gh issue view <issue-number> --json number,title,body,labels,state,issueType",
|
|
5455
|
+
"```",
|
|
5456
|
+
"",
|
|
5457
|
+
"## Phase 2.75: Determine Review Mode",
|
|
5458
|
+
"",
|
|
5459
|
+
"Before comparing the diff to the acceptance criteria, evaluate the PR",
|
|
5460
|
+
"against the **PR Review Policy** embedded in this repository's",
|
|
5461
|
+
"`CLAUDE.md` (rendered from the `pr-review-policy` rule). The decision",
|
|
5462
|
+
"here governs whether Phase 4 enables auto-merge or hands off to a",
|
|
5463
|
+
"human reviewer.",
|
|
5464
|
+
"",
|
|
5465
|
+
"### Step 1: Load the policy",
|
|
5466
|
+
"",
|
|
5467
|
+
"Read `CLAUDE.md` from the repo root and extract the fenced YAML block",
|
|
5468
|
+
"under the `## PR Review Policy` heading. Parse the block into an",
|
|
5469
|
+
"in-memory object with the following top-level fields: `version`,",
|
|
5470
|
+
"`default`, `human-required`, `auto-merge`.",
|
|
5471
|
+
"",
|
|
5472
|
+
"If the policy section is missing or unparseable, fall back to",
|
|
5473
|
+
"`mode = human-required` with `reason = 'policy missing or unreadable'`",
|
|
5474
|
+
"and skip to Step 3. Do **not** auto-merge when the policy is absent.",
|
|
5475
|
+
"",
|
|
5476
|
+
"### Step 2: Evaluate in precedence order",
|
|
5477
|
+
"",
|
|
5478
|
+
"Walk the following checks in order. The **first match wins** and fixes",
|
|
5479
|
+
"the mode; record the triggering condition as the `reason`. Mixed-match",
|
|
5480
|
+
"PRs (signals from both sides) resolve conservatively to",
|
|
5481
|
+
"`human-required` \u2014 force-auto only wins when it is the single highest",
|
|
5482
|
+
"match and no later human-required signal changes the outcome under",
|
|
5483
|
+
"step 2c.",
|
|
5484
|
+
"",
|
|
5485
|
+
"1. **Force-auto label** \u2014 if the PR carries any label listed under",
|
|
5486
|
+
" `auto-merge.labels-that-force-auto` (e.g. `review:auto-ok`), set",
|
|
5487
|
+
" `mode = auto-merge`.",
|
|
5488
|
+
"2. **Force-human label (reserved)** \u2014 if the PR carries a",
|
|
5489
|
+
" `review:human-required` label, set `mode = human-required`.",
|
|
5490
|
+
"3. **Labels that force human** \u2014 if the PR carries any label listed",
|
|
5491
|
+
" under `human-required.labels-that-force-human` (e.g.",
|
|
5492
|
+
" `priority:critical`), set `mode = human-required`.",
|
|
5493
|
+
"4. **Path globs** \u2014 if any file in the PR diff matches any glob in",
|
|
5494
|
+
" `human-required.paths`, set `mode = human-required`. Record the",
|
|
5495
|
+
" first matching path + glob pair as the reason.",
|
|
5496
|
+
"5. **Issue type** \u2014 if the linked issue's GitHub issue type",
|
|
5497
|
+
" (fetched in Phase 2) matches any entry in",
|
|
5498
|
+
" `human-required.issue-types` (case-insensitive), set",
|
|
5499
|
+
" `mode = human-required`.",
|
|
5500
|
+
"6. **Size thresholds** \u2014 if the PR exceeds either threshold under",
|
|
5501
|
+
" `human-required.size` (`files` count or `insertions` count), set",
|
|
5502
|
+
" `mode = human-required`.",
|
|
5503
|
+
"7. **Default** \u2014 if no rule above matched, apply the `default` field",
|
|
5504
|
+
" from the policy (typically `auto-merge`).",
|
|
5505
|
+
"",
|
|
5506
|
+
"#### Mixed-match resolution",
|
|
5507
|
+
"",
|
|
5508
|
+
"Apart from rule (1), which is an explicit opt-in and wins outright,",
|
|
5509
|
+
"**any** match from rules (2) through (6) forces `human-required` even",
|
|
5510
|
+
"if a non-force-auto signal would otherwise have allowed auto-merge.",
|
|
5511
|
+
"The conservative choice wins. Rule (1) is the sole escape hatch and",
|
|
5512
|
+
"requires a maintainer to have applied the force-auto label.",
|
|
5513
|
+
"",
|
|
5514
|
+
"### Step 3: Record the decision",
|
|
5515
|
+
"",
|
|
5516
|
+
"Persist the evaluated mode and reason for later phases so Phase 4 and",
|
|
5517
|
+
"any downstream summary writer can cite it:",
|
|
5518
|
+
"",
|
|
5519
|
+
"```",
|
|
5520
|
+
"Review mode: <auto-merge | human-required>",
|
|
5521
|
+
"Reason: <short explanation \u2014 label name, path+glob, issue type, size threshold, default>",
|
|
5424
5522
|
"```",
|
|
5425
5523
|
"",
|
|
5524
|
+
"Phases 3 (acceptance-criteria comparison) and CI verification run",
|
|
5525
|
+
"unchanged regardless of mode. Only the terminal action in Phase 4",
|
|
5526
|
+
"branches on the decided mode.",
|
|
5527
|
+
"",
|
|
5426
5528
|
"## Phase 3: Compare Diff to Acceptance Criteria",
|
|
5427
5529
|
"",
|
|
5428
5530
|
"Read the issue body for an **Acceptance Criteria** (or equivalent) section.",
|
|
@@ -5444,6 +5546,10 @@ var prReviewerSubAgent = {
|
|
|
5444
5546
|
"",
|
|
5445
5547
|
"### If all acceptance criteria are met and CI is green",
|
|
5446
5548
|
"",
|
|
5549
|
+
"Branch on the **review mode** decided in Phase 2.75:",
|
|
5550
|
+
"",
|
|
5551
|
+
"#### Mode `auto-merge`",
|
|
5552
|
+
"",
|
|
5447
5553
|
"Enable squash auto-merge with branch deletion. This queues the merge to",
|
|
5448
5554
|
"happen once required checks pass; no separate approval review is needed.",
|
|
5449
5555
|
"",
|
|
@@ -5457,6 +5563,27 @@ var prReviewerSubAgent = {
|
|
|
5457
5563
|
"`feat(scope): description`). The body should bullet the changes and end",
|
|
5458
5564
|
"with `Closes #<issue-number>`.",
|
|
5459
5565
|
"",
|
|
5566
|
+
"#### Mode `human-required`",
|
|
5567
|
+
"",
|
|
5568
|
+
"Do **not** run `gh pr merge --auto`. Instead, hand the PR off to a",
|
|
5569
|
+
"human reviewer:",
|
|
5570
|
+
"",
|
|
5571
|
+
"1. Apply the `review:awaiting-human` label so the PR is discoverable",
|
|
5572
|
+
" in the human-review queue:",
|
|
5573
|
+
"",
|
|
5574
|
+
" ```bash",
|
|
5575
|
+
" gh pr edit <pr-number> --add-label 'review:awaiting-human'",
|
|
5576
|
+
" ```",
|
|
5577
|
+
"",
|
|
5578
|
+
"2. Exit cleanly after the acceptance-criteria check completes and any",
|
|
5579
|
+
" summary comment the reviewer posts. Proceed to Phase 5 only if a",
|
|
5580
|
+
" merge occurred \u2014 in `human-required` mode the reviewer stops at",
|
|
5581
|
+
" the hand-off and does not poll for merge.",
|
|
5582
|
+
"",
|
|
5583
|
+
"The reason captured in Phase 2.75 should be included in any summary",
|
|
5584
|
+
"comment so maintainers know why human review was required (path hit,",
|
|
5585
|
+
"issue type, size threshold, label, or default).",
|
|
5586
|
+
"",
|
|
5460
5587
|
"### If any criterion is missing, partial, or CI is failing",
|
|
5461
5588
|
"",
|
|
5462
5589
|
"Post a plain comment (not a formal review block) with grouped findings:",
|
|
@@ -5476,8 +5603,12 @@ var prReviewerSubAgent = {
|
|
|
5476
5603
|
"",
|
|
5477
5604
|
"## Phase 5: Branch Cleanup and Issue Closure Verification",
|
|
5478
5605
|
"",
|
|
5479
|
-
"
|
|
5480
|
-
"
|
|
5606
|
+
"Skip this phase entirely when the review mode from Phase 2.75 is",
|
|
5607
|
+
"`human-required` \u2014 no merge was initiated, so there is nothing to poll",
|
|
5608
|
+
"and no branch to clean up. Report the hand-off and stop.",
|
|
5609
|
+
"",
|
|
5610
|
+
"In `auto-merge` mode, auto-merge may not be immediate. Poll the PR",
|
|
5611
|
+
"state up to 10 times, waiting 30 seconds between polls:",
|
|
5481
5612
|
"",
|
|
5482
5613
|
"```bash",
|
|
5483
5614
|
"gh pr view <pr-number> --json state --jq '.state'",
|
|
@@ -5520,7 +5651,9 @@ var prReviewerSubAgent = {
|
|
|
5520
5651
|
"```",
|
|
5521
5652
|
"PR #<number> \u2014 <title>",
|
|
5522
5653
|
"Linked issue: #<issue-number>",
|
|
5523
|
-
"
|
|
5654
|
+
"Review mode: <auto-merge | human-required>",
|
|
5655
|
+
"Reason: <short explanation from Phase 2.75>",
|
|
5656
|
+
"Verdict: AUTO_MERGE_ENABLED | AWAITING_HUMAN | NEEDS_CHANGES | INELIGIBLE | BLOCKED",
|
|
5524
5657
|
"",
|
|
5525
5658
|
"Acceptance criteria:",
|
|
5526
5659
|
" [x] <criterion> \u2014 <evidence>",
|
|
@@ -5532,7 +5665,7 @@ var prReviewerSubAgent = {
|
|
|
5532
5665
|
" - Suggested: <items>",
|
|
5533
5666
|
" - Nitpick: <items>",
|
|
5534
5667
|
"",
|
|
5535
|
-
"Action taken: <enable-auto-merge | commented-on-the-pr | none>",
|
|
5668
|
+
"Action taken: <enable-auto-merge | label-awaiting-human | commented-on-the-pr | none>",
|
|
5536
5669
|
"Branch state: <merged | open | closed>",
|
|
5537
5670
|
"Issue state: <closed | open>",
|
|
5538
5671
|
"```",
|
|
@@ -5550,15 +5683,19 @@ var prReviewerSubAgent = {
|
|
|
5550
5683
|
" block on red checks.",
|
|
5551
5684
|
"4. **Never bypass review conventions.** Always use `--squash`, `--auto`,",
|
|
5552
5685
|
" and `--delete-branch` for merges. Do not force-merge.",
|
|
5553
|
-
"5. **
|
|
5686
|
+
"5. **Never auto-merge a `human-required` PR.** When Phase 2.75 resolves",
|
|
5687
|
+
" to `human-required`, Phase 4 applies `review:awaiting-human` and",
|
|
5688
|
+
" exits. Even if every acceptance criterion is met and CI is green,",
|
|
5689
|
+
" `gh pr merge --auto` is forbidden in that mode.",
|
|
5690
|
+
"6. **Do not implement code.** You review, decide, and orchestrate. If",
|
|
5554
5691
|
" the PR needs changes, comment and stop.",
|
|
5555
|
-
"
|
|
5692
|
+
"7. **Never push commits to the PR's branch.** If the PR needs changes,",
|
|
5556
5693
|
" comment and stop \u2014 do not attempt to fix it yourself. The PR author",
|
|
5557
5694
|
" owns the branch; pushing to someone else's branch is out of scope.",
|
|
5558
|
-
"
|
|
5695
|
+
"8. **In loop mode (`/review-prs`), never stop early.** If any review",
|
|
5559
5696
|
" fails, comment and move to the next PR. Only abort the loop on a",
|
|
5560
5697
|
" fatal error (e.g. `gh` auth failure, network outage).",
|
|
5561
|
-
"
|
|
5698
|
+
"9. **Follow CLAUDE.md conventions** for all `git` and `gh` operations."
|
|
5562
5699
|
].join("\n")
|
|
5563
5700
|
};
|
|
5564
5701
|
var reviewPrSkill = {
|
|
@@ -5577,7 +5714,16 @@ var reviewPrSkill = {
|
|
|
5577
5714
|
"",
|
|
5578
5715
|
"## Usage",
|
|
5579
5716
|
"",
|
|
5580
|
-
"/review-pr <pr-number>",
|
|
5717
|
+
"/review-pr <pr-number> [--allow-human-author]",
|
|
5718
|
+
"",
|
|
5719
|
+
"### Flags",
|
|
5720
|
+
"",
|
|
5721
|
+
"- **`--allow-human-author`** \u2014 opt the reviewer into processing",
|
|
5722
|
+
" human-authored PRs for **this invocation only**. By default, the",
|
|
5723
|
+
" reviewer only processes bot-authored PRs (those carrying the",
|
|
5724
|
+
" `origin:issue-worker` label); pass this flag to review a",
|
|
5725
|
+
" human-authored PR. The flag does not persist \u2014 subsequent",
|
|
5726
|
+
" invocations return to the bot-only default.",
|
|
5581
5727
|
"",
|
|
5582
5728
|
"## What This Skill Does",
|
|
5583
5729
|
"",
|
|
@@ -5592,6 +5738,10 @@ var reviewPrSkill = {
|
|
|
5592
5738
|
"9. After merge, verifies the linked issue is closed and closes it if not",
|
|
5593
5739
|
"10. Cleans up the local branch after merge",
|
|
5594
5740
|
"",
|
|
5741
|
+
"Passing `--allow-human-author` opts the reviewer into processing",
|
|
5742
|
+
"human-authored PRs for this invocation only (the default scope is",
|
|
5743
|
+
"bot-authored PRs labeled `origin:issue-worker`).",
|
|
5744
|
+
"",
|
|
5595
5745
|
"## Input",
|
|
5596
5746
|
"",
|
|
5597
5747
|
"Provide the PR number to review. The skill resolves the linked issue from",
|
|
@@ -5626,7 +5776,16 @@ var reviewPrsSkill = {
|
|
|
5626
5776
|
"",
|
|
5627
5777
|
"## Usage",
|
|
5628
5778
|
"",
|
|
5629
|
-
"/review-prs",
|
|
5779
|
+
"/review-prs [--allow-human-author]",
|
|
5780
|
+
"",
|
|
5781
|
+
"### Flags",
|
|
5782
|
+
"",
|
|
5783
|
+
"- **`--allow-human-author`** \u2014 opt the reviewer into processing",
|
|
5784
|
+
" human-authored PRs for **this invocation only**. By default, the",
|
|
5785
|
+
" loop only processes bot-authored PRs (those carrying the",
|
|
5786
|
+
" `origin:issue-worker` label); pass this flag to include",
|
|
5787
|
+
" human-authored PRs in the queue. The flag does not persist \u2014",
|
|
5788
|
+
" subsequent invocations return to the bot-only default.",
|
|
5630
5789
|
"",
|
|
5631
5790
|
"## What This Skill Does",
|
|
5632
5791
|
"",
|
|
@@ -5671,6 +5830,10 @@ var reviewPrsSkill = {
|
|
|
5671
5830
|
"When no eligible PRs remain, emit a final summary listing every PR",
|
|
5672
5831
|
"processed and the verdict for each, then stop.",
|
|
5673
5832
|
"",
|
|
5833
|
+
"Passing `--allow-human-author` opts the reviewer into including",
|
|
5834
|
+
"human-authored PRs in the queue for this invocation only (the default",
|
|
5835
|
+
"scope is bot-authored PRs labeled `origin:issue-worker`).",
|
|
5836
|
+
"",
|
|
5674
5837
|
"## Output",
|
|
5675
5838
|
"",
|
|
5676
5839
|
"Per-PR structured report (same shape as `/review-pr`), followed by a",
|
|
@@ -5700,6 +5863,88 @@ var prReviewBundle = {
|
|
|
5700
5863
|
// still exclude it explicitly via `excludeBundles` if desired.
|
|
5701
5864
|
appliesWhen: () => true,
|
|
5702
5865
|
rules: [
|
|
5866
|
+
{
|
|
5867
|
+
name: "pr-review-policy",
|
|
5868
|
+
description: "Declarative policy that tells the pr-reviewer which PRs may auto-merge and which must wait for a human reviewer",
|
|
5869
|
+
scope: AGENT_RULE_SCOPE.ALWAYS,
|
|
5870
|
+
content: [
|
|
5871
|
+
"# PR Review Policy",
|
|
5872
|
+
"",
|
|
5873
|
+
"The `pr-reviewer` sub-agent evaluates every PR it reviews against the",
|
|
5874
|
+
"policy below and routes the PR into one of two modes:",
|
|
5875
|
+
"",
|
|
5876
|
+
"- **`auto-merge`** \u2014 the reviewer may enable squash auto-merge once",
|
|
5877
|
+
" all acceptance criteria are met and CI is green.",
|
|
5878
|
+
"- **`human-required`** \u2014 the reviewer runs the full AC/CI check but",
|
|
5879
|
+
" never calls `gh pr merge --auto`. It applies the",
|
|
5880
|
+
" `review:awaiting-human` label and hands off to a human reviewer.",
|
|
5881
|
+
"",
|
|
5882
|
+
"## Policy",
|
|
5883
|
+
"",
|
|
5884
|
+
"```yaml",
|
|
5885
|
+
"version: 1",
|
|
5886
|
+
"default: auto-merge",
|
|
5887
|
+
"",
|
|
5888
|
+
"human-required:",
|
|
5889
|
+
" paths:",
|
|
5890
|
+
' - "docs/adrs/**"',
|
|
5891
|
+
' - "docs/project-context.md"',
|
|
5892
|
+
' - ".github/workflows/**"',
|
|
5893
|
+
' - ".github/CODEOWNERS"',
|
|
5894
|
+
' - ".projenrc.ts"',
|
|
5895
|
+
' - "projenrc/**"',
|
|
5896
|
+
' - "CLAUDE.md"',
|
|
5897
|
+
' - ".claude/**"',
|
|
5898
|
+
' - "packages/**/package.json"',
|
|
5899
|
+
" issue-types:",
|
|
5900
|
+
" - release",
|
|
5901
|
+
" - hotfix",
|
|
5902
|
+
" size:",
|
|
5903
|
+
" files: 10",
|
|
5904
|
+
" insertions: 500",
|
|
5905
|
+
" labels-that-force-human:",
|
|
5906
|
+
' - "review:human-required"',
|
|
5907
|
+
' - "priority:critical"',
|
|
5908
|
+
"",
|
|
5909
|
+
"auto-merge:",
|
|
5910
|
+
" labels-that-force-auto:",
|
|
5911
|
+
' - "review:auto-ok"',
|
|
5912
|
+
"```",
|
|
5913
|
+
"",
|
|
5914
|
+
"## Precedence",
|
|
5915
|
+
"",
|
|
5916
|
+
"The reviewer walks the following checks in order. The **first match**",
|
|
5917
|
+
"fixes the mode; any mixed-match PR (signals from both sides) resolves",
|
|
5918
|
+
"conservatively to `human-required` \u2014 `auto-merge` only wins when the",
|
|
5919
|
+
"force-auto label is the single top-priority match.",
|
|
5920
|
+
"",
|
|
5921
|
+
"1. **`auto-merge.labels-that-force-auto`** \u2014 if the PR carries any of",
|
|
5922
|
+
" these labels (e.g. `review:auto-ok`), the mode is `auto-merge`",
|
|
5923
|
+
" outright. This is the only escape hatch from the conservative",
|
|
5924
|
+
" default; it requires a maintainer to apply the label explicitly.",
|
|
5925
|
+
"2. **`review:human-required` label** \u2014 reserved force-human label;",
|
|
5926
|
+
" if present (and no force-auto label beat it in step 1), the mode",
|
|
5927
|
+
" is `human-required`.",
|
|
5928
|
+
"3. **`human-required.labels-that-force-human`** \u2014 any listed label on",
|
|
5929
|
+
" the PR (e.g. `priority:critical`) forces `human-required`.",
|
|
5930
|
+
"4. **`human-required.paths`** \u2014 if any file in the PR diff matches",
|
|
5931
|
+
" any glob here, the mode is `human-required`. Matching uses",
|
|
5932
|
+
" standard glob semantics (`**` for recursive directories,",
|
|
5933
|
+
" `*` for a single path segment).",
|
|
5934
|
+
"5. **`human-required.issue-types`** \u2014 if the linked issue's GitHub",
|
|
5935
|
+
" issue type matches any entry (case-insensitive), the mode is",
|
|
5936
|
+
" `human-required`.",
|
|
5937
|
+
"6. **`human-required.size`** \u2014 if the PR exceeds either the `files`",
|
|
5938
|
+
" count or the `insertions` count, the mode is `human-required`.",
|
|
5939
|
+
"7. **`default`** \u2014 applied only when no rule above matched",
|
|
5940
|
+
" (normally `auto-merge`).",
|
|
5941
|
+
"",
|
|
5942
|
+
"The `pr-reviewer` sub-agent records the decided mode and the triggering",
|
|
5943
|
+
"reason in its Phase 2.75 output so downstream phases and any sticky",
|
|
5944
|
+
"summary can cite the specific rule that applied."
|
|
5945
|
+
].join("\n"),
|
|
5946
|
+
tags: ["policy", "review"]
|
|
5947
|
+
},
|
|
5703
5948
|
{
|
|
5704
5949
|
name: "pr-review-workflow",
|
|
5705
5950
|
description: "Describes the /review-pr and /review-prs skills and their delegation to the pr-reviewer sub-agent",
|
|
@@ -5720,15 +5965,21 @@ var prReviewBundle = {
|
|
|
5720
5965
|
" has a linked issue). Ineligible PRs get a short comment and are",
|
|
5721
5966
|
" skipped.",
|
|
5722
5967
|
"2. Fetches the PR, its diff, CI status, and the linked issue",
|
|
5723
|
-
"3.
|
|
5724
|
-
"
|
|
5725
|
-
"
|
|
5726
|
-
"
|
|
5727
|
-
"
|
|
5968
|
+
"3. **Evaluates the PR Review Policy** (see the `PR Review Policy`",
|
|
5969
|
+
" section above) to decide whether the PR is `auto-merge` or",
|
|
5970
|
+
" `human-required`, and records the triggering reason",
|
|
5971
|
+
"4. Builds a checklist from the issue's acceptance criteria",
|
|
5972
|
+
"5. Verifies the diff satisfies each criterion and that CI is green",
|
|
5973
|
+
"6. **Enables squash auto-merge** (with `--delete-branch`) when all",
|
|
5974
|
+
" checks pass **and** the review mode is `auto-merge`",
|
|
5975
|
+
"7. **Applies `review:awaiting-human`** and hands off to a human",
|
|
5976
|
+
" reviewer when the review mode is `human-required` (no auto-merge,",
|
|
5977
|
+
" even if every acceptance criterion is met)",
|
|
5978
|
+
"8. **Comments with grouped findings** when any check fails (plain",
|
|
5728
5979
|
" `gh pr comment`, not a formal `--request-changes` review)",
|
|
5729
|
-
"
|
|
5980
|
+
"9. After a successful merge, verifies the linked issue is closed",
|
|
5730
5981
|
" and closes it explicitly if the merge commit did not",
|
|
5731
|
-
"
|
|
5982
|
+
"10. Cleans up the local branch after merge",
|
|
5732
5983
|
"",
|
|
5733
5984
|
"The reviewer **never** implements code and **never** pushes commits",
|
|
5734
5985
|
"to a PR's branch \u2014 it only reviews, decides, and orchestrates merge",
|