Skip to content

Commit abf3a41

Browse files
committed
Enable claude reviews. (#27)
At least... trying to. Using the example from https://github.com/anthropics/claude-code-action/blob/main/examples/pr-review-comprehensive.yml
1 parent f3622d0 commit abf3a41

File tree

3 files changed

+79
-2
lines changed

3 files changed

+79
-2
lines changed

.github/workflows/claude.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: PR Review with Progress Tracking
2+
3+
# This example demonstrates how to use the track_progress feature to get
4+
# visual progress tracking for PR reviews, similar to v0.x agent mode.
5+
6+
on:
7+
pull_request:
8+
types: [opened, synchronize, ready_for_review, reopened]
9+
10+
jobs:
11+
review-with-tracking:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
pull-requests: write
16+
id-token: write
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v5
20+
with:
21+
fetch-depth: 1
22+
23+
- name: PR Review with Progress Tracking
24+
uses: anthropics/claude-code-action@v1
25+
with:
26+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
27+
28+
# Enable progress tracking
29+
track_progress: true
30+
31+
show_full_output: true
32+
33+
# Your custom review instructions
34+
prompt: |
35+
REPO: ${{ github.repository }}
36+
PR NUMBER: ${{ github.event.pull_request.number }}
37+
38+
Perform a comprehensive code review with the following focus areas:
39+
40+
1. **Code Quality**
41+
- Clean code principles and best practices
42+
- Proper error handling and edge cases
43+
- Code readability and maintainability
44+
45+
2. **Security**
46+
- Check for potential security vulnerabilities
47+
- Validate input sanitization
48+
- Review authentication/authorization logic
49+
50+
3. **Performance**
51+
- Identify potential performance bottlenecks
52+
- Review database queries for efficiency
53+
- Check for memory leaks or resource issues
54+
55+
4. **Testing**
56+
- Verify adequate test coverage
57+
- Review test quality and edge cases
58+
- Check for missing test scenarios
59+
60+
5. **Documentation**
61+
- Ensure code is properly documented
62+
- Verify README updates for new features
63+
- Check API documentation accuracy
64+
65+
Provide detailed feedback using inline comments for specific issues.
66+
Use top-level comments for general observations or praise.
67+
68+
# Tools for comprehensive PR review
69+
claude_args: |
70+
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)"

AGENTS.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
# Cursor AI Rules for the Doubloon Project (Python Textual TUI)
22

3+
## PRIME DIRECTIVES
4+
5+
- **MUST NEVER BE OBSEQUIOUS OR SYCOPHANTIC**
6+
- **MUST NEVER LIE OR DECEIVE: TRUTH IS PARAMOUNT**
7+
38
## General Guidelines
49

510
- You are an expert Python developer with extensive experience in building text-based user interfaces (TUIs) using the Textual framework.
611
- You MUST adhere to best practices in Python programming, including code readability, maintainability, and performance.
712
- You MUST follow the specific coding standards and guidelines outlined in this document.
13+
- You MUST always write **elegant and beautiful code** and strive to be as **concise and parsimonious** as possible.
814
- You MUST write clear, concise, and informative docstrings for all public classes, functions, and methods.
915
- You MUST write comprehensive unit tests using pytest to ensure code quality and reliability.
1016
- You MUST follow the principles of clean code and software design patterns.
1117
- You MUST prioritize user experience in the TUI design, ensuring intuitive navigation and responsiveness.
1218
- You MUST communicate clearly and effectively, providing explanations and justifications for your code decisions.
1319
- You MUST be proactive in identifying potential issues and suggesting improvements.
1420
- You MUST be collaborative and open to feedback from other developers.
15-
- **MUST NEVER BE OBSEQUIOUS OR SYCOPHANTIC**
1621

1722
## Technology Stack
1823

@@ -27,6 +32,8 @@ Run tests and linters using `uv run <command>`.
2732

2833
If you need to run python directly, use `uv run python <args>` to ensure the correct environment is used.
2934

35+
IMPORTANT: Whenever you run a uv command, you need to set the UV_CACHE_DIR pointing to the local `.uv_cache` directory of the project. This is due to an issue out of our control.
36+
3037
## Project Structure and Architecture
3138

3239
### Textual TUI Integration

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
@AGENTS.md
1+
Follow rules from @AGENTS.md

0 commit comments

Comments
 (0)