sil-openclaw 0.3.9 → 0.4.1

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,68 +1,64 @@
1
1
  ---
2
2
  name: setup-onboarding
3
- description: The one-time setup script the router defers to — the five-stage onboarding progression, the after-register shopper offer, and the per-search pitch. Load while a shopper is still being set up (SKILL.md routes here); it is shed once setup is complete.
3
+ description: The one-time setup script the router defers to — the five-stage onboarding progression, the after-register shopper offer, and the per-search pitch. Load while a shopper is still being set up; shed once setup is complete.
4
4
  ---
5
5
 
6
6
  # Setting up the shopper — the staged onboarding
7
7
 
8
- The router defers the **one-time setup script** here: the five-stage **progression**, the
9
- after-register offer, and the per-search pitch. None of it applies once setup is complete
10
- — the router sheds it. Read every stage from state, never guess: `sil_whoami` (is there a
11
- sil identity yet?) plus the no-arg `sil_profile_get` overview (does a shopper exist — the
12
- `name` field — and does it hold any `domains`?). Present **only the current stage's beat
13
- and its single next step**.
8
+ The router defers the **one-time setup script** here: the five-stage progression, the
9
+ after-register offer, the per-search pitch. None applies once setup is complete — the router
10
+ sheds it. **Read the stage from state, never guess:** `sil_whoami` (registered?) + a no-arg
11
+ **`sil_profile_search`** (any `domains`?). Present **only the current stage's beat and its
12
+ single next step**.
14
13
 
15
- ## The five-stage progression — present one stage, shed it on completion
14
+ ## The five-stage progression
16
15
 
17
- 1. **Unregistered** — `sil_whoami` finds no sil identity. Before `sil_register` runs, set
18
- the expectation: state plainly what registering does and **how 4GPTs & SIL use the
19
- user's data**, grounded strictly in this plugin — no invented policy. Registering opens
20
- a browser sign-in and creates their **sil identity** (name + addresses, read by
21
- `sil_whoami`), stored **locally**; their shopper's setup and memory live in a **local
22
- profile store** under `$SIL_DATA_DIR`, never leaving the device via the plugin; catalog
23
- **search** queries sil's product catalog. Next: `sil_register`.
24
- 2. **Registered, no shopper** — a sil identity exists, no shopper yet. Bare `sil_search`
25
- works now, but is not the finished state. Guide the user to **set up their shopper**,
26
- naming **up front, before the onboarding starts**, that it takes a **couple of minutes
27
- and a few questions**. The after-register offer below owns the gate.
28
- 3. **Shopper, no domain yet** — `name` present, `domains: []`. The first shopping intent
29
- **mints the first domain**, announced with the inferred niche stated so the user can
30
- correct it. Next: state a shopping intent.
31
- 4. **Shopper active** — `name` present, `domains` non-empty. Check off the completion
32
- **milestones**: the **first domain created** (`domains` now non-empty) and, softer, that
33
- the memory tool has been used (`sil_remember` stored a fact or taste — a soft self-check
34
- judged from whether this shopper has ever remembered anything).
35
- 5. **Setup complete** — a shopper with at least one domain. **Shed** every onboarding beat:
36
- none of the stages above apply. **Show only how to use** the plugin well — the
37
- **domain-gated shop loop** and **Spec-Driven Shopping** ([`shop_loop.md`](shop_loop.md)).
16
+ 1. **Unregistered** — `sil_whoami` finds no identity. Before `sil_register`, state plainly
17
+ what it does and **how 4GPTs & SIL use the user's data**, grounded strictly in this plugin
18
+ (no invented policy): registering opens a browser sign-in creating their **sil identity**
19
+ (name + addresses, read by `sil_whoami`), stored **locally**; the shopper's setup + memory
20
+ live under `$SIL_DATA_DIR`, never leaving the device via the plugin; **search** hits sil's
21
+ catalog. Next: `sil_register`.
22
+ 2. **Registered, no shopper** — identity exists, `sil_profile_search` returns no domains, no
23
+ shopper created. Bare `sil_search` works but isn't the finished state; guide the user to
24
+ **set up their shopper**, naming up front it takes a **couple of minutes and a few
25
+ questions**. The after-register offer owns the gate.
26
+ 3. **Shopper, no domain** — the shopper was created (engine `created`) but `sil_profile_search`
27
+ still returns no domains. The first shopping intent **mints the first domain**, announced
28
+ with the inferred niche so the user can correct it. Next: state a shopping intent.
29
+ 4. **Shopper active** — `sil_profile_search` returns ≥ 1 domain. Milestones: the **first domain
30
+ created**, and softer, that `sil_learn` stored a fact or taste.
31
+ 5. **Setup complete** — a shopper with ≥ 1 domain. **Shed** every onboarding beat; **show only
32
+ how to use** the plugin well — the domain-gated six-beat loop and Spec-Driven Shopping
33
+ ([`shop_loop.md`](shop_loop.md)).
38
34
 
39
- ## After register — offer to set up the shopper, once (offer_shopper)
35
+ ## After register — offer the shopper, once (offer_shopper)
40
36
 
41
- `sil_register` returns `already_registered` with `next_step: "offer_shopper"` on a
42
- confirmed registration. That hint is a breadcrumb: first run a **no-arg `sil_profile_get`**
43
- (the overview) to read shopper state, then branch:
37
+ `sil_register` returns `already_registered` with `next_step: "offer_shopper"` on a confirmed
38
+ registration. Run a no-arg **`sil_profile_search`**, then branch:
44
39
 
45
- - **Empty store — no shopper yet:** introduce the shopper in one short beat and offer to
46
- set it up — name the value (it shops each niche in depth, reuses the sizes and hard
47
- limits it already knows so nothing is re-asked, explains why each pick fits). Load
48
- [`brainstorm_interview.md`](brainstorm_interview.md) **only if the user accepts** (a
49
- yes). Take no for an answer; bare `sil_search` stays first-class.
50
- - **A shopper already exists:** **skip this beat** entirely. The shopper is a **singleton**
51
- — never offer a second one.
40
+ - **No domains, no shopper:** introduce the shopper in one beat and offer to set it up — name
41
+ the value (shops each niche in depth; reuses the sizes + hard limits it knows so nothing is
42
+ re-asked; explains why each pick fits). Load
43
+ [`agent_creation_engine.md`](agent_creation_engine.md) **only if the user accepts** — its
44
+ Part 1 onboarding runs first, the engine only after endorsement. Take no for an answer; bare
45
+ `sil_search` stays first-class.
46
+ - **A shopper exists:** **skip this beat.** The shopper is a **singleton** — never offer a
47
+ second.
52
48
 
53
49
  ## After a bare search — the per-search pitch (post-result)
54
50
 
55
- When a plain `sil_search` **completes with status `ok`** in a **profile-less** session,
56
- present the results best-first **exactly as they came back**, then append **one short
57
- trailing line** naming what a shopper would add. It is never a pre-search question and
58
- never a re-rank. Name one or two of the three levers, rotating which you lead with:
51
+ When a plain `sil_search` **completes `ok`** in a **profile-less** session, present the results
52
+ best-first **exactly as returned**, then append **one short trailing line** naming what a
53
+ shopper adds. Never a pre-search question, never a re-rank. Name one or two of three levers,
54
+ rotating which you lead with:
59
55
 
60
- - **niche depth** — a shopper weighs these picks against how the niche actually buys;
61
- - **memory** — it keeps your sizes and hard limits on file, so no search re-asks them;
62
- - **the why** — it explains which pick fits you and why.
56
+ - **niche depth** — weighs picks against how the niche actually buys;
57
+ - **memory** — keeps your sizes + hard limits on file, so no search re-asks them;
58
+ - **the why** — explains which pick fits you and why.
63
59
 
64
- This line **recurs on every** completed profile-less search — the recurrence is the point;
65
- there is **no fire-once or seen-it gate, and no cooldown**. Brevity plus lever rotation
66
- keep it from nagging. Two things suppress it: a **shopper already exists** (that session is
67
- the shopper's — **drop the line**), or the search **did not complete `ok`** (a non-ok
68
- status carries its own recovery — follow that and add no tip).
60
+ It **recurs on every** completed profile-less search — **no fire-once gate, no cooldown**;
61
+ brevity + lever rotation keep it from nagging. Two suppressors: a **shopper exists** (that
62
+ session is the shopper's — drop the line), or the search **not `ok`** (its own recovery
63
+ carries; add no tip).
64
+ </content>
@@ -1,164 +1,113 @@
1
1
  ---
2
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.
3
+ description: The six-beat Spec-Driven Shopping loop — the state machine the shopper runs on every niche. Owns Beat 1 (classify), Beat 4 (search-space) and Beat 5 (reflect); routes Beats 2, 3 and 6 to the references that own them. Load when shopping as the shopper.
4
4
  ---
5
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/`.
100
-
101
- ### Layering — precedence intent > playbook(domain) > user_spec(SHARED) > domain_spec(domain)
102
-
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.
6
+ # The six-beat Spec-Driven Shopping loop
7
+
8
+ As the shopper you run one loop on every request — a **six-beat** state machine.
9
+ Most of it is reasoning over what you already know; you ask the buyer only about
10
+ the genuine residue. The beats, **in order**:
11
+
12
+ 1. **Classify** — resolve `{domain, product, intent}`, reuse a learned domain/PRD
13
+ before minting (owned here).
14
+ 2. **Method load / mint / refresh** — recover or research the domain's method +
15
+ its intent-keyed PRDs — [`method_and_prds.md`](method_and_prds.md).
16
+ 3. **Fill** — resolve the PRD by precedence, eliciting only the residue —
17
+ [`fill_and_feedback.md`](fill_and_feedback.md).
18
+ 4. **Search-space** — project the filled PRD into a bounded fan-out (owned here).
19
+ 5. **Reflect** — judge best-available against the PRD + method (owned here).
20
+ 6. **Feedback** — capture what the reaction surfaced —
21
+ [`fill_and_feedback.md`](fill_and_feedback.md).
22
+
23
+ This file owns Beats 1, 4 and 5.
24
+
25
+ ## Beat 1 — Classify: `{domain, product, intent}`, reuse before mint
26
+
27
+ Resolve the request through **three coordinates, top-down**: the **domain** (the
28
+ niche that owns the method), the **product** type within it, and the **intent**
29
+ (the use-context that reshapes the requirements). **Intent is always present**: a
30
+ **context-free** request keys the `general` intent (`ski/boots-general`), so every
31
+ job carries all three coordinates and stays uniformly queryable.
32
+
33
+ **Reuse-before-mint.** Query existing coordinates with **`sil_profile_search`**
34
+ (the frontmatter-as-truth discovery tool — never a filesystem guess) and
35
+ **semantic-match** the request: **prefer existing** when a learned domain/PRD
36
+ covers the job, mint only when nothing does. The one guard against over-merging is
37
+ the requirements-divergence test — two requests share a PRD only if they resolve
38
+ to the same requirements.
39
+
40
+ **Never over-ask just to key.** A silent request keys `general` and moves on —
41
+ keying forces no extra question. When intent is genuinely requirement-defining but
42
+ the request is silent, that surfaces as the first Beat-3 question, not a keying
43
+ interrogation.
44
+
45
+ **Announce a mint.** A new-domain or new-PRD mint is **announced** — state the
46
+ inferred `domain / product / intent` so the buyer can **correct** it, **never
47
+ silent**. A reuse passes through unannounced.
48
+
49
+ ## Beat 4 — Search-space: a bounded, priority-ordered fan-out (not a re-rank)
50
+
51
+ Project the filled PRD onto **`sil_search`** as a **bounded ≤ 4 priority-ordered**
52
+ fan-out — not one search, not unbounded (the bound is a production budget: each
53
+ call is a round-trip + tokens):
54
+
55
+ - **Call 1 is the tightest projection of the PRD's core** (its load-bearing
56
+ requirements); **calls 2–4 are deliberate widenings** — relax the least
57
+ load-bearing requirement, an adjacent phrasing that lifts recall, or an explicit
58
+ either/or branch. **Core first, widenings after** — the **priority order**.
59
+ - **Merge = dedup + concatenate in issue order — NOT a re-rank.** Concatenate the
60
+ per-call backend-ranked lists in issue order and **drop** any product already
61
+ **seen** earlier. Because issue order *is* priority order, this **never
62
+ re-ranks** — the engine owns order *within* a call, the fan-out *across* calls.
63
+ - **Project each requirement onto the tightest real channel, in this order:**
64
+ 1. an **existing** `sil_search` **param** where one fits (`category`,
65
+ `price_min`/`price_max`, `condition`, `available`, `local_merchants`);
66
+ 2. else a **`filters.specs` predicate**, built from the method's Beat-2 canonical
67
+ `## Search vocabulary` (the `sil_specs`-coined names) — one `{ns, key, op,
68
+ value, unit?, hard?}` per annotated requirement, marking an inviolable one
69
+ `hard:true`. **Prefer a dedicated param over a predicate** for the SAME
70
+ attribute — never both (a `price_max` param OR a price spec);
71
+ 3. else a purely descriptive residue (a colour, a phrasing) — fold it into the
72
+ free-text `query`, which **you author yourself**. The plugin is **pure
73
+ transport**: it never folds a predicate into `query`, so a requirement that
74
+ belongs in `filters.specs` stays a predicate, never `query` prose.
75
+ Leave **`ship_to`** empty (the server resolves the registered default). **Never
76
+ invent** a param or predicate that isn't real — the real `sil_search` params live in
77
+ its tool description, the predicate vocabulary in the domain method. Then read the
78
+ per-predicate **`specs_status`** the response returns (each `{ns, key, applied}`) — it
79
+ feeds
80
+ Beat 5's honesty pass, which rejects at pick any `hard` predicate the backend left
81
+ `applied:false`.
82
+
83
+ ## Beat 5 — Reflect: honesty pass first, judgment not threshold, propose-and-wait
84
+
85
+ Take Beat 4's merged issue-order list and its per-call `specs_status`. Run
86
+ **honesty pass → judge → branch**, and **never re-rank**: the engine owns order,
87
+ you own the verdict.
88
+
89
+ **1 — Honesty pass, first.** Before judging fitness, walk the survivors and
90
+ **reject-at-pick** any candidate that violates a *hard* constraint the backend
91
+ could not enforce — exactly the predicates the response marked **`applied:false`**,
92
+ plus the `user_spec` `[hard]` markers. A violator leaves contention, never becomes
93
+ the pick; if rejection empties the set, take the empty path.
94
+
95
+ **2 — Judge, then branch.** Weigh the best surviving candidate against the PRD +
96
+ method. Satisfies-or-falls-short is a **judgment**, **not a threshold** and not a
97
+ mechanical any-unmet-requirement rule — read the whole set.
98
+
99
+ - **Satisfies → a hero + 1–2 justified alternatives.** Lead with **one**
100
+ recommendation carrying the SDS-bar *why* (a met requirement, a researched method
101
+ mechanic, a stored preference reused without re-asking), then **one or two**
102
+ considered **alternatives**, each with a one-line reason. Best-first **as
103
+ returned** — **never re-rank**, never a bare list.
104
+ - **Shortfall or empty → propose a specific relaxation and wait.** Name the gap,
105
+ show the closest survivors, **propose** the specific change that would widen it,
106
+ then **wait** for the buyer's nod. **No silent re-search**, no silent auto-widen;
107
+ the buyer can redirect instead.
108
+
109
+ A **non-`ok`** status is not an empty match — do not relax params; follow that
110
+ tool's own **`recovery`** exactly.
111
+
112
+ **Then Beat 6.** The buyer's reaction is what Beat 6 captures —
113
+ [`fill_and_feedback.md`](fill_and_feedback.md).
@@ -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).