u-foo 3.0.14 → 3.0.16
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/OPTIONAL_SKILLS/ufoo-bus-poll/SKILL.md +60 -0
- package/OPTIONAL_SKILLS/ufoo-bus-poll/agents/openai.yaml +4 -0
- package/README.md +9 -3
- package/README.zh-CN.md +8 -3
- package/SKILLS/ufoo/SKILL.md +56 -179
- package/SKILLS/ufoo/agents/openai.yaml +4 -0
- package/SKILLS/ufoo-bus/SKILL.md +92 -0
- package/SKILLS/ufoo-bus/agents/openai.yaml +4 -0
- package/SKILLS/ufoo-context/SKILL.md +101 -0
- package/SKILLS/ufoo-context/agents/openai.yaml +4 -0
- package/SKILLS/ufoo-online/SKILL.md +43 -112
- package/SKILLS/ufoo-online/agents/openai.yaml +4 -0
- package/package.json +1 -1
- package/scripts/postinstall-skills.js +81 -0
- package/scripts/postinstall.js +8 -15
- package/src/app/cli/features/doctor.js +4 -4
- package/src/coordination/bus/store.js +1 -1
- package/src/coordination/context/doctor.js +2 -2
- package/OPTIONAL_SKILLS/ubus-poll/SKILL.md +0 -76
- package/SKILLS/ubus/SKILL.md +0 -250
- package/SKILLS/uctx/SKILL.md +0 -156
- package/SKILLS/uinit/SKILL.md +0 -76
- package/SKILLS/ustatus/SKILL.md +0 -36
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ufoo-bus-poll
|
|
3
|
+
description: >-
|
|
4
|
+
Stream pending ufoo bus messages through a resident background task for an
|
|
5
|
+
MCP-registered or externally provisioned agent whose host cannot receive
|
|
6
|
+
automatic ufoo prompt injection. Use only with a host that forwards streaming
|
|
7
|
+
background-task output into the agent session; do not use for Codex CLI,
|
|
8
|
+
Claude Code CLI, Agy, Kimi, or native ucode.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# ufoo bus poll
|
|
12
|
+
|
|
13
|
+
Attach one provisioned external subscriber to a host-managed background stream.
|
|
14
|
+
Keep the stream queue-read-only so the agent controls acknowledgement.
|
|
15
|
+
|
|
16
|
+
## Attach the registered subscriber
|
|
17
|
+
|
|
18
|
+
1. Reuse the exact subscriber returned by MCP `register_agent` or supplied by
|
|
19
|
+
the host. Never create a second identity for the stream, call bare
|
|
20
|
+
`ufoo bus join`, guess an agent type, or borrow another workspace subscriber.
|
|
21
|
+
2. Start exactly one streaming background task for that subscriber:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
ufoo bus poll "<subscriber-id>" --follow --interval 2
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
3. Keep the command owned by the host's streaming background-task facility.
|
|
28
|
+
Do not use `nohup`, shell `&`, or an OS-detached daemon; those routes can
|
|
29
|
+
write output somewhere the agent never receives.
|
|
30
|
+
|
|
31
|
+
The command rejects a second resident poll for the same subscriber. It emits
|
|
32
|
+
the current pending batch, waits for that batch to be acknowledged, then emits
|
|
33
|
+
the next batch. It never acknowledges, claims, injects, or clears messages.
|
|
34
|
+
|
|
35
|
+
## Handle stream batches
|
|
36
|
+
|
|
37
|
+
For every `[ufoo]<from:...>` event:
|
|
38
|
+
|
|
39
|
+
1. Read `Content.message` and execute actionable work.
|
|
40
|
+
2. After handling the emitted batch, run the exact acknowledgement command
|
|
41
|
+
printed by the stream:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
ufoo bus ack "<subscriber-id>" --through <seq>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Preserve `--through`; it keeps later messages pending.
|
|
48
|
+
3. Reply only with a requested result, answer, blocker, or fact the sender
|
|
49
|
+
needs:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
ufoo bus send "<sender-id>" "<substantive result>"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Do not reply to greetings, thanks, or acknowledgement-only messages. After
|
|
56
|
+
sending, continue the current task; do not start another poll, sleep, or wait.
|
|
57
|
+
The resident stream delivers follow-up output.
|
|
58
|
+
|
|
59
|
+
If the host cannot forward incremental output from a still-running task, stop
|
|
60
|
+
this workflow and use an explicitly invoked `$ufoo-bus` inbox check instead.
|
package/README.md
CHANGED
|
@@ -185,6 +185,11 @@ symlink; edit project instructions in `AGENTS.md`.
|
|
|
185
185
|
Before a project has been initialized, the equivalent CLI form is also useful:
|
|
186
186
|
`ufoo init --targets context,bus`.
|
|
187
187
|
|
|
188
|
+
The default agent skill set is intentionally limited to `ufoo`, `ufoo-bus`,
|
|
189
|
+
`ufoo-context`, and `ufoo-online`. They are installed only as skills, not as a
|
|
190
|
+
second command catalog. Initialization and unified status are handled by
|
|
191
|
+
`ufoo`.
|
|
192
|
+
|
|
188
193
|
### Event Bus
|
|
189
194
|
|
|
190
195
|
```text
|
|
@@ -204,11 +209,12 @@ queue-read-only bus stream:
|
|
|
204
209
|
|
|
205
210
|
```bash
|
|
206
211
|
ufoo skills list --optional
|
|
207
|
-
ufoo skills install
|
|
208
|
-
ufoo bus poll "
|
|
212
|
+
ufoo skills install ufoo-bus-poll --target /path/to/that/agent/skills
|
|
213
|
+
ufoo bus poll "<subscriber-id>" --follow --interval 2
|
|
209
214
|
```
|
|
210
215
|
|
|
211
|
-
|
|
216
|
+
Use the subscriber returned by MCP `register_agent` or provisioned by the host,
|
|
217
|
+
then run the final command through that host's streaming background-task facility.
|
|
212
218
|
It prints newly observed pending events but never claims or acknowledges them;
|
|
213
219
|
the agent runs the printed `ufoo bus ack --through <seq>` command only after
|
|
214
220
|
handling the emitted batch, preserving later arrivals. The fallback is not
|
package/README.zh-CN.md
CHANGED
|
@@ -180,6 +180,10 @@ ufoo -g
|
|
|
180
180
|
|
|
181
181
|
项目尚未初始化时,也可以先在外部执行等价 CLI:`ufoo init --targets context,bus`。
|
|
182
182
|
|
|
183
|
+
默认 Agent skill 有意精简为 `ufoo`、`ufoo-bus`、`ufoo-context` 和
|
|
184
|
+
`ufoo-online`。它们只作为 skill 安装,不再生成一份 command 目录,
|
|
185
|
+
避免宿主显示两个入口;初始化和统一状态统一由 `ufoo` 处理。
|
|
186
|
+
|
|
183
187
|
### 事件总线
|
|
184
188
|
|
|
185
189
|
```text
|
|
@@ -198,11 +202,12 @@ bus 消息流:
|
|
|
198
202
|
|
|
199
203
|
```bash
|
|
200
204
|
ufoo skills list --optional
|
|
201
|
-
ufoo skills install
|
|
202
|
-
ufoo bus poll "
|
|
205
|
+
ufoo skills install ufoo-bus-poll --target /path/to/that/agent/skills
|
|
206
|
+
ufoo bus poll "<subscriber-id>" --follow --interval 2
|
|
203
207
|
```
|
|
204
208
|
|
|
205
|
-
|
|
209
|
+
使用 MCP `register_agent` 返回或由 host 预配的 subscriber,并由该 host 的
|
|
210
|
+
流式后台任务能力托管最后一条命令。它只输出新观察到的
|
|
206
211
|
pending event,不 claim、不 ack;Agent 处理完输出批次后,再执行输出中
|
|
207
212
|
给出的 `ufoo bus ack --through <seq>`,以保留稍后到达的消息。
|
|
208
213
|
这个 fallback 不会被 postinstall 或 `skills install all` 安装,而且
|
package/SKILLS/ufoo/SKILL.md
CHANGED
|
@@ -1,219 +1,96 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ufoo
|
|
3
|
-
description:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
description: >-
|
|
4
|
+
Coordinate a ufoo workspace across context decisions, durable memory, event-bus
|
|
5
|
+
delivery, status, and initialization. Use at the start of an agent session in
|
|
6
|
+
a ufoo project, or when asked to initialize, inspect, or coordinate the unified
|
|
7
|
+
ufoo protocol.
|
|
7
8
|
---
|
|
8
9
|
|
|
9
|
-
# ufoo
|
|
10
|
+
# ufoo
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
Apply the unified workspace protocol. Use `$ufoo-bus`, `$ufoo-context`, or
|
|
13
|
+
`$ufoo-online` when the task needs the focused workflow.
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
2. **Shared Memory** — Durable, low-noise project facts shared across agents
|
|
15
|
-
3. **Event Bus** — Inter-agent messaging
|
|
16
|
-
4. **Initialization** — Project setup for ufoo workspace state
|
|
15
|
+
## Synchronize workspace state
|
|
17
16
|
|
|
18
|
-
|
|
17
|
+
1. Read open decisions before related work:
|
|
19
18
|
|
|
20
|
-
|
|
19
|
+
```bash
|
|
20
|
+
ufoo ctx decisions -s open
|
|
21
|
+
```
|
|
21
22
|
|
|
22
|
-
|
|
23
|
+
2. Read each relevant decision fully. Follow unresolved implications; never
|
|
24
|
+
resolve a decision from its title alone.
|
|
25
|
+
3. Consume relevant shared memory before writing new memory.
|
|
26
|
+
4. Keep the default as no new decision and no new memory entry.
|
|
23
27
|
|
|
24
|
-
|
|
28
|
+
## Handle injected messages
|
|
25
29
|
|
|
26
|
-
|
|
27
|
-
- **Also record**: design patterns that set precedent, integration contracts between systems, decisions that constrain future work
|
|
28
|
-
- **Do NOT record**: routine bug fixes, simple implementation details, trivial observations, generic planning/evaluation/recommendation requests, or findings that only matter within the current task
|
|
29
|
-
- **Prefer shared memory**: durable project facts and long-lived factual constraints belong in shared memory, not decisions
|
|
30
|
-
- **Write the decision BEFORE acting on it** — but only after the high bar above is clearly met
|
|
31
|
-
- **Rule of thumb**: if another agent would not need this as a future constraint, do not write a decision
|
|
30
|
+
Treat these prompt prefixes as work inputs:
|
|
32
31
|
|
|
33
|
-
|
|
32
|
+
- `[ufoo]<from:id(nickname)>` — event-bus delivery from another agent.
|
|
33
|
+
- `[manual]<to:id(nickname)>` — manual work directed to this agent.
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
ufoo ctx decisions -l # List all decisions
|
|
37
|
-
ufoo ctx decisions -s open # Check open decisions
|
|
38
|
-
ufoo ctx decisions -n 1 # Show latest decision
|
|
39
|
-
ufoo ctx decisions new "Title" # Create new decision
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
### Decision Format
|
|
43
|
-
|
|
44
|
-
Decisions live at: `.ufoo/context/decisions/`
|
|
45
|
-
|
|
46
|
-
```yaml
|
|
47
|
-
---
|
|
48
|
-
status: open
|
|
49
|
-
---
|
|
50
|
-
# DECISION NNNN: <Title>
|
|
51
|
-
|
|
52
|
-
Date: YYYY-MM-DD
|
|
53
|
-
Author: <agent>
|
|
54
|
-
|
|
55
|
-
Context:
|
|
56
|
-
What led to this decision?
|
|
57
|
-
|
|
58
|
-
Decision:
|
|
59
|
-
What is now considered true?
|
|
60
|
-
|
|
61
|
-
Implications:
|
|
62
|
-
What must follow from this?
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### Handling Open Decisions
|
|
66
|
-
|
|
67
|
-
1. **Read and understand** — sync other agents' knowledge
|
|
68
|
-
2. **Check if action needed** — does it require implementation?
|
|
69
|
-
3. **Execute if needed** — do the work
|
|
70
|
-
4. **Resolve** — update frontmatter: `status: resolved`, `resolved_by:`, `resolved_at:`
|
|
71
|
-
|
|
72
|
-
**NEVER resolve blindly.** Reading the title is not enough.
|
|
73
|
-
|
|
74
|
-
### Read-First Rule
|
|
75
|
-
|
|
76
|
-
Shared context is **read-first**, not write-only:
|
|
77
|
-
|
|
78
|
-
1. At session start or before related work, read open decisions first.
|
|
79
|
-
2. Do not create a new decision just to persist ordinary work state.
|
|
80
|
-
3. Consume shared memory via prompt prefix / `recall` / `search_memory` before writing new memory.
|
|
81
|
-
|
|
82
|
-
---
|
|
83
|
-
|
|
84
|
-
## 2. Shared Memory
|
|
85
|
-
|
|
86
|
-
Shared memory records durable project facts only. It is not a scratchpad, progress log, user-preference store, or replacement for decisions.
|
|
87
|
-
|
|
88
|
-
### When to Record
|
|
35
|
+
For each received bus task:
|
|
89
36
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
- **Read first**: if memory may already exist, use `recall` / `search_memory` before `remember` or `edit_memory`
|
|
93
|
-
- **Prefer edit over duplicate**: update an existing memory when the fact already exists but wording changed
|
|
37
|
+
1. Execute it immediately within the current authority.
|
|
38
|
+
2. Acknowledge it only after handling:
|
|
94
39
|
|
|
95
|
-
|
|
40
|
+
```bash
|
|
41
|
+
ufoo bus ack "$UFOO_SUBSCRIBER_ID"
|
|
42
|
+
```
|
|
96
43
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
ufoo memory show mem-0001
|
|
101
|
-
ufoo memory edit mem-0001
|
|
102
|
-
ufoo memory forget mem-0001
|
|
103
|
-
ufoo memory rebuild-index
|
|
104
|
-
ufoo memory audit mem-0001
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
### Agent Tools
|
|
108
|
-
|
|
109
|
-
- `remember` — write a new durable memory fact
|
|
110
|
-
- `recall` — read memory by id or tags
|
|
111
|
-
- `search_memory` — search memory before writing or when more context is needed
|
|
112
|
-
- `search_history` — search local Claude/Codex session history as redacted evidence
|
|
113
|
-
- `edit_memory` — directly update any existing memory, with optional `expected_updated_at`
|
|
114
|
-
- `forget` — archive an obsolete or polluted memory entry
|
|
115
|
-
|
|
116
|
-
---
|
|
44
|
+
3. Reply only with a requested answer, delegated result, or fact the sender
|
|
45
|
+
needs to continue. Do not reply with greetings or bare acknowledgements.
|
|
46
|
+
4. Emit a concise runtime report for delegated work:
|
|
117
47
|
|
|
118
|
-
|
|
48
|
+
```bash
|
|
49
|
+
ufoo report done "<summary>" --agent "$UFOO_SUBSCRIBER_ID"
|
|
50
|
+
```
|
|
119
51
|
|
|
120
|
-
|
|
52
|
+
After sending or broadcasting a message, continue the current task. Do not
|
|
53
|
+
poll, invoke a bus-check skill, sleep, or wait for a reply; follow-up messages
|
|
54
|
+
are injected automatically.
|
|
121
55
|
|
|
122
|
-
|
|
123
|
-
`ufoo bus check`, invoke `/ubus`, sleep, or wait for a reply. Continue the
|
|
124
|
-
current task. Any follow-up message will be automatically injected into your
|
|
125
|
-
prompt/session.
|
|
56
|
+
## Preserve shared knowledge
|
|
126
57
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
### Commands
|
|
58
|
+
Record a decision only for architecture, meaningful trade-offs, cross-agent
|
|
59
|
+
contracts, or precedent that constrains future work:
|
|
131
60
|
|
|
132
61
|
```bash
|
|
133
|
-
ufoo
|
|
134
|
-
ufoo bus ack "$UFOO_SUBSCRIBER_ID" # Acknowledge after handling
|
|
135
|
-
ufoo bus send "<target>" "<message>" # Send message
|
|
136
|
-
ufoo bus broadcast "<message>" # Broadcast to all
|
|
137
|
-
ufoo bus status # Show bus status
|
|
62
|
+
ufoo ctx decisions new "<title>"
|
|
138
63
|
```
|
|
139
64
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
Use the same report contract for runtime progress sync:
|
|
65
|
+
Store only durable project facts in shared memory:
|
|
143
66
|
|
|
144
67
|
```bash
|
|
145
|
-
ufoo
|
|
146
|
-
ufoo
|
|
147
|
-
ufoo
|
|
148
|
-
ufoo
|
|
68
|
+
ufoo memory add "<title>" --body "<durable fact>" --tags <tags>
|
|
69
|
+
ufoo memory list
|
|
70
|
+
ufoo memory show <memory-id>
|
|
71
|
+
ufoo memory edit <memory-id>
|
|
149
72
|
```
|
|
150
73
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
- `--controller ufoo-agent` routes report events to the ufoo-agent private inbox.
|
|
154
|
-
|
|
155
|
-
### Target Resolution
|
|
156
|
-
|
|
157
|
-
- Exact ID: `claude-code:abc123`
|
|
158
|
-
- Nickname: `architect`
|
|
159
|
-
- Type: `codex` (all codex agents)
|
|
160
|
-
- Wildcard: `*` (broadcast)
|
|
161
|
-
|
|
162
|
-
### CRITICAL: When a message is received
|
|
163
|
-
|
|
164
|
-
**EXECUTE tasks immediately. Do NOT ask the user.**
|
|
74
|
+
Do not use decisions or memory as progress logs, scratchpads, or transient
|
|
75
|
+
status storage.
|
|
165
76
|
|
|
166
|
-
|
|
167
|
-
2. Execute each task.
|
|
168
|
-
3. **Always ack after handling**: `ufoo bus ack $UFOO_SUBSCRIBER_ID`
|
|
169
|
-
4. Reply only when substantive — send `ufoo bus send "<publisher>" "<result>"` only if:
|
|
170
|
-
- The sender asked a question → reply with the answer
|
|
171
|
-
- The sender delegated a task → reply with the result / artifact
|
|
172
|
-
- You found something the sender needs to proceed
|
|
173
|
-
Do NOT reply with greetings, acknowledgments, or emoji alone — those create infinite reply loops.
|
|
174
|
-
5. **Report** if the work arrived from `[manual]<to:...>` or `[ufoo]<from:...>`:
|
|
175
|
-
`ufoo report progress|done|error "<short summary>"`
|
|
77
|
+
## Inspect unified status
|
|
176
78
|
|
|
177
|
-
|
|
178
|
-
`ufoo bus check "$UFOO_SUBSCRIBER_ID"` and then follow the same execute → ack
|
|
179
|
-
flow.
|
|
79
|
+
Run:
|
|
180
80
|
|
|
181
|
-
---
|
|
182
|
-
|
|
183
|
-
## 4. Message Format
|
|
184
|
-
|
|
185
|
-
Bus messages use a unified prefix format to distinguish sources:
|
|
186
|
-
|
|
187
|
-
- `[ufoo]<from:id(nickname)>` — message from another agent via the bus
|
|
188
|
-
- `[manual]<to:id(nickname)>` — manual user input directed at an agent
|
|
189
|
-
|
|
190
|
-
When you see `[ufoo]<from:xxx>` in your prompt, it's an inter-agent message — `xxx` is the sender's ID and nickname.
|
|
191
|
-
When you see `[manual]<to:xxx>`, it's a direct user instruction to an agent — `xxx` is the recipient's ID and nickname.
|
|
192
|
-
|
|
193
|
-
---
|
|
194
|
-
|
|
195
|
-
## 5. Team Activity (Input History)
|
|
196
|
-
|
|
197
|
-
Your bootstrap prompt may include a `## Team Activity` section showing recent prompts sent to all agents. Use this to understand:
|
|
198
|
-
- What each agent is currently working on
|
|
199
|
-
- Who sent what tasks to whom
|
|
200
|
-
- The overall coordination flow
|
|
201
|
-
|
|
202
|
-
Commands:
|
|
203
81
|
```bash
|
|
204
|
-
ufoo
|
|
205
|
-
ufoo history show [limit] # Show recent entries
|
|
206
|
-
ufoo history prompt [limit] # Render as injectable prompt block
|
|
82
|
+
ufoo status
|
|
207
83
|
```
|
|
208
84
|
|
|
209
|
-
|
|
85
|
+
Summarize unread messages, open decisions, and any immediate action needed.
|
|
210
86
|
|
|
211
|
-
##
|
|
87
|
+
## Initialize workspace state
|
|
212
88
|
|
|
213
|
-
|
|
89
|
+
Initialize only the required targets:
|
|
214
90
|
|
|
215
91
|
```bash
|
|
216
|
-
ufoo init --targets context,bus --project $(pwd)
|
|
92
|
+
ufoo init --targets context,bus --project "$(pwd)"
|
|
217
93
|
```
|
|
218
94
|
|
|
219
|
-
|
|
95
|
+
Reuse an existing subscriber identity after initialization. Join the bus only
|
|
96
|
+
when no current identity can be recovered.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ufoo-bus
|
|
3
|
+
description: >-
|
|
4
|
+
Operate the local ufoo event bus: check and acknowledge pending messages,
|
|
5
|
+
identify or join a subscriber, inspect status, resolve targets, send results,
|
|
6
|
+
and broadcast updates. Use when asked to handle bus messages or perform local
|
|
7
|
+
agent-to-agent routing.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# ufoo bus
|
|
11
|
+
|
|
12
|
+
Operate the project-local event bus without creating reply loops or competing
|
|
13
|
+
with automatic prompt injection.
|
|
14
|
+
|
|
15
|
+
## Establish the subscriber
|
|
16
|
+
|
|
17
|
+
Verify `.ufoo/bus/` exists. If it does not, initialize it:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
ufoo init --targets bus --project "$(pwd)"
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Prefer `UFOO_SUBSCRIBER_ID`, then recover the current identity:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
ufoo bus whoami
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Run `ufoo bus join` only when neither source yields an identity. Rejoining can
|
|
30
|
+
cause identity drift.
|
|
31
|
+
|
|
32
|
+
## Handle pending messages
|
|
33
|
+
|
|
34
|
+
Check messages only when this skill was invoked to do so:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
ufoo bus check "$UFOO_SUBSCRIBER_ID"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
For every pending batch:
|
|
41
|
+
|
|
42
|
+
1. Read the sender from `[ufoo]<from:id(nickname)>`.
|
|
43
|
+
2. Execute each actionable task.
|
|
44
|
+
3. Acknowledge after handling:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
ufoo bus ack "$UFOO_SUBSCRIBER_ID"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
When a batch supplies a final sequence, prefer
|
|
51
|
+
`ufoo bus ack "$UFOO_SUBSCRIBER_ID" --through <seq>` so later arrivals stay
|
|
52
|
+
pending.
|
|
53
|
+
4. Reply only when the sender requested an answer, delegated work whose result
|
|
54
|
+
is needed, or needs a discovered blocker or fact.
|
|
55
|
+
|
|
56
|
+
Do not reply to greetings, thanks, `ok`, `收到`, or other acknowledgement-only
|
|
57
|
+
messages. Acknowledge them locally and stop.
|
|
58
|
+
|
|
59
|
+
## Route messages
|
|
60
|
+
|
|
61
|
+
Inspect identities and nicknames before sending:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
ufoo bus status
|
|
65
|
+
ufoo bus resolve "$UFOO_SUBSCRIBER_ID" <target>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Send to an exact subscriber ID, unique nickname, or agent type:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
ufoo bus send "<target>" "<substantive message>"
|
|
72
|
+
ufoo bus broadcast "<substantive message>"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Target resolution order is exact ID, nickname, agent type, then `*`.
|
|
76
|
+
|
|
77
|
+
After sending or broadcasting, continue the current task. Do not run
|
|
78
|
+
`ufoo bus check`, poll, sleep, or wait for a reply. Follow-up messages are
|
|
79
|
+
injected into the prompt/session automatically.
|
|
80
|
+
|
|
81
|
+
## Report delegated work
|
|
82
|
+
|
|
83
|
+
Use the shared report contract when bus work represents a task:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
ufoo report start "<task>" --task <id> --agent "$UFOO_SUBSCRIBER_ID"
|
|
87
|
+
ufoo report progress "<detail>" --task <id> --agent "$UFOO_SUBSCRIBER_ID"
|
|
88
|
+
ufoo report done "<summary>" --task <id> --agent "$UFOO_SUBSCRIBER_ID"
|
|
89
|
+
ufoo report error "<reason>" --task <id> --agent "$UFOO_SUBSCRIBER_ID"
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Use `--scope private` only for helper-internal reports.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ufoo-context
|
|
3
|
+
description: >-
|
|
4
|
+
Synchronize ufoo context decisions and durable shared memory. Use when
|
|
5
|
+
starting work in a ufoo project, reviewing open architectural decisions,
|
|
6
|
+
recording a consequential decision, recalling durable project facts, or
|
|
7
|
+
maintaining the shared context index.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# ufoo context
|
|
11
|
+
|
|
12
|
+
Read shared context before writing it. Keep decisions sparse and memory
|
|
13
|
+
durable.
|
|
14
|
+
|
|
15
|
+
## Read decisions first
|
|
16
|
+
|
|
17
|
+
List open decisions:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
ufoo ctx decisions -s open
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Read each relevant decision fully. Determine whether its implications require
|
|
24
|
+
work, verification, or no action. Never resolve a decision from its title.
|
|
25
|
+
|
|
26
|
+
Use these commands for broader inspection:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
ufoo ctx decisions -l
|
|
30
|
+
ufoo ctx decisions -n 1
|
|
31
|
+
ufoo ctx decisions -s all
|
|
32
|
+
ufoo ctx decisions index
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
If context state is missing, initialize it:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
ufoo init --targets context --project "$(pwd)"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Record only consequential decisions
|
|
42
|
+
|
|
43
|
+
Create a decision only for:
|
|
44
|
+
|
|
45
|
+
- architectural choices;
|
|
46
|
+
- meaningful trade-offs with rejected alternatives;
|
|
47
|
+
- cross-agent or integration contracts;
|
|
48
|
+
- precedent that constrains future work.
|
|
49
|
+
|
|
50
|
+
Do not create decisions for routine fixes, implementation details, generic
|
|
51
|
+
plans, transient findings, or task progress.
|
|
52
|
+
|
|
53
|
+
Create a decision before acting on it:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
ufoo ctx decisions new "<short title>"
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Use the canonical body:
|
|
60
|
+
|
|
61
|
+
```yaml
|
|
62
|
+
---
|
|
63
|
+
status: open
|
|
64
|
+
nickname: <nickname>
|
|
65
|
+
---
|
|
66
|
+
# DECISION NNNN: <Title>
|
|
67
|
+
|
|
68
|
+
Date: YYYY-MM-DD
|
|
69
|
+
Author: <agent>
|
|
70
|
+
Nickname: <nickname>
|
|
71
|
+
|
|
72
|
+
Context:
|
|
73
|
+
<why a decision was required>
|
|
74
|
+
|
|
75
|
+
Decision:
|
|
76
|
+
<what is now true>
|
|
77
|
+
|
|
78
|
+
Implications:
|
|
79
|
+
<what future work must follow>
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Resolve only after required implications are understood and completed. Change
|
|
83
|
+
frontmatter status fields without rewriting historical content.
|
|
84
|
+
|
|
85
|
+
## Maintain durable memory
|
|
86
|
+
|
|
87
|
+
Search or recall before adding:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
ufoo memory list
|
|
91
|
+
ufoo memory show <memory-id>
|
|
92
|
+
ufoo memory add "<title>" --body "<durable fact>" --tags <tags>
|
|
93
|
+
ufoo memory edit <memory-id>
|
|
94
|
+
ufoo memory forget <memory-id>
|
|
95
|
+
ufoo memory rebuild-index
|
|
96
|
+
ufoo memory audit <memory-id>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Store stable project invariants, ownership facts, and long-lived integration
|
|
100
|
+
constraints. Do not store current task state, user preferences, ephemeral
|
|
101
|
+
observations, or facts likely to expire.
|