Spaces:
Running
Running
Revise BharatGraph phase roadmap and update phases
Browse files- PHASE_ROADMAP.md +361 -720
PHASE_ROADMAP.md
CHANGED
|
@@ -1,847 +1,488 @@
|
|
| 1 |
-
# BharatGraph — Phase Roadmap
|
| 2 |
-
# GitHub Issue and Pull Request
|
| 3 |
-
#
|
| 4 |
-
# For each phase:
|
| 5 |
-
# 1. Create the GitHub issue using the ISSUE section
|
| 6 |
-
# 2. Create the branch listed under BRANCH
|
| 7 |
-
# 3. Build the files listed under FILES
|
| 8 |
-
# 4. Open a pull request using the PR section
|
| 9 |
-
# 5. Merge into main
|
| 10 |
-
#
|
| 11 |
# Branch naming: feature/phase-N-name or fix/issue-N-name
|
| 12 |
-
# No develop branch. All branches merge directly into main.
|
| 13 |
|
| 14 |
|
| 15 |
-
# ============================================================
|
| 16 |
-
# PHASE
|
| 17 |
-
# ============================================================
|
| 18 |
-
|
| 19 |
-
ISSUE_TITLE:
|
| 20 |
-
"feat(api): FastAPI backend with entity search, dossier, and graph endpoints"
|
| 21 |
-
|
| 22 |
-
ISSUE_LABELS:
|
| 23 |
-
["enhancement"]
|
| 24 |
|
|
|
|
|
|
|
| 25 |
ISSUE_DESCRIPTION: |
|
| 26 |
-
|
| 27 |
-
|
| 28 |
|
| 29 |
Files to create:
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
api/routes/profile.py GET /profile/{entity_id} — full dossier assembly
|
| 35 |
-
api/routes/risk.py GET /risk/{entity_id} — risk score with factor breakdown
|
| 36 |
-
api/routes/graph.py GET /graph/connections/{entity_id}?depth=2
|
| 37 |
-
api/routes/feed.py WebSocket /ws/feed — live update stream
|
| 38 |
-
|
| 39 |
-
Additional endpoints:
|
| 40 |
-
GET /health
|
| 41 |
-
GET /stats
|
| 42 |
-
GET /graph/pattern/politician-contracts
|
| 43 |
-
|
| 44 |
-
Response format for all endpoints must include:
|
| 45 |
-
data: the result payload
|
| 46 |
-
sources: list of source documents with url, date, institution
|
| 47 |
-
generated_at: ISO timestamp
|
| 48 |
-
|
| 49 |
-
Acceptance criteria:
|
| 50 |
-
uvicorn api.main:app starts without errors
|
| 51 |
-
GET /health returns 200 with Neo4j connection status
|
| 52 |
-
GET /search?q=sample returns structured results from Neo4j
|
| 53 |
-
All endpoints return typed JSON validated by Pydantic
|
| 54 |
-
|
| 55 |
-
BRANCH: "feature/phase-4-api"
|
| 56 |
-
|
| 57 |
-
PR_TITLE:
|
| 58 |
-
"feat(api): FastAPI backend with entity search, dossier, and graph endpoints"
|
| 59 |
-
|
| 60 |
-
PR_DESCRIPTION: |
|
| 61 |
-
Adds the complete REST API layer.
|
| 62 |
-
|
| 63 |
-
api/main.py: FastAPI app with CORS middleware, lifespan context managing
|
| 64 |
-
Neo4j driver, and router registration for all route modules.
|
| 65 |
-
|
| 66 |
-
api/models.py: Typed Pydantic models for SearchResult, EntityProfile,
|
| 67 |
-
RiskScore, GraphNode, GraphEdge, and FeedItem. All response models include
|
| 68 |
-
a sources field.
|
| 69 |
|
| 70 |
-
|
| 71 |
-
|
|
|
|
|
|
|
| 72 |
|
| 73 |
-
|
| 74 |
-
|
|
|
|
| 75 |
|
| 76 |
-
|
| 77 |
-
uvicorn api.main:app --reload
|
| 78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
Closes #ISSUE_NUMBER
|
| 80 |
|
| 81 |
|
| 82 |
-
# ============================================================
|
| 83 |
-
# PHASE
|
| 84 |
-
# ============================================================
|
| 85 |
-
|
| 86 |
-
ISSUE_TITLE:
|
| 87 |
-
"feat(ai): composite risk scoring engine with explainable factor breakdown"
|
| 88 |
-
|
| 89 |
-
ISSUE_LABELS:
|
| 90 |
-
["enhancement"]
|
| 91 |
|
|
|
|
|
|
|
| 92 |
ISSUE_DESCRIPTION: |
|
| 93 |
-
|
| 94 |
-
to each entity based on graph pattern analysis. Every score must be fully
|
| 95 |
-
explainable with source citations per factor.
|
| 96 |
|
| 97 |
Files to create:
|
| 98 |
-
ai/
|
| 99 |
-
ai/
|
| 100 |
-
ai/
|
| 101 |
-
|
| 102 |
-
Risk factors and weights:
|
| 103 |
-
contract_concentration 0.25 Single company winning repeated contracts
|
| 104 |
-
politician_company_overlap 0.35 Politician is director of contract-winning firm
|
| 105 |
-
audit_mention_frequency 0.20 Entity mentioned in multiple CAG audit reports
|
| 106 |
-
asset_growth_anomaly 0.15 Declared assets grew more than 300 percent
|
| 107 |
-
between consecutive election affidavits
|
| 108 |
-
criminal_case_presence 0.05 Declared criminal cases in ECI affidavit
|
| 109 |
-
|
| 110 |
-
Output structure per entity:
|
| 111 |
-
entity_id
|
| 112 |
-
entity_name
|
| 113 |
-
risk_score integer 0-100
|
| 114 |
-
risk_level LOW, MODERATE, HIGH, or VERY_HIGH
|
| 115 |
-
factors list of factor name, score, weight, evidence list
|
| 116 |
-
explanation neutral analytical text generated by explainer.py
|
| 117 |
-
sources all source documents referenced
|
| 118 |
-
|
| 119 |
-
Language rules enforced by explainer.py:
|
| 120 |
-
Use: structural indicator, governance anomaly, pattern, concentration
|
| 121 |
-
Never use: corrupt, suspect, criminal, fraud, guilty
|
| 122 |
-
|
| 123 |
-
Acceptance criteria:
|
| 124 |
-
python -m ai.risk_scorer runs on the sample graph data
|
| 125 |
-
Every factor in the output includes at least one source document reference
|
| 126 |
-
Risk level boundaries: 0-30 LOW, 31-60 MODERATE, 61-80 HIGH, 81-100 VERY_HIGH
|
| 127 |
-
|
| 128 |
-
BRANCH: "feature/phase-5-risk-scoring"
|
| 129 |
-
|
| 130 |
-
PR_TITLE:
|
| 131 |
-
"feat(ai): composite risk scoring engine with explainable factors"
|
| 132 |
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
ai/indicators.py: Five indicator functions each querying Neo4j for their
|
| 137 |
-
specific pattern. Returns a score between 0 and their maximum weight.
|
| 138 |
-
|
| 139 |
-
ai/risk_scorer.py: RiskScorer class calling all indicators, summing weighted
|
| 140 |
-
scores, and assembling the full output structure including evidence references.
|
| 141 |
|
| 142 |
-
|
| 143 |
-
Enforces legally safe language. Cites source documents inline.
|
| 144 |
-
|
| 145 |
-
Score interpretation:
|
| 146 |
-
0-30 Low structural indicators
|
| 147 |
-
31-60 Moderate structural indicators
|
| 148 |
-
61-80 High structural indicators
|
| 149 |
-
81-100 Very high structural indicators
|
| 150 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 151 |
Closes #ISSUE_NUMBER
|
| 152 |
|
| 153 |
|
| 154 |
-
# ============================================================
|
| 155 |
-
# PHASE
|
| 156 |
-
# ============================================================
|
| 157 |
-
|
| 158 |
-
ISSUE_TITLE:
|
| 159 |
-
"feat(scrapers): Lok Sabha, SEBI, eCourts, OpenSanctions, ICIJ, Wikidata"
|
| 160 |
-
|
| 161 |
-
ISSUE_LABELS:
|
| 162 |
-
["enhancement"]
|
| 163 |
|
|
|
|
|
|
|
| 164 |
ISSUE_DESCRIPTION: |
|
| 165 |
-
|
| 166 |
-
records, and international investigative databases. All sources are free.
|
| 167 |
|
| 168 |
Files to create:
|
| 169 |
-
scrapers/
|
| 170 |
-
scrapers/
|
| 171 |
-
scrapers/
|
| 172 |
-
scrapers/
|
| 173 |
-
scrapers/
|
| 174 |
-
scrapers/
|
| 175 |
-
scrapers/
|
| 176 |
-
scrapers/
|
| 177 |
-
|
| 178 |
-
New graph nodes
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
CourtJudgment with INVOLVES -> Person or Company
|
| 184 |
-
|
| 185 |
-
New data in .env.example:
|
| 186 |
-
OPENSANCTIONS_API_KEY free at opensanctions.org
|
| 187 |
-
No key needed for ICIJ, Wikidata, Lok Sabha, or PRS
|
| 188 |
-
|
| 189 |
-
Acceptance criteria:
|
| 190 |
-
All 8 scrapers pass syntax check
|
| 191 |
-
loksabha_scraper fetches at least one question from public record
|
| 192 |
-
opensanctions_scraper returns results for a test entity name
|
| 193 |
-
icij_scraper queries Offshore Leaks API and returns structured results
|
| 194 |
-
|
| 195 |
-
BRANCH: "feature/phase-6-data-sources"
|
| 196 |
-
|
| 197 |
-
PR_TITLE:
|
| 198 |
-
"feat(scrapers): Lok Sabha, SEBI, eCourts, OpenSanctions, ICIJ, Wikidata sources"
|
| 199 |
-
|
| 200 |
PR_DESCRIPTION: |
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
loksabha_scraper.py: Scrapes parliamentary question database from
|
| 205 |
-
loksabha.nic.in. Parses question number, date, subject, asking MP, and
|
| 206 |
-
ministry response.
|
| 207 |
-
|
| 208 |
-
prs_scraper.py: Fetches bill summaries and status from prsindia.org.
|
| 209 |
-
|
| 210 |
-
sebi_scraper.py: Scrapes enforcement action orders from sebi.gov.in.
|
| 211 |
-
|
| 212 |
-
ecourts_scraper.py: Queries judgment search API at judgments.ecourts.gov.in.
|
| 213 |
-
|
| 214 |
-
electoral_bond_scraper.py: Parses the Supreme Court ordered electoral bond
|
| 215 |
-
disclosure data from ECI portal.
|
| 216 |
-
|
| 217 |
-
opensanctions_scraper.py: Queries OpenSanctions free API for PEP and
|
| 218 |
-
sanctions screening of entities in the graph.
|
| 219 |
-
|
| 220 |
-
icij_scraper.py: Queries ICIJ Offshore Leaks API to find whether any graph
|
| 221 |
-
entities appear in Panama, Pandora, or Paradise Papers.
|
| 222 |
-
|
| 223 |
-
wikidata_scraper.py: SPARQL queries to Wikidata for education history,
|
| 224 |
-
career timeline, and nationality data for politicians in the graph.
|
| 225 |
-
|
| 226 |
Closes #ISSUE_NUMBER
|
| 227 |
|
| 228 |
|
| 229 |
-
# ============================================================
|
| 230 |
-
# PHASE
|
| 231 |
-
# ============================================================
|
| 232 |
-
|
| 233 |
-
ISSUE_TITLE:
|
| 234 |
-
"feat(ai): NLP pipeline for entity extraction, shadow drafting, and Hindi NER"
|
| 235 |
-
|
| 236 |
-
ISSUE_LABELS:
|
| 237 |
-
["enhancement"]
|
| 238 |
|
|
|
|
|
|
|
| 239 |
ISSUE_DESCRIPTION: |
|
| 240 |
-
|
| 241 |
-
|
|
|
|
| 242 |
|
| 243 |
Files to create:
|
| 244 |
-
ai/
|
| 245 |
-
ai/
|
| 246 |
-
ai/
|
| 247 |
-
ai/
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
nlp_extractor extracts at least 3 entities from a sample CAG report
|
| 273 |
-
shadow_draft_detector produces an alignment score for test inputs
|
| 274 |
-
benfords_analyzer produces a chi-squared result for a sample asset list
|
| 275 |
-
multilingual_ner extracts person names from a sample Hindi PIB headline
|
| 276 |
-
|
| 277 |
-
BRANCH: "feature/phase-7-nlp"
|
| 278 |
-
|
| 279 |
-
PR_TITLE:
|
| 280 |
-
"feat(ai): NLP pipeline — entity extraction, shadow drafting, Benford analysis, Hindi NER"
|
| 281 |
-
|
| 282 |
PR_DESCRIPTION: |
|
| 283 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 284 |
|
| 285 |
-
ai/nlp_extractor.py: spaCy English NER pipeline extracting PERSON, ORG,
|
| 286 |
-
GPE, and MONEY entities from document text. Extracted entities passed to
|
| 287 |
-
EntityResolver for graph matching.
|
| 288 |
|
| 289 |
-
|
| 290 |
-
|
| 291 |
-
|
| 292 |
|
| 293 |
-
|
| 294 |
-
|
| 295 |
-
|
|
|
|
| 296 |
|
| 297 |
-
|
| 298 |
-
|
|
|
|
|
|
|
|
|
|
| 299 |
|
| 300 |
-
|
| 301 |
-
|
| 302 |
-
|
| 303 |
|
| 304 |
-
|
|
|
|
| 305 |
|
|
|
|
| 306 |
|
| 307 |
-
|
| 308 |
-
|
| 309 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 310 |
|
| 311 |
-
ISSUE_TITLE:
|
| 312 |
-
"feat(ai): graph analytics — centrality, community detection, circular ownership, ghost companies"
|
| 313 |
|
| 314 |
-
|
| 315 |
-
|
|
|
|
| 316 |
|
|
|
|
|
|
|
| 317 |
ISSUE_DESCRIPTION: |
|
| 318 |
-
|
| 319 |
-
NetworkX (free, open source). No paid dependencies.
|
| 320 |
|
| 321 |
Files to create:
|
| 322 |
-
ai/
|
| 323 |
-
ai/
|
| 324 |
-
|
| 325 |
-
|
| 326 |
-
|
| 327 |
-
graph_analytics.py methods:
|
| 328 |
-
compute_betweenness_centrality(entity_id)
|
| 329 |
-
Identifies entities that serve as bridges between public and private sector.
|
| 330 |
-
High betweenness indicates an institutional gatekeeper.
|
| 331 |
-
compute_pagerank(graph_data)
|
| 332 |
-
Scores entities by the weight of entities that point to them via contracts.
|
| 333 |
-
detect_communities(graph_data)
|
| 334 |
-
Returns clusters of entities with dense internal connections.
|
| 335 |
-
Clusters of companies winning contracts from the same ministry flag
|
| 336 |
-
potential procurement cartels.
|
| 337 |
-
|
| 338 |
-
circular_ownership.py:
|
| 339 |
-
Detects cycles in company ownership graphs.
|
| 340 |
-
Pattern: Company A owns Company B owns Company C owns Company A.
|
| 341 |
-
Uses NetworkX cycle detection algorithm.
|
| 342 |
-
Each detected cycle is flagged as a circular ownership indicator.
|
| 343 |
-
|
| 344 |
-
shadow_director.py:
|
| 345 |
-
Identifies persons who appear in regulatory filings and address registrations
|
| 346 |
-
for companies but are not listed as formal directors.
|
| 347 |
-
Pattern: same address, same registered agent, same filing date across
|
| 348 |
-
multiple companies without formal board listing.
|
| 349 |
-
|
| 350 |
-
ghost_company.py:
|
| 351 |
-
Flags companies that meet three or more of:
|
| 352 |
-
- Registered within 90 days before winning their first contract
|
| 353 |
-
- No prior CAG or SEBI mentions
|
| 354 |
-
- No parliamentary question references
|
| 355 |
-
- Single director with no other directorships
|
| 356 |
-
- Contract value more than 10x the company's paid-up capital
|
| 357 |
-
|
| 358 |
-
New requirements:
|
| 359 |
-
networkx>=3.2.0
|
| 360 |
-
|
| 361 |
-
Acceptance criteria:
|
| 362 |
-
compute_betweenness_centrality returns a score for a test entity
|
| 363 |
-
detect_communities identifies at least one cluster in sample data
|
| 364 |
-
circular_ownership detects a known cycle in test graph data
|
| 365 |
-
ghost_company flags the sample contract winner created 30 days before award
|
| 366 |
-
|
| 367 |
-
BRANCH: "feature/phase-8-graph-analytics"
|
| 368 |
-
|
| 369 |
-
PR_TITLE:
|
| 370 |
-
"feat(ai): graph analytics — centrality, community detection, circular ownership, ghost companies"
|
| 371 |
|
| 372 |
-
|
| 373 |
-
|
|
|
|
|
|
|
| 374 |
|
| 375 |
-
|
| 376 |
-
|
| 377 |
-
the Louvain method. Results written back to Neo4j as node properties.
|
| 378 |
|
| 379 |
-
|
| 380 |
-
directed graph, uses simple_cycles() to detect circular structures. Each
|
| 381 |
-
cycle reported with all members and edge evidence.
|
| 382 |
|
| 383 |
-
|
| 384 |
-
|
| 385 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 386 |
|
| 387 |
-
ai/ghost_company.py: Applies five-factor ghost company scoring using
|
| 388 |
-
registration date, prior public record mentions, director history, and
|
| 389 |
-
contract-to-capital ratio.
|
| 390 |
|
| 391 |
-
|
|
|
|
|
|
|
| 392 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 393 |
|
| 394 |
-
|
| 395 |
-
# PHASE 9 — React Frontend
|
| 396 |
-
# ============================================================
|
| 397 |
|
| 398 |
-
|
| 399 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 400 |
|
| 401 |
-
|
| 402 |
-
[
|
| 403 |
|
| 404 |
-
|
| 405 |
-
|
| 406 |
-
|
| 407 |
-
|
| 408 |
-
Technology:
|
| 409 |
-
Next.js 14
|
| 410 |
-
D3.js for force-directed knowledge graph
|
| 411 |
-
Tailwind CSS
|
| 412 |
-
Leaflet for geospatial view with OpenStreetMap tiles (free)
|
| 413 |
-
D3-sankey for money flow diagrams
|
| 414 |
-
|
| 415 |
-
Pages required:
|
| 416 |
-
/ Search bar, live feed preview, platform statistics
|
| 417 |
-
/search Results with type and risk level filters
|
| 418 |
-
/entity/[id] Full dossier: overview, timeline, graph, evidence locker
|
| 419 |
-
/risk-dashboard Entities ranked by structural risk indicator
|
| 420 |
-
/graph-explorer Interactive multi-hop relationship browser
|
| 421 |
-
/live-feed Real-time stream of new intelligence headlines
|
| 422 |
-
/watchlist User-managed entity subscriptions with alert history
|
| 423 |
-
|
| 424 |
-
Graph visualisation requirements:
|
| 425 |
-
Nodes coloured by type: Politician, Company, Contract, AuditReport
|
| 426 |
-
Edge labels showing relationship type
|
| 427 |
-
Click node to navigate to dossier
|
| 428 |
-
Zoom, pan, and filter by relationship type
|
| 429 |
-
Export subgraph as PNG or JSON
|
| 430 |
-
Depth selector: 1-hop, 2-hop, 3-hop from any entity
|
| 431 |
-
|
| 432 |
-
Evidence locker behaviour:
|
| 433 |
-
Each claim in the dossier shows a source chip
|
| 434 |
-
Clicking the chip opens the original source URL in a new tab
|
| 435 |
-
Sources display: institution name, document date, credibility level
|
| 436 |
-
|
| 437 |
-
Acceptance criteria:
|
| 438 |
-
npm run build completes without errors
|
| 439 |
-
/search returns and displays results from the API
|
| 440 |
-
Knowledge graph renders a two-hop subgraph with labelled edges
|
| 441 |
-
Live feed connects via WebSocket and displays real-time updates
|
| 442 |
-
|
| 443 |
-
BRANCH: "feature/phase-9-frontend"
|
| 444 |
-
|
| 445 |
-
PR_TITLE:
|
| 446 |
-
"feat(frontend): Next.js dashboard with D3.js graph browser, dossier, and live feed"
|
| 447 |
|
|
|
|
|
|
|
| 448 |
PR_DESCRIPTION: |
|
| 449 |
-
|
| 450 |
-
|
| 451 |
-
|
| 452 |
-
frontend/components/Graph.jsx: D3.js force-directed graph with colour coding,
|
| 453 |
-
depth selection, zoom, pan, and export.
|
| 454 |
-
frontend/components/Dossier.jsx: Entity profile with tabbed evidence locker
|
| 455 |
-
and source chip components.
|
| 456 |
-
frontend/components/RiskBadge.jsx: Colour-coded structural risk indicator.
|
| 457 |
-
frontend/components/LiveFeed.jsx: WebSocket consumer displaying real-time
|
| 458 |
-
intelligence headlines with click-to-expand mini reports.
|
| 459 |
-
frontend/components/SankeyChart.jsx: D3-sankey money flow diagram for
|
| 460 |
-
contract value flows between ministries and companies.
|
| 461 |
-
frontend/components/GeoMap.jsx: Leaflet map showing contract and company
|
| 462 |
-
locations plotted against constituency boundaries.
|
| 463 |
-
|
| 464 |
-
Environment variable: NEXT_PUBLIC_API_URL pointing to Render backend.
|
| 465 |
-
Deploy to Vercel by connecting the GitHub repository.
|
| 466 |
-
|
| 467 |
Closes #ISSUE_NUMBER
|
| 468 |
|
| 469 |
|
| 470 |
-
# ============================================================
|
| 471 |
-
# PHASE
|
| 472 |
-
# ============================================================
|
| 473 |
-
|
| 474 |
-
ISSUE_TITLE:
|
| 475 |
-
"feat(pipeline): GitHub Actions automation, alert engine, and live feed generation"
|
| 476 |
-
|
| 477 |
-
ISSUE_LABELS:
|
| 478 |
-
["enhancement"]
|
| 479 |
|
|
|
|
|
|
|
| 480 |
ISSUE_DESCRIPTION: |
|
| 481 |
-
Automate data collection using GitHub Actions free
|
| 482 |
-
alert engine that powers the live transparency feed.
|
| 483 |
|
| 484 |
Files to create:
|
| 485 |
-
.github/workflows/daily_scrape.yml
|
| 486 |
-
.github/workflows/weekly_load.yml
|
| 487 |
-
.github/workflows/test.yml
|
| 488 |
-
ai/alert_engine.py Diff-based
|
| 489 |
-
ai/headline_generator.py
|
| 490 |
-
|
| 491 |
-
|
| 492 |
-
|
| 493 |
-
|
| 494 |
-
|
| 495 |
-
|
| 496 |
-
|
| 497 |
-
test.yml behaviour:
|
| 498 |
-
Triggers: push to any branch, pull_request targeting main
|
| 499 |
-
Steps: syntax check all Python files, run pytest tests/
|
| 500 |
-
|
| 501 |
-
alert_engine.py behaviour:
|
| 502 |
-
Loads previous pipeline output and compares against new output
|
| 503 |
-
Detects: new CAG report mentioning an entity already in graph,
|
| 504 |
-
new GeM contract won by a company linked to a politician,
|
| 505 |
-
new PIB release matching a watchlisted entity
|
| 506 |
-
Each detected event creates an alert record in Neo4j
|
| 507 |
-
|
| 508 |
-
headline_generator.py behaviour:
|
| 509 |
-
Converts alert records into neutral analytical headlines
|
| 510 |
-
Examples:
|
| 511 |
-
New audit report flags irregularities in a scheme linked to Ministry X
|
| 512 |
-
Procurement order awarded to company with directorship overlap
|
| 513 |
-
Each headline includes: text, entity links, source document, confidence level
|
| 514 |
-
|
| 515 |
-
GitHub Actions secrets required (set in repository Settings > Secrets):
|
| 516 |
-
NEO4J_URI, NEO4J_USER, NEO4J_PASSWORD, DATAGOV_API_KEY
|
| 517 |
-
|
| 518 |
-
Acceptance criteria:
|
| 519 |
-
test.yml passes on a test pull request
|
| 520 |
-
daily_scrape.yml runs successfully in GitHub Actions environment
|
| 521 |
-
alert_engine detects a new contract for a known entity in test data
|
| 522 |
-
headline_generator produces a grammatically correct neutral headline
|
| 523 |
-
|
| 524 |
-
BRANCH: "feature/phase-10-monitoring"
|
| 525 |
-
|
| 526 |
-
PR_TITLE:
|
| 527 |
-
"feat(pipeline): GitHub Actions automation, diff-based alerts, and headline generation"
|
| 528 |
-
|
| 529 |
PR_DESCRIPTION: |
|
| 530 |
-
|
|
|
|
|
|
|
| 531 |
|
| 532 |
-
.github/workflows/daily_scrape.yml: Cron job at 02:00 IST running all
|
| 533 |
-
scrapers and committing output to a data branch.
|
| 534 |
|
| 535 |
-
|
| 536 |
-
|
|
|
|
| 537 |
|
| 538 |
-
|
| 539 |
-
|
|
|
|
|
|
|
|
|
|
| 540 |
|
| 541 |
-
|
| 542 |
-
|
|
|
|
|
|
|
| 543 |
|
| 544 |
-
|
| 545 |
-
|
|
|
|
| 546 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 547 |
Closes #ISSUE_NUMBER
|
| 548 |
|
| 549 |
|
| 550 |
-
# ============================================================
|
| 551 |
-
# PHASE
|
| 552 |
-
# ============================================================
|
| 553 |
-
|
| 554 |
-
ISSUE_TITLE:
|
| 555 |
-
"feat(ai): LLM chatbot interface, hypothesis testing, and PDF dossier export"
|
| 556 |
-
|
| 557 |
-
ISSUE_LABELS:
|
| 558 |
-
["enhancement"]
|
| 559 |
|
|
|
|
|
|
|
| 560 |
ISSUE_DESCRIPTION: |
|
| 561 |
-
|
| 562 |
-
Hugging Face inference. No paid API calls.
|
| 563 |
|
| 564 |
Files to create:
|
| 565 |
-
ai/
|
| 566 |
-
|
| 567 |
-
ai/hypothesis_tester.py Evaluates whether entity A connects to entity B
|
| 568 |
-
within a specified number of hops
|
| 569 |
-
ai/dossier_exporter.py Generates PDF dossiers using WeasyPrint (free)
|
| 570 |
-
|
| 571 |
-
chatbot.py behaviour:
|
| 572 |
-
Input: natural language question in English or Hindi
|
| 573 |
-
Process: intent classification, entity extraction, Cypher query generation,
|
| 574 |
-
Neo4j execution, result assembly with citations
|
| 575 |
-
Output: structured response with data, explanation, sources, confidence
|
| 576 |
-
Model: use Hugging Face free inference API for intent classification
|
| 577 |
-
Cypher generation: rule-based templates, no LLM for query construction
|
| 578 |
-
to avoid hallucinated queries
|
| 579 |
-
|
| 580 |
-
hypothesis_tester.py behaviour:
|
| 581 |
-
Input: two entity names or IDs and a maximum hop count
|
| 582 |
-
Process: breadth-first search in Neo4j up to specified depth
|
| 583 |
-
Output: shortest path found (or no connection), every edge with
|
| 584 |
-
its source document, relationship type, and confidence score
|
| 585 |
-
|
| 586 |
-
dossier_exporter.py behaviour:
|
| 587 |
-
Input: entity ID
|
| 588 |
-
Process: assemble full dossier from graph, render to HTML template,
|
| 589 |
-
convert to PDF using WeasyPrint
|
| 590 |
-
Output: PDF file with cover page, risk score, timeline, relationship
|
| 591 |
-
table, evidence locker, and source index
|
| 592 |
-
|
| 593 |
-
New requirements:
|
| 594 |
-
weasyprint>=60.0
|
| 595 |
-
jinja2>=3.1.0
|
| 596 |
-
|
| 597 |
-
Acceptance criteria:
|
| 598 |
-
chatbot.py answers "show contracts for company X" using sample data
|
| 599 |
-
hypothesis_tester finds a path between two connected test entities
|
| 600 |
-
dossier_exporter generates a valid PDF for a test entity
|
| 601 |
-
|
| 602 |
-
BRANCH: "feature/phase-11-chatbot"
|
| 603 |
-
|
| 604 |
-
PR_TITLE:
|
| 605 |
-
"feat(ai): LLM chatbot, hypothesis tester, and PDF dossier export"
|
| 606 |
-
|
| 607 |
-
PR_DESCRIPTION: |
|
| 608 |
-
Adds the conversational interface and document export capability.
|
| 609 |
|
| 610 |
-
|
| 611 |
-
|
| 612 |
-
for 12 common query patterns. Response assembler citing all source documents.
|
| 613 |
|
| 614 |
-
|
| 615 |
-
|
| 616 |
-
result with explanation when path exceeds limit or does not exist.
|
| 617 |
-
|
| 618 |
-
ai/dossier_exporter.py: Jinja2 HTML template rendered to PDF via WeasyPrint.
|
| 619 |
-
Dossier sections: cover, identity, risk indicator, timeline, corporate
|
| 620 |
-
associations, contracts, audit mentions, evidence locker, source index.
|
| 621 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 622 |
Closes #ISSUE_NUMBER
|
| 623 |
|
| 624 |
|
| 625 |
-
# ============================================================
|
| 626 |
-
# PHASE
|
| 627 |
-
# ============================================================
|
| 628 |
-
|
| 629 |
-
ISSUE_TITLE:
|
| 630 |
-
"feat(ai): Sentinel-2 satellite verification of infrastructure project progress"
|
| 631 |
-
|
| 632 |
-
ISSUE_LABELS:
|
| 633 |
-
["enhancement"]
|
| 634 |
|
|
|
|
|
|
|
| 635 |
ISSUE_DESCRIPTION: |
|
| 636 |
-
|
| 637 |
-
government-funded infrastructure projects show physical progress
|
| 638 |
-
matching their reported financial disbursement status.
|
| 639 |
|
| 640 |
Files to create:
|
| 641 |
-
ai/
|
| 642 |
-
|
| 643 |
-
|
| 644 |
-
|
| 645 |
-
|
| 646 |
-
|
| 647 |
-
API access via sentinelsat Python library (free, open source)
|
| 648 |
-
|
| 649 |
-
geospatial_verifier.py behaviour:
|
| 650 |
-
Input: GPS coordinates and a project reference (contract ID)
|
| 651 |
-
Process: query Sentinel-2 for two images — one before contract start date,
|
| 652 |
-
one after final payment date
|
| 653 |
-
Compute NDVI change detection between the two images
|
| 654 |
-
For road projects: compute built-up area index change
|
| 655 |
-
Output: progress_score 0-100, visual_change_detected boolean,
|
| 656 |
-
image_urls, analysis_date, discrepancy_flag if payment complete
|
| 657 |
-
but visual change below 30 percent
|
| 658 |
-
|
| 659 |
-
project_locator.py behaviour:
|
| 660 |
-
Input: GeM contract records
|
| 661 |
-
Process: extract location field, geocode using Nominatim (free OSM geocoder)
|
| 662 |
-
Output: enriched contract records with latitude, longitude fields
|
| 663 |
-
|
| 664 |
-
New requirements:
|
| 665 |
-
sentinelsat>=1.3.0
|
| 666 |
-
rasterio>=1.3.0
|
| 667 |
-
numpy>=1.24.0
|
| 668 |
-
|
| 669 |
-
Acceptance criteria:
|
| 670 |
-
project_locator geocodes a test address to coordinates
|
| 671 |
-
geospatial_verifier queries Sentinel-2 API for a test location
|
| 672 |
-
NDVI change computed for two test images
|
| 673 |
-
discrepancy_flag triggered on test case with low visual change
|
| 674 |
-
|
| 675 |
-
BRANCH: "feature/phase-12-geospatial"
|
| 676 |
-
|
| 677 |
-
PR_TITLE:
|
| 678 |
-
"feat(ai): Sentinel-2 satellite verification of infrastructure progress"
|
| 679 |
|
|
|
|
|
|
|
| 680 |
PR_DESCRIPTION: |
|
| 681 |
-
|
|
|
|
|
|
|
| 682 |
|
| 683 |
-
scrapers/project_locator.py: Geocodes GeM contract location fields using
|
| 684 |
-
the free OpenStreetMap Nominatim API. Adds lat/lon to contract nodes in
|
| 685 |
-
the graph.
|
| 686 |
|
| 687 |
-
|
| 688 |
-
|
| 689 |
-
|
| 690 |
-
disbursed but change detection score is below threshold.
|
| 691 |
|
| 692 |
-
|
| 693 |
-
|
|
|
|
|
|
|
| 694 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 695 |
Closes #ISSUE_NUMBER
|
| 696 |
|
| 697 |
|
| 698 |
-
# ============================================================
|
| 699 |
-
# PHASE
|
| 700 |
-
# ============================================================
|
| 701 |
-
|
| 702 |
-
ISSUE_TITLE:
|
| 703 |
-
"feat(ai): revolving door indicator, TBML red flags, and electoral cycle analysis"
|
| 704 |
-
|
| 705 |
-
ISSUE_LABELS:
|
| 706 |
-
["enhancement"]
|
| 707 |
|
|
|
|
|
|
|
| 708 |
ISSUE_DESCRIPTION: |
|
| 709 |
-
|
| 710 |
-
|
| 711 |
|
| 712 |
Files to create:
|
| 713 |
-
ai/
|
| 714 |
-
ai/
|
| 715 |
-
ai/
|
| 716 |
-
|
| 717 |
-
|
| 718 |
-
Detects: Person held a regulatory or ministerial role (from parliamentary
|
| 719 |
-
records or Wikidata career data) then became a director of a company that
|
| 720 |
-
held contracts with that same ministry during their tenure.
|
| 721 |
-
Output per detected transition: person, previous_role, ministry,
|
| 722 |
-
current_company, contracts_during_tenure, transition_date, indicator_score
|
| 723 |
-
|
| 724 |
-
tbml_detector.py — five FATF-aligned flags:
|
| 725 |
-
commodity_mismatch
|
| 726 |
-
Company's registered business category does not match the contract category
|
| 727 |
-
Example: registered as IT services, contract for road construction
|
| 728 |
-
single_bid_contract
|
| 729 |
-
GeM contract with only one registered bid (no competition)
|
| 730 |
-
price_anomaly
|
| 731 |
-
Contract value exceeds median by more than two standard deviations
|
| 732 |
-
for the same product category and ministry
|
| 733 |
-
rapid_director_change
|
| 734 |
-
Company directors changed within 30 days before or after contract award
|
| 735 |
-
subcontracting_loop
|
| 736 |
-
Winning bidder has a known relationship with a losing bidder
|
| 737 |
-
who subsequently received sub-contract work
|
| 738 |
-
|
| 739 |
-
electoral_cycle_analyzer.py behaviour:
|
| 740 |
-
Correlates contract award dates against Indian election calendar
|
| 741 |
-
Flags contracts awarded in the 90-day window before a general election
|
| 742 |
-
by a ministry whose head is a candidate in that election
|
| 743 |
-
|
| 744 |
-
Acceptance criteria:
|
| 745 |
-
revolving_door detects a transition in test data with full career timeline
|
| 746 |
-
tbml_detector flags at least two indicators in sample GeM data
|
| 747 |
-
electoral_cycle_analyzer flags pre-election contracts in sample data
|
| 748 |
-
All outputs use analytical indicator language without accusations
|
| 749 |
-
|
| 750 |
-
BRANCH: "feature/phase-13-revolving-door-tbml"
|
| 751 |
-
|
| 752 |
-
PR_TITLE:
|
| 753 |
-
"feat(ai): revolving door indicator, TBML detection, and electoral cycle analysis"
|
| 754 |
-
|
| 755 |
-
PR_DESCRIPTION: |
|
| 756 |
-
Adds three advanced analytical modules targeting the highest-value
|
| 757 |
-
institutional risk patterns.
|
| 758 |
|
| 759 |
-
|
| 760 |
-
|
| 761 |
-
cases where the same person held regulatory authority over a ministry and
|
| 762 |
-
later joined a board of a company that benefited from that ministry.
|
| 763 |
|
| 764 |
-
|
| 765 |
-
|
| 766 |
-
is scored independently and combined into a TBML risk indicator.
|
| 767 |
-
|
| 768 |
-
ai/electoral_cycle_analyzer.py: Loads Indian general and state election
|
| 769 |
-
calendar (maintained as a static JSON file updated each election cycle).
|
| 770 |
-
Cross-references contract award dates against the 90-day pre-election window.
|
| 771 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 772 |
Closes #ISSUE_NUMBER
|
| 773 |
|
| 774 |
|
| 775 |
-
# ============================================================
|
| 776 |
-
# PHASE
|
| 777 |
-
# ============================================================
|
| 778 |
-
|
| 779 |
-
ISSUE_TITLE:
|
| 780 |
-
"feat(deploy): production deployment on Render, Vercel, and Neo4j AuraDB"
|
| 781 |
-
|
| 782 |
-
ISSUE_LABELS:
|
| 783 |
-
["enhancement"]
|
| 784 |
|
|
|
|
|
|
|
| 785 |
ISSUE_DESCRIPTION: |
|
| 786 |
-
|
| 787 |
-
monthly cost. Establish CI/CD so every pull request runs tests before
|
| 788 |
-
merge and every merge to main redeploys automatically.
|
| 789 |
|
| 790 |
Files to create:
|
| 791 |
-
render.yaml Render.com web service
|
| 792 |
vercel.json Vercel deployment configuration
|
| 793 |
-
Procfile
|
| 794 |
-
docs/deployment.md Step-by-step deployment guide
|
| 795 |
-
variable setup for each platform
|
| 796 |
-
|
| 797 |
-
render.yaml contents:
|
| 798 |
-
services:
|
| 799 |
-
- type: web
|
| 800 |
-
name: bharatgraph-api
|
| 801 |
-
env: python
|
| 802 |
-
buildCommand: pip install -r requirements.txt
|
| 803 |
-
startCommand: uvicorn api.main:app --host 0.0.0.0 --port $PORT
|
| 804 |
-
plan: free
|
| 805 |
-
envVars: NEO4J_URI, NEO4J_USER, NEO4J_PASSWORD, DATAGOV_API_KEY
|
| 806 |
-
|
| 807 |
-
GitHub Actions secrets to configure in repository settings:
|
| 808 |
-
NEO4J_URI
|
| 809 |
-
NEO4J_USER
|
| 810 |
-
NEO4J_PASSWORD
|
| 811 |
-
DATAGOV_API_KEY
|
| 812 |
-
RENDER_DEPLOY_HOOK_URL
|
| 813 |
-
|
| 814 |
-
CI/CD pipeline:
|
| 815 |
-
Every push runs test.yml (syntax check and pytest)
|
| 816 |
-
Every merge to main triggers automatic Render redeploy via deploy hook
|
| 817 |
-
Every merge to main triggers automatic Vercel redeploy (automatic)
|
| 818 |
-
|
| 819 |
-
Acceptance criteria:
|
| 820 |
-
FastAPI backend accessible at Render URL with /health returning 200
|
| 821 |
-
React frontend accessible at Vercel URL
|
| 822 |
-
Neo4j AuraDB connected from production backend
|
| 823 |
-
/search endpoint returns real results on production URL
|
| 824 |
-
|
| 825 |
-
BRANCH: "feature/phase-14-deployment"
|
| 826 |
-
|
| 827 |
-
PR_TITLE:
|
| 828 |
-
"feat(deploy): Render backend, Vercel frontend, Neo4j AuraDB production"
|
| 829 |
|
| 830 |
-
|
| 831 |
-
|
| 832 |
|
| 833 |
-
|
| 834 |
-
|
| 835 |
|
| 836 |
-
|
| 837 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 838 |
|
| 839 |
-
Procfile: Web process command for Render.
|
| 840 |
|
| 841 |
-
|
| 842 |
-
|
| 843 |
-
|
| 844 |
|
| 845 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 846 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 847 |
Closes #ISSUE_NUMBER
|
|
|
|
| 1 |
+
# BharatGraph — Complete Phase Roadmap
|
| 2 |
+
# GitHub Issue and Pull Request reference for phases 7 through 21
|
| 3 |
+
# One issue per phase. One branch per phase. All merge directly into main.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
# Branch naming: feature/phase-N-name or fix/issue-N-name
|
|
|
|
| 5 |
|
| 6 |
|
| 7 |
+
# ================================================================
|
| 8 |
+
# PHASE 7 — NLP Document Intelligence
|
| 9 |
+
# ================================================================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
+
ISSUE_TITLE: "feat(ai): NLP pipeline — entity extraction, Benford analysis, Hindi NER"
|
| 12 |
+
ISSUE_LABELS: ["enhancement"]
|
| 13 |
ISSUE_DESCRIPTION: |
|
| 14 |
+
Add NLP to extract structured intelligence from government documents.
|
| 15 |
+
All models are free and run locally — no paid APIs.
|
| 16 |
|
| 17 |
Files to create:
|
| 18 |
+
ai/nlp_extractor.py spaCy English NER on CAG and PIB text
|
| 19 |
+
ai/benfords_analyzer.py Statistical anomaly on declared asset figures
|
| 20 |
+
ai/multilingual_ner.py Hindi NER via AI4Bharat IndicNER (HuggingFace)
|
| 21 |
+
ai/shadow_draft_detector.py Semantic similarity: bill text vs corporate submissions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
+
benfords_analyzer.py: Chi-squared test on first-digit distribution of declared
|
| 24 |
+
assets in election affidavits. If figures cluster around thresholds such as
|
| 25 |
+
Rs 99 lakh rather than Rs 1 crore, it flags possible manipulation to stay
|
| 26 |
+
below disclosure triggers.
|
| 27 |
|
| 28 |
+
shadow_draft_detector.py: sentence-transformers cosine similarity comparing
|
| 29 |
+
corporate lobby submissions against bill text. Score above 65 flagged as
|
| 30 |
+
high semantic alignment indicating potential policy capture.
|
| 31 |
|
| 32 |
+
New requirements: spacy>=3.7.0, sentence-transformers>=2.6.0
|
|
|
|
| 33 |
|
| 34 |
+
BRANCH: "feature/phase-7-nlp"
|
| 35 |
+
PR_TITLE: "feat(ai): NLP pipeline — entity extraction, Benford, Hindi NER, shadow drafting"
|
| 36 |
+
PR_DESCRIPTION: |
|
| 37 |
+
Four NLP modules using only free locally-executable models.
|
| 38 |
+
Benford's Law catches manipulation of asset figures.
|
| 39 |
+
Hindi NER extends coverage to PIB Hindi releases.
|
| 40 |
Closes #ISSUE_NUMBER
|
| 41 |
|
| 42 |
|
| 43 |
+
# ================================================================
|
| 44 |
+
# PHASE 8 — Advanced Graph Analytics
|
| 45 |
+
# ================================================================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
+
ISSUE_TITLE: "feat(ai): graph analytics — centrality, community detection, circular ownership"
|
| 48 |
+
ISSUE_LABELS: ["enhancement"]
|
| 49 |
ISSUE_DESCRIPTION: |
|
| 50 |
+
Structural analysis of the knowledge graph using NetworkX (free).
|
|
|
|
|
|
|
| 51 |
|
| 52 |
Files to create:
|
| 53 |
+
ai/graph_analytics.py Betweenness centrality, PageRank, Louvain community detection
|
| 54 |
+
ai/circular_ownership.py Cycle detection in shareholding graph
|
| 55 |
+
ai/shadow_director.py De facto controllers not on formal board
|
| 56 |
+
ai/ghost_company.py Shell companies activated before tenders
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
|
| 58 |
+
ghost_company.py flags: registered within 90 days before first contract,
|
| 59 |
+
no prior CAG or SEBI mentions, single director, contract value more than
|
| 60 |
+
10x paid-up capital. Results written back to Neo4j as node properties.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
|
| 62 |
+
New requirement: networkx>=3.2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
|
| 64 |
+
BRANCH: "feature/phase-8-graph-analytics"
|
| 65 |
+
PR_TITLE: "feat(ai): centrality, community detection, circular ownership, ghost company detector"
|
| 66 |
+
PR_DESCRIPTION: |
|
| 67 |
+
NetworkX-powered structural analysis. Results written to Neo4j.
|
| 68 |
+
Ghost company detector catches shell entities activated for specific tenders.
|
| 69 |
Closes #ISSUE_NUMBER
|
| 70 |
|
| 71 |
|
| 72 |
+
# ================================================================
|
| 73 |
+
# PHASE 9 — Eight New Indian Data Sources
|
| 74 |
+
# ================================================================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
|
| 76 |
+
ISSUE_TITLE: "feat(scrapers): NJDG, ED, CVC, NCRB, LGD, IBBI, NGO Darpan, CPPP"
|
| 77 |
+
ISSUE_LABELS: ["enhancement"]
|
| 78 |
ISSUE_DESCRIPTION: |
|
| 79 |
+
Eight new Indian government sources. Total scrapers becomes 21.
|
|
|
|
| 80 |
|
| 81 |
Files to create:
|
| 82 |
+
scrapers/njdg_scraper.py National Judicial Data Grid — case pendency and history
|
| 83 |
+
scrapers/ed_scraper.py Enforcement Directorate press releases and actions
|
| 84 |
+
scrapers/cvc_scraper.py Central Vigilance Commission complaint statistics
|
| 85 |
+
scrapers/ncrb_scraper.py NCRB Crime in India district-wise annual statistics
|
| 86 |
+
scrapers/lgd_scraper.py Local Government Directory — 782 districts, 676,497 villages
|
| 87 |
+
scrapers/ibbi_scraper.py Insolvency and Bankruptcy Board corporate filings
|
| 88 |
+
scrapers/ngo_darpan_scraper.py NGO Darpan registered NGO and CSR recipient list
|
| 89 |
+
scrapers/cppp_scraper.py Central Public Procurement Portal tender awards
|
| 90 |
+
|
| 91 |
+
New graph nodes:
|
| 92 |
+
CourtCase, EDAction, VigilanceCase, InsolventEntity, NGO, Tender
|
| 93 |
+
|
| 94 |
+
BRANCH: "feature/phase-9-eight-sources"
|
| 95 |
+
PR_TITLE: "feat(scrapers): NJDG, ED, CVC, NCRB, LGD, IBBI, NGO Darpan, CPPP"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
PR_DESCRIPTION: |
|
| 97 |
+
8 new scrapers: judiciary, enforcement, crime, administration,
|
| 98 |
+
insolvency, NGO, and procurement. Total: 21 scrapers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 99 |
Closes #ISSUE_NUMBER
|
| 100 |
|
| 101 |
|
| 102 |
+
# ================================================================
|
| 103 |
+
# PHASE 10 — Multi-Investigator AI Engine
|
| 104 |
+
# ================================================================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
|
| 106 |
+
ISSUE_TITLE: "feat(ai): 12-investigator parallel analysis engine with synthesis and doubt section"
|
| 107 |
+
ISSUE_LABELS: ["enhancement"]
|
| 108 |
ISSUE_DESCRIPTION: |
|
| 109 |
+
The core differentiating capability. 12 specialist investigators run in
|
| 110 |
+
parallel, each analysing the entity from a different professional angle.
|
| 111 |
+
Findings are synthesised. Where 3+ investigators agree, confidence is HIGH.
|
| 112 |
|
| 113 |
Files to create:
|
| 114 |
+
ai/investigators/financial_investigator.py Money flows, contract values, asset anomalies
|
| 115 |
+
ai/investigators/political_investigator.py Party funding, voting records, affiliations
|
| 116 |
+
ai/investigators/corporate_investigator.py Directorships, company health, compliance
|
| 117 |
+
ai/investigators/judicial_investigator.py Court cases, convictions, pending litigation
|
| 118 |
+
ai/investigators/procurement_investigator.py Contract patterns, bid behaviour
|
| 119 |
+
ai/investigators/network_investigator.py Graph centrality, community membership
|
| 120 |
+
ai/investigators/asset_investigator.py Declared vs probable assets, growth
|
| 121 |
+
ai/investigators/international_investigator.py Offshore entities, sanctions, ICIJ
|
| 122 |
+
ai/investigators/media_investigator.py PIB mentions, press release patterns
|
| 123 |
+
ai/investigators/historical_investigator.py Timeline reconstruction over time
|
| 124 |
+
ai/investigators/public_interest_investigator.py Scheme data, development indicators
|
| 125 |
+
ai/investigators/doubt_investigator.py Unexplained anomalies, hypotheses
|
| 126 |
+
ai/multi_investigator.py Parallel runner and synthesis
|
| 127 |
+
|
| 128 |
+
Output per report:
|
| 129 |
+
entity_biography: full public life timeline from all sources
|
| 130 |
+
agreed_findings: patterns confirmed by 3 or more investigators
|
| 131 |
+
individual_findings: all findings by source investigator
|
| 132 |
+
doubts: suspicious patterns that cannot be confirmed, stated as hypotheses
|
| 133 |
+
positive_contributions: good governance actions found (balanced view)
|
| 134 |
+
unique_report_hash: SHA-256 of entity_id + data snapshot timestamp
|
| 135 |
+
evidence_locker: all source documents across all findings
|
| 136 |
+
|
| 137 |
+
Language rules: structural indicator, governance anomaly, pattern.
|
| 138 |
+
Never: corrupt, guilty, criminal, fraud, suspect.
|
| 139 |
+
|
| 140 |
+
BRANCH: "feature/phase-10-multi-investigator"
|
| 141 |
+
PR_TITLE: "feat(ai): 12-investigator parallel engine with synthesis, doubts, and unique hash"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 142 |
PR_DESCRIPTION: |
|
| 143 |
+
The core intelligence layer. 12 specialised investigators run concurrently.
|
| 144 |
+
Synthesis identifies agreed patterns and raises confidence.
|
| 145 |
+
Doubt section surfaces unexplained anomalies as investigative hypotheses.
|
| 146 |
+
Every report has a unique SHA-256 hash for integrity verification.
|
| 147 |
+
Closes #ISSUE_NUMBER
|
| 148 |
|
|
|
|
|
|
|
|
|
|
| 149 |
|
| 150 |
+
# ================================================================
|
| 151 |
+
# PHASE 11 — Multilingual Platform (22 Indian Languages)
|
| 152 |
+
# ================================================================
|
| 153 |
|
| 154 |
+
ISSUE_TITLE: "feat(ai): multilingual support for all 22 Indian scheduled languages"
|
| 155 |
+
ISSUE_LABELS: ["enhancement"]
|
| 156 |
+
ISSUE_DESCRIPTION: |
|
| 157 |
+
Every citizen regardless of language can query and read reports.
|
| 158 |
|
| 159 |
+
Files to create:
|
| 160 |
+
ai/translator.py Language detection and translation via IndicTrans2
|
| 161 |
+
ai/transliteration.py Roman to Devanagari, Tamil, Telugu scripts etc.
|
| 162 |
+
api/routes/multilingual.py Language-aware endpoints with ?lang= parameter
|
| 163 |
+
config/languages.py ISO codes for all 22 scheduled languages
|
| 164 |
|
| 165 |
+
Uses AI4Bharat IndicTrans2 (free HuggingFace model, runs locally).
|
| 166 |
+
Supports: hi, ta, te, kn, ml, mr, bn, gu, pa, or, as, ur, sd, kok,
|
| 167 |
+
mai, mni, sat, ks, ne, bho, doi, sa
|
| 168 |
|
| 169 |
+
Name transliteration ensures search works across scripts:
|
| 170 |
+
"Modi" = "मोदी" = "மோடி" = "మోదీ" all resolve to the same entity.
|
| 171 |
|
| 172 |
+
All 14 dossier sections translated. Risk explanations in native language.
|
| 173 |
|
| 174 |
+
BRANCH: "feature/phase-11-multilingual"
|
| 175 |
+
PR_TITLE: "feat(ai): multilingual support — 22 Indian languages via IndicTrans2"
|
| 176 |
+
PR_DESCRIPTION: |
|
| 177 |
+
Every citizen can now use the platform in their native language.
|
| 178 |
+
AI4Bharat IndicTrans2 runs locally at no cost.
|
| 179 |
+
Transliteration ensures consistent entity matching across scripts.
|
| 180 |
+
Closes #ISSUE_NUMBER
|
| 181 |
|
|
|
|
|
|
|
| 182 |
|
| 183 |
+
# ================================================================
|
| 184 |
+
# PHASE 12 — PDF Dossier Generator
|
| 185 |
+
# ================================================================
|
| 186 |
|
| 187 |
+
ISSUE_TITLE: "feat(ai): PDF dossier generator with SHA-256 integrity hash per report"
|
| 188 |
+
ISSUE_LABELS: ["enhancement"]
|
| 189 |
ISSUE_DESCRIPTION: |
|
| 190 |
+
Professional PDF investigation dossiers submittable to courts and journalists.
|
|
|
|
| 191 |
|
| 192 |
Files to create:
|
| 193 |
+
ai/dossier_generator.py 14-section PDF assembly
|
| 194 |
+
ai/report_hasher.py SHA-256 hash per report
|
| 195 |
+
templates/dossier_en.html English Jinja2 template
|
| 196 |
+
templates/dossier_hi.html Hindi template
|
| 197 |
+
api/routes/export.py GET /export/pdf/{entity_id}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 198 |
|
| 199 |
+
14 sections: Cover, Identity, Career Timeline, Corporate Associations,
|
| 200 |
+
Government Contracts, Audit Mentions, Court Records, International
|
| 201 |
+
Connections, Asset Declarations, Risk Summary, Analytical Findings,
|
| 202 |
+
Doubts and Unexplained Patterns, Positive Contributions, Evidence Locker.
|
| 203 |
|
| 204 |
+
Hash printed on cover page. Stored in Neo4j for future verification.
|
| 205 |
+
GET /verify/{hash} confirms a report has not been tampered with.
|
|
|
|
| 206 |
|
| 207 |
+
New requirements: weasyprint>=60.0, jinja2>=3.1.0
|
|
|
|
|
|
|
| 208 |
|
| 209 |
+
BRANCH: "feature/phase-12-pdf-dossier"
|
| 210 |
+
PR_TITLE: "feat(ai): PDF dossier generator — 14 sections, SHA-256 hash, multilingual templates"
|
| 211 |
+
PR_DESCRIPTION: |
|
| 212 |
+
Court-grade PDF dossiers with unique integrity hash.
|
| 213 |
+
14-section structure covering every analytical dimension.
|
| 214 |
+
Verify endpoint allows anyone to confirm report authenticity.
|
| 215 |
+
Closes #ISSUE_NUMBER
|
| 216 |
|
|
|
|
|
|
|
|
|
|
| 217 |
|
| 218 |
+
# ================================================================
|
| 219 |
+
# PHASE 13 — React Frontend with Patriotic Design
|
| 220 |
+
# ================================================================
|
| 221 |
|
| 222 |
+
ISSUE_TITLE: "feat(frontend): patriotic React dashboard with dark/light theme and D3.js graph"
|
| 223 |
+
ISSUE_LABELS: ["enhancement"]
|
| 224 |
+
ISSUE_DESCRIPTION: |
|
| 225 |
+
Complete frontend. Patriotic Indian design. Dark and light themes.
|
| 226 |
+
Deployed free on Vercel.
|
| 227 |
|
| 228 |
+
Technology: Next.js 14, TypeScript, Tailwind CSS, D3.js, Leaflet, Recharts.
|
|
|
|
|
|
|
| 229 |
|
| 230 |
+
Design system:
|
| 231 |
+
Colour palette: saffron (#FF9933), white (#FFFFFF), India green (#138808),
|
| 232 |
+
Ashoka blue (#000080) as accent.
|
| 233 |
+
Dark theme: deep navy background (#0A0F2E), saffron and white typography.
|
| 234 |
+
Light theme: white background, deep green accents, saffron highlights.
|
| 235 |
+
No gradients, no decorative clutter, every element is functional.
|
| 236 |
+
WCAG AA contrast ratios throughout.
|
| 237 |
|
| 238 |
+
Pages: /, /search, /entity/[id], /risk-dashboard, /graph-explorer,
|
| 239 |
+
/live-feed, /watchlist, /report/[id], /about, /verify/[hash]
|
| 240 |
|
| 241 |
+
Graph nodes coloured by type:
|
| 242 |
+
Politician: saffron | Company: India green | Contract: Ashoka blue
|
| 243 |
+
AuditReport: red | Ministry: navy | PressRelease: grey
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 244 |
|
| 245 |
+
BRANCH: "feature/phase-13-frontend"
|
| 246 |
+
PR_TITLE: "feat(frontend): patriotic React dashboard — Indian tricolour design system"
|
| 247 |
PR_DESCRIPTION: |
|
| 248 |
+
Professional patriotic design using Indian tricolour palette.
|
| 249 |
+
Dark navy and saffron dark mode. Clean white light mode.
|
| 250 |
+
D3.js graph, Leaflet map, Sankey diagrams, full PDF download.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 251 |
Closes #ISSUE_NUMBER
|
| 252 |
|
| 253 |
|
| 254 |
+
# ================================================================
|
| 255 |
+
# PHASE 14 — Live Monitoring and GitHub Actions
|
| 256 |
+
# ================================================================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 257 |
|
| 258 |
+
ISSUE_TITLE: "feat(pipeline): GitHub Actions automation, alert engine, live feed generation"
|
| 259 |
+
ISSUE_LABELS: ["enhancement"]
|
| 260 |
ISSUE_DESCRIPTION: |
|
| 261 |
+
Automate all data collection using GitHub Actions free 2,000 min/month.
|
|
|
|
| 262 |
|
| 263 |
Files to create:
|
| 264 |
+
.github/workflows/daily_scrape.yml 02:00 IST daily
|
| 265 |
+
.github/workflows/weekly_load.yml Neo4j refresh
|
| 266 |
+
.github/workflows/test.yml CI on every push and PR
|
| 267 |
+
ai/alert_engine.py Diff-based alerts
|
| 268 |
+
ai/headline_generator.py Neutral NLG for live feed
|
| 269 |
+
|
| 270 |
+
alert_engine.py detects: new CAG report mentioning known entity,
|
| 271 |
+
new contract for company linked to politician, new ED action,
|
| 272 |
+
new court filing. Each alert generates a live feed headline.
|
| 273 |
+
|
| 274 |
+
BRANCH: "feature/phase-14-monitoring"
|
| 275 |
+
PR_TITLE: "feat(pipeline): GitHub Actions automation, diff alerts, live feed headlines"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 276 |
PR_DESCRIPTION: |
|
| 277 |
+
Automated daily scraping, weekly Neo4j refresh, CI tests on every PR.
|
| 278 |
+
Alert engine generates neutral analytical headlines for the live feed.
|
| 279 |
+
Closes #ISSUE_NUMBER
|
| 280 |
|
|
|
|
|
|
|
| 281 |
|
| 282 |
+
# ================================================================
|
| 283 |
+
# PHASE 15 — LLM Chatbot and Hypothesis Testing
|
| 284 |
+
# ================================================================
|
| 285 |
|
| 286 |
+
ISSUE_TITLE: "feat(ai): multilingual chatbot with multi-hop hypothesis testing"
|
| 287 |
+
ISSUE_LABELS: ["enhancement"]
|
| 288 |
+
ISSUE_DESCRIPTION: |
|
| 289 |
+
Conversational interface to the knowledge graph. Free Hugging Face only.
|
| 290 |
+
Supports all 22 Indian languages via Phase 11 translator.
|
| 291 |
|
| 292 |
+
Files to create:
|
| 293 |
+
ai/chatbot.py Intent classification and Cypher template generation
|
| 294 |
+
ai/hypothesis_tester.py Multi-hop connection tester between two entities
|
| 295 |
+
api/routes/chat.py POST /chat endpoint
|
| 296 |
|
| 297 |
+
hypothesis_tester.py: finds shortest path between any two entities in the
|
| 298 |
+
graph up to 5 hops. Returns full path with every edge's source document.
|
| 299 |
+
Useful for journalists testing specific investigative theories.
|
| 300 |
|
| 301 |
+
BRANCH: "feature/phase-15-chatbot"
|
| 302 |
+
PR_TITLE: "feat(ai): multilingual chatbot with Cypher generation and hypothesis testing"
|
| 303 |
+
PR_DESCRIPTION: |
|
| 304 |
+
Conversational interface in all 22 Indian languages.
|
| 305 |
+
Rule-based Cypher generation prevents hallucinated graph queries.
|
| 306 |
Closes #ISSUE_NUMBER
|
| 307 |
|
| 308 |
|
| 309 |
+
# ================================================================
|
| 310 |
+
# PHASE 16 — Geospatial Infrastructure Verification
|
| 311 |
+
# ================================================================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 312 |
|
| 313 |
+
ISSUE_TITLE: "feat(ai): Sentinel-2 satellite verification of infrastructure progress"
|
| 314 |
+
ISSUE_LABELS: ["enhancement"]
|
| 315 |
ISSUE_DESCRIPTION: |
|
| 316 |
+
Verify physical construction progress using free Copernicus satellite data.
|
|
|
|
| 317 |
|
| 318 |
Files to create:
|
| 319 |
+
ai/geospatial_verifier.py NDVI change detection on Sentinel-2
|
| 320 |
+
scrapers/project_locator.py GPS geocoding of GeM contract locations
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 321 |
|
| 322 |
+
Flags discrepancy when final payment is disbursed but satellite imagery
|
| 323 |
+
shows less than 30 percent visual change at the contract location.
|
|
|
|
| 324 |
|
| 325 |
+
New .env variables: COPERNICUS_USER, COPERNICUS_PASSWORD
|
| 326 |
+
New requirements: sentinelsat>=1.3.0, rasterio>=1.3.0, numpy>=1.24.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 327 |
|
| 328 |
+
BRANCH: "feature/phase-16-geospatial"
|
| 329 |
+
PR_TITLE: "feat(ai): Sentinel-2 satellite verification of infrastructure progress"
|
| 330 |
+
PR_DESCRIPTION: |
|
| 331 |
+
Free Copernicus satellite data objectively verifies project progress.
|
| 332 |
+
Progress discrepancy flag triggers when payment is complete but
|
| 333 |
+
satellite evidence shows limited physical change.
|
| 334 |
Closes #ISSUE_NUMBER
|
| 335 |
|
| 336 |
|
| 337 |
+
# ================================================================
|
| 338 |
+
# PHASE 17 — Revolving Door and TBML Detection
|
| 339 |
+
# ================================================================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 340 |
|
| 341 |
+
ISSUE_TITLE: "feat(ai): revolving door indicator, TBML red flags, electoral cycle analysis"
|
| 342 |
+
ISSUE_LABELS: ["enhancement"]
|
| 343 |
ISSUE_DESCRIPTION: |
|
| 344 |
+
Three advanced institutional risk pattern detectors using existing graph data.
|
|
|
|
|
|
|
| 345 |
|
| 346 |
Files to create:
|
| 347 |
+
ai/revolving_door.py Career regulatory-to-private transition analysis
|
| 348 |
+
ai/tbml_detector.py Five FATF Trade-Based Money Laundering flags
|
| 349 |
+
ai/electoral_cycle_analyzer.py Contract timing vs election calendar
|
| 350 |
+
|
| 351 |
+
TBML flags: commodity_mismatch, single_bid_contract, price_anomaly,
|
| 352 |
+
rapid_director_change, subcontracting_loop.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 353 |
|
| 354 |
+
BRANCH: "feature/phase-17-revolving-door"
|
| 355 |
+
PR_TITLE: "feat(ai): revolving door, TBML detection, electoral cycle analysis"
|
| 356 |
PR_DESCRIPTION: |
|
| 357 |
+
Three advanced corruption pattern detectors using data already in graph.
|
| 358 |
+
FATF-aligned TBML flags cover five distinct laundering patterns.
|
| 359 |
+
Closes #ISSUE_NUMBER
|
| 360 |
|
|
|
|
|
|
|
|
|
|
| 361 |
|
| 362 |
+
# ================================================================
|
| 363 |
+
# PHASE 18 — Security Hardening
|
| 364 |
+
# ================================================================
|
|
|
|
| 365 |
|
| 366 |
+
ISSUE_TITLE: "feat(security): rate limiting, DDoS protection, input validation, audit chain"
|
| 367 |
+
ISSUE_LABELS: ["enhancement", "security"]
|
| 368 |
+
ISSUE_DESCRIPTION: |
|
| 369 |
+
Industry-grade security for a long-running public transparency platform.
|
| 370 |
|
| 371 |
+
Files to create:
|
| 372 |
+
api/middleware/rate_limiter.py Sliding window per IP
|
| 373 |
+
api/middleware/input_validator.py Strict sanitisation, no Cypher injection
|
| 374 |
+
api/middleware/security_headers.py CSP, HSTS, X-Frame-Options
|
| 375 |
+
api/middleware/audit_logger.py Immutable append-only request log
|
| 376 |
+
blockchain/audit_chain.py SHA-256 hash chain on audit log
|
| 377 |
+
docs/security_architecture.md Threat model and incident response
|
| 378 |
+
|
| 379 |
+
rate_limiter.py: 100 req/min for search, 10 req/min for PDF export.
|
| 380 |
+
audit_chain.py: each log entry includes hash of previous entry.
|
| 381 |
+
Daily root hash stored in Neo4j. Optional public anchor available.
|
| 382 |
+
|
| 383 |
+
BRANCH: "feature/phase-18-security"
|
| 384 |
+
PR_TITLE: "feat(security): rate limiting, input validation, security headers, tamper-evident audit log"
|
| 385 |
+
PR_DESCRIPTION: |
|
| 386 |
+
Production-grade security hardening. Rate limiting prevents DDoS.
|
| 387 |
+
Parameterised queries prevent injection. Hash-chained audit log
|
| 388 |
+
provides tamper evidence for all platform activity.
|
| 389 |
Closes #ISSUE_NUMBER
|
| 390 |
|
| 391 |
|
| 392 |
+
# ================================================================
|
| 393 |
+
# PHASE 19 — Self-Learning System
|
| 394 |
+
# ================================================================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 395 |
|
| 396 |
+
ISSUE_TITLE: "feat(ai): self-learning system — schema adaptation, pattern discovery, health monitoring"
|
| 397 |
+
ISSUE_LABELS: ["enhancement"]
|
| 398 |
ISSUE_DESCRIPTION: |
|
| 399 |
+
Platform improves itself as data grows and new fraud patterns emerge.
|
| 400 |
+
All automatic changes require human review before taking effect.
|
| 401 |
|
| 402 |
Files to create:
|
| 403 |
+
ai/schema_learner.py Detects new entity types in incoming data
|
| 404 |
+
ai/pattern_learner.py Identifies candidate structural patterns weekly
|
| 405 |
+
ai/source_discoverer.py Monitors data.gov.in for new published datasets
|
| 406 |
+
ai/weight_optimizer.py Adjusts indicator weights based on confirmed outcomes
|
| 407 |
+
ai/self_audit.py Weekly health check of all 21 scrapers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 408 |
|
| 409 |
+
source_discoverer.py checks weekly for new government datasets and
|
| 410 |
+
creates draft scraper templates for human review and approval.
|
|
|
|
|
|
|
| 411 |
|
| 412 |
+
weight_optimizer.py: when court conviction or ED chargesheet confirms
|
| 413 |
+
a pattern, back-traces which indicators predicted it and adjusts weights.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 414 |
|
| 415 |
+
BRANCH: "feature/phase-19-self-learning"
|
| 416 |
+
PR_TITLE: "feat(ai): self-learning system — schema adaptation, pattern discovery, weight optimisation"
|
| 417 |
+
PR_DESCRIPTION: |
|
| 418 |
+
Platform adapts to new data sources and confirmed outcomes.
|
| 419 |
+
All automatic changes gated by human review.
|
| 420 |
+
Weekly self-audit ensures all scrapers remain operational.
|
| 421 |
Closes #ISSUE_NUMBER
|
| 422 |
|
| 423 |
|
| 424 |
+
# ================================================================
|
| 425 |
+
# PHASE 20 — Free Production Deployment
|
| 426 |
+
# ================================================================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 427 |
|
| 428 |
+
ISSUE_TITLE: "feat(deploy): zero-cost production deployment — Render, Vercel, Neo4j AuraDB"
|
| 429 |
+
ISSUE_LABELS: ["enhancement"]
|
| 430 |
ISSUE_DESCRIPTION: |
|
| 431 |
+
Full production deployment at zero monthly cost.
|
|
|
|
|
|
|
| 432 |
|
| 433 |
Files to create:
|
| 434 |
+
render.yaml Render.com web service definition
|
| 435 |
vercel.json Vercel deployment configuration
|
| 436 |
+
Procfile uvicorn process definition
|
| 437 |
+
docs/deployment.md Step-by-step deployment guide
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 438 |
|
| 439 |
+
UptimeRobot free tier monitors /health every 5 minutes and keeps
|
| 440 |
+
the Render free tier awake with periodic pings.
|
| 441 |
|
| 442 |
+
GitHub Actions deploy hook triggers Render redeploy on every
|
| 443 |
+
merge to main.
|
| 444 |
|
| 445 |
+
BRANCH: "feature/phase-20-deployment"
|
| 446 |
+
PR_TITLE: "feat(deploy): Render backend, Vercel frontend, Neo4j AuraDB, UptimeRobot monitoring"
|
| 447 |
+
PR_DESCRIPTION: |
|
| 448 |
+
Zero-cost production deployment. All environment variables in
|
| 449 |
+
Render and Vercel dashboards. UptimeRobot keeps free tier awake.
|
| 450 |
+
Closes #ISSUE_NUMBER
|
| 451 |
|
|
|
|
| 452 |
|
| 453 |
+
# ================================================================
|
| 454 |
+
# PHASE 21 — Court and Law Enforcement Intelligence Pack
|
| 455 |
+
# ================================================================
|
| 456 |
|
| 457 |
+
ISSUE_TITLE: "feat(ai): court-grade intelligence pack for law enforcement and judicial use"
|
| 458 |
+
ISSUE_LABELS: ["enhancement"]
|
| 459 |
+
ISSUE_DESCRIPTION: |
|
| 460 |
+
Professional-grade investigation outputs suitable for courts, police,
|
| 461 |
+
CBI, ED, CVC, and parliamentary committees.
|
| 462 |
|
| 463 |
+
Files to create:
|
| 464 |
+
ai/case_builder.py Structured case file assembly
|
| 465 |
+
ai/evidence_chain.py Formal evidence chain with legal citations
|
| 466 |
+
ai/crime_classifier.py Maps findings to IPC, PCA, PMLA sections
|
| 467 |
+
ai/timeline_reconstructor.py Forensic chronological event mapping
|
| 468 |
+
api/routes/legal_export.py GET /legal/case-file/{entity_id}
|
| 469 |
+
|
| 470 |
+
crime_classifier.py maps structural patterns to potentially relevant
|
| 471 |
+
legal sections using neutral language: "pattern may be relevant to
|
| 472 |
+
section X" — never asserts guilt. Sections: IPC 420/409, PCA 13,
|
| 473 |
+
PMLA 3/4, FEMA, Companies Act 2013.
|
| 474 |
+
|
| 475 |
+
timeline_reconstructor.py builds forensic timeline combining all
|
| 476 |
+
data sources: registrations, contracts, asset declarations, audit
|
| 477 |
+
filings, court cases, ED actions, electoral bonds.
|
| 478 |
+
|
| 479 |
+
legal_export.py produces: PDF case file + JSON + evidence index.
|
| 480 |
+
Unique case file hash. Methodology note for court admissibility.
|
| 481 |
+
|
| 482 |
+
BRANCH: "feature/phase-21-court-intelligence"
|
| 483 |
+
PR_TITLE: "feat(ai): court and law enforcement intelligence pack with formal evidence chain"
|
| 484 |
+
PR_DESCRIPTION: |
|
| 485 |
+
Professional investigation outputs for courts, police, CBI, ED, CVC.
|
| 486 |
+
Formal evidence chain, crime section mapping, forensic timeline.
|
| 487 |
+
Never asserts guilt — provides structured analytical framework only.
|
| 488 |
Closes #ISSUE_NUMBER
|