Research_AI_Assistant / cleanup_files.py
JatsTheAIGen's picture
Process flow visualizer + key skills [for validation only) V5
80a97c8
raw
history blame
2.84 kB
"""Clean up directory by archiving files"""
import os
import shutil
from pathlib import Path
# Create archive structure
Path("archive/docs").mkdir(parents=True, exist_ok=True)
Path("archive/duplicates").mkdir(parents=True, exist_ok=True)
Path("archive/test").mkdir(parents=True, exist_ok=True)
# Documentation files to archive
doc_files = [
"CONTEXT_MEMORY_FIX.md",
"CONTEXT_SUMMARIZATION_ENHANCED.md",
"CONTEXT_SUMMARIZATION_IMPLEMENTED.md",
"CONTEXT_WINDOW_INCREASED.md",
"SESSION_CONTEXT_FIX.md",
"SESSION_CONTEXT_FIX_SUMMARY.md",
"SESSION_UI_FIX_COMPLETE.md",
"MOVING_WINDOW_CONTEXT_FINAL.md",
"BUG_FIXES.md",
"BUILD_READINESS.md",
"DEPLOYMENT_NOTES.md",
"DEPLOYMENT_STATUS.md",
"FINAL_FIXES_APPLIED.md",
"GRACEFUL_DEGRADATION_GUARANTEE.md",
"HF_TOKEN_SETUP.md",
"IMPLEMENTATION_GAPS_RESOLVED.md",
"IMPLEMENTATION_STATUS.md",
"INTEGRATION_COMPLETE.md",
"INTEGRATION_GUIDE.md",
"LLM_INTEGRATION_STATUS.md",
"LOGGING_GUIDE.md",
"PLACEHOLDER_REMOVAL_COMPLETE.md",
"SYSTEM_UPGRADE_CONFIRMATION.md",
"TECHNICAL_REVIEW.md",
"WORKFLOW_INTEGRATION_GUARANTEE.md",
"FILE_STRUCTURE.md",
"AGENTS_COMPLETE.md",
"COMPATIBILITY.md"
]
# Test/Development files
test_files = [
"acceptance_testing.py",
"agent_protocols.py",
"agent_stubs.py",
"cache_implementation.py",
"faiss_manager.py",
"intent_protocols.py",
"intent_recognition.py",
"mobile_components.py",
"mobile_events.py",
"mobile_handlers.py",
"performance_optimizations.py",
"pwa_features.py",
"test_setup.py",
"verify_no_downgrade.py"
]
# Archive documentation files
for file in doc_files:
if os.path.exists(file):
try:
shutil.move(file, f"archive/docs/{file}")
print(f"Moved {file}")
except Exception as e:
print(f"Error moving {file}: {e}")
# Archive test files
for file in test_files:
if os.path.exists(file):
try:
shutil.move(file, f"archive/test/{file}")
print(f"Moved {file}")
except Exception as e:
print(f"Error moving {file}: {e}")
# Archive Research_AI_Assistant directory
if os.path.exists("Research_AI_Assistant"):
try:
shutil.move("Research_AI_Assistant", "archive/duplicates/Research_AI_Assistant")
print("Moved Research_AI_Assistant directory")
except Exception as e:
print(f"Error moving Research_AI_Assistant: {e}")
print("\nCleanup complete!")
print("\nFiles kept in root:")
for item in os.listdir("."):
if os.path.isfile(item) and not item.startswith(".") and item != "cleanup_files.py":
print(f" - {item}")
print("\nFiles kept in src/")
if os.path.exists("src"):
for item in os.listdir("src"):
print(f" - src/{item}")