Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 11 additions & 49 deletions .github/workflows/claude-code-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,20 @@ name: Claude Code Review
on:
pull_request:
types: [opened, synchronize]
# Optional: Only run on specific file changes
# paths:
# - "src/**/*.ts"
# - "src/**/*.tsx"
# - "src/**/*.js"
# - "src/**/*.jsx"

concurrency:
group: claude-review-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
claude-review:
# Optional: Filter by PR author
# if: |
# github.event.pull_request.user.login == 'external-contributor' ||
# github.event.pull_request.user.login == 'new-developer' ||
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'

runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
pull-requests: write
issues: read
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -33,46 +25,16 @@ jobs:

- name: Run Claude Code Review
id: claude-review
uses: anthropics/claude-code-action@beta
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}

# Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4)
# model: "claude-opus-4-20250514"

# Direct prompt for automated review (no @claude mention needed)
direct_prompt: |
prompt: |
Please review this pull request and provide feedback on:
- Code quality and best practices
- Potential bugs or issues
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

The prompt in the repo's workflow file has been customized to include "Whether template files are consistent with the repo's own workflow files" which is specific to this repository's purpose (providing templates). However, this same prompt is removed from the template version (template/.github/workflows/claude-code-review.yml), which is appropriate. The template version has fewer review criteria (missing "Performance considerations" and "Security concerns"). Consider whether these criteria should be restored in the template to provide more comprehensive code review guidance to users adopting this template.

Suggested change
- Potential bugs or issues
- Potential bugs or issues
- Performance considerations
- Security concerns

Copilot uses AI. Check for mistakes.
- Performance considerations
- Security concerns
- Test coverage

Be constructive and helpful in your feedback.
- Whether template files are consistent with the repo's own workflow files

# Optional: Use sticky comments to make Claude reuse the same comment on subsequent pushes to the same PR
# use_sticky_comment: true

# Optional: Customize review based on file types
# direct_prompt: |
# Review this PR focusing on:
# - For TypeScript files: Type safety and proper interface usage
# - For API endpoints: Security, input validation, and error handling
# - For React components: Performance, accessibility, and best practices
# - For tests: Coverage, edge cases, and test quality

# Optional: Different prompts for different authors
# direct_prompt: |
# ${{ github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' &&
# 'Welcome! Please review this PR from a first-time contributor. Be encouraging and provide detailed explanations for any suggestions.' ||
# 'Please provide a thorough code review focusing on our coding standards and best practices.' }}

# Optional: Add specific tools for running tests or linting
# allowed_tools: "Bash(npm run test),Bash(npm run lint),Bash(npm run typecheck)"

# Optional: Skip review for certain conditions
# if: |
# !contains(github.event.pull_request.title, '[skip-review]') &&
# !contains(github.event.pull_request.title, '[WIP]')
Be constructive and helpful in your feedback.

use_sticky_comment: true
41 changes: 5 additions & 36 deletions .github/workflows/claude.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ jobs:

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Install python tools
run: |
uv sync

- name: Run Claude Code
id: claude
uses: anthropics/claude-code-action@beta
uses: anthropics/claude-code-action@v1

with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
mcp_config: |
Expand All @@ -51,40 +51,9 @@ jobs:
"args": [
"ols-mcp"
]
},
"sequential-thinking": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-sequential-thinking"
]
}
}
}

# This is an optional setting that allows Claude to read CI results on PRs
additional_permissions: |
actions: read

# Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4.1)
# model: "claude-opus-4-1-20250805"

# Optional: Customize the trigger phrase (default: @claude)
# trigger_phrase: "/claude"

# Optional: Trigger when specific user is assigned to an issue
# assignee_trigger: "claude-bot"

# Optional: Allow Claude to run specific commands
allowed_tools: "Bash(*),FileEdit,Edit,MultiEdit,WebSearch,WebFetch,mcp__ols_mcp__search_all_ontologies,mcp__ols_mcp__get_terms_from_ontology"

# Optional: Add custom instructions for Claude to customize its behavior for your project
# custom_instructions: |
# Follow our coding standards
# Ensure all new code has tests
# Use TypeScript for new files

# Optional: Custom environment variables for Claude
# claude_env: |
# NODE_ENV: test

claude_args: |
--permission-mode bypassPermissions
Comment on lines +58 to +59
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

The repo's claude.yml file has been modified differently from the template version. The repo version removes allowed_tools, removes the sequential-thinking MCP server, and adds claude_args: --permission-mode bypassPermissions, but the template version keeps allowed_tools and sequential-thinking. This inconsistency is not mentioned in the PR description and could lead to different behavior between the template and the repo's own workflows. Are these intentional differences or should the files be kept consistent?

Copilot uses AI. Check for mistakes.
49 changes: 13 additions & 36 deletions template/.github/workflows/claude-code-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,25 @@ on:
# paths:
# - "src/**/*.ts"
# - "src/**/*.tsx"
# - "src/**/*.js"
# - "src/**/*.jsx"

concurrency:
group: claude-review-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
claude-review:
# Optional: Filter by PR author
# if: |
# github.event.pull_request.user.login == 'external-contributor' ||
# github.event.pull_request.user.login == 'new-developer' ||
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'

runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
pull-requests: write
issues: read
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -33,46 +34,22 @@ jobs:

- name: Run Claude Code Review
id: claude-review
uses: anthropics/claude-code-action@beta
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}

# Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4)
# model: "claude-opus-4-20250514"

# Direct prompt for automated review (no @claude mention needed)
direct_prompt: |

prompt: |
Please review this pull request and provide feedback on:
- Code quality and best practices
- Potential bugs or issues
- Performance considerations
- Security concerns
- Test coverage

Be constructive and helpful in your feedback.

# Optional: Use sticky comments to make Claude reuse the same comment on subsequent pushes to the same PR
# use_sticky_comment: true

# Optional: Customize review based on file types
# direct_prompt: |
# Review this PR focusing on:
# - For TypeScript files: Type safety and proper interface usage
# - For API endpoints: Security, input validation, and error handling
# - For React components: Performance, accessibility, and best practices
# - For tests: Coverage, edge cases, and test quality

# Optional: Different prompts for different authors
# direct_prompt: |
# ${{ github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' &&
# 'Welcome! Please review this PR from a first-time contributor. Be encouraging and provide detailed explanations for any suggestions.' ||
# 'Please provide a thorough code review focusing on our coding standards and best practices.' }}

# Optional: Add specific tools for running tests or linting
# allowed_tools: "Bash(npm run test),Bash(npm run lint),Bash(npm run typecheck)"

# Optional: Skip review for certain conditions
# if: |
# !contains(github.event.pull_request.title, '[skip-review]') &&
# !contains(github.event.pull_request.title, '[WIP]')
Be constructive and helpful in your feedback.

# Reuse same comment on subsequent pushes (avoids review pile-ons)
use_sticky_comment: true
89 changes: 89 additions & 0 deletions template/.github/workflows/claude-ontology-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# This action invokes claude to review a PR.
# This is a generic action - you can customize, or delete in favor of the ontology review PR.
# --
# This github action is from the copier template in https://github.com/ai4curation/github-ai-integrations, donated by the Monarch Initiative
# For more documentation, see https://ai4curation.github.io/aidocs/how-tos/set-up-github-actions/
# Author: Chris Mungall (@cmungall)
name: Claude Code Ontology Review

on:
pull_request:
types: [opened, synchronize]
paths:
- "src/ontology"

concurrency:
group: claude-ontology-review-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
claude-review:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
issues: read
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Run Claude Code Ontology Review
id: claude-review
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}

# Use Opus for ontology review (needs deeper reasoning)
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

This file uses the model version claude-opus-4-1-20250805, which is inconsistent with the commented-out examples in other workflow files (claude.yml and claude-code-review.yml) that reference claude-opus-4-20250514. While the difference might be intentional (using a newer model for ontology review), this inconsistency could confuse users about which model version to use. Consider documenting why this specific model version is preferred for ontology reviews, or standardizing the model version references across all template files.

Suggested change
# Use Opus for ontology review (needs deeper reasoning)
# Use a newer Opus model for ontology review (needs deeper reasoning).
# Note: Other workflow templates may reference an earlier model (e.g. "claude-opus-4-20250514");
# this workflow intentionally uses a newer version, but you can change it to match your standard if preferred.

Copilot uses AI. Check for mistakes.
model: "claude-opus-4-1-20250805"

prompt: |
REPO: ${{ github.repository }}
PR NUMBER: ${{ github.event.pull_request.number }}

This PR modifies critical ontology files.

Review this PR against our team checklist:

## Issue alignment
- [ ] The PR aligns with the source issue, and only closes it if all components of the issue addressed
- [ ] The PR summary gives sufficient context for any decisions made, attributing them to issue authors where appropriate

## Ontology Metadata
- [ ] PR is linked to source issue(s) via appropriate annotation property
- [ ] any added definitions have provenance

## Identifiers and hallucinations
- [ ] all identifiers are CURIEs (or URLs), with standard prefixes
- [ ] I have looked up term identifiers and confirm that they denote what is intended
- [ ] all PMIDs and publication references resolve to the appropriate article/title

## Design patterns (DPs)
- [ ] any new terms conform to documented DPs for this ontology
- [ ] if the term fits into a DP, then the label is constructed in a standard way (although scientific norms prevail)
- [ ] if the term is compositional in nature, then it should conform to a DP, and have a relevant logical definition

## Definitions (if the PR adds or updates a definition)
- [ ] Definitions are present for any new term
- [ ] Definitions conform to the style guide for this ontology
- [ ] Definitions follows genus-differentia form (while prioritizing normal scientific phrasing over awkward ontology language)
- [ ] The genus of the definition is an ancestor of the term
- [ ] The differentia of the definition are necessary and sufficient for distinguishing from the genus
- [ ] The definition has appropriate provenance
- [ ] I have looked up the provenance, and it is correct and relevant
- [ ] The label, definition, and logical definition (when present) are largely consistent

## Relationships and logical axioms
- [ ] If a logical definition is not present, then there should be at least one is_a (subClassOf) to the most precise parent term
- [ ] If a logical definition is present, then there is reasonable expectation the term should classify precisely
- [ ] Other relationships are present to a reasonable degree and as dictated by the general ontology stye (e.g part-ofs for anatomy)
- [ ] Additional logical axioms (such as disjointness) are added as appropriate, depending on ontology style, and design patterns
- [ ] Additional logical axioms make sense and do not over-constrain

Be constructive and helpful in your feedback.

# Reuse same comment on subsequent pushes (avoids review pile-ons)
use_sticky_comment: true
30 changes: 7 additions & 23 deletions template/.github/workflows/claude.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ jobs:

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Install python tools
run: |
uv sync

- name: Run Claude Code
id: claude
uses: anthropics/claude-code-action@beta
uses: anthropics/claude-code-action@v1

with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
mcp_config: |
Expand All @@ -62,29 +62,13 @@ jobs:
}
}

# This is an optional setting that allows Claude to read CI results on PRs
additional_permissions: |
actions: read

# Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4.1)
# model: "claude-opus-4-1-20250805"

# Optional: Customize the trigger phrase (default: @claude)
# trigger_phrase: "/claude"

# Optional: Trigger when specific user is assigned to an issue
# assignee_trigger: "claude-bot"

# Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4)
# model: "claude-opus-4-20250514"

# Optional: Allow Claude to run specific commands
allowed_tools: "Bash(*),FileEdit,Edit,MultiEdit,WebSearch,WebFetch,mcp__ols_mcp__search_all_ontologies,mcp__ols_mcp__get_terms_from_ontology"

# Optional: Add custom instructions for Claude to customize its behavior for your project
# custom_instructions: |
# Follow our coding standards
# Ensure all new code has tests
# Use TypeScript for new files

# Optional: Custom environment variables for Claude
# claude_env: |
# NODE_ENV: test

Loading