Skip to content

Conversation

@naaa760
Copy link

@naaa760 naaa760 commented Nov 17, 2025

fix: #22

  • Add a new RepositoryAnalysisAgent that analyzes GitHub repositories to automatically generate personalized Watchflow rule recommendations. The agent uses LangGraph for multi-step analysis including repository structure examination, contributing guidelines parsing, and pattern-based rule generation with confidence scoring.

Key Features:

  • Repository Analysis: Examines workflows, contributors, branch protection, and code patterns
  • Contributing Guidelines Parsing: Uses LLM to extract requirements from CONTRIBUTING.md files
  • Rule Recommendations: Generates valid Watchflow YAML rules with confidence scores and reasoning
  • API Integration: Adds POST /api/v1/rules/recommend endpoint with caching and rate limiting
  • Agent Factory: Integrated into the existing agent system via get_agent("repository_analysis")

Files Added:

  • src/agents/repository_analysis_agent/ - Complete agent implementation
  • src/api/recommendations.py - REST API endpoints
  • Updated src/agents/factory.py and src/main.py for integration

Acceptance Criteria:

Analyzes repositories and generates valid rule recommendations
Recommendations include confidence scores and clear reasoning
API endpoint accepts repository identifiers and returns structured data
Integrates seamlessly with existing Watchflow architecture
All recommendations are valid Watchflow rule YAML
Comprehensive error handling and validation

@naaa760 naaa760 requested a review from dkargatzis as a code owner November 17, 2025 08:23
@dkargatzis
Copy link
Member

Hello @naaa760 - thanks for the PR, it adds really cool functionality for better / smother UX. Could we please address the pre-commit and test issues? Also please give an example of the expected outcome - what are the rules that this endpoint suggests for a high volume repo.

@naaa760
Copy link
Author

naaa760 commented Nov 29, 2025

@dkargatzis
please check!

@dkargatzis
Copy link
Member

@naaa760 I guess we still need to instruct the agent / pass that context to the agent?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: implement repository analysis agent with recommendation API

2 participants