sensorium-mcp 2.16.121 → 2.16.122
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/package.json
CHANGED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Delegate and Wait
|
|
3
|
+
triggers:
|
|
4
|
+
- delegate to thread
|
|
5
|
+
- delegate and wait
|
|
6
|
+
- orchestrator worker
|
|
7
|
+
- spawn thread and wait
|
|
8
|
+
- use multi-thread
|
|
9
|
+
replaces_orchestrator: true
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Delegate and Wait — Orchestrator-Worker Pattern
|
|
13
|
+
|
|
14
|
+
### Overview
|
|
15
|
+
This skill describes the **orchestrator-worker** pattern: you spawn a ghost thread, send it a task, and **wait** for the result. The orchestrator does NOT do the work — it delegates, waits, and processes the response.
|
|
16
|
+
|
|
17
|
+
### When to Use
|
|
18
|
+
- Code reviews (you need the findings to act on)
|
|
19
|
+
- Any task where the output determines your next action
|
|
20
|
+
- Work that requires specialist domain context (dashboard, testing, refactoring)
|
|
21
|
+
- Tasks with acceptance criteria you need to verify
|
|
22
|
+
|
|
23
|
+
### Core Pattern
|
|
24
|
+
|
|
25
|
+
#### Step 1 — Spawn the worker thread
|
|
26
|
+
```
|
|
27
|
+
start_thread(
|
|
28
|
+
name: "Dashboard Worker",
|
|
29
|
+
task: "You are a dashboard specialist. You build and maintain the Vue dashboard.",
|
|
30
|
+
memorySourceThreadId: <ORCHESTRATOR_THREAD_ID> // share memory context
|
|
31
|
+
)
|
|
32
|
+
→ returns { threadId: <WORKER_THREAD_ID> }
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
#### Step 2 — Send a detailed task with EXPLICIT report-back instruction
|
|
36
|
+
```
|
|
37
|
+
send_message_to_thread(
|
|
38
|
+
threadId: <WORKER_THREAD_ID>,
|
|
39
|
+
message: "Task: Rewrite the dashboard settings page using React.
|
|
40
|
+
Acceptance criteria:
|
|
41
|
+
- Settings load from /api/settings
|
|
42
|
+
- Form validates input
|
|
43
|
+
- Save button persists changes
|
|
44
|
+
|
|
45
|
+
⚠️ IMPORTANT: When complete, report your results back to thread <ORCHESTRATOR_THREAD_ID> using:
|
|
46
|
+
send_message_to_thread(threadId=<ORCHESTRATOR_THREAD_ID>, message='...')"
|
|
47
|
+
)
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**CRITICAL**: The task message MUST include the orchestrator's thread ID so the worker knows where to send results.
|
|
51
|
+
|
|
52
|
+
#### Step 3 — Wait for results (do NOT duplicate the work)
|
|
53
|
+
```
|
|
54
|
+
remote_copilot_wait_for_instructions(threadId: <ORCHESTRATOR_THREAD_ID>)
|
|
55
|
+
```
|
|
56
|
+
The orchestrator parks here. It does NOT start doing the work itself. The worker will execute the task and send results back via `send_message_to_thread`.
|
|
57
|
+
|
|
58
|
+
#### Step 4 — Process results when they arrive
|
|
59
|
+
Results arrive as a message in `wait_for_instructions`. Review, approve, or request changes by sending another message to the worker.
|
|
60
|
+
|
|
61
|
+
### Rules
|
|
62
|
+
|
|
63
|
+
- **NEVER** duplicate work after delegating. If you sent it to a worker, wait for the response.
|
|
64
|
+
- **ALWAYS** include the orchestrator thread ID in the task message so the worker can report back.
|
|
65
|
+
- **ALWAYS** include clear acceptance criteria in the task message.
|
|
66
|
+
- **ALWAYS** use `wait_for_instructions` after sending the task — this is what makes you an orchestrator, not a doer.
|
|
67
|
+
- Worker threads build domain-specific memory over time — reuse the same thread for the same domain.
|
|
68
|
+
- The orchestrator stays clean for high-level decisions and operator interaction.
|
|
69
|
+
|
|
70
|
+
### Anti-Patterns
|
|
71
|
+
|
|
72
|
+
- ❌ Sending a task then immediately doing the work yourself
|
|
73
|
+
- ❌ Creating a worker thread AND running a subagent for the same task
|
|
74
|
+
- ❌ Forgetting to include the orchestrator thread ID in the task message
|
|
75
|
+
- ❌ Sending tasks without acceptance criteria
|
|
76
|
+
- ❌ Creating a new thread for every task instead of reusing domain threads
|
|
77
|
+
- ❌ Reading worker results and re-doing the work instead of applying them
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Fire and Forget
|
|
3
|
+
triggers:
|
|
4
|
+
- fire and forget
|
|
5
|
+
- background task
|
|
6
|
+
- spawn autonomous thread
|
|
7
|
+
- thread delegation no wait
|
|
8
|
+
replaces_orchestrator: true
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Fire and Forget — Autonomous Worker Pattern
|
|
12
|
+
|
|
13
|
+
### Overview
|
|
14
|
+
This skill describes the **fire-and-forget** pattern: you spawn a ghost thread, send it a task, and **continue working immediately**. The worker executes autonomously and reports progress directly to the **operator** (not back to you).
|
|
15
|
+
|
|
16
|
+
### When to Use
|
|
17
|
+
- Background cleanup tasks (log rotation, stale file removal)
|
|
18
|
+
- Scheduled improvements that don't affect current work
|
|
19
|
+
- Logging, monitoring, metrics collection
|
|
20
|
+
- Any task where the result does NOT gate your next step
|
|
21
|
+
- Long-running tasks you don't need to wait on
|
|
22
|
+
|
|
23
|
+
### When NOT to Use
|
|
24
|
+
- Code reviews (you need the findings)
|
|
25
|
+
- Any task where the output determines your next action
|
|
26
|
+
- Tasks that modify files you're also editing (conflict risk)
|
|
27
|
+
- Work with acceptance criteria you need to verify → use **Delegate and Wait** instead
|
|
28
|
+
|
|
29
|
+
### Core Pattern
|
|
30
|
+
|
|
31
|
+
#### Step 1 — Spawn the worker thread
|
|
32
|
+
```
|
|
33
|
+
start_thread(
|
|
34
|
+
name: "Background Cleanup",
|
|
35
|
+
task: "You handle background maintenance tasks autonomously."
|
|
36
|
+
)
|
|
37
|
+
→ returns { threadId: <WORKER_THREAD_ID> }
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
#### Step 2 — Send the task (NO report-back needed)
|
|
41
|
+
```
|
|
42
|
+
send_message_to_thread(
|
|
43
|
+
threadId: <WORKER_THREAD_ID>,
|
|
44
|
+
message: "Task: Clean up stale log files older than 30 days in ~/.remote-copilot-mcp/logs/.
|
|
45
|
+
This is a one-shot task. Report progress to the operator via report_progress or send_voice.
|
|
46
|
+
Do NOT message the sender back."
|
|
47
|
+
)
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**KEY**: The task explicitly tells the worker NOT to send results back to the orchestrator. The worker reports to the **operator** directly using `report_progress` or `send_voice`.
|
|
51
|
+
|
|
52
|
+
#### Step 3 — Continue working immediately
|
|
53
|
+
Do NOT call `wait_for_instructions` for this worker. Continue with your own work. The worker runs independently.
|
|
54
|
+
|
|
55
|
+
### Worker Behavior
|
|
56
|
+
The autonomous worker should:
|
|
57
|
+
- Execute the task independently
|
|
58
|
+
- Report progress to the **operator** via `report_progress` or `send_voice`
|
|
59
|
+
- NOT send messages back to the orchestrator thread
|
|
60
|
+
- Handle errors gracefully and notify the operator if something fails
|
|
61
|
+
|
|
62
|
+
### Rules
|
|
63
|
+
|
|
64
|
+
- **NEVER** call `wait_for_instructions` after a fire-and-forget delegation.
|
|
65
|
+
- **ALWAYS** tell the worker to report to the operator, not back to the orchestrator.
|
|
66
|
+
- **ALWAYS** include explicit instructions like "Do NOT message the sender back."
|
|
67
|
+
- Use this pattern only when the result doesn't affect your immediate work.
|
|
68
|
+
- If you later realize you need the result, spawn a new **Delegate and Wait** task instead.
|
|
69
|
+
|
|
70
|
+
### Anti-Patterns
|
|
71
|
+
|
|
72
|
+
- ❌ Waiting on a fire-and-forget worker (defeats the purpose)
|
|
73
|
+
- ❌ Worker sending results back to the orchestrator instead of the operator
|
|
74
|
+
- ❌ Using fire-and-forget for tasks that gate your next step
|
|
75
|
+
- ❌ Spawning fire-and-forget workers that modify files you're actively editing
|
|
76
|
+
- ❌ Forgetting to tell the worker how to report progress (operator gets no visibility)
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Multi-Thread Delegation
|
|
3
|
-
triggers:
|
|
4
|
-
- delegate to thread
|
|
5
|
-
- use multi-thread
|
|
6
|
-
- thread delegation
|
|
7
|
-
- spawn thread
|
|
8
|
-
replaces_orchestrator: true
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Multi-Thread Agent Orchestration
|
|
12
|
-
|
|
13
|
-
### Overview
|
|
14
|
-
This skill describes how to use sensorium-mcp's inter-thread messaging for orchestrating work across multiple persistent threads. Each thread represents a specialist worker with its own memory context.
|
|
15
|
-
|
|
16
|
-
### Thread Topology
|
|
17
|
-
- **Manager Thread** (main): Design decisions, operator interaction, constraints, routing
|
|
18
|
-
- **Worker Threads** (persistent): Specialized domains — dashboard, code-review, testing, refactoring, etc.
|
|
19
|
-
|
|
20
|
-
### Core Pattern: Delegate and Wait
|
|
21
|
-
|
|
22
|
-
When you have work that should be delegated to a worker thread:
|
|
23
|
-
|
|
24
|
-
1. **Create or identify the worker thread**
|
|
25
|
-
```
|
|
26
|
-
start_thread(name: "Dashboard Worker")
|
|
27
|
-
→ returns { threadId: <WORKER_THREAD_ID> }
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
2. **Send a detailed task with clear acceptance criteria**
|
|
31
|
-
```
|
|
32
|
-
send_message_to_thread(
|
|
33
|
-
threadId: <WORKER_THREAD_ID>,
|
|
34
|
-
message: "Task: Rewrite the dashboard settings page using React.
|
|
35
|
-
Acceptance criteria:
|
|
36
|
-
- Settings load from /api/settings
|
|
37
|
-
- Form validates input
|
|
38
|
-
- Save button persists changes
|
|
39
|
-
When complete, send results back to thread <MANAGER_THREAD_ID>."
|
|
40
|
-
)
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
3. **Wait for results — do NOT duplicate the work**
|
|
44
|
-
```
|
|
45
|
-
remote_copilot_wait_for_instructions(threadId: <MANAGER_THREAD_ID>)
|
|
46
|
-
```
|
|
47
|
-
The worker will execute the task and send results back via send_message_to_thread.
|
|
48
|
-
|
|
49
|
-
4. **Process results when they arrive**
|
|
50
|
-
Results arrive as an operator message in wait_for_instructions. Review, approve, or request changes.
|
|
51
|
-
|
|
52
|
-
### Pattern 2: Fire and Forget
|
|
53
|
-
|
|
54
|
-
For tasks that don't need a response back — the worker executes autonomously and the manager moves on.
|
|
55
|
-
|
|
56
|
-
1. **Create or identify the worker thread**
|
|
57
|
-
```
|
|
58
|
-
start_thread(name: "Background Cleanup")
|
|
59
|
-
→ returns { threadId: <WORKER_THREAD_ID> }
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
2. **Send the task — no report-back needed**
|
|
63
|
-
```
|
|
64
|
-
send_message_to_thread(
|
|
65
|
-
threadId: <WORKER_THREAD_ID>,
|
|
66
|
-
message: "Task: Clean up stale log files older than 30 days in ~/.remote-copilot-mcp/logs/.
|
|
67
|
-
This is a one-shot task. Report progress to the operator via report_progress or send_voice.
|
|
68
|
-
Do NOT message the sender back."
|
|
69
|
-
)
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
3. **Continue working immediately**
|
|
73
|
-
Don't call wait_for_instructions for this task. Continue with your own work.
|
|
74
|
-
|
|
75
|
-
#### When to use Fire and Forget:
|
|
76
|
-
- Background cleanup tasks
|
|
77
|
-
- Scheduled improvements that don't affect current work
|
|
78
|
-
- Logging, monitoring, metrics tasks
|
|
79
|
-
- Any task where the result doesn't gate your next step
|
|
80
|
-
|
|
81
|
-
#### When NOT to use Fire and Forget:
|
|
82
|
-
- Code reviews (you need the findings to act on)
|
|
83
|
-
- Any task where the output determines your next action
|
|
84
|
-
- Tasks that modify files you're also editing (conflict risk)
|
|
85
|
-
|
|
86
|
-
### Rules
|
|
87
|
-
|
|
88
|
-
- **NEVER** duplicate work with a subagent after delegating to a thread. Trust the delegation.
|
|
89
|
-
- **ALWAYS** include clear acceptance criteria in the task message.
|
|
90
|
-
- **ALWAYS** specify which thread to report back to.
|
|
91
|
-
- Worker threads build domain-specific memory over time — reuse the same thread for the same domain.
|
|
92
|
-
- The manager thread stays clean for high-level decisions and operator interaction.
|
|
93
|
-
|
|
94
|
-
### Anti-Patterns
|
|
95
|
-
|
|
96
|
-
- ❌ Creating a worker thread AND running a subagent for the same task
|
|
97
|
-
- ❌ Sending a task then immediately doing the work yourself
|
|
98
|
-
- ❌ Creating a new thread for every task instead of reusing domain threads
|
|
99
|
-
- ❌ Sending tasks without acceptance criteria or report-back instructions
|
|
100
|
-
- ❌ Reading worker results and re-doing the work instead of applying them
|