• 0 Open
    7 Closed
    Updated 2025-12-28 19:17:32 +00:00
    Closed 2025-12-28 19:17:32 +00:00

    Milestone 1: Core Features (Quick Wins)

    Status: 🚧 IN PROGRESS
    Target: Q1 2025
    Duration: 2 weeks
    Total Effort: 5-8 hours


    Overview

    Implement essential functionality that makes OpenRabbit fully usable for daily use.

    Goals

    Features that:

    • Significantly improve user experience
    • Reduce setup friction
    • Increase discoverability
    • Deliver immediate value to developers

    Impact

    Transforms OpenRabbit from "works but complex" to "works and is easy to use" 🚀


    Features

    1. @codebot help Command CRITICAL

    Priority: CRITICAL
    Effort: 1-2 hours
    Value: HIGH

    Description:
    Show all available commands with examples - users can discover what the bot can do without reading documentation.

    Files to Modify:

    • tools/ai-review/config.yml
    • tools/ai-review/agents/issue_agent.py

    Why Critical:
    Users can't discover what the bot can do without reading external docs. This is the #1 discoverability issue.

    Implementation:

    • Add help to commands list in config
    • Implement _command_help() method
    • Format response with categories and examples
    • Update @codebot help output itself

    Output Example:

    **Available @codebot Commands:**
    
    **Issue Triage & Analysis:**
    - `@codebot triage` - Full issue triage with auto-labeling
    - `@codebot summarize` - Generate 2-3 sentence summary
    - `@codebot explain` - Detailed explanation
    
    **Interactive Chat:**
    - `@codebot [question]` - Ask questions about codebase
    
    **Examples:**
    @codebot triage
    @codebot how does authentication work?
    

    2. Automatic Label Creator HIGH

    Priority: HIGH
    Effort: 3-4 hours (includes mapping logic)
    Value: VERY HIGH

    Description:
    @codebot setup-labels auto-creates or maps existing labels, eliminating #1 setup frustration.

    Files to Modify:

    • tools/ai-review/config.yml
    • tools/ai-review/agents/issue_agent.py
    • tools/ai-review/clients/gitea_client.py

    Why High:
    Manual label creation is the biggest setup pain point. Takes 15-20 minutes manually, will take 30 seconds with this command.

    Key Features:

    • 🔍 Smart Detection - Detects existing label schemas (Kind/, Priority -, type:)
    • 🗺️ Intelligent Mapping - Maps existing labels instead of creating duplicates
    • Zero Duplicates - Won't create type: bug if you already have Kind/Bug
    • 🎯 Respects Conventions - Follows your existing naming patterns
    • 📝 Auto Config - Generates .ai-review.yml with mappings

    Two Modes:

    1. Map Mode (Default for repos with existing labels):

      • Detects: Kind/Bug, Priority - High, etc.
      • Creates .ai-review.yml mapping
      • No duplicate labels
    2. Create Mode (For fresh repositories):

      • Creates standard OpenRabbit labels
      • type:, priority:, ai-* labels

    Implementation:

    • Add label pattern detection (regex)
    • Implement fuzzy matching with aliases
    • Generate .ai-review.yml config
    • Create missing labels in user's style
    • API methods: create_label(), get_repo_labels()

    Output Example:

    **🔍 Label Schema Detected:**
    
    Found 18 existing labels with pattern: `Kind/` and `Priority -`
    
    **📋 Proposed Mapping:**
    | OpenRabbit Expected | Your Existing Label | Status |
    |---------------------|---------------------|--------|
    | `type: bug` | `Kind/Bug` | ✅ Map |
    | `priority: high` | `Priority - High` | ✅ Map |
    
    **✅ Setup Complete!**
    Created `.ai-review.yml` with label mappings.
    

    3. @codebot review-again Command

    Priority: MEDIUM
    Effort: 1-2 hours
    Value: HIGH

    Description:
    Re-run PR review without new commits - smoother workflow, no unnecessary commits.

    Files to Modify:

    • tools/ai-review/config.yml
    • tools/ai-review/agents/pr_agent.py

    Why Important:
    Currently developers must create empty commits to trigger re-review. This clutters git history and wastes CI time.

    Key Features:

    • 🔄 Re-run Review - On current HEAD commit
    • 📊 Show Diff - Compares to previous review
    • 🏷️ Auto Update Labels - Changes ai-changes-required to ai-approved
    • Fast Iteration - No waiting for CI
    • 🔧 Config Aware - Uses latest .ai-review.yml

    Use Cases:

    1. False Positive - "This is a public URL, not a secret" → re-review
    2. Config Change - Updated .ai-review.yml → test new rules
    3. Comment Clarification - Explained design in comments → re-evaluate

    Implementation:

    • Detect review-again in PR comments
    • Reuse existing _run_pr_review() logic
    • Add _compare_reviews() for diff
    • Add _parse_review_comment() to extract previous findings
    • Format with resolved/new/still present sections

    Output Example:

    **🔄 Re-review Requested**
    
    **Previous Review:** 3 issues (1 HIGH, 2 MEDIUM)
    **Current Review:** 2 issues (0 HIGH, 2 MEDIUM)
    
    ### Changes from Previous Review
    
    **✅ Resolved (1):**
    - [HIGH] Hardcoded API key (confirmed as public URL)
    
    **Still Present (2):**
    - [MEDIUM] Error handling could be more specific
    
    **Overall Severity:** MEDIUM (was HIGH)
    **AI Recommendation:** Approved ✅
    

    Success Metrics

    Week 1

    • @codebot help command deployed
    • 80%+ users discover help within first use
    • Zero "what can the bot do?" support questions

    Week 2

    • Automatic Label Creator deployed
    • Setup time < 5 minutes (from 20+ minutes)
    • Zero manual label creation required

    Week 3

    • @codebot review-again deployed
    • 90% reduction in empty "trigger review" commits
    • PR review workflow smooth and intuitive

    Overall

    • New users can use bot within 5 minutes
    • All three features working in production
    • Positive user feedback
    • Ready to move to Milestone 2

    Implementation Timeline

    Week 1: @codebot help

    Days 1-2:

    • Add help to config.yml
    • Implement _command_help() method
    • Format help text
    • Testing

    Days 3-4:

    • Documentation
    • Deploy to production
    • Monitor usage

    Week 2: Automatic Label Creator

    Days 1-2:

    • Label schema detection logic
    • Pattern matching (Kind/, Priority -, type:)
    • Fuzzy matching with aliases

    Days 3-4:

    • Map mode implementation
    • Create mode implementation
    • Generate .ai-review.yml

    Day 5:

    • API methods (create_label, get_repo_labels)
    • Testing with different label schemas
    • Documentation

    Week 3: @codebot review-again

    Days 1-2:

    • Command detection in PR comments
    • Review comparison logic
    • Parse previous review

    Days 3-4:

    • Format diff output
    • Label updates
    • Testing

    Day 5:

    • Documentation
    • Deploy to production

    Week 4: Polish & Deploy

    • Final testing across all features
    • Update README and docs
    • Monitor production usage
    • Gather user feedback
    • Prepare for Milestone 2

    Dependencies

    Required:

    • v1.0 Foundation (already complete)
    • Bot token with repo:write permissions
    • Access to Gitea/GitHub API

    Blocks:

    • Milestone 2 (PR Workflow Enhancement)
    • All future milestones depend on good UX foundation

    Risk Assessment

    Low Risk Features

    • @codebot help - Very simple, pure text output
    • @codebot review-again - Reuses existing code

    Medium Risk Features

    • ⚠️ Automatic Label Creator - Pattern detection might not catch all schemas
    • Mitigation: Dry-run mode, manual mode selection, fallback to create mode

    Overall Risk: LOW

    All features are additive and don't break existing functionality.


    Testing Strategy

    Unit Tests

    • Help command formatting
    • Label pattern detection (Kind/, Priority -, type:)
    • Label mapping fuzzy matching
    • Review comparison logic
    • Previous review parsing

    Integration Tests

    • Help command in real repository
    • Label creator with fresh repository
    • Label creator with existing labels (Kind/ pattern)
    • Label creator with existing labels (Priority - pattern)
    • Review-again on PR with previous review
    • Review-again on PR without previous review

    User Acceptance Testing

    • Test setup flow end-to-end
    • Verify all commands work
    • Check documentation accuracy
    • Gather feedback from beta users

    Documentation Updates

    README.md

    • Add @codebot help to commands table
    • Add @codebot setup-labels to Quick Start
    • Add @codebot review-again to PR workflow section
    • Update feature list

    Getting Started Guide

    • Setup now includes @codebot setup-labels
    • Remove manual label creation instructions
    • Add "First Steps" section with help command

    API Reference

    • Document new GiteaClient methods
    • Document new IssueAgent methods
    • Document new PRAgent methods

    Troubleshooting

    • Add section on label mapping issues
    • Add section on pattern detection
    • Add FAQ for common questions

    Next Steps After Completion

    1. Gather Metrics:

      • Track command usage (help, setup-labels, review-again)
      • Measure setup time reduction
      • Monitor support ticket reduction
    2. User Feedback:

      • Survey users on ease of setup
      • Identify remaining pain points
      • Collect feature requests
    3. Prepare Milestone 2:

      • Review PR Workflow Enhancement features
      • Prioritize based on user feedback
      • Update implementation plan
    4. Celebrate! 🎉

      • OpenRabbit is now truly easy to use
      • Major UX improvements delivered
      • Foundation set for future features

    • Issue #XXX: @codebot help Command
    • Issue #XXX: Automatic Label Creator
    • Issue #XXX: @codebot review-again Command

    Last Updated: December 28, 2024
    Status: 🚧 IN PROGRESS
    Next Review: End of Week 1

  • 0 Open
    8 Closed
    Updated 2025-12-29 13:27:22 +00:00
    Closed 2025-12-29 13:27:22 +00:00

    Milestone 2: PR Workflow Enhancement

    Status: 📅 PLANNED
    Target: Q1-Q2 2025
    Duration: 2 weeks
    Total Effort: 7-10 hours


    Overview

    Make PRs more understandable and documented for both technical and non-technical stakeholders.

    Goals

    • Non-technical stakeholders can understand PRs
    • Automated changelog generation
    • Better PR documentation quality
    • Reduced time spent on manual documentation

    Features

    1. Code Diff Explainer

    Priority: HIGH
    Effort: 2-3 hours
    Value: MEDIUM-HIGH

    Description:
    @codebot explain-diff breaks down complex changes in plain language.

    Use Cases:

    • New team members understanding large PRs
    • Non-technical reviewers (PMs, designers)
    • Documentation for architectural changes
    • Learning from other developers' code

    Files to Modify:

    • tools/ai-review/config.yml
    • tools/ai-review/agents/pr_agent.py
    • tools/ai-review/prompts/explain_diff.md

    Output Example:

    **PR Explanation:**
    
    **Overview:**
    This PR adds user authentication using JWT tokens.
    
    **Key Changes:**
    
    1. **auth/jwt.py** (new file)
       - Creates JSON Web Tokens for authenticated users
       - Validates tokens on protected endpoints
       - 24 hour token lifetime
    
    2. **api/users.py** (modified)
       - Added `/login` endpoint
       - Returns JWT token on successful auth
       - Passwords hashed using bcrypt
    
    **Architecture Impact:**
    - Introduces authentication layer across all API endpoints
    - Adds dependency on PyJWT library
    

    2. PR Changelog Generator

    Priority: MEDIUM
    Effort: 3-4 hours
    Value: MEDIUM

    Description:
    @codebot changelog generates human-readable changelog from PR for release notes.

    Use Cases:

    • Release note generation
    • CHANGELOG.md maintenance
    • Version documentation
    • Customer-facing release announcements

    Files to Modify:

    • tools/ai-review/config.yml
    • tools/ai-review/agents/pr_agent.py

    Output Example:

    **Changelog for PR #123:**
    
    ### Added
    - User authentication system with JWT tokens
    - Password reset functionality via email
    
    ### Changed
    - Updated database schema for user table
    - Refactored login endpoint for better error handling
    
    ### Fixed
    - Session timeout bug causing premature logouts
    - Security vulnerability in password validation
    
    ### Technical Details
    - 15 files changed, 450 insertions, 120 deletions
    - Main components: auth/, api/users/, database/
    

    3. PR Summary Generator

    Priority: MEDIUM
    Effort: 2-3 hours
    Value: MEDIUM

    Description:
    Auto-generate PR description from diff when PR is created without description.

    Use Cases:

    • Developers who forget to write descriptions
    • Quick PR creation workflow
    • Standardized PR format
    • Consistency across team

    Files to Modify:

    • tools/ai-review/agents/pr_agent.py

    Implementation:

    • Trigger on pull_request.opened if description is empty
    • Analyze diff and generate summary
    • Post as PR description or first comment
    • Include: what changed, why, files affected

    Success Metrics

    Changelog Generation

    • Changelog generation time reduced by 80%
    • 90%+ of changelogs accurate and useful
    • Used on 50%+ of releases

    Diff Explanation

    • Non-technical stakeholders understand 70%+ of PRs
    • Reduced clarification questions by 40%
    • Positive feedback from reviewers

    PR Summaries

    • 60%+ of PRs have good descriptions
    • Reduced "missing description" comments
    • Faster review times

    Implementation Plan

    Week 1: Code Diff Explainer

    Days 1-2:

    • Create prompts/explain_diff.md
    • Implement _command_explain_diff() in PRAgent
    • Test with various PR sizes

    Days 3-4:

    • Format output for readability
    • Add architectural impact detection
    • Testing and refinement

    Day 5:

    • Documentation
    • Deploy to production

    Week 2: Changelog & Summary

    Days 1-3:

    • Implement changelog generator
    • Parse commits and diff
    • Format as standard changelog

    Days 4-5:

    • Implement PR summary generator
    • Auto-detect empty descriptions
    • Deploy and monitor

    Dependencies

    Required:

    • Milestone 1 (Core Features) - MUST be complete
    • Existing PR review system

    Nice to Have:

    • Commit message parsing
    • Git history analysis

    Next Steps

    After completion, proceed to:

    • Milestone 3: Quality & Testing
    • Gather feedback on documentation quality
    • Identify additional PR workflow improvements

    Last Updated: December 28, 2024
    Status: 📅 PLANNED