Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
90 changes: 90 additions & 0 deletions .github/workflows/claude.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Copyright(C) 2025-2026 Advanced Micro Devices, Inc. All rights reserved.
# SPDX-License-Identifier: MIT

name: Claude AI Assistant

on:
issues:
types: [opened, labeled]
issue_comment:
types: [created]
pull_request:
types: [opened, ready_for_review]
pull_request_review_comment:
types: [created]

permissions:
contents: read
issues: write
pull-requests: write
id-token: write

jobs:
# Auto-review new PRs
pr-review:
if: |
github.event_name == 'pull_request' &&
(github.event.pull_request.draft == false ||
contains(github.event.pull_request.labels.*.name, 'ready_for_ci'))
runs-on: ubuntu-latest
concurrency:
group: claude-pr-review-${{ github.event.pull_request.number }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
prompt: |
Review this GAIA PR:
- Check AMD copyright headers on new files (must have: Copyright(C) 2025-2026 Advanced Micro Devices, Inc.)
- Verify code follows patterns in src/gaia/
- Look for security issues (SQL injection, command injection, XSS, secrets exposure)
- Check test coverage in tests/
- Reference docs/dev.md and CLAUDE.md for standards
- Verify documentation updates if API changes
claude_args: "--max-turns 5"

# Respond to @claude in PRs
pr-comment:
if: |
github.event_name == 'pull_request_review_comment' &&
contains(github.event.comment.body, '@claude')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}

# Respond to new issues or @claude mentions
issue-handler:
if: |
github.event_name == 'issues' ||
(github.event_name == 'issue_comment' &&
contains(github.event.comment.body, '@claude'))
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
prompt: |
You are GAIA's helpful AI assistant. Follow the Issue Response Guidelines in CLAUDE.md.

For questions: Check docs/ folder - see docs/docs.json for structure
- User guides: guides/chat.md, guides/talk.md, guides/code.md, guides/blender.md, guides/jira.md
- SDK reference: sdk/core/agent-system.md, sdk/sdks/chat.md, sdk/sdks/rag.md, sdk/infrastructure/mcp.md
- CLI reference: reference/cli.md, reference/features.md
- FAQ: reference/faq.md, glossary.md
- Development: reference/dev.md, sdk/testing.md, sdk/best-practices.md

For bugs: Search src/gaia/ for related code, check tests/ for test cases

For features: Check if similar exists in src/gaia/agents/ or src/gaia/apps/

Always reference specific files with line numbers when possible.
Check for duplicate issues before responding in detail.
claude_args: "--max-turns 3"
1 change: 1 addition & 0 deletions .github/workflows/test_gaia_cli_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
name: GAIA CLI Tests (Windows)

on:
workflow_call:
push:
branches: ["main"]
paths:
Expand Down
56 changes: 56 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,62 @@ gaia/

**Platform:** [`docs/installer.md`](docs/installer.md), [`docs/ui.md`](docs/ui.md)

## Issue Response Guidelines

When responding to GitHub issues and pull requests, follow these guidelines:

### Documentation Structure

The documentation is organized in [`docs/docs.json`](docs/docs.json) with the following structure:
- **User Guides** (`docs/guides/`): Feature-specific guides (chat, talk, code, blender, jira, docker, routing)
- **Playbooks** (`docs/playbooks/`): Step-by-step tutorials for building agents
- **SDK Reference** (`docs/sdk/`): Core concepts, SDKs, infrastructure, mixins, agents
- **Specifications** (`docs/spec/`): Technical specs for all components
- **Reference** (`docs/reference/`): CLI, API, features, FAQ, development
- **Deployment** (`docs/deployment/`): Packaging, installers, UI

### Response Protocol

1. **Check documentation first:** Always search `docs/` folder before suggesting solutions
- See [`docs/docs.json`](docs/docs.json) for the complete documentation structure

2. **Check for duplicates:** Search existing issues/PRs to avoid redundant responses

3. **Reference specific files:** Use precise file references with line numbers when possible
- Agent implementations: `src/gaia/agents/` (base.py, chat_agent.py, code_agent.py, jira_agent.py, blender_agent.py)
- CLI commands: `src/gaia/cli.py`
- MCP integration: `src/gaia/mcp/`
- LLM backend: `src/gaia/llm/`
- Audio processing: `src/gaia/audio/` (ASR, TTS)
- RAG system: `src/gaia/rag/` (document Q&A, embeddings)
- Evaluation: `src/gaia/eval/` (batch experiments, ground truth)
- Applications: `src/gaia/apps/` (jira, llm, summarize)
- Chat SDK: `src/gaia/chat/`

4. **Link to relevant documentation:**
- **Getting Started:** [`docs/setup.md`](docs/setup.md), [`docs/quickstart.md`](docs/quickstart.md)
- **User Guides:** [`docs/guides/chat.md`](docs/guides/chat.md), [`docs/guides/talk.md`](docs/guides/talk.md), [`docs/guides/code.md`](docs/guides/code.md), [`docs/guides/blender.md`](docs/guides/blender.md), [`docs/guides/jira.md`](docs/guides/jira.md)
- **SDK Reference:** [`docs/sdk/core/agent-system.md`](docs/sdk/core/agent-system.md), [`docs/sdk/sdks/chat.md`](docs/sdk/sdks/chat.md), [`docs/sdk/sdks/rag.md`](docs/sdk/sdks/rag.md), [`docs/sdk/infrastructure/mcp.md`](docs/sdk/infrastructure/mcp.md)
- **CLI Reference:** [`docs/reference/cli.md`](docs/reference/cli.md), [`docs/reference/features.md`](docs/reference/features.md)
- **Development:** [`docs/reference/dev.md`](docs/reference/dev.md), [`docs/sdk/testing.md`](docs/sdk/testing.md), [`docs/sdk/best-practices.md`](docs/sdk/best-practices.md)
- **FAQ & Help:** [`docs/reference/faq.md`](docs/reference/faq.md), [`docs/glossary.md`](docs/glossary.md)

5. **For bugs:**
- Search `src/gaia/` for related code
- Check `tests/` for related test cases that might reveal the issue or need updating
- Reference [`docs/sdk/troubleshooting.md`](docs/sdk/troubleshooting.md)
- Check security implications using [`docs/sdk/security.md`](docs/sdk/security.md)

6. **For feature requests:**
- Check if similar functionality exists in `src/gaia/agents/` or `src/gaia/apps/`
- Reference [`docs/sdk/examples.md`](docs/sdk/examples.md) and [`docs/sdk/advanced-patterns.md`](docs/sdk/advanced-patterns.md)
- Suggest approaches following [`docs/sdk/best-practices.md`](docs/sdk/best-practices.md)

7. **Follow contribution guidelines:**
- Reference [`CONTRIBUTING.md`](CONTRIBUTING.md) for code standards
- Ensure AMD copyright headers on new files
- Point to [`docs/reference/dev.md`](docs/reference/dev.md) for development workflow

## File Path Rules (Workaround for Claude Code v1.0.111 Bug)
- When reading or editing a file, **ALWAYS use relative paths.**
- Example: `./src/components/Component.tsx` ✅
Expand Down
Loading