Skip to content
Closed
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
59 changes: 0 additions & 59 deletions .github/workflows/checks.yml

This file was deleted.

103 changes: 83 additions & 20 deletions .github/workflows/claude.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
pull_request_review_comment:
types: [created]
pull_request:
types: [opened, synchronize] # opened = new PR, synchronize = new commits pushed
types: [opened, synchronize] # opened = new PR, synchronize = new commits pushed
issues:
types: [opened, assigned]

Expand All @@ -14,42 +14,105 @@ permissions:
pull-requests: write
issues: write
id-token: write
actions: read # Required for Claude to read CI results on PRs

jobs:
# Interactive mode - responds to @claude mentions
claude-response:
if: github.event_name != 'pull_request'
# Auto-review for same-repo PRs
claude-review:
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch fork branch (for fork PRs)
if: github.event.issue.pull_request
run: |
# Fetch all PR refs so the branch is available
git fetch origin +refs/pull/*/head:refs/remotes/origin/pr/*
fetch-depth: 1
- uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
allowed_bots: "claude[bot]"
track_progress: true # ✨ Enables tracking comments
claude_args: |
--model opus
--model opus \
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)"
prompt: |
REPO: ${{ github.repository }}
PR NUMBER: ${{ github.event.pull_request.number }}

# Automation mode - auto-review new PRs (but only if from same repo)
claude-review:
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
Act as a code reviewer for this pull request. Focus your review on:
- Overall code quality and adherence to best practices
- Possible bugs, edge cases, or logical errors
- Security concerns or unsafe patterns
- Performance characteristics and potential optimizations

Provide thorough, actionable feedback, and use inline comments for any line-specific issues you identify.

Note: The PR branch is already checked out in the current working directory.

Use `gh pr comment` for summary or top-level feedback on the PR.
Use `mcp__github_inline_comment__create_inline_comment` to annotate specific code issues inline.
Only post GitHub comments - don't submit review text as messages.
Use top-level comments for general observations or praise.

# Manual review triggered by "@claude review" comment (works for forks too)
claude-manual-review:
if: |
github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
contains(github.event.comment.body, '@claude review')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Checkout PR branch
run: gh pr checkout ${{ github.event.issue.number }}
env:
GH_TOKEN: ${{ github.token }}
- uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
track_progress: true # ✨ Enables tracking comments
claude_args: |
--model opus
--model opus \
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)"
prompt: |
Review this PR. Focus on:
- Correctness and potential bugs
- Code clarity and maintainability
- Any security concerns
REPO: ${{ github.repository }}
PR NUMBER: ${{ github.event.issue.number }}

Act as a code reviewer for this pull request. Focus your review on:
- Overall code quality and adherence to best practices
- Possible bugs, edge cases, or logical errors
- Security concerns or unsafe patterns
- Performance characteristics and potential optimizations

Be concise. Only comment if you have substantive feedback.
Provide thorough, actionable feedback, and use inline comments for any line-specific issues you identify.

Note: The PR branch is already checked out in the current working directory.

Use `gh pr comment` for summary or top-level feedback on the PR.
Use `mcp__github_inline_comment__create_inline_comment` to annotate specific code issues inline.
Only post GitHub comments - don't submit review text as messages.
Use top-level comments for general observations or praise.

# General interactive mode - responds to @claude mentions (but NOT review requests on PRs)
claude-response:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude') && !contains(github.event.comment.body, '@claude review')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude') && !contains(github.event.comment.body, '@claude review')) ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude') && !contains(github.event.review.body, '@claude review')) ||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Checkout PR branch (if on a PR)
if: github.event.issue.pull_request || github.event.pull_request
run: gh pr checkout ${{ github.event.issue.number || github.event.pull_request.number }}
env:
GH_TOKEN: ${{ github.token }}
- uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
claude_args: |
--model opus \
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr create:*),Bash(git checkout:*),Bash(git add:*),Bash(git commit:*),Bash(git push:*),Bash(git branch:*),Edit,Write,MultiEdit"
113 changes: 0 additions & 113 deletions .github/workflows/release.yaml

This file was deleted.

11 changes: 11 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,14 @@ The server runs two HTTP servers: main API (default :8080) and metrics (default
### Database Migrations

Migrations are defined as Go code in `database/migrations/` and registered in `migrations.Migrations`. They run automatically on database connection unless `DB_DONT_APPLY_SCHEMA` env var is set.

## Implementation Workflow

IMPORTANT: When asked to implement something, always follow through completely:
1. Create a feature branch based on the latest `main` branch (use descriptive branch names like `claude/issue-123-add-feature`)
2. Make the code changes
3. Commit the changes
4. Push the branch
5. Create the PR with `gh pr create --title "..." --body "..."` and reference the issue number in the PR description (e.g., "Closes #123")

Do NOT stop at providing links β€” complete the entire workflow automatically.
Loading