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,79 +1,139 @@
1
- # Create your sil-wired shopper — the agent-creation engine
2
-
3
- **Precondition: run this ONLY after the user has explicitly endorsed the assembled draft from [`brainstorm_interview.md`](brainstorm_interview.md).** Any step below before that endorsement is forbidden — the interview owns the gate.
4
-
5
- When the user wants to **set up shopping**, author and persist **one** valid OpenClaw agent profile — the user's **shopper**: a real new agent under the host `agents` config, with the **sil plugin enabled**, the **sil skill attached**, its persona written into the workspace **`SOUL.md`**, plus the shopper's **shared user spec** in the sil data directory — so it shops with **no further setup**. The shopper is a **singleton**: you create it **once**, then it learns **domains** (niches) lazily on first shop — you never mint a second shopper.
6
-
7
- The shopper runs **entirely on Spec-Driven Shopping (SDS)** — the operating model, not an optional layer. At create time the engine persists exactly **one** sil artefact: the **shared, agent-level `userSpec`** (the person's cross-niche facts + hard constraints, seeded *partial* by the interview). It does **NOT** research any niche or write any per-domain pack at create time — there is **no** `domainSpec` / `intentSpec` / `playbook` here. Those are minted **lazily, per niche, on first shop** ([`shop_loop.md`](shop_loop.md)) into `domains/<slug>/`. A freshly-created shopper has an **empty `domains` map** — that is **healthy**, not a deficiency.
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
+ ---
8
5
 
9
- You are the engine: the host config write (and the `SOUL.md` write) is **you driving the host's own `openclaw …` CLI** — the sil plugin never writes the host config. Run the steps **in order, top to bottom** — the order is the spec.
10
-
11
- ## The profile spec (input)
6
+ # Create your sil-wired shopper — the agent-creation engine
12
7
 
13
- 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:
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.
10
+
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.
18
+
19
+ ## The one command
20
+
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>`**):
26
+
27
+ ```
28
+ sil-openclaw-create-shopper <<'JSON'
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" }
33
+ JSON
34
+ ```
35
+
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.
41
+
42
+ ## The spec (input)
14
43
 
15
44
  | Field | Meaning | Goes to | Required? |
16
45
  |---|---|---|---|
17
- | **agentId** | Lower-kebab id (e.g. `my-shopper`) → `agents.list[].id`. Unique, never `main`. | host | Required |
46
+ | **agentId** | Lower-kebab id → `agents.list[].id`. Unique, never `main`. | host | Required |
18
47
  | **name** | Human-readable name ("My Shopper"). | sil manifest | Required |
19
- | **persona** | Who this shopper is and how it shops — a generalist, voice/tone, standing rules. | host **`SOUL.md`** (via host CLI — no `persona.md`) | Required (non-empty) |
20
- | **workspace** | The shopper's workspace directory (e.g. `~/.openclaw/workspace-my-shopper`). | host | Required for the non-interactive add |
21
- | **userSpec** | The user's **shared, cross-niche** facts + hard constraints (addresses, sizes, allergy/ethics rules, budget psychology). **Seeded partial** by the interview, then augmented per-query. | sil `user_spec.md` | **Required (non-empty)** |
22
-
23
- There is **no** per-niche input at create time. The deep `domainSpec`, the derived `intentSpec` schema, and the niche `playbook` are **not** authored here — they are researched and minted on first shop in each niche.
24
-
25
- The **sil plugin** and **sil skill** are always attached (that is what makes it *sil-wired*). Creation is **local and offline** — it does **not** require or perform sil registration, reads no token, and writes nothing to identity storage. The shopper registers the user later, on first shop, via `sil_register`. Do **not** present registration as a prerequisite.
26
-
27
- ## The created shopper needs WEB tools
28
-
29
- The shopper **lazily mints a domain on first shop** (its research pass reaches the web) and **web-refreshes each domain spec on every query**. So the created agent must have **web/fetch tools in its tool profile** — inherited from `agents.defaults` when its shell is created (step 3). Confirm that profile grants a web-fetch/browse capability and **do not deny it** (alongside not denying the `sil_*` tools). If `agents.defaults` does **not** grant a web tool, the shopper cannot research or refresh a domain — surface that to the user as a host-capability gap; do **not** pretend the research happened.
30
-
31
- ## Engine steps (run in this exact order)
32
-
33
- 1. **Validate the spec FIRST — before anything is written.** Check `agentId` (present, lower-kebab, unique-looking, ≠ `main`), `name`, `persona`, `workspace`, and the **shared `userSpec` — present and non-blank** (the only sil artefact at create; it is seeded *partial* by the interview, never omitted). There is **no** `domainSpec` / `intentSpec` / `playbook` to validate here — those are minted lazily on first shop. On any failure, stop with **`invalid_request`** naming the field and **write nothing**. This runs ahead of every host command, so a bad spec never reaches the host.
34
-
35
- 2. **Singleton check — a user has exactly ONE shopper.** The shopper is a singleton: a user creates it **once**, then adds domains to it. Run `openclaw agents list --json` and read the sil artefact store (the no-args `sil_profile_get`, whose overview is `ok` empty-is-healthy when no shopper exists); if a sil shopper **already exists**, stop with **`collision`** — **"a shopper already exists"** — and **do not** run `openclaw agents add`. Steer the user to **shop a new niche** (which lazily mints a domain on the spot) or **refine the existing shopper** — **never mint a second shopper**. (An `agentId` that collides with any existing agent is likewise refused — never overwrite an existing agent's persona or wiring.)
36
-
37
- 3. **Create the agent shell (host CLI).** Run:
38
- ```
39
- openclaw agents add <agentId> --workspace <workspace> --non-interactive --json
40
- ```
41
- This creates the real `agents.list[]` entry and the workspace bootstrap files (`SOUL.md`, `AGENTS.md`, …), inheriting model and **tool profile** (which must grant **web/fetch** — see above) from `agents.defaults`. `--non-interactive --json` lets you drive it without a prompt and read the result.
42
-
43
- 4. **Write the persona into the workspace `SOUL.md` (host CLI).** The persona is the shopper's soul / system framing — the host's `SOUL.md`, **not** a sil artefact. Write the endorsed persona text straight into the new agent's `SOUL.md` via the host CLI. There is **no** `persona.md` in the sil store and **no** copy step — the persona lives in exactly one place.
44
-
45
- 5. **Materialize the shared user spec — NO `domain`.** Call **`sil_profile_materialize`** with **`{ name, userSpec }`** — the shared `userSpec` seeded by the interview (partial, augmented per-query). The shopper is a singleton, so this sil-tool call takes **no `agentId`** (the host agent id lives only in the host-CLI wiring above). **Pass NO `domain`** at create: with no `domain`, the tool writes the shared **`user_spec.md`** + **`profile.json`** (with an **empty `domains: {}` map**) into the fixed **`$SIL_DATA_DIR/shopper/`**, atomically. There is **no** `domain_spec.md` / `intent_spec.md` / `playbook.md` yet — the first shop in a niche mints that niche's pack (with a `domain` object) lazily. There is **no `persona.md`** here. The tool's outcomes are `ok` / `invalid_request` / `persistence_failed` — on `invalid_request` it wrote nothing; on `persistence_failed` it left nothing partial.
46
-
47
- 6. **Wire the sil skill + plugin (host CLI).** Asserted against the pinned host — **`alpine/openclaw:2026.6.9`** — both value-mode sets with `--strict-json` (the only set mode this image accepts):
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):
48
86
  ```
49
87
  openclaw config set 'agents.list[<i>].skills' '["sil"]' --strict-json
50
88
  openclaw config set plugins.entries.sil.enabled true --strict-json
51
89
  ```
52
- The skill attach makes the agent **know how** to drive the tools; the plugin enable turns the sil plugin **on** — but it does **not** by itself un-filter the `sil_*` tools (see the admission step next). Keep `sil` in the agent's skill list and do not deny the `sil_*` tools.
53
-
54
- 7. **Admit sil at the host allow surfaces — run the shipped helper.** Enabling the plugin is necessary but not sufficient: until `sil` is admitted at the **global** allow surfaces `plugins.allow` + **`tools.alsoAllow`**, the host keeps the `sil_*` tools **filtered**, so the shopper can't call them. Admission is **plugin-ID only** — there is no per-tool key. The value-mode `openclaw config set` above is **overwrite-only** on this image, so it cannot additively merge those shared global arrays without clobbering another already-admitted plugin (e.g. `klodi`). Run the shipped admission helper — the package `bin` that ships with the plugin (same artefact as the `openclaw:allowlist` script) — which performs the **additive, idempotent, atomic, self-validating** three-surface merge (`plugins.allow` + `tools.alsoAllow` + `plugins.entries.sil`):
55
- ```
56
- sil-openclaw-allowlist
57
- ```
58
- It re-confirms the plugin-enable as an idempotent no-op, so re-running it on every creation never duplicates or clobbers an existing entry. **If the helper exits non-zero (a failed admission), report `persistence_failed` with the path + cause and do NOT declare `created`** — never a green `created` over still-filtered tools, exactly as a rejected `openclaw config validate` is handled in the next step.
59
-
60
- 8. **Validate with the host's OWN check, THEN declare created.** Run `openclaw config validate --json`. The verdict is `{ valid, path, issues? }` — success keys off **`.valid`**, never an `ok` field. Only when `valid: true` **and** the allow-list admission (step 7) succeeded do you report **`created`**. If `valid: false`, the admission helper exited non-zero, or any CLI step failed, report **`persistence_failed`** with the failing **path** + **cause** (the `issues?`), leaving nothing partial.
61
-
62
- 9. **Tell the user it is ready.** On `created`, tell them their shopper exists and how to open it. Opening it loads the persona (`SOUL.md`) and the shared user spec + the (empty) `domains` map (`profile.json`), and — because the `sil_*` tools were admitted in step 7 — the shopper calls `sil_search` / `sil_product_get` (and `sil_register` / `sil_whoami` as needed) on the user's intent with **no further setup**, **minting each niche's domain pack on the fly** the first time the user shops it.
63
-
64
- ## Status taxonomy (agent-creation engine)
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
65
121
 
66
122
  | `status` | Meaning | What to do |
67
123
  |---|---|---|
68
- | `created` | Shopper added, shared user spec materialized, sil plugin + skill wired, `openclaw config validate` accepted it. | Tell the user it's ready and how to open it. |
69
- | `invalid_request` | Spec failed validation (missing/blank field). **Nothing written.** | Name the field, fix it, run again — do NOT proceed to `openclaw agents add`. |
70
- | `collision` | A shopper already exists (the singleton). | Surface it — "a shopper already exists"; steer to shop-a-new-niche (lazy mint) or refine. **Never mint a second shopper.** |
71
- | `persistence_failed` | A write, the allow-list admission helper (non-zero exit), or `openclaw config validate` step failed. **Nothing partial** left. | Fix the reported path/cause, create again. |
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). |
72
128
 
73
129
  ## Runtime — how the shopper loads its behaviour
74
130
 
75
- When you (the sil skill) start a session as the shopper, the host has already injected the persona via the workspace **`SOUL.md`**. Then read `$SIL_DATA_DIR/shopper/profile.json` and load:
76
- - the **shared `user_spec.md`** — the person's cross-niche facts + hard constraints (seeded partial, augmented per-query), reused across **every** niche;
77
- - the slug-keyed **`domains`** map — the niches the shopper has already learned. An **empty** map is healthy; the per-domain packs (`domains/<slug>/{domain_spec,intent_spec,playbook}.md`) load **lazily at shop time**, not here.
78
-
79
- Loading these is what lets the shopper shop any niche with no further setup. When the user states a shopping intent, shop per [`shop_loop.md`](shop_loop.md) — the loop that classifies the niche, **reuses an existing domain or mints one on the fly**, then on **every query** web-refreshes that domain's spec, decomposes the request along its intent-spec dimensions (the ephemeral per-query intent), and **learns** every query (a fact → the shared `user_spec.md`, a taste → the active domain's `playbook.md`, each via a single `sil_remember` append). To sharpen the shopper or one of its domains from observed sessions, see [`refine_shopper.md`](refine_shopper.md).
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).
@@ -1,61 +1,97 @@
1
- # Set up your shopper — the onboarding interview
2
-
3
- When the user asks to **set up shopping** — "create my shopper", "set up an agent that shops for me", "I want something that shops for me" — do **not** jump to the engine. Run a short, **two-touchpoint** onboarding that shapes the shopper *with* the user, then **create nothing** until the user endorses the assembled draft. The agent-creation engine ([`agent_creation_engine.md`](agent_creation_engine.md)) only runs **after** that explicit endorsement.
4
-
5
- This is a **conversation, not a form-fill** — and a **short** one. The shopper is a **generalist**: it goes deep on whatever the user later buys, **lazily minting a domain on first shop in each niche**. So onboarding does **NOT** research any niche and does **NOT** ask the user to pick one. It touches exactly **two** things: the **persona** (how their shopper should behave) and a **shared user-spec seed** (cross-niche facts + hard constraints). Everything niche-specific — how to shop a niche well, what each request in it should resolve, the niche shopping taste — is **deferred to first shop**, not authored here.
6
-
7
- ## The two onboarding touchpoints — persona + shared user spec
8
-
9
- A created shopper runs on a persona (`SOUL.md`) plus the **shared, agent-level `user_spec.md`**, both seeded here. The per-domain packs are minted lazily at shop time, not at onboarding.
10
-
11
- | Artefact | Where | What it holds | Seeded |
12
- |---|---|---|---|
13
- | **`SOUL.md`** (persona) | host workspace (via host CLI) | the shopper's identity / voice / standing rules — a **generalist**, not a niche specialist | at onboarding (§1 below); refined on persona refine, stable per query |
14
- | **`user_spec.md`** (shared) | sil data dir (**required**) | the user's **cross-niche** facts + hard constraints (addresses, sizes, allergy/ethics rules, budget psychology) | seeded partial at onboarding (§2); augmented every query, reused across **every** niche |
15
-
16
- The niche packs — the deep niche know-how, the per-request template a query is resolved against, and the niche shopping taste — are **NOT** authored here; they are minted **on first shop in each niche** ([`shop_loop.md`](shop_loop.md)). The per-query fill (the template filled in for one request) is **ephemeral** — never persisted, never authored here.
17
-
18
- ## Principles for the interview
19
-
20
- - **Two touchpoints, no niche research.** Touch the persona and the shared user spec — that is the whole onboarding. The shopper is a **generalist**; there is **no narrow-the-niche step** and **no domain interview**. The deep niche expertise is researched **lazily, at first shop**, never interrogated here.
21
- - **The persona question shapes voice, not a niche.** Asking "how should your shopper behave?" surfaces the **voice / standing rules** — terse vs. chatty, cautious vs. opinionated, any never-break rules. It does **not** bind the shopper to one niche.
22
- - **Seed the shared facts, ask little.** The shared user spec holds cross-niche facts + hard constraints that carry across every niche. Seed what the user volunteers — don't run a questionnaire; the rest is **augmented per-query** at shop time.
23
- - **Converge, don't accumulate.** Reflect a short summary back and get a yes/adjust before advancing. The flow is **collaborative** and **re-entrant** — the user can revise an earlier touchpoint at any point.
24
- - **Endorsement is a gate, not a formality.** Until the user explicitly says "create it", run **zero** engine steps. The draft lives only in the conversation.
25
-
26
- ## Run the interview in this order — two touchpoints
27
-
28
- ### 1. `SOUL.md` — ASK FIRST: persona + behaviour (a generalist shopper)
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
+ ---
29
5
 
30
- Open by reflecting the request back ("let's set up your shopper"), then ask the **persona/identity** question: **"How do you want your shopper to behave?"** — its voice/tone (terse vs. chatty, cautious vs. opinionated) and any **standing rules** it should always follow. This is the shopper's **system framing**, a **generalist** that will shop whatever the user buys — **not** a niche choice; the niche is decided later, per query, when the user actually shops. Reflect a short persona summary back and confirm. This becomes the host workspace **`SOUL.md`** (the persona is the agent's system framing — **not** a sil artefact, no `persona.md`).
31
-
32
- ### 2. `user_spec.md` (shared) — seed the cross-niche facts + hard constraints
33
-
34
- Seed the **shared user spec**: the user's **cross-niche** facts and any **hard constraints** that should hold in *every* niche — addresses / sizes the user volunteers, an allergy or ethics rule ("never leather"), a budget psychology. Mark each as **hard** (inviolable — an allergy, an ethics rule, an age gate) vs **soft** (a bendable preference). Don't run a questionnaire — seed what the user offers; the rest is **augmented per-query** at shop time, and a niche-specific fact is learned when that niche is first shopped. If the user gives little, seed a minimal honest body (e.g. "cross-niche facts to be learned as we shop; no hard constraints stated yet") — non-blank, but partial. This lands in `userSpec` (→ the shared `user_spec.md`). **No niche taste, no domain question, no intent dimensions are gathered here** — those belong to first-shop lazy mint.
35
-
36
- ### 3. Derive the identity, assemble, endorse
37
-
38
- - **Identity.** Propose an `agentId` (lower-kebab, `^[a-z0-9][a-z0-9-]*$`, never `main`) and a human-readable `name` ("My Shopper" / `my-shopper`). **Confirm both** — never silently invent them.
39
- - **Assemble + present.** Compose **`{ agentId, name, persona, userSpec }`** and present a **readable summary**: who the shopper is (its persona/voice + standing rules) and the **seeded shared user spec** (cross-niche facts + hard constraints, partial, to grow per-query). Self-check the shape against the engine's contract: `agentId` lower-kebab & ≠ `main` (it keys the host `openclaw agents add`, not the sil tool), non-blank `name`/`persona`, and a non-blank shared `userSpec` — the only sil artefact at create (the engine passes just `name` + `userSpec` to the singleton `sil_profile_materialize`; no niche pack is authored here). This is shape-only — it writes nothing; the engine's validate-first step is the authoritative gate.
40
- - **Endorse — the gate.** Ask for an explicit go-ahead ("shall I create your shopper?"). Endorsement is an **affirmative user act** on the assembled draft — "yes, create it" / "go ahead". It is **NOT** inferred from the user answering the last question, and **NOT** from silence. **Only on that explicit endorsement** do you proceed to the engine ([`agent_creation_engine.md`](agent_creation_engine.md)).
41
-
42
- ## Edge cases the interview handles gracefully
43
-
44
- - **A shopper already exists (the singleton).** The shopper is a singleton — the engine refuses a second create (its `collision` outcome, "a shopper already exists") and never clobbers the existing one. Surface it and steer the user to **shop a new niche** (which lazily mints a domain on the spot) or **refine the existing shopper** — **never** mint a second shopper, never silently mutate the existing one.
45
- - **Abandon mid-flow.** Because **no engine step runs before endorsement**, abandonment leaves **nothing created** — no host agent, no artefacts, no wiring, no teardown. Never "save progress" by writing artefacts early.
46
- - **Creation is local + offline (for the user's identity).** Creating a shopper neither requires nor performs sil registration. Do **NOT** present sil registration or a token as a prerequisite to create the shopper; it registers the user later, on first shop, via `sil_register`. (No web access is needed at onboarding either — the niche research that reaches the web happens later, at first shop.)
47
-
48
- ## Business rules (invariants the interview holds on every path)
49
-
50
- 1. **No creation without explicit endorsement.** Nothing is written — not the host agent, the `SOUL.md`, the shared user spec, or the wiring — until the user explicitly endorses. The draft lives only in the conversation until then.
51
- 2. **Abandon-mid-flow creates nothing.** No engine step runs pre-endorsement, so an abandoned interview leaves no partial shopper — automatic, not a teardown.
52
- 3. **Two touchpoints only — persona, then shared user spec.** `SOUL.md` (ask first — persona/voice, a generalist, NOT a niche) and the shared `user_spec.md` (cross-niche facts + hard constraints). **No** niche know-how, no niche shopping taste, and no per-request template work at onboarding — those move to first-shop lazy mint.
53
- 4. **No niche is researched or chosen at onboarding.** The shopper is a generalist; the deep niche know-how, the per-request template, and the niche shopping taste are minted **lazily, on first shop** in each niche ([`shop_loop.md`](shop_loop.md)). Onboarding never interrogates a niche or asks the user to pick one.
54
- 5. **Converge each touchpoint before advancing; stay re-entrant.** Reflect-and-confirm per touchpoint; let the user revise an earlier one.
55
- 6. **Singleton: refuse a second shopper; never clobber.** Defer to the engine's `collision` refusal ("a shopper already exists"); steer to shop-a-new-niche or refine.
56
- 7. **Creation is local + offline for the user's identity.** Never present sil registration / a token as a prerequisite to create.
57
- 8. **The persona is the host `SOUL.md`, not a sil artefact.** No `persona.md` in the sil store. The only sil artefact seeded at create is the **shared** `user_spec.md`; the niche packs (the deep niche know-how, the per-request template, the niche shopping taste) are minted later, per niche.
58
-
59
- ## After endorsement
6
+ # Set up your shopper — the onboarding interview
60
7
 
61
- Once the user has **explicitly endorsed** the assembled draft, proceed to [`agent_creation_engine.md`](agent_creation_engine.md) and run the engine steps in order. Until that explicit endorsement, **zero engine steps** have run.
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,34 +1,32 @@
1
- # sil catalog + identity tools — per-tool behaviour and the shared status taxonomy
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
+ ---
2
5
 
3
- Load this reference when driving any of the four core tools — `sil_register`,
4
- `sil_whoami`, `sil_search`, `sil_product_get`. It holds how each tool behaves and
5
- the status taxonomy every shopping tool shares. The router in `SKILL.md` names
6
- which tool an intent maps to; this reference is what that tool actually does.
6
+ # sil catalog + identity tools — per-tool behaviour and the shared status taxonomy
7
7
 
8
- All four return the canonical envelope: a single text content block whose JSON
9
- body carries a `status`. Prices are in the currency's ISO 4217 minor unit (e.g.
10
- cents).
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.
11
12
 
12
- ## How each tool behaves
13
+ ## Per-tool behaviour
13
14
 
14
- - **`sil_register`** starts browser-based registration. It returns promptly with
15
- `status: "awaiting_browser"` and an `auth_url` — share that URL with the user.
16
- The plugin polls in the background; once the user finishes signing in, call
17
- `sil_register` again to confirm (it reports `already_registered`).
18
- - **`sil_whoami`** returns the registered user's identity (name and addresses).
19
- An expired session token is refreshed transparently and the read retried; if the
20
- session is fully dead, the result names the recovery (`sil_register`).
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`).
21
22
  - **`sil_search`** returns a ranked list of purchasable variants (`id`, `title`,
22
- `price`, `availability`, `checkout_url`, `source`), best match first — present
23
- them in order, do not re-rank. An empty list means nothing matched: a normal
24
- `ok` outcome, not an error. Use the returned `cursor` for the next page; its
25
- absence means no more results (never infer end-of-results from page size).
26
- - **`sil_product_get`** is the lookup companion to `sil_search`. Pass ids already
27
- held and get the matching products back with fresh detail (description, options,
28
- the featured variant). Each variant carries an `inputs` list correlating it back
29
- to the id(s) asked about (the response is NOT in request order). Ids that no
30
- longer resolve come back in a `not_found` list — a normal partial-success
31
- outcome, not an error; the other products are still valid.
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.
32
30
 
33
31
  ## Status taxonomy (shared across the shopping tools)
34
32
 
@@ -41,6 +39,6 @@ cents).
41
39
  | `invalid_request` | The query/ids were rejected (e.g. empty input). | Fix the input and call again — do NOT re-register. |
42
40
  | `retryable` | A transient network/5xx blip. | Try the same call again — do NOT re-register. |
43
41
 
44
- On a non-`ok` status, say what happened and follow the tool's own `recovery`
45
- hint — never improvise a different one (re-registering can't fix a bad query or a
46
- transient 5xx, and would derail the user).
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,56 +1,77 @@
1
- # Manage your shopper's domains — view, forget
1
+ ---
2
+ name: manage-domains
3
+ description: View or forget the shopper's learned domains — the two sil_profile tools, the two remove granularities, confirm-before-remove. Load when the user wants to see what the shopper knows or forget a niche.
4
+ ---
2
5
 
3
- Load this when the user wants to see what their **shopper** knows or **forget a domain** (a niche) — "what does my shopper know?", "which domains has it learned?", "show me the cycling domain", "forget the grocery niche". The router in `SKILL.md` names which `sil_profile_*` tool each intent maps to; this reference is what those tools do, plus the **two remove granularities** and the confirm-before-remove gate.
6
+ # Manage your shopper's domains — view, forget
4
7
 
5
- These are pure local-lifecycle operations over the two stores the create-engine established — **host config + workspace `SOUL.md` = wiring + persona; `$SIL_DATA_DIR/shopper/` = the shared user spec + per-domain packs**. No server call, no token read, no identity coupling: a shopper with zero domains still shops generically — the first shop in a niche mints it. The shopper is a **singleton**, scoped to the fixed `$SIL_DATA_DIR/shopper/` path, so these tools take **no caller `agentId`** — only an optional `domainSlug` to address one niche.
8
+ Load this when the user wants to see what their **shopper** knows or **forget a domain**
9
+ (a niche) — "what does my shopper know?", "which domains has it learned?", "show me the
10
+ cycling domain", "forget the grocery niche". The router names which `sil_profile_*` tool
11
+ each intent maps to; this reference is what those tools do, plus the **two remove
12
+ granularities** and the confirm-before-remove gate.
6
13
 
7
- **The source of truth for "what the shopper knows" is the sil artefact store, not the host agent list.** The directory `$SIL_DATA_DIR/shopper/` with a readable `profile.json` IS the shopper; its `domains` map is the niche index. A bare host `agents.list[]` entry without a `profile.json` is just a host agent, not ours to view/forget. Always read `profile.json`, **never the host agent list**, to decide what exists.
14
+ These are pure local-lifecycle operations — no server call, no token read. The shopper is
15
+ a **singleton** scoped to the fixed `$SIL_DATA_DIR/shopper/` path, so these tools take
16
+ **no caller `agentId`** — only an optional `domainSlug`. **The source of truth is the sil
17
+ artefact store, not the host agent list:** `$SIL_DATA_DIR/shopper/` with a readable
18
+ `profile.json` IS the shopper; its `domains` map is the niche index. Always read
19
+ `profile.json`, **never the host agent list**, to decide what exists.
8
20
 
9
21
  ## Match intent to a tool
10
22
 
11
23
  | Intent | Tool |
12
24
  |---|---|
13
- | "what does my shopper know?" / "which domains has it learned?" / "show me the shopper" (overview) | `sil_profile_get` (no `domainSlug` — the overview absorbs the old listing) |
25
+ | "what does my shopper know?" / "which domains has it learned?" (overview) | `sil_profile_get` (no `domainSlug`) |
14
26
  | "show me / tell me about the &lt;niche&gt; domain" | `sil_profile_get` (pass the `domainSlug`) |
15
27
  | "forget / remove / delete the &lt;niche&gt; domain" | `sil_profile_remove` (pass the `domainSlug`) |
16
- | "decommission / tear down my whole shopper" | host CLI `openclaw agents remove <agentId>` **FIRST**, then clear the artefact tree (see the two granularities) |
17
-
18
- ## How the read tool behaves
19
-
20
- `sil_profile_get` reads the **singleton** shopper in two modes:
21
-
22
- - **No `domainSlug` (overview — the folded listing):** returns the shopper's `name`, the **shared `userSpec`** (the person's cross-niche facts + hard constraints), and the **`domains` index** (each niche's `slug`, `name`, `createdAt`, `updatedAt` — no per-domain bodies), plus any degraded directory in **`unreadable`**. A shopper **with no domains yet still reads ok, with an empty domain index — that is healthy, not an error** (the first shop in a niche mints it); so is an empty store ("you haven't set up a shopper yet" → point at create — it returns `ok`, never `not_found`). Render a human summary: the shopper, what it knows about the user (shared facts + hard constraints), the domains it has learned, and a wiring summary (a real host agent, sil plugin enabled, sil skill attached, ready with no further setup). A degraded/legacy directory lands in `unreadable` — mention it inline, but never let it hide the healthy state. (A flat-layout directory left over from the retired one-agent-per-niche model reads as `unreadable` — frame it as an **old-model leftover** and steer the user to re-create their shopper; do not try to read it as a domain.)
23
- - **With a `domainSlug` (one domain):** returns that niche's pack — `domainSpec` + `intentSpec` + `playbook` (the niche buying taste) **plus** the shared `userSpec`. Render the niche (from the domain spec), its decomposition dimensions, and the buying taste learned for it. An unminted/unloadable domain returns `not_found` (its `recovery` is `sil_profile_get`, the no-args overview) — frame it plainly ("no `<slug>` domain — here's what the shopper has learned") and list what DOES exist. **Never surface a stack trace or a raw filesystem path.**
24
-
25
- ## The two remove granularities — forget a domain vs decommission the shopper
26
-
27
- Removal is **destructive and irreversible**, so **confirm before removing**: state exactly what will be deleted and proceed only on the user's **explicit go-ahead**. There are **two distinct granularities** — pick the one the user means, and when ambiguous, ask:
28
-
29
- ### Forget ONE domain (the common case — `sil_profile_remove`)
30
-
31
- "forget the grocery niche", "remove the cycling domain", **"delete the grocery agent"** now mean **forget that one DOMAIN** — the niche pack only. The shopper, the **shared user spec**, and **every sibling domain survive**. This is the **artefact half only**, scoped to one niche; **no host wiring is touched** (the shopper agent stays):
32
-
33
- - Call **`sil_profile_remove { domainSlug }`** — `domainSlug` is **REQUIRED** (it never deletes the whole shopper). It removes exactly the one `domains/<slug>/` leaf and de-registers it from the manifest. A malformed/traversal/`main`/missing slug returns `invalid_request` and deletes nothing; an unregistered slug returns `not_found` (idempotent — safe to re-run); a filesystem failure returns `persistence_failed`.
34
- - After it, confirm the domain is gone and the shopper, the shared user spec, and its **sibling domains are untouched**.
35
-
36
- ### Decommission the WHOLE shopper (the host-CLI-first path)
37
-
38
- "tear down my shopper", "decommission the whole thing" means remove the **entire shopper** — host wiring + `SOUL.md` + the whole artefact tree. This is the **host-CLI-first** flow, for the **whole agent** (not a single niche):
39
-
40
- 1. **Existence check (read).** Run `openclaw agents list --json` and confirm the `agentId` is the sil-wired shopper.
41
- 2. **Remove the host wiring (host CLI) — FIRST.** Run `openclaw agents remove <agentId>`, then `openclaw config validate --json` to confirm the host config is still valid. The plugin cannot write the host config, so this half is the host CLI's and runs ahead of the artefact removal.
42
- 3. **Remove the sil artefacts — SECOND.** Clear the shopper's whole `$SIL_DATA_DIR/shopper/` tree (the shared user spec + every domain pack). `sil_profile_remove` is **per-domain** by design (its `domainSlug` is required), so decommissioning the shopper's full tree is the host-side concern, not a single tool call — remove each domain, or clear the shopper directory as part of the host teardown.
43
-
44
- **Never artefacts-first for the whole-shopper path.** The order is a safety decision: a failed artefact step after the host removal leaves only *residual artefacts with no host entry* — harmless disk cruft the no-args `sil_profile_get` still surfaces, so the user retries clean. The **reverse** is unsafe — artefacts gone, then a failed host step, leaves a *host entry whose `profile.json` is gone*: the agent still loads but the sil skill ENOENTs at runtime, a visibly broken shopper. Both halves are individually idempotent, so a re-run from any partial state converges to clean.
45
-
46
- Leave `plugins.entries.sil.enabled` alone on any removal — it is shared host state (the shopper depends on it), not per-domain. Even decommissioning the shopper leaves it enabled for a future re-create.
28
+ | "decommission / tear down my whole shopper" | host CLI `openclaw agents remove <agentId>` **FIRST**, then clear the artefact tree |
29
+
30
+ ## How `sil_profile_get` reads the singleton shopper
31
+
32
+ - **No `domainSlug` (overview):** returns the `name`, the shared `userSpec` (cross-niche
33
+ facts + hard constraints), the **`domains` index** (each niche's `slug`/`name`/
34
+ timestamps — no bodies), plus any degraded directory in **`unreadable`**. A shopper
35
+ with **no domains yet still reads `ok`, empty index — healthy** (the first shop mints
36
+ one); so does an empty store ("you haven't set up a shopper yet" → point at create —
37
+ still `ok`, never `not_found`). Render a human summary (shopper, what it knows, domains
38
+ learned, wiring); a flat-layout leftover from the old one-agent-per-niche model reads
39
+ as `unreadable` — frame it as an old-model leftover, do not read it as a domain.
40
+ - **With a `domainSlug`:** returns that niche's pack (`domainSpec` + `intentSpec` +
41
+ `playbook`) plus the shared `userSpec`. An unminted/unloadable domain returns
42
+ `not_found` (its `recovery` is the no-args `sil_profile_get`) — frame it plainly and
43
+ list what DOES exist. **Never surface a stack trace or a raw filesystem path.**
44
+
45
+ ## The two remove granularities
46
+
47
+ Removal is **destructive and irreversible**, so **confirm before removing**: state
48
+ exactly what will be deleted and proceed only on the user's **explicit go-ahead**. When
49
+ ambiguous, ask.
50
+
51
+ **Forget ONE domain (`sil_profile_remove`).** "forget the grocery niche", "remove the
52
+ cycling domain", **"delete the grocery agent"** all mean **forget that one DOMAIN** — the
53
+ niche pack only. The shopper, the shared user spec, and every **sibling domain survive**;
54
+ no host wiring is touched. Call **`sil_profile_remove { domainSlug }`** — `domainSlug` is
55
+ **REQUIRED**. A malformed/traversal/`main`/missing slug returns `invalid_request` and
56
+ deletes nothing; an unregistered slug returns `not_found` (idempotent); a filesystem
57
+ failure returns `persistence_failed`.
58
+
59
+ **Decommission the WHOLE shopper (host-CLI-first).** Remove the entire shopper — host
60
+ wiring + `SOUL.md` + the whole artefact tree: (1) `openclaw agents list --json` to
61
+ confirm the `agentId`; (2) `openclaw agents remove <agentId>` then `openclaw config
62
+ validate --json` — the plugin cannot write host config, so this half runs **first**; (3)
63
+ clear the whole `$SIL_DATA_DIR/shopper/` tree. Host-first is a safety order: a failed
64
+ artefact step after the host removal leaves only harmless residual artefacts, whereas the
65
+ reverse leaves a host entry whose `profile.json` is gone — a visibly broken shopper. Both
66
+ halves are idempotent. Leave `plugins.entries.sil.enabled` alone — it is shared host
67
+ state for a future re-create.
47
68
 
48
69
  ## Status taxonomy (manage: view / remove)
49
70
 
50
71
  | `status` | Meaning | What to do |
51
72
  |---|---|---|
52
- | `ok` | A view returned the overview (a shopper's `domains` may be empty — normal; an absent shopper is still `ok`, empty-is-healthy) or one domain's detail. | Relay the data; on an empty domain index, say so plainly and point at "just shop a niche". |
53
- | `not_found` | No domain matches the `domainSlug` (view or remove). Its `recovery` is `sil_profile_get` (the no-args overview). | Frame it plainly and list what DOES exist; do NOT re-register. For remove, a re-run is safe (idempotent). |
54
- | `invalid_request` | The `domainSlug` was malformed, `main`, traversal-shaped, or (remove) missing. **Nothing was read or deleted.** | Fix the slug and call again — never a stack trace or raw path to the user. |
73
+ | `ok` | A view returned the overview (a `domains` map may be empty — normal; an absent shopper is still `ok`) or one domain's detail. | Relay the data; on an empty index, point at "just shop a niche". |
74
+ | `not_found` | No domain matches the `domainSlug`. Its `recovery` is the no-args `sil_profile_get`. | Frame it plainly and list what DOES exist; for remove, a re-run is safe. |
75
+ | `invalid_request` | The `domainSlug` was malformed, `main`, traversal-shaped, or (remove) missing. **Nothing read or deleted.** | Fix the slug and call again — never a stack trace or raw path. |
55
76
  | `removed` | `sil_profile_remove` deleted exactly one domain pack. | Confirm that niche is gone; the shopper + shared user spec + sibling domains are untouched. |
56
77
  | `persistence_failed` | The domain directory could not be removed (the **path** + **cause** name what to fix). | Fix the data directory (writable), then remove again. |