Skip to content

πŸš€ Complete AI Development Automation Suite - PR reviews, debates, CI/CD monitoring, task delegation, and Research-TDD workflows for Claude Code

License

Notifications You must be signed in to change notification settings

good-night-oppie/oppie-autonav

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

25 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Oppie AutoNav - Advanced AI Development Automation

Complete automation suite for Claude Code with PR reviews, debate protocols, CI/CD monitoring, and intelligent task delegation

🌟 Features

  • πŸ€– Automated PR Reviews: Claude reviews every PR with complexity-based depth
  • πŸ’¬ Debate Protocol: Multi-round evidence-based discussions with Claude
  • πŸ”„ CI/CD Monitoring: Automatic detection and fixing of CI failures
  • 🎯 Task Delegation: Intelligent routing to Gemini for large-scale operations
  • πŸ“Š Research-TDD Workflow: Automated research β†’ test β†’ implement β†’ review cycle
  • 🧠 Sub-agent Orchestration: Specialized agents for different domains
  • ⚑ Performance Optimized: Sub-second hook execution with caching

πŸ“‹ Prerequisites

Before installation, ensure you have:

# Required tools
- claude (Claude CLI) - npm install -g @anthropic-ai/claude-code
- gemini (Gemini CLI) - https://github.com/google/generative-ai-cli
- gh (GitHub CLI) - https://cli.github.com/
- jq - JSON processor
- shellcheck - Shell script analyzer

# Optional but recommended
- npm/node - For Claude Code installation
- python3 - For test runners
- git - Version 2.0+

πŸ› οΈ Installation

Step 1: Clone the Repository

cd ~/workspace
git clone https://github.com/yourusername/oppie-autonav.git
cd oppie-autonav

Step 2: Configure API Keys

# Set up Gemini API key
export GEMINI_API_KEY="your-gemini-api-key"

# Set up GitHub token (for PR operations)
gh auth login

# Configure Claude Code (if using OAuth)
claude auth login

Step 3: Install Claude-Gemini Bridge

This enables intelligent delegation of large tasks to Gemini:

# Option A: Install in current project
./scripts/install-bridge.sh

# Option B: Install globally
./scripts/install-bridge.sh --global

Step 4: Install Advanced Hooks

Configure Claude Code hooks for automation:

# Install PR monitoring and CI hooks
./scripts/install-hooks.sh

# Verify installation
./scripts/verify-installation.sh

Step 5: Configure GitHub Actions

Set up automated PR reviews in your repository:

# Copy workflow templates to your project
cp .github/workflows/claude-pr-review.yml /path/to/your/project/.github/workflows/

# Set required secrets in GitHub:
# - CLAUDE_CODE_OAUTH_TOKEN (from Claude Code Max plan)
# - CLAUDE_ACCESS_TOKEN (optional, for OAuth)
# - CLAUDE_REFRESH_TOKEN (optional, for OAuth)
# - SECRETS_ADMIN_PAT (for secret management)

Step 6: Install OTW Commands (Optional)

For advanced Research-TDD workflow:

# Link OTW commands to Claude
ln -s ~/workspace/oppie-autonav/.claude/commands ~/.claude/commands

# Or copy specific workflows
cp -r .claude/commands/otw /path/to/project/.claude/commands/

🎯 Quick Start

Basic PR Review Workflow

# 1. Create feature branch
git checkout -b feature/awesome-feature

# 2. Make changes and commit with complexity hint
git add .
git commit -m "feat: Add awesome feature

Complexity: 7/10
Domain: backend"

# 3. Push and create PR
git push origin feature/awesome-feature
gh pr create --title "Add awesome feature" --body "Complexity: 7/10"

# 4. Request Claude review (automatic for complexity >= 7)
gh pr comment --body "@claude please review this PR"

# The system will:
# - Post specialized review request
# - Monitor Claude's responses
# - Handle multi-round debates
# - Collect evidence as needed

Research-TDD Workflow

# 1. Start a complex task
/otw/research-tdd-pr-review task-123 --complexity 9

# Automatically:
# - Conducts research phase
# - Implements with TDD (Red β†’ Green β†’ Refactor)
# - Creates PR with context
# - Initiates Claude review with debate
# - Monitors until approved

πŸ—οΈ Architecture

oppie-autonav/
β”œβ”€β”€ .github/workflows/        # GitHub Actions for PR reviews
β”‚   β”œβ”€β”€ claude-pr-review.yml  # Main review workflow
β”‚   └── claude-debate.yml     # Debate protocol workflow
β”‚
β”œβ”€β”€ .claude/                  # Claude Code configuration
β”‚   β”œβ”€β”€ commands/otw/         # Advanced workflow commands
β”‚   β”‚   β”œβ”€β”€ research-tdd-pr-review.md
β”‚   β”‚   └── execute-workflow.sh
β”‚   └── hooks/                # Runtime hooks
β”‚       β”œβ”€β”€ pr-review-monitor.sh
β”‚       └── unified-automation.sh
β”‚
β”œβ”€β”€ hooks/                    # Core automation scripts
β”‚   β”œβ”€β”€ pr-review/           # PR monitoring system
β”‚   β”‚   β”œβ”€β”€ pr-monitor.sh
β”‚   β”‚   └── debate-handler.sh
β”‚   β”œβ”€β”€ lib/                # Shared libraries
β”‚   β”‚   β”œβ”€β”€ gemini-wrapper.sh
β”‚   β”‚   └── evidence-collector.sh
β”‚   └── config/             # Configuration files
β”‚       └── complexity.conf
β”‚
β”œβ”€β”€ scripts/                 # Installation and utilities
β”‚   β”œβ”€β”€ install-bridge.sh
β”‚   β”œβ”€β”€ install-hooks.sh
β”‚   └── verify-installation.sh
β”‚
└── docs/                   # Documentation
    β”œβ”€β”€ SETUP.md
    β”œβ”€β”€ WORKFLOWS.md
    └── TROUBLESHOOTING.md

πŸ”§ Configuration

Complexity Levels

Configure review depth based on task complexity:

Level Reviewer Focus Debate Rounds
1-3 Basic Reviewer Syntax, style 1
4-6 Senior Developer Logic, patterns 1-2
7-8 Principal Engineer Architecture, trade-offs 2-3
9-10 Chief Architect Proof, validation 3-4

Edit hooks/config/complexity.conf to customize.

Hook Configuration

Customize automation behavior in ~/.claude/settings.json:

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Read|Grep|Glob|Task",
        "hooks": [{
          "type": "command",
          "command": "~/workspace/oppie-autonav/hooks/gemini-bridge.sh"
        }]
      }
    ],
    "PostToolUse": [
      {
        "matcher": "Bash",
        "hooks": [{
          "type": "command",
          "command": "~/workspace/oppie-autonav/hooks/pr-review/pr-monitor.sh detect"
        }]
      }
    ]
  }
}

GitHub Actions Secrets

Required secrets for your repository:

CLAUDE_CODE_OAUTH_TOKEN: # From Claude Code Max plan
CLAUDE_ACCESS_TOKEN:     # For OAuth flow (optional)
CLAUDE_REFRESH_TOKEN:    # For token refresh (optional)
SECRETS_ADMIN_PAT:       # GitHub PAT for secret management

πŸ“Š Usage Examples

Manual PR Monitoring

# Start monitoring a PR
./hooks/pr-review/pr-monitor.sh monitor 123 8

# Request review with specific complexity
./hooks/pr-review/pr-monitor.sh request 123 9 security

# Check monitoring status
./hooks/pr-review/pr-monitor.sh status

# Stop monitoring
./hooks/pr-review/pr-monitor.sh stop 123

CI/CD Auto-Fix

# Trigger auto-fix for CI failures
./hooks/ci-monitor.sh autofix 123

# Monitor CI status
./hooks/ci-monitor.sh status

Evidence Collection

During debates, evidence is automatically collected:

# Manual evidence collection
./hooks/lib/evidence-collector.sh 123 round-2

# Generates:
# - Test results
# - Benchmark data
# - Code coverage
# - Security scan results

🎨 Customization

Add Custom Reviewer Personas

Edit hooks/pr-review/personas.conf:

case $domain in
    "security")
        REVIEWER_ROLE="Security Expert"
        FOCUS_AREAS="OWASP, auth, crypto"
        ;;
    "ml")
        REVIEWER_ROLE="ML Engineer"
        FOCUS_AREAS="Models, data, metrics"
        ;;
esac

Custom Evidence Collectors

Add to hooks/lib/evidence-collector.sh:

collect_custom_evidence() {
    # Run your custom validation
    your-tool --validate > evidence/custom.txt
}

Workflow Templates

Create custom workflows in .claude/commands/:

# /custom/my-workflow
Triggers: specific-condition
Actions: 
1. Research phase
2. Implementation
3. Review with custom persona

πŸ› Troubleshooting

Hooks Not Triggering

# Check installation
./scripts/verify-installation.sh

# View hook logs
tail -f ~/.claude/logs/hooks.log

# Test hooks manually
./hooks/pr-review/pr-monitor.sh test

Claude Not Responding

# Check GitHub Actions
gh run list --workflow=claude-pr-review.yml

# Verify secrets
gh secret list

# Test Claude connection
claude --version

Gemini Delegation Issues

# Test Gemini connection
echo "test" | gemini -p "respond with ok"

# Check cache
ls -la hooks/cache/gemini/

# View delegation logs
tail -f logs/gemini-bridge.log

πŸ“ˆ Performance

  • Hook Execution: <500ms (async)
  • PR Detection: <1s with caching
  • Evidence Collection: 5-30s
  • Debate Response: 10-60s
  • Gemini Delegation: 2-10s

πŸ”’ Security

  • No API keys in code or logs
  • Secure token storage with encryption
  • Input validation and sanitization
  • Automatic secret rotation support
  • File exclusions for sensitive data

🀝 Contributing

See CONTRIBUTING.md for guidelines.

πŸ“„ License

MIT License - see LICENSE

πŸ™ Acknowledgments

  • Claude Code team for the amazing CLI
  • Gemini team for the powerful API
  • GitHub for Actions and CLI
  • oppie-thunder contributors

πŸ“ž Support


Made with ❀️ for the AI development community

Automate everything, review everything, ship with confidence!

About

πŸš€ Complete AI Development Automation Suite - PR reviews, debates, CI/CD monitoring, task delegation, and Research-TDD workflows for Claude Code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages