bizy-ai 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,72 @@
1
+ #!/usr/bin/env python3
2
+ """Weekly Review Script"""
3
+
4
+ import sys
5
+ import os
6
+ sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
7
+
8
+ from agent.core import BusinessAgent
9
+ from agent.tasks import TaskManager
10
+ from agent.planner import BusinessPlanner
11
+ from rich.console import Console
12
+ from rich.panel import Panel
13
+ from rich.markdown import Markdown
14
+ from datetime import datetime, timedelta
15
+ from dotenv import load_dotenv
16
+
17
+ load_dotenv()
18
+ console = Console()
19
+
20
+ def run_weekly_review():
21
+ try:
22
+ console.print(f"\n[bold blue]📊 WEEKLY REVIEW - {datetime.now().strftime('%B %d, %Y')}[/bold blue]\n")
23
+
24
+ agent = BusinessAgent()
25
+ task_mgr = TaskManager()
26
+ planner = BusinessPlanner()
27
+
28
+ # Get weekly statistics
29
+ weekly_stats = task_mgr.get_weekly_stats()
30
+
31
+ # Get goal progress
32
+ active_goals = planner.get_active_goals()
33
+ goals_progress = "\n".join([
34
+ f"- {g.title}: {g.progress_percentage:.0f}% complete"
35
+ for g in active_goals[:5]
36
+ ]) if active_goals else "No active goals"
37
+
38
+ # Get key events
39
+ key_events = []
40
+ for log in weekly_stats.get('logs', []):
41
+ if log.get('wins'):
42
+ key_events.append(f"Win: {log['wins']}")
43
+ key_events_str = "\n".join(key_events[-10:]) if key_events else "No events logged"
44
+
45
+ # Generate review
46
+ console.print("[dim]Generating comprehensive analysis...[/dim]\n")
47
+ review = agent.weekly_review(
48
+ weekly_stats=weekly_stats,
49
+ goals_progress=goals_progress,
50
+ key_events=key_events_str
51
+ )
52
+
53
+ console.print(Panel(
54
+ Markdown(review),
55
+ title="🤖 Weekly Analysis",
56
+ border_style="blue",
57
+ padding=(1, 2)
58
+ ))
59
+
60
+ console.print(f"\n[bold]⚡ Velocity:[/bold] {task_mgr.get_task_velocity(days=7):.1f} tasks/day\n")
61
+
62
+ task_mgr.close()
63
+ planner.close()
64
+
65
+ console.print("[bold green]✨ Week reviewed! Ready for the next one.[/bold green]\n")
66
+
67
+ except Exception as e:
68
+ console.print(f"[bold red]❌ Error:[/bold red] {e}")
69
+ sys.exit(1)
70
+
71
+ if __name__ == "__main__":
72
+ run_weekly_review()