|
| 1 | +# This action invokes claude to review a PR. |
| 2 | +# This is a generic action - you can customize, or delete in favor of the ontology review PR. |
| 3 | +# -- |
| 4 | +# This github action is from the copier template in https://github.com/ai4curation/github-ai-integrations, donated by the Monarch Initiative |
| 5 | +# For more documentation, see https://ai4curation.github.io/aidocs/how-tos/set-up-github-actions/ |
| 6 | +# Author: Chris Mungall (@cmungall) |
| 7 | +name: Claude Code Ontology Review |
| 8 | + |
| 9 | +on: |
| 10 | + pull_request: |
| 11 | + types: [opened, synchronize] |
| 12 | + paths: |
| 13 | + - "src/ontology" |
| 14 | + |
| 15 | +concurrency: |
| 16 | + group: claude-ontology-review-${{ github.event.pull_request.number }} |
| 17 | + cancel-in-progress: true |
| 18 | + |
| 19 | +jobs: |
| 20 | + claude-review: |
| 21 | + runs-on: ubuntu-latest |
| 22 | + permissions: |
| 23 | + contents: read |
| 24 | + pull-requests: write |
| 25 | + issues: read |
| 26 | + id-token: write |
| 27 | + |
| 28 | + steps: |
| 29 | + - name: Checkout repository |
| 30 | + uses: actions/checkout@v4 |
| 31 | + with: |
| 32 | + fetch-depth: 1 |
| 33 | + |
| 34 | + - name: Run Claude Code Ontology Review |
| 35 | + id: claude-review |
| 36 | + uses: anthropics/claude-code-action@v1 |
| 37 | + with: |
| 38 | + claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} |
| 39 | + |
| 40 | + # Use Opus for ontology review (needs deeper reasoning) |
| 41 | + model: "claude-opus-4-1-20250805" |
| 42 | + |
| 43 | + prompt: | |
| 44 | + REPO: ${{ github.repository }} |
| 45 | + PR NUMBER: ${{ github.event.pull_request.number }} |
| 46 | +
|
| 47 | + This PR modifies critical ontology files. |
| 48 | +
|
| 49 | + Review this PR against our team checklist: |
| 50 | +
|
| 51 | + ## Issue alignment |
| 52 | + - [ ] The PR aligns with the source issue, and only closes it if all components of the issue addressed |
| 53 | + - [ ] The PR summary gives sufficient context for any decisions made, attributing them to issue authors where appropriate |
| 54 | +
|
| 55 | + ## Ontology Metadata |
| 56 | + - [ ] PR is linked to source issue(s) via appropriate annotation property |
| 57 | + - [ ] any added definitions have provenance |
| 58 | +
|
| 59 | + ## Identifiers and hallucinations |
| 60 | + - [ ] all identifiers are CURIEs (or URLs), with standard prefixes |
| 61 | + - [ ] I have looked up term identifiers and confirm that they denote what is intended |
| 62 | + - [ ] all PMIDs and publication references resolve to the appropriate article/title |
| 63 | +
|
| 64 | + ## Design patterns (DPs) |
| 65 | + - [ ] any new terms conform to documented DPs for this ontology |
| 66 | + - [ ] if the term fits into a DP, then the label is constructed in a standard way (although scientific norms prevail) |
| 67 | + - [ ] if the term is compositional in nature, then it should conform to a DP, and have a relevant logical definition |
| 68 | +
|
| 69 | + ## Definitions (if the PR adds or updates a definition) |
| 70 | + - [ ] Definitions are present for any new term |
| 71 | + - [ ] Definitions conform to the style guide for this ontology |
| 72 | + - [ ] Definitions follows genus-differentia form (while prioritizing normal scientific phrasing over awkward ontology language) |
| 73 | + - [ ] The genus of the definition is an ancestor of the term |
| 74 | + - [ ] The differentia of the definition are necessary and sufficient for distinguishing from the genus |
| 75 | + - [ ] The definition has appropriate provenance |
| 76 | + - [ ] I have looked up the provenance, and it is correct and relevant |
| 77 | + - [ ] The label, definition, and logical definition (when present) are largely consistent |
| 78 | +
|
| 79 | + ## Relationships and logical axioms |
| 80 | + - [ ] If a logical definition is not present, then there should be at least one is_a (subClassOf) to the most precise parent term |
| 81 | + - [ ] If a logical definition is present, then there is reasonable expectation the term should classify precisely |
| 82 | + - [ ] Other relationships are present to a reasonable degree and as dictated by the general ontology stye (e.g part-ofs for anatomy) |
| 83 | + - [ ] Additional logical axioms (such as disjointness) are added as appropriate, depending on ontology style, and design patterns |
| 84 | + - [ ] Additional logical axioms make sense and do not over-constrain |
| 85 | +
|
| 86 | + Be constructive and helpful in your feedback. |
| 87 | +
|
| 88 | + # Reuse same comment on subsequent pushes (avoids review pile-ons) |
| 89 | + use_sticky_comment: true |
0 commit comments