File size: 2,836 Bytes
80a97c8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
"""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}")
|