Summary
Remove all Memgraph (graph database) code and infrastructure from the codebase. The project no longer uses Memgraph and keeping it adds unnecessary complexity and maintenance burden.
Removal Plan
Phase 1: Tests First
Phase 2: Core Library Code
Phase 3: Scripts
Phase 4: Infrastructure & Config
Phase 5: Documentation
Phase 6: Verification
Files to Delete
lib/db/memgraph_client.py
scripts/kg_sync_memgraph.py
lib/knowledge_graph/ingestor.py
Files to Modify
api/search_api.py
lib/advanced_search_features.py
lib/processors/bill_ingestor.py
lib/chat_agent.py
lib/knowledge_graph/__init__.py
lib/utils/config.py
scripts/ingest_knowledge_graph.py
scripts/migrate_transcripts.py
scripts/ingest_bills.py
tests/test_database.py
tests/test_bill_ingestion.py
tests/test_bill_ingestor_unit.py
tests/test_advanced_search.py
tests/conftest.py
docker-compose.yml
.env.example
requirements.txt
db.sh
docs/KG_PLAN.md
docs/CODE_MAP_AND_REVIEW.md
Summary
Remove all Memgraph (graph database) code and infrastructure from the codebase. The project no longer uses Memgraph and keeping it adds unnecessary complexity and maintenance burden.
Removal Plan
Phase 1: Tests First
tests/test_database.py- remove Memgraph connection teststests/test_bill_ingestion.py- remove Memgraph integrationtests/test_bill_ingestor_unit.py- mock only what's neededtests/test_advanced_search.py- remove Memgraph mocks/usagetests/conftest.py- remove Memgraph from integration markerPhase 2: Core Library Code
lib/db/memgraph_client.pyapi/search_api.py- remove Memgraph import, globals, startup,_get_memgraph()lib/advanced_search_features.py- Postgres-only, remove Memgraph-backed methodslib/processors/bill_ingestor.py- remove graph writes, Memgraph constructorlib/chat_agent.py- fix any call sites for changed signatureslib/knowledge_graph/ingestor.py(Memgraph-only)lib/knowledge_graph/__init__.pylib/utils/config.pyPhase 3: Scripts
scripts/kg_sync_memgraph.pyscripts/ingest_knowledge_graph.pyscripts/migrate_transcripts.pyscripts/ingest_bills.pyPhase 4: Infrastructure & Config
pymgclientfromrequirements.txt.env.exampledocker-compose.ymldb.shPhase 5: Documentation
docs/KG_PLAN.mddocs/CODE_MAP_AND_REVIEW.mdfrontend/README.mdif endpoint behavior changesPhase 6: Verification
rg -ni \"memgraph|pymgclient|MEMGRAPH_\"returns no project referencesruff check .passesmypy lib/passespytest tests/ -vpassesdocker-compose up -dstarts only PostgresFiles to Delete
lib/db/memgraph_client.pyscripts/kg_sync_memgraph.pylib/knowledge_graph/ingestor.pyFiles to Modify
api/search_api.pylib/advanced_search_features.pylib/processors/bill_ingestor.pylib/chat_agent.pylib/knowledge_graph/__init__.pylib/utils/config.pyscripts/ingest_knowledge_graph.pyscripts/migrate_transcripts.pyscripts/ingest_bills.pytests/test_database.pytests/test_bill_ingestion.pytests/test_bill_ingestor_unit.pytests/test_advanced_search.pytests/conftest.pydocker-compose.yml.env.examplerequirements.txtdb.shdocs/KG_PLAN.mddocs/CODE_MAP_AND_REVIEW.md