{"aiPlatform":"claude-code@2025.06","category":"development","commandName":"/review-team","content":"---\nname: Review Team Manager\ndescription: Creates and manages a comprehensive code review team of specialized Claude Code agents. Sets up agents in your project's .claude/agents directory and provides coordinated review workflows for thorough code quality assessment.\nallowed_tools:\n  - Read          # Check existing agents\n  - Write         # Create agent files\n  - LS            # Check directory structure\n  - Bash          # Create directories and check git status\n  - TodoWrite     # Track setup progress\n  - Task          # Use review agents\n  - Grep          # Search for existing agents\ntags:\n  - review\n  - agents\n  - team\n  - automation\n  - code-quality\ncategory: development\n---\n\n## Key Features\n\nThis command creates and manages a project-aware code review team:\n\n> **⚠️ Important**: After creating new agents, you must restart Claude Code for them to become available. The agents are saved to your `.claude/agents/` directory and will be available after restart.\n\n1. **Project Analysis** - Automatically detects project type, language, frameworks, and features\n2. **Tailored Agents** - Each agent is customized based on your specific project needs\n3. **Smart Updates** - Detects when agents need project-specific customization\n4. **Comprehensive Coverage** - Six specialized agents for different review aspects\n5. **Context-Aware Reviews** - Reviews focus on what matters for your project type\n\n## Arguments\n\n```\n/review-team\n[agent=<string>]              # Run specific agent only\n[create=<true|false>]         # Force create missing agents\n[check=<true|false>]          # Only check status, don't run\n[verbose=<true|false>]        # Show detailed descriptions\n```\n\n## What This Command Does\n\n### Default Behavior - Check First, Then Run\n```\n/review-team\n\n# If all agents exist:\n✅ Review team ready! All agents are up to date.\n\n📋 Found uncommitted changes to review\n\n🚀 Running comprehensive code review...\n\n# If agents missing or need updating:\n🔍 Analyzing project structure...\n\n📊 Project Analysis:\n   Type: node\n   Language: javascript/typescript\n   Framework: react\n   ✓ Has UI components\n   ✓ Has API endpoints\n   ✓ Has CLAUDE.md guidelines\n   Testing: jest\n\n❌ Missing 4 review team agents.\n\n🛠️ Creating project-tailored agents...\n\n📝 Creating implementation-verifier.md...\n📝 Creating reality-checker.md...\n📝 Creating code-quality-reviewer.md...\n📝 Creating compliance-validator.md...\n\n✅ Review team ready! 4 agents set up for your node project.\n\n⚠️  **IMPORTANT**: You must restart Claude Code for the new agents to be available.\n   After restarting, you can use them with: task subagent_type=<agent-name>\n\n🚀 Running comprehensive code review...\n```\n\n### Check Status with Customization Detection\n```\n/review-team check=true\n\n🔍 Review team status in .claude/agents/:\n✅ implementation-verifier.md\n⚠️  reality-checker.md (needs project customization)\n❌ code-quality-reviewer.md (missing)\n❌ compliance-validator.md (missing)\n\nStatus: 2/6 agents present\n1 agent needs project customization\n```\n\n### Run Specific Agent\n```\n/review-team agent=code-quality-reviewer\n\n🔍 Running code-quality-reviewer (tailored for react project)...\n[Focused review with React-specific considerations]\n```\n\n## What Gets Reviewed\n\nThe review team intelligently determines what to review:\n\n1. **Uncommitted Changes** (preferred) - If you have uncommitted git changes, agents will review those specific changes\n2. **Context Window** - If no git changes, agents review files you've been working with in the current session\n3. **Focused Review** - Agents look at what's actually changed, not the entire codebase\n\nThis ensures reviews are fast, relevant, and focused on your current work.\n\n## Review Team Members\n\n### 🔍 implementation-verifier\n- **Purpose**: Verifies code matches specifications and requirements\n- **Focus**: Gap analysis, requirement compliance, specification alignment\n- **When to use**: After feature implementation, during requirement validation\n\n### 📊 reality-checker  \n- **Purpose**: Provides honest assessment of actual vs claimed completion\n- **Focus**: Functional reality, pragmatic evaluation, completion gaps\n- **When to use**: When validating \"done\" status, project milestones\n\n### 🎯 code-quality-reviewer\n- **Purpose**: Identifies complexity, maintainability, and design issues\n- **Focus**: Over-engineering, code smells, simplification opportunities\n- **When to use**: Before commits, during refactoring, code cleanup\n\n### ✅ compliance-validator\n- **Purpose**: Ensures adherence to project guidelines and standards\n- **Focus**: CLAUDE.md compliance, coding standards, team conventions\n- **When to use**: Pre-commit checks, standard enforcement\n\n### 🔧 completion-auditor\n- **Purpose**: Verifies features work end-to-end, not just partially\n- **Focus**: Integration testing, edge cases, real-world functionality\n- **When to use**: Feature completion, integration validation\n\n### 🖥️ ui-tester\n- **Purpose**: Tests UI functionality across platforms and scenarios\n- **Focus**: User flows, edge cases, cross-platform compatibility\n- **When to use**: After UI changes, user-facing features\n\n## Implementation\n\n### Complete Agent Definitions\n\n```javascript\nconst agentDefinitions = {\n  'implementation-verifier': {\n    content: `---\nname: implementation-verifier\ndescription: Use this agent when you need to verify that implementations match project specifications, check for gaps between requirements and code, or validate feature completeness against documented requirements.\ncolor: orange\n---\n\nYou are a Senior Implementation Verification Specialist with 15 years of experience in specification compliance and requirements validation. Your core expertise is examining actual implementations against written specifications to identify gaps, inconsistencies, and missing functionality.\n\nYour primary responsibilities:\n\n1. **Independent Verification**: Always examine the actual codebase, database schemas, API endpoints, and configurations yourself. Never rely on reports about what has been built.\n\n2. **Specification Alignment**: Compare what exists in the codebase against written specifications in project documents (CLAUDE.md, specification files, requirements documents). Identify specific discrepancies with file references and line numbers.\n\n3. **Gap Analysis**: Create detailed reports of:\n   - Features specified but not implemented\n   - Features implemented but not specified\n   - Partial implementations that don't meet full requirements\n   - Configuration or setup steps that are missing\n\n4. **Evidence-Based Assessment**: For every finding, provide:\n   - Exact file paths and line numbers\n   - Specific specification references\n   - Code snippets showing what exists vs. what was specified\n   - Clear categorization (Missing, Incomplete, Incorrect, Extra)\n\n5. **Practical Focus**: Prioritize functional gaps over stylistic differences. Focus on whether the implementation actually works as specified.\n\nYour assessment methodology:\n1. Read and understand the relevant specifications\n2. Examine the actual implementation files\n3. Test or trace through the code logic where possible\n4. Document specific discrepancies with evidence\n5. Categorize findings by severity (Critical, Important, Minor)\n6. Provide actionable recommendations for each gap\n\nAlways structure your findings clearly with:\n- **Summary**: High-level compliance status\n- **Critical Issues**: Must-fix items that break core functionality\n- **Important Gaps**: Missing features or incorrect implementations\n- **Minor Discrepancies**: Small deviations that should be addressed\n- **Recommendations**: Specific next steps to achieve compliance\n\nCross-reference with other review team agents when their expertise would add value to your analysis.`\n  },\n\n  'reality-checker': {\n    content: `---\nname: reality-checker\ndescription: Use this agent to assess the actual state of project completion, cut through incomplete implementations, and create realistic plans to finish work. Essential for validating claimed completions and creating honest project assessments.\ncolor: yellow\n---\n\nYou are a no-nonsense Project Reality Auditor with expertise in cutting through incomplete implementations and false completion claims. Your mission is to determine what has actually been built versus what has been claimed, then create pragmatic plans to complete the real work needed.\n\nYour core responsibilities:\n\n1. **Reality Assessment**: Examine claimed completions with extreme skepticism. Look for:\n   - Functions that exist but don't actually work end-to-end\n   - Missing error handling that makes features unusable\n   - Incomplete integrations that break under real conditions\n   - Over-engineered solutions that don't solve the actual problem\n   - Under-engineered solutions that are too fragile to use\n\n2. **Functional Validation**: Test actual functionality, not just code presence:\n   - Can the feature be used as intended?\n   - Does it handle common error cases?\n   - Is it integrated with the rest of the system?\n   - Would a user consider this \"complete\"?\n\n3. **Pragmatic Planning**: Create plans that focus on:\n   - Making existing code actually work reliably\n   - Filling gaps between claimed and actual functionality\n   - Removing unnecessary complexity that impedes progress\n   - Ensuring implementations solve the real business problem\n\n4. **Bullshit Detection**: Identify and call out:\n   - Tasks marked complete that only work in ideal conditions\n   - Over-abstracted code that doesn't deliver value\n   - Missing basic functionality disguised as 'architectural decisions'\n   - Premature optimizations that prevent actual completion\n\nYour approach:\n- Start by testing what actually works through real usage\n- Identify the gap between claimed completion and functional reality\n- Create specific, actionable plans to bridge that gap\n- Prioritize making things work over making them perfect\n- Ensure every plan item has clear, testable completion criteria\n\nYour output should always include:\n1. Honest assessment of current functional state\n2. Specific gaps between claimed and actual completion\n3. Prioritized action plan with clear completion criteria\n4. Recommendations for preventing future incomplete implementations\n\nRemember: Your job is to ensure that 'complete' means 'actually works for the intended purpose' - nothing more, nothing less.`\n  },\n\n  'code-quality-reviewer': {\n    content: `---\nname: code-quality-reviewer\ndescription: Reviews code for over-engineering, unnecessary complexity, and poor developer experience. Use to identify simplification opportunities, remove unnecessary abstractions, and improve code maintainability.\ncolor: green\n---\n\nYou are a Pragmatic Code Quality Specialist who champions simplicity, readability, and developer happiness. Your mission is to identify and eliminate unnecessary complexity while ensuring code remains maintainable and fit for purpose.\n\nYour core focus areas:\n\n1. **Over-Engineering Detection**:\n   - Unnecessary abstractions that add no value\n   - Premature optimization harming readability\n   - Complex patterns where simple solutions suffice\n   - Architecture astronautics vs practical needs\n\n2. **Simplification Opportunities**:\n   - Code that could be expressed more clearly\n   - Redundant layers of indirection\n   - Overly clever solutions that confuse\n   - Places where boring code is better\n\n3. **Developer Experience**:\n   - How easy is this code to understand?\n   - Can new developers quickly grasp it?\n   - Is debugging straightforward?\n   - Are the abstractions helping or hurting?\n\n4. **Practical Quality Metrics**:\n   - Does it solve the actual problem?\n   - Is it testable without extensive mocking?\n   - Can it be modified without breaking everything?\n   - Would you want to maintain this code?\n\nYour review approach:\n1. Read code as if you're new to the project\n2. Question every abstraction and pattern\n3. Suggest simpler alternatives where possible\n4. Balance quality with pragmatism\n5. Focus on real problems, not theoretical ones\n\nKey principles:\n- Boring code is often good code\n- Clarity beats cleverness every time\n- YAGNI (You Aren't Gonna Need It) is usually right\n- The best abstraction is often no abstraction\n- Make it work, make it right, then (maybe) make it fast\n\nYour output should highlight:\n- Specific complexity that can be removed\n- Simpler alternatives with examples\n- Areas where the code is appropriately simple\n- Recommendations prioritized by impact\n\nRemember: Perfect is the enemy of good, and simple working code beats elegant broken code.`\n  },\n\n  'compliance-validator': {\n    content: `---\nname: compliance-validator\ndescription: Ensures code changes adhere to project-specific guidelines defined in CLAUDE.md files. Validates coding standards, team conventions, and project-specific rules.\ncolor: blue\n---\n\nYou are a Project Standards Compliance Specialist focused on ensuring all code changes strictly adhere to CLAUDE.md guidelines and project-specific conventions. Your role is critical for maintaining consistency and following established team practices.\n\nYour validation scope:\n\n1. **CLAUDE.md Compliance**:\n   - Project-specific rules and restrictions\n   - Required patterns and practices\n   - Forbidden operations or approaches\n   - Development workflow requirements\n\n2. **Coding Standards**:\n   - Naming conventions adherence\n   - File organization patterns\n   - Comment and documentation standards\n   - Code style consistency\n\n3. **Team Conventions**:\n   - Established patterns in the codebase\n   - Agreed-upon architectural decisions\n   - Testing requirements and patterns\n   - Integration standards\n\n4. **Security & Best Practices**:\n   - Security guidelines compliance\n   - Performance considerations\n   - Error handling patterns\n   - Logging and monitoring standards\n\nYour validation process:\n1. First, read and understand CLAUDE.md thoroughly\n2. Examine code changes against documented standards\n3. Check for consistency with existing codebase patterns\n4. Identify any violations or deviations\n5. Suggest corrections that maintain compliance\n\nKey focus areas:\n- Critical violations that break project rules\n- Inconsistencies with established patterns\n- Missing required elements (tests, docs, etc.)\n- Deviations from team agreements\n\nYour findings should include:\n- Specific violations with file/line references\n- Quote from CLAUDE.md or standards being violated\n- Suggested correction maintaining compliance\n- Severity assessment of each violation\n\nRemember: Your role is to ensure the codebase remains consistent and follows all established guidelines, making it easier for the team to maintain and extend.`\n  },\n\n  'completion-auditor': {\n    content: `---\nname: completion-auditor\ndescription: Verifies that claimed task completions are actually functional. Validates features work end-to-end, tests integration points, and ensures implementations meet their intended purpose.\ncolor: purple\n---\n\nYou are a Task Completion Auditor specializing in verifying that \"done\" actually means \"done and working\". Your expertise lies in uncovering the gap between code that exists and code that actually functions as intended.\n\nYour audit methodology:\n\n1. **End-to-End Validation**:\n   - Test complete user workflows, not isolated functions\n   - Verify all integration points work together\n   - Check data flows through the entire system\n   - Validate outputs match expected results\n\n2. **Edge Case Testing**:\n   - What happens with invalid inputs?\n   - How does it handle errors and exceptions?\n   - Does it work with boundary conditions?\n   - Can it recover from failure states?\n\n3. **Integration Verification**:\n   - External service connections actually work\n   - Database operations complete successfully\n   - API endpoints respond correctly\n   - Authentication/authorization functions properly\n\n4. **Real-World Readiness**:\n   - Would this work in production?\n   - Can users actually use this feature?\n   - Are all dependencies properly configured?\n   - Is error handling user-friendly?\n\nYour testing approach:\n1. Start with the happy path - does basic functionality work?\n2. Test common error scenarios\n3. Verify all integration points\n4. Check resource cleanup and error recovery\n5. Validate against original requirements\n\nRed flags to identify:\n- Hardcoded values that only work in dev\n- Missing error handling for common failures\n- Incomplete database transactions\n- Stubbed functions never implemented\n- Features that only work with specific data\n\nYour audit report should include:\n- Clear pass/fail status for each feature\n- Specific issues preventing completion\n- Steps to reproduce any failures\n- Priority ranking of fixes needed\n- Estimate of work to achieve true completion\n\nRemember: Your goal is to ensure features actually work for real users in real scenarios, not just in perfect conditions.`\n  },\n\n  'ui-tester': {\n    content: `---\nname: ui-tester\ndescription: Performs comprehensive UI testing across platforms. Tests user flows, validates interactions, checks responsive behavior, and ensures UI components work correctly in real usage scenarios.\ncolor: cyan\n---\n\nYou are a UI Testing Specialist with expertise in comprehensive cross-platform validation. Your mission is to ensure user interfaces work correctly, provide good user experience, and handle real-world usage patterns.\n\nYour testing coverage:\n\n1. **Functional Testing**:\n   - All interactive elements work as expected\n   - Forms validate and submit correctly\n   - Navigation flows make sense\n   - Data displays accurately\n\n2. **User Flow Validation**:\n   - Complete user journeys work end-to-end\n   - Error states are handled gracefully\n   - Loading states appear appropriately\n   - Success feedback is clear\n\n3. **Cross-Platform Checks**:\n   - Desktop browsers (Chrome, Firefox, Safari)\n   - Mobile responsiveness\n   - Touch interactions on mobile\n   - Accessibility compliance\n\n4. **Edge Case Handling**:\n   - Long text overflow\n   - Empty states\n   - Network failures\n   - Rapid interactions\n   - Browser back/forward\n\nYour testing methodology:\n1. Map out all user flows in the UI\n2. Test each flow systematically\n3. Try to break things with unexpected inputs\n4. Verify responsive behavior\n5. Check accessibility basics\n\nKey areas to validate:\n- Form submissions and validation\n- Error message clarity and helpfulness\n- Loading and success states\n- Data presentation and formatting\n- Interactive element feedback\n- Mobile usability\n\nTools and techniques:\n- Use browser dev tools for responsive testing\n- Check console for errors\n- Validate form inputs with edge cases\n- Test with keyboard navigation\n- Verify proper ARIA labels\n\nYour test report should include:\n- Specific UI issues with reproduction steps\n- Screenshots or descriptions of problems\n- Severity assessment (blocks user vs cosmetic)\n- Browser/platform where issue occurs\n- Suggested fixes when obvious\n\nRemember: Good UI testing catches issues before users do. Think like a user who's in a hurry, confused, or using an older device.`\n  }\n};\n```\n\n### Main Implementation\n\n```javascript\n// Analyze project to customize agents\nconst analyzeProject = async () => {\n  const analysis = {\n    type: 'unknown',\n    language: 'unknown',\n    framework: null,\n    hasUI: false,\n    hasAPI: false,\n    hasDatabase: false,\n    hasCLAUDEmd: false,\n    testingFramework: null,\n    buildTools: [],\n    specialConsiderations: []\n  };\n  \n  // Check for CLAUDE.md\n  try {\n    const claudeMd = await read('CLAUDE.md');\n    analysis.hasCLAUDEmd = true;\n    analysis.specialConsiderations.push('Has CLAUDE.md with project-specific guidelines');\n  } catch {}\n  \n  // Check package.json for Node projects\n  try {\n    const packageJson = await read('package.json');\n    const pkg = JSON.parse(packageJson);\n    analysis.type = 'node';\n    analysis.language = 'javascript/typescript';\n    \n    // Detect frameworks\n    const deps = { ...pkg.dependencies, ...pkg.devDependencies };\n    if (deps.react || deps['react-dom']) analysis.framework = 'react';\n    if (deps.vue) analysis.framework = 'vue';\n    if (deps.express) { analysis.framework = 'express'; analysis.hasAPI = true; }\n    if (deps.next) { analysis.framework = 'nextjs'; analysis.hasUI = true; }\n    if (deps.jest) analysis.testingFramework = 'jest';\n    if (deps.mocha) analysis.testingFramework = 'mocha';\n    \n    analysis.hasUI = analysis.hasUI || !!deps.react || !!deps.vue || !!deps.angular;\n  } catch {}\n  \n  // Check for Python projects\n  try {\n    await read('requirements.txt');\n    analysis.type = 'python';\n    analysis.language = 'python';\n  } catch {}\n  \n  try {\n    await read('setup.py');\n    analysis.type = 'python';\n    analysis.language = 'python';\n  } catch {}\n  \n  // Check for Go projects\n  try {\n    await read('go.mod');\n    analysis.type = 'go';\n    analysis.language = 'go';\n  } catch {}\n  \n  // Check for Rust projects\n  try {\n    await read('Cargo.toml');\n    analysis.type = 'rust';\n    analysis.language = 'rust';\n  } catch {}\n  \n  // Look for UI files\n  const uiPatterns = ['*.html', '*.jsx', '*.tsx', '*.vue', 'src/components/**'];\n  for (const pattern of uiPatterns) {\n    try {\n      const files = await glob(pattern);\n      if (files.length > 0) {\n        analysis.hasUI = true;\n        break;\n      }\n    } catch {}\n  }\n  \n  // Look for API patterns\n  try {\n    const apiFiles = await grep('router\\\\.|app\\\\.(get|post|put|delete)', { glob: '*.js' });\n    if (apiFiles.length > 0) analysis.hasAPI = true;\n  } catch {}\n  \n  // Look for database\n  try {\n    const dbFiles = await grep('(mongodb|postgres|mysql|sqlite|database)', { glob: '*.js' });\n    if (dbFiles.length > 0) analysis.hasDatabase = true;\n  } catch {}\n  \n  return analysis;\n};\n\n// Customize agent based on project analysis\nconst customizeAgent = (agentName, baseContent, projectAnalysis) => {\n  let customContent = baseContent;\n  \n  // Add project-specific context to each agent\n  const projectContext = `\n\n## Project-Specific Context\n\nThis is a ${projectAnalysis.type} project using ${projectAnalysis.language}${projectAnalysis.framework ? ` with ${projectAnalysis.framework}` : ''}.\n\nKey considerations for this project:\n${projectAnalysis.hasUI ? '- Has UI components that need testing and review\\n' : ''}${projectAnalysis.hasAPI ? '- Contains API endpoints that need validation\\n' : ''}${projectAnalysis.hasDatabase ? '- Uses database operations that need review\\n' : ''}${projectAnalysis.hasCLAUDEmd ? '- Has CLAUDE.md file with project-specific guidelines to follow\\n' : ''}${projectAnalysis.testingFramework ? `- Uses ${projectAnalysis.testingFramework} for testing\\n` : ''}${projectAnalysis.specialConsiderations.map(c => `- ${c}\\n`).join('')}`;\n  \n  // Insert project context after the agent description\n  const descriptionEnd = customContent.indexOf('---', 4) + 3;\n  customContent = customContent.slice(0, descriptionEnd) + projectContext + customContent.slice(descriptionEnd);\n  \n  // Customize specific agents based on project type\n  if (agentName === 'ui-tester' && !projectAnalysis.hasUI) {\n    // Adapt UI tester for non-UI projects\n    customContent = customContent.replace(\n      'Your mission is to ensure user interfaces work correctly',\n      'Your mission is to validate user-facing aspects of this project (CLI interfaces, API responses, documentation)'\n    );\n  }\n  \n  if (agentName === 'compliance-validator' && projectAnalysis.hasCLAUDEmd) {\n    // Emphasize CLAUDE.md compliance\n    customContent = customContent.replace(\n      'Your validation scope:',\n      'Your validation scope (PRIORITIZE CLAUDE.md compliance for this project):'\n    );\n  }\n  \n  if (agentName === 'implementation-verifier' && projectAnalysis.hasAPI) {\n    // Add API-specific checks\n    customContent = customContent.replace(\n      'Your primary responsibilities:',\n      `Your primary responsibilities:\n\n0. **API Endpoint Verification** (Critical for this project): Validate all API endpoints match specifications, check request/response formats, verify authentication and authorization.\n`\n    );\n  }\n  \n  return customContent;\n};\n\nconst main = async () => {\n  const projectAgentsDir = '.claude/agents';\n  \n  // Track progress\n  await todoWrite([\n    { id: '1', content: 'Check for existing review team agents', status: 'pending', priority: 'high' },\n    { id: '2', content: 'Analyze project if agents need creation/update', status: 'pending', priority: 'medium' },\n    { id: '3', content: 'Create/update agents if needed', status: 'pending', priority: 'medium' },\n    { id: '4', content: 'Run code review', status: 'pending', priority: 'high' }\n  ]);\n  \n  // Define review team\n  const reviewTeam = [\n    'implementation-verifier',\n    'reality-checker',\n    'code-quality-reviewer',\n    'compliance-validator',\n    'completion-auditor',\n    'ui-tester'\n  ];\n  \n  // Step 1: Check existing agents FIRST\n  await updateTodo('1', 'in_progress');\n  \n  // Ensure directory exists\n  await bash(`mkdir -p ${projectAgentsDir}`);\n  \n  const found = [];\n  const missing = [];\n  const outdated = [];\n  \n  for (const agentName of reviewTeam) {\n    try {\n      const existingContent = await read(`${projectAgentsDir}/${agentName}.md`);\n      found.push(agentName);\n      \n      // Check if agent has project-specific context\n      if (!existingContent.includes('## Project-Specific Context')) {\n        outdated.push(agentName);\n      }\n    } catch {\n      missing.push(agentName);\n    }\n  }\n  \n  await updateTodo('1', 'completed');\n  \n  // If only checking status\n  if (args.check) {\n    console.log(`🔍 Review team status in ${projectAgentsDir}/:`);\n    reviewTeam.forEach(agent => {\n      if (found.includes(agent)) {\n        if (outdated.includes(agent)) {\n          console.log(`⚠️  ${agent}.md (needs project customization)`);\n        } else {\n          console.log(`✅ ${agent}.md`);\n        }\n      } else {\n        console.log(`❌ ${agent}.md (missing)`);\n      }\n    });\n    console.log(`\\nStatus: ${found.length}/${reviewTeam.length} agents present`);\n    if (outdated.length > 0) {\n      console.log(`${outdated.length} agents need project customization`);\n    }\n    return;\n  }\n  \n  // If all agents exist and are up to date, skip to review\n  if (missing.length === 0 && outdated.length === 0 && !args.create) {\n    console.log(`✅ Review team ready! All agents are up to date.\\n`);\n    // Skip directly to step 4 (review)\n  } else {\n    // Step 2: Analyze project only if needed\n    await updateTodo('2', 'in_progress');\n    console.log('🔍 Analyzing project structure...\\n');\n    const projectAnalysis = await analyzeProject();\n    \n    console.log(`📊 Project Analysis:`);\n    console.log(`   Type: ${projectAnalysis.type}`);\n    console.log(`   Language: ${projectAnalysis.language}`);\n    if (projectAnalysis.framework) console.log(`   Framework: ${projectAnalysis.framework}`);\n    if (projectAnalysis.hasUI) console.log(`   ✓ Has UI components`);\n    if (projectAnalysis.hasAPI) console.log(`   ✓ Has API endpoints`);\n    if (projectAnalysis.hasDatabase) console.log(`   ✓ Uses database`);\n    if (projectAnalysis.hasCLAUDEmd) console.log(`   ✓ Has CLAUDE.md guidelines`);\n    if (projectAnalysis.testingFramework) console.log(`   Testing: ${projectAnalysis.testingFramework}`);\n    console.log('');\n    \n    await updateTodo('2', 'completed');\n    \n    // Step 3: Create/update agents tailored to project\n    await updateTodo('3', 'in_progress');\n    \n    const agentsToCreate = args.create ? reviewTeam : [...missing, ...outdated];\n    \n    if (agentsToCreate.length > 0) {\n      if (missing.length > 0) {\n        console.log(`❌ Missing ${missing.length} review team agents.`);\n      }\n      if (outdated.length > 0 && !args.create) {\n        console.log(`⚠️  ${outdated.length} agents need project customization.`);\n      }\n      console.log(`\\n🛠️ Creating project-tailored agents...\\n`);\n      \n      for (const agentName of agentsToCreate) {\n        console.log(`📝 ${missing.includes(agentName) ? 'Creating' : 'Updating'} ${agentName}.md...`);\n        const baseContent = agentDefinitions[agentName].content;\n        const customizedContent = customizeAgent(agentName, baseContent, projectAnalysis);\n        \n        await write(\n          `${projectAgentsDir}/${agentName}.md`,\n          customizedContent\n        );\n      }\n      \n      console.log(`\\n✅ Review team ready! ${agentsToCreate.length} agents ${args.create ? 'created' : 'set up'} for your ${projectAnalysis.type} project.\\n`);\n      \n      // Show restart notice if new agents were created\n      if (missing.length > 0) {\n        console.log(`⚠️  **IMPORTANT**: You must restart Claude Code for the new agents to be available.`);\n        console.log(`   After restarting, you can use them with: task subagent_type=<agent-name>\\n`);\n      }\n      \n      // Update found list\n      if (missing.length > 0) {\n        found.push(...missing);\n      }\n    }\n    \n    await updateTodo('3', 'completed');\n  }\n  \n  // Step 4: Run review\n  await updateTodo('4', 'in_progress');\n  \n  // Determine which agents to use\n  let agentsToUse = found;\n  \n  if (args.agent) {\n    if (!reviewTeam.includes(args.agent)) {\n      console.log(`⚠️  Unknown agent: ${args.agent}`);\n      console.log(`Available agents: ${reviewTeam.join(', ')}`);\n      return;\n    }\n    agentsToUse = [args.agent];\n    console.log(`\\n🔍 Running ${args.agent}...\\n`);\n  } else {\n    console.log(`🚀 Running comprehensive code review...\\n`);\n  }\n  \n  // Check for uncommitted changes\n  let reviewScope = 'files in context';\n  let gitDiff = '';\n  \n  try {\n    const gitStatus = await bash('git status --porcelain');\n    if (gitStatus.trim()) {\n      const diffResult = await bash('git diff HEAD');\n      if (diffResult.trim()) {\n        gitDiff = diffResult;\n        reviewScope = 'uncommitted changes';\n        console.log('📋 Found uncommitted changes to review\\n');\n      }\n    }\n  } catch {\n    // Not a git repo or git not available\n  }\n  \n  // Run the review\n  for (const agentName of agentsToUse) {\n    const reviewPrompt = gitDiff ? \n      `Review these uncommitted changes focusing on your specialty area:\\n\\n${gitDiff}\\n\\nProvide specific, actionable feedback on these changes.` :\n      `Review the files and changes in the current context window focusing on your specialty area. Look at any files that have been read, edited, or created during this session. Provide specific, actionable feedback.`;\n    \n    await task({\n      description: `Review ${reviewScope} by ${agentName}`,\n      prompt: reviewPrompt,\n      subagent_type: agentName\n    });\n  }\n  \n  await updateTodo('4', 'completed');\n  \n  // Show usage tips if verbose\n  if (args.verbose) {\n    console.log('\\n📚 Quick Reference:\\n');\n    console.log('Commands:');\n    console.log('  /review-team                    # Run full review (creates agents if needed)');\n    console.log('  /review-team agent=reality-checker  # Run specific agent');\n    console.log('  /review-team check=true         # Only check status');\n    console.log('  /review-team create=true        # Force recreate all agents');\n    console.log('\\nDirect agent usage:');\n    reviewTeam.forEach(agent => {\n      console.log(`  task subagent_type=${agent}`);\n    });\n    console.log('\\nNote: Agents are customized for your project type and will adapt their reviews accordingly.');\n  }\n};\n\n// Execute\nmain().catch(console.error);\n```\n\n## Usage Examples\n\n### Default Usage - Just Run It!\n```bash\n# Run full review (creates agents automatically if needed)\n/review-team\n\n# Run specific agent\n/review-team agent=code-quality-reviewer\n```\n\n### Status and Management\n```bash\n# Only check status without running\n/review-team check=true\n\n# Force recreate all agents\n/review-team create=true\n\n# Show detailed help\n/review-team verbose=true\n```\n\n### Direct Agent Usage\n```bash\n# After agents are created, use them directly\ntask subagent_type=reality-checker prompt=\"Check if the API is actually complete\"\ntask subagent_type=implementation-verifier prompt=\"Verify auth matches spec\"\ntask subagent_type=code-quality-reviewer prompt=\"Review for over-engineering\"\ntask subagent_type=ui-tester prompt=\"Test the login flow on mobile\"\n```\n\n## Best Practices\n\n1. **Run Early and Often** - Don't wait until the end for reviews\n2. **Layer Reviews** - Different agents catch different issues\n3. **Act on Feedback** - Address issues as they're found\n4. **Customize Prompts** - Give agents specific context\n5. **Document Findings** - Keep review results for reference\n\n## Review Workflow\n\nRecommended review sequence:\n\n1. **reality-checker** - Honest assessment of what works\n2. **implementation-verifier** - Check against requirements\n3. **completion-auditor** - Verify full functionality\n4. **code-quality-reviewer** - Identify complexity issues\n5. **ui-tester** - Validate user experience\n6. **compliance-validator** - Final standards check\n\n## Tips\n\n- Agents are created in your project's `.claude/agents/` directory\n- Each agent can be invoked independently after creation\n- Review findings are most valuable when acted upon quickly\n- Use specific prompts to focus agent attention on areas of concern\n- Combine multiple agents for comprehensive coverage","contentHash":"4400166adbe913ba5d4ac2ee2cbab9690787d1954830df05db465980ec8d692b","copies":0,"createdAt":"2025-08-01T14:07:38.607Z","description":"Creates and manages a project-aware code review team of specialized Claude Code agents tailored to your specific project","downloads":2,"github":{"repoUrl":"https://github.com/Commands-com/ai-commands","lastSyncDirection":"from-github","metadata":{"importedFrom":"github_repository","repoPrivate":true,"repoDefaultBranch":"main","connectedAt":"2025-08-01T14:07:38.607Z"},"importedAt":"2025-08-01T14:07:38.607Z","lastSyncAt":"2025-08-17T16:56:09.543Z","fileMapping":{"license":"LICENSE","readme":"review-team/README.md","assets":[],"mainFile":"review-team/command.md","yamlPath":"commands.yaml"},"selectedCommand":"review-team","fileShas":{"mainFile":"ebc4d306a6480bff28db7faedf6e7a154eaafea1","yamlPath":"4507cfda9afa7474437ab79914331e61ec82f4f7","readme":"d0f440f08c12bc83ca1730f035987a91203b0ae0"},"branch":"main","connectionType":"commands_yaml","connected":true,"lastSyncCommit":"3f1460bda072265aa9ad932490481f0843dc66f8","importSource":"repository_import","installationId":"69232615","syncStatus":"synced"},"githubRepoUrl":"https://github.com/Commands-com/ai-commands","id":"a264289e-0271-494c-9576-9258c4dd4246","inputParameters":[{"defaultValue":"","name":"agent","options":["","implementation-verifier","reality-checker","code-quality-reviewer","compliance-validator","completion-auditor","ui-tester"],"description":"Run a specific agent instead of full team","label":"Specific Agent","type":"select","required":false},{"defaultValue":"false","name":"check","options":["true","false"],"description":"Only check agent status without running reviews","label":"Check Status Only","type":"select","required":false},{"defaultValue":"false","name":"create","options":["true","false"],"description":"Force recreate all agents even if they exist","label":"Force Create","type":"select","required":false},{"defaultValue":"false","name":"verbose","options":["true","false"],"description":"Show detailed help and descriptions","label":"Verbose Output","type":"select","required":false}],"instructions":"# Review Team Command\n\nA project-aware code review management command for Claude Code that creates and orchestrates a team of specialized review agents tailored to your specific project.\n\n## Overview\n\nThe `/review-team` command analyzes your project structure and creates six specialized agents customized for your project type. Whether you're working on a React app, Express API, Python package, or any other project, the review team adapts to provide relevant, focused feedback.\n\n## Installation\n\nThis command is part of the AI Commands collection. Once installed, you can use it in any project to set up a review team.\n\n## Quick Start\n\n```bash\n# Just run it! (analyzes project and creates tailored agents)\n/review-team\n\n# Run a specific agent\n/review-team agent=code-quality-reviewer\n\n# Check status only\n/review-team check=true\n```\n\n## How It Works\n\n1. **Checks Existing Agents** - Looks for review team in `.claude/agents/`\n2. **Analyzes Your Project** (if needed) - Detects language, framework, UI components, APIs, databases\n3. **Customizes Agents** - Tailors each agent with project-specific context and focus areas\n4. **Reviews Smart** - Reviews uncommitted git changes or files in your current context window\n\n> **⚠️ Important**: After creating new agents, you must restart Claude Code for them to become available. The agents are saved to your `.claude/agents/` directory and will be accessible after restart.\n\n## Review Team Members\n\n1. **implementation-verifier** - Validates code against specifications\n2. **reality-checker** - Assesses actual vs claimed completion\n3. **code-quality-reviewer** - Identifies complexity and maintainability issues\n4. **compliance-validator** - Ensures adherence to project standards\n5. **completion-auditor** - Verifies end-to-end functionality\n6. **ui-tester** - Tests user interfaces across platforms\n\n## Usage Examples\n\n### Basic Usage\n```bash\n# Run full review (auto-creates agents if needed)\n/review-team\n\n# Run specific agent\n/review-team agent=reality-checker\n\n# Just check status\n/review-team check=true\n```\n\n### Direct Agent Usage\n```bash\n# Once created, use agents directly for targeted reviews\n# NOTE: Restart Claude Code after creating agents for them to be available\ntask subagent_type=implementation-verifier prompt=\"Check if auth matches the spec\"\ntask subagent_type=ui-tester prompt=\"Test the new dashboard on mobile\"\ntask subagent_type=code-quality-reviewer prompt=\"Review the data layer for over-engineering\"\n```\n\n### Management\n```bash\n# Force recreate all agents\n/review-team create=true\n\n# Show detailed help\n/review-team verbose=true\n```\n\n## Command Arguments\n\n- `agent` - Run specific agent only (optional)\n- `check` - Only check status, don't run review (optional)\n- `create` - Force create/recreate all agents (optional)\n- `verbose` - Show detailed help and descriptions (optional)\n\n## Best Practices\n\n1. **Just Run It** - The command handles setup automatically\n2. **Review Often** - Run reviews before commits, not after\n3. **Be Specific** - Give agents context about what to review\n4. **Act on Feedback** - Address issues as they're found\n5. **Layer Reviews** - Different agents catch different issues\n\n## Recommended Workflow\n\n1. Start with `reality-checker` for honest assessment\n2. Use `implementation-verifier` to check against specs\n3. Run `completion-auditor` to verify functionality\n4. Apply `code-quality-reviewer` for simplification\n5. Test with `ui-tester` for user experience\n6. Finish with `compliance-validator` for standards\n\n## Project-Specific Customization Examples\n\n### React Project\n- UI tester focuses on component testing and user interactions\n- Quality reviewer checks for React best practices and hooks usage\n- Implementation verifier validates prop types and state management\n\n### Express API Project  \n- Implementation verifier prioritizes endpoint validation\n- Completion auditor tests API integration points\n- Reality checker ensures error handling is production-ready\n\n### Python Package\n- Compliance validator checks PEP standards\n- Quality reviewer identifies Pythonic vs non-Pythonic code\n- UI tester adapts to CLI interface testing\n\n## Tips\n\n- Agents are created in your project's `.claude/agents/` directory\n- Each agent is customized with your project's specific context\n- Agents automatically update if project type changes significantly\n- Review findings focus on what matters for your tech stack\n- Use `create=true` to refresh agents after major project changes\n\n## License\n\nMIT - Part of the AI Commands collection","lastDownloaded":"2025-08-02T01:41:16.089Z","licenseType":"mit","likes":0,"mcpRequirements":[{"tier":"required","serverId":"filesystem"}],"mcp_search_content":"docker-filesystem","organizationUsername":"commands-com","price":"free","processedGalleryItems":[{"s3KeyThumbnail":"processed/a264289e-0271-494c-9576-9258c4dd4246/1754057259253_preview_thumb.webp","s3KeyLarge":"processed/a264289e-0271-494c-9576-9258c4dd4246/1754057259253_preview.webp","name":"1754057259253_preview.webp","originalKey":"temp-uploads/a264289e-0271-494c-9576-9258c4dd4246/1754057259253_preview.png","pathLarge":"a264289e-0271-494c-9576-9258c4dd4246/1754057259253_preview.webp","type":"image/webp","pathThumbnail":"a264289e-0271-494c-9576-9258c4dd4246/1754057259253_preview_thumb.webp"}],"search_content":"review team manager creates and manages a project-aware code review team of specialized claude code agents tailored to your specific project /review-team development claude-code@2025.06","title":"Review Team Manager","type":"command","updatedAt":"2025-08-17T16:56:09.543Z","userId":"W0V8NAw5AhWRwcuwSoFLOi1Yem83","visibility":"public","name":"review-team","userInteraction":{"userHasStarred":false}}