bizy-ai 1.0.1__py3-none-any.whl → 1.0.2__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.
- agent/cli.py +24 -0
- agent/plan_manager.py +309 -0
- {bizy_ai-1.0.1.dist-info → bizy_ai-1.0.2.dist-info}/METADATA +1 -1
- {bizy_ai-1.0.1.dist-info → bizy_ai-1.0.2.dist-info}/RECORD +8 -7
- {bizy_ai-1.0.1.dist-info → bizy_ai-1.0.2.dist-info}/WHEEL +0 -0
- {bizy_ai-1.0.1.dist-info → bizy_ai-1.0.2.dist-info}/entry_points.txt +0 -0
- {bizy_ai-1.0.1.dist-info → bizy_ai-1.0.2.dist-info}/licenses/LICENSE +0 -0
- {bizy_ai-1.0.1.dist-info → bizy_ai-1.0.2.dist-info}/top_level.txt +0 -0
agent/cli.py
CHANGED
@@ -243,5 +243,29 @@ def weekly():
|
|
243
243
|
from agent.weekly_review import run_weekly_review
|
244
244
|
run_weekly_review()
|
245
245
|
|
246
|
+
# BUSINESS PLAN MANAGEMENT
|
247
|
+
@cli.group()
|
248
|
+
def plan():
|
249
|
+
"""Manage business plan"""
|
250
|
+
pass
|
251
|
+
|
252
|
+
@plan.command()
|
253
|
+
def show():
|
254
|
+
"""Review current business plan and goals"""
|
255
|
+
from agent.plan_manager import review_business_plan
|
256
|
+
review_business_plan()
|
257
|
+
|
258
|
+
@plan.command()
|
259
|
+
def create():
|
260
|
+
"""Create new business plan"""
|
261
|
+
from agent.plan_manager import create_business_plan
|
262
|
+
create_business_plan()
|
263
|
+
|
264
|
+
@plan.command()
|
265
|
+
def update():
|
266
|
+
"""Update existing business plan"""
|
267
|
+
from agent.plan_manager import update_business_plan
|
268
|
+
update_business_plan()
|
269
|
+
|
246
270
|
if __name__ == "__main__":
|
247
271
|
cli()
|
agent/plan_manager.py
ADDED
@@ -0,0 +1,309 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
"""
|
3
|
+
Business Plan Management Script
|
4
|
+
Review and update business plans, goals, and tasks
|
5
|
+
"""
|
6
|
+
|
7
|
+
import sys
|
8
|
+
import os
|
9
|
+
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
10
|
+
|
11
|
+
from agent.core import BusinessAgent
|
12
|
+
from agent.planner import BusinessPlanner
|
13
|
+
from agent.tasks import TaskManager
|
14
|
+
from rich.console import Console
|
15
|
+
from rich.panel import Panel
|
16
|
+
from rich.table import Table
|
17
|
+
from rich.prompt import Prompt, Confirm
|
18
|
+
from rich.markdown import Markdown
|
19
|
+
from datetime import datetime, timedelta
|
20
|
+
from dotenv import load_dotenv
|
21
|
+
|
22
|
+
load_dotenv()
|
23
|
+
console = Console()
|
24
|
+
|
25
|
+
def review_business_plan():
|
26
|
+
"""Display comprehensive business plan review"""
|
27
|
+
try:
|
28
|
+
console.print()
|
29
|
+
console.print(f"[bold blue]{'='*70}[/bold blue]")
|
30
|
+
console.print(f"[bold blue] 📋 BUSINESS PLAN REVIEW - {datetime.now().strftime('%B %d, %Y')}[/bold blue]")
|
31
|
+
console.print(f"[bold blue]{'='*70}[/bold blue]")
|
32
|
+
console.print()
|
33
|
+
|
34
|
+
planner = BusinessPlanner()
|
35
|
+
task_mgr = TaskManager()
|
36
|
+
agent = BusinessAgent()
|
37
|
+
|
38
|
+
# Get active business plan
|
39
|
+
plan = planner.get_active_business_plan()
|
40
|
+
|
41
|
+
if not plan:
|
42
|
+
console.print("[yellow]⚠️ No active business plan found.[/yellow]")
|
43
|
+
console.print("\nWould you like to create one? Use: [cyan]bizy plan create[/cyan]")
|
44
|
+
return
|
45
|
+
|
46
|
+
# Display business plan
|
47
|
+
console.print("[bold]📊 Current Business Plan[/bold]")
|
48
|
+
console.print(f"[dim]Version: {plan.version} | Created: {plan.created_at.strftime('%Y-%m-%d')}[/dim]\n")
|
49
|
+
|
50
|
+
plan_info = f"""
|
51
|
+
**Vision:** {plan.vision}
|
52
|
+
|
53
|
+
**Mission:** {plan.mission}
|
54
|
+
|
55
|
+
**Value Proposition:** {plan.value_proposition}
|
56
|
+
|
57
|
+
**Target Market:** {plan.target_market}
|
58
|
+
|
59
|
+
**Revenue Model:** {plan.revenue_model}
|
60
|
+
"""
|
61
|
+
console.print(Panel(Markdown(plan_info), title="Business Plan", border_style="blue"))
|
62
|
+
|
63
|
+
# Get goals
|
64
|
+
console.print("\n[bold]🎯 Goals Overview[/bold]\n")
|
65
|
+
all_goals = planner.get_active_goals()
|
66
|
+
|
67
|
+
if all_goals:
|
68
|
+
goals_table = Table(show_header=True, header_style="bold cyan")
|
69
|
+
goals_table.add_column("Horizon")
|
70
|
+
goals_table.add_column("Goal")
|
71
|
+
goals_table.add_column("Progress", justify="right")
|
72
|
+
goals_table.add_column("Target Date")
|
73
|
+
|
74
|
+
for goal in all_goals[:10]:
|
75
|
+
progress_bar = "█" * int(goal.progress_percentage / 10) + "░" * (10 - int(goal.progress_percentage / 10))
|
76
|
+
target = goal.target_date.strftime('%Y-%m-%d') if goal.target_date else "Not set"
|
77
|
+
goals_table.add_row(
|
78
|
+
goal.horizon.upper(),
|
79
|
+
goal.title[:40],
|
80
|
+
f"{progress_bar} {goal.progress_percentage:.0f}%",
|
81
|
+
target
|
82
|
+
)
|
83
|
+
|
84
|
+
console.print(goals_table)
|
85
|
+
else:
|
86
|
+
console.print("[yellow]No active goals found.[/yellow]")
|
87
|
+
|
88
|
+
# Get task summary
|
89
|
+
console.print("\n[bold]📋 Task Summary[/bold]\n")
|
90
|
+
weekly_stats = task_mgr.get_weekly_stats()
|
91
|
+
today_tasks = task_mgr.get_tasks_for_today()
|
92
|
+
overdue = task_mgr.get_overdue_tasks()
|
93
|
+
|
94
|
+
console.print(f" • This Week: {weekly_stats['total_tasks_completed']}/{weekly_stats['total_tasks_planned']} completed ({weekly_stats['average_completion_rate']:.0%})")
|
95
|
+
console.print(f" • Today: {len(today_tasks)} tasks scheduled")
|
96
|
+
console.print(f" • Overdue: {len(overdue)} tasks")
|
97
|
+
|
98
|
+
# AI Analysis
|
99
|
+
console.print("\n[dim]Generating AI analysis...[/dim]")
|
100
|
+
|
101
|
+
goals_summary = "\n".join([
|
102
|
+
f"- [{g.horizon.upper()}] {g.title}: {g.progress_percentage:.0f}% complete"
|
103
|
+
for g in all_goals[:5]
|
104
|
+
]) if all_goals else "No active goals"
|
105
|
+
|
106
|
+
analysis_prompt = f"""Analyze this business plan and provide strategic insights:
|
107
|
+
|
108
|
+
BUSINESS PLAN:
|
109
|
+
- Vision: {plan.vision}
|
110
|
+
- Mission: {plan.mission}
|
111
|
+
- Value Proposition: {plan.value_proposition}
|
112
|
+
|
113
|
+
GOALS PROGRESS:
|
114
|
+
{goals_summary}
|
115
|
+
|
116
|
+
EXECUTION METRICS:
|
117
|
+
- Weekly Completion Rate: {weekly_stats['average_completion_rate']:.0%}
|
118
|
+
- Tasks Overdue: {len(overdue)}
|
119
|
+
|
120
|
+
Provide:
|
121
|
+
1. **Plan-Goal Alignment** - Are the goals aligned with the business plan?
|
122
|
+
2. **Execution Health** - Is the execution on track?
|
123
|
+
3. **Recommended Adjustments** - What should be updated or changed?
|
124
|
+
4. **Next Strategic Moves** - What are the top 3 priorities?
|
125
|
+
|
126
|
+
Be concise and actionable."""
|
127
|
+
|
128
|
+
analysis = agent.client.messages.create(
|
129
|
+
model=agent.model,
|
130
|
+
max_tokens=2000,
|
131
|
+
messages=[{"role": "user", "content": analysis_prompt}]
|
132
|
+
).content[0].text
|
133
|
+
|
134
|
+
console.print(Panel(
|
135
|
+
Markdown(analysis),
|
136
|
+
title="🤖 AI Strategic Analysis",
|
137
|
+
border_style="blue",
|
138
|
+
padding=(1, 2)
|
139
|
+
))
|
140
|
+
|
141
|
+
console.print()
|
142
|
+
planner.close()
|
143
|
+
task_mgr.close()
|
144
|
+
|
145
|
+
except Exception as e:
|
146
|
+
console.print(f"[bold red]❌ Error reviewing plan:[/bold red] {e}")
|
147
|
+
import traceback
|
148
|
+
console.print(traceback.format_exc())
|
149
|
+
|
150
|
+
def create_business_plan():
|
151
|
+
"""Interactive business plan creation"""
|
152
|
+
try:
|
153
|
+
console.print()
|
154
|
+
console.print(f"[bold green]{'='*70}[/bold green]")
|
155
|
+
console.print(f"[bold green] 📝 CREATE BUSINESS PLAN[/bold green]")
|
156
|
+
console.print(f"[bold green]{'='*70}[/bold green]")
|
157
|
+
console.print()
|
158
|
+
|
159
|
+
console.print("[cyan]Let's create your business plan. This will guide all your goals and tasks.[/cyan]\n")
|
160
|
+
|
161
|
+
vision = Prompt.ask("🔭 [bold]What is your vision?[/bold] (Where are you going?)")
|
162
|
+
mission = Prompt.ask("🎯 [bold]What is your mission?[/bold] (How will you get there?)")
|
163
|
+
value_prop = Prompt.ask("💎 [bold]What is your value proposition?[/bold] (Why you over competitors?)")
|
164
|
+
target_market = Prompt.ask("👥 [bold]Who is your target market?[/bold]")
|
165
|
+
revenue_model = Prompt.ask("💰 [bold]What is your revenue model?[/bold] (How will you make money?)")
|
166
|
+
|
167
|
+
version = Prompt.ask("📌 [bold]Version number?[/bold]", default="1.0")
|
168
|
+
|
169
|
+
console.print("\n[dim]Creating business plan...[/dim]")
|
170
|
+
|
171
|
+
planner = BusinessPlanner()
|
172
|
+
plan = planner.create_business_plan(
|
173
|
+
vision=vision,
|
174
|
+
mission=mission,
|
175
|
+
value_proposition=value_prop,
|
176
|
+
target_market=target_market,
|
177
|
+
revenue_model=revenue_model,
|
178
|
+
version=version
|
179
|
+
)
|
180
|
+
|
181
|
+
console.print(Panel(
|
182
|
+
f"[green]✅ Business Plan v{plan.version} Created Successfully![/green]\n\n"
|
183
|
+
f"This plan will now guide your goal setting and task management.",
|
184
|
+
title="Success",
|
185
|
+
border_style="green"
|
186
|
+
))
|
187
|
+
|
188
|
+
# Ask if they want to create goals
|
189
|
+
if Confirm.ask("\n💡 Would you like to create your first goal now?"):
|
190
|
+
console.print("\n[cyan]Tip: Start with a yearly goal, then break it down into smaller goals.[/cyan]\n")
|
191
|
+
|
192
|
+
goal_title = Prompt.ask("🎯 [bold]Goal title[/bold]")
|
193
|
+
goal_desc = Prompt.ask("📝 [bold]Goal description[/bold]")
|
194
|
+
horizon = Prompt.ask(
|
195
|
+
"⏰ [bold]Time horizon[/bold]",
|
196
|
+
choices=["weekly", "monthly", "quarterly", "yearly"],
|
197
|
+
default="yearly"
|
198
|
+
)
|
199
|
+
|
200
|
+
# Calculate target date
|
201
|
+
days_map = {"weekly": 7, "monthly": 30, "quarterly": 90, "yearly": 365}
|
202
|
+
target_date = datetime.now() + timedelta(days=days_map[horizon])
|
203
|
+
|
204
|
+
goal = planner.create_goal(
|
205
|
+
title=goal_title,
|
206
|
+
description=goal_desc,
|
207
|
+
horizon=horizon,
|
208
|
+
target_date=target_date
|
209
|
+
)
|
210
|
+
|
211
|
+
console.print(f"\n[green]✅ Goal created (ID: {goal.id})[/green]")
|
212
|
+
|
213
|
+
if Confirm.ask("\n🤖 Would you like AI to break this goal into tasks?"):
|
214
|
+
console.print("\n[dim]AI is breaking down your goal into actionable tasks...[/dim]")
|
215
|
+
tasks = planner.break_down_goal(goal.id)
|
216
|
+
|
217
|
+
if tasks:
|
218
|
+
console.print(f"\n[green]✅ Created {len(tasks)} tasks:[/green]")
|
219
|
+
for i, task in enumerate(tasks[:5], 1):
|
220
|
+
console.print(f" {i}. {task.title}")
|
221
|
+
if len(tasks) > 5:
|
222
|
+
console.print(f" ... and {len(tasks) - 5} more")
|
223
|
+
|
224
|
+
planner.close()
|
225
|
+
console.print()
|
226
|
+
|
227
|
+
except Exception as e:
|
228
|
+
console.print(f"[bold red]❌ Error creating plan:[/bold red] {e}")
|
229
|
+
import traceback
|
230
|
+
console.print(traceback.format_exc())
|
231
|
+
|
232
|
+
def update_business_plan():
|
233
|
+
"""Update existing business plan"""
|
234
|
+
try:
|
235
|
+
console.print()
|
236
|
+
console.print(f"[bold yellow]{'='*70}[/bold yellow]")
|
237
|
+
console.print(f"[bold yellow] ✏️ UPDATE BUSINESS PLAN[/bold yellow]")
|
238
|
+
console.print(f"[bold yellow]{'='*70}[/bold yellow]")
|
239
|
+
console.print()
|
240
|
+
|
241
|
+
planner = BusinessPlanner()
|
242
|
+
plan = planner.get_active_business_plan()
|
243
|
+
|
244
|
+
if not plan:
|
245
|
+
console.print("[yellow]⚠️ No active business plan found.[/yellow]")
|
246
|
+
console.print("\nCreate one with: [cyan]bizy plan create[/cyan]")
|
247
|
+
return
|
248
|
+
|
249
|
+
console.print(f"[bold]Current Plan (v{plan.version})[/bold]\n")
|
250
|
+
console.print(f"Vision: {plan.vision}")
|
251
|
+
console.print(f"Mission: {plan.mission}")
|
252
|
+
console.print(f"Value Proposition: {plan.value_proposition}")
|
253
|
+
console.print(f"Target Market: {plan.target_market}")
|
254
|
+
console.print(f"Revenue Model: {plan.revenue_model}")
|
255
|
+
console.print()
|
256
|
+
|
257
|
+
console.print("[cyan]What would you like to update? (Press Enter to skip)[/cyan]\n")
|
258
|
+
|
259
|
+
vision = Prompt.ask("🔭 [bold]Vision[/bold]", default=plan.vision)
|
260
|
+
mission = Prompt.ask("🎯 [bold]Mission[/bold]", default=plan.mission)
|
261
|
+
value_prop = Prompt.ask("💎 [bold]Value Proposition[/bold]", default=plan.value_proposition)
|
262
|
+
target_market = Prompt.ask("👥 [bold]Target Market[/bold]", default=plan.target_market)
|
263
|
+
revenue_model = Prompt.ask("💰 [bold]Revenue Model[/bold]", default=plan.revenue_model)
|
264
|
+
|
265
|
+
# Create new version
|
266
|
+
version_parts = plan.version.split('.')
|
267
|
+
new_minor = int(version_parts[1]) + 1 if len(version_parts) > 1 else 1
|
268
|
+
new_version = f"{version_parts[0]}.{new_minor}"
|
269
|
+
|
270
|
+
new_version = Prompt.ask("📌 [bold]New version number[/bold]", default=new_version)
|
271
|
+
|
272
|
+
if Confirm.ask("\n💾 Save this as a new version of your business plan?"):
|
273
|
+
new_plan = planner.create_business_plan(
|
274
|
+
vision=vision,
|
275
|
+
mission=mission,
|
276
|
+
value_proposition=value_prop,
|
277
|
+
target_market=target_market,
|
278
|
+
revenue_model=revenue_model,
|
279
|
+
version=new_version
|
280
|
+
)
|
281
|
+
|
282
|
+
console.print(Panel(
|
283
|
+
f"[green]✅ Business Plan Updated to v{new_plan.version}[/green]\n\n"
|
284
|
+
f"The previous version (v{plan.version}) has been archived.",
|
285
|
+
title="Success",
|
286
|
+
border_style="green"
|
287
|
+
))
|
288
|
+
|
289
|
+
planner.close()
|
290
|
+
console.print()
|
291
|
+
|
292
|
+
except Exception as e:
|
293
|
+
console.print(f"[bold red]❌ Error updating plan:[/bold red] {e}")
|
294
|
+
import traceback
|
295
|
+
console.print(traceback.format_exc())
|
296
|
+
|
297
|
+
if __name__ == "__main__":
|
298
|
+
if len(sys.argv) > 1:
|
299
|
+
command = sys.argv[1]
|
300
|
+
if command == "review":
|
301
|
+
review_business_plan()
|
302
|
+
elif command == "create":
|
303
|
+
create_business_plan()
|
304
|
+
elif command == "update":
|
305
|
+
update_business_plan()
|
306
|
+
else:
|
307
|
+
console.print(f"[red]Unknown command: {command}[/red]")
|
308
|
+
else:
|
309
|
+
review_business_plan()
|
@@ -1,18 +1,19 @@
|
|
1
1
|
agent/__init__.py,sha256=pHeIDi-ibuwZqaNqxdIDRvzedWtPywssbaYIDawMcvQ,88
|
2
|
-
agent/cli.py,sha256=
|
2
|
+
agent/cli.py,sha256=HZ9u3j2NU4lSBS-buP7xGZs_8dwiVLhSV8zJwMrf8bw,7821
|
3
3
|
agent/core.py,sha256=UILN_DjsSr91KN3YyQaD_cZgF9vW8m827-W0pZMTUnM,6561
|
4
4
|
agent/evening_review.py,sha256=Y4d-t62zfaufM8mnSvkhBBZ0wMw1R8jtj4cN8r30t4E,4929
|
5
5
|
agent/models.py,sha256=6bDSLXRxztF50J0AoTi5PX3ckf74oPhyQXfOccfVGdk,7937
|
6
6
|
agent/morning_brief.py,sha256=zcu4nUOnIQtoZTiK1XlEjuudiUAABrps3PvAwt2Avmk,4732
|
7
|
+
agent/plan_manager.py,sha256=x216QjRe9wd9tdBcqBdXX3idU77SqtYeUGN5nxZjrXQ,11832
|
7
8
|
agent/planner.py,sha256=-KlyZ-2jMQTUy0QVZCH_NuubENU-UrPXVhat3ju54ew,13114
|
8
9
|
agent/research.py,sha256=HvqGHENQ0v1lJadGYNuf3eb6fZoR6qzzIPzqcsnhFSE,6429
|
9
10
|
agent/tasks.py,sha256=PaQzRcnzp5HPWVlQKG3KLwdNBNqHTsqCuoGmRwRh8dA,9041
|
10
11
|
agent/weekly_review.py,sha256=ljwy0Aq6yFE_gs8TQjJKCO9Ob59fXsu8L_gDPiRQdmc,2298
|
11
|
-
bizy_ai-1.0.
|
12
|
+
bizy_ai-1.0.2.dist-info/licenses/LICENSE,sha256=__BSNgmbeWQ1IA57XKyGhQajUNcF-pZjvBAY268fCWM,1069
|
12
13
|
scripts/agent_cli.py,sha256=sG-iRmFZCzm5SkqDtVV1KzZ293SEtvFpY8A1_b69dJU,6971
|
13
14
|
scripts/init_db.py,sha256=lF1rJAuaeOX19dYQKURzePYWmjkjLPH_4L0D2OiRgQA,3376
|
14
|
-
bizy_ai-1.0.
|
15
|
-
bizy_ai-1.0.
|
16
|
-
bizy_ai-1.0.
|
17
|
-
bizy_ai-1.0.
|
18
|
-
bizy_ai-1.0.
|
15
|
+
bizy_ai-1.0.2.dist-info/METADATA,sha256=qlo6EBdzrXVemHs64kMvD_YKRs6WJG1hzGI4QfeTM8s,12480
|
16
|
+
bizy_ai-1.0.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
17
|
+
bizy_ai-1.0.2.dist-info/entry_points.txt,sha256=yDZc2xFUlCOPuHtAaNissB16AZFzOnOL8xeStkDujAg,39
|
18
|
+
bizy_ai-1.0.2.dist-info/top_level.txt,sha256=k5ce4bNe_tK9tse1lxY4b8nPSipbtgoA28GHmM2ojwk,14
|
19
|
+
bizy_ai-1.0.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|