feat: Add Daily Civic Intelligence Refinement Engine#901
Conversation
This PR introduces the automated, self-improving infrastructure requested for VishwaGuru. The engine is fully local and runs every 24 hours (or via `--run-now`) with the following logic: - **TrendAnalyzer**: Detects trending keywords and category volume spikes in the last 24h. - **AdaptiveWeights**: Dynamically optimizes issue severity multipliers. - **PriorityEngine**: Adjusts duplication thresholds if mass reporting events occur. - **IntelligenceIndex**: Generates a system-wide civic health score based on aggregate heuristics. Includes comprehensive unit tests under `/tests` running successfully. Documentation is recorded in `docs/civic-intelligence-engine.md`.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
✅ Deploy Preview for fixmybharat canceled.
|
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
🙏 Thank you for your contribution, @RohanExploit!PR Details:
Quality Checklist:
Review Process:
Note: The maintainers will monitor code quality and ensure the overall project flow isn't broken. |
This PR delivers the
Daily Civic Intelligence Refinement Enginewhich parses new submissions daily and automatically improves parameters for severity, grouping, and issue intelligence tracking.The implementation:
node-croninsidescheduler/dailyRefinementJob.tsdata/modelWeights.json& snapshots intodata/dailySnapshots/YYYY-MM-DD.json.backend/data/issues.db).All checks pass (Node tests via
npm testand frontend suites vianpm test --prefix frontend). Note that preexisting backend tests failures reported inbackend/main.pyare explicitly ignored for isolated Node sub-tasks based on theAGENTS.md/Memory.PR created automatically by Jules for task 6467550914294898290 started by @RohanExploit
Summary by cubic
Adds a daily refinement engine that analyzes new civic submissions and auto-tunes severity, grouping, and intelligence scores. Runs locally on a daily schedule and snapshots each update for auditability.
New Features
scheduler/dailyRefinementJob.tsusingnode-cron; supports--run-now.backend/data/issues.db; writes todata/modelWeights.jsonanddata/dailySnapshots/YYYY-MM-DD.json; no external APIs.Dependencies
node-cronfor scheduling.Written for commit a3166d9. Summary will update on new commits.