devteam-bug
Fix a bug with structured diagnostic workflow. Uses interview to clarify details and Bug Council for complex issues.
Fix a GitHub issue by number. Automatically fetches details and implements a fix.
$ npx -y skills add michael-harris/devteam --skill devteam-issue --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/devteam-issueContext preview
The summary Claude sees to decide when to auto-load this skill.
Fix a GitHub issue by number. Automatically fetches details and implements a fix.
name: devteam-issue description: Fix a GitHub issue by number. Automatically fetches details and implements a fix. argument-hint: <number> [--council] user-invocable: true allowed-tools: Read, Edit, Write, Glob, Grep, Bash, Task model: opus
Current session: !`source "${CLAUDE_PLUGIN_ROOT}/scripts/state.sh" && get_current_session 2>/dev/null || echo "No active session"` Active sprint: !`source "${CLAUDE_PLUGIN_ROOT}/scripts/state.sh" && get_kv_state "active_sprint" 2>/dev/null || echo "None"` Failure count: !`source "${CLAUDE_PLUGIN_ROOT}/scripts/state.sh" && get_kv_state "consecutive_failures" 2>/dev/null || echo "0"`
**Command:** `/devteam:issue <number>`
Fix a GitHub issue by number. Automatically fetches details and implements a fix.
/devteam:issue 123 # Fix GitHub issue #123 /devteam:issue 456 --council # Force Bug Council for complex diagnosis
Before starting, initialize state in SQLite database (`.devteam/devteam.db`):
# Source the state management functions
source "${CLAUDE_PLUGIN_ROOT}/scripts/state.sh"
# Initialize the database if needed
source "${CLAUDE_PLUGIN_ROOT}/scripts/db-init.sh"
# Set project metadata
set_kv_state "metadata.created_at" "$(date -u +%Y-%m-%dT%H:%M:%SZ)"
set_kv_state "metadata.project_name" "Issue #123 Fix"
set_kv_state "metadata.project_type" "issue"
# Set issue details
set_kv_state "issue.number" "123"
set_kv_state "issue.title" "[from GitHub]"
set_kv_state "issue.type" "bug" # bug | security | performance | enhancement
set_kv_state "issue.severity" "high" # critical | high | medium | low
set_kv_state "issue.complexity" "moderate" # simple | moderate | complex
# Set execution context
set_kv_state "current_execution.command" "/devteam:issue 123"
set_phase "diagnosis"
# Configure autonomous mode
set_kv_state "autonomous_mode.enabled" "true"
set_kv_state "autonomous_mode.max_iterations" "20"
set_kv_state "autonomous_mode.current_iteration" "0"
set_kv_state "autonomous_mode.circuit_breaker.consecutive_failures" "0"
set_kv_state "autonomous_mode.circuit_breaker.max_failures" "3"
set_kv_state "autonomous_mode.circuit_breaker.state" "closed"# Fetch issue from GitHub gh issue view 123 --json title,body,labels,comments,state # Extract key information - Title - Description - Steps to reproduce - Labels (bug, enhancement, security, etc.) - Comments (may have additional context)
**Determine issue type:**
**Determine severity:**
**Determine complexity:**
**Activate Bug Council if:**
**Bug Council Process:**
// Spawn 5 diagnostic agents in parallel
const councilResults = await Promise.all([
Task({
subagent_type: "diagnosis:root-cause-analyst",
model: "opus",
prompt: `Analyze issue #${issueNumber}:
Title: ${title}
Description: ${body}
Provide diagnosis with:
- Root cause analysis
- Evidence
- Recommended fix
- Confidence score (0-1)`
}),
Task({
subagent_type: "diagnosis:code-archaeologist",
model: "opus",
prompt: `Investigate git history for issue #${issueNumber}...`
}),
Task({
subagent_type: "diagnosis:pattern-matcher",
model: "opus",
prompt: `Search codebase for similar patterns...`
}),
Task({
subagent_type: "diagnosis:systems-thinker",
model: "opus",
prompt: `Analyze system interactions...`
}),
Task({
subagent_type: "diagnosis:adversarial-tester",
model: "opus",
prompt: `Find edge cases and related failures...`
})
])
// Ranked-choice voting
const proposals = councilResults.map(r => r.proposal)
const votes = councilResults.map(r => r.ranking)
const winner = calculateRankedChoice(proposals, votes)
console.log(`Bug Council Decision: ${winner.approach}`)
console.log(`Consensus: ${winner.votes}/${councilResults.length}`)**Bug Council Output:**
bug_council:
activated: true
issue_number: 123
proposals:
A:
agent: diagnosis:root-cause-analyst
diagnosis: "Null reference in guest user handling"
confidence: 0.85
B:
agent: diagnosis:code-archaeologist
diagnosis: "Regression from commit abc123"
confidence: 0.78
C:
agent: diagnosis:pattern-matcher
diagnosis: "Inconsistent optional chaining"
confidence: 0.92
D:
agent: diagnosis:systems-thinker
diagnosis: "AuthContext contract violation"
confidence: 0.80
E:
agent: diagnosis:adversarial-tester
diagnosis: "Multiple paths to same failure"
confidence: 0.75
voting:
method: ranked_choice
winner: C
consensus: "Strong (4/5 ranked C in top 2)"
selected_approach:
diagnosis: "Inconsistent optional chaining across 4 locations"
fix: "Add optional chaining to all user.settings accesses"
prevention: "Add eslint rule for optional chaining"**Simple/Moderate Issues (no council):**
Task({
subagent_type: "orchestration:task-loop",
model: "opus",
prompt: `Fix issue #${issueNumber}:
Issue: ${title}
Root cause: ${diagnosis}
1. Implement fix
2. Add regression tests
3. Run existing tests
4. Code rA Claude Code plugin providing 127 specialized AI agents with: Interview-driven planning - Clarify requirements before work begins Codebase research - Investigate patterns and blockers before implementation SQLite state management - Reliable session tracking
Repo: michael-harris/devteam
Fix a bug with structured diagnostic workflow. Uses interview to clarify details and Bug Council for complex issues.
Detect design inconsistencies and drift from the design system. Launches the Design Drift Detector to analyze the codebase for deviations.
Coordinate UX/UI design work across platforms. Launches the UX System Coordinator to orchestrate design specialists.
Execute implementation work - plans, sprints, tasks, or ad-hoc work.