@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.mjs
CHANGED
|
@@ -4362,8 +4362,14 @@ var issueWorkerSubAgent = {
|
|
|
4362
4362
|
"",
|
|
4363
4363
|
"## Phase 7: Open a PR",
|
|
4364
4364
|
"",
|
|
4365
|
+
"Every PR you open must carry the `origin:issue-worker` label so downstream",
|
|
4366
|
+
"agents can identify bot-authored PRs. Always include",
|
|
4367
|
+
"`--label 'origin:issue-worker'` in the `gh pr create` invocation:",
|
|
4368
|
+
"",
|
|
4365
4369
|
"```bash",
|
|
4366
|
-
'gh pr create --title "<type>(<scope>): <description>"
|
|
4370
|
+
'gh pr create --title "<type>(<scope>): <description>" \\',
|
|
4371
|
+
" --label 'origin:issue-worker' \\",
|
|
4372
|
+
' --body "## Summary',
|
|
4367
4373
|
"",
|
|
4368
4374
|
"<bullet points>",
|
|
4369
4375
|
"",
|
|
@@ -4415,7 +4421,12 @@ var issueWorkerSubAgent = {
|
|
|
4415
4421
|
"3. **Follow CLAUDE.md conventions** for branch naming, commits, and PRs.",
|
|
4416
4422
|
"4. **Do not assign PRs to a project board** \u2014 this repo has no GitHub project.",
|
|
4417
4423
|
"5. **Do not add AI co-author** attribution to commits.",
|
|
4418
|
-
"6. **
|
|
4424
|
+
"6. **Always label PRs with `origin:issue-worker`.** Every PR opened by",
|
|
4425
|
+
" the issue-worker must carry the `origin:issue-worker` label so",
|
|
4426
|
+
" downstream agents (notably the `pr-reviewer`) can identify",
|
|
4427
|
+
" bot-authored PRs. Pass `--label 'origin:issue-worker'` on every",
|
|
4428
|
+
" `gh pr create` call.",
|
|
4429
|
+
"7. **On failure:** If you cannot complete the issue, update labels and leave a comment:",
|
|
4419
4430
|
" ```bash",
|
|
4420
4431
|
' gh issue edit <number> --remove-label "status:in-progress" --add-label "status:needs-attention"',
|
|
4421
4432
|
' gh issue comment <number> --body "Worker could not complete: <reason>"',
|
|
@@ -5294,6 +5305,25 @@ var prReviewerSubAgent = {
|
|
|
5294
5305
|
"---",
|
|
5295
5306
|
"",
|
|
5296
5307
|
...PROJECT_CONTEXT_READER_SECTION,
|
|
5308
|
+
"## Invocation Flags",
|
|
5309
|
+
"",
|
|
5310
|
+
"Your invocation prompt may include flags that modify how you select and",
|
|
5311
|
+
"process PRs. Parse the prompt for these flags before starting Phase 1:",
|
|
5312
|
+
"",
|
|
5313
|
+
"- **`--allow-human-author`** \u2014 opt-in flag that allows the reviewer to",
|
|
5314
|
+
" process PRs authored by humans in addition to bot-authored PRs",
|
|
5315
|
+
" (those carrying the `origin:issue-worker` label). When absent, the",
|
|
5316
|
+
" reviewer only processes bot-authored PRs; when present, human-authored",
|
|
5317
|
+
" PRs are also eligible for this invocation only. The flag does **not**",
|
|
5318
|
+
" persist across invocations.",
|
|
5319
|
+
"",
|
|
5320
|
+
"Note: the behaviour wiring for `--allow-human-author` (the bot-only",
|
|
5321
|
+
"guard that the flag opts out of) lands in a follow-up issue. This",
|
|
5322
|
+
"agent currently acknowledges the flag so consumers can start passing",
|
|
5323
|
+
"it through; full gating on author identity arrives later.",
|
|
5324
|
+
"",
|
|
5325
|
+
"---",
|
|
5326
|
+
"",
|
|
5297
5327
|
"## Phase 1: Identify the PR",
|
|
5298
5328
|
"",
|
|
5299
5329
|
"If a PR number was provided in your instructions, use that. Otherwise stop",
|
|
@@ -5332,7 +5362,7 @@ var prReviewerSubAgent = {
|
|
|
5332
5362
|
"## Phase 2: Gather Context",
|
|
5333
5363
|
"",
|
|
5334
5364
|
"```bash",
|
|
5335
|
-
"gh pr view <pr-number> --json number,title,body,headRefName,baseRefName,isDraft,state,labels,reviews",
|
|
5365
|
+
"gh pr view <pr-number> --json number,title,body,headRefName,baseRefName,isDraft,state,labels,reviews,files,additions,deletions",
|
|
5336
5366
|
"gh pr diff <pr-number>",
|
|
5337
5367
|
"gh pr checks <pr-number>",
|
|
5338
5368
|
"```",
|
|
@@ -5340,12 +5370,84 @@ var prReviewerSubAgent = {
|
|
|
5340
5370
|
"Extract the linked issue number from the PR body using the closing keywords",
|
|
5341
5371
|
"(`Closes #N`, `Fixes #N`, or `Resolves #N`) identified in Phase 1.5.",
|
|
5342
5372
|
"",
|
|
5343
|
-
"Then fetch the linked issue
|
|
5373
|
+
"Then fetch the linked issue, including its `issueType` so Phase 2.75 can",
|
|
5374
|
+
"evaluate the issue-type portion of the review policy:",
|
|
5344
5375
|
"",
|
|
5345
5376
|
"```bash",
|
|
5346
|
-
"gh issue view <issue-number>",
|
|
5377
|
+
"gh issue view <issue-number> --json number,title,body,labels,state,issueType",
|
|
5378
|
+
"```",
|
|
5379
|
+
"",
|
|
5380
|
+
"## Phase 2.75: Determine Review Mode",
|
|
5381
|
+
"",
|
|
5382
|
+
"Before comparing the diff to the acceptance criteria, evaluate the PR",
|
|
5383
|
+
"against the **PR Review Policy** embedded in this repository's",
|
|
5384
|
+
"`CLAUDE.md` (rendered from the `pr-review-policy` rule). The decision",
|
|
5385
|
+
"here governs whether Phase 4 enables auto-merge or hands off to a",
|
|
5386
|
+
"human reviewer.",
|
|
5387
|
+
"",
|
|
5388
|
+
"### Step 1: Load the policy",
|
|
5389
|
+
"",
|
|
5390
|
+
"Read `CLAUDE.md` from the repo root and extract the fenced YAML block",
|
|
5391
|
+
"under the `## PR Review Policy` heading. Parse the block into an",
|
|
5392
|
+
"in-memory object with the following top-level fields: `version`,",
|
|
5393
|
+
"`default`, `human-required`, `auto-merge`.",
|
|
5394
|
+
"",
|
|
5395
|
+
"If the policy section is missing or unparseable, fall back to",
|
|
5396
|
+
"`mode = human-required` with `reason = 'policy missing or unreadable'`",
|
|
5397
|
+
"and skip to Step 3. Do **not** auto-merge when the policy is absent.",
|
|
5398
|
+
"",
|
|
5399
|
+
"### Step 2: Evaluate in precedence order",
|
|
5400
|
+
"",
|
|
5401
|
+
"Walk the following checks in order. The **first match wins** and fixes",
|
|
5402
|
+
"the mode; record the triggering condition as the `reason`. Mixed-match",
|
|
5403
|
+
"PRs (signals from both sides) resolve conservatively to",
|
|
5404
|
+
"`human-required` \u2014 force-auto only wins when it is the single highest",
|
|
5405
|
+
"match and no later human-required signal changes the outcome under",
|
|
5406
|
+
"step 2c.",
|
|
5407
|
+
"",
|
|
5408
|
+
"1. **Force-auto label** \u2014 if the PR carries any label listed under",
|
|
5409
|
+
" `auto-merge.labels-that-force-auto` (e.g. `review:auto-ok`), set",
|
|
5410
|
+
" `mode = auto-merge`.",
|
|
5411
|
+
"2. **Force-human label (reserved)** \u2014 if the PR carries a",
|
|
5412
|
+
" `review:human-required` label, set `mode = human-required`.",
|
|
5413
|
+
"3. **Labels that force human** \u2014 if the PR carries any label listed",
|
|
5414
|
+
" under `human-required.labels-that-force-human` (e.g.",
|
|
5415
|
+
" `priority:critical`), set `mode = human-required`.",
|
|
5416
|
+
"4. **Path globs** \u2014 if any file in the PR diff matches any glob in",
|
|
5417
|
+
" `human-required.paths`, set `mode = human-required`. Record the",
|
|
5418
|
+
" first matching path + glob pair as the reason.",
|
|
5419
|
+
"5. **Issue type** \u2014 if the linked issue's GitHub issue type",
|
|
5420
|
+
" (fetched in Phase 2) matches any entry in",
|
|
5421
|
+
" `human-required.issue-types` (case-insensitive), set",
|
|
5422
|
+
" `mode = human-required`.",
|
|
5423
|
+
"6. **Size thresholds** \u2014 if the PR exceeds either threshold under",
|
|
5424
|
+
" `human-required.size` (`files` count or `insertions` count), set",
|
|
5425
|
+
" `mode = human-required`.",
|
|
5426
|
+
"7. **Default** \u2014 if no rule above matched, apply the `default` field",
|
|
5427
|
+
" from the policy (typically `auto-merge`).",
|
|
5428
|
+
"",
|
|
5429
|
+
"#### Mixed-match resolution",
|
|
5430
|
+
"",
|
|
5431
|
+
"Apart from rule (1), which is an explicit opt-in and wins outright,",
|
|
5432
|
+
"**any** match from rules (2) through (6) forces `human-required` even",
|
|
5433
|
+
"if a non-force-auto signal would otherwise have allowed auto-merge.",
|
|
5434
|
+
"The conservative choice wins. Rule (1) is the sole escape hatch and",
|
|
5435
|
+
"requires a maintainer to have applied the force-auto label.",
|
|
5436
|
+
"",
|
|
5437
|
+
"### Step 3: Record the decision",
|
|
5438
|
+
"",
|
|
5439
|
+
"Persist the evaluated mode and reason for later phases so Phase 4 and",
|
|
5440
|
+
"any downstream summary writer can cite it:",
|
|
5441
|
+
"",
|
|
5442
|
+
"```",
|
|
5443
|
+
"Review mode: <auto-merge | human-required>",
|
|
5444
|
+
"Reason: <short explanation \u2014 label name, path+glob, issue type, size threshold, default>",
|
|
5347
5445
|
"```",
|
|
5348
5446
|
"",
|
|
5447
|
+
"Phases 3 (acceptance-criteria comparison) and CI verification run",
|
|
5448
|
+
"unchanged regardless of mode. Only the terminal action in Phase 4",
|
|
5449
|
+
"branches on the decided mode.",
|
|
5450
|
+
"",
|
|
5349
5451
|
"## Phase 3: Compare Diff to Acceptance Criteria",
|
|
5350
5452
|
"",
|
|
5351
5453
|
"Read the issue body for an **Acceptance Criteria** (or equivalent) section.",
|
|
@@ -5367,6 +5469,10 @@ var prReviewerSubAgent = {
|
|
|
5367
5469
|
"",
|
|
5368
5470
|
"### If all acceptance criteria are met and CI is green",
|
|
5369
5471
|
"",
|
|
5472
|
+
"Branch on the **review mode** decided in Phase 2.75:",
|
|
5473
|
+
"",
|
|
5474
|
+
"#### Mode `auto-merge`",
|
|
5475
|
+
"",
|
|
5370
5476
|
"Enable squash auto-merge with branch deletion. This queues the merge to",
|
|
5371
5477
|
"happen once required checks pass; no separate approval review is needed.",
|
|
5372
5478
|
"",
|
|
@@ -5380,6 +5486,27 @@ var prReviewerSubAgent = {
|
|
|
5380
5486
|
"`feat(scope): description`). The body should bullet the changes and end",
|
|
5381
5487
|
"with `Closes #<issue-number>`.",
|
|
5382
5488
|
"",
|
|
5489
|
+
"#### Mode `human-required`",
|
|
5490
|
+
"",
|
|
5491
|
+
"Do **not** run `gh pr merge --auto`. Instead, hand the PR off to a",
|
|
5492
|
+
"human reviewer:",
|
|
5493
|
+
"",
|
|
5494
|
+
"1. Apply the `review:awaiting-human` label so the PR is discoverable",
|
|
5495
|
+
" in the human-review queue:",
|
|
5496
|
+
"",
|
|
5497
|
+
" ```bash",
|
|
5498
|
+
" gh pr edit <pr-number> --add-label 'review:awaiting-human'",
|
|
5499
|
+
" ```",
|
|
5500
|
+
"",
|
|
5501
|
+
"2. Exit cleanly after the acceptance-criteria check completes and any",
|
|
5502
|
+
" summary comment the reviewer posts. Proceed to Phase 5 only if a",
|
|
5503
|
+
" merge occurred \u2014 in `human-required` mode the reviewer stops at",
|
|
5504
|
+
" the hand-off and does not poll for merge.",
|
|
5505
|
+
"",
|
|
5506
|
+
"The reason captured in Phase 2.75 should be included in any summary",
|
|
5507
|
+
"comment so maintainers know why human review was required (path hit,",
|
|
5508
|
+
"issue type, size threshold, label, or default).",
|
|
5509
|
+
"",
|
|
5383
5510
|
"### If any criterion is missing, partial, or CI is failing",
|
|
5384
5511
|
"",
|
|
5385
5512
|
"Post a plain comment (not a formal review block) with grouped findings:",
|
|
@@ -5399,8 +5526,12 @@ var prReviewerSubAgent = {
|
|
|
5399
5526
|
"",
|
|
5400
5527
|
"## Phase 5: Branch Cleanup and Issue Closure Verification",
|
|
5401
5528
|
"",
|
|
5402
|
-
"
|
|
5403
|
-
"
|
|
5529
|
+
"Skip this phase entirely when the review mode from Phase 2.75 is",
|
|
5530
|
+
"`human-required` \u2014 no merge was initiated, so there is nothing to poll",
|
|
5531
|
+
"and no branch to clean up. Report the hand-off and stop.",
|
|
5532
|
+
"",
|
|
5533
|
+
"In `auto-merge` mode, auto-merge may not be immediate. Poll the PR",
|
|
5534
|
+
"state up to 10 times, waiting 30 seconds between polls:",
|
|
5404
5535
|
"",
|
|
5405
5536
|
"```bash",
|
|
5406
5537
|
"gh pr view <pr-number> --json state --jq '.state'",
|
|
@@ -5443,7 +5574,9 @@ var prReviewerSubAgent = {
|
|
|
5443
5574
|
"```",
|
|
5444
5575
|
"PR #<number> \u2014 <title>",
|
|
5445
5576
|
"Linked issue: #<issue-number>",
|
|
5446
|
-
"
|
|
5577
|
+
"Review mode: <auto-merge | human-required>",
|
|
5578
|
+
"Reason: <short explanation from Phase 2.75>",
|
|
5579
|
+
"Verdict: AUTO_MERGE_ENABLED | AWAITING_HUMAN | NEEDS_CHANGES | INELIGIBLE | BLOCKED",
|
|
5447
5580
|
"",
|
|
5448
5581
|
"Acceptance criteria:",
|
|
5449
5582
|
" [x] <criterion> \u2014 <evidence>",
|
|
@@ -5455,7 +5588,7 @@ var prReviewerSubAgent = {
|
|
|
5455
5588
|
" - Suggested: <items>",
|
|
5456
5589
|
" - Nitpick: <items>",
|
|
5457
5590
|
"",
|
|
5458
|
-
"Action taken: <enable-auto-merge | commented-on-the-pr | none>",
|
|
5591
|
+
"Action taken: <enable-auto-merge | label-awaiting-human | commented-on-the-pr | none>",
|
|
5459
5592
|
"Branch state: <merged | open | closed>",
|
|
5460
5593
|
"Issue state: <closed | open>",
|
|
5461
5594
|
"```",
|
|
@@ -5473,15 +5606,19 @@ var prReviewerSubAgent = {
|
|
|
5473
5606
|
" block on red checks.",
|
|
5474
5607
|
"4. **Never bypass review conventions.** Always use `--squash`, `--auto`,",
|
|
5475
5608
|
" and `--delete-branch` for merges. Do not force-merge.",
|
|
5476
|
-
"5. **
|
|
5609
|
+
"5. **Never auto-merge a `human-required` PR.** When Phase 2.75 resolves",
|
|
5610
|
+
" to `human-required`, Phase 4 applies `review:awaiting-human` and",
|
|
5611
|
+
" exits. Even if every acceptance criterion is met and CI is green,",
|
|
5612
|
+
" `gh pr merge --auto` is forbidden in that mode.",
|
|
5613
|
+
"6. **Do not implement code.** You review, decide, and orchestrate. If",
|
|
5477
5614
|
" the PR needs changes, comment and stop.",
|
|
5478
|
-
"
|
|
5615
|
+
"7. **Never push commits to the PR's branch.** If the PR needs changes,",
|
|
5479
5616
|
" comment and stop \u2014 do not attempt to fix it yourself. The PR author",
|
|
5480
5617
|
" owns the branch; pushing to someone else's branch is out of scope.",
|
|
5481
|
-
"
|
|
5618
|
+
"8. **In loop mode (`/review-prs`), never stop early.** If any review",
|
|
5482
5619
|
" fails, comment and move to the next PR. Only abort the loop on a",
|
|
5483
5620
|
" fatal error (e.g. `gh` auth failure, network outage).",
|
|
5484
|
-
"
|
|
5621
|
+
"9. **Follow CLAUDE.md conventions** for all `git` and `gh` operations."
|
|
5485
5622
|
].join("\n")
|
|
5486
5623
|
};
|
|
5487
5624
|
var reviewPrSkill = {
|
|
@@ -5500,7 +5637,16 @@ var reviewPrSkill = {
|
|
|
5500
5637
|
"",
|
|
5501
5638
|
"## Usage",
|
|
5502
5639
|
"",
|
|
5503
|
-
"/review-pr <pr-number>",
|
|
5640
|
+
"/review-pr <pr-number> [--allow-human-author]",
|
|
5641
|
+
"",
|
|
5642
|
+
"### Flags",
|
|
5643
|
+
"",
|
|
5644
|
+
"- **`--allow-human-author`** \u2014 opt the reviewer into processing",
|
|
5645
|
+
" human-authored PRs for **this invocation only**. By default, the",
|
|
5646
|
+
" reviewer only processes bot-authored PRs (those carrying the",
|
|
5647
|
+
" `origin:issue-worker` label); pass this flag to review a",
|
|
5648
|
+
" human-authored PR. The flag does not persist \u2014 subsequent",
|
|
5649
|
+
" invocations return to the bot-only default.",
|
|
5504
5650
|
"",
|
|
5505
5651
|
"## What This Skill Does",
|
|
5506
5652
|
"",
|
|
@@ -5515,6 +5661,10 @@ var reviewPrSkill = {
|
|
|
5515
5661
|
"9. After merge, verifies the linked issue is closed and closes it if not",
|
|
5516
5662
|
"10. Cleans up the local branch after merge",
|
|
5517
5663
|
"",
|
|
5664
|
+
"Passing `--allow-human-author` opts the reviewer into processing",
|
|
5665
|
+
"human-authored PRs for this invocation only (the default scope is",
|
|
5666
|
+
"bot-authored PRs labeled `origin:issue-worker`).",
|
|
5667
|
+
"",
|
|
5518
5668
|
"## Input",
|
|
5519
5669
|
"",
|
|
5520
5670
|
"Provide the PR number to review. The skill resolves the linked issue from",
|
|
@@ -5549,7 +5699,16 @@ var reviewPrsSkill = {
|
|
|
5549
5699
|
"",
|
|
5550
5700
|
"## Usage",
|
|
5551
5701
|
"",
|
|
5552
|
-
"/review-prs",
|
|
5702
|
+
"/review-prs [--allow-human-author]",
|
|
5703
|
+
"",
|
|
5704
|
+
"### Flags",
|
|
5705
|
+
"",
|
|
5706
|
+
"- **`--allow-human-author`** \u2014 opt the reviewer into processing",
|
|
5707
|
+
" human-authored PRs for **this invocation only**. By default, the",
|
|
5708
|
+
" loop only processes bot-authored PRs (those carrying the",
|
|
5709
|
+
" `origin:issue-worker` label); pass this flag to include",
|
|
5710
|
+
" human-authored PRs in the queue. The flag does not persist \u2014",
|
|
5711
|
+
" subsequent invocations return to the bot-only default.",
|
|
5553
5712
|
"",
|
|
5554
5713
|
"## What This Skill Does",
|
|
5555
5714
|
"",
|
|
@@ -5594,6 +5753,10 @@ var reviewPrsSkill = {
|
|
|
5594
5753
|
"When no eligible PRs remain, emit a final summary listing every PR",
|
|
5595
5754
|
"processed and the verdict for each, then stop.",
|
|
5596
5755
|
"",
|
|
5756
|
+
"Passing `--allow-human-author` opts the reviewer into including",
|
|
5757
|
+
"human-authored PRs in the queue for this invocation only (the default",
|
|
5758
|
+
"scope is bot-authored PRs labeled `origin:issue-worker`).",
|
|
5759
|
+
"",
|
|
5597
5760
|
"## Output",
|
|
5598
5761
|
"",
|
|
5599
5762
|
"Per-PR structured report (same shape as `/review-pr`), followed by a",
|
|
@@ -5623,6 +5786,88 @@ var prReviewBundle = {
|
|
|
5623
5786
|
// still exclude it explicitly via `excludeBundles` if desired.
|
|
5624
5787
|
appliesWhen: () => true,
|
|
5625
5788
|
rules: [
|
|
5789
|
+
{
|
|
5790
|
+
name: "pr-review-policy",
|
|
5791
|
+
description: "Declarative policy that tells the pr-reviewer which PRs may auto-merge and which must wait for a human reviewer",
|
|
5792
|
+
scope: AGENT_RULE_SCOPE.ALWAYS,
|
|
5793
|
+
content: [
|
|
5794
|
+
"# PR Review Policy",
|
|
5795
|
+
"",
|
|
5796
|
+
"The `pr-reviewer` sub-agent evaluates every PR it reviews against the",
|
|
5797
|
+
"policy below and routes the PR into one of two modes:",
|
|
5798
|
+
"",
|
|
5799
|
+
"- **`auto-merge`** \u2014 the reviewer may enable squash auto-merge once",
|
|
5800
|
+
" all acceptance criteria are met and CI is green.",
|
|
5801
|
+
"- **`human-required`** \u2014 the reviewer runs the full AC/CI check but",
|
|
5802
|
+
" never calls `gh pr merge --auto`. It applies the",
|
|
5803
|
+
" `review:awaiting-human` label and hands off to a human reviewer.",
|
|
5804
|
+
"",
|
|
5805
|
+
"## Policy",
|
|
5806
|
+
"",
|
|
5807
|
+
"```yaml",
|
|
5808
|
+
"version: 1",
|
|
5809
|
+
"default: auto-merge",
|
|
5810
|
+
"",
|
|
5811
|
+
"human-required:",
|
|
5812
|
+
" paths:",
|
|
5813
|
+
' - "docs/adrs/**"',
|
|
5814
|
+
' - "docs/project-context.md"',
|
|
5815
|
+
' - ".github/workflows/**"',
|
|
5816
|
+
' - ".github/CODEOWNERS"',
|
|
5817
|
+
' - ".projenrc.ts"',
|
|
5818
|
+
' - "projenrc/**"',
|
|
5819
|
+
' - "CLAUDE.md"',
|
|
5820
|
+
' - ".claude/**"',
|
|
5821
|
+
' - "packages/**/package.json"',
|
|
5822
|
+
" issue-types:",
|
|
5823
|
+
" - release",
|
|
5824
|
+
" - hotfix",
|
|
5825
|
+
" size:",
|
|
5826
|
+
" files: 10",
|
|
5827
|
+
" insertions: 500",
|
|
5828
|
+
" labels-that-force-human:",
|
|
5829
|
+
' - "review:human-required"',
|
|
5830
|
+
' - "priority:critical"',
|
|
5831
|
+
"",
|
|
5832
|
+
"auto-merge:",
|
|
5833
|
+
" labels-that-force-auto:",
|
|
5834
|
+
' - "review:auto-ok"',
|
|
5835
|
+
"```",
|
|
5836
|
+
"",
|
|
5837
|
+
"## Precedence",
|
|
5838
|
+
"",
|
|
5839
|
+
"The reviewer walks the following checks in order. The **first match**",
|
|
5840
|
+
"fixes the mode; any mixed-match PR (signals from both sides) resolves",
|
|
5841
|
+
"conservatively to `human-required` \u2014 `auto-merge` only wins when the",
|
|
5842
|
+
"force-auto label is the single top-priority match.",
|
|
5843
|
+
"",
|
|
5844
|
+
"1. **`auto-merge.labels-that-force-auto`** \u2014 if the PR carries any of",
|
|
5845
|
+
" these labels (e.g. `review:auto-ok`), the mode is `auto-merge`",
|
|
5846
|
+
" outright. This is the only escape hatch from the conservative",
|
|
5847
|
+
" default; it requires a maintainer to apply the label explicitly.",
|
|
5848
|
+
"2. **`review:human-required` label** \u2014 reserved force-human label;",
|
|
5849
|
+
" if present (and no force-auto label beat it in step 1), the mode",
|
|
5850
|
+
" is `human-required`.",
|
|
5851
|
+
"3. **`human-required.labels-that-force-human`** \u2014 any listed label on",
|
|
5852
|
+
" the PR (e.g. `priority:critical`) forces `human-required`.",
|
|
5853
|
+
"4. **`human-required.paths`** \u2014 if any file in the PR diff matches",
|
|
5854
|
+
" any glob here, the mode is `human-required`. Matching uses",
|
|
5855
|
+
" standard glob semantics (`**` for recursive directories,",
|
|
5856
|
+
" `*` for a single path segment).",
|
|
5857
|
+
"5. **`human-required.issue-types`** \u2014 if the linked issue's GitHub",
|
|
5858
|
+
" issue type matches any entry (case-insensitive), the mode is",
|
|
5859
|
+
" `human-required`.",
|
|
5860
|
+
"6. **`human-required.size`** \u2014 if the PR exceeds either the `files`",
|
|
5861
|
+
" count or the `insertions` count, the mode is `human-required`.",
|
|
5862
|
+
"7. **`default`** \u2014 applied only when no rule above matched",
|
|
5863
|
+
" (normally `auto-merge`).",
|
|
5864
|
+
"",
|
|
5865
|
+
"The `pr-reviewer` sub-agent records the decided mode and the triggering",
|
|
5866
|
+
"reason in its Phase 2.75 output so downstream phases and any sticky",
|
|
5867
|
+
"summary can cite the specific rule that applied."
|
|
5868
|
+
].join("\n"),
|
|
5869
|
+
tags: ["policy", "review"]
|
|
5870
|
+
},
|
|
5626
5871
|
{
|
|
5627
5872
|
name: "pr-review-workflow",
|
|
5628
5873
|
description: "Describes the /review-pr and /review-prs skills and their delegation to the pr-reviewer sub-agent",
|
|
@@ -5643,15 +5888,21 @@ var prReviewBundle = {
|
|
|
5643
5888
|
" has a linked issue). Ineligible PRs get a short comment and are",
|
|
5644
5889
|
" skipped.",
|
|
5645
5890
|
"2. Fetches the PR, its diff, CI status, and the linked issue",
|
|
5646
|
-
"3.
|
|
5647
|
-
"
|
|
5648
|
-
"
|
|
5649
|
-
"
|
|
5650
|
-
"
|
|
5891
|
+
"3. **Evaluates the PR Review Policy** (see the `PR Review Policy`",
|
|
5892
|
+
" section above) to decide whether the PR is `auto-merge` or",
|
|
5893
|
+
" `human-required`, and records the triggering reason",
|
|
5894
|
+
"4. Builds a checklist from the issue's acceptance criteria",
|
|
5895
|
+
"5. Verifies the diff satisfies each criterion and that CI is green",
|
|
5896
|
+
"6. **Enables squash auto-merge** (with `--delete-branch`) when all",
|
|
5897
|
+
" checks pass **and** the review mode is `auto-merge`",
|
|
5898
|
+
"7. **Applies `review:awaiting-human`** and hands off to a human",
|
|
5899
|
+
" reviewer when the review mode is `human-required` (no auto-merge,",
|
|
5900
|
+
" even if every acceptance criterion is met)",
|
|
5901
|
+
"8. **Comments with grouped findings** when any check fails (plain",
|
|
5651
5902
|
" `gh pr comment`, not a formal `--request-changes` review)",
|
|
5652
|
-
"
|
|
5903
|
+
"9. After a successful merge, verifies the linked issue is closed",
|
|
5653
5904
|
" and closes it explicitly if the merge commit did not",
|
|
5654
|
-
"
|
|
5905
|
+
"10. Cleans up the local branch after merge",
|
|
5655
5906
|
"",
|
|
5656
5907
|
"The reviewer **never** implements code and **never** pushes commits",
|
|
5657
5908
|
"to a PR's branch \u2014 it only reviews, decides, and orchestrates merge",
|