sil-openclaw 0.3.9 → 0.4.0

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,97 +0,0 @@
1
- ---
2
- name: refine-shopper
3
- description: The refinement loop — sharpen the shopper or one domain from observed sessions, confirm-before-persist. Load when the user asks to refine, sharpen, or amend their shopper or a niche.
4
- ---
5
-
6
- # Refine your shopper or one of its domains — the refinement loop
7
-
8
- When the user wants to **sharpen their shopper** — "refine my shopper", "the cycling
9
- domain keeps surfacing the wrong stuff", "amend what you know about me" — do **not**
10
- re-onboard and do **not** quietly mutate anything. Run this **targeted-amend** loop:
11
- load the relevant artefact, propose refinements drawn from what the shopper actually
12
- **observed** in real sessions, let the user **confirm a subset**, and persist **only**
13
- the confirmed subset. Nothing changes silently; nothing persists without confirmation.
14
-
15
- Refine has **two targets**:
16
-
17
- - **The shopper itself** — the **shared `user_spec.md`** (cross-niche facts + hard
18
- constraints), or the **persona** (the host `SOUL.md`).
19
- - **One domain** — a single niche **domain pack**, targeted by **slug**: its
20
- `domain_spec.md`, `intent_spec.md`, or `playbook.md`.
21
-
22
- This is distinct from creating the shopper
23
- ([`agent_creation_engine.md`](agent_creation_engine.md)) and from the shop loop (which
24
- SHOPS). Run the steps **in order**.
25
-
26
- ## The refinement loop
27
-
28
- 1. **Trigger + load the target.** Refinement starts only when the user **explicitly
29
- asks** to sharpen the shopper or a **named** domain. At session end you MAY *offer*
30
- to refine, but that offer loads/proposes/persists nothing until the user accepts and
31
- clears the confirm gate (step 3). Load with **`sil_profile_get { domainSlug? }`** —
32
- the overview (no slug) for the shopper, or a `domainSlug` for one domain's pack (+
33
- the shared `userSpec`). Read the persona from the host **`SOUL.md`** when it is on
34
- the table.
35
- 2. **Propose, session-grounded — never a generic template.** Propose a small set of
36
- **concrete refinements drawn from the observed session** — what the shopper actually
37
- saw. Each proposal names **which artefact element it changes** (a persona rule, a
38
- shared `user_spec.md` fact/constraint, or — within one named domain — a
39
- `domain_spec.md` mechanic, an `intent_spec.md` dimension, or a `playbook.md` taste)
40
- **and the concrete observed evidence** (a param mapping that returned relevant vs
41
- irrelevant items, a candidate accepted or rejected, a fact the user volunteered but
42
- the spec never captured — "you said 'nothing over 8kg' three times" → a shared hard
43
- constraint; "you kept asking about lug depth" → that domain's `domain_spec.md`).
44
- Scope each correctly: a cross-niche fact/constraint or persona change targets the
45
- **shopper**; a niche-mechanical change targets **one domain's** pack. The per-query
46
- intent is ephemeral and never a refine target — only a domain's `intent_spec.md`
47
- *schema* is. Every proposal cites its evidence; an ungrounded one is not proposed.
48
- 3. **Confirm — the gate.** Present the proposals and let the user **confirm a subset** —
49
- all, some, or none (per-proposal accept/reject). Confirmation is an explicit
50
- affirmative act; it is **never inferred from silence**, and never from an
51
- **off-topic** reply. Until the user confirms, the proposals live only in the
52
- conversation. (This re-applies the create engine's endorsement discipline — see
53
- [`brainstorm_interview.md`](brainstorm_interview.md); do not restate it here.)
54
- 4. **Persist ONLY the confirmed subset — scoped to the right target.** Fold **only the
55
- confirmed** proposals in and re-run the engine's persist step — refine is a
56
- **whole-doc** path, so it uses **`sil_profile_materialize`** (not `sil_remember`):
57
- - A **shared user-spec** change → **`sil_profile_materialize { name, userSpec }`**
58
- with **no `domain`** — overwrites only the shared `user_spec.md`.
59
- - A **domain** change → **`sil_profile_materialize { name, userSpec, domain: { slug,
60
- name, domainSpec, intentSpec, playbook } }`** scoped to **that one slug** —
61
- re-mints exactly that `domains/<slug>/` pack; siblings + the shared spec untouched.
62
- - A **persona** change → refresh the workspace **`SOUL.md`** via the host CLI — a
63
- persona refinement is a host-CLI `SOUL.md` re-write, **not** a
64
- `sil_profile_materialize` call.
65
- The re-materialize is an **atomic in-place re-write** (the store's idiom; do not
66
- hand-roll a write). **On a persist failure the prior artefacts are left intact** —
67
- never a half-refined shopper — and you tell the user the refinement did not stick.
68
- 5. **Close the loop.** A later session loads the **updated** artefacts and behaves
69
- accordingly. Refinement is iterative — a change that did not land is refinable next
70
- time.
71
- 6. **Isolation.** A domain refinement touches exactly that one `domains/<slug>/` pack —
72
- **siblings and the shared user spec are untouched** unless the shared spec is the
73
- target — and the profile-less path is untouched. One target's sharpening never leaks
74
- into another.
75
-
76
- ## Per-user + local
77
-
78
- The improvement is **per-user and local**: written only to this user's sil data
79
- directory (`$SIL_DATA_DIR/shopper/`), on this machine. No server-side aggregation, no
80
- cross-user signal, no identity round-trip.
81
-
82
- ## How a refinement reaches the params
83
-
84
- A refined fact / mechanic / dimension / taste lands in an artefact and feeds the
85
- **shop-time** mapping ([`search_param_mapping.md`](search_param_mapping.md)) — real
86
- `sil_search` params only; a refinement with no matching param folds into `query` or the
87
- rubric, never an invented filter. The `ship_to` rule is unchanged (leave it empty; the
88
- server resolves the registered default). **Do not restate the param table here** — point
89
- at [`search_param_mapping.md`](search_param_mapping.md).
90
-
91
- ## When there is no observed-session signal
92
-
93
- If the user asks to refine but **no observed session** is available (a fresh session, or
94
- the prior one is out of context), do **not fabricate** observations. Fall back to a
95
- **guided amend**: ask the user what to change (apply the same confirm-before-persist
96
- gate), or **invite them to shop a session first** so the next refinement has real
97
- evidence. Never invent observations.