How redmaplewww/evkg works
evkg is a domain-configurable evidence knowledge graph with a CLI and Web workbench. Its main workflow takes source material through ingestion, claim/entity extraction, automated quality attacks, evidence dossiers, and indexed or graph-based exploration. The graph preserves the documented attack mechanisms and Web capabilities; edges reflect README statements or references in the provided SOURCE INDEX. Some detailed runtime wiring is unsampled, so uncertain links are omitted.
Main entry points: __init__.py Attack Orchestrator · cli.py CLI Commands · store.py Knowledge Store · web.py Web API
Components 25
Ingestion
- Ingestion Pipeline
src/evkg/ingest/pipeline.py - Source Readers
src/evkg/ingest/connectors.py - Wiki Import
src/evkg/ingest/wikitext.py - Ingestion Providers
src/evkg/ingest/providers.py
Graph Construction
- Claim Extraction
src/evkg/extract.py - Entity Resolution
src/evkg/entity_resolution.py
Evidence Quality
- Attack Orchestrator
src/evkg/attack/__init__.py - Claim Verifier
src/evkg/attack/verifier.py - Contradiction Scan
src/evkg/attack/contradiction.py - Rule Conflict Scan
src/evkg/attack/deterministic.py - Red-Team Review
src/evkg/attack/adversarial.py - Invariant Audit
src/evkg/attack/auditor.py - Audit Fault Test
src/evkg/attack/damage.py
Search & Workbench
- CLI Commands
src/evkg/cli.py - Evidence Dossier
src/evkg/evidence/dossier.py - Unified Search
src/evkg/index/search.py - Full-Text Index
src/evkg/index/fts.py - Web API
src/evkg/web.py - Web Workbench
frontend/src/main.jsx
Shared Foundations
- Graph Data Models
src/evkg/domain.py - Domain Profile
src/evkg/config.py - Knowledge Store
src/evkg/store.py - Model Gateway
src/evkg/model_gateway.py
Other components
- User
- LLM Provider
Connections 38
- User → CLI Commands: runs commands
README.md - User → Web Workbench: uses workbench
README.md - CLI Commands → Ingestion Pipeline: dispatches ingest
src/evkg/cli.py - Ingestion Pipeline → Source Readers: selects reader
src/evkg/ingest/pipeline.py - Ingestion Pipeline → Ingestion Providers: uses providers
src/evkg/ingest/pipeline.py - Source Readers → Wiki Import: uses wiki reader
src/evkg/ingest/connectors.py - Ingestion Pipeline → Knowledge Store: saves assets
src/evkg/ingest/pipeline.py - CLI Commands → Claim Extraction: dispatches extract
src/evkg/cli.py - Claim Extraction → Knowledge Store: reads and writes
src/evkg/extract.py - Claim Extraction → Entity Resolution: resolves entities
src/evkg/extract.py - Claim Extraction → Model Gateway: requests extraction
src/evkg/extract.py - Claim Extraction → Domain Profile: uses profile
src/evkg/extract.py - Model Gateway → LLM Provider: sends model requests
src/evkg/model_gateway.py - CLI Commands → Attack Orchestrator: dispatches attack
src/evkg/cli.py - Attack Orchestrator → Claim Verifier: runs verifier
src/evkg/attack/__init__.py - Attack Orchestrator → Contradiction Scan: runs scan
src/evkg/attack/__init__.py - Attack Orchestrator → Rule Conflict Scan: runs scan
src/evkg/attack/__init__.py - Attack Orchestrator → Red-Team Review: runs red team
src/evkg/attack/__init__.py - Attack Orchestrator → Invariant Audit: runs audit
src/evkg/attack/__init__.py - Attack Orchestrator → Audit Fault Test: runs fault test
src/evkg/attack/__init__.py - Claim Verifier → Model Gateway: requests review
src/evkg/attack/verifier.py - Claim Verifier → Knowledge Store: reads and updates
src/evkg/attack/verifier.py - Contradiction Scan → Model Gateway: requests scan
src/evkg/attack/contradiction.py - Red-Team Review → Model Gateway: requests review
src/evkg/attack/adversarial.py - Invariant Audit → Knowledge Store: audits records
src/evkg/attack/auditor.py - Audit Fault Test → Invariant Audit: checks detection
src/evkg/attack/damage.py - CLI Commands → Evidence Dossier: dispatches dossier
src/evkg/cli.py - Evidence Dossier → Knowledge Store: reads evidence
src/evkg/evidence/dossier.py - CLI Commands → Unified Search: dispatches search
src/evkg/cli.py - Unified Search → Full-Text Index: matches passages
src/evkg/index/search.py - Unified Search → Knowledge Store: queries records
src/evkg/index/search.py - Full-Text Index → Knowledge Store: indexes passages
src/evkg/index/fts.py - CLI Commands → Web API: starts service
src/evkg/cli.py - Web Workbench → Web API: calls API
README.md - Web API → Unified Search: uses search
src/evkg/web.py - Web API → Evidence Dossier: generates dossiers
src/evkg/web.py - Web API → Attack Orchestrator: uses attack reports
src/evkg/web.py - Web API → Knowledge Store: queries graph data
src/evkg/web.py