sil-openclaw 0.3.7 → 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.
@@ -1,109 +1,164 @@
1
- # Shop-time loop — how the one shopper shops any niche, minting domains on the fly
2
-
3
- Load this when you (the sil skill) are running as the user's **shopper** and they state a shopping intent ("find me something for a steak dinner around $40"). There is **ONE shopper** — a generalist that goes deep on whatever the user shops for — and it holds **many domains** (niches it has learned), each **minted lazily on first shop**. The [engine's Runtime hook](agent_creation_engine.md) ends where this loop begins: the host has injected the shopper's persona via the workspace **`SOUL.md`** (voice, standing rules, hard-no's), and the sil skill has read `$SIL_DATA_DIR/shopper/profile.json` — the **shared `user_spec.md`** (the person's cross-niche facts + hard constraints) plus the slug-keyed **`domains`** map. The per-niche packs load lazily, at shop time, per the steps below.
4
-
5
- This is **shop time**, not create time — behave like a specialist the user trusts, in the persona's voice. Consume the catalog tools **unchanged**; the rubric is applied by you at reasoning time, not by any new tool.
6
-
7
- This is **Spec-Driven Shopping (SDS)** over **one shopper, many domains**. The **shared `user_spec.md`** carries the person across *every* niche — a fact learned while shopping niche A is reused in niche B **without being re-asked**. Each domain's pack is scoped to that niche: **`domain_spec.md`** (deep researched niche expertise), **`intent_spec.md`** (the decomposition-dimension schema), and **`playbook.md`** (the **shopping taste** for *this* niche). **Taste does not leak across domains** — a price band or brand leaning learned in A lives in A's playbook, never B's; only the shared facts and cross-cutting values carry.
8
-
9
- The router's three always-on rules still hold (act-don't-narrate, follow the tool's own `recovery`, re-check the chosen item before commit) — this loop layers on top, it does not restate them.
10
-
11
- ## Entry — classify the niche, then reuse or mint the domain
12
-
13
- Before the loop, decide *which domain this query belongs to* and make sure the shopper holds it. No agent switch and no re-onboarding ever happens here — the **one** shopper handles every niche in the same session.
14
-
15
- ### A. Classify the query's niche (skill reasoning — no tool call)
16
-
17
- From the user's words, name the **shopping niche** this request belongs to ("a waterproof trail shoe for a wet ultra next month" → trail running; "a first road bike" → road cycling). This is your own reasoning, not a tool call — you need the niche to decide whether the shopper already knows it.
18
-
19
- ### B. Reuse an existing domain before minting — semantic slug dedup is YOUR job
20
-
21
- Read `profile.json.domains` (via the no-args `sil_profile_get`) and match the classified niche against the slugs the shopper already holds **semantically — not by exact string**. If an existing domain covers this niche, **reuse it**: load that pack and go straight to the loop. The store enforces only *shape* (valid kebab, upsert-by-key) — it will happily mint `cycling`, `road-cycling`, and `bikes` as three thin packs for the **same** niche. **Reuse-before-mint is the shop loop's job**, load-bearing: without it the one shopper fragments into duplicate shallow domains and the "shop deep" promise dies. When torn between a close existing slug and a new one, **prefer the existing slug** — reuse over fragment.
22
-
23
- ### C. On a MISS — mint the domain on the fly, announced
24
-
25
- When no existing domain matches, mint the niche **on the spot** — the research that used to run at create time runs **here, on first shop in this niche**:
26
-
27
- - **Announce it — never silently.** Tell the user, in the shopper's voice, that this is a new niche ("I haven't shopped cycling for you yet — setting that up"). **State the inferred domain so the user can correct it** before it is used; a mis-inferred niche is the user's to fix.
28
- - **Research the niche (web + knowledge).** Pull how to shop well in this niche deeply — its decision-attributes and mechanics — into a **deep `domainSpec`** (a shallow bullet list a layperson could write fails the SDS bar). Derive the **`intentSpec`** decomposition dimensions **from** that domain spec (agent-specific, a *schema* not a filled instance). Seed a *partial* **`playbook`** — the niche shopping taste, an honest non-blank "to be learned as we shop" body. If you lack a web tool, say so and compose the domain spec from well-established public shopping knowledge — never present a guess as verified research.
29
- - **Persist with the whole-doc `sil_profile_materialize` — WITH the `domain` object.** Call **`sil_profile_materialize { name, userSpec, domain: { slug, name, domainSpec, intentSpec, playbook } }`** — the **deduped slug** from step B, the deep `domainSpec`, the derived `intentSpec`, the partial `playbook`; `userSpec` is the current **shared** spec (the call re-persists it atomically alongside). One atomic call upserts `domains[slug]`. This is a **whole-doc path** (see Step 3 + the cheap/heavy split) — `sil_profile_materialize`, **never** `sil_remember`.
30
-
31
- Then run the loop below on the freshly-minted (or reused) domain.
32
-
33
- ## The shop loop (the order IS the spec)
34
-
35
- Run these steps in order on the **active domain** (the one reused or minted above). An attribute the user already stated **or the shared user spec already holds** is never re-asked.
36
-
37
- ### 1. Refresh the active domain's spec from the web
38
-
39
- Before anything else, go to the **web** and **enhance the active domain's `domain_spec.md`** so it stays current (new models, standards, prices, technique). Fold what you learn in and **persist** it by re-running **`sil_profile_materialize`** **with** the `domain` object carrying the updated `domainSpec` for this slug (the in-place re-mint — the same atomic store path the entry-mint and refine use). This is a **real web step** — if the host has no web/fetch tool, say so honestly and proceed on the existing domain spec; never pretend the refresh happened.
40
-
41
- ### 2. Decompose the request along the intent-spec dimensions (ephemeral — NEVER persisted)
42
-
43
- Read the active domain's `intent_spec.md` — the decomposition **dimensions** a good query must resolve — and **fill them in for *this* request** from the user's words ("a waterproof trail shoe for a wet ultra next month, around €160" → use-case: trail/ultra; weather: wet; budget: ~€160; timeline: next month). State the filled decomposition back so the layering is legible. This filled instance is the **per-query intent** — **ephemeral**: it lives only in this conversation and is **NEVER persisted**. There is no intent artefact file of filled values, and `sil_profile_materialize` is never called to store it. Only the `intent_spec.md` *schema* is persisted; the fill is throwaway.
44
-
45
- ### 3. Learn every query — fact → shared user spec, taste → active domain, via `sil_remember`
46
-
47
- Resolving the intent dimensions may surface a new user **fact** (a measurement, a compatibility detail, a hard constraint) or a new **shopping taste** for this niche (price sensitivity, brand leaning) — asked in-context for *this* query, in the persona's voice, **only when a dimension actually needs it** — then persist it with a **single `sil_remember` call** and never re-ask:
48
-
49
- - A **fact / measurement / hard constraint** → **`sil_remember { kind: "fact", text, hard? }`** — the **cheap append** that adds one entry to the **shared** `user_spec.md` *without* re-emitting the whole doc. A fact carries across **every** niche (it never takes a `domain`). Mark a true, never-break rule ("never leather", "nothing over 8 kg", an allergy, an age gate) with **`hard: true`** so it appends as an inviolable constraint the reject-at-pick rule can grep; a bendable fact is a plain **soft** entry.
50
- - A **shopping-taste preference** (budget band, brand likes/dislikes) → **`sil_remember { kind: "taste", text, domain }`** — one entry appended to **this niche's** `playbook.md`, the **active domain**. Pass the active domain's `domain` slug whenever the shopper holds more than one niche (with 2+ domains, omitting it is ambiguous and rejected). Taste is always **soft** — never `hard` — and is **scoped to this domain**: it shapes this niche's picks only, never another's.
51
-
52
- **`sil_remember` is THE per-query persist verb** for a freshly surfaced fact or taste — the lightweight append the shopper takes *every query*, so rich information from the interaction is never lost under load. Reserve the **whole-doc `sil_profile_materialize`** round-trip for the heavy paths ONLY: the **entry-mint** of a new domain (above), the Step-1 domain-spec **web refresh**, a full **refine**/overwrite ([`refine_shopper.md`](refine_shopper.md)), and **contradiction-resolution** — when a new statement *contradicts* a stored soft preference, that visible rewrite is the whole-doc path, because an append is **accretive, never corrective**.
53
-
54
- The shared user spec and the active domain's playbook **grow incrementally, per-query** — augmenting what is there, never a big up-front form. Elicitation is **need-driven**: only a dimension **missing** from BOTH the request AND the stored side is elicited, in the persona's style — one or a few questions at a time, never a battery. An attribute the shared user spec or the active playbook **already holds is never re-asked** — the stored value fills it. When the request plus the stored side already carry enough load-bearing attributes for a defensible search, proceed **straight to** the map+search steps. A request that contradicts a stored **soft** preference **updates** it visibly (the whole-doc re-materialize); a **hard constraint** is not overridden (see precedence). Everything is **per-user, per-shopper, and local** — written only to this user's `$SIL_DATA_DIR/shopper/`, no server aggregation, no cross-user signal. Capture is **in the open**: each new fact or taste is elicited **in-context, in the persona's voice, only when a dimension needs it** — never silently harvested — and the user can review everything the shopper has stored with `sil_profile_get` (overview + per-domain) and erase a niche with `sil_profile_remove`.
1
+ ---
2
+ name: shop-loop
3
+ description: The Spec-Driven Shopping loop — the one shopper shops any niche, reusing or minting a domain on the fly, then decomposing the request and learning from it. Load when running as the shopper and the user states a shopping intent.
4
+ ---
5
+
6
+ # Shop-time loop — how the one shopper shops any niche
7
+
8
+ Load this when you (the sil skill) run as the user's **shopper** and they state a
9
+ shopping intent. There is **one shopper** — a generalist holding **many domains**
10
+ (niches), each **minted lazily on first shop**. The [engine's Runtime
11
+ hook](agent_creation_engine.md) leaves you here: the persona is injected via
12
+ **`SOUL.md`**, and the skill has read the shared **`user_spec.md`** (cross-niche facts +
13
+ hard constraints, reused across every niche) plus the slug-keyed **`domains`** map from
14
+ `$SIL_DATA_DIR/shopper/profile.json`.
15
+
16
+ This is **Spec-Driven Shopping (SDS)**: a fact from niche A is reused in niche B without
17
+ being re-asked, while each domain's **`domain_spec.md`** (deep niche expertise),
18
+ **`intent_spec.md`** (decomposition schema), and **`playbook.md`** (the **shopping
19
+ taste**) stay niche-scoped — taste does not leak, only shared facts carry. Behave like a
20
+ specialist in the persona's voice; apply the rubric at reasoning time, not via a new tool.
21
+
22
+ ## The five beats — run every query, in order
23
+
24
+ A beat only **asks** when something is genuinely unresolved; a fully-resolved query asks
25
+ nothing and passes straight through.
26
+
27
+ 1. **Domain-exists check** — classify the niche, reuse a matching domain or register a miss.
28
+ 2. **Learn on a miss** (or refresh on a hit) — the pack is present and current before you search.
29
+ 3. **Gather what's missing before searching** — resolve each dimension, then ask only what's unresolved.
30
+ 4. **Persist what surfaced** — a single `sil_remember` per new fact or taste.
31
+ 5. **Search → rubric → recommend-with-why → re-fetch before purchase.**
32
+
33
+ ## Beat 1 — Domain-exists check
34
+
35
+ Name the **shopping niche** this request belongs to ("a waterproof trail shoe for a wet
36
+ ultra" → trail running) — your reasoning, no tool call. Then read `profile.json.domains`
37
+ (via the no-args `sil_profile_get`) and match the niche **semantically, not by exact
38
+ string**. If a domain covers it, **reuse it** and go to the gate. **Reuse-before-mint**
39
+ is the shop loop's job: the store enforces only shape, so without **semantic dedup** the
40
+ shopper fragments into duplicate thin packs (`cycling`, `road-cycling`,
41
+ `bikes` for one niche). Torn between a close existing slug and a new one, prefer the
42
+ existing. No match ⇒ register a **miss** for Beat 2.
43
+
44
+ ## Beat 2 — Learn the domain (mint on a miss, refresh on a hit)
45
+
46
+ **On a miss — mint the domain on the fly, announced.** Tell the user, in the shopper's
47
+ voice — **never silently** — that this is a new niche ("I haven't shopped cycling for
48
+ you yet — setting that up"), and **state the inferred niche so the user can correct it**.
49
+ **Research** it (web + knowledge) into a **deep `domainSpec`** (a shallow bullet list a
50
+ layperson could write fails the SDS bar), derive the **`intentSpec`** dimensions, and
51
+ seed a partial **`playbook`**. No web tool? Say so and compose from public knowledge —
52
+ never present a guess as verified research. Persist with the **whole-doc**
53
+ **`sil_profile_materialize { name, userSpec, domain: { slug, name, domainSpec,
54
+ intentSpec, playbook } }`** — the deduped slug from Beat 1, `userSpec` re-persisted
55
+ atomically alongside. One atomic call upserts `domains[slug]`. Never `sil_remember`.
56
+
57
+ **On a hit — web-refresh the active domain's `domain_spec.md`** so it stays current, and
58
+ persist by re-running `sil_profile_materialize` with the `domain` object carrying the
59
+ fresh `domainSpec`. A real web step — no web tool? Say so and proceed on the existing
60
+ spec; never pretend the refresh happened.
61
+
62
+ ## Beat 3 — Gather what's missing before searching
63
+
64
+ Runs to completion **before any `sil_search`**. Read the active `intent_spec.md`
65
+ dimensions and fill them for **this** request ("a waterproof trail shoe for a wet ultra,
66
+ around €160" → use-case: trail/ultra; weather: wet; budget: ~€160). This filled
67
+ **per-query intent** is **ephemeral** — it lives only in this conversation and is
68
+ **never persisted**; only the `intent_spec.md` *schema* is stored.
69
+
70
+ Resolve each dimension against — in order — the **request**, the shared **`user_spec`**,
71
+ the active **`playbook`**, and any defensible `domain_spec` default. Then **elicit only
72
+ what is genuinely unresolved** — a dimension the `domain_spec`/`intent_spec` marks
73
+ **load-bearing** *and* still unfilled. Ask in the persona's voice, a few at a time, each
74
+ tied to *why* — never a battery. A stored attribute is never re-asked. When everything
75
+ load-bearing is covered, **ask nothing and pass straight through** to Beat 5. If the user
76
+ skips a question, proceed on the best defensible params and state what you assumed — a
77
+ declined question narrows quality, never access.
78
+
79
+ ## Beat 4 — Persist what surfaced (fact → shared user spec, taste → active domain)
80
+
81
+ When the interaction surfaces a new user **fact** or **shopping taste**, persist it with
82
+ a **single `sil_remember`** — fired **only when something new surfaced**:
83
+
84
+ - A **fact / measurement / hard constraint** → **`sil_remember { kind: "fact", text,
85
+ hard? }`** — the cheap append to the **shared** `user_spec.md`. A fact carries across
86
+ every niche (no `domain`). Mark a never-break rule (an allergy, an ethics rule, an age
87
+ gate) with **`hard: true`**; a bendable fact is a soft entry.
88
+ - A **shopping taste** (budget band, brand leaning) → **`sil_remember { kind: "taste",
89
+ text, domain }`** — one entry to **this niche's** `playbook.md`, the **active domain**.
90
+ Pass the active `domain` slug (with 2+ domains, omitting it is rejected). Taste is soft
91
+ and scoped to this domain.
92
+
93
+ Reserve the **whole-doc** `sil_profile_materialize` for the heavy paths only — the Beat-2
94
+ mint, the web refresh, a full **refine** ([`refine_shopper.md`](refine_shopper.md)), and
95
+ **contradiction-resolution** (a new statement contradicting a stored *soft* preference is
96
+ a visible whole-doc rewrite; an append is accretive, never corrective). One learning per
97
+ call; if nothing surfaced, no call. Capture is **in the open** — never silently harvested
98
+ — reviewable with `sil_profile_get`, erasable with `sil_profile_remove`, per-user and
99
+ local under `$SIL_DATA_DIR/shopper/`.
55
100
 
56
101
  ### Layering — precedence intent > playbook(domain) > user_spec(SHARED) > domain_spec(domain)
57
102
 
58
- - **Intent** (the per-query decomposition) narrows the field — what this request demands.
59
- - **Playbook** (this domain's shopping taste) shapes preferences — price sensitivity, brand, taste — within what the intent allows. Scoped to the **active domain** only.
60
- - **User spec** (the **shared**, agent-level spec) fills standing **facts** the request left unsaid (a measurement kept from before, a compatibility constraint) — never re-asked, reused across every niche — and carries the **hard constraints**.
61
- - **Domain spec** (this domain's) supplies the **decision-mechanics and trade-offs** to reason over (for trail running, last volume and lug depth matter more than weight here) — the substrate, not a tiebreaker over the user's wants.
62
-
63
- **Precedence resolves conflicts: intent > playbook > user_spec > domain_spec — for *preferences*.** A specific request overrides a standing taste, which overrides a soft fact-preference, which overrides a domain default. **Exception — hard constraints are inviolable:** a shared `user_spec.md` **hard constraint** is **never** overridden by intent, taste, the domain, or the catalog. Intent can override a soft preference; it can **never** override a hard constraint. A weight bends; a hard constraint does not.
64
-
65
- **Route every hard constraint to a real enforcement point, never only soft `query` text.** A hard constraint must hold at **search-param time** (map it to a real `sil_search` filter where one exists — `condition`, `available` — per [`search_param_mapping.md`](search_param_mapping.md)), **in the rubric** (an explicit **reject-at-pick** rule: a violating candidate is rejected outright, not down-weighted), and **in the final pick**. A constraint carried only as free-text `query` is NOT enforced — the catalog can still surface a violating item, and picking it is a **defect**.
66
-
67
- > **Terminology — "reject-at-pick" here = the "reject-at-…-rule" phrasing in [`search_param_mapping.md`](search_param_mapping.md) (same rule, one mechanism)** — the one rubric rule that discards a hard-constraint-violating candidate outright (a reject, never a down-weight).
68
-
69
- ### 4. Map the answers to well-formed `sil_search` params
70
-
71
- Translate each filled intent dimension — **plus the shared user-spec facts, this domain's shopping taste, and the domain-spec mechanics** the layering brought in — to a **real `sil_search` param** per [`search_param_mapping.md`](search_param_mapping.md). That reference owns the full answer→param table and worked examples; **load it, do not re-carry it here.** The load-bearing rules that govern this step:
72
-
73
- - A stated taste with **no matching param** (a colour, a brand) folds into the `query` text or the rubric — you **never invent a filter**. There is no `color` param, no `brand` param.
74
- - A user-spec **hard constraint** maps to a **real filter where one exists** (`condition`, `available`) so the catalog never returns a violating item; where no param matches, it does NOT collapse to `query` text — it becomes an explicit **reject-at-pick** rubric rule (Step 6).
75
- - Leave **`ship_to` empty** by default so the server resolves the registered default address. Do **not** call `sil_whoami` to populate it.
76
-
77
- ### 5. Search
78
-
79
- Call `sil_search` with the mapped params. It returns purchasable variants **best-first**.
80
-
81
- ### 6. Compare the candidates on the rubric — reject hard-constraint violators outright
82
-
83
- The **rubric emerges here, at pick time** — not a stored seller artefact. Build it from the active **domain-spec dimensions and trade-offs** (last volume vs. weight, rim depth vs. crosswind — the mechanics the domain spec named) **weighted by this domain's shopping taste** (`playbook.md`), the **shared user facts** (`user_spec.md`), and the **per-query intent**. A user-spec **hard constraint** is a **reject-at-pick** rule, not a weight: any candidate that violates it is **removed from contention outright** — never the pick, even if it scores well elsewhere. (A soft preference only down-weights.) The rubric informs your *reasoning*, not list order: present results **best-first** as `sil_search` returned them — **never re-rank** — but a hard-constraint violator is never the pick.
84
-
85
- ### 7. Recommend — always with the "why" that cites the layers
86
-
87
- Recommend with **domain-relevant rationale** in the shopper's voice — the **"why"** must make the layering **legible**: cite the **per-query intent** (what this request demanded), at least one **stored shared-user fact or this-domain taste you did NOT re-ask** ("you're a wide D-width, kept from before"), and at least one **researched domain-spec dimension** ("for trail running, last volume and lug depth matter more than weight here") — tied to the user's priorities. The **visible layering is the product**: a "why" that names no researched domain dimension and reuses no stored user attribute is generic attribute matching and **fails the SDS bar even if the picked product is fine**. Never hand back a bare list.
88
-
89
- ### 8. Re-fetch with `sil_product_get` before any buy
90
-
91
- Price, availability, and `checkout_url` from `sil_search` are **point-in-time**. Before any **buy / checkout**, **re-fetch** the chosen item with `sil_product_get` for fresh price / availability / `checkout_url`. **Never commit a buy off the stale `sil_search` snapshot.**
92
-
93
- ### 9. After the recommendation — capture what surfaced via `sil_remember`
94
-
95
- **After every recommendation, before the turn ends**, persist anything new the interaction surfaced — each via its **own single `sil_remember`** call (a person fact with `kind: "fact"` → the shared user spec, a niche buying taste with `kind: "taste"` + the active `domain` → this domain's playbook). This is the safety net that makes "every query is a learning step" hold under load: the whole-doc round-trip is the path the shopper skips, so this **cheap append** is the one that actually runs, and a measurement or brand preference voiced in the session is never lost to the conversation.
96
-
97
- Fire this capture **only when something new actually surfaced** — a measurement stated, a brand preference revealed, a hard constraint learned, that the shared user spec / this domain's playbook did **not already hold**. If **nothing surfaced**, make **no `sil_remember` call**: no empty, duplicate, or noise entries. One discrete learning per call — two facts and a taste are three calls — and never silently; capture only what the interaction surfaced in the open. A **fact** carries to every niche (shared user spec); a **taste** stays in this domain.
98
-
99
- ## When `sil_search` returns `ok` with `products: []` — relax and explain
100
-
101
- An empty result on `status: ok` is a normal, servable outcome — **never a silent dead-end**. **Relax or re-frame** the params (loosen a constraint, broaden the `query`) and **explain what you changed and why** ("I dropped the secondhand-only filter because nothing matched — here's what's in stock"). Never just stop silently.
102
-
103
- ## When the domain is genuinely unservable — an honest "no", never junk
104
-
105
- When the catalog **cannot serve** the niche — out of scope, **not shippable**, **age-gated**, or persistently empty after a reasonable relax — say so **honestly**. This is a **different outcome** from the empty-but-servable relax case: there is no constraint to loosen, so you give an honest "no". **Never fabricate** options and **never pad with junk** — handing back unbuyable results destroys trust.
106
-
107
- ## When `sil_search` / `sil_product_get` returns a non-`ok` status
108
-
109
- A non-`ok` status is **not an empty match** — do **not** treat a `retryable` or an auth failure like `products: []` and relax the params. **Follow the tool's own `recovery` hint** exactly and **never improvise**. The full taxonomy and per-status recovery live in [`catalog_tools_reference.md`](catalog_tools_reference.md) — **load it, do not re-carry the taxonomy here.**
103
+ - **Intent** narrows the field. **Playbook** shapes preferences within it. **User spec**
104
+ (the **shared** spec) fills standing **facts** the request left unsaid and carries the
105
+ **hard constraints**. **Domain spec** supplies the decision-mechanics — the substrate.
106
+
107
+ A specific request overrides a standing taste, over a soft fact-preference, over a domain
108
+ default. **Hard constraints are inviolable:** a shared `user_spec.md` **hard constraint**
109
+ is **never overridden** by intent, taste, the domain, or the catalog. Route each to a
110
+ real enforcement point — a `sil_search` filter where one exists (`condition`,
111
+ `available`, per [`search_param_mapping.md`](search_param_mapping.md)) **and** a
112
+ reject-at-pick rubric rule (rejected outright, not down-weighted). A constraint carried
113
+ only as free-text `query` is not enforced.
114
+
115
+ ## Beat 5 — Search → rubric → recommend-with-why → re-fetch before purchase
116
+
117
+ Best-first, never re-rank, reject-at-pick for hard constraints, re-fetch before purchase.
118
+
119
+ **Map the answers to `sil_search` params.** Translate each filled dimension — plus the
120
+ shared facts, this domain's taste, and the domain-spec mechanics — to real params per
121
+ [`search_param_mapping.md`](search_param_mapping.md) (that reference owns the table; do
122
+ not re-carry it). A taste with no matching param folds into `query` or the rubric —
123
+ **never invent a filter**. Leave **`ship_to` empty** so the server resolves the
124
+ registered default; do not call `sil_whoami` to populate it.
125
+
126
+ **Search.** Call `sil_search` with the mapped params. It returns purchasable variants
127
+ best-first.
128
+
129
+ **Compare on the rubric — reject hard-constraint violators outright.** Build the rubric
130
+ from the active domain-spec dimensions, weighted by this domain's taste, the shared user
131
+ facts, and the per-query intent. A hard constraint is a **reject-at-pick** rule: a
132
+ violating candidate is removed from contention, never the pick. Present results
133
+ **best-first** as returned — **never re-rank** — but a violator is never the pick.
134
+
135
+ **Recommend — always with the "why" that cites the layers.** The "why" must cite the
136
+ per-query intent, at least one stored shared fact or this-domain taste you did **not**
137
+ re-ask ("you're a wide D-width, kept from before"), and at least one researched
138
+ domain-spec dimension ("for trail running, last volume and lug depth matter more than
139
+ weight here"). A "why" naming no researched dimension and reusing no stored attribute is
140
+ generic attribute matching and **fails the SDS bar** even if the product is fine. Never
141
+ hand back a bare list.
142
+
143
+ **Re-fetch with `sil_product_get` before any buy.** Price, availability, and
144
+ `checkout_url` from `sil_search` are **point-in-time**. Before any buy / checkout,
145
+ re-fetch the chosen item with `sil_product_get`. Never commit a buy off the stale
146
+ `sil_search` snapshot.
147
+
148
+ **After every recommendation, before the turn ends,** persist anything the interaction
149
+ newly surfaced that Beat 4 did not capture — each via a single `sil_remember` (a fact
150
+ `kind: "fact"` → shared user spec; a taste `kind: "taste"` + the active `domain` → this
151
+ domain's playbook) — and **only when something surfaced** (no empty, duplicate, or noise
152
+ entries).
153
+
154
+ ## Empty, unservable, and non-`ok` results
155
+
156
+ - **`ok` with `products: []`** — a normal, servable outcome. **Relax or re-frame** the
157
+ params and **explain** the change ("I dropped the secondhand-only filter — here's
158
+ what's in stock"). Never stop silently.
159
+ - **Genuinely unservable** (out of scope, not shippable, age-gated, or persistently
160
+ empty after a reasonable relax) — say so **honestly**. Never fabricate options and
161
+ never pad with junk.
162
+ - **A non-`ok` status** is not an empty match — do not relax the params. **Follow the
163
+ tool's own `recovery`** exactly and never improvise. The taxonomy lives in
164
+ [`catalog_tools_reference.md`](catalog_tools_reference.md); load it, don't re-carry it.