Skip to content

ci: replace Copilot with Claude Code review gate and @claude assistant - #338

Merged
blindzero merged 3 commits into
mainfrom
issues/327-replace-copilot-with-claude-code
Oct 31, 2026
Merged

blindzero merged 3 commits into
mainfrom
issues/327-replace-copilot-with-claude-code

Conversation

@blindzero

Copy link
Copy Markdown
Owner

Summary

Replaces GitHub Copilot with Claude Code: an automated PR review that acts as a merge gate, plus an interactive @claude assistant. Authentication uses Workload Identity Federation (no ANTHROPIC_API_KEY).

Motivation

See #327.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactoring / internal improvement

Changes

  • CLAUDE.md: imports @AGENTS.md, Claude-specific notes only.
  • .claude/skills/idle-pr-review/SKILL.md: review procedure, severity levels (CRITICAL/MAJOR/MINOR/NIT) and verdict rule (BLOCK only on CRITICAL). Rules are referenced from AGENTS.md, STYLEGUIDE.md, CONTRIBUTING.md and docs/*, not duplicated.
  • .github/workflows/claude-review.yml: review on opened/synchronize/reopened/ready_for_review; drafts, forks and Dependabot skipped via job if:; no paths-ignore. Fail-open with warning annotation + job summary.
  • .github/workflows/claude.yml: @claude for OWNER/MEMBER/COLLABORATOR, commit signing enabled.
  • Removed .github/copilot-instructions.md.
  • CONTRIBUTING.md / AGENTS.md §10: document the review gate, local skill usage and @claude.
  • .gitignore: ignore .claude/settings.local.json and CLAUDE.local.md.

Deviations from / additions to the issue

  1. Verdict via structured output (--json-schema) instead of a verdict file. A file in the workspace could be pre-committed by a PR; structured output also needs no write tools. The verdict is passed to the gate step via env: only (no interpolation into the script).
  2. allowed_bots: claude in the review, otherwise the action's actor check rejects claude[bot] pushes and Claude's own commits would not be re-reviewed.
  3. Dependabot PRs skipped, since the actor check would reject them anyway (permanent fail-open warning).
  4. Federation rule selected per event in claude.yml: pull_request_review* events run in PR context (OIDC sub = …:pull_request), issues/issue_comment on the default branch (…:ref:refs/heads/main). Review events on fork PRs are skipped (no OIDC token).
  5. WIF identifiers as repository variables (ANTHROPIC_ORGANIZATION_ID, ANTHROPIC_SERVICE_ACCOUNT_ID, ANTHROPIC_FEDERATION_RULE_ID_PR, ANTHROPIC_FEDERATION_RULE_ID_MAIN, optional ANTHROPIC_WORKSPACE_ID).
  6. classify_inline_comments: false set explicitly (requires an API key).

Testing

  • Unit tests
  • Contract tests
  • Manual testing

No PowerShell changes. Local Pester run: 886 passed, 2 failed; both failures are locale-related (German exception messages) and identical on main.

How to test & review

  • This PR triggers claude-review.yml itself. The skill is not on main yet (the action restores .claude/ from the base branch), so this first review runs without it; the gate is fail-open.
  • claude.yml only runs after merge (comment/issue events use the default-branch workflow).
  • After merge: add "Claude review" as required status check in the main ruleset and verify the acceptance criteria from Replace GitHub Copilot with Claude Code: PR review gate and @claude assistant #327 on a test PR.

Checklist

  • Code follows STYLEGUIDE.md
  • Tests added or updated
  • Documentation updated
  • No UI/auth logic added to IdLE.Core
  • No breaking changes without discussion

Related Issues

Closes #327

🤖 Generated with Claude Code

blindzero and others added 2 commits October 31, 2026 19:52
- Add CLAUDE.md (imports AGENTS.md) and the idle-pr-review skill
- Add claude-review.yml: automated PR review with PASS/BLOCK verdict gate (fail-open)
- Add claude.yml: @claude assistant restricted to OWNER/MEMBER/COLLABORATOR
- Authenticate via Workload Identity Federation (no static API key)
- Remove .github/copilot-instructions.md
- Document the review gate and @claude in CONTRIBUTING.md and AGENTS.md

Refs #327

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-31T18:58:29.719316Z 43e133c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Code Coverage Report

Overall Project 74.29% 🍏

There is no coverage information present for the Files changed

@blindzero
blindzero merged commit f916a34 into main Oct 31, 2026
6 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 43e133cc20

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +25 to +27
(github.event_name == 'issue_comment' &&
contains(github.event.comment.body, '@claude') &&
contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)) ||

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Skip fork PR conversations in the write-token assistant

When a trusted maintainer comments @claude on a fork PR, this issue_comment branch still runs; unlike the review-event branches below, it has no head.repo.full_name guard. The action processes the PR checkout with a write-capable GitHub App token, and the Pester/ScriptAnalyzer commands allowed below execute PR-controlled scripts that can exfiltrate that token. The action passes its GitHub token into the session environment and warns about prompt injection from untrusted PR content. Skip fork PRs on this path or prevent PR-controlled commands from running with the write token.

AGENTS.md reference: AGENTS.md:L145-L150

Useful? React with 👍 / 👎.

@blindzero
blindzero deleted the issues/327-replace-copilot-with-claude-code branch October 31, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace GitHub Copilot with Claude Code: PR review gate and @claude assistant

1 participant