@plures/runebook 0.4.0
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.
- package/ANALYSIS_LADDER.md +231 -0
- package/CHANGELOG.md +124 -0
- package/INTEGRATIONS.md +242 -0
- package/LICENSE +21 -0
- package/MEMORY.md +253 -0
- package/NIXOS.md +357 -0
- package/QUICKSTART.md +157 -0
- package/README.md +295 -0
- package/RELEASE.md +190 -0
- package/ValidationChecklist.md +598 -0
- package/docs/demo.md +338 -0
- package/docs/llm-integration.md +300 -0
- package/docs/parallel-execution-plan.md +160 -0
- package/flake.nix +228 -0
- package/integrations/README.md +242 -0
- package/integrations/demo-steps.sh +64 -0
- package/integrations/nvim-runebook.lua +140 -0
- package/integrations/tmux-status.sh +51 -0
- package/integrations/vim-runebook.vim +77 -0
- package/integrations/wezterm-status-simple.lua +48 -0
- package/integrations/wezterm-status.lua +76 -0
- package/nixos-module.nix +156 -0
- package/package.json +76 -0
- package/packages/design-dojo/index.js +4 -0
- package/packages/design-dojo/package.json +20 -0
- package/packages/design-dojo/tokens.css +69 -0
- package/playwright.config.ts +16 -0
- package/scripts/check-versions.cjs +62 -0
- package/scripts/demo.sh +220 -0
- package/shell.nix +31 -0
- package/src/app.html +13 -0
- package/src/cli/index.ts +1050 -0
- package/src/lib/agent/analysis-pipeline.ts +347 -0
- package/src/lib/agent/analysis-service.ts +171 -0
- package/src/lib/agent/analysis.ts +159 -0
- package/src/lib/agent/analyzers/heuristic.ts +289 -0
- package/src/lib/agent/analyzers/index.ts +7 -0
- package/src/lib/agent/analyzers/llm.ts +204 -0
- package/src/lib/agent/analyzers/local-search.ts +215 -0
- package/src/lib/agent/capture.ts +123 -0
- package/src/lib/agent/index.ts +244 -0
- package/src/lib/agent/integration.ts +81 -0
- package/src/lib/agent/llm/providers/base.ts +99 -0
- package/src/lib/agent/llm/providers/index.ts +60 -0
- package/src/lib/agent/llm/providers/mock.ts +67 -0
- package/src/lib/agent/llm/providers/ollama.ts +151 -0
- package/src/lib/agent/llm/providers/openai.ts +153 -0
- package/src/lib/agent/llm/sanitizer.ts +170 -0
- package/src/lib/agent/llm/types.ts +118 -0
- package/src/lib/agent/memory.ts +363 -0
- package/src/lib/agent/node-status.ts +56 -0
- package/src/lib/agent/node-suggestions.ts +64 -0
- package/src/lib/agent/status.ts +80 -0
- package/src/lib/agent/suggestions.ts +169 -0
- package/src/lib/components/Canvas.svelte +124 -0
- package/src/lib/components/ConnectionLine.svelte +46 -0
- package/src/lib/components/DisplayNode.svelte +167 -0
- package/src/lib/components/InputNode.svelte +158 -0
- package/src/lib/components/TerminalNode.svelte +237 -0
- package/src/lib/components/Toolbar.svelte +359 -0
- package/src/lib/components/TransformNode.svelte +327 -0
- package/src/lib/core/index.ts +31 -0
- package/src/lib/core/observer.ts +278 -0
- package/src/lib/core/redaction.ts +158 -0
- package/src/lib/core/shell-adapters/base.ts +325 -0
- package/src/lib/core/shell-adapters/bash.ts +110 -0
- package/src/lib/core/shell-adapters/index.ts +62 -0
- package/src/lib/core/shell-adapters/zsh.ts +105 -0
- package/src/lib/core/storage.ts +360 -0
- package/src/lib/core/types.ts +176 -0
- package/src/lib/design-dojo/Box.svelte +47 -0
- package/src/lib/design-dojo/Button.svelte +75 -0
- package/src/lib/design-dojo/Input.svelte +65 -0
- package/src/lib/design-dojo/List.svelte +38 -0
- package/src/lib/design-dojo/Select.svelte +48 -0
- package/src/lib/design-dojo/SplitPane.svelte +43 -0
- package/src/lib/design-dojo/StatusBar.svelte +61 -0
- package/src/lib/design-dojo/Table.svelte +47 -0
- package/src/lib/design-dojo/Text.svelte +36 -0
- package/src/lib/design-dojo/Toggle.svelte +48 -0
- package/src/lib/design-dojo/index.ts +10 -0
- package/src/lib/stores/canvas-praxis.ts +268 -0
- package/src/lib/stores/canvas.ts +58 -0
- package/src/lib/types/agent.ts +78 -0
- package/src/lib/types/canvas.ts +71 -0
- package/src/lib/utils/storage.ts +326 -0
- package/src/lib/utils/yaml-loader.ts +52 -0
- package/src/routes/+layout.svelte +5 -0
- package/src/routes/+layout.ts +5 -0
- package/src/routes/+page.svelte +32 -0
- package/src-tauri/Cargo.lock +5735 -0
- package/src-tauri/Cargo.toml +38 -0
- package/src-tauri/build.rs +3 -0
- package/src-tauri/capabilities/default.json +10 -0
- package/src-tauri/icons/128x128.png +0 -0
- package/src-tauri/icons/128x128@2x.png +0 -0
- package/src-tauri/icons/32x32.png +0 -0
- package/src-tauri/icons/Square107x107Logo.png +0 -0
- package/src-tauri/icons/Square142x142Logo.png +0 -0
- package/src-tauri/icons/Square150x150Logo.png +0 -0
- package/src-tauri/icons/Square284x284Logo.png +0 -0
- package/src-tauri/icons/Square30x30Logo.png +0 -0
- package/src-tauri/icons/Square310x310Logo.png +0 -0
- package/src-tauri/icons/Square44x44Logo.png +0 -0
- package/src-tauri/icons/Square71x71Logo.png +0 -0
- package/src-tauri/icons/Square89x89Logo.png +0 -0
- package/src-tauri/icons/StoreLogo.png +0 -0
- package/src-tauri/icons/icon.icns +0 -0
- package/src-tauri/icons/icon.ico +0 -0
- package/src-tauri/icons/icon.png +0 -0
- package/src-tauri/src/agents/agent1.rs +66 -0
- package/src-tauri/src/agents/agent2.rs +80 -0
- package/src-tauri/src/agents/agent3.rs +73 -0
- package/src-tauri/src/agents/agent4.rs +66 -0
- package/src-tauri/src/agents/agent5.rs +68 -0
- package/src-tauri/src/agents/agent6.rs +75 -0
- package/src-tauri/src/agents/base.rs +52 -0
- package/src-tauri/src/agents/mod.rs +17 -0
- package/src-tauri/src/core/coordination.rs +117 -0
- package/src-tauri/src/core/mod.rs +12 -0
- package/src-tauri/src/core/ownership.rs +61 -0
- package/src-tauri/src/core/types.rs +132 -0
- package/src-tauri/src/execution/mod.rs +5 -0
- package/src-tauri/src/execution/runner.rs +143 -0
- package/src-tauri/src/lib.rs +161 -0
- package/src-tauri/src/main.rs +6 -0
- package/src-tauri/src/memory/api.rs +422 -0
- package/src-tauri/src/memory/client.rs +156 -0
- package/src-tauri/src/memory/encryption.rs +79 -0
- package/src-tauri/src/memory/migration.rs +110 -0
- package/src-tauri/src/memory/mod.rs +28 -0
- package/src-tauri/src/memory/schema.rs +275 -0
- package/src-tauri/src/memory/tests.rs +192 -0
- package/src-tauri/src/orchestrator/coordinator.rs +232 -0
- package/src-tauri/src/orchestrator/mod.rs +13 -0
- package/src-tauri/src/orchestrator/planner.rs +304 -0
- package/src-tauri/tauri.conf.json +35 -0
- package/static/examples/date-time-example.yaml +147 -0
- package/static/examples/hello-world.yaml +74 -0
- package/static/examples/transform-example.yaml +157 -0
- package/static/favicon.png +0 -0
- package/static/svelte.svg +1 -0
- package/static/tauri.svg +6 -0
- package/static/vite.svg +1 -0
- package/svelte.config.js +18 -0
- package/tsconfig.json +19 -0
- package/vite.config.js +45 -0
- package/vitest.config.ts +21 -0
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
//! Parallel execution coordinator.
|
|
2
|
+
|
|
3
|
+
use crate::core::coordination::{ApiRegistry, CoordinationChannel, CoordinationHandle};
|
|
4
|
+
use crate::core::ownership::OwnershipManager;
|
|
5
|
+
use crate::core::types::*;
|
|
6
|
+
use std::collections::HashMap;
|
|
7
|
+
use tokio::sync::RwLock;
|
|
8
|
+
|
|
9
|
+
/// Coordinates parallel agent execution
|
|
10
|
+
pub struct ExecutionCoordinator {
|
|
11
|
+
plan: ExecutionPlan,
|
|
12
|
+
ownership: OwnershipManager,
|
|
13
|
+
api_registry: ApiRegistry,
|
|
14
|
+
agent_status: HashMap<AgentId, AgentStatus>,
|
|
15
|
+
coordination: CoordinationChannel,
|
|
16
|
+
coordination_handle: CoordinationHandle,
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
impl ExecutionCoordinator {
|
|
20
|
+
pub fn new(plan: ExecutionPlan) -> (Self, CoordinationHandle) {
|
|
21
|
+
let (coordination, coordination_handle) = CoordinationChannel::new();
|
|
22
|
+
|
|
23
|
+
// Initialize ownership manager
|
|
24
|
+
let mut ownership = OwnershipManager::new();
|
|
25
|
+
for file_ownership in &plan.file_ownership {
|
|
26
|
+
ownership.register(file_ownership.clone());
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Initialize agent status
|
|
30
|
+
let mut agent_status = HashMap::new();
|
|
31
|
+
agent_status.insert(AgentId::Orchestrator, AgentStatus::Running);
|
|
32
|
+
agent_status.insert(AgentId::Agent1, AgentStatus::Pending);
|
|
33
|
+
agent_status.insert(AgentId::Agent2, AgentStatus::Pending);
|
|
34
|
+
agent_status.insert(
|
|
35
|
+
AgentId::Agent3,
|
|
36
|
+
AgentStatus::WaitingForDependency(AgentId::Agent2),
|
|
37
|
+
);
|
|
38
|
+
agent_status.insert(
|
|
39
|
+
AgentId::Agent4,
|
|
40
|
+
AgentStatus::WaitingForDependency(AgentId::Agent3),
|
|
41
|
+
);
|
|
42
|
+
agent_status.insert(AgentId::Agent5, AgentStatus::Pending);
|
|
43
|
+
agent_status.insert(AgentId::Agent6, AgentStatus::Pending);
|
|
44
|
+
|
|
45
|
+
let coordinator = Self {
|
|
46
|
+
plan,
|
|
47
|
+
ownership,
|
|
48
|
+
api_registry: ApiRegistry::new(),
|
|
49
|
+
agent_status,
|
|
50
|
+
coordination,
|
|
51
|
+
coordination_handle: coordination_handle.clone(),
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
(coordinator, coordination_handle)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/// Process coordination messages and update agent status
|
|
58
|
+
pub async fn process_coordination(&mut self) -> Result<(), String> {
|
|
59
|
+
while let Some(message) = self.coordination.try_recv() {
|
|
60
|
+
match message {
|
|
61
|
+
CoordinationMessage::AgentReady(agent) => {
|
|
62
|
+
self.handle_agent_ready(agent).await?;
|
|
63
|
+
}
|
|
64
|
+
CoordinationMessage::ApiPublished(api) => {
|
|
65
|
+
self.handle_api_published(api).await?;
|
|
66
|
+
}
|
|
67
|
+
CoordinationMessage::TaskCompleted(agent, task_id) => {
|
|
68
|
+
self.handle_task_completed(agent, task_id).await?;
|
|
69
|
+
}
|
|
70
|
+
CoordinationMessage::CoordinationRequest {
|
|
71
|
+
requester,
|
|
72
|
+
target_agent,
|
|
73
|
+
target_module,
|
|
74
|
+
reason,
|
|
75
|
+
} => {
|
|
76
|
+
self.handle_coordination_request(
|
|
77
|
+
requester,
|
|
78
|
+
target_agent,
|
|
79
|
+
target_module,
|
|
80
|
+
reason,
|
|
81
|
+
)
|
|
82
|
+
.await?;
|
|
83
|
+
}
|
|
84
|
+
CoordinationMessage::StatusUpdate(agent, status) => {
|
|
85
|
+
self.agent_status.insert(agent, status);
|
|
86
|
+
}
|
|
87
|
+
CoordinationMessage::CoordinationResponse { .. } => {
|
|
88
|
+
// Handle response (for future async coordination)
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
Ok(())
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
async fn handle_agent_ready(&mut self, agent: AgentId) -> Result<(), String> {
|
|
96
|
+
// Check if agent can start based on dependencies
|
|
97
|
+
let can_start = self.can_agent_start(agent);
|
|
98
|
+
|
|
99
|
+
if can_start {
|
|
100
|
+
self.agent_status.insert(agent, AgentStatus::Running);
|
|
101
|
+
log::info!("Agent {:?} started", agent);
|
|
102
|
+
} else {
|
|
103
|
+
let dependency = self.get_blocking_dependency(agent);
|
|
104
|
+
self.agent_status
|
|
105
|
+
.insert(agent, AgentStatus::WaitingForDependency(dependency));
|
|
106
|
+
log::info!("Agent {:?} waiting for dependency {:?}", agent, dependency);
|
|
107
|
+
}
|
|
108
|
+
Ok(())
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
async fn handle_api_published(&mut self, api: ApiPublished) -> Result<(), String> {
|
|
112
|
+
self.api_registry.register(api.clone());
|
|
113
|
+
|
|
114
|
+
// Check if Agent 3 can start now (depends on Agent 2 APIs)
|
|
115
|
+
if api.agent == AgentId::Agent2 {
|
|
116
|
+
if let Some(status) = self.agent_status.get_mut(&AgentId::Agent3) {
|
|
117
|
+
if matches!(status, AgentStatus::WaitingForDependency(AgentId::Agent2)) {
|
|
118
|
+
*status = AgentStatus::Pending;
|
|
119
|
+
log::info!("Agent 3 can now start (Agent 2 API published)");
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
log::info!("API published: {} by {:?}", api.api_name, api.agent);
|
|
125
|
+
Ok(())
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
async fn handle_task_completed(
|
|
129
|
+
&mut self,
|
|
130
|
+
agent: AgentId,
|
|
131
|
+
task_id: String,
|
|
132
|
+
) -> Result<(), String> {
|
|
133
|
+
// Update task status in plan
|
|
134
|
+
if let Some(task) = self.plan.tasks.iter_mut().find(|t| t.id == task_id) {
|
|
135
|
+
task.status = TaskStatus::Completed;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// Check if Agent 4 can start (depends on Agent 3 writing suggestions)
|
|
139
|
+
if agent == AgentId::Agent3 && task_id == "agent3-2" {
|
|
140
|
+
if let Some(status) = self.agent_status.get_mut(&AgentId::Agent4) {
|
|
141
|
+
if matches!(status, AgentStatus::WaitingForDependency(AgentId::Agent3)) {
|
|
142
|
+
*status = AgentStatus::Pending;
|
|
143
|
+
log::info!("Agent 4 can now start (Agent 3 suggestions written)");
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
log::info!("Task completed: {} by {:?}", task_id, agent);
|
|
149
|
+
Ok(())
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
async fn handle_coordination_request(
|
|
153
|
+
&mut self,
|
|
154
|
+
requester: AgentId,
|
|
155
|
+
target_agent: AgentId,
|
|
156
|
+
target_module: String,
|
|
157
|
+
reason: String,
|
|
158
|
+
) -> Result<(), String> {
|
|
159
|
+
// Check ownership
|
|
160
|
+
if let Some(owner) = self.ownership.get_owner(&target_module) {
|
|
161
|
+
if owner == requester {
|
|
162
|
+
// Agent owns the module, no coordination needed
|
|
163
|
+
return Ok(());
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// Check if modification is allowed
|
|
167
|
+
if !self.ownership.can_modify(requester, &target_module) {
|
|
168
|
+
log::warn!(
|
|
169
|
+
"Coordination request denied: {:?} cannot modify {} (owned by {:?})",
|
|
170
|
+
requester,
|
|
171
|
+
target_module,
|
|
172
|
+
owner
|
|
173
|
+
);
|
|
174
|
+
return Err(format!(
|
|
175
|
+
"Agent {:?} does not own module {}",
|
|
176
|
+
owner, target_module
|
|
177
|
+
));
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
log::info!(
|
|
182
|
+
"Coordination request: {:?} wants to modify {} (owned by {:?}): {}",
|
|
183
|
+
requester,
|
|
184
|
+
target_module,
|
|
185
|
+
target_agent,
|
|
186
|
+
reason
|
|
187
|
+
);
|
|
188
|
+
// In a real implementation, this would notify the target agent
|
|
189
|
+
Ok(())
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
fn can_agent_start(&self, agent: AgentId) -> bool {
|
|
193
|
+
match agent {
|
|
194
|
+
AgentId::Orchestrator => true,
|
|
195
|
+
AgentId::Agent1 | AgentId::Agent2 | AgentId::Agent5 | AgentId::Agent6 => {
|
|
196
|
+
// These can start after orchestrator
|
|
197
|
+
self.agent_status
|
|
198
|
+
.get(&AgentId::Orchestrator)
|
|
199
|
+
.map(|s| matches!(s, AgentStatus::Running | AgentStatus::Completed))
|
|
200
|
+
.unwrap_or(false)
|
|
201
|
+
}
|
|
202
|
+
AgentId::Agent3 => {
|
|
203
|
+
// Agent 3 needs Agent 2 APIs
|
|
204
|
+
self.api_registry.get_agent_apis(AgentId::Agent2).len() > 0
|
|
205
|
+
}
|
|
206
|
+
AgentId::Agent4 => {
|
|
207
|
+
// Agent 4 needs Agent 3 to write suggestions
|
|
208
|
+
// Check if agent3-2 task is completed
|
|
209
|
+
self.plan
|
|
210
|
+
.tasks
|
|
211
|
+
.iter()
|
|
212
|
+
.any(|t| t.id == "agent3-2" && t.status == TaskStatus::Completed)
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
fn get_blocking_dependency(&self, agent: AgentId) -> AgentId {
|
|
218
|
+
match agent {
|
|
219
|
+
AgentId::Agent3 => AgentId::Agent2,
|
|
220
|
+
AgentId::Agent4 => AgentId::Agent3,
|
|
221
|
+
_ => AgentId::Orchestrator,
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
pub fn get_agent_status(&self, agent: AgentId) -> Option<&AgentStatus> {
|
|
226
|
+
self.agent_status.get(&agent)
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
pub fn get_plan(&self) -> &ExecutionPlan {
|
|
230
|
+
&self.plan
|
|
231
|
+
}
|
|
232
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//! Orchestrator for parallel agent execution.
|
|
2
|
+
//!
|
|
3
|
+
//! The orchestrator:
|
|
4
|
+
//! 1. Creates roadmap and task breakdown
|
|
5
|
+
//! 2. Stubs interfaces
|
|
6
|
+
//! 3. Assigns file ownership boundaries
|
|
7
|
+
//! 4. Coordinates agent execution
|
|
8
|
+
|
|
9
|
+
pub mod coordinator;
|
|
10
|
+
pub mod planner;
|
|
11
|
+
|
|
12
|
+
pub use coordinator::*;
|
|
13
|
+
pub use planner::*;
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
//! Execution plan creation and task breakdown.
|
|
2
|
+
|
|
3
|
+
use crate::core::types::*;
|
|
4
|
+
|
|
5
|
+
/// Creates the execution plan with roadmap, tasks, interfaces, and ownership
|
|
6
|
+
pub fn create_execution_plan() -> ExecutionPlan {
|
|
7
|
+
let roadmap = create_roadmap();
|
|
8
|
+
let tasks = create_task_breakdown();
|
|
9
|
+
let interfaces = create_interface_stubs();
|
|
10
|
+
let file_ownership = create_file_ownership();
|
|
11
|
+
|
|
12
|
+
ExecutionPlan {
|
|
13
|
+
roadmap,
|
|
14
|
+
tasks,
|
|
15
|
+
interfaces,
|
|
16
|
+
file_ownership,
|
|
17
|
+
created_at: chrono::Utc::now(),
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
fn create_roadmap() -> Vec<RoadmapItem> {
|
|
22
|
+
vec![
|
|
23
|
+
RoadmapItem {
|
|
24
|
+
phase: "phase-1-orchestration".to_string(),
|
|
25
|
+
description:
|
|
26
|
+
"Orchestrator creates roadmap, task breakdown, stubs interfaces, assigns ownership"
|
|
27
|
+
.to_string(),
|
|
28
|
+
agents: vec![AgentId::Orchestrator],
|
|
29
|
+
dependencies: vec![],
|
|
30
|
+
},
|
|
31
|
+
RoadmapItem {
|
|
32
|
+
phase: "phase-2-parallel-agents".to_string(),
|
|
33
|
+
description: "Agent 1 (event capture) and Agent 2 (storage APIs) run in parallel"
|
|
34
|
+
.to_string(),
|
|
35
|
+
agents: vec![AgentId::Agent1, AgentId::Agent2],
|
|
36
|
+
dependencies: vec!["phase-1-orchestration".to_string()],
|
|
37
|
+
},
|
|
38
|
+
RoadmapItem {
|
|
39
|
+
phase: "phase-3-analysis".to_string(),
|
|
40
|
+
description: "Agent 3 (analysis pipeline) starts after Agent 2 publishes APIs"
|
|
41
|
+
.to_string(),
|
|
42
|
+
agents: vec![AgentId::Agent3],
|
|
43
|
+
dependencies: vec!["phase-2-parallel-agents".to_string()],
|
|
44
|
+
},
|
|
45
|
+
RoadmapItem {
|
|
46
|
+
phase: "phase-4-surfaces".to_string(),
|
|
47
|
+
description: "Agent 4 (surfaces) starts after Agent 3 writes suggestions to store"
|
|
48
|
+
.to_string(),
|
|
49
|
+
agents: vec![AgentId::Agent4],
|
|
50
|
+
dependencies: vec!["phase-3-analysis".to_string()],
|
|
51
|
+
},
|
|
52
|
+
RoadmapItem {
|
|
53
|
+
phase: "phase-5-continuous".to_string(),
|
|
54
|
+
description: "Agent 5 (nix + CI) and Agent 6 (finalization) run continuously"
|
|
55
|
+
.to_string(),
|
|
56
|
+
agents: vec![AgentId::Agent5, AgentId::Agent6],
|
|
57
|
+
dependencies: vec!["phase-1-orchestration".to_string()],
|
|
58
|
+
},
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
fn create_task_breakdown() -> Vec<Task> {
|
|
63
|
+
vec![
|
|
64
|
+
// Orchestrator tasks
|
|
65
|
+
Task {
|
|
66
|
+
id: "orch-1".to_string(),
|
|
67
|
+
description: "Create roadmap and task breakdown".to_string(),
|
|
68
|
+
owner: AgentId::Orchestrator,
|
|
69
|
+
dependencies: vec![],
|
|
70
|
+
status: TaskStatus::NotStarted,
|
|
71
|
+
},
|
|
72
|
+
Task {
|
|
73
|
+
id: "orch-2".to_string(),
|
|
74
|
+
description: "Stub all interfaces".to_string(),
|
|
75
|
+
owner: AgentId::Orchestrator,
|
|
76
|
+
dependencies: vec![],
|
|
77
|
+
status: TaskStatus::NotStarted,
|
|
78
|
+
},
|
|
79
|
+
Task {
|
|
80
|
+
id: "orch-3".to_string(),
|
|
81
|
+
description: "Assign file ownership boundaries".to_string(),
|
|
82
|
+
owner: AgentId::Orchestrator,
|
|
83
|
+
dependencies: vec![],
|
|
84
|
+
status: TaskStatus::NotStarted,
|
|
85
|
+
},
|
|
86
|
+
// Agent 1 tasks
|
|
87
|
+
Task {
|
|
88
|
+
id: "agent1-1".to_string(),
|
|
89
|
+
description: "Implement event capture system".to_string(),
|
|
90
|
+
owner: AgentId::Agent1,
|
|
91
|
+
dependencies: vec![AgentId::Orchestrator],
|
|
92
|
+
status: TaskStatus::NotStarted,
|
|
93
|
+
},
|
|
94
|
+
// Agent 2 tasks
|
|
95
|
+
Task {
|
|
96
|
+
id: "agent2-1".to_string(),
|
|
97
|
+
description: "Implement storage APIs".to_string(),
|
|
98
|
+
owner: AgentId::Agent2,
|
|
99
|
+
dependencies: vec![AgentId::Orchestrator],
|
|
100
|
+
status: TaskStatus::NotStarted,
|
|
101
|
+
},
|
|
102
|
+
Task {
|
|
103
|
+
id: "agent2-2".to_string(),
|
|
104
|
+
description: "Publish storage API interface".to_string(),
|
|
105
|
+
owner: AgentId::Agent2,
|
|
106
|
+
dependencies: vec![AgentId::Agent2], // Depends on agent2-1
|
|
107
|
+
status: TaskStatus::NotStarted,
|
|
108
|
+
},
|
|
109
|
+
// Agent 3 tasks
|
|
110
|
+
Task {
|
|
111
|
+
id: "agent3-1".to_string(),
|
|
112
|
+
description: "Implement analysis pipeline".to_string(),
|
|
113
|
+
owner: AgentId::Agent3,
|
|
114
|
+
dependencies: vec![AgentId::Agent2], // Waits for Agent 2 APIs
|
|
115
|
+
status: TaskStatus::NotStarted,
|
|
116
|
+
},
|
|
117
|
+
Task {
|
|
118
|
+
id: "agent3-2".to_string(),
|
|
119
|
+
description: "Write suggestions to store".to_string(),
|
|
120
|
+
owner: AgentId::Agent3,
|
|
121
|
+
dependencies: vec![AgentId::Agent3], // Depends on agent3-1
|
|
122
|
+
status: TaskStatus::NotStarted,
|
|
123
|
+
},
|
|
124
|
+
// Agent 4 tasks
|
|
125
|
+
Task {
|
|
126
|
+
id: "agent4-1".to_string(),
|
|
127
|
+
description: "Implement suggestion surfaces".to_string(),
|
|
128
|
+
owner: AgentId::Agent4,
|
|
129
|
+
dependencies: vec![AgentId::Agent3], // Waits for Agent 3 suggestions
|
|
130
|
+
status: TaskStatus::NotStarted,
|
|
131
|
+
},
|
|
132
|
+
// Agent 5 tasks (continuous)
|
|
133
|
+
Task {
|
|
134
|
+
id: "agent5-1".to_string(),
|
|
135
|
+
description: "Set up Nix scaffolding".to_string(),
|
|
136
|
+
owner: AgentId::Agent5,
|
|
137
|
+
dependencies: vec![AgentId::Orchestrator],
|
|
138
|
+
status: TaskStatus::NotStarted,
|
|
139
|
+
},
|
|
140
|
+
Task {
|
|
141
|
+
id: "agent5-2".to_string(),
|
|
142
|
+
description: "Set up CI scaffolding".to_string(),
|
|
143
|
+
owner: AgentId::Agent5,
|
|
144
|
+
dependencies: vec![AgentId::Orchestrator],
|
|
145
|
+
status: TaskStatus::NotStarted,
|
|
146
|
+
},
|
|
147
|
+
// Agent 6 tasks (continuous, finalizes at end)
|
|
148
|
+
Task {
|
|
149
|
+
id: "agent6-1".to_string(),
|
|
150
|
+
description: "Finalize integration and testing".to_string(),
|
|
151
|
+
owner: AgentId::Agent6,
|
|
152
|
+
dependencies: vec![AgentId::Orchestrator],
|
|
153
|
+
status: TaskStatus::NotStarted,
|
|
154
|
+
},
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
fn create_interface_stubs() -> Vec<InterfaceStub> {
|
|
159
|
+
vec![
|
|
160
|
+
// Agent 1 interfaces
|
|
161
|
+
InterfaceStub {
|
|
162
|
+
name: "EventCapture".to_string(),
|
|
163
|
+
module_path: "src/lib/agent/capture.ts".to_string(),
|
|
164
|
+
owner: AgentId::Agent1,
|
|
165
|
+
signature: "captureCommandStart(command: string, args: string[], cwd: string): Promise<void>".to_string(),
|
|
166
|
+
description: "Capture command start event".to_string(),
|
|
167
|
+
},
|
|
168
|
+
InterfaceStub {
|
|
169
|
+
name: "EventCapture".to_string(),
|
|
170
|
+
module_path: "src/lib/agent/capture.ts".to_string(),
|
|
171
|
+
owner: AgentId::Agent1,
|
|
172
|
+
signature: "captureCommandResult(commandId: string, result: CommandResult): Promise<void>".to_string(),
|
|
173
|
+
description: "Capture command result event".to_string(),
|
|
174
|
+
},
|
|
175
|
+
// Agent 2 interfaces
|
|
176
|
+
InterfaceStub {
|
|
177
|
+
name: "StorageApi".to_string(),
|
|
178
|
+
module_path: "src-tauri/src/memory/api.rs".to_string(),
|
|
179
|
+
owner: AgentId::Agent2,
|
|
180
|
+
signature: "async fn append_event(event: MemoryEvent) -> Result<()>".to_string(),
|
|
181
|
+
description: "Append event to storage".to_string(),
|
|
182
|
+
},
|
|
183
|
+
InterfaceStub {
|
|
184
|
+
name: "StorageApi".to_string(),
|
|
185
|
+
module_path: "src-tauri/src/memory/api.rs".to_string(),
|
|
186
|
+
owner: AgentId::Agent2,
|
|
187
|
+
signature: "async fn list_sessions() -> Result<Vec<Session>>".to_string(),
|
|
188
|
+
description: "List all sessions".to_string(),
|
|
189
|
+
},
|
|
190
|
+
InterfaceStub {
|
|
191
|
+
name: "StorageApi".to_string(),
|
|
192
|
+
module_path: "src-tauri/src/memory/api.rs".to_string(),
|
|
193
|
+
owner: AgentId::Agent2,
|
|
194
|
+
signature: "async fn persist_suggestion(suggestion: Suggestion) -> Result<()>".to_string(),
|
|
195
|
+
description: "Persist suggestion to store".to_string(),
|
|
196
|
+
},
|
|
197
|
+
// Agent 3 interfaces
|
|
198
|
+
InterfaceStub {
|
|
199
|
+
name: "AnalysisPipeline".to_string(),
|
|
200
|
+
module_path: "src/lib/agent/analysis-pipeline.ts".to_string(),
|
|
201
|
+
owner: AgentId::Agent3,
|
|
202
|
+
signature: "enqueueFailure(commandId: string, events: TerminalObserverEvent[]): Promise<string | null>".to_string(),
|
|
203
|
+
description: "Enqueue command failure for analysis".to_string(),
|
|
204
|
+
},
|
|
205
|
+
// Agent 4 interfaces
|
|
206
|
+
InterfaceStub {
|
|
207
|
+
name: "SuggestionSurface".to_string(),
|
|
208
|
+
module_path: "src/lib/agent/surfaces.ts".to_string(),
|
|
209
|
+
owner: AgentId::Agent4,
|
|
210
|
+
signature: "displaySuggestion(suggestion: Suggestion): void".to_string(),
|
|
211
|
+
description: "Display suggestion on surface".to_string(),
|
|
212
|
+
},
|
|
213
|
+
]
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
fn create_file_ownership() -> Vec<FileOwnership> {
|
|
217
|
+
vec![
|
|
218
|
+
// Core/shared types
|
|
219
|
+
FileOwnership {
|
|
220
|
+
path: "src-tauri/src/core".to_string(),
|
|
221
|
+
owner: AgentId::Orchestrator,
|
|
222
|
+
description: "Shared types and coordination mechanisms".to_string(),
|
|
223
|
+
shared: true,
|
|
224
|
+
},
|
|
225
|
+
// Agent 1 ownership
|
|
226
|
+
FileOwnership {
|
|
227
|
+
path: "src/lib/agent/capture.ts".to_string(),
|
|
228
|
+
owner: AgentId::Agent1,
|
|
229
|
+
description: "Event capture implementation".to_string(),
|
|
230
|
+
shared: false,
|
|
231
|
+
},
|
|
232
|
+
FileOwnership {
|
|
233
|
+
path: "src/lib/core/observer.ts".to_string(),
|
|
234
|
+
owner: AgentId::Agent1,
|
|
235
|
+
description: "Terminal observer core".to_string(),
|
|
236
|
+
shared: false,
|
|
237
|
+
},
|
|
238
|
+
// Agent 2 ownership
|
|
239
|
+
FileOwnership {
|
|
240
|
+
path: "src-tauri/src/memory".to_string(),
|
|
241
|
+
owner: AgentId::Agent2,
|
|
242
|
+
description: "Storage APIs and memory schema".to_string(),
|
|
243
|
+
shared: false,
|
|
244
|
+
},
|
|
245
|
+
// Agent 3 ownership
|
|
246
|
+
FileOwnership {
|
|
247
|
+
path: "src/lib/agent/analysis-pipeline.ts".to_string(),
|
|
248
|
+
owner: AgentId::Agent3,
|
|
249
|
+
description: "Analysis pipeline implementation".to_string(),
|
|
250
|
+
shared: false,
|
|
251
|
+
},
|
|
252
|
+
FileOwnership {
|
|
253
|
+
path: "src/lib/agent/analysis-service.ts".to_string(),
|
|
254
|
+
owner: AgentId::Agent3,
|
|
255
|
+
description: "Analysis service".to_string(),
|
|
256
|
+
shared: false,
|
|
257
|
+
},
|
|
258
|
+
FileOwnership {
|
|
259
|
+
path: "src/lib/agent/analyzers".to_string(),
|
|
260
|
+
owner: AgentId::Agent3,
|
|
261
|
+
description: "Analysis analyzers".to_string(),
|
|
262
|
+
shared: false,
|
|
263
|
+
},
|
|
264
|
+
// Agent 4 ownership
|
|
265
|
+
FileOwnership {
|
|
266
|
+
path: "src/lib/agent/surfaces.ts".to_string(),
|
|
267
|
+
owner: AgentId::Agent4,
|
|
268
|
+
description: "Suggestion surfaces implementation".to_string(),
|
|
269
|
+
shared: false,
|
|
270
|
+
},
|
|
271
|
+
FileOwnership {
|
|
272
|
+
path: "integrations".to_string(),
|
|
273
|
+
owner: AgentId::Agent4,
|
|
274
|
+
description: "Integration surfaces (tmux, wezterm, vim, etc.)".to_string(),
|
|
275
|
+
shared: false,
|
|
276
|
+
},
|
|
277
|
+
// Agent 5 ownership
|
|
278
|
+
FileOwnership {
|
|
279
|
+
path: "flake.nix".to_string(),
|
|
280
|
+
owner: AgentId::Agent5,
|
|
281
|
+
description: "Nix flake configuration".to_string(),
|
|
282
|
+
shared: false,
|
|
283
|
+
},
|
|
284
|
+
FileOwnership {
|
|
285
|
+
path: "shell.nix".to_string(),
|
|
286
|
+
owner: AgentId::Agent5,
|
|
287
|
+
description: "Nix shell environment".to_string(),
|
|
288
|
+
shared: false,
|
|
289
|
+
},
|
|
290
|
+
FileOwnership {
|
|
291
|
+
path: ".github/workflows".to_string(),
|
|
292
|
+
owner: AgentId::Agent5,
|
|
293
|
+
description: "CI/CD workflows".to_string(),
|
|
294
|
+
shared: false,
|
|
295
|
+
},
|
|
296
|
+
// Agent 6 ownership
|
|
297
|
+
FileOwnership {
|
|
298
|
+
path: "ValidationChecklist.md".to_string(),
|
|
299
|
+
owner: AgentId::Agent6,
|
|
300
|
+
description: "Validation checklist updates".to_string(),
|
|
301
|
+
shared: false,
|
|
302
|
+
},
|
|
303
|
+
]
|
|
304
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://schema.tauri.app/config/2",
|
|
3
|
+
"productName": "RuneBook",
|
|
4
|
+
"version": "0.3.0",
|
|
5
|
+
"identifier": "com.runebook.app",
|
|
6
|
+
"build": {
|
|
7
|
+
"beforeDevCommand": "npm run dev",
|
|
8
|
+
"devUrl": "http://localhost:1420",
|
|
9
|
+
"beforeBuildCommand": "npm run build",
|
|
10
|
+
"frontendDist": "../build"
|
|
11
|
+
},
|
|
12
|
+
"app": {
|
|
13
|
+
"windows": [
|
|
14
|
+
{
|
|
15
|
+
"title": "RuneBook",
|
|
16
|
+
"width": 800,
|
|
17
|
+
"height": 600
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"security": {
|
|
21
|
+
"csp": null
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"bundle": {
|
|
25
|
+
"active": true,
|
|
26
|
+
"targets": "all",
|
|
27
|
+
"icon": [
|
|
28
|
+
"icons/32x32.png",
|
|
29
|
+
"icons/128x128.png",
|
|
30
|
+
"icons/128x128@2x.png",
|
|
31
|
+
"icons/icon.icns",
|
|
32
|
+
"icons/icon.ico"
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
}
|