sil-openclaw 0.4.0 → 0.4.2
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 +105 -0
- package/dist/lib/profile-store.js +44 -147
- package/dist/tools/catalog.js +9 -19
- package/dist/tools/profile.js +59 -75
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/scripts/create-shopper.mjs +34 -23
- package/sil-shopping/SKILL.md +55 -60
- package/sil-shopping/examples/multi_domain_shopper_walkthrough.md +44 -35
- package/sil-shopping/references/agent_creation_engine.md +177 -119
- package/sil-shopping/references/fill_and_feedback.md +58 -44
- package/sil-shopping/references/method_and_prds.md +116 -83
- package/sil-shopping/references/setup_onboarding.md +48 -52
- package/sil-shopping/references/shop_loop.md +72 -71
- package/sil-shopping/references/brainstorm_interview.md +0 -97
- package/sil-shopping/references/catalog_tools_reference.md +0 -44
- package/sil-shopping/references/search_param_mapping.md +0 -80
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: brainstorm-interview
|
|
3
|
-
description: The two-touchpoint shopper onboarding — persona + shared user-spec seed, converged with the user and endorsement-gated. Load when the user asks to set up or create their shopper.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Set up your shopper — the onboarding interview
|
|
7
|
-
|
|
8
|
-
When the user asks to **set up shopping** — "create my shopper", "set up an agent
|
|
9
|
-
that shops for me" — do **not** jump to the engine. Run a short, **two-touchpoint**
|
|
10
|
-
onboarding that shapes the shopper *with* the user — **pre-seeded from what they
|
|
11
|
-
already said this session** — then create nothing until the user endorses the
|
|
12
|
-
assembled draft. The engine ([`agent_creation_engine.md`](agent_creation_engine.md))
|
|
13
|
-
runs only **after** that explicit endorsement.
|
|
14
|
-
|
|
15
|
-
This is a **conversation, not a form-fill** — and a short one. The shopper is a
|
|
16
|
-
**generalist**: it goes deep on whatever the user later buys, **lazily minting a
|
|
17
|
-
domain on first shop** in each niche. So onboarding does **not** research any niche
|
|
18
|
-
and does **not** ask the user to pick one. It touches exactly **two** things: the
|
|
19
|
-
**persona** (how the shopper behaves) and a **shared user-spec seed** (cross-niche
|
|
20
|
-
facts + hard constraints).
|
|
21
|
-
|
|
22
|
-
## Open with a reflected draft, not a cold question
|
|
23
|
-
|
|
24
|
-
Before asking anything, **pre-seed** a draft from what the user already said *this
|
|
25
|
-
session*: the **persona** (their words on how the shopper should behave) and the
|
|
26
|
-
**shared user-spec seed** (any sizes, hard limits, or ethics rules mentioned in
|
|
27
|
-
passing). Then **open by reflecting that draft back** — *"from what you've told me,
|
|
28
|
-
here's the shopper I'd set up…"* — and ask only to confirm-or-adjust. That is the
|
|
29
|
-
rich (a filled draft) + light (one confirm) shape.
|
|
30
|
-
|
|
31
|
-
- **Pre-fill, don't interrogate.** Ask only to fill genuine gaps, never to re-collect
|
|
32
|
-
what the user already told you. If the session gave little, seed a **minimal
|
|
33
|
-
honest** draft ("cross-niche facts to be learned as we shop; no hard constraints
|
|
34
|
-
stated yet") and say so — never fabricate a size or a limit.
|
|
35
|
-
- **Session-only — local + offline.** The seed is assembled **only** from this
|
|
36
|
-
conversation. It reads **no token**, does **not** pull `sil_whoami`, and makes **no
|
|
37
|
-
network call**. (The shopper registers the user later, on first shop.)
|
|
38
|
-
- **The pre-fill is a proposal, never consent.** The endorsement gate below is
|
|
39
|
-
untouched.
|
|
40
|
-
|
|
41
|
-
## The two touchpoints
|
|
42
|
-
|
|
43
|
-
| Artefact | Where | What it holds |
|
|
44
|
-
|---|---|---|
|
|
45
|
-
| **`SOUL.md`** (persona) | host workspace | the shopper's voice / standing rules — a **generalist**, not a niche specialist |
|
|
46
|
-
| **`user_spec.md`** (shared) | sil data dir (**required**) | the user's **cross-niche** facts + hard constraints (addresses, sizes, allergy/ethics rules, budget psychology) |
|
|
47
|
-
|
|
48
|
-
The niche packs — the deep niche know-how, the per-request template, and the niche
|
|
49
|
-
shopping taste — are **not authored here**; they are **minted lazily on first shop**
|
|
50
|
-
in each niche ([`shop_loop.md`](shop_loop.md)). Never research a niche here.
|
|
51
|
-
|
|
52
|
-
**1. Persona — reflect back, confirm.** Open by reflecting the session-seeded persona
|
|
53
|
-
draft ("from what you've told me, your shopper sounds like…"), then confirm-or-adjust
|
|
54
|
-
its **voice/tone** and any **standing rules**. This surfaces voice, **not a niche** —
|
|
55
|
-
a generalist that shops whatever the user buys. It becomes the host workspace
|
|
56
|
-
**`SOUL.md`** (no `persona.md`).
|
|
57
|
-
|
|
58
|
-
**2. Shared user spec — seed the cross-niche facts + hard constraints.** Pre-fill the
|
|
59
|
-
**shared user spec** from the session: **cross-niche** facts and any **hard
|
|
60
|
-
constraints** that should hold in *every* niche — addresses / sizes, an allergy or
|
|
61
|
-
ethics rule ("never leather"), a budget psychology. Reflect the seed back and mark
|
|
62
|
-
each **hard** (inviolable) vs **soft** (bendable). Seed what the user offered; the
|
|
63
|
-
rest is augmented per-query at shop time. This lands in `userSpec` (→ the shared
|
|
64
|
-
`user_spec.md`). **No niche taste, no domain question, no intent dimensions** are
|
|
65
|
-
gathered here.
|
|
66
|
-
|
|
67
|
-
## Assemble + endorse
|
|
68
|
-
|
|
69
|
-
- **Identity.** Propose an `agentId` (lower-kebab, `^[a-z0-9][a-z0-9-]*$`, never
|
|
70
|
-
`main`) and a `name` ("My Shopper" / `my-shopper`). Confirm both.
|
|
71
|
-
- **Assemble + present.** Compose **`{ agentId, name, persona, userSpec }`** and
|
|
72
|
-
present a readable summary: who the shopper is and the seeded shared user spec
|
|
73
|
-
(partial, to grow per-query). Self-check the shape — `agentId` lower-kebab & ≠
|
|
74
|
-
`main`, non-blank `name`/`persona`, non-blank shared `userSpec` (the only sil
|
|
75
|
-
artefact at create). This writes nothing; the engine's validate-first step is the
|
|
76
|
-
authoritative gate.
|
|
77
|
-
- **Endorse — the gate.** Ask for an explicit go-ahead ("shall I create your
|
|
78
|
-
shopper?"). Endorsement is an affirmative act on the assembled draft — "yes, create
|
|
79
|
-
it". It is **not** inferred from the last answer and **not** from silence. **Only on
|
|
80
|
-
that explicit endorsement** do you proceed to the engine
|
|
81
|
-
([`agent_creation_engine.md`](agent_creation_engine.md)).
|
|
82
|
-
|
|
83
|
-
## Invariants (hold on every path)
|
|
84
|
-
|
|
85
|
-
- **No creation without explicit endorsement.** **Zero engine steps** run before the
|
|
86
|
-
explicit "yes"; the draft lives only in the conversation. **Nothing is created**
|
|
87
|
-
until then, so an abandoned interview leaves no partial shopper.
|
|
88
|
-
- **Two touchpoints only** — persona, then shared user spec, both pre-seeded from the
|
|
89
|
-
session. No niche is researched or chosen here; that is first-shop lazy mint.
|
|
90
|
-
- **Converge each touchpoint before advancing; stay re-entrant** — the user can revise
|
|
91
|
-
an earlier touchpoint at any point.
|
|
92
|
-
- **Singleton.** If a shopper already exists, the engine refuses a second create (its
|
|
93
|
-
`collision`, "a shopper already exists") — surface it and steer to shop-a-new-niche
|
|
94
|
-
or refine; never clobber the existing one.
|
|
95
|
-
- **Local + offline for identity.** Never present sil registration or a token as a
|
|
96
|
-
prerequisite to create, and never pull `sil_whoami` to seed — the seed is
|
|
97
|
-
session-only.
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: catalog-tools-reference
|
|
3
|
-
description: Per-tool behaviour of the four core sil tools (register, whoami, search, product-get) and the shared status taxonomy. Load when driving any core catalog or identity tool.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# sil catalog + identity tools — per-tool behaviour and the shared status taxonomy
|
|
7
|
-
|
|
8
|
-
Load this when driving any of the four core tools — `sil_register`, `sil_whoami`,
|
|
9
|
-
`sil_search`, `sil_product_get`. The router names which tool an intent maps to; this
|
|
10
|
-
reference is what each does, plus the status taxonomy they all share. All four return a
|
|
11
|
-
single JSON body carrying a `status`; prices are in the currency's ISO 4217 minor unit.
|
|
12
|
-
|
|
13
|
-
## Per-tool behaviour
|
|
14
|
-
|
|
15
|
-
- **`sil_register`** starts browser-based registration: it returns promptly with
|
|
16
|
-
`status: "awaiting_browser"` and an `auth_url` — share that URL. The plugin polls in
|
|
17
|
-
the background; once the user signs in, call `sil_register` again to confirm (it
|
|
18
|
-
reports `already_registered`).
|
|
19
|
-
- **`sil_whoami`** returns the registered user's identity (name + addresses). An expired
|
|
20
|
-
token is refreshed transparently; a fully-dead session names the recovery
|
|
21
|
-
(`sil_register`).
|
|
22
|
-
- **`sil_search`** returns a ranked list of purchasable variants (`id`, `title`,
|
|
23
|
-
`price`, `availability`, `checkout_url`, `source`), best match first — present in
|
|
24
|
-
order, do not re-rank. An empty list is a normal `ok` outcome, not an error. Use the
|
|
25
|
-
returned `cursor` for the next page; its absence means no more results.
|
|
26
|
-
- **`sil_product_get`** is the lookup companion — pass ids you already hold and get the
|
|
27
|
-
matching products back with fresh detail. Each variant carries an `inputs` list
|
|
28
|
-
correlating it to the id(s) asked about (the response is not in request order). Ids
|
|
29
|
-
that no longer resolve come back in a `not_found` list — a normal partial success.
|
|
30
|
-
|
|
31
|
-
## Status taxonomy (shared across the shopping tools)
|
|
32
|
-
|
|
33
|
-
| `status` | Meaning | What to do |
|
|
34
|
-
|---|---|---|
|
|
35
|
-
| `ok` | Success. Catalog results may be empty (`products: []`) or partial (`not_found: [...]`) — still a success. | Relay the data. |
|
|
36
|
-
| `not_registered` | No stored credentials. | Run `sil_register`, then retry the tool. |
|
|
37
|
-
| `must_reregister` | The session is dead (refresh rejected / 401). | Run `sil_register` to sign in again, then retry. |
|
|
38
|
-
| `forbidden` | Authenticated but not authorized (e.g. account not provisioned). | Follow the message; usually complete onboarding via `sil_register`. |
|
|
39
|
-
| `invalid_request` | The query/ids were rejected (e.g. empty input). | Fix the input and call again — do NOT re-register. |
|
|
40
|
-
| `retryable` | A transient network/5xx blip. | Try the same call again — do NOT re-register. |
|
|
41
|
-
|
|
42
|
-
On a non-`ok` status, say what happened and follow the tool's own `recovery` hint —
|
|
43
|
-
never improvise a different one (re-registering can't fix a bad query or a transient
|
|
44
|
-
5xx).
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: search-param-mapping
|
|
3
|
-
description: The shop-time answer→sil_search parameter mapping — real params only, hard-constraint routing, the ship_to rule. Load when mapping a decomposed request into a sil_search call.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Answer→`sil_search`-param mapping (the mapping is real)
|
|
7
|
-
|
|
8
|
-
Load this at shop time, when the shop loop maps a decomposed request into a
|
|
9
|
-
`sil_search` call ([`shop_loop.md`](shop_loop.md) Beat 5). The mapping targets the
|
|
10
|
-
**real `sil_search` parameters** and nothing else — never invent a filter.
|
|
11
|
-
|
|
12
|
-
**The param catalog lives in the `sil_search` tool description** — the full list and
|
|
13
|
-
their forms (`query`/`category`; `price_min`/`price_max` in the currency's ISO 4217
|
|
14
|
-
minor unit; `condition` = `["new"]`/`["secondhand"]`; `available`; `local_merchants`;
|
|
15
|
-
`ship_to` as ISO codes). Read it there; do not restate it here. There is no stored
|
|
16
|
-
"answer→param" seller artefact — *what* to search on for a niche lives in the active
|
|
17
|
-
domain's **method**; this reference covers only the SDS layers that feed the mapping and
|
|
18
|
-
the two rules the mapping must hold.
|
|
19
|
-
|
|
20
|
-
## What feeds the mapping — the SDS layers
|
|
21
|
-
|
|
22
|
-
The mapping reads several layers, not just the user's words for this request (the fill
|
|
23
|
-
precedence — see [`fill_and_feedback.md`](fill_and_feedback.md) — is
|
|
24
|
-
**request-intent > PRD filled-pref > method taste > user_spec fact > method default**):
|
|
25
|
-
|
|
26
|
-
- The **filled PRD** for this job is most specific and wins for *preferences* — its
|
|
27
|
-
filled answers map onto params exactly like a freshly-stated answer, but **never
|
|
28
|
-
re-asked**.
|
|
29
|
-
- The buyer's durable per-domain **taste** (in the **method**) supplies standing
|
|
30
|
-
preferences for *this niche* — a budget band → `price_min`/`price_max`.
|
|
31
|
-
- The **shared user spec** (`user_spec.md`) supplies standing **facts** and the **hard
|
|
32
|
-
constraints**, reused across **every** niche — a fact maps to a param like any answer.
|
|
33
|
-
- The **method** supplies the niche's decision-mechanics — which attributes are
|
|
34
|
-
load-bearing here — so the mapping knows what to map and what matters.
|
|
35
|
-
|
|
36
|
-
These layers are inputs to the same params, not new params. A stated taste with **no
|
|
37
|
-
matching param** (a colour, a brand, "eco-friendly") folds into the `query` text or the
|
|
38
|
-
recommendation reflection — **never a new filter**. There is no `color` or `brand` param;
|
|
39
|
-
inventing one emits invalid `sil_search` calls.
|
|
40
|
-
|
|
41
|
-
## Hard constraints — a real filter AND a reject-at-recommend rule, NEVER only `query`
|
|
42
|
-
|
|
43
|
-
A shared user-spec **hard constraint** ("never leather", "nothing over 8 kg", an
|
|
44
|
-
allergy, an age gate) is **inviolable** in every niche. A hard constraint carried
|
|
45
|
-
**only** as soft `query` text leaks — the catalog can still surface a violating item.
|
|
46
|
-
Route each to **two** points, **not merely `query`** (see
|
|
47
|
-
[`shop_loop.md`](shop_loop.md) Beat 5):
|
|
48
|
-
|
|
49
|
-
1. **A real `sil_search` filter where one exists** — "new/secondhand only" →
|
|
50
|
-
`condition`; "in stock only" → `available` (omit for the in-stock default). Where a
|
|
51
|
-
param matches, set it so the catalog never returns the violating item.
|
|
52
|
-
2. **An explicit reject-at-pick rule** for a constraint with no matching param
|
|
53
|
-
(no `material` filter for "never leather"): the constraint **rejects** any violating
|
|
54
|
-
candidate outright, never down-weights it. A hard constraint is a reject, not a
|
|
55
|
-
weight.
|
|
56
|
-
|
|
57
|
-
## `ship_to` stays EMPTY by default
|
|
58
|
-
|
|
59
|
-
Do **not** map the user's location onto `ship_to`, and do **not** call `sil_whoami` to
|
|
60
|
-
populate it. When `ship_to` is absent, sil-api resolves the user's **registered default
|
|
61
|
-
address** server-side. Set `ship_to` only to OVERRIDE the default with a *different*
|
|
62
|
-
destination (e.g. "ship this to my office in Germany"). The shopper inherits
|
|
63
|
-
location-aware search by construction — leave `ship_to` out.
|
|
64
|
-
|
|
65
|
-
## Worked example
|
|
66
|
-
|
|
67
|
-
For a road-cycling domain whose user said (this request + a stored budget taste in that
|
|
68
|
-
domain) "secondhand is fine, I'm in France and want local shops":
|
|
69
|
-
|
|
70
|
-
```
|
|
71
|
-
query: "endurance road bike 105 groupset" # niche descriptors
|
|
72
|
-
category: "<the narrowed niche category>"
|
|
73
|
-
price_max: 120000 # €1200 → minor units (cents)
|
|
74
|
-
condition: ["secondhand"]
|
|
75
|
-
local_merchants: true # ranking bias; optionally query in French to surface more local shops
|
|
76
|
-
# ship_to: OMITTED — server resolves the registered default address
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
A non-param taste ("understated colours") folds into `query` or the recommendation
|
|
80
|
-
reflection, never a new filter.
|