Transform the existing "CareerConnect" (Ruvva) microservices project into Kodra.ai, an Autonomous Career Agent for the WeMakeDevs Hackathon. The goal is to build a platform that analyzes a user's GitHub code and generates personalized learning "Missions" to improve their skills.
Key Pivot:
- From: Generic Career Counseling (Assessment -> Career Path)
- To: Coding Mentorship (Code Analysis -> Learning Mission)
Important
Data Loss Warning: This plan involves deleting existing career-specific features (College database, RIASEC assessments, Mentor bookings) to focus on the Code Analysis features.
Sponsor Requirements: We must strictly adhere to the technical requirements for Cline, Kestra, Oumi, Vercel, and CodeRabbit as detailed in we make dev.md.
We will first slim down the existing application to remove noise.
- Remove
College,Career,Booking,Mentorentities and controllers. - Rename generic
Assessmententity toCodeAnalysisor similar, or adapt it.
- Database Management:
- Switch to Supabase (PostgreSQL).
- Remove Firestore dependencies.
- Create Tables:
users,missions,code_analysis,skill_history.
- GitHub Integration:
- Add
GitHubServiceto handle OAuth and API calls. - Add
WebhookControllerto listen for GitHub and CodeRabbit events.
- Add
- New Entities:
Mission(Title, Description, Status, RelatedRepo, ExpectedFix).CodeAnalysis(Stores logic/security/performance scores).SkillHistory(Tracks progress over time).
- Logic:
- Implement
MissionServiceto generate tasks based on low scores from the AI service.
- Implement
- Code Analysis Engine:
- Implement
code_analyzer.pyusing AST/Regex to detect:- Exposed Secrets (Security)
console.logoveruse (Best Practices)- SQL Injection patterns (Security)
- Missing Error Handling (Logic)
- Implement
- Integration:
- Oumi: Use Oumi logic (mock or real) to refine pattern detection scoring.
- Kestra: Expose endpoints for Kestra to trigger batch analysis.
- New Pages:
GitHubConnect.js: OAuth entry point.Dashboard.js: Replacement for the old Home page. Shows Code Health graphs.MissionList.js&MissionDetail.js: The core learning UI.
- Chat:
- Update the AI Chat interface to offer "Pair Programming" context (inject file context into prompt).
- Plan: We will use Cline to generate the
MissionServicelogic and Frontend Components. We will document this usage. - Feature: Build a "Teacher Mode" assistance prompt that Cline can use.
- Plan: Define a Kestra Flow (YAML) that orchestrates the "Diagnosis" phase.
- Trigger: User Connects GitHub.
- Step 1: Clone Repo (Python).
- Step 2: Run Analysis (Python).
- Step 3: Summarize Findings (AI Agent).
- Step 4: Post results to Backend.
- Plan: Integrate Oumi in the Python service.
- Feature: "Feedback Loop". When a user marks a Mission as "Too Hard", use Oumi optimized model to adjust the difficulty of future mission pattern matching.
- Plan: Setup a repo-level webhook.
- Flow: User pushes Mission fix -> CodeRabbit reviews PR -> Webhook hits Backend -> Update Mission Status to "Verified" if review is clean.
- Plan: Deploy
kodra(frontend) directory to Vercel. Ensureproxysettings inpackage.jsonare handled via Environment Variables for production.
- Backend: Unit tests for
GitHubServiceandMissionGenerator. - AI Service: Test
code_analyzer.pyagainst a known "Vulnerable Repo" to ensure it catches all 5 patterns.
- Login: Sign in with Firebase (reuse existing) - Correction: Will migrate to Supabase Auth if possible, or keep Firebase Auth and sync to Supabase. Plan implies full switch, but Auth might stick to Firebase for ease if just DB is needed. Let's assume full switch or Supabase for DB.
- Connect: Click "Link GitHub".
- Analyze: Verify Dashboard updates with "Real" data from the linked repo.
- Mission: Click a mission, see the details.
- Fix: Push a fix to the repo.
- Verify: Check if CodeRabbit webhook updates the dashboard score.