"""
Force Phase 1 completion step by step
"""
from core.agent_v2 import EdenAgentV2

eden = EdenAgentV2()

print("FORCING PHASE 1 COMPLETION - STEP BY STEP")
print("=" * 80)

# Step 1: Knowledge Graph
print("\n1. Creating knowledge graph...")
eden.chat("Create core/knowledge/knowledge_graph.py with a simple KnowledgeGraph class that has add_fact() and query() methods. Use write_file NOW.")

# Step 2: World Model  
print("\n2. Creating world model...")
eden.chat("Create core/reasoning/world_model.py with a WorldModel class that tracks project state. Use write_file NOW.")

# Step 3: Goals
print("\n3. Creating goals system...")
eden.chat("Create core/reasoning/goals.py with a GoalManager class that can create and track goals. Use write_file NOW.")

# Step 4: Summary
print("\n4. Creating Phase 1 summary...")
eden.chat("Create phase1_complete.md documenting Phase 1 completion. Use write_file NOW.")

# Step 5: Commit
print("\n5. Committing...")
eden.chat('Run: git add . && git commit -m "Phase 1 COMPLETE: Foundation achieved"')

print("\n✅ FORCED COMPLETION DONE")

# Check what was created
import os
for f in ['core/knowledge/knowledge_graph.py', 'core/reasoning/world_model.py', 'core/reasoning/goals.py', 'phase1_complete.md']:
    print(f"{'✅' if os.path.exists(f) else '❌'} {f}")
