claude-dev-env 1.56.0 → 1.57.1

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/CLAUDE.md CHANGED
@@ -54,7 +54,7 @@ Repair agents run only on reported findings; the verifier re-checks after each r
54
54
 
55
55
  - **Worktree isolation:** Run every PR convergence and review loop in an isolated worktree, never a shared checkout that concurrent processes may advance. Verify isolation (the working directory path includes `.claude/worktrees/`) before the first tick or round.
56
56
  - **No hedging in findings:** Findings and PR reports state verified facts only — never `likely`, `probably`, `should`, `appears to`. Verify each claim against the code before stating it; the anti-hallucination Stop hook rejects hedged responses.
57
- - **Tight edit scope:** Edit exactly what the task names — no whole-file rewrites, no renaming public method parameters, no changes beyond the stated task. When the user asks for a "lasting" or "reusable" fix, prefer the durable systemic fix over a one-off edit.
57
+ - **Tight edit scope:** Edit exactly what the task names — no whole-file rewrites, no renaming public method parameters, no changes beyond the stated task. When the user asks for a "lasting" or "reusable" fix, prefer the durable systemic fix over a one-off edit. When the task touches a pipeline, generator, or other repeated process, fix the process itself, not its individual outputs — even when the request does not say so; for one-off targets, a scoped patch remains the default.
58
58
  - **GitHub MCP first:** The GitHub MCP (`mcp__plugin_github_github__*`) is the primary path for PR and review-thread inspection; raw `gh api` is the fallback, not the default — MCP calls work the same from any worktree.
59
59
 
60
60
  ## Sub-agent Output Validation
@@ -73,3 +73,4 @@ For scheduled/cron tasks, default to sub-hour intervals (30-minute); do not prop
73
73
 
74
74
  - **task_scope:** Match every action to what was explicitly requested. When intent is ambiguous, research official docs and present options via AskUserQuestion before making any changes. Proceed with edits only on explicit instruction.
75
75
  - **confirm_implementation_forks:** When two or more viable paths would satisfy the goal and the choice changes the deliverable — its scope, completeness, deferred work, dependencies, or a hard-to-reverse contract — stop and ask which path via AskUserQuestion before implementing. A path that defers work or leaves a placeholder creating a follow-up task is itself a fork to surface, not a default to take silently. Phrase the question in plain language with only the detail needed to decide. See [`confirm-implementation-forks`](rules/confirm-implementation-forks.md).
76
+ - **disambiguate_overloaded_terms:** When a word in the request has two different technical meanings — "conflict" (git-merge versus functional/behavioral), "sync" (fast-forward versus commit), and the like — confirm which one is meant via AskUserQuestion before analyzing or acting.
package/hooks/hooks.json CHANGED
@@ -5,11 +5,6 @@
5
5
  {
6
6
  "matcher": "Write|Edit",
7
7
  "hooks": [
8
- {
9
- "type": "command",
10
- "command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/blocking/md_to_html_blocker.py",
11
- "timeout": 10
12
- },
13
8
  {
14
9
  "type": "command",
15
10
  "command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/blocking/write_existing_file_blocker.py",
@@ -255,11 +250,6 @@
255
250
  {
256
251
  "matcher": "Write|Edit",
257
252
  "hooks": [
258
- {
259
- "type": "command",
260
- "command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/workflow/md_to_html_companion.py",
261
- "timeout": 10
262
- },
263
253
  {
264
254
  "type": "command",
265
255
  "command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/validation/mypy_validator.py",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-dev-env",
3
- "version": "1.56.0",
3
+ "version": "1.57.1",
4
4
  "description": "Claude Code development standards — rules, hooks, agents, commands, and skills",
5
5
  "type": "module",
6
6
  "bin": {
@@ -66,7 +66,8 @@ own. The workflow runs in the background and notifies this session on
66
66
  completion. Watch live progress with `/workflows`.
67
67
 
68
68
  The workflow returns
69
- `{ converged, rounds, finalSha, blocker }`.
69
+ `{ converged, rounds, finalSha, blocker, standardsNote }`. Every agent the
70
+ workflow spawns runs on Fable 5 (`model: 'fable'`).
70
71
 
71
72
  ## Budget-aware round boundaries
72
73
 
@@ -96,6 +97,7 @@ round records nothing resumable and replays dirty.
96
97
  Rounds: <N>
97
98
  Final commit: <finalSha>
98
99
  Blocker: <blocker> # only when blocked
100
+ Standards: <standardsNote> # only when a round deferred code-standard findings
99
101
  ```
100
102
 
101
103
  ## What the workflow does each round
@@ -111,6 +113,12 @@ run ends short of ready. Hard-won failure lessons live in
111
113
  `clean-coder` applies all fixes in a single commit, pushes, replies to and
112
114
  resolves any bot threads; re-verify next round on the new HEAD. When all
113
115
  three are clean on a stable HEAD, post the CLEAN bugteam audit artifact.
116
+ A round whose findings are ALL code-standard violations (pure CODE_RULES/style,
117
+ no behavioral impact) passes for convergence purposes: the workflow files a
118
+ follow-up issue listing the findings, opens a draft environment-hardening PR
119
+ (hooks/rules that block those violation classes at Write/Edit time), resolves
120
+ any bot threads with a deferral note, and reports the deferral in
121
+ `standardsNote`.
114
122
  - **Copilot gate:** request a Copilot review, poll up to three times; findings
115
123
  route back into Converge, a no-show after the cap is a blocker.
116
124
  - **Convergence check:** `check_convergence.py` is the authoritative gate; on a
@@ -44,11 +44,12 @@ const LENS_SCHEMA = {
44
44
  file: { type: 'string' },
45
45
  line: { type: 'integer' },
46
46
  severity: { type: 'string', enum: ['P0', 'P1', 'P2'] },
47
+ category: { type: 'string', enum: ['bug', 'code-standard'], description: 'code-standard for pure CODE_RULES/style violations with no behavioral impact; bug otherwise' },
47
48
  title: { type: 'string' },
48
49
  detail: { type: 'string' },
49
50
  replyToCommentId: { type: ['integer', 'null'], description: 'GitHub review comment id to reply to and resolve, or null when the finding has no thread' },
50
51
  },
51
- required: ['file', 'line', 'severity', 'title', 'detail', 'replyToCommentId'],
52
+ required: ['file', 'line', 'severity', 'category', 'title', 'detail', 'replyToCommentId'],
52
53
  },
53
54
  },
54
55
  },
@@ -415,7 +416,7 @@ async function resolveHead() {
415
416
  `Print the current HEAD SHA of ${prCoordinates}. Run exactly:\n` +
416
417
  `gh api repos/${input.owner}/${input.repo}/pulls/${input.prNumber} --jq .head.sha\n` +
417
418
  `Return the full 40-character SHA in the sha field. Do not modify any files.`,
418
- { label: 'resolve-head', phase: 'Converge', schema: HEAD_SCHEMA, agentType: 'Explore' },
419
+ { model: 'fable', label: 'resolve-head', phase: 'Converge', schema: HEAD_SCHEMA, agentType: 'Explore' },
419
420
  )
420
421
  return head?.sha
421
422
  }
@@ -433,7 +434,7 @@ function prefetchMainForRound() {
433
434
  `Refresh the base ref for ${prCoordinates} so the parallel review lenses can diff against an up-to-date origin/main without each running its own fetch. Run exactly:\n` +
434
435
  `git fetch origin main\n` +
435
436
  `Do not edit, commit, push, rebase, or modify any files — fetch only.`,
436
- { label: 'prefetch-main', phase: 'Converge', agentType: 'Explore' },
437
+ { model: 'fable', label: 'prefetch-main', phase: 'Converge', agentType: 'Explore' },
437
438
  )
438
439
  }
439
440
 
@@ -461,8 +462,8 @@ function runBugbotLens(head) {
461
462
  ` - If a clean review exists on HEAD -> return clean.\n` +
462
463
  `4. No review yet on HEAD: check_bugbot_ci.py --check-active. If active (exit 0), poll: repeat check_bugbot_ci.py --check-clean / --check-active every 60 seconds (delay each iteration with "sleep 60", or the PowerShell alternative "Start-Sleep -Seconds 60") for up to 25 iterations, then re-fetch the review. If not active (exit 1), post the literal comment "bugbot run" (no @mention, no other text) via python "${CONFIG.sharedScripts}/post_fix_reply.py" --owner ${input.owner} --repo ${input.repo} --pr-number ${input.prNumber} --body "bugbot run", delay 8 seconds with "sleep 8" (PowerShell alternative "Start-Sleep -Seconds 8"), then poll as above.\n` +
463
464
  `5. If after the full poll budget Bugbot has neither a check run nor a review on HEAD -> return {sha:${'`'}${head}${'`'}, clean:true, down:true, findings:[]} (treat as down).\n\n` +
464
- `Scope is the whole PR; you are only reading Bugbot's own output here. Return strictly the schema.`,
465
- { label: 'lens:bugbot', phase: 'Converge', schema: LENS_SCHEMA },
465
+ `Scope is the whole PR; you are only reading Bugbot's own output here. For each finding set category: 'code-standard' when it is a pure CODE_RULES/style violation (naming, comments, type hints, magic values, structure) with no behavioral impact; 'bug' otherwise. Return strictly the schema.`,
466
+ { model: 'fable', label: 'lens:bugbot', phase: 'Converge', schema: LENS_SCHEMA },
466
467
  )
467
468
  }
468
469
 
@@ -477,8 +478,8 @@ function runCodeReviewLens(head) {
477
478
  `You are the code-review lens for ${prCoordinates}, HEAD ${head}.\n\n` +
478
479
  `Review the FULL origin/main...HEAD diff — every file the PR touches. Do NOT delta-scope to recent commits or to a single file. The workflow already fetched origin/main this round, so do NOT run git fetch; run git diff --name-only origin/main...HEAD to enumerate the changed files, then review the complete diff of each.\n\n` +
479
480
  `Apply correctness-focused review: real bugs, broken logic, incorrect error handling, data-loss or security risks, contract mismatches, and reuse/simplification problems. Report only defensible findings with concrete file:line evidence.\n\n` +
480
- `Do NOT edit, commit, or push — reporting only. Return strictly the schema: clean=true with empty findings when the diff is sound, otherwise one entry per finding (severity P0/P1/P2, replyToCommentId=null since these are not yet GitHub threads). Set sha=${'`'}${head}${'`'}, down=false.`,
481
- { label: 'lens:code-review', phase: 'Converge', schema: LENS_SCHEMA, agentType: 'code-quality-agent' },
481
+ `Do NOT edit, commit, or push — reporting only. Return strictly the schema: clean=true with empty findings when the diff is sound, otherwise one entry per finding (severity P0/P1/P2; category 'code-standard' for pure CODE_RULES/style violations with no behavioral impact, 'bug' otherwise; replyToCommentId=null since these are not yet GitHub threads). Set sha=${'`'}${head}${'`'}, down=false.`,
482
+ { model: 'fable', label: 'lens:code-review', phase: 'Converge', schema: LENS_SCHEMA, agentType: 'code-quality-agent' },
482
483
  )
483
484
  }
484
485
 
@@ -493,8 +494,8 @@ function runAuditLens(head) {
493
494
  `You are the second-opinion bug-audit lens for ${prCoordinates}, HEAD ${head}.\n\n` +
494
495
  `Read the audit rubric at ${CONFIG.bugteamRubric} and apply its categories (A through P) against the FULL origin/main...HEAD diff — every file the PR touches, never a delta cut. The workflow already fetched origin/main this round, so do NOT run git fetch; run git diff --name-only origin/main...HEAD first to enumerate scope.\n\n` +
495
496
  `This is a clean-room audit: assume nothing from other lenses. Report only findings backed by concrete file:line evidence. Do NOT edit, commit, or push.\n\n` +
496
- `Return strictly the schema: clean=true with empty findings when the diff passes every category, otherwise one entry per finding (severity P0/P1/P2, replyToCommentId=null). Set sha=${'`'}${head}${'`'}, down=false.`,
497
- { label: 'lens:bug-audit', phase: 'Converge', schema: LENS_SCHEMA, agentType: 'code-quality-agent' },
497
+ `Return strictly the schema: clean=true with empty findings when the diff passes every category, otherwise one entry per finding (severity P0/P1/P2; category 'code-standard' for pure CODE_RULES/style violations with no behavioral impact, 'bug' otherwise; replyToCommentId=null). Set sha=${'`'}${head}${'`'}, down=false.`,
498
+ { model: 'fable', label: 'lens:bug-audit', phase: 'Converge', schema: LENS_SCHEMA, agentType: 'code-quality-agent' },
498
499
  )
499
500
  }
500
501
 
@@ -532,7 +533,7 @@ function applyFixes(head, findings, sourceLabel) {
532
533
  `- When you commit and push a fix: newSha=the new HEAD SHA after your push, pushed=true, resolvedWithoutCommit=false.\n` +
533
534
  `- When every finding was already addressed so no code change is needed — yet you still resolved each GitHub review thread above: newSha=${head} (the unchanged HEAD), pushed=false, resolvedWithoutCommit=true. Only set this when every thread that carries a comment id is resolved; otherwise the round is treated as stalled.\n` +
534
535
  `Always include a one-line summary.`,
535
- { label: `fix:${sourceLabel}`, phase: 'Converge', schema: FIX_SCHEMA, agentType: 'clean-coder' },
536
+ { model: 'fable', label: `fix:${sourceLabel}`, phase: 'Converge', schema: FIX_SCHEMA, agentType: 'clean-coder' },
536
537
  )
537
538
  }
538
539
 
@@ -548,7 +549,7 @@ function postCleanAudit(head) {
548
549
  `Write an empty findings file: create a temp file containing exactly [] (an empty JSON array). Then run:\n` +
549
550
  `python "${CONFIG.prLoopScripts}/post_audit_thread.py" --skill bugteam --owner ${input.owner} --repo ${input.repo} --pr-number ${input.prNumber} --commit ${head} --state CLEAN --findings-json <temp-file>\n` +
550
551
  `Run the script with --help first if any flag name differs. This posts the APPROVE review body that check_convergence.py reads for the bugteam gate. Do not edit code, commit, or push.`,
551
- { label: 'post-clean-audit', phase: 'Converge', agentType: 'general-purpose' },
552
+ { model: 'fable', label: 'post-clean-audit', phase: 'Converge', agentType: 'general-purpose' },
552
553
  )
553
554
  }
554
555
 
@@ -565,10 +566,10 @@ function runCopilotGate(head) {
565
566
  ` gh api --method POST repos/${input.owner}/${input.repo}/pulls/${input.prNumber}/requested_reviewers -f 'reviewers[]=copilot-pull-request-reviewer[bot]'\n` +
566
567
  `2. Poll for Copilot's review on HEAD ${head}: up to ${CONFIG.copilotMaxPolls} attempts, 360 seconds apart (delay each attempt with "sleep 360", or the PowerShell alternative "Start-Sleep -Seconds 360"). Each attempt: python "${CONFIG.sharedScripts}/fetch_copilot_reviews.py" --owner ${input.owner} --repo ${input.repo} --pr-number ${input.prNumber} for the top-level review state, plus gh api "repos/${input.owner}/${input.repo}/pulls/${input.prNumber}/comments" --paginate --slurp for inline comment ids (Copilot's login contains "copilot", case-insensitive). Only count entries whose commit_id starts with ${head}.\n` +
567
568
  ` - Copilot review present and clean/approved on HEAD -> return {sha:${'`'}${head}${'`'}, clean:true, findings:[], blocker:null}.\n` +
568
- ` - Copilot findings on HEAD -> return them (each with its inline comment id in replyToCommentId), clean:false, blocker:null.\n` +
569
+ ` - Copilot findings on HEAD -> return them (each with its inline comment id in replyToCommentId; category 'code-standard' for pure CODE_RULES/style violations with no behavioral impact, 'bug' otherwise), clean:false, blocker:null.\n` +
569
570
  ` - No review after ${CONFIG.copilotMaxPolls} attempts -> return {sha:${'`'}${head}${'`'}, clean:false, findings:[], blocker:"Copilot did not surface a review on HEAD after ${CONFIG.copilotMaxPolls} polls"}.\n\n` +
570
571
  `Return strictly the schema.`,
571
- { label: 'copilot-gate', phase: 'Copilot gate', schema: COPILOT_SCHEMA },
572
+ { model: 'fable', label: 'copilot-gate', phase: 'Copilot gate', schema: COPILOT_SCHEMA },
572
573
  )
573
574
  }
574
575
 
@@ -585,7 +586,7 @@ function checkConvergence(bugbotDown) {
585
586
  `Exit 0 -> every gate passed: return {pass:true, failures:[]}.\n` +
586
587
  `Exit 1 -> return {pass:false, failures:[<each printed FAIL line verbatim>]}.\n` +
587
588
  `Exit 2 -> retry once; if it still errors, return {pass:false, failures:["check_convergence gh error"]}.`,
588
- { label: 'check-convergence', phase: 'Finalize', schema: CONVERGENCE_SCHEMA, agentType: 'Explore' },
589
+ { model: 'fable', label: 'check-convergence', phase: 'Finalize', schema: CONVERGENCE_SCHEMA, agentType: 'Explore' },
589
590
  )
590
591
  }
591
592
 
@@ -600,7 +601,7 @@ function markReady(head) {
600
601
  `1. Run: gh pr ready ${input.prNumber} --repo ${input.owner}/${input.repo}\n` +
601
602
  `2. Re-query the draft state: gh api repos/${input.owner}/${input.repo}/pulls/${input.prNumber} --jq .draft\n` +
602
603
  `Return {ready:true} only when step 2 prints false (the PR is no longer a draft). If step 1 errors or step 2 still prints true, return {ready:false}.`,
603
- { label: 'mark-ready', phase: 'Finalize', schema: READY_SCHEMA, agentType: 'general-purpose' },
604
+ { model: 'fable', label: 'mark-ready', phase: 'Finalize', schema: READY_SCHEMA, agentType: 'general-purpose' },
604
605
  )
605
606
  }
606
607
 
@@ -623,7 +624,51 @@ function repairConvergence(head, failures) {
623
624
  `- PR not mergeable: rebase onto origin/main and force-push (git fetch origin main; git rebase origin/main; resolve conflicts; git push --force-with-lease).\n` +
624
625
  `- A dirty bot review or a still-pending requested reviewer: leave it; the next round re-runs that reviewer.\n` +
625
626
  `Make at most one commit for any code fix. Return the HEAD SHA after any push in newSha (the unchanged ${head} when nothing was pushed), pushed true/false, resolvedWithoutCommit=false (this gate already accepts an unchanged HEAD), and a one-line summary.`,
626
- { label: 'repair-convergence', phase: 'Finalize', schema: FIX_SCHEMA, agentType: 'clean-coder' },
627
+ { model: 'fable', label: 'repair-convergence', phase: 'Finalize', schema: FIX_SCHEMA, agentType: 'clean-coder' },
628
+ )
629
+ }
630
+
631
+ /**
632
+ * Decide whether a review round surfaced ONLY code-standard violations — pure
633
+ * CODE_RULES/style findings with no behavioral impact. Such a round passes for
634
+ * convergence purposes: the violations are deferred to a follow-up fix issue
635
+ * (plus an environment-hardening PR) rather than blocking this PR.
636
+ * @param {Array<object>} findings deduped findings for the round
637
+ * @returns {boolean} true when every finding is category code-standard
638
+ */
639
+ function isStandardsOnlyRound(findings) {
640
+ return findings.length > 0 && findings.every((each) => each.category === 'code-standard')
641
+ }
642
+
643
+ /**
644
+ * Defer a standards-only round: one agent files a GitHub issue listing every
645
+ * code-standard finding, opens a draft PR hardening the Claude environment
646
+ * (hooks/rules) so those violation classes are blocked before code is written,
647
+ * and replies to / resolves any GitHub threads the findings carry, noting the
648
+ * deferral. This PR's branch is never touched.
649
+ * @param {string} head PR HEAD SHA the findings were raised against
650
+ * @param {Array<object>} findings deduped code-standard-only findings
651
+ * @param {string} sourceLabel short description of where the findings came from
652
+ * @returns {Promise<string>} agent transcript (unused)
653
+ */
654
+ function spawnStandardsFollowUp(head, findings, sourceLabel) {
655
+ const findingsBlock = findings
656
+ .map((each, position) => {
657
+ const eachThreadIds = collectFindingThreadIds(each)
658
+ const threadNote = eachThreadIds.length
659
+ ? `\n (GitHub review comment ids: ${eachThreadIds.join(', ')})`
660
+ : ''
661
+ return `${position + 1}. [${each.severity}] ${each.file}:${each.line} — ${each.title}\n ${each.detail}${threadNote}`
662
+ })
663
+ .join('\n')
664
+ return agent(
665
+ `A review round on ${prCoordinates}, HEAD ${head}, surfaced ONLY code-standard violations (CODE_RULES/style, no behavioral impact). The convergence run treats the round as passed and defers these to follow-up work, which you now create. Do NOT commit or push to the PR's own branch.\n\n` +
666
+ `Findings:\n${findingsBlock}\n\n` +
667
+ `1. Follow-up fix issue: file a GitHub issue on ${input.owner}/${input.repo} (gh issue create --body-file with a temp file) titled "Deferred code-standard fixes from PR #${input.prNumber}". The body references the PR and lists each finding with its file:line, severity, and detail. The issue carries the fix work; do not open a fix PR.\n` +
668
+ `2. Environment-hardening PR: in the Claude environment config repo (the repo owning ~/.claude hooks and rules — JonEcho/llm-settings for hooks, jl-cmd/claude-code-config for rules/skills; pick whichever owns the needed surface), create a branch and open a DRAFT PR that hardens hooks/rules so each violation class found here is blocked at Write/Edit time, before code is written or reviewed. Reference the issue from step 1 in the PR body.\n` +
669
+ `3. For each finding that carries a GitHub review comment id: post an inline reply via python "${CONFIG.sharedScripts}/post_fix_reply.py" --owner ${input.owner} --repo ${input.repo} --pr-number ${input.prNumber} --in-reply-to <id> --body "Code-standard-only finding — deferred to follow-up issue <url>." Then resolve the thread by its PRRT_ node id (GraphQL lookup on comment databaseId, then resolveReviewThread or the github MCP pull_request_review_write method=resolve_thread).\n\n` +
670
+ `Return a one-line summary naming the follow-up issue URL and the hardening PR URL.`,
671
+ { model: 'fable', label: `standards-followup:${sourceLabel}`, phase: 'Converge', agentType: 'clean-coder' },
627
672
  )
628
673
  }
629
674
 
@@ -633,6 +678,7 @@ let rounds = 0
633
678
  let iterations = 0
634
679
  let blocker = null
635
680
  let bugbotDown = input.bugbotDisabled || false
681
+ let standardsNote = null
636
682
 
637
683
  while (iterations < CONFIG.maxIterations) {
638
684
  iterations += 1
@@ -657,6 +703,14 @@ while (iterations < CONFIG.maxIterations) {
657
703
  continue
658
704
  }
659
705
  const findings = roundOutcome.findings
706
+ if (isStandardsOnlyRound(findings)) {
707
+ log(`Round ${rounds}: ${findings.length} code-standard-only finding(s) — deferring to follow-up PRs and treating the round as passed`)
708
+ await spawnStandardsFollowUp(head, findings, 'converge-round')
709
+ standardsNote = `${findings.length} code-standard finding(s) deferred to a follow-up fix issue plus an environment-hardening PR — verify both land`
710
+ await postCleanAudit(head)
711
+ phase = 'COPILOT'
712
+ continue
713
+ }
660
714
  if (findings.length > 0) {
661
715
  log(`Round ${rounds}: ${findings.length} finding(s) — applying fixes`)
662
716
  const fixResult = await applyFixes(head, findings, 'converge-round')
@@ -693,6 +747,13 @@ while (iterations < CONFIG.maxIterations) {
693
747
  break
694
748
  }
695
749
  if (copilotOutcome.kind === 'fix') {
750
+ if (isStandardsOnlyRound(copilotOutcome.findings)) {
751
+ log(`Copilot raised ${copilotOutcome.findings.length} code-standard-only finding(s) — deferring to follow-up PRs and treating the gate as passed`)
752
+ await spawnStandardsFollowUp(head, copilotOutcome.findings, 'copilot')
753
+ standardsNote = `${copilotOutcome.findings.length} code-standard finding(s) deferred to a follow-up fix issue plus an environment-hardening PR — verify both land`
754
+ phase = 'FINALIZE'
755
+ continue
756
+ }
696
757
  log(`Copilot raised ${copilotOutcome.findings.length} finding(s) — fixing and re-converging`)
697
758
  const fixResult = await applyFixes(head, copilotOutcome.findings, 'copilot')
698
759
  const hadThreadBearingFinding = copilotOutcome.findings.some((each) => collectFindingThreadIds(each).length > 0)
@@ -722,7 +783,7 @@ while (iterations < CONFIG.maxIterations) {
722
783
  const readyResult = await markReady(head)
723
784
  const readyOutcome = classifyReadyOutcome(readyResult)
724
785
  if (readyOutcome.converged) {
725
- return { converged: true, rounds, finalSha: head, blocker: null }
786
+ return { converged: true, rounds, finalSha: head, blocker: null, standardsNote }
726
787
  }
727
788
  blocker = readyOutcome.blocker
728
789
  break
@@ -739,4 +800,5 @@ return {
739
800
  rounds,
740
801
  finalSha: head,
741
802
  blocker: blocker || `iteration cap reached (${CONFIG.maxIterations})`,
803
+ standardsNote,
742
804
  }