sil-openclaw 0.3.8 → 0.3.9
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/CHANGELOG.md +56 -0
- package/dist/lib/bind-channel.js +10 -0
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/scripts/create-shopper.mjs +176 -14
- package/sil-shopping/SKILL.md +97 -54
- package/sil-shopping/examples/multi_domain_shopper_walkthrough.md +64 -136
- package/sil-shopping/references/agent_creation_engine.md +112 -63
- package/sil-shopping/references/brainstorm_interview.md +95 -69
- package/sil-shopping/references/catalog_tools_reference.md +27 -29
- package/sil-shopping/references/manage_domains.md +60 -39
- package/sil-shopping/references/refine_shopper.md +92 -43
- package/sil-shopping/references/search_param_mapping.md +71 -47
- package/sil-shopping/references/setup_onboarding.md +68 -0
- package/sil-shopping/references/shop_loop.md +154 -124
|
@@ -1,126 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: multi-domain-shopper-walkthrough
|
|
3
|
+
description: Worked end-to-end example — create one shopper, then shop two unrelated niches in one session with a shared fact reused across both and per-domain taste kept isolated.
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Worked example — one shopper, two unrelated niches, one session
|
|
2
7
|
|
|
3
|
-
|
|
8
|
+
The headline: create **one shopper**
|
|
4
9
|
([`../references/brainstorm_interview.md`](../references/brainstorm_interview.md) →
|
|
5
|
-
[`../references/agent_creation_engine.md`](../references/agent_creation_engine.md)),
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
and the SDS layering, not exact wording.
|
|
10
|
+
[`../references/agent_creation_engine.md`](../references/agent_creation_engine.md)), then
|
|
11
|
+
shop **two unrelated niches in the same session** — the second **minted on the fly** —
|
|
12
|
+
with a **shared fact reused across both** and **per-domain taste that does not leak**. It
|
|
13
|
+
shows the shape and the gates, not exact wording; the machinery lives in the references.
|
|
10
14
|
|
|
11
|
-
## Onboarding — two touchpoints,
|
|
15
|
+
## Onboarding — two touchpoints, no niche research
|
|
12
16
|
|
|
13
17
|
> **User:** "Set up something that shops for me."
|
|
14
18
|
|
|
15
|
-
|
|
16
|
-
shared user spec; it researches **no** niche.
|
|
17
|
-
|
|
18
|
-
**1. `SOUL.md` — ask first (persona; a generalist, NOT a niche).**
|
|
19
|
-
|
|
20
|
-
> **Shopper:** "Let's set up your shopper. How do you want it to behave?"
|
|
21
|
-
> **User:** "Be concise and a bit opinionated — and never recommend anything with
|
|
22
|
-
> leather, it's an ethics thing for me."
|
|
23
|
-
|
|
24
|
-
→ Persona (→ host **`SOUL.md`**): *concise, lightly opinionated generalist.* No
|
|
25
|
-
niche is chosen — it will shop whatever the user buys.
|
|
26
|
-
|
|
27
|
-
**2. `user_spec.md` (shared) — seed the cross-niche facts + hard constraints.**
|
|
19
|
+
A **generalist** — onboarding touches only the persona and the shared user spec, no niche.
|
|
28
20
|
|
|
21
|
+
> **Shopper:** "How do you want it to behave?"
|
|
22
|
+
> **User:** "Concise and a bit opinionated — never recommend anything with leather, it's
|
|
23
|
+
> an ethics thing."
|
|
29
24
|
> **Shopper:** "Anything I should always know — sizes, where to ship, hard rules?"
|
|
30
|
-
> **User:** "Ship to 12 Rue Centrale, Lyon, France.
|
|
31
|
-
> absolute."
|
|
32
|
-
|
|
33
|
-
→ Seeded partial **shared `userSpec`** (→ `user_spec.md`): *ship-to Lyon, France
|
|
34
|
-
(soft fact); **HARD-NO: leather** (inviolable, carries across every niche).* The
|
|
35
|
-
rest is augmented per query.
|
|
25
|
+
> **User:** "Ship to 12 Rue Centrale, Lyon, France. The no-leather rule is absolute."
|
|
36
26
|
|
|
37
|
-
|
|
27
|
+
→ persona (→ host `SOUL.md`): *concise, lightly opinionated generalist.* Shared
|
|
28
|
+
`userSpec`: *ship-to Lyon (soft fact); **HARD-NO: leather** (inviolable, carries across
|
|
29
|
+
every niche).*
|
|
38
30
|
|
|
39
|
-
|
|
40
|
-
the two stores — `agentId` + `persona` drive the host wiring (`openclaw agents add`
|
|
41
|
-
+ `SOUL.md`); `name` + the **shared user spec only** feed the singleton
|
|
42
|
-
`sil_profile_materialize` **create** (no `agentId`, no domain pack at create):
|
|
31
|
+
## Assemble + endorse
|
|
43
32
|
|
|
44
33
|
```jsonc
|
|
45
34
|
{
|
|
46
|
-
"agentId": "my-shopper",
|
|
47
|
-
"name": "My Shopper",
|
|
35
|
+
"agentId": "my-shopper", "name": "My Shopper",
|
|
48
36
|
"persona": "A concise, lightly opinionated generalist shopper.",
|
|
49
|
-
"userSpec": "
|
|
37
|
+
"userSpec": "### Soft facts\n- Ship-to: 12 Rue Centrale, Lyon, France.\n### Hard constraints (INVIOLABLE — every niche)\n- HARD-NO: leather (ethics)."
|
|
50
38
|
}
|
|
51
39
|
```
|
|
52
40
|
|
|
53
|
-
> **Shopper:** "Here's your shopper — shall I create it?"
|
|
54
|
-
> **User:** "Yes, create it."
|
|
41
|
+
> **Shopper:** "Here's your shopper — shall I create it?" **User:** "Yes, create it."
|
|
55
42
|
|
|
56
|
-
**This affirmative act is the gate** — up to here,
|
|
57
|
-
|
|
58
|
-
(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
profile grants a web tool) → write the persona into `SOUL.md` →
|
|
62
|
-
`sil_profile_materialize { name, userSpec }` **(NO `domain` — writes the shared
|
|
63
|
-
`user_spec.md` + `profile.json` with an empty `domains: {}`)** → wire sil:
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
openclaw config set 'agents.list[<i>].skills' '["sil"]' --strict-json
|
|
67
|
-
openclaw config set plugins.entries.sil.enabled true --strict-json
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
→ then **admit sil at the host allow surfaces** so the `sil_*` tools are un-filtered
|
|
71
|
-
— the shipped helper does the additive, idempotent merge of `plugins.allow` +
|
|
72
|
-
`tools.alsoAllow` (never clobbering another admitted plugin like `klodi`):
|
|
73
|
-
|
|
74
|
-
```
|
|
75
|
-
sil-openclaw-allowlist
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
→ `openclaw config validate --json` returns valid → **`created`** (a non-zero
|
|
79
|
-
helper exit would be `persistence_failed`, not `created` — never a green shopper
|
|
80
|
-
over still-filtered tools). The shopper now exists with an **empty `domains` map** —
|
|
81
|
-
healthy; it will mint each niche on first shop.
|
|
43
|
+
**This affirmative act is the gate** — up to here, zero engine steps ran. Only now does
|
|
44
|
+
the engine run — `openclaw agents add my-shopper …` → persona into `SOUL.md` →
|
|
45
|
+
`sil_profile_materialize { name, userSpec }` (no `domain`; writes the shared
|
|
46
|
+
`user_spec.md` + an empty `domains: {}`) → wire + admit sil → validate → **`created`**,
|
|
47
|
+
with an **empty `domains` map** (healthy; each niche mints on first shop).
|
|
82
48
|
|
|
83
49
|
## Niche A — road cycling (minted on the fly, announced)
|
|
84
50
|
|
|
85
51
|
> **User:** "Find me a first road bike, around €1500."
|
|
86
52
|
|
|
87
|
-
The shop loop (
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
53
|
+
The shop loop classifies the niche (**road cycling**), finds no match, and **mints it on
|
|
54
|
+
the spot — announced** ("I haven't shopped cycling for you yet — setting that up"). It
|
|
55
|
+
researches a deep `domainSpec` (fit is everything; geometry; gearing; material/wheel
|
|
56
|
+
trade-offs), derives the `intentSpec`, seeds a partial `playbook`, and persists with the
|
|
57
|
+
whole-doc `sil_profile_materialize` carrying `domain.slug: "road-cycling"`. It recommends
|
|
58
|
+
with a **"why" that cites the layers** — "for a first bike **fit/comfort outrank outright
|
|
59
|
+
speed** (a domain mechanic), a 54 cm endurance frame fits, kept within your value budget;
|
|
60
|
+
**no leather anywhere** (your standing hard rule)."
|
|
94
61
|
|
|
95
|
-
|
|
96
|
-
**fit is everything** — frame size from height *and* inseam, stack/reach, saddle
|
|
97
|
-
setback, crank length; geometry; gearing theory; material/wheel trade-offs),
|
|
98
|
-
derives the `intentSpec` dimensions, seeds a partial `playbook`, then persists with
|
|
99
|
-
the **whole-doc** mint:
|
|
100
|
-
|
|
101
|
-
```jsonc
|
|
102
|
-
sil_profile_materialize {
|
|
103
|
-
name: "My Shopper",
|
|
104
|
-
userSpec: "…the current shared spec (re-persisted)…",
|
|
105
|
-
domain: {
|
|
106
|
-
slug: "road-cycling", name: "Road cycling",
|
|
107
|
-
domainSpec: "## First road bike — how to buy well (deep)\nFit is everything: size from height AND inseam; stack/reach set torso angle; saddle setback from KOPS; crank length scales with inseam…\n## Geometry: endurance vs race. ## Gearing: gear-inches, compact vs mid-compact. ## Material/wheels: alloy vs carbon; rim depth vs crosswind.",
|
|
108
|
-
intentSpec: "## Dimensions (schema)\nuse-case; terrain; budget band; fit envelope; timeline; compatibility; performance priorities; aesthetics.",
|
|
109
|
-
playbook: "## Buying taste (seeded partial)\nTo be learned as we shop."
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
Then the loop runs on the active **road-cycling** domain: decompose the intent
|
|
115
|
-
(first bike, ~€1500), map → `sil_search` → compare on the rubric, and recommend
|
|
116
|
-
with a **"why" that cites the layers** — "for a first bike **fit/comfort outrank
|
|
117
|
-
outright speed** (a domain mechanic), a 54 cm endurance frame sits right, and I kept
|
|
118
|
-
it within your value budget; **no leather anywhere** (your standing hard rule)." A
|
|
119
|
-
rationale naming no domain mechanic and reusing no stored fact would **fail the SDS
|
|
120
|
-
bar** even if the bike were fine.
|
|
121
|
-
|
|
122
|
-
The session surfaces a **taste**, captured the **cheap** way — one append, scoped to
|
|
123
|
-
this domain:
|
|
62
|
+
A taste surfaces, captured the cheap way — one append, scoped to this domain:
|
|
124
63
|
|
|
125
64
|
> **User:** "I don't chase brands — value over name."
|
|
126
65
|
|
|
@@ -128,30 +67,24 @@ this domain:
|
|
|
128
67
|
sil_remember { kind: "taste", text: "Value over brand; ~€1500 band.", domain: "road-cycling" }
|
|
129
68
|
```
|
|
130
69
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
## Niche B — espresso (a SECOND niche, same session, no switch)
|
|
134
|
-
|
|
135
|
-
Moments later, **same session, no agent switch, no re-onboarding**:
|
|
70
|
+
→ lands in `domains/road-cycling/playbook.md` only.
|
|
136
71
|
|
|
137
|
-
|
|
72
|
+
## Niche B — espresso (a second niche, same session, no switch)
|
|
138
73
|
|
|
139
|
-
|
|
140
|
-
no match, and **mints espresso on the fly — announced** ("new niche for me —
|
|
141
|
-
setting up espresso") with its own deep `domainSpec` (boiler type, PID, pressure
|
|
142
|
-
profiling, portafilter size, grinder pairing), `intentSpec`, and partial `playbook`,
|
|
143
|
-
via a second whole-doc `sil_profile_materialize` with `domain.slug: "espresso"`.
|
|
74
|
+
> **User:** "Different thing — a home espresso machine, decent but not crazy."
|
|
144
75
|
|
|
145
|
-
**
|
|
76
|
+
Same session, **no agent switch, no re-onboarding**. The loop classifies **espresso**,
|
|
77
|
+
finds no match, and **mints espresso on the fly — announced**, with its own deep
|
|
78
|
+
`domainSpec` (boiler type, PID, pressure profiling, grinder pairing) via a second
|
|
79
|
+
whole-doc `sil_profile_materialize` (`domain.slug: "espresso"`).
|
|
146
80
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
> leather-wrapped tamper handle outright).
|
|
81
|
+
**The shared fact carries — without being re-asked:** the ship-to from the shared
|
|
82
|
+
`user_spec.md` is reused in espresso with **no re-ask** ("I'll ship to your Lyon address
|
|
83
|
+
as usual"), and the no-leather hard rule still rejects a leather-wrapped tamper handle.
|
|
151
84
|
|
|
152
|
-
**The niche taste does
|
|
153
|
-
`domains/road-cycling/playbook.md` and
|
|
154
|
-
|
|
85
|
+
**The niche taste does not leak:** the *value-over-brand* taste lives in
|
|
86
|
+
`domains/road-cycling/playbook.md` and does not shape the espresso picks — espresso learns
|
|
87
|
+
its own:
|
|
155
88
|
|
|
156
89
|
> **User:** "For coffee I'll happily pay for a known reliable brand."
|
|
157
90
|
|
|
@@ -159,32 +92,27 @@ espresso starts with its own (partial) taste, learned fresh:
|
|
|
159
92
|
sil_remember { kind: "taste", text: "Pays up for a reliable known brand.", domain: "espresso" }
|
|
160
93
|
```
|
|
161
94
|
|
|
162
|
-
→
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
instead go to the **shared** `user_spec.md` (`kind: "fact"`) and carry to *both*
|
|
166
|
-
niches.
|
|
95
|
+
→ `domains/espresso/playbook.md` only. The two tastes coexist without contradiction —
|
|
96
|
+
per-domain taste isolation. A **fact** would instead go to the shared `user_spec.md`
|
|
97
|
+
(`kind: "fact"`) and carry to *both* niches.
|
|
167
98
|
|
|
168
99
|
## The singleton edge — refuse a second shopper
|
|
169
100
|
|
|
170
101
|
> **User:** "Can you make me a second shopper just for coffee?"
|
|
171
|
-
> **Shopper:** "You already have a shopper — it handles every niche. I've added
|
|
172
|
-
>
|
|
173
|
-
> the espresso domain instead?"
|
|
102
|
+
> **Shopper:** "You already have a shopper — it handles every niche. I've added espresso
|
|
103
|
+
> as a domain; I won't create a second. Want me to refine the espresso domain instead?"
|
|
174
104
|
|
|
175
105
|
The engine's **singleton refusal** (`collision`, "a shopper already exists") — one
|
|
176
|
-
shopper, many domains
|
|
106
|
+
shopper, many domains.
|
|
177
107
|
|
|
178
108
|
## Edge cases this example would have handled
|
|
179
109
|
|
|
180
|
-
- **Reuse before mint** —
|
|
181
|
-
|
|
182
|
-
`cycling` / `bikes` pack.
|
|
110
|
+
- **Reuse before mint** — "another road bike, for winter" reuses the existing
|
|
111
|
+
`road-cycling` domain (semantic dedup), never a near-duplicate pack.
|
|
183
112
|
- **Forget one domain ≠ decommission the shopper** — "forget espresso" runs
|
|
184
|
-
`sil_profile_remove { domainSlug: "espresso" }
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
user registers later, on first shop, via `sil_register`.
|
|
113
|
+
`sil_profile_remove { domainSlug: "espresso" }`; the shopper, shared user spec, and
|
|
114
|
+
road-cycling domain survive.
|
|
115
|
+
- **No web tool** — the shopper says so honestly at mint time and composes from public
|
|
116
|
+
knowledge, never pretending the research happened.
|
|
117
|
+
- **Creation is local + offline** — no sil registration to create; the user registers
|
|
118
|
+
later, on first shop.
|
|
@@ -1,90 +1,139 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
name: agent-creation-engine
|
|
3
|
+
description: The ordered, one-command engine that persists the single sil-wired shopper after the user endorses the assembled draft. Load only after explicit endorsement in the interview.
|
|
4
|
+
---
|
|
2
5
|
|
|
3
|
-
|
|
6
|
+
# Create your sil-wired shopper — the agent-creation engine
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
**Precondition: run this ONLY after the user has explicitly endorsed the assembled draft
|
|
9
|
+
from [`brainstorm_interview.md`](brainstorm_interview.md).** The interview owns that gate.
|
|
6
10
|
|
|
7
|
-
|
|
11
|
+
This persists **one** valid OpenClaw agent — the user's **shopper**: a real agent under
|
|
12
|
+
the host `agents` config, sil plugin enabled, sil skill attached, its persona in the
|
|
13
|
+
workspace **`SOUL.md`**, plus the **shared user spec** in the sil data dir — so it shops
|
|
14
|
+
with **no further setup**. The shopper is a **singleton**: created once, then it learns
|
|
15
|
+
**domains** lazily on first shop, so a fresh shopper has an **empty `domains` map** —
|
|
16
|
+
healthy. Creation is **local and offline**: no token is read, no `sil_register` /
|
|
17
|
+
`sil_whoami`, no network call. The shopper registers the user later, on first shop.
|
|
8
18
|
|
|
9
19
|
## The one command
|
|
10
20
|
|
|
11
|
-
After the
|
|
21
|
+
After the endorsement, run exactly **one** shipped command — the package bin
|
|
22
|
+
**`sil-openclaw-create-shopper`** — and it runs the whole choreography **atomically** and
|
|
23
|
+
**fail-closed**, then returns one structured JSON result. You do **not** hand-run the
|
|
24
|
+
host-CLI steps; the bin runs them **for you, in order, as one transaction**. Feed it the
|
|
25
|
+
endorsed spec as one JSON object on **`stdin`** (or via **`--spec <path>`**):
|
|
12
26
|
|
|
13
27
|
```
|
|
14
28
|
sil-openclaw-create-shopper <<'JSON'
|
|
15
|
-
{ "agentId": "my-shopper", "name": "My Shopper",
|
|
16
|
-
"
|
|
29
|
+
{ "agentId": "my-shopper", "name": "My Shopper",
|
|
30
|
+
"workspace": "~/.openclaw/workspace-my-shopper",
|
|
31
|
+
"persona": "…the endorsed persona…", "userSpec": "…the seeded shared user spec…",
|
|
32
|
+
"channel": "telegram" }
|
|
17
33
|
JSON
|
|
18
34
|
```
|
|
19
35
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
36
|
+
The bin is **non-interactive**: it executes an **already-assembled, already-endorsed**
|
|
37
|
+
spec — it **never re-runs the interview** and never prompts. The sil **plugin** and sil
|
|
38
|
+
**skill** are always wired — that is what makes it *sil-wired*. It is a standalone
|
|
39
|
+
operator script, **not** the plugin process, so the plugin's "never write host config"
|
|
40
|
+
guarantee holds; the bin legitimately drives `openclaw …` on your behalf.
|
|
23
41
|
|
|
24
|
-
## The
|
|
25
|
-
|
|
26
|
-
The endorsed draft feeds two stores. The **persona** becomes the host workspace **`SOUL.md`** (its identity / voice / standing rules — via the host CLI, **not** a sil artefact). The **shared user spec** becomes the sil data-dir artefact:
|
|
42
|
+
## The spec (input)
|
|
27
43
|
|
|
28
44
|
| Field | Meaning | Goes to | Required? |
|
|
29
45
|
|---|---|---|---|
|
|
30
|
-
| **agentId** | Lower-kebab id
|
|
46
|
+
| **agentId** | Lower-kebab id → `agents.list[].id`. Unique, never `main`. | host | Required |
|
|
31
47
|
| **name** | Human-readable name ("My Shopper"). | sil manifest | Required |
|
|
32
|
-
| **persona** | Who
|
|
33
|
-
| **workspace** | The shopper's workspace directory
|
|
34
|
-
| **userSpec** | The user's **shared, cross-niche** facts + hard constraints
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
48
|
+
| **persona** | Who the shopper is / how it shops — a generalist, voice, standing rules. | host **`SOUL.md`** (no `persona.md`) | Required |
|
|
49
|
+
| **workspace** | The shopper's workspace directory. | host | Required |
|
|
50
|
+
| **userSpec** | The user's **shared, cross-niche** facts + hard constraints. Seeded partial by the interview. | sil `user_spec.md` | **Required** |
|
|
51
|
+
| **channel** | The channel the setup conversation is on — bound to the new shopper. | host `openclaw.json` bindings | **Optional (fail-open)** |
|
|
52
|
+
|
|
53
|
+
There is **no per-niche input at create** — no `domainSpec` / `intentSpec` / `playbook`;
|
|
54
|
+
those are minted lazily on first shop. The shopper reaches the web to mint and refresh
|
|
55
|
+
domains, so the agent needs web/fetch tools (inherited from `agents.defaults`); if
|
|
56
|
+
defaults grant none, the bin reports `created` with a `warnings` entry naming the gap
|
|
57
|
+
(bare `sil_search` still works) — surface it.
|
|
58
|
+
|
|
59
|
+
## What the bin does atomically (in this exact order)
|
|
60
|
+
|
|
61
|
+
1. **Validate the spec FIRST** — `agentId` (present, lower-kebab, ≠ `main`), `name`,
|
|
62
|
+
`persona`, `workspace`, and the shared **`userSpec`** (present, non-blank — the only
|
|
63
|
+
sil artefact at create). No `domainSpec` / `intentSpec` / `playbook` to validate. Any
|
|
64
|
+
failure stops with **`invalid_request`** naming the field and **writes nothing**, ahead
|
|
65
|
+
of every host command.
|
|
66
|
+
2. **Singleton check.** Run `openclaw agents list --json` and read the sil store (the
|
|
67
|
+
no-args `sil_profile_get` overview) **before** the add. If a sil shopper already
|
|
68
|
+
exists, stop with **`collision`** — **"a shopper already exists"** — and do **not** run
|
|
69
|
+
`openclaw agents add`; steer to shop-a-new-niche (lazy mint) or refine — **never mint a
|
|
70
|
+
second shopper**. An `agentId` clashing with any existing agent is likewise
|
|
71
|
+
`collision`. An inconclusive read fails closed.
|
|
72
|
+
3. **Create the agent shell.** `openclaw agents add <agentId> --workspace <workspace>
|
|
73
|
+
--non-interactive --json` — the real `agents.list[]` entry + workspace bootstrap
|
|
74
|
+
(`SOUL.md`, `AGENTS.md`, …), inheriting model and tool profile from `agents.defaults`.
|
|
75
|
+
4. **Write the persona straight into the workspace `SOUL.md`** (host CLI). The persona is
|
|
76
|
+
the shopper's soul — the host's `SOUL.md`, not a sil artefact. There is **no**
|
|
77
|
+
`persona.md` and **no copy** step.
|
|
78
|
+
5. **Materialize the shared user spec — NO `domain`.** Call `sil_profile_materialize {
|
|
79
|
+
name, userSpec }` (the singleton takes no `agentId`). With no `domain`, it writes the
|
|
80
|
+
shared **`user_spec.md`** + **`profile.json`** with an **empty `domains: {}` map** into
|
|
81
|
+
`$SIL_DATA_DIR/shopper/`, atomically. No `domain_spec.md` / `intent_spec.md` /
|
|
82
|
+
`playbook.md` yet.
|
|
83
|
+
6. **Wire the sil skill + plugin** (host CLI). Asserted against the pinned host
|
|
84
|
+
**`alpine/openclaw:2026.6.9`**, both value-mode sets with `--strict-json` (the only set
|
|
85
|
+
mode this image accepts):
|
|
59
86
|
```
|
|
60
87
|
openclaw config set 'agents.list[<i>].skills' '["sil"]' --strict-json
|
|
61
88
|
openclaw config set plugins.entries.sil.enabled true --strict-json
|
|
62
89
|
```
|
|
63
|
-
The skill **attach** makes the agent
|
|
64
|
-
|
|
65
|
-
7. **
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
90
|
+
The skill **attach** makes the agent know how to drive the tools; the plugin **enable**
|
|
91
|
+
turns sil on — but does not un-filter the tools by itself (next step).
|
|
92
|
+
7. **Admit sil at the host allow surfaces.** Until sil is admitted at `plugins.allow` +
|
|
93
|
+
**`tools.alsoAllow`**, the host keeps the `sil_*` tools filtered. The value-mode `config
|
|
94
|
+
set` above is overwrite-only, so it cannot additively merge those shared arrays without
|
|
95
|
+
clobbering another admitted plugin (e.g. `klodi`). The bin runs the shipped admission
|
|
96
|
+
helper — the sibling bin `sil-openclaw-allowlist` (the `openclaw:allowlist` script) —
|
|
97
|
+
the additive, idempotent, self-validating three-surface merge. **If the helper exits
|
|
98
|
+
non-zero (a failed admission), the bin reports `persistence_failed` with the path +
|
|
99
|
+
cause and does NOT declare `created`** — never a green `created` over filtered tools.
|
|
100
|
+
8. **Bind the current channel — FAIL-OPEN.** Resolve the channel (`spec.channel`, else the
|
|
101
|
+
host's `OPENCLAW_MCP_MESSAGE_CHANNEL`) and, if one resolves, run `openclaw agents bind
|
|
102
|
+
--agent <agentId> --bind <channel> --json`, then **verify** the route stuck (read-back +
|
|
103
|
+
`openclaw config validate` still passes). If undetermined, owned by another agent (no
|
|
104
|
+
`--force`), or unverifiable, revert any partial route and degrade to a manual-bind hint
|
|
105
|
+
in `warnings` — this step **never fails creation**.
|
|
106
|
+
9. **Validate with the host's own check, THEN declare created.** `openclaw config validate
|
|
107
|
+
--json` returns `{ valid, path, issues? }` — success keys off **`.valid`**, never an
|
|
108
|
+
`ok` field. Only when `valid: true` **and** admission (step 7) succeeded does it report
|
|
109
|
+
**`created`**, carrying `boundChannel` (or `null`). Otherwise it reports
|
|
110
|
+
**`persistence_failed`** with the failing **path** + **cause**.
|
|
111
|
+
10. **On any failure after writes begin, tear down** — restore the pre-run `openclaw.json`
|
|
112
|
+
snapshot (reversing the agent entry + skill + plugin + admission + any channel
|
|
113
|
+
binding), remove the workspace dir (only if it created it) and the singleton shopper
|
|
114
|
+
dir (only if it did not pre-exist). `persistence_failed` truthfully means **nothing
|
|
115
|
+
partial** is left. In the rare case teardown cannot fully revert, the bin reports a
|
|
116
|
+
distinct, louder outcome that **names the residue** — never voiced as "nothing partial".
|
|
117
|
+
|
|
118
|
+
The bin emits **one** `{ status, … }` result and exits 0 **only** on `created`.
|
|
119
|
+
|
|
120
|
+
## Status taxonomy
|
|
74
121
|
|
|
75
122
|
| `status` | Meaning | What to do |
|
|
76
123
|
|---|---|---|
|
|
77
|
-
| `created` | Shopper added, shared user spec materialized,
|
|
78
|
-
| `invalid_request` | Spec failed validation
|
|
79
|
-
| `collision` | A shopper already exists (the singleton), or the `agentId` clashes. **Nothing written.** | Surface
|
|
80
|
-
| `persistence_failed` | A write, the allow-list
|
|
81
|
-
|
|
82
|
-
In the **rare** case teardown itself cannot fully revert (e.g. the agent was added but reverting it fails), the bin reports a **distinct, louder** outcome that **names the residue** — do **not** voice that as `persistence_failed`'s "nothing partial"; tell the user exactly what remains and where.
|
|
124
|
+
| `created` | Shopper added, shared user spec materialized, plugin + skill wired, `openclaw config validate` accepted it. Carries `name` + `agentId` + `workspace` + `boundChannel` (or `null`). | Tell the user it's ready; if `boundChannel` is `null`, relay the manual-bind hint. |
|
|
125
|
+
| `invalid_request` | Spec failed validation. **Nothing attempted.** | Name the field, fix it, run again. |
|
|
126
|
+
| `collision` | A shopper already exists (the singleton), or the `agentId` clashes. **Nothing written.** | Surface "a shopper already exists"; steer to shop-a-new-niche or refine. **Never a second shopper.** |
|
|
127
|
+
| `persistence_failed` | A write, the allow-list helper (non-zero exit), or `openclaw config validate` failed. Teardown ran — **nothing partial** left. | Fix the reported path/cause and re-run (safe). |
|
|
83
128
|
|
|
84
129
|
## Runtime — how the shopper loads its behaviour
|
|
85
130
|
|
|
86
|
-
When you (the sil skill) start a session as the shopper, the host has already injected the
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
131
|
+
When you (the sil skill) start a session as the shopper, the host has already injected the
|
|
132
|
+
persona via **`SOUL.md`**. Then read `$SIL_DATA_DIR/shopper/profile.json` and load the
|
|
133
|
+
shared **`user_spec.md`** (cross-niche facts + hard constraints, reused across every
|
|
134
|
+
niche) and the slug-keyed **`domains`** map — an empty map is healthy; the per-domain
|
|
135
|
+
packs load **lazily at shop time**. Because the `sil_*` tools were admitted at create, the
|
|
136
|
+
shopper calls **`sil_search`** / **`sil_product_get`** (and `sil_register` / `sil_whoami`
|
|
137
|
+
as needed) with **no further setup**, minting each niche on the fly the first time the
|
|
138
|
+
user shops it, per [`shop_loop.md`](shop_loop.md). To sharpen the shopper or a domain, see
|
|
139
|
+
[`refine_shopper.md`](refine_shopper.md).
|