Skip to content

🀯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

πŸ”¨ chore: improve Claude Code triage workflow (#9713)

Arvin Xuff41f4bb82a5
diff --git a/.claude/prompts/issue-triage.md b/.claude/prompts/issue-triage.md
new file mode 100644
index 00000000000..3bb1fd3c542
--- /dev/null
+++ b/.claude/prompts/issue-triage.md
@@ -0,0 +1,253 @@
+# Issue Triage Guide
+
+This guide is used for batch triaging GitHub issues - analyzing issues and applying appropriate labels.
+
+## Workflow
+
+For EACH issue, follow these steps:
+
+### Step 1: Get Available Labels (run once per batch)
+
+```bash
+gh label list --json name,description --limit 300
+```
+
+### Step 2: Get Issue Details
+
+For each issue number, run:
+
+```bash
+gh issue view [ISSUE_NUMBER] --json number,title,body,labels,comments
+```
+
+### Step 3: Analyze and Select Labels
+
+Extract information from the issue template and content:
+
+#### Template Fields Mapping
+
+- πŸ“¦ Platform field β†’ `platform:web/desktop/mobile`
+- πŸ’» Operating System β†’ `os:windows/macos/linux/ios`
+- 🌐 Browser β†’ `device:pc/mobile`
+- πŸ“¦ Deployment mode β†’ `deployment:server/client/pglite`
+- Platform (hosting) β†’ `hosting:cloud/self-host/vercel/zeabur/railway`
+
+#### Provider Detection
+
+**IMPORTANT**: Always check issue title and body for provider mentions!
+
+**Official Providers** (check for these keywords in title/body):
+
+- `openai`, `gpt` β†’ `provider:openai`
+- `gemini` β†’ `provider:gemini`
+- `claude`, `anthropic` β†’ `provider:claude`
+- `deepseek` β†’ `provider:deepseek`
+- `google` β†’ `provider:google`
+- `ollama` β†’ `provider:ollama`
+- `azure` β†’ `provider:azure`
+- `bedrock` β†’ `provider:bedrock`
+- `vertex` β†’ `provider:vertex`
+- `groq`, `grok` β†’ `provider:groq`
+- `mistral` β†’ `provider:mistral`
+- `moonshot` β†’ `provider:moonshot`
+- `zhipu` β†’ `provider:zhipu`
+- `minimax` β†’ `provider:minimax`
+- `doubao` β†’ `provider:doubao`
+
+**Third-party Aggregation Providers**:
+
+- `aihubmix`, `AIHubMix`, `AIHUBMIX` β†’ `provider:aihubmix`
+- Check environment variables like `AIHUBMIX_*` in issue body
+
+**Multiple Providers**: If issue mentions multiple providers, add ALL applicable provider labels.
+
+### Label Categories
+
+#### a) Issue Type (select ONE if applicable)
+
+- `πŸ’„ Design` - UI/UX design issues
+- `πŸ“ Documentation` - Documentation improvements
+- `⚑️ Performance` - Performance optimization
+
+#### b) Priority (select ONE if applicable)
+
+- `priority:high` - Critical issues, data loss, security, maintainer mentions "urgent"/"serious"/"critical"
+- `priority:medium` - Important issues affecting multiple users, significant functionality impact
+- `priority:low` - Nice to have, minor issues, edge cases
+
+**Priority Guidelines**:
+
+- Set `priority:high` for: data loss, authentication failures, deployment blockers, critical bugs
+- Set `priority:medium` for: feature bugs affecting multiple users, workflow issues
+- Set `priority:low` for: cosmetic issues, feature requests, configuration questions
+
+#### c) Platform (select ALL applicable)
+
+- `platform:web`
+- `platform:desktop`
+- `platform:mobile`
+
+#### d) Device (for platform:web, select ONE)
+
+- `device:pc`
+- `device:mobile`
+
+#### e) Operating System (select ALL applicable)
+
+- `os:windows`
+- `os:macos`
+- `os:linux`
+- `os:ios`
+- `os:android`
+
+#### f) Hosting Platform (select ONE)
+
+- `hosting:cloud` - Official LobeHub Cloud
+- `hosting:self-host` - Self-hosted deployment
+- `hosting:vercel` - Vercel deployment
+- `hosting:zeabur` - Zeabur deployment
+- `hosting:railway` - Railway deployment
+
+#### g) Deployment Mode (select ONE if mentioned)
+
+- `deployment:server` - Server-side database mode
+- `deployment:client` - Client-side database mode
+- `deployment:pglite` - PGLite mode
+
+**Additional deployment tags**:
+
+- `docker` - If using Docker deployment
+- `electron` - If desktop/Electron specific
+
+#### h) Model Provider (select ALL applicable)
+
+See "Provider Detection" section above for complete list.
+
+**IMPORTANT**: Always scan issue title and body for provider keywords!
+
+#### i) Feature/Component (select ALL applicable)
+
+Core Features:
+
+- `feature:settings` - Settings and configuration
+- `feature:agent` - Agent/Assistant functionality
+- `feature:topic` - Topic/Conversation management
+- `feature:marketplace` - Agent marketplace
+
+File & Knowledge:
+
+- `feature:files` - File upload/management
+- `feature:knowledge-base` - Knowledge base and RAG
+- `feature:export` - Export functionality
+
+Model Capabilities:
+
+- `feature:streaming` - Streaming responses
+- `feature:tool` - Tool calling
+- `feature:vision` - Vision/multimodal capabilities
+- `feature:image` - AI image generation
+- `feature:dalle` - DALL-E specific
+- `feature:tts` - Text-to-speech
+
+Technical:
+
+- `feature:api` - Backend API
+- `feature:auth` - Authentication/authorization
+- `feature:sync` - Cloud sync functionality
+- `feature:search` - Search functionality
+- `feature:mcp` - MCP integration
+- `feature:editor` - Lobe Editor
+- `feature:markdown` - Markdown rendering
+- `feature:thread` - Thread/Subtopic functionality
+
+Collaboration:
+
+- `feature:group-chat` - Group chat functionality
+- `feature:memory` - Memory feature
+- `feature:team-workspace` - Team workspace
+
+#### j) Workflow/Status
+
+- `Duplicate` - Only if duplicate of an OPEN issue (mention issue number)
+- `needs-reproduction` - Cannot reproduce, needs more information
+- `good-first-issue` - Good for first-time contributors
+- `πŸ€” Need Reproduce` - Needs reproduction steps
+
+### Step 4: Apply Labels
+
+Add labels (comma-separated, no spaces after commas):
+
+```bash
+gh issue edit [ISSUE_NUMBER] --add-label "label1,label2,label3"
+```
+
+Remove "unconfirm" label if adding other labels:
+
+```bash
+gh issue edit [ISSUE_NUMBER] --remove-label "unconfirm"
+```
+
+**Important**: Combine both commands when possible for efficiency.
+
+### Step 5: Log Summary
+
+For each issue, provide reasoning (2-4 sentences):
+
+- Labels applied and why
+- Key factors from issue template/comments
+- Provider detection reasoning (if applicable)
+
+## Important Rules
+
+1. **Read Carefully**: Read issue template fields AND issue body/title for complete context
+2. **Provider Detection**: ALWAYS check title and body for provider keywords (including aihubmix, etc.)
+3. **Multiple Categories**: Use ALL applicable labels from different categories
+4. **Label Prefixes**: Always use proper prefixes (`feature:`, `provider:`, `os:`, `platform:`, etc.)
+5. **Maintainer Comments**: Check maintainer comments for priority/status hints
+6. **No Comments**: Only apply labels, DO NOT post comments to issues
+7. **Batch Efficiency**: Process issues in parallel when possible
+
+## Common Patterns
+
+### Provider in Environment Variables
+
+If issue body contains `AIHUBMIX_*`, add `provider:aihubmix`
+
+### Multiple Provider Issues
+
+If comparing providers (e.g., "works with OpenAI but not Gemini"), add both provider labels
+
+### Desktop Issues
+
+Desktop issues often need: `platform:desktop`, `electron`, specific `os:*`, and `deployment:client` or `deployment:server`
+
+### Knowledge Base Issues
+
+Usually need: `feature:knowledge-base`, often with `feature:files`, may need `provider:*` for embedding models
+
+### Tool Calling Issues
+
+Usually need: `feature:tool`, specific `provider:*`, may need `feature:mcp` if MCP-related
+
+### Streaming Issues
+
+Usually need: `feature:streaming`, specific `provider:*`, check for timeout/performance issues
+
+## Example Triage
+
+**Issue #8850**: "aihubmix ηš„δΌ˜ζƒ  app ζ²‘ζœ‰η”Ÿζ•ˆ"
+
+**Analysis**:
+
+- Title contains "aihubmix" β†’ `provider:aihubmix`
+- Template shows: Windows, Chrome, Docker, Client mode
+- About API discount codes not working
+
+**Labels Applied**:
+
+```bash
+gh issue edit 8850 --add-label "provider:aihubmix,platform:web,os:windows,deployment:client,hosting:self-host,docker"
+gh issue edit 8850 --remove-label "unconfirm"
+```
+
+**Reasoning**: AIHubMix provider discount feature not working. Client mode deployment on Windows with Docker. Provider detection from title keyword "aihubmix".
diff --git a/.github/workflows/claude-issue-triage.yml b/.github/workflows/claude-issue-triage.yml
index dc17ef90913..036176f54d9 100644
--- a/.github/workflows/claude-issue-triage.yml
+++ b/.github/workflows/claude-issue-triage.yml
@@ -18,10 +18,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v5
- - name: Copy team assignment guide
+ - name: Copy triage prompts
run: |
mkdir -p /tmp/claude-prompts
cp .claude/prompts/team-assignment.md /tmp/claude-prompts/
+ cp .claude/prompts/issue-triage.md /tmp/claude-prompts/
- name: Run Claude Code for Issue Triage
uses: anthropics/claude-code-action@main
@@ -36,151 +37,23 @@ jobs:
REPOSITORY: ${{ github.repository }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
- ## WORKFLOW
+ ## Instructions
- ### Step 1: Get Available Labels
+ Follow the complete triage guide located at:
```bash
- gh label list --json name,description --limit 300
+ cat /tmp/claude-prompts/issue-triage.md
```
- ### Step 2: Get Issue Details
- ```bash
- gh issue view ${{ github.event.issue.number }} --json number,title,body,labels,comments
- ```
-
- ### Step 3: Read Team Assignment Guide
+ Read the team assignment guide for determining team members:
```bash
cat /tmp/claude-prompts/team-assignment.md
```
- ### Step 4: Analyze and Select Labels
-
- Extract information from the issue template:
- - πŸ“¦ Platform field β†’ platform:web/desktop/mobile
- - πŸ’» Operating System β†’ os:windows/macos/linux/ios
- - 🌐 Browser β†’ device:pc/mobile
- - πŸ“¦ Deployment mode β†’ deployment:server/client/pglite
- - Platform (hosting) β†’ hosting:cloud/self-host/vercel/zeabur/railway
-
- **LABEL CATEGORIES:**
-
- **a) Issue Type (REQUIRED - select ONE):**
- - πŸ› Bug, 🌠 Feature Request, πŸ’„ Design, πŸ“ Documentation, ⚑️ Performance
-
- **b) Priority (select ONE if applicable):**
- - priority:high - Critical, maintainer mentions "urgent"/"serious"/"critical"
- - priority:medium - Important, affects multiple users
- - priority:low - Nice to have, minor issues
-
- **c) Platform (select ALL applicable):**
- - platform:web, platform:desktop, platform:mobile
-
- **d) Device (for platform:web, select ONE):**
- - device:pc, device:mobile
-
- **e) Operating System (select ALL applicable):**
- - os:windows, os:macos, os:linux, os:ios
-
- **f) Hosting Platform (select ONE):**
- - hosting:cloud, hosting:self-host, hosting:vercel, hosting:zeabur, hosting:railway
-
- **g) Deployment Mode (select ONE if mentioned):**
- - deployment:server, deployment:client, deployment:pglite
-
- **h) Model Provider (select ALL applicable):**
- - provider:openai, provider:gemini, provider:claude, provider:deepseek
- - provider:google, provider:ollama, provider:azure, provider:bedrock, provider:vertex
-
- **i) Feature/Component (select ALL applicable):**
- - feature:settings, feature:agent, feature:topic, feature:marketplace
- - feature:streaming, feature:tool, feature:sync, feature:export
- - feature:search, feature:auth, feature:files, feature:knowledge-base
- - feature:tts, feature:vision, feature:mcp, feature:editor, feature:thread
- - feature:image, feature:api, feature:dalle, feature:plugin, feature:markdown
- - feature:group-chat, feature:memory, feature:team-workspace
-
- **j) Workflow/Status:**
- - Duplicate - Only if duplicate of OPEN issue
- - needs-reproduction, good-first-issue, πŸ€” Need Reproduce
-
- **IMPORTANT RULES:**
- - Read issue template fields carefully
- - Check maintainer comments for priority/status
- - Use ALL applicable labels from different categories
- - Always use prefixes (feature:, provider:, os:, platform:, etc.)
-
- ### Step 5: Apply Labels
-
- Add labels:
- ```bash
- gh issue edit ${{ github.event.issue.number }} --add-label "label1,label2,label3"
- ```
-
- Remove "unconfirm" if adding other labels:
- ```bash
- gh issue edit ${{ github.event.issue.number }} --remove-label "unconfirm"
- ```
-
- **Execute the commands now.**
-
- ### Step 6: Determine Team Member
-
- Based on the team assignment guide and applied labels, determine who to mention.
-
- **Priority Order:**
- 1. Specific feature owner (feature:knowledge-base β†’ @RiverTwilight)
- 2. Platform owner (platform:mobile β†’ @sudongyuer)
- 3. Provider owner (provider:* β†’ @sxjeru)
- 4. Component owner (πŸ’„ Design β†’ @canisminor1990)
- 5. Infrastructure owner (deployment:* β†’ @nekomeowww)
- 6. General maintainer (@ONLY-yours)
- 7. Last resort (@arvinxx)
-
- **Special Cases:**
- - Multiple owners: Mention primary + secondary
- - priority:high: Mention owner + @arvinxx
-
- ### Step 7: Post Comment
-
- Format the comment (1-2 sentences):
-
- **Single owner:**
- ```
- @username - This is a [feature/component] issue. Please take a look.
- ```
-
- **Multiple owners:**
- ```
- @user1 @user2 - This involves [features]. Please coordinate.
- ```
-
- **High priority:**
- ```
- @owner @arvinxx - High priority [feature] issue.
- ```
-
- Post the comment:
- ```bash
- gh issue comment ${{ github.event.issue.number }} --body "@username - [message]"
- ```
-
- **Execute the command now.**
-
- ### Step 8: Output Summary
-
- Log your reasoning (2-4 sentences):
- - Labels applied and why
- - Team member(s) mentioned and reason
- - Key factors from issue template/comments
-
- ## GUIDELINES
-
- - Be thorough in analysis
- - Use only labels from the provided list
- - Extract info from issue template fields
- - ALWAYS post a mention comment (unless no clear owner)
- - Keep comments professional and brief
- - Output reasoning to logs
+ **IMPORTANT**:
+ - Follow ALL steps in the issue-triage.md guide
+ - Apply labels according to the guide's rules
+ - Post a mention comment to the appropriate team member(s) based on team-assignment.md
+ - Replace [ISSUE_NUMBER] with: ${{ github.event.issue.number }}
**Start the triage process now.**