-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_backcast.py
More file actions
executable file
·159 lines (148 loc) · 5.35 KB
/
setup_backcast.py
File metadata and controls
executable file
·159 lines (148 loc) · 5.35 KB
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
#!/usr/bin/env python3
"""
Setup Backcasting plan for Context Continuity Engine project
"""
import sys
sys.path.insert(0, '/home/panda/Documents/PythonScripts/OutcomeBackcasting')
from backcast_engine import (
BackcastEngine, Outcome, Step, BackcastPlan,
StepType, StepStatus, Priority
)
def main():
engine = BackcastEngine()
# Define the outcome
print("Creating backcast for Context Continuity Engine...")
outcome = Outcome(
title="Context Continuity Engine - Fully Functional",
description="Complete privacy-aware activity tracking system with semantic search, "
"temporal graphs, context prediction, and cross-device sync",
success_criteria=[
"Activity monitoring daemon running on system startup",
"Vector embeddings for semantic context search",
"Temporal graph tracking activity relationships",
"Privacy controls blocking sensitive data",
"Context prediction surfacing relevant info",
"API server for cross-device sync",
"CLI interface for queries and management"
],
constraints=[
"Privacy-first: local-only data storage",
"OpenSUSE Linux compatibility required",
"Minimal system resource usage",
"No external API dependencies for core features"
],
timeline="1 week"
)
# Create plan
plan = BackcastPlan(outcome=outcome, steps=[])
# Define steps
steps_data = [
{
"id": 1,
"title": "Project Setup",
"description": "Set up project structure, venv, requirements.txt, config files",
"status": StepStatus.COMPLETED,
"priority": Priority.CRITICAL,
"dependencies": []
},
{
"id": 2,
"title": "Database Layer",
"description": "SQLite schema for activities, contexts, files, applications with full CRUD",
"status": StepStatus.COMPLETED,
"priority": Priority.CRITICAL,
"dependencies": []
},
{
"id": 3,
"title": "Vector Embeddings Store",
"description": "ChromaDB + SentenceTransformers for semantic similarity search",
"status": StepStatus.IN_PROGRESS,
"priority": Priority.HIGH,
"dependencies": []
},
{
"id": 4,
"title": "Temporal Knowledge Graph",
"description": "NetworkX graph with temporal relationships, decay, and predictions",
"status": StepStatus.IN_PROGRESS,
"priority": Priority.HIGH,
"dependencies": []
},
{
"id": 5,
"title": "Privacy System",
"description": "Blacklist apps/URLs/dirs, content filtering, privacy controls",
"status": StepStatus.NOT_STARTED,
"priority": Priority.CRITICAL,
"dependencies": []
},
{
"id": 6,
"title": "Activity Monitor Daemon",
"description": "X11 window tracking, file monitoring, app usage daemon",
"status": StepStatus.NOT_STARTED,
"priority": Priority.CRITICAL,
"dependencies": [5]
},
{
"id": 7,
"title": "Context Prediction Engine",
"description": "ML-based engine for predicting and surfacing relevant context",
"status": StepStatus.NOT_STARTED,
"priority": Priority.HIGH,
"dependencies": [3, 4]
},
{
"id": 8,
"title": "API Server",
"description": "FastAPI server for cross-device sync and external access",
"status": StepStatus.NOT_STARTED,
"priority": Priority.MEDIUM,
"dependencies": [2]
},
{
"id": 9,
"title": "CLI Interface",
"description": "Rich CLI for queries, stats, config management",
"status": StepStatus.NOT_STARTED,
"priority": Priority.HIGH,
"dependencies": []
},
{
"id": 10,
"title": "Git Repository & Docs",
"description": "Initialize git, create README, write documentation",
"status": StepStatus.NOT_STARTED,
"priority": Priority.LOW,
"dependencies": []
}
]
# Create Step objects
for step_data in steps_data:
step = Step(
id=step_data["id"],
title=step_data["title"],
description=step_data["description"],
type=StepType.ACTION,
priority=step_data["priority"],
status=step_data["status"],
estimated_duration="1-2 days",
resources_needed=[],
dependencies=step_data["dependencies"],
success_criteria=[],
risks=[]
)
plan.steps.append(step)
print(f" ✓ Added: {step.title} [{step.status.value}]")
# Save the plan
filename = "context_continuity_engine.json"
filepath = engine.save_plan(plan, filename)
print(f"\n✅ Backcast plan created successfully!")
print(f" Outcome: {outcome.title}")
print(f" Steps: {len(plan.steps)}")
print(f" Timeline: {outcome.timeline}")
print(f" Saved to: {filepath}")
return filepath
if __name__ == '__main__':
filepath = main()