@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.js
CHANGED
|
@@ -12200,7 +12200,7 @@ function buildMeetingAnalystSubAgent(tier) {
|
|
|
12200
12200
|
"| `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. |",
|
|
12201
12201
|
"| `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. |",
|
|
12202
12202
|
"| `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. |",
|
|
12203
|
-
"| `standup` | Action items, blockers, status updates | Do not produce requirement, ADR, or BDR drafts. Phase 3 (Draft) is almost always skipped.
|
|
12203
|
+
"| `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. |",
|
|
12204
12204
|
"| `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. |",
|
|
12205
12205
|
"| `other` | General meeting extraction | Apply the default workflow with no type-specific overrides. |",
|
|
12206
12206
|
"",
|
|
@@ -12262,6 +12262,61 @@ function buildMeetingAnalystSubAgent(tier) {
|
|
|
12262
12262
|
"",
|
|
12263
12263
|
"---",
|
|
12264
12264
|
"",
|
|
12265
|
+
"## Action-item filing policy",
|
|
12266
|
+
"",
|
|
12267
|
+
"Not every action item should become a GitHub issue. The pipeline",
|
|
12268
|
+
"can only ever close issues whose deliverable an automated agent",
|
|
12269
|
+
"(or this repo's existing channels) can produce. Filing an issue",
|
|
12270
|
+
"for a task only a human can do \u2014 in the real world or in a system",
|
|
12271
|
+
"this pipeline cannot touch \u2014 creates queue noise that no worker or",
|
|
12272
|
+
"orchestrator can ever resolve. Apply the **agent-workability",
|
|
12273
|
+
"test** below in phases 1, 3, and 4.",
|
|
12274
|
+
"",
|
|
12275
|
+
"### Agent-workability test",
|
|
12276
|
+
"",
|
|
12277
|
+
"An action item is **agent-workable** only when completing it",
|
|
12278
|
+
"produces a documentation deliverable an automated agent can author",
|
|
12279
|
+
"in this repo's docs tree \u2014 a requirement document, an ADR, a docs",
|
|
12280
|
+
"page, a BCM capability model, a research note, or a roadmap /",
|
|
12281
|
+
"product-doc update. Route agent-workable items through their",
|
|
12282
|
+
"**dedicated downstream channel** (`req:write`, `docs:write`,",
|
|
12283
|
+
"`bcm:*`, `research:scope`, roadmap/product-doc follow-up). Never",
|
|
12284
|
+
"file them as a generic `action-item` / `type:chore` issue.",
|
|
12285
|
+
"",
|
|
12286
|
+
"An action item is **human-owned** when it requires a person to act",
|
|
12287
|
+
"in the real world or in a system this pipeline cannot reach.",
|
|
12288
|
+
"Typical cues:",
|
|
12289
|
+
"",
|
|
12290
|
+
'- **send / email / schedule / invite / call** \u2014 e.g. "send out',
|
|
12291
|
+
` company invoices", "invite X to next week's call".`,
|
|
12292
|
+
'- **install / configure / provision / set up** \u2014 e.g. "install and',
|
|
12293
|
+
' configure Claude", "get codebase read access".',
|
|
12294
|
+
"- **decide / approve / choose / prioritise** (a human judgement",
|
|
12295
|
+
" call, not a documented decision record).",
|
|
12296
|
+
'- **communicate / notify / give a heads-up** \u2014 e.g. "give Dr. Y a',
|
|
12297
|
+
' heads-up".',
|
|
12298
|
+
"- **get / request access or credentials**, **pay / invoice**.",
|
|
12299
|
+
"- **build or change code in another repo**, **design in an",
|
|
12300
|
+
" external tool** (Figma, etc.).",
|
|
12301
|
+
"",
|
|
12302
|
+
"Record human-owned items **only** in the notes `## Action Items`",
|
|
12303
|
+
"table (who / what / when) \u2014 that table is the **system of record**",
|
|
12304
|
+
"for human follow-ups. Do **not** file a GitHub issue for them.",
|
|
12305
|
+
"",
|
|
12306
|
+
"When an item is ambiguous, default to **human-owned**",
|
|
12307
|
+
"(notes-only): a missed issue is cheaper than queue noise the",
|
|
12308
|
+
"pipeline can never close.",
|
|
12309
|
+
"",
|
|
12310
|
+
"**Consumer tuning.** When the project supplies",
|
|
12311
|
+
"`AgentConfigOptions.meetings.actionItemFiling`, an",
|
|
12312
|
+
"**Action-item filing policy** subsection is rendered into the",
|
|
12313
|
+
"meetings taxonomy with any extra human-owned / agent-workable cues",
|
|
12314
|
+
"and a note when the split is disabled. Apply those overrides on",
|
|
12315
|
+
"top of the built-in cues above; if the split is disabled, fall",
|
|
12316
|
+
"back to filing a follow-up issue for every non-draft action item.",
|
|
12317
|
+
"",
|
|
12318
|
+
"---",
|
|
12319
|
+
"",
|
|
12265
12320
|
...PROJECT_CONTEXT_MAINTAINER_SECTION,
|
|
12266
12321
|
"## Traceability",
|
|
12267
12322
|
"",
|
|
@@ -12293,7 +12348,7 @@ function buildMeetingAnalystSubAgent(tier) {
|
|
|
12293
12348
|
"",
|
|
12294
12349
|
" | Artifact | Type | Issue/Path |",
|
|
12295
12350
|
" |----------|------|------------|",
|
|
12296
|
-
" | <title> | requirement / ADR /
|
|
12351
|
+
" | <title> | requirement / ADR / docs / profile / research | #<N> or <path> |",
|
|
12297
12352
|
" ```",
|
|
12298
12353
|
"",
|
|
12299
12354
|
"2. **Update the meeting notes** with a similar `## Related Issues` section",
|
|
@@ -12358,7 +12413,7 @@ function buildMeetingAnalystSubAgent(tier) {
|
|
|
12358
12413
|
` | **Decisions** | "We decided...", "Let's go with...", explicit choices |`,
|
|
12359
12414
|
' | **Requirements** | Feature descriptions, acceptance criteria, "it should..." |',
|
|
12360
12415
|
" | **Technology discussions** | Platform comparisons, architecture options, tool evaluations |",
|
|
12361
|
-
' | **Action items** | "[Person] will...", "Next step is...", assigned tasks |',
|
|
12416
|
+
' | **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**. |',
|
|
12362
12417
|
' | **Open questions** | "We need to figure out...", unresolved debates |',
|
|
12363
12418
|
" | **People of interest** | Industry contacts, domain experts mentioned |",
|
|
12364
12419
|
" | **Companies of interest** | Competitors, vendors, partners discussed |",
|
|
@@ -12373,7 +12428,10 @@ function buildMeetingAnalystSubAgent(tier) {
|
|
|
12373
12428
|
" - Decisions Made (with category and confidence: Firm / Tentative / Needs confirmation)",
|
|
12374
12429
|
" - Requirements Identified (with category and priority estimate)",
|
|
12375
12430
|
" - Technology Discussions (with status: Decided / Leaning toward / Open)",
|
|
12376
|
-
" - Action Items (with assignee and due date if stated
|
|
12431
|
+
" - Action Items (with assignee and due date if stated, and a",
|
|
12432
|
+
" **disposition** tag \u2014 `agent-workable` or `human-owned` \u2014 per",
|
|
12433
|
+
" the **Action-item filing policy** so Phase 4 can route each",
|
|
12434
|
+
" item without re-classifying it)",
|
|
12377
12435
|
" - Open Questions",
|
|
12378
12436
|
" - People of Interest (with context and whether a profile exists)",
|
|
12379
12437
|
" - Companies of Interest (with type and context)",
|
|
@@ -12503,7 +12561,11 @@ function buildMeetingAnalystSubAgent(tier) {
|
|
|
12503
12561
|
" - Agenda / topics covered",
|
|
12504
12562
|
" - Key Discussion Points (organized by topic)",
|
|
12505
12563
|
" - Decisions (numbered, with rationale)",
|
|
12506
|
-
" - Action Items (table: who, what, when)",
|
|
12564
|
+
" - Action Items (table: who, what, when). This table is the",
|
|
12565
|
+
" **system of record for human follow-ups** \u2014 human-owned",
|
|
12566
|
+
" action items live here and are never filed as GitHub issues",
|
|
12567
|
+
" (see the **Action-item filing policy**). Capture every",
|
|
12568
|
+
" action item here regardless of disposition.",
|
|
12507
12569
|
" - Open Questions",
|
|
12508
12570
|
" - Follow-up items",
|
|
12509
12571
|
"4. **Plan the `notes/` tree index update \u2014 do not commit it",
|
|
@@ -12551,6 +12613,11 @@ function buildMeetingAnalystSubAgent(tier) {
|
|
|
12551
12613
|
"This phase only exists if the extraction identified requirements, architectural",
|
|
12552
12614
|
"decisions, or strategy changes. If this issue exists, execute it.",
|
|
12553
12615
|
"",
|
|
12616
|
+
"Draft proposals only for **agent-workable** deliverables (per the",
|
|
12617
|
+
"**Action-item filing policy**). Action items tagged `human-owned`",
|
|
12618
|
+
"in the extraction are not drafted here \u2014 they stay in the notes",
|
|
12619
|
+
"`## Action Items` table and produce no follow-up issue.",
|
|
12620
|
+
"",
|
|
12554
12621
|
"### Steps",
|
|
12555
12622
|
"",
|
|
12556
12623
|
"1. Read the extraction file from Phase 1 at",
|
|
@@ -12590,8 +12657,27 @@ function buildMeetingAnalystSubAgent(tier) {
|
|
|
12590
12657
|
" gated by areas.",
|
|
12591
12658
|
"3. Create ADR issues if technology decisions need formal records.",
|
|
12592
12659
|
" Include a `## Traceability` section in each. Not gated by areas.",
|
|
12593
|
-
"4.
|
|
12594
|
-
"
|
|
12660
|
+
"4. **Route action items per the Action-item filing policy \u2014 do",
|
|
12661
|
+
" not file a generic `action-item` issue per task.** Read each",
|
|
12662
|
+
" action item's `disposition` tag from the extraction (re-apply",
|
|
12663
|
+
" the **agent-workability test** if the tag is missing):",
|
|
12664
|
+
" - **Agent-workable** (yields a doc deliverable an agent can",
|
|
12665
|
+
" author): file it through its **dedicated downstream channel**",
|
|
12666
|
+
" \u2014 a `req:write` issue for a requirement, a `docs:write` issue",
|
|
12667
|
+
" for a docs page, `bcm:*` for a capability model, a",
|
|
12668
|
+
" `research:scope` issue for a research note, or a roadmap /",
|
|
12669
|
+
" product-doc follow-up. Use the matching template from the",
|
|
12670
|
+
" issue-templates page; include a `## Traceability` section.",
|
|
12671
|
+
" Issue creation is not gated by areas.",
|
|
12672
|
+
" - **Human-owned** (send/schedule/install/decide/communicate/",
|
|
12673
|
+
" get-access/build-elsewhere): record it **only** in the notes",
|
|
12674
|
+
" `## Action Items` table (step 8 already carries the table",
|
|
12675
|
+
" forward). **File no GitHub issue.** When ambiguous, treat the",
|
|
12676
|
+
" item as human-owned.",
|
|
12677
|
+
" If the project disabled the split via",
|
|
12678
|
+
" `meetings.actionItemFiling.enabled: false`, fall back to filing",
|
|
12679
|
+
" a follow-up issue for every action item not already covered by",
|
|
12680
|
+
" a Phase 3 draft.",
|
|
12595
12681
|
"5. Cross-reference the meeting in any existing documents that were",
|
|
12596
12682
|
" discussed **and that live under an in-scope `docRoot`**. For",
|
|
12597
12683
|
" discussed documents under an out-of-scope `docRoot`, open a",
|
|
@@ -12628,7 +12714,10 @@ function buildMeetingAnalystSubAgent(tier) {
|
|
|
12628
12714
|
"- Use `gh` CLI for all GitHub operations",
|
|
12629
12715
|
"- Apply the appropriate `meeting:*` phase label to each phase issue",
|
|
12630
12716
|
"- Use `type:docs` for documentation-producing issues, `type:chore` for",
|
|
12631
|
-
" maintenance/organizational tasks",
|
|
12717
|
+
" maintenance/organizational tasks the pipeline can action",
|
|
12718
|
+
"- Do **not** file issues for human-owned action items \u2014 per the",
|
|
12719
|
+
" **Action-item filing policy** they live only in the notes",
|
|
12720
|
+
" `## Action Items` table",
|
|
12632
12721
|
"- Use `status:` labels to track progress (`status:ready`, `status:in-progress`, `status:done`)",
|
|
12633
12722
|
"- Reference the source meeting transcript in all created issues",
|
|
12634
12723
|
"- Link phase issues with `Depends on: #N` to enforce ordering",
|
|
@@ -12699,7 +12788,10 @@ var processMeetingSkill = {
|
|
|
12699
12788
|
"1. Resolve the basename, partition, and any sibling files using",
|
|
12700
12789
|
" the **Basename-pairing algorithm** above",
|
|
12701
12790
|
"2. Execute Phase 1 (Extract) \u2014 categorize the available content into",
|
|
12702
|
-
" decisions, requirements, action items, open questions, and more",
|
|
12791
|
+
" decisions, requirements, action items, open questions, and more.",
|
|
12792
|
+
" Tag each action item's disposition (`agent-workable` vs",
|
|
12793
|
+
" `human-owned`) per the agent's **Action-item filing policy** so",
|
|
12794
|
+
" Phase 4 keeps human-owned tasks out of the issue queue",
|
|
12703
12795
|
"3. Write the extraction to",
|
|
12704
12796
|
" `<meetingsRoot>/insights/{type}/<basename>.md`",
|
|
12705
12797
|
"4. Create downstream phase issues using `gh issue create`:",
|
|
@@ -12769,7 +12861,18 @@ function buildMeetingAnalysisBundle(tier = AGENT_MODEL.BALANCED) {
|
|
|
12769
12861
|
"direct edits to the doc-root sub-folders declared in the project's",
|
|
12770
12862
|
"**Area \u2192 doc-root mapping** table. When both fields are absent",
|
|
12771
12863
|
"the pipeline falls back to the default workflow (kind `other`,",
|
|
12772
|
-
"no area gating)."
|
|
12864
|
+
"no area gating).",
|
|
12865
|
+
"",
|
|
12866
|
+
"Phase 4 applies an **agent-workability split** to action items:",
|
|
12867
|
+
"items that yield a documentation deliverable an agent can author",
|
|
12868
|
+
"are filed through their dedicated downstream channel",
|
|
12869
|
+
"(`req:write`, `docs:write`, `bcm:*`, `research:scope`, roadmap",
|
|
12870
|
+
"follow-up); human-owned tasks (send / schedule / install /",
|
|
12871
|
+
"decide / communicate / get-access / build-elsewhere) are",
|
|
12872
|
+
"recorded **only** in the notes `## Action Items` table, which is",
|
|
12873
|
+
"the **system of record for human follow-ups** \u2014 no GitHub issue",
|
|
12874
|
+
"is filed for them. Consumers tune or disable the split via",
|
|
12875
|
+
"`AgentConfigOptions.meetings.actionItemFiling`."
|
|
12773
12876
|
].join("\n"),
|
|
12774
12877
|
platforms: {
|
|
12775
12878
|
cursor: { exclude: true }
|
|
@@ -13914,6 +14017,9 @@ var DEFAULT_BUNDLE_OVERRIDES = {
|
|
|
13914
14017
|
"regulatory:research": {
|
|
13915
14018
|
acceptanceCriteria: { smallMax: 3, mediumMax: 10 }
|
|
13916
14019
|
},
|
|
14020
|
+
"standards:research": {
|
|
14021
|
+
acceptanceCriteria: { smallMax: 3, mediumMax: 10 }
|
|
14022
|
+
},
|
|
13917
14023
|
"software:map": {
|
|
13918
14024
|
acceptanceCriteria: { smallMax: 3, mediumMax: 12 },
|
|
13919
14025
|
sources: { smallMax: 2, mediumMax: 15 }
|
|
@@ -14127,6 +14233,31 @@ function renderScopeGateSection(gate, excludeBundles = []) {
|
|
|
14127
14233
|
"alphabetical order on the label name** \u2014 first-wins, deterministic."
|
|
14128
14234
|
);
|
|
14129
14235
|
}
|
|
14236
|
+
lines.push(
|
|
14237
|
+
"",
|
|
14238
|
+
"### Reconfiguring the thresholds",
|
|
14239
|
+
"",
|
|
14240
|
+
"Every threshold above is configurable per repo \u2014 the global",
|
|
14241
|
+
"`acceptance-criteria` / `sources` classification bands and each",
|
|
14242
|
+
"per-phase-label override. Retune them in the project's",
|
|
14243
|
+
"configulator config so the gate fits this repo's issue shapes:",
|
|
14244
|
+
"",
|
|
14245
|
+
"- `AgentConfigOptions.scopeGate.acceptanceCriteria` /",
|
|
14246
|
+
" `AgentConfigOptions.scopeGate.sources` \u2014 the global",
|
|
14247
|
+
" `smallMax` / `mediumMax` bands applied to every issue.",
|
|
14248
|
+
"- `AgentConfigOptions.scopeGate.bundleOverrides.<phase-label>` \u2014",
|
|
14249
|
+
" a per-phase-label override for **any** phase label, not just",
|
|
14250
|
+
" the ones shipped above. The map deep-merges with the shipped",
|
|
14251
|
+
" defaults (consumer-wins-per-key): add a key to raise a new",
|
|
14252
|
+
" label's AC / sources ceiling, set an existing key to replace a",
|
|
14253
|
+
" shipped default, or set a key to `undefined` to drop a shipped",
|
|
14254
|
+
" default and classify that label against the global bands.",
|
|
14255
|
+
"",
|
|
14256
|
+
"Each override entry's `acceptanceCriteria` and `sources` axes are",
|
|
14257
|
+
"independent \u2014 override one and the other falls through to the",
|
|
14258
|
+
"global band. Malformed thresholds (negative, non-integer, or",
|
|
14259
|
+
"`mediumMax <= smallMax`) fail the build at synth time."
|
|
14260
|
+
);
|
|
14130
14261
|
lines.push(
|
|
14131
14262
|
"",
|
|
14132
14263
|
"### Decomposition-proposal template",
|
|
@@ -17782,12 +17913,18 @@ var pnpmBundle = {
|
|
|
17782
17913
|
var DEFAULT_PATHS_EXEMPT_FROM_SIZE = [
|
|
17783
17914
|
"docs/**"
|
|
17784
17915
|
];
|
|
17916
|
+
var DEFAULT_REQUIRED_WORKFLOWS = [];
|
|
17785
17917
|
function resolvePrReviewPolicy(config) {
|
|
17786
17918
|
const pathsExemptFromSize = config?.autoMerge?.pathsExemptFromSize ?? DEFAULT_PATHS_EXEMPT_FROM_SIZE;
|
|
17919
|
+
const requiredWorkflows = config?.ciVerification?.requiredWorkflows ?? DEFAULT_REQUIRED_WORKFLOWS;
|
|
17787
17920
|
assertValidPathsExemptFromSize(pathsExemptFromSize);
|
|
17921
|
+
assertValidRequiredWorkflows(requiredWorkflows);
|
|
17788
17922
|
return {
|
|
17789
17923
|
autoMerge: {
|
|
17790
17924
|
pathsExemptFromSize: [...pathsExemptFromSize]
|
|
17925
|
+
},
|
|
17926
|
+
ciVerification: {
|
|
17927
|
+
requiredWorkflows: [...requiredWorkflows]
|
|
17791
17928
|
}
|
|
17792
17929
|
};
|
|
17793
17930
|
}
|
|
@@ -17803,6 +17940,15 @@ function assertValidPathsExemptFromSize(paths) {
|
|
|
17803
17940
|
}
|
|
17804
17941
|
}
|
|
17805
17942
|
}
|
|
17943
|
+
function assertValidRequiredWorkflows(workflows) {
|
|
17944
|
+
for (const workflow of workflows) {
|
|
17945
|
+
if (typeof workflow !== "string" || workflow.trim().length === 0) {
|
|
17946
|
+
throw new Error(
|
|
17947
|
+
"prReviewPolicy.ciVerification.requiredWorkflows entries must be non-empty strings"
|
|
17948
|
+
);
|
|
17949
|
+
}
|
|
17950
|
+
}
|
|
17951
|
+
}
|
|
17806
17952
|
|
|
17807
17953
|
// src/agent/bundles/pr-review.ts
|
|
17808
17954
|
var prReviewerSubAgent = {
|
|
@@ -17844,6 +17990,125 @@ var prReviewerSubAgent = {
|
|
|
17844
17990
|
"",
|
|
17845
17991
|
"---",
|
|
17846
17992
|
"",
|
|
17993
|
+
"## CI Verification (primary read + Actions-runs fallback)",
|
|
17994
|
+
"",
|
|
17995
|
+
"Every CI-status decision in this agent \u2014 the Phase 1.5 eligibility",
|
|
17996
|
+
"filter, the Phase 3 checklist, the Phase 4 merge gate, the Phase 4",
|
|
17997
|
+
"step (h) re-enable condition, and the Phase 4.5 sticky `CI status`",
|
|
17998
|
+
"field \u2014 resolves CI through the procedure below. It yields one of",
|
|
17999
|
+
"three verdicts: **green** (every required check succeeded),",
|
|
18000
|
+
"**pending** (no failures, but at least one required check is still",
|
|
18001
|
+
"running or queued), or **red** (at least one required check",
|
|
18002
|
+
"failed). Never enable auto-merge unless the verdict is **green**.",
|
|
18003
|
+
"",
|
|
18004
|
+
"### Step 1: Primary read \u2014 check-runs / statusCheckRollup",
|
|
18005
|
+
"",
|
|
18006
|
+
"Read CI from the GitHub check-runs rollup, the canonical source",
|
|
18007
|
+
"GitHub itself uses to gate branch protection:",
|
|
18008
|
+
"",
|
|
18009
|
+
"```bash",
|
|
18010
|
+
"gh pr checks <pr-number>",
|
|
18011
|
+
"# equivalently, the rollup field:",
|
|
18012
|
+
"gh pr view <pr-number> --json statusCheckRollup",
|
|
18013
|
+
"```",
|
|
18014
|
+
"",
|
|
18015
|
+
"This read aggregates **every** check context \u2014 GitHub Actions,",
|
|
18016
|
+
"third-party CI, GitHub Apps, and commit statuses. When it returns",
|
|
18017
|
+
"one or more readable contexts, it is authoritative: map each",
|
|
18018
|
+
"required context's conclusion with the table in Step 4 and do",
|
|
18019
|
+
"**not** fall back. It is strictly more complete than the",
|
|
18020
|
+
"Actions-runs view in Step 3.",
|
|
18021
|
+
"",
|
|
18022
|
+
"### Step 2: Detect the fine-grained-PAT 403",
|
|
18023
|
+
"",
|
|
18024
|
+
"The primary read fails closed for one specific credential: a",
|
|
18025
|
+
"**fine-grained personal access token**. GitHub exposes no `Checks`",
|
|
18026
|
+
"permission for fine-grained PATs (it is GitHub-App-only), so the",
|
|
18027
|
+
"check-runs / `statusCheckRollup` request returns:",
|
|
18028
|
+
"",
|
|
18029
|
+
"```",
|
|
18030
|
+
"HTTP 403: Resource not accessible by personal access token",
|
|
18031
|
+
"```",
|
|
18032
|
+
"",
|
|
18033
|
+
"Trigger the Step 3 fallback **only** when the primary read either:",
|
|
18034
|
+
"",
|
|
18035
|
+
"- returns an explicit **403** (`Resource not accessible by personal",
|
|
18036
|
+
" access token`) on the check-runs / `statusCheckRollup` request,",
|
|
18037
|
+
" **or**",
|
|
18038
|
+
"- returns **no readable check contexts at all** (an empty rollup)",
|
|
18039
|
+
" for a head SHA that does have CI configured.",
|
|
18040
|
+
"",
|
|
18041
|
+
"A primary read that returns one or more readable contexts is",
|
|
18042
|
+
"authoritative \u2014 **never** fall back in that case (GitHub-App and",
|
|
18043
|
+
"classic-PAT consumers keep the complete check-runs view). **Never**",
|
|
18044
|
+
"treat a 403 or an unreadable check as green: the 403 is a",
|
|
18045
|
+
"visibility failure, not a passing signal.",
|
|
18046
|
+
"",
|
|
18047
|
+
"### Step 3: Fallback read \u2014 Actions runs API",
|
|
18048
|
+
"",
|
|
18049
|
+
"A fine-grained PAT with `Actions: Read-only` (which **is**",
|
|
18050
|
+
"grantable) can read workflow-run conclusions even when check-runs",
|
|
18051
|
+
"is denied. Read every workflow run for the PR's head SHA:",
|
|
18052
|
+
"",
|
|
18053
|
+
"```bash",
|
|
18054
|
+
"head_sha=$(gh pr view <pr-number> --json headRefOid --jq '.headRefOid')",
|
|
18055
|
+
'gh api "repos/{{repository.owner}}/{{repository.name}}/actions/runs?head_sha=${head_sha}&per_page=100"',
|
|
18056
|
+
"```",
|
|
18057
|
+
"",
|
|
18058
|
+
"Each run carries a `name`, `status`, and `conclusion`. **Collapse",
|
|
18059
|
+
"re-runs:** when a workflow `name` appears more than once for the",
|
|
18060
|
+
"same head SHA, keep only the most recent run (highest",
|
|
18061
|
+
"`run_number` / latest `created_at`) for that name.",
|
|
18062
|
+
"",
|
|
18063
|
+
"This fallback only sees GitHub Actions runs. It is sound for repos",
|
|
18064
|
+
"whose CI is entirely GitHub Actions; if a consumer adds a",
|
|
18065
|
+
"non-Actions required check, a fine-grained-PAT credential cannot",
|
|
18066
|
+
"see it and the consumer must move the reviewer to a GitHub App /",
|
|
18067
|
+
"classic PAT to regain the complete check-runs view.",
|
|
18068
|
+
"",
|
|
18069
|
+
"### Step 4: Map conclusions to a verdict",
|
|
18070
|
+
"",
|
|
18071
|
+
"Apply this mapping to the set of required checks (Step 5 defines",
|
|
18072
|
+
'"required"):',
|
|
18073
|
+
"",
|
|
18074
|
+
"| status / conclusion | Treatment |",
|
|
18075
|
+
"|---------------------|-----------|",
|
|
18076
|
+
"| `completed` / `success` | pass |",
|
|
18077
|
+
"| `completed` / `skipped` | non-blocking (ignore) |",
|
|
18078
|
+
"| `completed` / `neutral` | non-blocking (ignore) |",
|
|
18079
|
+
"| `completed` / `failure` | **block \u2192 red** |",
|
|
18080
|
+
"| `completed` / `cancelled` | **block \u2192 red** |",
|
|
18081
|
+
"| `completed` / `timed_out` | **block \u2192 red** |",
|
|
18082
|
+
"| `completed` / `action_required` | **block \u2192 red** |",
|
|
18083
|
+
"| `in_progress` / `queued` / `requested` / `waiting` / null conclusion | not-yet-green (pending) |",
|
|
18084
|
+
"",
|
|
18085
|
+
"- If any required check is **red**, the verdict is **red**.",
|
|
18086
|
+
"- Else if any required check is **pending**, the verdict is",
|
|
18087
|
+
" **pending**.",
|
|
18088
|
+
"- Else (every required check passed or was non-blocking) the",
|
|
18089
|
+
" verdict is **green**.",
|
|
18090
|
+
"",
|
|
18091
|
+
'### Step 5: Which workflows are "required"',
|
|
18092
|
+
"",
|
|
18093
|
+
'In the **Step 1 primary path**, "required" means the contexts',
|
|
18094
|
+
"GitHub marks required under branch protection \u2014 the rollup already",
|
|
18095
|
+
"reflects this.",
|
|
18096
|
+
"",
|
|
18097
|
+
"In the **Step 3 fallback path**, the Actions runs API does not say",
|
|
18098
|
+
"which workflows are required, so consult the policy's",
|
|
18099
|
+
"`ci-verification.required-workflows` list (rendered in the",
|
|
18100
|
+
"`PR Review Policy` block in CLAUDE.md):",
|
|
18101
|
+
"",
|
|
18102
|
+
"- **Non-empty list** \u2014 gate only on the workflow `name`s in the",
|
|
18103
|
+
" list. A listed workflow with **no** run for the head SHA is",
|
|
18104
|
+
" treated as not-yet-green (pending), never green.",
|
|
18105
|
+
"- **Empty list (default)** \u2014 treat **every** workflow run observed",
|
|
18106
|
+
" for the head SHA as required. This is the conservative",
|
|
18107
|
+
" zero-config default: an unknown failing workflow blocks rather",
|
|
18108
|
+
" than slips through.",
|
|
18109
|
+
"",
|
|
18110
|
+
"---",
|
|
18111
|
+
"",
|
|
17847
18112
|
"## Phase 1: Identify the PR",
|
|
17848
18113
|
"",
|
|
17849
18114
|
"If a PR number was provided in your instructions, use that. Otherwise stop",
|
|
@@ -17862,7 +18127,12 @@ var prReviewerSubAgent = {
|
|
|
17862
18127
|
'1. `mergeable == "MERGEABLE"` (no merge conflicts).',
|
|
17863
18128
|
"2. No **failing** required checks in `statusCheckRollup` \u2014 CI must be",
|
|
17864
18129
|
" green or still pending. Any `FAILURE`, `TIMED_OUT`, `CANCELLED`, or",
|
|
17865
|
-
" `ERROR` conclusion on a required check disqualifies the PR.",
|
|
18130
|
+
" `ERROR` conclusion on a required check disqualifies the PR. If the",
|
|
18131
|
+
" `statusCheckRollup` read returns a 403 `Resource not accessible by",
|
|
18132
|
+
" personal access token` (fine-grained PAT) or an empty rollup,",
|
|
18133
|
+
" resolve CI via the **CI Verification** section's Actions-runs",
|
|
18134
|
+
" fallback before deciding eligibility \u2014 do **not** treat the 403 as",
|
|
18135
|
+
" either a pass or an automatic disqualification.",
|
|
17866
18136
|
"3. The PR body contains a linked issue via one of the closing keywords:",
|
|
17867
18137
|
" `Closes #N`, `Fixes #N`, or `Resolves #N` (case-insensitive).",
|
|
17868
18138
|
"",
|
|
@@ -18080,7 +18350,9 @@ var prReviewerSubAgent = {
|
|
|
18080
18350
|
"- **Convention compliance** \u2014 PR title uses a conventional commit prefix,",
|
|
18081
18351
|
" body includes a closing keyword, branch name follows project conventions",
|
|
18082
18352
|
"- **Test coverage** \u2014 new or changed behavior has tests",
|
|
18083
|
-
"- **CI status** \u2014
|
|
18353
|
+
"- **CI status** \u2014 resolve CI via the **CI Verification** section",
|
|
18354
|
+
" (primary check-runs read, with the Actions-runs fallback on a",
|
|
18355
|
+
" fine-grained-PAT 403). The verdict must be **green**.",
|
|
18084
18356
|
"- **Scope creep** \u2014 diff stays within the issue's stated scope",
|
|
18085
18357
|
"",
|
|
18086
18358
|
"## Phase 3.5: Classify Comments",
|
|
@@ -18455,7 +18727,9 @@ var prReviewerSubAgent = {
|
|
|
18455
18727
|
" pushbacks added in step (a) and the failure pushbacks added in",
|
|
18456
18728
|
" step (f).",
|
|
18457
18729
|
"4. CI is green or still pending (any failing required check",
|
|
18458
|
-
" disqualifies re-enablement).",
|
|
18730
|
+
" disqualifies re-enablement). Resolve CI via the **CI",
|
|
18731
|
+
" Verification** section, including the Actions-runs fallback on a",
|
|
18732
|
+
" fine-grained-PAT 403.",
|
|
18459
18733
|
"",
|
|
18460
18734
|
"When all four hold, re-enable auto-merge with the same command used",
|
|
18461
18735
|
"in the auto-merge branch below:",
|
|
@@ -18854,7 +19128,9 @@ var prReviewerSubAgent = {
|
|
|
18854
19128
|
"- **AC status** \u2014 the checklist produced in Phase 3 (met, partial,",
|
|
18855
19129
|
" or missing), with links to the files or tests that provide the",
|
|
18856
19130
|
" evidence.",
|
|
18857
|
-
"- **CI status** \u2014
|
|
19131
|
+
"- **CI status** \u2014 the verdict from the **CI Verification** section",
|
|
19132
|
+
" (primary check-runs read, or the Actions-runs fallback when",
|
|
19133
|
+
" check-runs returns a fine-grained-PAT 403).",
|
|
18858
19134
|
"- **Outstanding** \u2014 the comments still carrying a non-terminal",
|
|
18859
19135
|
" reviewer reaction from Phase 3.5 (typically `eyes` for queued",
|
|
18860
19136
|
" in-scope items and `nit` / `question` items that remain open).",
|
|
@@ -18979,7 +19255,11 @@ var prReviewerSubAgent = {
|
|
|
18979
19255
|
"2. **Never merge without a linked issue.** If the PR body has no",
|
|
18980
19256
|
" `Closes #N` / `Fixes #N` / `Resolves #N`, comment and stop.",
|
|
18981
19257
|
"3. **Never merge with failing CI.** Even if every criterion is met,",
|
|
18982
|
-
" block on red checks.",
|
|
19258
|
+
" block on red checks. Resolve CI status via the **CI",
|
|
19259
|
+
" Verification** section: read check-runs first, and only on a",
|
|
19260
|
+
" fine-grained-PAT 403 (or an empty rollup) fall back to the",
|
|
19261
|
+
" Actions runs API. A 403 is a visibility failure, **never** a",
|
|
19262
|
+
" passing check \u2014 do not treat an unreadable check as green.",
|
|
18983
19263
|
"4. **Never bypass review conventions.** Always use `--squash`, `--auto`,",
|
|
18984
19264
|
" and `--delete-branch` for merges. Do not force-merge.",
|
|
18985
19265
|
"5. **Never auto-merge a `human-required` PR.** When Phase 2.75 resolves",
|
|
@@ -19161,7 +19441,10 @@ var reviewPrsSkill = {
|
|
|
19161
19441
|
'2. `mergeable == "MERGEABLE"` (no conflicts).',
|
|
19162
19442
|
"3. No required check in `statusCheckRollup` has a failing conclusion",
|
|
19163
19443
|
" (`FAILURE`, `TIMED_OUT`, `CANCELLED`, `ERROR`). CI green or still",
|
|
19164
|
-
" pending is fine.",
|
|
19444
|
+
" pending is fine. When `statusCheckRollup` is empty or denied with",
|
|
19445
|
+
" a fine-grained-PAT 403, keep the PR in the queue \u2014 the per-PR",
|
|
19446
|
+
" pipeline resolves CI authoritatively via the reviewer's CI",
|
|
19447
|
+
" Verification Actions-runs fallback.",
|
|
19165
19448
|
"4. The PR body contains a linked issue (`Closes #N` / `Fixes #N` /",
|
|
19166
19449
|
" `Resolves #N`, case-insensitive).",
|
|
19167
19450
|
"",
|
|
@@ -19280,6 +19563,12 @@ function buildPrReviewBundle(policy = resolvePrReviewPolicy()) {
|
|
|
19280
19563
|
...renderPathsExemptFromSizeYaml(
|
|
19281
19564
|
policy.autoMerge.pathsExemptFromSize
|
|
19282
19565
|
),
|
|
19566
|
+
"",
|
|
19567
|
+
"ci-verification:",
|
|
19568
|
+
" required-workflows:",
|
|
19569
|
+
...renderRequiredWorkflowsYaml(
|
|
19570
|
+
policy.ciVerification.requiredWorkflows
|
|
19571
|
+
),
|
|
19283
19572
|
"```",
|
|
19284
19573
|
"",
|
|
19285
19574
|
"## Precedence",
|
|
@@ -19361,7 +19650,69 @@ function buildPrReviewBundle(policy = resolvePrReviewPolicy()) {
|
|
|
19361
19650
|
"out only kicks in for **code-heavy** PRs that legitimately trip",
|
|
19362
19651
|
"rule #6 (mixed-content diffs whose non-doc paths fail the",
|
|
19363
19652
|
"`paths-exempt-from-size` check, or consumers that disable the",
|
|
19364
|
-
"doc-only carve-out entirely)."
|
|
19653
|
+
"doc-only carve-out entirely).",
|
|
19654
|
+
"",
|
|
19655
|
+
"## CI Verification",
|
|
19656
|
+
"",
|
|
19657
|
+
"Before enabling auto-merge the reviewer confirms CI is green.",
|
|
19658
|
+
"The **primary** read is the GitHub check-runs rollup",
|
|
19659
|
+
"(`gh pr checks` / `statusCheckRollup`) \u2014 the same source",
|
|
19660
|
+
"GitHub uses for branch protection, covering **every** check",
|
|
19661
|
+
"context (Actions, third-party CI, GitHub Apps, commit",
|
|
19662
|
+
"statuses). It stays primary for every consumer because it is",
|
|
19663
|
+
"strictly more complete than the Actions-only fallback below.",
|
|
19664
|
+
"",
|
|
19665
|
+
"### Fine-grained-PAT fallback to the Actions runs API",
|
|
19666
|
+
"",
|
|
19667
|
+
"When the reviewer authenticates with a **fine-grained personal",
|
|
19668
|
+
"access token**, the check-runs read returns",
|
|
19669
|
+
"`HTTP 403: Resource not accessible by personal access token`.",
|
|
19670
|
+
"This is not grantable away: GitHub exposes **no `Checks`",
|
|
19671
|
+
"permission for fine-grained tokens** (it is GitHub-App-only),",
|
|
19672
|
+
"so the token permission picker has no entry to add. On that",
|
|
19673
|
+
"specific 403 (or when the rollup returns no readable contexts",
|
|
19674
|
+
"at all), the reviewer falls back to the **Actions runs API**:",
|
|
19675
|
+
"",
|
|
19676
|
+
"```",
|
|
19677
|
+
"GET /repos/{owner}/{repo}/actions/runs?head_sha={head_sha}&per_page=100",
|
|
19678
|
+
"```",
|
|
19679
|
+
"",
|
|
19680
|
+
"which a fine-grained PAT with `Actions: Read-only` **can**",
|
|
19681
|
+
"read. Auto-merge is then gated on the required workflows'",
|
|
19682
|
+
"latest run per workflow name concluding `success`",
|
|
19683
|
+
"(`skipped` / `neutral` are non-blocking; `failure` /",
|
|
19684
|
+
"`cancelled` / `timed_out` / `action_required` block; a run",
|
|
19685
|
+
"still `in_progress` / `queued`, or a required workflow with no",
|
|
19686
|
+
"run at all, counts as not-yet-green). The 403 is detected",
|
|
19687
|
+
"explicitly and is **never** treated as a passing check \u2014 it is",
|
|
19688
|
+
"a visibility failure, not a green signal.",
|
|
19689
|
+
"",
|
|
19690
|
+
"The fallback fires **only** when the primary check-runs read",
|
|
19691
|
+
"is denied, so GitHub-App and classic-PAT consumers (which can",
|
|
19692
|
+
"read check-runs) are unaffected and keep the complete view.",
|
|
19693
|
+
"The fallback only sees GitHub Actions runs; a consumer whose",
|
|
19694
|
+
"CI includes a non-Actions required check cannot verify it on a",
|
|
19695
|
+
"fine-grained PAT and must move the reviewer to a GitHub App /",
|
|
19696
|
+
"classic PAT to regain the complete check-runs view.",
|
|
19697
|
+
"",
|
|
19698
|
+
"### Configuring required workflows",
|
|
19699
|
+
"",
|
|
19700
|
+
"The `ci-verification.required-workflows` list in the policy",
|
|
19701
|
+
"YAML names the workflows the fallback gates on:",
|
|
19702
|
+
"",
|
|
19703
|
+
"- **Non-empty list** \u2014 gate only on those workflow `name`s.",
|
|
19704
|
+
" A listed workflow with no run for the head SHA is treated as",
|
|
19705
|
+
" not-yet-green (pending), never green.",
|
|
19706
|
+
"- **Empty list (the default)** \u2014 treat **every** workflow run",
|
|
19707
|
+
" observed for the head SHA as required. This is the",
|
|
19708
|
+
" conservative zero-config default so an unknown failing",
|
|
19709
|
+
" workflow blocks rather than slips through.",
|
|
19710
|
+
"",
|
|
19711
|
+
"Consumers tune the list via",
|
|
19712
|
+
"`agentConfig.prReviewPolicy.ciVerification.requiredWorkflows`.",
|
|
19713
|
+
"The list governs **only** the fallback path; the primary",
|
|
19714
|
+
'check-runs read derives "required" from branch protection',
|
|
19715
|
+
"directly."
|
|
19365
19716
|
].join("\n"),
|
|
19366
19717
|
tags: ["policy", "review"]
|
|
19367
19718
|
},
|
|
@@ -19647,6 +19998,12 @@ function renderPathsExemptFromSizeYaml(paths) {
|
|
|
19647
19998
|
}
|
|
19648
19999
|
return paths.map((path8) => ` - "${path8}"`);
|
|
19649
20000
|
}
|
|
20001
|
+
function renderRequiredWorkflowsYaml(workflows) {
|
|
20002
|
+
if (workflows.length === 0) {
|
|
20003
|
+
return [" []"];
|
|
20004
|
+
}
|
|
20005
|
+
return workflows.map((workflow) => ` - "${workflow}"`);
|
|
20006
|
+
}
|
|
19650
20007
|
var prReviewBundle = buildPrReviewBundle();
|
|
19651
20008
|
|
|
19652
20009
|
// src/agent/bundles/projen.ts
|
|
@@ -30086,13 +30443,20 @@ function renderFocusSection(focus) {
|
|
|
30086
30443
|
|
|
30087
30444
|
// src/agent/bundles/meeting-types.ts
|
|
30088
30445
|
var DEFAULT_AGENDA_TEMPLATE_ROOT = "<meetingsRoot>/_agenda-templates";
|
|
30446
|
+
function actionItemFilingHasOverride(filing) {
|
|
30447
|
+
if (!filing) {
|
|
30448
|
+
return false;
|
|
30449
|
+
}
|
|
30450
|
+
return filing.enabled === false || (filing.humanOwnedCues ?? []).length > 0 || (filing.agentWorkableCues ?? []).length > 0;
|
|
30451
|
+
}
|
|
30089
30452
|
function renderMeetingTypesSection(meetings) {
|
|
30090
30453
|
if (!meetings) {
|
|
30091
30454
|
return "";
|
|
30092
30455
|
}
|
|
30093
30456
|
const types = meetings.meetingTypes ?? [];
|
|
30094
30457
|
const areas = meetings.meetingAreas ?? [];
|
|
30095
|
-
|
|
30458
|
+
const filingOverride = actionItemFilingHasOverride(meetings.actionItemFiling) ? meetings.actionItemFiling : void 0;
|
|
30459
|
+
if (types.length === 0 && areas.length === 0 && !filingOverride) {
|
|
30096
30460
|
return "";
|
|
30097
30461
|
}
|
|
30098
30462
|
const sections = [];
|
|
@@ -30102,6 +30466,9 @@ function renderMeetingTypesSection(meetings) {
|
|
|
30102
30466
|
if (areas.length > 0) {
|
|
30103
30467
|
sections.push(renderMeetingAreas(areas));
|
|
30104
30468
|
}
|
|
30469
|
+
if (filingOverride) {
|
|
30470
|
+
sections.push(renderActionItemFiling(filingOverride));
|
|
30471
|
+
}
|
|
30105
30472
|
return sections.join("\n\n");
|
|
30106
30473
|
}
|
|
30107
30474
|
function renderMeetingTypes(types, agendaTemplateRoot) {
|
|
@@ -30155,6 +30522,54 @@ function renderMeetingAreas(areas) {
|
|
|
30155
30522
|
}
|
|
30156
30523
|
return lines.join("\n");
|
|
30157
30524
|
}
|
|
30525
|
+
function renderActionItemFiling(filing) {
|
|
30526
|
+
const lines = [
|
|
30527
|
+
"## Action-item filing policy",
|
|
30528
|
+
"",
|
|
30529
|
+
"This project tunes the Phase 4 (Link) agent-workability split",
|
|
30530
|
+
"through `AgentConfigOptions.meetings.actionItemFiling`. See the",
|
|
30531
|
+
"**Action-item filing policy** section of the `meeting-analyst`",
|
|
30532
|
+
"agent for the full baked-in test.",
|
|
30533
|
+
""
|
|
30534
|
+
];
|
|
30535
|
+
if (filing.enabled === false) {
|
|
30536
|
+
lines.push(
|
|
30537
|
+
"- **Split disabled.** Phase 4 falls back to the legacy behaviour:",
|
|
30538
|
+
" file a follow-up issue for every action item that is not",
|
|
30539
|
+
" already covered by a requirement or ADR draft, including",
|
|
30540
|
+
" human-owned tasks. The notes `## Action Items` table is still",
|
|
30541
|
+
" written, but it is no longer the sole record for human",
|
|
30542
|
+
" follow-ups."
|
|
30543
|
+
);
|
|
30544
|
+
} else {
|
|
30545
|
+
lines.push(
|
|
30546
|
+
"- **Split enabled** (default). Agent-workable doc deliverables are",
|
|
30547
|
+
" filed through their dedicated downstream channel; human-owned",
|
|
30548
|
+
" tasks are recorded only in the notes `## Action Items` table."
|
|
30549
|
+
);
|
|
30550
|
+
}
|
|
30551
|
+
const humanCues = filing.humanOwnedCues ?? [];
|
|
30552
|
+
if (humanCues.length > 0) {
|
|
30553
|
+
lines.push(
|
|
30554
|
+
"",
|
|
30555
|
+
"**Additional human-owned cues** (recorded notes-only, never",
|
|
30556
|
+
"filed), in addition to the bundle's built-in list:",
|
|
30557
|
+
"",
|
|
30558
|
+
...humanCues.map((cue) => `- ${cue}`)
|
|
30559
|
+
);
|
|
30560
|
+
}
|
|
30561
|
+
const agentCues = filing.agentWorkableCues ?? [];
|
|
30562
|
+
if (agentCues.length > 0) {
|
|
30563
|
+
lines.push(
|
|
30564
|
+
"",
|
|
30565
|
+
"**Additional agent-workable cues** (filed through the matching",
|
|
30566
|
+
"downstream channel), in addition to the bundle's built-in list:",
|
|
30567
|
+
"",
|
|
30568
|
+
...agentCues.map((cue) => `- ${cue}`)
|
|
30569
|
+
);
|
|
30570
|
+
}
|
|
30571
|
+
return lines.join("\n");
|
|
30572
|
+
}
|
|
30158
30573
|
|
|
30159
30574
|
// src/agent/bundles/priority-rules.ts
|
|
30160
30575
|
function renderPriorityRulesSection(rules) {
|