diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index 88bd60f..3c6e48f 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -1,7 +1,7 @@ name: Claude Code Review on: - pull_request_target: + pull_request: types: [opened, reopened] issue_comment: types: [created] @@ -14,18 +14,18 @@ concurrency: jobs: claude-review: if: | - github.event_name == 'pull_request_target' || - (github.event_name == 'issue_comment' && - github.event.issue.pull_request && + github.event_name == 'pull_request' || + (github.event_name == 'issue_comment' && + github.event.issue.pull_request && contains(github.event.comment.body, '@claude')) - + runs-on: ubuntu-latest permissions: contents: read pull-requests: write issues: write id-token: write - + steps: - name: Checkout repository uses: actions/checkout@v4 @@ -39,10 +39,10 @@ jobs: with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} github_token: ${{ secrets.GITHUB_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: | Please review this pull request and provide feedback on: @@ -51,9 +51,9 @@ jobs: - Performance considerations - Security concerns - Test coverage - + Be constructive and helpful in your feedback. - + # Optional: Customize review based on file types # direct_prompt: | # Review this PR focusing on: @@ -61,18 +61,17 @@ jobs: # - 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' && + # ${{ 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]') - diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cc0d0e4..f16fced 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -56,8 +56,12 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max + cache-from: | + type=gha + type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache + cache-to: | + type=gha,mode=max + type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache,mode=max release: name: Create GitHub Release diff --git a/CHANGELOG.md b/CHANGELOG.md index f2c7a0f..43711e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Improved logging organization - Updated documentation with logging capabilities and examples +### Performance +- Docker build caching in GitHub Actions (dual GHA + registry cache strategy) + + ## [0.1.0] - 2025-06-21 ### Added diff --git a/CLAUDE.md b/CLAUDE.md index b8fbf46..565b188 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,13 +1,23 @@ + # CLAUDE.md This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. +## We're following Issue-Based Development (IBD) workflow +1. Before running any Git/GitHub CLI `Bash` command (`git commit`, `gh issue create`, `gh pr create`, etc.), open the corresponding file in @workflows to review required steps. +2. Always apply the exact templates or conventions from the following files: + - @workflows/GITHUB-ISSUE.md → issues + - @workflows/GIT-COMMIT.md → commits + - @workflows/GITHUB-PR.md → pull requests +3. Keep one branch per issue; merging the PR must auto-close its linked issue. + + ## PROJECT STRUCTURE ``` claude-code-yolo/ ├── CLAUDE.md # This file - project guidance for Claude -├── README.md # Main documentation +├── README.md # Main documentation ├── CHANGELOG.md # Version history ├── DEV-LOGS.md # Development journal ├── TODO.md # Task tracking @@ -31,8 +41,8 @@ claude-code-yolo/ │ ├── workflows/ # Development workflows │ ├── GIT-COMMIT.md # Commit guidelines +│ ├── GITHUB-ISSUE.md # Issue creation guidelines │ ├── GITHUB-PR.md # PR creation process -│ └── PRE-RELEASE.md # Release checklist │ └── references/ # Documentation and research ├── chats/ # AI conversation logs diff --git a/DEV-LOGS.md b/DEV-LOGS.md index 1efc724..487257a 100644 --- a/DEV-LOGS.md +++ b/DEV-LOGS.md @@ -34,14 +34,13 @@ --- ## Issue Analysis: 2025-06-23 - ### [enhancement-completed] Claude Code Review workflow simplification **Problem**: Overcomplicated workflow with manual duplicate detection using GitHub CLI. **Solution**: Adopted ChatGPT pattern with critical fixes: - `pull_request_target` → enables secret access for `ANTHROPIC_API_KEY` -- Concurrency groups → automatic duplicate prevention +- Concurrency groups → automatic duplicate prevention - Proper checkout ref → works for comment-triggered reviews - Removed complex GitHub CLI duplicate detection logic