@codedrifters/configulator 0.0.350 → 0.0.352
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.d.mts +181 -15
- package/lib/index.d.ts +181 -15
- package/lib/index.js +433 -18
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +433 -18
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -11863,7 +11863,7 @@ function buildMeetingAnalystSubAgent(tier) {
|
|
|
11863
11863
|
"| `planning` | Sprint/plan updates, task issues, requirement drafts | Extract every task assignment. Phase 4 updates the active sprint-plan doc directly and creates one issue per assigned task. |",
|
|
11864
11864
|
"| `review` | Retro notes, follow-up issues, status updates, requirement revisions | Mark completed tasks in the active sprint-plan doc. Capture retrospective learnings inside the meeting notes \u2014 do not spawn a separate retro document. |",
|
|
11865
11865
|
"| `brainstorm` | Future-feature candidates, research topics, very few Firm decisions | Lower the bar for Open Questions. Do **not** create requirement or ADR issues from brainstorm output unless the item is explicitly marked **Firm**. Prefer research/discovery issues for promising ideas. |",
|
|
11866
|
-
"| `standup` | Action items, blockers, status updates | Do not produce requirement, ADR, or BDR drafts. Phase 3 (Draft) is almost always skipped.
|
|
11866
|
+
"| `standup` | Action items, blockers, status updates | Do not produce requirement, ADR, or BDR drafts. Phase 3 (Draft) is almost always skipped. Capture action items in the notes `## Action Items` table; file issues only for agent-workable doc deliverables (per the **Action-item filing policy**) and apply sprint-plan status updates. |",
|
|
11867
11867
|
"| `external` | Customer/competitive intel, people/company profiles, lead capture | Default every attendee outside the team into **People of Interest**. Default every organization mentioned into **Companies of Interest** (signal threshold still applies). Capture stated customer pain points as candidate **BR** (business requirements), not FR. |",
|
|
11868
11868
|
"| `other` | General meeting extraction | Apply the default workflow with no type-specific overrides. |",
|
|
11869
11869
|
"",
|
|
@@ -11925,6 +11925,61 @@ function buildMeetingAnalystSubAgent(tier) {
|
|
|
11925
11925
|
"",
|
|
11926
11926
|
"---",
|
|
11927
11927
|
"",
|
|
11928
|
+
"## Action-item filing policy",
|
|
11929
|
+
"",
|
|
11930
|
+
"Not every action item should become a GitHub issue. The pipeline",
|
|
11931
|
+
"can only ever close issues whose deliverable an automated agent",
|
|
11932
|
+
"(or this repo's existing channels) can produce. Filing an issue",
|
|
11933
|
+
"for a task only a human can do \u2014 in the real world or in a system",
|
|
11934
|
+
"this pipeline cannot touch \u2014 creates queue noise that no worker or",
|
|
11935
|
+
"orchestrator can ever resolve. Apply the **agent-workability",
|
|
11936
|
+
"test** below in phases 1, 3, and 4.",
|
|
11937
|
+
"",
|
|
11938
|
+
"### Agent-workability test",
|
|
11939
|
+
"",
|
|
11940
|
+
"An action item is **agent-workable** only when completing it",
|
|
11941
|
+
"produces a documentation deliverable an automated agent can author",
|
|
11942
|
+
"in this repo's docs tree \u2014 a requirement document, an ADR, a docs",
|
|
11943
|
+
"page, a BCM capability model, a research note, or a roadmap /",
|
|
11944
|
+
"product-doc update. Route agent-workable items through their",
|
|
11945
|
+
"**dedicated downstream channel** (`req:write`, `docs:write`,",
|
|
11946
|
+
"`bcm:*`, `research:scope`, roadmap/product-doc follow-up). Never",
|
|
11947
|
+
"file them as a generic `action-item` / `type:chore` issue.",
|
|
11948
|
+
"",
|
|
11949
|
+
"An action item is **human-owned** when it requires a person to act",
|
|
11950
|
+
"in the real world or in a system this pipeline cannot reach.",
|
|
11951
|
+
"Typical cues:",
|
|
11952
|
+
"",
|
|
11953
|
+
'- **send / email / schedule / invite / call** \u2014 e.g. "send out',
|
|
11954
|
+
` company invoices", "invite X to next week's call".`,
|
|
11955
|
+
'- **install / configure / provision / set up** \u2014 e.g. "install and',
|
|
11956
|
+
' configure Claude", "get codebase read access".',
|
|
11957
|
+
"- **decide / approve / choose / prioritise** (a human judgement",
|
|
11958
|
+
" call, not a documented decision record).",
|
|
11959
|
+
'- **communicate / notify / give a heads-up** \u2014 e.g. "give Dr. Y a',
|
|
11960
|
+
' heads-up".',
|
|
11961
|
+
"- **get / request access or credentials**, **pay / invoice**.",
|
|
11962
|
+
"- **build or change code in another repo**, **design in an",
|
|
11963
|
+
" external tool** (Figma, etc.).",
|
|
11964
|
+
"",
|
|
11965
|
+
"Record human-owned items **only** in the notes `## Action Items`",
|
|
11966
|
+
"table (who / what / when) \u2014 that table is the **system of record**",
|
|
11967
|
+
"for human follow-ups. Do **not** file a GitHub issue for them.",
|
|
11968
|
+
"",
|
|
11969
|
+
"When an item is ambiguous, default to **human-owned**",
|
|
11970
|
+
"(notes-only): a missed issue is cheaper than queue noise the",
|
|
11971
|
+
"pipeline can never close.",
|
|
11972
|
+
"",
|
|
11973
|
+
"**Consumer tuning.** When the project supplies",
|
|
11974
|
+
"`AgentConfigOptions.meetings.actionItemFiling`, an",
|
|
11975
|
+
"**Action-item filing policy** subsection is rendered into the",
|
|
11976
|
+
"meetings taxonomy with any extra human-owned / agent-workable cues",
|
|
11977
|
+
"and a note when the split is disabled. Apply those overrides on",
|
|
11978
|
+
"top of the built-in cues above; if the split is disabled, fall",
|
|
11979
|
+
"back to filing a follow-up issue for every non-draft action item.",
|
|
11980
|
+
"",
|
|
11981
|
+
"---",
|
|
11982
|
+
"",
|
|
11928
11983
|
...PROJECT_CONTEXT_MAINTAINER_SECTION,
|
|
11929
11984
|
"## Traceability",
|
|
11930
11985
|
"",
|
|
@@ -11956,7 +12011,7 @@ function buildMeetingAnalystSubAgent(tier) {
|
|
|
11956
12011
|
"",
|
|
11957
12012
|
" | Artifact | Type | Issue/Path |",
|
|
11958
12013
|
" |----------|------|------------|",
|
|
11959
|
-
" | <title> | requirement / ADR /
|
|
12014
|
+
" | <title> | requirement / ADR / docs / profile / research | #<N> or <path> |",
|
|
11960
12015
|
" ```",
|
|
11961
12016
|
"",
|
|
11962
12017
|
"2. **Update the meeting notes** with a similar `## Related Issues` section",
|
|
@@ -12021,7 +12076,7 @@ function buildMeetingAnalystSubAgent(tier) {
|
|
|
12021
12076
|
` | **Decisions** | "We decided...", "Let's go with...", explicit choices |`,
|
|
12022
12077
|
' | **Requirements** | Feature descriptions, acceptance criteria, "it should..." |',
|
|
12023
12078
|
" | **Technology discussions** | Platform comparisons, architecture options, tool evaluations |",
|
|
12024
|
-
' | **Action items** | "[Person] will...", "Next step is...", assigned tasks |',
|
|
12079
|
+
' | **Action items** | "[Person] will...", "Next step is...", assigned tasks. Tag each with its **disposition** (`agent-workable` vs `human-owned`) per the **Action-item filing policy**. |',
|
|
12025
12080
|
' | **Open questions** | "We need to figure out...", unresolved debates |',
|
|
12026
12081
|
" | **People of interest** | Industry contacts, domain experts mentioned |",
|
|
12027
12082
|
" | **Companies of interest** | Competitors, vendors, partners discussed |",
|
|
@@ -12036,7 +12091,10 @@ function buildMeetingAnalystSubAgent(tier) {
|
|
|
12036
12091
|
" - Decisions Made (with category and confidence: Firm / Tentative / Needs confirmation)",
|
|
12037
12092
|
" - Requirements Identified (with category and priority estimate)",
|
|
12038
12093
|
" - Technology Discussions (with status: Decided / Leaning toward / Open)",
|
|
12039
|
-
" - Action Items (with assignee and due date if stated
|
|
12094
|
+
" - Action Items (with assignee and due date if stated, and a",
|
|
12095
|
+
" **disposition** tag \u2014 `agent-workable` or `human-owned` \u2014 per",
|
|
12096
|
+
" the **Action-item filing policy** so Phase 4 can route each",
|
|
12097
|
+
" item without re-classifying it)",
|
|
12040
12098
|
" - Open Questions",
|
|
12041
12099
|
" - People of Interest (with context and whether a profile exists)",
|
|
12042
12100
|
" - Companies of Interest (with type and context)",
|
|
@@ -12166,7 +12224,11 @@ function buildMeetingAnalystSubAgent(tier) {
|
|
|
12166
12224
|
" - Agenda / topics covered",
|
|
12167
12225
|
" - Key Discussion Points (organized by topic)",
|
|
12168
12226
|
" - Decisions (numbered, with rationale)",
|
|
12169
|
-
" - Action Items (table: who, what, when)",
|
|
12227
|
+
" - Action Items (table: who, what, when). This table is the",
|
|
12228
|
+
" **system of record for human follow-ups** \u2014 human-owned",
|
|
12229
|
+
" action items live here and are never filed as GitHub issues",
|
|
12230
|
+
" (see the **Action-item filing policy**). Capture every",
|
|
12231
|
+
" action item here regardless of disposition.",
|
|
12170
12232
|
" - Open Questions",
|
|
12171
12233
|
" - Follow-up items",
|
|
12172
12234
|
"4. **Plan the `notes/` tree index update \u2014 do not commit it",
|
|
@@ -12214,6 +12276,11 @@ function buildMeetingAnalystSubAgent(tier) {
|
|
|
12214
12276
|
"This phase only exists if the extraction identified requirements, architectural",
|
|
12215
12277
|
"decisions, or strategy changes. If this issue exists, execute it.",
|
|
12216
12278
|
"",
|
|
12279
|
+
"Draft proposals only for **agent-workable** deliverables (per the",
|
|
12280
|
+
"**Action-item filing policy**). Action items tagged `human-owned`",
|
|
12281
|
+
"in the extraction are not drafted here \u2014 they stay in the notes",
|
|
12282
|
+
"`## Action Items` table and produce no follow-up issue.",
|
|
12283
|
+
"",
|
|
12217
12284
|
"### Steps",
|
|
12218
12285
|
"",
|
|
12219
12286
|
"1. Read the extraction file from Phase 1 at",
|
|
@@ -12253,8 +12320,27 @@ function buildMeetingAnalystSubAgent(tier) {
|
|
|
12253
12320
|
" gated by areas.",
|
|
12254
12321
|
"3. Create ADR issues if technology decisions need formal records.",
|
|
12255
12322
|
" Include a `## Traceability` section in each. Not gated by areas.",
|
|
12256
|
-
"4.
|
|
12257
|
-
"
|
|
12323
|
+
"4. **Route action items per the Action-item filing policy \u2014 do",
|
|
12324
|
+
" not file a generic `action-item` issue per task.** Read each",
|
|
12325
|
+
" action item's `disposition` tag from the extraction (re-apply",
|
|
12326
|
+
" the **agent-workability test** if the tag is missing):",
|
|
12327
|
+
" - **Agent-workable** (yields a doc deliverable an agent can",
|
|
12328
|
+
" author): file it through its **dedicated downstream channel**",
|
|
12329
|
+
" \u2014 a `req:write` issue for a requirement, a `docs:write` issue",
|
|
12330
|
+
" for a docs page, `bcm:*` for a capability model, a",
|
|
12331
|
+
" `research:scope` issue for a research note, or a roadmap /",
|
|
12332
|
+
" product-doc follow-up. Use the matching template from the",
|
|
12333
|
+
" issue-templates page; include a `## Traceability` section.",
|
|
12334
|
+
" Issue creation is not gated by areas.",
|
|
12335
|
+
" - **Human-owned** (send/schedule/install/decide/communicate/",
|
|
12336
|
+
" get-access/build-elsewhere): record it **only** in the notes",
|
|
12337
|
+
" `## Action Items` table (step 8 already carries the table",
|
|
12338
|
+
" forward). **File no GitHub issue.** When ambiguous, treat the",
|
|
12339
|
+
" item as human-owned.",
|
|
12340
|
+
" If the project disabled the split via",
|
|
12341
|
+
" `meetings.actionItemFiling.enabled: false`, fall back to filing",
|
|
12342
|
+
" a follow-up issue for every action item not already covered by",
|
|
12343
|
+
" a Phase 3 draft.",
|
|
12258
12344
|
"5. Cross-reference the meeting in any existing documents that were",
|
|
12259
12345
|
" discussed **and that live under an in-scope `docRoot`**. For",
|
|
12260
12346
|
" discussed documents under an out-of-scope `docRoot`, open a",
|
|
@@ -12291,7 +12377,10 @@ function buildMeetingAnalystSubAgent(tier) {
|
|
|
12291
12377
|
"- Use `gh` CLI for all GitHub operations",
|
|
12292
12378
|
"- Apply the appropriate `meeting:*` phase label to each phase issue",
|
|
12293
12379
|
"- Use `type:docs` for documentation-producing issues, `type:chore` for",
|
|
12294
|
-
" maintenance/organizational tasks",
|
|
12380
|
+
" maintenance/organizational tasks the pipeline can action",
|
|
12381
|
+
"- Do **not** file issues for human-owned action items \u2014 per the",
|
|
12382
|
+
" **Action-item filing policy** they live only in the notes",
|
|
12383
|
+
" `## Action Items` table",
|
|
12295
12384
|
"- Use `status:` labels to track progress (`status:ready`, `status:in-progress`, `status:done`)",
|
|
12296
12385
|
"- Reference the source meeting transcript in all created issues",
|
|
12297
12386
|
"- Link phase issues with `Depends on: #N` to enforce ordering",
|
|
@@ -12362,7 +12451,10 @@ var processMeetingSkill = {
|
|
|
12362
12451
|
"1. Resolve the basename, partition, and any sibling files using",
|
|
12363
12452
|
" the **Basename-pairing algorithm** above",
|
|
12364
12453
|
"2. Execute Phase 1 (Extract) \u2014 categorize the available content into",
|
|
12365
|
-
" decisions, requirements, action items, open questions, and more",
|
|
12454
|
+
" decisions, requirements, action items, open questions, and more.",
|
|
12455
|
+
" Tag each action item's disposition (`agent-workable` vs",
|
|
12456
|
+
" `human-owned`) per the agent's **Action-item filing policy** so",
|
|
12457
|
+
" Phase 4 keeps human-owned tasks out of the issue queue",
|
|
12366
12458
|
"3. Write the extraction to",
|
|
12367
12459
|
" `<meetingsRoot>/insights/{type}/<basename>.md`",
|
|
12368
12460
|
"4. Create downstream phase issues using `gh issue create`:",
|
|
@@ -12432,7 +12524,18 @@ function buildMeetingAnalysisBundle(tier = AGENT_MODEL.BALANCED) {
|
|
|
12432
12524
|
"direct edits to the doc-root sub-folders declared in the project's",
|
|
12433
12525
|
"**Area \u2192 doc-root mapping** table. When both fields are absent",
|
|
12434
12526
|
"the pipeline falls back to the default workflow (kind `other`,",
|
|
12435
|
-
"no area gating)."
|
|
12527
|
+
"no area gating).",
|
|
12528
|
+
"",
|
|
12529
|
+
"Phase 4 applies an **agent-workability split** to action items:",
|
|
12530
|
+
"items that yield a documentation deliverable an agent can author",
|
|
12531
|
+
"are filed through their dedicated downstream channel",
|
|
12532
|
+
"(`req:write`, `docs:write`, `bcm:*`, `research:scope`, roadmap",
|
|
12533
|
+
"follow-up); human-owned tasks (send / schedule / install /",
|
|
12534
|
+
"decide / communicate / get-access / build-elsewhere) are",
|
|
12535
|
+
"recorded **only** in the notes `## Action Items` table, which is",
|
|
12536
|
+
"the **system of record for human follow-ups** \u2014 no GitHub issue",
|
|
12537
|
+
"is filed for them. Consumers tune or disable the split via",
|
|
12538
|
+
"`AgentConfigOptions.meetings.actionItemFiling`."
|
|
12436
12539
|
].join("\n"),
|
|
12437
12540
|
platforms: {
|
|
12438
12541
|
cursor: { exclude: true }
|
|
@@ -13577,6 +13680,9 @@ var DEFAULT_BUNDLE_OVERRIDES = {
|
|
|
13577
13680
|
"regulatory:research": {
|
|
13578
13681
|
acceptanceCriteria: { smallMax: 3, mediumMax: 10 }
|
|
13579
13682
|
},
|
|
13683
|
+
"standards:research": {
|
|
13684
|
+
acceptanceCriteria: { smallMax: 3, mediumMax: 10 }
|
|
13685
|
+
},
|
|
13580
13686
|
"software:map": {
|
|
13581
13687
|
acceptanceCriteria: { smallMax: 3, mediumMax: 12 },
|
|
13582
13688
|
sources: { smallMax: 2, mediumMax: 15 }
|
|
@@ -13790,6 +13896,31 @@ function renderScopeGateSection(gate, excludeBundles = []) {
|
|
|
13790
13896
|
"alphabetical order on the label name** \u2014 first-wins, deterministic."
|
|
13791
13897
|
);
|
|
13792
13898
|
}
|
|
13899
|
+
lines.push(
|
|
13900
|
+
"",
|
|
13901
|
+
"### Reconfiguring the thresholds",
|
|
13902
|
+
"",
|
|
13903
|
+
"Every threshold above is configurable per repo \u2014 the global",
|
|
13904
|
+
"`acceptance-criteria` / `sources` classification bands and each",
|
|
13905
|
+
"per-phase-label override. Retune them in the project's",
|
|
13906
|
+
"configulator config so the gate fits this repo's issue shapes:",
|
|
13907
|
+
"",
|
|
13908
|
+
"- `AgentConfigOptions.scopeGate.acceptanceCriteria` /",
|
|
13909
|
+
" `AgentConfigOptions.scopeGate.sources` \u2014 the global",
|
|
13910
|
+
" `smallMax` / `mediumMax` bands applied to every issue.",
|
|
13911
|
+
"- `AgentConfigOptions.scopeGate.bundleOverrides.<phase-label>` \u2014",
|
|
13912
|
+
" a per-phase-label override for **any** phase label, not just",
|
|
13913
|
+
" the ones shipped above. The map deep-merges with the shipped",
|
|
13914
|
+
" defaults (consumer-wins-per-key): add a key to raise a new",
|
|
13915
|
+
" label's AC / sources ceiling, set an existing key to replace a",
|
|
13916
|
+
" shipped default, or set a key to `undefined` to drop a shipped",
|
|
13917
|
+
" default and classify that label against the global bands.",
|
|
13918
|
+
"",
|
|
13919
|
+
"Each override entry's `acceptanceCriteria` and `sources` axes are",
|
|
13920
|
+
"independent \u2014 override one and the other falls through to the",
|
|
13921
|
+
"global band. Malformed thresholds (negative, non-integer, or",
|
|
13922
|
+
"`mediumMax <= smallMax`) fail the build at synth time."
|
|
13923
|
+
);
|
|
13793
13924
|
lines.push(
|
|
13794
13925
|
"",
|
|
13795
13926
|
"### Decomposition-proposal template",
|
|
@@ -17445,12 +17576,18 @@ var pnpmBundle = {
|
|
|
17445
17576
|
var DEFAULT_PATHS_EXEMPT_FROM_SIZE = [
|
|
17446
17577
|
"docs/**"
|
|
17447
17578
|
];
|
|
17579
|
+
var DEFAULT_REQUIRED_WORKFLOWS = [];
|
|
17448
17580
|
function resolvePrReviewPolicy(config) {
|
|
17449
17581
|
const pathsExemptFromSize = config?.autoMerge?.pathsExemptFromSize ?? DEFAULT_PATHS_EXEMPT_FROM_SIZE;
|
|
17582
|
+
const requiredWorkflows = config?.ciVerification?.requiredWorkflows ?? DEFAULT_REQUIRED_WORKFLOWS;
|
|
17450
17583
|
assertValidPathsExemptFromSize(pathsExemptFromSize);
|
|
17584
|
+
assertValidRequiredWorkflows(requiredWorkflows);
|
|
17451
17585
|
return {
|
|
17452
17586
|
autoMerge: {
|
|
17453
17587
|
pathsExemptFromSize: [...pathsExemptFromSize]
|
|
17588
|
+
},
|
|
17589
|
+
ciVerification: {
|
|
17590
|
+
requiredWorkflows: [...requiredWorkflows]
|
|
17454
17591
|
}
|
|
17455
17592
|
};
|
|
17456
17593
|
}
|
|
@@ -17466,6 +17603,15 @@ function assertValidPathsExemptFromSize(paths) {
|
|
|
17466
17603
|
}
|
|
17467
17604
|
}
|
|
17468
17605
|
}
|
|
17606
|
+
function assertValidRequiredWorkflows(workflows) {
|
|
17607
|
+
for (const workflow of workflows) {
|
|
17608
|
+
if (typeof workflow !== "string" || workflow.trim().length === 0) {
|
|
17609
|
+
throw new Error(
|
|
17610
|
+
"prReviewPolicy.ciVerification.requiredWorkflows entries must be non-empty strings"
|
|
17611
|
+
);
|
|
17612
|
+
}
|
|
17613
|
+
}
|
|
17614
|
+
}
|
|
17469
17615
|
|
|
17470
17616
|
// src/agent/bundles/pr-review.ts
|
|
17471
17617
|
var prReviewerSubAgent = {
|
|
@@ -17507,6 +17653,125 @@ var prReviewerSubAgent = {
|
|
|
17507
17653
|
"",
|
|
17508
17654
|
"---",
|
|
17509
17655
|
"",
|
|
17656
|
+
"## CI Verification (primary read + Actions-runs fallback)",
|
|
17657
|
+
"",
|
|
17658
|
+
"Every CI-status decision in this agent \u2014 the Phase 1.5 eligibility",
|
|
17659
|
+
"filter, the Phase 3 checklist, the Phase 4 merge gate, the Phase 4",
|
|
17660
|
+
"step (h) re-enable condition, and the Phase 4.5 sticky `CI status`",
|
|
17661
|
+
"field \u2014 resolves CI through the procedure below. It yields one of",
|
|
17662
|
+
"three verdicts: **green** (every required check succeeded),",
|
|
17663
|
+
"**pending** (no failures, but at least one required check is still",
|
|
17664
|
+
"running or queued), or **red** (at least one required check",
|
|
17665
|
+
"failed). Never enable auto-merge unless the verdict is **green**.",
|
|
17666
|
+
"",
|
|
17667
|
+
"### Step 1: Primary read \u2014 check-runs / statusCheckRollup",
|
|
17668
|
+
"",
|
|
17669
|
+
"Read CI from the GitHub check-runs rollup, the canonical source",
|
|
17670
|
+
"GitHub itself uses to gate branch protection:",
|
|
17671
|
+
"",
|
|
17672
|
+
"```bash",
|
|
17673
|
+
"gh pr checks <pr-number>",
|
|
17674
|
+
"# equivalently, the rollup field:",
|
|
17675
|
+
"gh pr view <pr-number> --json statusCheckRollup",
|
|
17676
|
+
"```",
|
|
17677
|
+
"",
|
|
17678
|
+
"This read aggregates **every** check context \u2014 GitHub Actions,",
|
|
17679
|
+
"third-party CI, GitHub Apps, and commit statuses. When it returns",
|
|
17680
|
+
"one or more readable contexts, it is authoritative: map each",
|
|
17681
|
+
"required context's conclusion with the table in Step 4 and do",
|
|
17682
|
+
"**not** fall back. It is strictly more complete than the",
|
|
17683
|
+
"Actions-runs view in Step 3.",
|
|
17684
|
+
"",
|
|
17685
|
+
"### Step 2: Detect the fine-grained-PAT 403",
|
|
17686
|
+
"",
|
|
17687
|
+
"The primary read fails closed for one specific credential: a",
|
|
17688
|
+
"**fine-grained personal access token**. GitHub exposes no `Checks`",
|
|
17689
|
+
"permission for fine-grained PATs (it is GitHub-App-only), so the",
|
|
17690
|
+
"check-runs / `statusCheckRollup` request returns:",
|
|
17691
|
+
"",
|
|
17692
|
+
"```",
|
|
17693
|
+
"HTTP 403: Resource not accessible by personal access token",
|
|
17694
|
+
"```",
|
|
17695
|
+
"",
|
|
17696
|
+
"Trigger the Step 3 fallback **only** when the primary read either:",
|
|
17697
|
+
"",
|
|
17698
|
+
"- returns an explicit **403** (`Resource not accessible by personal",
|
|
17699
|
+
" access token`) on the check-runs / `statusCheckRollup` request,",
|
|
17700
|
+
" **or**",
|
|
17701
|
+
"- returns **no readable check contexts at all** (an empty rollup)",
|
|
17702
|
+
" for a head SHA that does have CI configured.",
|
|
17703
|
+
"",
|
|
17704
|
+
"A primary read that returns one or more readable contexts is",
|
|
17705
|
+
"authoritative \u2014 **never** fall back in that case (GitHub-App and",
|
|
17706
|
+
"classic-PAT consumers keep the complete check-runs view). **Never**",
|
|
17707
|
+
"treat a 403 or an unreadable check as green: the 403 is a",
|
|
17708
|
+
"visibility failure, not a passing signal.",
|
|
17709
|
+
"",
|
|
17710
|
+
"### Step 3: Fallback read \u2014 Actions runs API",
|
|
17711
|
+
"",
|
|
17712
|
+
"A fine-grained PAT with `Actions: Read-only` (which **is**",
|
|
17713
|
+
"grantable) can read workflow-run conclusions even when check-runs",
|
|
17714
|
+
"is denied. Read every workflow run for the PR's head SHA:",
|
|
17715
|
+
"",
|
|
17716
|
+
"```bash",
|
|
17717
|
+
"head_sha=$(gh pr view <pr-number> --json headRefOid --jq '.headRefOid')",
|
|
17718
|
+
'gh api "repos/{{repository.owner}}/{{repository.name}}/actions/runs?head_sha=${head_sha}&per_page=100"',
|
|
17719
|
+
"```",
|
|
17720
|
+
"",
|
|
17721
|
+
"Each run carries a `name`, `status`, and `conclusion`. **Collapse",
|
|
17722
|
+
"re-runs:** when a workflow `name` appears more than once for the",
|
|
17723
|
+
"same head SHA, keep only the most recent run (highest",
|
|
17724
|
+
"`run_number` / latest `created_at`) for that name.",
|
|
17725
|
+
"",
|
|
17726
|
+
"This fallback only sees GitHub Actions runs. It is sound for repos",
|
|
17727
|
+
"whose CI is entirely GitHub Actions; if a consumer adds a",
|
|
17728
|
+
"non-Actions required check, a fine-grained-PAT credential cannot",
|
|
17729
|
+
"see it and the consumer must move the reviewer to a GitHub App /",
|
|
17730
|
+
"classic PAT to regain the complete check-runs view.",
|
|
17731
|
+
"",
|
|
17732
|
+
"### Step 4: Map conclusions to a verdict",
|
|
17733
|
+
"",
|
|
17734
|
+
"Apply this mapping to the set of required checks (Step 5 defines",
|
|
17735
|
+
'"required"):',
|
|
17736
|
+
"",
|
|
17737
|
+
"| status / conclusion | Treatment |",
|
|
17738
|
+
"|---------------------|-----------|",
|
|
17739
|
+
"| `completed` / `success` | pass |",
|
|
17740
|
+
"| `completed` / `skipped` | non-blocking (ignore) |",
|
|
17741
|
+
"| `completed` / `neutral` | non-blocking (ignore) |",
|
|
17742
|
+
"| `completed` / `failure` | **block \u2192 red** |",
|
|
17743
|
+
"| `completed` / `cancelled` | **block \u2192 red** |",
|
|
17744
|
+
"| `completed` / `timed_out` | **block \u2192 red** |",
|
|
17745
|
+
"| `completed` / `action_required` | **block \u2192 red** |",
|
|
17746
|
+
"| `in_progress` / `queued` / `requested` / `waiting` / null conclusion | not-yet-green (pending) |",
|
|
17747
|
+
"",
|
|
17748
|
+
"- If any required check is **red**, the verdict is **red**.",
|
|
17749
|
+
"- Else if any required check is **pending**, the verdict is",
|
|
17750
|
+
" **pending**.",
|
|
17751
|
+
"- Else (every required check passed or was non-blocking) the",
|
|
17752
|
+
" verdict is **green**.",
|
|
17753
|
+
"",
|
|
17754
|
+
'### Step 5: Which workflows are "required"',
|
|
17755
|
+
"",
|
|
17756
|
+
'In the **Step 1 primary path**, "required" means the contexts',
|
|
17757
|
+
"GitHub marks required under branch protection \u2014 the rollup already",
|
|
17758
|
+
"reflects this.",
|
|
17759
|
+
"",
|
|
17760
|
+
"In the **Step 3 fallback path**, the Actions runs API does not say",
|
|
17761
|
+
"which workflows are required, so consult the policy's",
|
|
17762
|
+
"`ci-verification.required-workflows` list (rendered in the",
|
|
17763
|
+
"`PR Review Policy` block in CLAUDE.md):",
|
|
17764
|
+
"",
|
|
17765
|
+
"- **Non-empty list** \u2014 gate only on the workflow `name`s in the",
|
|
17766
|
+
" list. A listed workflow with **no** run for the head SHA is",
|
|
17767
|
+
" treated as not-yet-green (pending), never green.",
|
|
17768
|
+
"- **Empty list (default)** \u2014 treat **every** workflow run observed",
|
|
17769
|
+
" for the head SHA as required. This is the conservative",
|
|
17770
|
+
" zero-config default: an unknown failing workflow blocks rather",
|
|
17771
|
+
" than slips through.",
|
|
17772
|
+
"",
|
|
17773
|
+
"---",
|
|
17774
|
+
"",
|
|
17510
17775
|
"## Phase 1: Identify the PR",
|
|
17511
17776
|
"",
|
|
17512
17777
|
"If a PR number was provided in your instructions, use that. Otherwise stop",
|
|
@@ -17525,7 +17790,12 @@ var prReviewerSubAgent = {
|
|
|
17525
17790
|
'1. `mergeable == "MERGEABLE"` (no merge conflicts).',
|
|
17526
17791
|
"2. No **failing** required checks in `statusCheckRollup` \u2014 CI must be",
|
|
17527
17792
|
" green or still pending. Any `FAILURE`, `TIMED_OUT`, `CANCELLED`, or",
|
|
17528
|
-
" `ERROR` conclusion on a required check disqualifies the PR.",
|
|
17793
|
+
" `ERROR` conclusion on a required check disqualifies the PR. If the",
|
|
17794
|
+
" `statusCheckRollup` read returns a 403 `Resource not accessible by",
|
|
17795
|
+
" personal access token` (fine-grained PAT) or an empty rollup,",
|
|
17796
|
+
" resolve CI via the **CI Verification** section's Actions-runs",
|
|
17797
|
+
" fallback before deciding eligibility \u2014 do **not** treat the 403 as",
|
|
17798
|
+
" either a pass or an automatic disqualification.",
|
|
17529
17799
|
"3. The PR body contains a linked issue via one of the closing keywords:",
|
|
17530
17800
|
" `Closes #N`, `Fixes #N`, or `Resolves #N` (case-insensitive).",
|
|
17531
17801
|
"",
|
|
@@ -17743,7 +18013,9 @@ var prReviewerSubAgent = {
|
|
|
17743
18013
|
"- **Convention compliance** \u2014 PR title uses a conventional commit prefix,",
|
|
17744
18014
|
" body includes a closing keyword, branch name follows project conventions",
|
|
17745
18015
|
"- **Test coverage** \u2014 new or changed behavior has tests",
|
|
17746
|
-
"- **CI status** \u2014
|
|
18016
|
+
"- **CI status** \u2014 resolve CI via the **CI Verification** section",
|
|
18017
|
+
" (primary check-runs read, with the Actions-runs fallback on a",
|
|
18018
|
+
" fine-grained-PAT 403). The verdict must be **green**.",
|
|
17747
18019
|
"- **Scope creep** \u2014 diff stays within the issue's stated scope",
|
|
17748
18020
|
"",
|
|
17749
18021
|
"## Phase 3.5: Classify Comments",
|
|
@@ -18118,7 +18390,9 @@ var prReviewerSubAgent = {
|
|
|
18118
18390
|
" pushbacks added in step (a) and the failure pushbacks added in",
|
|
18119
18391
|
" step (f).",
|
|
18120
18392
|
"4. CI is green or still pending (any failing required check",
|
|
18121
|
-
" disqualifies re-enablement).",
|
|
18393
|
+
" disqualifies re-enablement). Resolve CI via the **CI",
|
|
18394
|
+
" Verification** section, including the Actions-runs fallback on a",
|
|
18395
|
+
" fine-grained-PAT 403.",
|
|
18122
18396
|
"",
|
|
18123
18397
|
"When all four hold, re-enable auto-merge with the same command used",
|
|
18124
18398
|
"in the auto-merge branch below:",
|
|
@@ -18517,7 +18791,9 @@ var prReviewerSubAgent = {
|
|
|
18517
18791
|
"- **AC status** \u2014 the checklist produced in Phase 3 (met, partial,",
|
|
18518
18792
|
" or missing), with links to the files or tests that provide the",
|
|
18519
18793
|
" evidence.",
|
|
18520
|
-
"- **CI status** \u2014
|
|
18794
|
+
"- **CI status** \u2014 the verdict from the **CI Verification** section",
|
|
18795
|
+
" (primary check-runs read, or the Actions-runs fallback when",
|
|
18796
|
+
" check-runs returns a fine-grained-PAT 403).",
|
|
18521
18797
|
"- **Outstanding** \u2014 the comments still carrying a non-terminal",
|
|
18522
18798
|
" reviewer reaction from Phase 3.5 (typically `eyes` for queued",
|
|
18523
18799
|
" in-scope items and `nit` / `question` items that remain open).",
|
|
@@ -18642,7 +18918,11 @@ var prReviewerSubAgent = {
|
|
|
18642
18918
|
"2. **Never merge without a linked issue.** If the PR body has no",
|
|
18643
18919
|
" `Closes #N` / `Fixes #N` / `Resolves #N`, comment and stop.",
|
|
18644
18920
|
"3. **Never merge with failing CI.** Even if every criterion is met,",
|
|
18645
|
-
" block on red checks.",
|
|
18921
|
+
" block on red checks. Resolve CI status via the **CI",
|
|
18922
|
+
" Verification** section: read check-runs first, and only on a",
|
|
18923
|
+
" fine-grained-PAT 403 (or an empty rollup) fall back to the",
|
|
18924
|
+
" Actions runs API. A 403 is a visibility failure, **never** a",
|
|
18925
|
+
" passing check \u2014 do not treat an unreadable check as green.",
|
|
18646
18926
|
"4. **Never bypass review conventions.** Always use `--squash`, `--auto`,",
|
|
18647
18927
|
" and `--delete-branch` for merges. Do not force-merge.",
|
|
18648
18928
|
"5. **Never auto-merge a `human-required` PR.** When Phase 2.75 resolves",
|
|
@@ -18824,7 +19104,10 @@ var reviewPrsSkill = {
|
|
|
18824
19104
|
'2. `mergeable == "MERGEABLE"` (no conflicts).',
|
|
18825
19105
|
"3. No required check in `statusCheckRollup` has a failing conclusion",
|
|
18826
19106
|
" (`FAILURE`, `TIMED_OUT`, `CANCELLED`, `ERROR`). CI green or still",
|
|
18827
|
-
" pending is fine.",
|
|
19107
|
+
" pending is fine. When `statusCheckRollup` is empty or denied with",
|
|
19108
|
+
" a fine-grained-PAT 403, keep the PR in the queue \u2014 the per-PR",
|
|
19109
|
+
" pipeline resolves CI authoritatively via the reviewer's CI",
|
|
19110
|
+
" Verification Actions-runs fallback.",
|
|
18828
19111
|
"4. The PR body contains a linked issue (`Closes #N` / `Fixes #N` /",
|
|
18829
19112
|
" `Resolves #N`, case-insensitive).",
|
|
18830
19113
|
"",
|
|
@@ -18943,6 +19226,12 @@ function buildPrReviewBundle(policy = resolvePrReviewPolicy()) {
|
|
|
18943
19226
|
...renderPathsExemptFromSizeYaml(
|
|
18944
19227
|
policy.autoMerge.pathsExemptFromSize
|
|
18945
19228
|
),
|
|
19229
|
+
"",
|
|
19230
|
+
"ci-verification:",
|
|
19231
|
+
" required-workflows:",
|
|
19232
|
+
...renderRequiredWorkflowsYaml(
|
|
19233
|
+
policy.ciVerification.requiredWorkflows
|
|
19234
|
+
),
|
|
18946
19235
|
"```",
|
|
18947
19236
|
"",
|
|
18948
19237
|
"## Precedence",
|
|
@@ -19024,7 +19313,69 @@ function buildPrReviewBundle(policy = resolvePrReviewPolicy()) {
|
|
|
19024
19313
|
"out only kicks in for **code-heavy** PRs that legitimately trip",
|
|
19025
19314
|
"rule #6 (mixed-content diffs whose non-doc paths fail the",
|
|
19026
19315
|
"`paths-exempt-from-size` check, or consumers that disable the",
|
|
19027
|
-
"doc-only carve-out entirely)."
|
|
19316
|
+
"doc-only carve-out entirely).",
|
|
19317
|
+
"",
|
|
19318
|
+
"## CI Verification",
|
|
19319
|
+
"",
|
|
19320
|
+
"Before enabling auto-merge the reviewer confirms CI is green.",
|
|
19321
|
+
"The **primary** read is the GitHub check-runs rollup",
|
|
19322
|
+
"(`gh pr checks` / `statusCheckRollup`) \u2014 the same source",
|
|
19323
|
+
"GitHub uses for branch protection, covering **every** check",
|
|
19324
|
+
"context (Actions, third-party CI, GitHub Apps, commit",
|
|
19325
|
+
"statuses). It stays primary for every consumer because it is",
|
|
19326
|
+
"strictly more complete than the Actions-only fallback below.",
|
|
19327
|
+
"",
|
|
19328
|
+
"### Fine-grained-PAT fallback to the Actions runs API",
|
|
19329
|
+
"",
|
|
19330
|
+
"When the reviewer authenticates with a **fine-grained personal",
|
|
19331
|
+
"access token**, the check-runs read returns",
|
|
19332
|
+
"`HTTP 403: Resource not accessible by personal access token`.",
|
|
19333
|
+
"This is not grantable away: GitHub exposes **no `Checks`",
|
|
19334
|
+
"permission for fine-grained tokens** (it is GitHub-App-only),",
|
|
19335
|
+
"so the token permission picker has no entry to add. On that",
|
|
19336
|
+
"specific 403 (or when the rollup returns no readable contexts",
|
|
19337
|
+
"at all), the reviewer falls back to the **Actions runs API**:",
|
|
19338
|
+
"",
|
|
19339
|
+
"```",
|
|
19340
|
+
"GET /repos/{owner}/{repo}/actions/runs?head_sha={head_sha}&per_page=100",
|
|
19341
|
+
"```",
|
|
19342
|
+
"",
|
|
19343
|
+
"which a fine-grained PAT with `Actions: Read-only` **can**",
|
|
19344
|
+
"read. Auto-merge is then gated on the required workflows'",
|
|
19345
|
+
"latest run per workflow name concluding `success`",
|
|
19346
|
+
"(`skipped` / `neutral` are non-blocking; `failure` /",
|
|
19347
|
+
"`cancelled` / `timed_out` / `action_required` block; a run",
|
|
19348
|
+
"still `in_progress` / `queued`, or a required workflow with no",
|
|
19349
|
+
"run at all, counts as not-yet-green). The 403 is detected",
|
|
19350
|
+
"explicitly and is **never** treated as a passing check \u2014 it is",
|
|
19351
|
+
"a visibility failure, not a green signal.",
|
|
19352
|
+
"",
|
|
19353
|
+
"The fallback fires **only** when the primary check-runs read",
|
|
19354
|
+
"is denied, so GitHub-App and classic-PAT consumers (which can",
|
|
19355
|
+
"read check-runs) are unaffected and keep the complete view.",
|
|
19356
|
+
"The fallback only sees GitHub Actions runs; a consumer whose",
|
|
19357
|
+
"CI includes a non-Actions required check cannot verify it on a",
|
|
19358
|
+
"fine-grained PAT and must move the reviewer to a GitHub App /",
|
|
19359
|
+
"classic PAT to regain the complete check-runs view.",
|
|
19360
|
+
"",
|
|
19361
|
+
"### Configuring required workflows",
|
|
19362
|
+
"",
|
|
19363
|
+
"The `ci-verification.required-workflows` list in the policy",
|
|
19364
|
+
"YAML names the workflows the fallback gates on:",
|
|
19365
|
+
"",
|
|
19366
|
+
"- **Non-empty list** \u2014 gate only on those workflow `name`s.",
|
|
19367
|
+
" A listed workflow with no run for the head SHA is treated as",
|
|
19368
|
+
" not-yet-green (pending), never green.",
|
|
19369
|
+
"- **Empty list (the default)** \u2014 treat **every** workflow run",
|
|
19370
|
+
" observed for the head SHA as required. This is the",
|
|
19371
|
+
" conservative zero-config default so an unknown failing",
|
|
19372
|
+
" workflow blocks rather than slips through.",
|
|
19373
|
+
"",
|
|
19374
|
+
"Consumers tune the list via",
|
|
19375
|
+
"`agentConfig.prReviewPolicy.ciVerification.requiredWorkflows`.",
|
|
19376
|
+
"The list governs **only** the fallback path; the primary",
|
|
19377
|
+
'check-runs read derives "required" from branch protection',
|
|
19378
|
+
"directly."
|
|
19028
19379
|
].join("\n"),
|
|
19029
19380
|
tags: ["policy", "review"]
|
|
19030
19381
|
},
|
|
@@ -19310,6 +19661,12 @@ function renderPathsExemptFromSizeYaml(paths) {
|
|
|
19310
19661
|
}
|
|
19311
19662
|
return paths.map((path8) => ` - "${path8}"`);
|
|
19312
19663
|
}
|
|
19664
|
+
function renderRequiredWorkflowsYaml(workflows) {
|
|
19665
|
+
if (workflows.length === 0) {
|
|
19666
|
+
return [" []"];
|
|
19667
|
+
}
|
|
19668
|
+
return workflows.map((workflow) => ` - "${workflow}"`);
|
|
19669
|
+
}
|
|
19313
19670
|
var prReviewBundle = buildPrReviewBundle();
|
|
19314
19671
|
|
|
19315
19672
|
// src/agent/bundles/projen.ts
|
|
@@ -29749,13 +30106,20 @@ function renderFocusSection(focus) {
|
|
|
29749
30106
|
|
|
29750
30107
|
// src/agent/bundles/meeting-types.ts
|
|
29751
30108
|
var DEFAULT_AGENDA_TEMPLATE_ROOT = "<meetingsRoot>/_agenda-templates";
|
|
30109
|
+
function actionItemFilingHasOverride(filing) {
|
|
30110
|
+
if (!filing) {
|
|
30111
|
+
return false;
|
|
30112
|
+
}
|
|
30113
|
+
return filing.enabled === false || (filing.humanOwnedCues ?? []).length > 0 || (filing.agentWorkableCues ?? []).length > 0;
|
|
30114
|
+
}
|
|
29752
30115
|
function renderMeetingTypesSection(meetings) {
|
|
29753
30116
|
if (!meetings) {
|
|
29754
30117
|
return "";
|
|
29755
30118
|
}
|
|
29756
30119
|
const types = meetings.meetingTypes ?? [];
|
|
29757
30120
|
const areas = meetings.meetingAreas ?? [];
|
|
29758
|
-
|
|
30121
|
+
const filingOverride = actionItemFilingHasOverride(meetings.actionItemFiling) ? meetings.actionItemFiling : void 0;
|
|
30122
|
+
if (types.length === 0 && areas.length === 0 && !filingOverride) {
|
|
29759
30123
|
return "";
|
|
29760
30124
|
}
|
|
29761
30125
|
const sections = [];
|
|
@@ -29765,6 +30129,9 @@ function renderMeetingTypesSection(meetings) {
|
|
|
29765
30129
|
if (areas.length > 0) {
|
|
29766
30130
|
sections.push(renderMeetingAreas(areas));
|
|
29767
30131
|
}
|
|
30132
|
+
if (filingOverride) {
|
|
30133
|
+
sections.push(renderActionItemFiling(filingOverride));
|
|
30134
|
+
}
|
|
29768
30135
|
return sections.join("\n\n");
|
|
29769
30136
|
}
|
|
29770
30137
|
function renderMeetingTypes(types, agendaTemplateRoot) {
|
|
@@ -29818,6 +30185,54 @@ function renderMeetingAreas(areas) {
|
|
|
29818
30185
|
}
|
|
29819
30186
|
return lines.join("\n");
|
|
29820
30187
|
}
|
|
30188
|
+
function renderActionItemFiling(filing) {
|
|
30189
|
+
const lines = [
|
|
30190
|
+
"## Action-item filing policy",
|
|
30191
|
+
"",
|
|
30192
|
+
"This project tunes the Phase 4 (Link) agent-workability split",
|
|
30193
|
+
"through `AgentConfigOptions.meetings.actionItemFiling`. See the",
|
|
30194
|
+
"**Action-item filing policy** section of the `meeting-analyst`",
|
|
30195
|
+
"agent for the full baked-in test.",
|
|
30196
|
+
""
|
|
30197
|
+
];
|
|
30198
|
+
if (filing.enabled === false) {
|
|
30199
|
+
lines.push(
|
|
30200
|
+
"- **Split disabled.** Phase 4 falls back to the legacy behaviour:",
|
|
30201
|
+
" file a follow-up issue for every action item that is not",
|
|
30202
|
+
" already covered by a requirement or ADR draft, including",
|
|
30203
|
+
" human-owned tasks. The notes `## Action Items` table is still",
|
|
30204
|
+
" written, but it is no longer the sole record for human",
|
|
30205
|
+
" follow-ups."
|
|
30206
|
+
);
|
|
30207
|
+
} else {
|
|
30208
|
+
lines.push(
|
|
30209
|
+
"- **Split enabled** (default). Agent-workable doc deliverables are",
|
|
30210
|
+
" filed through their dedicated downstream channel; human-owned",
|
|
30211
|
+
" tasks are recorded only in the notes `## Action Items` table."
|
|
30212
|
+
);
|
|
30213
|
+
}
|
|
30214
|
+
const humanCues = filing.humanOwnedCues ?? [];
|
|
30215
|
+
if (humanCues.length > 0) {
|
|
30216
|
+
lines.push(
|
|
30217
|
+
"",
|
|
30218
|
+
"**Additional human-owned cues** (recorded notes-only, never",
|
|
30219
|
+
"filed), in addition to the bundle's built-in list:",
|
|
30220
|
+
"",
|
|
30221
|
+
...humanCues.map((cue) => `- ${cue}`)
|
|
30222
|
+
);
|
|
30223
|
+
}
|
|
30224
|
+
const agentCues = filing.agentWorkableCues ?? [];
|
|
30225
|
+
if (agentCues.length > 0) {
|
|
30226
|
+
lines.push(
|
|
30227
|
+
"",
|
|
30228
|
+
"**Additional agent-workable cues** (filed through the matching",
|
|
30229
|
+
"downstream channel), in addition to the bundle's built-in list:",
|
|
30230
|
+
"",
|
|
30231
|
+
...agentCues.map((cue) => `- ${cue}`)
|
|
30232
|
+
);
|
|
30233
|
+
}
|
|
30234
|
+
return lines.join("\n");
|
|
30235
|
+
}
|
|
29821
30236
|
|
|
29822
30237
|
// src/agent/bundles/priority-rules.ts
|
|
29823
30238
|
function renderPriorityRulesSection(rules) {
|