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.
- package/CHANGELOG.md +124 -0
- package/dist/lib/profile-store.js +578 -581
- package/dist/lib/sil-client.js +282 -33
- package/dist/tools/catalog.js +475 -7
- package/dist/tools/profile.js +229 -371
- package/openclaw.plugin.json +6 -4
- package/package.json +1 -1
- package/scripts/create-shopper.mjs +71 -40
- package/sil-shopping/SKILL.md +65 -89
- package/sil-shopping/examples/multi_domain_shopper_walkthrough.md +34 -103
- package/sil-shopping/references/agent_creation_engine.md +177 -118
- package/sil-shopping/references/fill_and_feedback.md +86 -0
- package/sil-shopping/references/method_and_prds.md +111 -0
- package/sil-shopping/references/setup_onboarding.md +48 -52
- package/sil-shopping/references/shop_loop.md +109 -160
- package/sil-shopping/references/brainstorm_interview.md +0 -97
- package/sil-shopping/references/catalog_tools_reference.md +0 -44
- package/sil-shopping/references/manage_domains.md +0 -77
- package/sil-shopping/references/refine_shopper.md +0 -97
- package/sil-shopping/references/search_param_mapping.md +0 -79
|
@@ -1,139 +1,198 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agent-creation-engine
|
|
3
|
-
description:
|
|
3
|
+
description: Create the single sil-wired shopper end to end — the two-touchpoint onboarding interview (persona + shared user-spec seed, endorsement-gated) then the one-command engine that persists it. Load when the user asks to set up or create their shopper.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Create
|
|
6
|
+
# Create the shopper
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
Two parts, in order: an **onboarding interview** that shapes the shopper *with* the
|
|
9
|
+
user, then the **engine** that persists it. Nothing is created until the user
|
|
10
|
+
**explicitly endorses** the draft — the gate lives in Part 1 and the engine refuses
|
|
11
|
+
to run before it.
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Part 1 — The onboarding interview
|
|
16
|
+
|
|
17
|
+
When the user asks to **set up shopping** ("create my shopper"), do **not** jump to
|
|
18
|
+
the engine. Run a short, **two-touchpoint** onboarding — **pre-seeded from what they
|
|
19
|
+
already said this session** — and create nothing until they endorse the draft.
|
|
20
|
+
|
|
21
|
+
This is a **conversation, not a form-fill**. The shopper is a **generalist**: it goes
|
|
22
|
+
deep on whatever the user later buys, **lazily minting a domain on first shop**.
|
|
23
|
+
Onboarding researches **no niche** and picks **none** — it touches exactly two things:
|
|
24
|
+
the **persona** and a **shared user-spec seed**.
|
|
18
25
|
|
|
19
|
-
|
|
26
|
+
### Open with a reflected draft
|
|
20
27
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
28
|
+
Before asking anything, **pre-seed** from what the user said *this session* — the
|
|
29
|
+
persona (how it should behave) and the user-spec seed (sizes, hard limits, ethics
|
|
30
|
+
rules mentioned in passing) — then **reflect it back** ("from what you've told me,
|
|
31
|
+
here's the shopper I'd set up…") and ask only to confirm-or-adjust.
|
|
32
|
+
|
|
33
|
+
- **Pre-fill, don't interrogate** — fill only genuine gaps. Little said? Seed a
|
|
34
|
+
**minimal honest** draft ("facts to be learned as we shop; no hard constraints
|
|
35
|
+
yet") and say so — never fabricate a size or limit.
|
|
36
|
+
- **Session-only, local + offline** — no token, no `sil_whoami`, no network.
|
|
37
|
+
- **The pre-fill is a proposal, never consent** — the endorsement gate stands.
|
|
38
|
+
|
|
39
|
+
### The two touchpoints
|
|
40
|
+
|
|
41
|
+
| Artefact | Where | Holds |
|
|
42
|
+
|---|---|---|
|
|
43
|
+
| **`SOUL.md`** (persona) | host workspace | the shopper's voice / standing rules — a **generalist** |
|
|
44
|
+
| **`user_spec.md`** (shared) | sil data dir (**required**) | **cross-niche** facts + hard constraints (addresses, sizes, allergy/ethics rules, budget psychology) |
|
|
45
|
+
|
|
46
|
+
The niche packs — deep know-how, per-request template, niche taste — are **not
|
|
47
|
+
authored here**; they mint **lazily on first shop** ([`shop_loop.md`](shop_loop.md)).
|
|
48
|
+
|
|
49
|
+
1. **Persona** — confirm-or-adjust the seeded **voice/tone** and any **standing
|
|
50
|
+
rules**. This surfaces voice, **not a niche**. Becomes the workspace **`SOUL.md`**.
|
|
51
|
+
2. **Shared user spec** — pre-fill the **cross-niche** facts and any **hard
|
|
52
|
+
constraints** holding in *every* niche (addresses/sizes, an allergy or ethics rule,
|
|
53
|
+
budget psychology). Reflect back; mark each **hard** (inviolable) vs **soft**
|
|
54
|
+
(bendable). Seed what's offered; the rest is augmented per-query at shop time.
|
|
55
|
+
Lands in `userSpec`. **No niche taste, no domain question, no intent dimensions
|
|
56
|
+
here.**
|
|
57
|
+
|
|
58
|
+
### Assemble + endorse — the gate
|
|
59
|
+
|
|
60
|
+
- **Identity** — propose an `agentId` (lower-kebab, ≠ `main`) and a `name`; confirm both.
|
|
61
|
+
- **Assemble** — compose **`{ agentId, name, persona, userSpec }`**, present a readable
|
|
62
|
+
summary, self-check the shape (`agentId` lower-kebab & ≠ `main`; non-blank
|
|
63
|
+
`name`/`persona`/`userSpec`). Writes nothing — the engine's validate-first step is the
|
|
64
|
+
authoritative gate.
|
|
65
|
+
- **Endorse** — ask for an explicit go-ahead. Endorsement is an affirmative act
|
|
66
|
+
("yes, create it") — **not** inferred from the last answer or from silence. **Only on
|
|
67
|
+
that explicit yes** do you run Part 2.
|
|
68
|
+
|
|
69
|
+
### Interview invariants
|
|
70
|
+
|
|
71
|
+
- **No creation without explicit endorsement** — zero engine steps before the "yes";
|
|
72
|
+
the draft lives only in the conversation, so an abandoned interview leaves no partial
|
|
73
|
+
shopper.
|
|
74
|
+
- **Two touchpoints only** — persona, then shared user spec, both session-seeded. No
|
|
75
|
+
niche researched or chosen; that is first-shop lazy mint.
|
|
76
|
+
- **Converge each touchpoint before advancing; stay re-entrant** — the user can revise
|
|
77
|
+
earlier.
|
|
78
|
+
- **Singleton** — if a shopper exists the engine refuses (its `collision`); surface it,
|
|
79
|
+
steer to shop-a-new-niche or refine, never clobber the existing.
|
|
80
|
+
- **Local + offline for identity** — never present registration or a token as a
|
|
81
|
+
prerequisite, never pull `sil_whoami` to seed.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Part 2 — The creation engine
|
|
86
|
+
|
|
87
|
+
**Run ONLY after the endorsement gate above clears.** The engine persists **one**
|
|
88
|
+
OpenClaw agent — the **shopper**: a host `agents` entry, sil plugin enabled + skill
|
|
89
|
+
attached, persona in the workspace **`SOUL.md`**, the **shared user spec** in the sil
|
|
90
|
+
data dir. A **singleton** that learns **domains** lazily on first shop — a fresh
|
|
91
|
+
shopper's `domains` map is empty, which is healthy. Creation is **local + offline**: no
|
|
92
|
+
token, no `sil_register`/`sil_whoami`, no network — it registers the user later, on
|
|
93
|
+
first shop.
|
|
94
|
+
|
|
95
|
+
### The one command
|
|
96
|
+
|
|
97
|
+
Run one shipped bin — **`sil-openclaw-create-shopper`** — **non-interactive**,
|
|
98
|
+
**atomic**, **fail-closed**; it emits one JSON result. It is a standalone operator
|
|
99
|
+
script, not the plugin process, so the plugin's "never write host config" guarantee
|
|
100
|
+
holds. Feed the endorsed spec as one JSON object on **`stdin`** (or `--spec <path>`):
|
|
26
101
|
|
|
27
102
|
```
|
|
28
103
|
sil-openclaw-create-shopper <<'JSON'
|
|
29
104
|
{ "agentId": "my-shopper", "name": "My Shopper",
|
|
30
105
|
"workspace": "~/.openclaw/workspace-my-shopper",
|
|
31
|
-
"persona": "…
|
|
106
|
+
"persona": "…endorsed persona…", "userSpec": "…seeded shared user spec…",
|
|
32
107
|
"channel": "telegram" }
|
|
33
108
|
JSON
|
|
34
109
|
```
|
|
35
110
|
|
|
36
|
-
The
|
|
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)
|
|
111
|
+
### The spec (input)
|
|
43
112
|
|
|
44
113
|
| Field | Meaning | Goes to | Required? |
|
|
45
114
|
|---|---|---|---|
|
|
46
|
-
| **agentId** | Lower-kebab
|
|
47
|
-
| **name** | Human-readable name
|
|
48
|
-
| **persona** | Who the shopper is
|
|
49
|
-
| **workspace** | The shopper's workspace directory. | host |
|
|
50
|
-
| **userSpec** |
|
|
51
|
-
| **channel** |
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
domains
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
the
|
|
77
|
-
`
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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
|
|
121
|
-
|
|
122
|
-
| `status` | Meaning | What to do |
|
|
115
|
+
| **agentId** | Lower-kebab (`^[a-z0-9][a-z0-9-]*$`), never `main`. | host | yes |
|
|
116
|
+
| **name** | Human-readable name. | sil store | yes |
|
|
117
|
+
| **persona** | Who the shopper is — a generalist, its voice, standing rules. | host **`SOUL.md`** | yes |
|
|
118
|
+
| **workspace** | The shopper's workspace directory. | host | yes |
|
|
119
|
+
| **userSpec** | Shared **cross-niche** facts + hard constraints (seeded partial). | sil `user_spec.md` | yes |
|
|
120
|
+
| **channel** | Setup conversation's channel, bound to the shopper. | host bindings | optional (fail-open) |
|
|
121
|
+
|
|
122
|
+
**No per-niche input at create** — no method, no PRD; those mint lazily on first shop
|
|
123
|
+
via `sil_learn create`. The shopper needs web tools (inherited from `agents.defaults`)
|
|
124
|
+
to mint/refresh domains; if defaults grant none, the bin reports `created` with a
|
|
125
|
+
`warnings` gap (bare `sil_search` still works) — surface it.
|
|
126
|
+
|
|
127
|
+
### What the bin does, in order (atomic, fail-closed)
|
|
128
|
+
|
|
129
|
+
1. **Validate first** — bad/blank `agentId` (lower-kebab, ≠ `main`), `name`, `persona`,
|
|
130
|
+
`workspace`, or `userSpec` → **`invalid_request`** naming the field; **nothing
|
|
131
|
+
written**.
|
|
132
|
+
2. **Config + singleton pre-flight** — no host config → `persistence_failed`. An
|
|
133
|
+
existing shopper `user_spec.md`, or an `agentId` clash → **`collision`** ("a shopper
|
|
134
|
+
already exists"); steer to shop-a-new-niche or refine, **never a second shopper**. An
|
|
135
|
+
inconclusive read fails closed.
|
|
136
|
+
3. **Snapshot `openclaw.json`** — the teardown anchor, before any write.
|
|
137
|
+
4. **`openclaw agents add`** — the real `agents.list[]` entry + workspace bootstrap,
|
|
138
|
+
inheriting model + tools from `agents.defaults`.
|
|
139
|
+
5. **Write `SOUL.md`** = endorsed **persona + the standing "The sil way" creed block**
|
|
140
|
+
(below).
|
|
141
|
+
6. **Materialize the shared user spec** — `sil_profile_materialize { name, userSpec }`
|
|
142
|
+
(singleton, no agentId) writes **`user_spec.md`** atomically, name in its
|
|
143
|
+
frontmatter. **Setup-only: no domain, no method, no PRD.**
|
|
144
|
+
7. **Attach skill + enable plugin + harden tools** (value-mode `config set
|
|
145
|
+
--strict-json`, the only mode the pinned `alpine/openclaw:2026.6.9` accepts):
|
|
146
|
+
`agents.list[<idx>].skills` ← `["sil"]`; `plugins.entries.sil.enabled` ← `true`;
|
|
147
|
+
**`agents.list[<idx>].tools.deny`** ← **`["exec","write","edit","apply_patch"]`** — a
|
|
148
|
+
per-agent **deny-list** removing the shell (`exec`) + filesystem mutators while
|
|
149
|
+
**keeping the sil tools + web**. A deny (not replacing the base tool set) is used
|
|
150
|
+
because per OpenClaw precedence it only *further-restricts* and can never strip the
|
|
151
|
+
sil grant.
|
|
152
|
+
8. **Admit sil (plugin trust)** — the shipped **`sil-openclaw-allowlist`** helper
|
|
153
|
+
additively merges the three trust surfaces (`plugins.allow` + `tools.alsoAllow` +
|
|
154
|
+
`plugins.entries.sil`) — the only way to un-filter `sil_*` without clobbering a
|
|
155
|
+
co-installed plugin. A non-zero exit → **`persistence_failed`** (never a green
|
|
156
|
+
`created` over filtered tools).
|
|
157
|
+
9. **Bind the channel — FAIL-OPEN** — resolve (`spec.channel`, else
|
|
158
|
+
`OPENCLAW_MCP_MESSAGE_CHANNEL`), bind, **verify** the route stuck. Undetermined /
|
|
159
|
+
owned / unverifiable → revert + a manual-bind hint in `warnings`. Never fails
|
|
160
|
+
creation.
|
|
161
|
+
10. **Validate then declare** — `config validate --json` keys off **`.valid`**. Only
|
|
162
|
+
`valid: true` **and** step 8 ok → **`created`** (with `boundChannel`, or `null`).
|
|
163
|
+
Any failure **after step 4** tears down (restore the snapshot; remove the workspace
|
|
164
|
+
+ shopper dir only if it created them), so `persistence_failed` means **nothing
|
|
165
|
+
partial**. If teardown cannot fully revert, a louder **`teardown_failed`** names the
|
|
166
|
+
residue.
|
|
167
|
+
|
|
168
|
+
Exit 0 **only** on `created`.
|
|
169
|
+
|
|
170
|
+
### The `SOUL.md` "The sil way" creed block
|
|
171
|
+
|
|
172
|
+
The persona is followed by a standing **"The sil way"** creed — an identity-level
|
|
173
|
+
restatement (a philosophy, not a rulebook; the mechanics live in the attached skill)
|
|
174
|
+
carrying the **explore-first** mantra, the loop in three lines, and the one distinction
|
|
175
|
+
that matters: the shopper **mints an unlearned niche first** (a `sil_profile_search`
|
|
176
|
+
MISS → `sil_learn create`, then search); **the sil catalog is where you buy, the open
|
|
177
|
+
web is where you learn** (web only researches a niche's buying guide, never sources a
|
|
178
|
+
pick); **persists only through `sil_learn`**, never to host files.
|
|
179
|
+
|
|
180
|
+
### Status taxonomy
|
|
181
|
+
|
|
182
|
+
| `status` | Meaning | Do |
|
|
123
183
|
|---|---|---|
|
|
124
|
-
| `created` | Shopper added,
|
|
125
|
-
| `invalid_request` | Spec failed validation.
|
|
126
|
-
| `collision` | A shopper
|
|
127
|
-
| `persistence_failed` | A write, the allow-list helper
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
persona via **`SOUL.md`**.
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
[`refine_shopper.md`](refine_shopper.md).
|
|
184
|
+
| `created` | Shopper added, spec materialized, plugin + skill + hardening wired, config valid. Carries `name`/`agentId`/`workspace`/`boundChannel` (or `null`). | Tell the user; if `boundChannel` null, relay the manual-bind hint. |
|
|
185
|
+
| `invalid_request` | Spec failed validation. Nothing attempted. | Name the field, fix, re-run. |
|
|
186
|
+
| `collision` | A shopper (singleton) or `agentId` already exists. Nothing written. | Steer to shop-a-new-niche or refine — never a second shopper. |
|
|
187
|
+
| `persistence_failed` | A write, the allow-list helper, or `config validate` failed; teardown fully reverted. | Fix the path/cause, re-run (safe). |
|
|
188
|
+
| `teardown_failed` | Teardown could NOT fully revert. | Louder — names the residue; the host is not at its pre-run state. |
|
|
189
|
+
|
|
190
|
+
### Runtime
|
|
191
|
+
|
|
192
|
+
At session start the host has injected the persona via **`SOUL.md`**. Load the shared
|
|
193
|
+
**`user_spec.md`** (cross-niche facts + hard constraints; frontmatter carries the name);
|
|
194
|
+
`sil_profile_search` scans the learned domains (empty is healthy) and each per-domain
|
|
195
|
+
method loads **lazily at shop time**. The `sil_*` tools admitted at create, the shopper
|
|
196
|
+
shops with no further setup, minting each niche on the fly on first shop
|
|
197
|
+
([`shop_loop.md`](shop_loop.md)). To sharpen it, see
|
|
198
|
+
[`fill_and_feedback.md`](fill_and_feedback.md).
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fill-and-feedback
|
|
3
|
+
description: Beat 3 (fill the PRD by precedence, multi-turn, hard-constraint dual-enforce, the persistence split) and Beat 6 (the reaction half — capture-gate, confirm-before-write, route-by-scope), plus sil_learn, the one target+change write verb. Load when eliciting requirements or capturing what a reaction surfaced.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Beat 3 (Fill) and Beat 6 (Feedback) — via `sil_learn`
|
|
7
|
+
|
|
8
|
+
Beats 1–2 hand off the resolved PRD + method body. Beat 3 fills it; Beat 6 captures
|
|
9
|
+
what the reaction surfaces — both persist through **`sil_learn`**.
|
|
10
|
+
|
|
11
|
+
## Beat 3 — Fill by precedence
|
|
12
|
+
|
|
13
|
+
Enumerate the load-bearing dimensions the method names, then resolve each down the
|
|
14
|
+
chain, **first hit wins**:
|
|
15
|
+
|
|
16
|
+
**request-intent > PRD filled-pref > method taste > user_spec fact > method default**
|
|
17
|
+
|
|
18
|
+
A pure **read-compose** — **most** dimensions **resolve** from stored state with
|
|
19
|
+
**no question** (a revisited niche does not re-ask).
|
|
20
|
+
|
|
21
|
+
**Elicit the residue — multi-turn.** Only a dimension that is unresolved **and**
|
|
22
|
+
load-bearing **and** not answerable from a sensible default goes to the buyer.
|
|
23
|
+
Pursue each until **resolved** or explicitly **declined**, then search. Each turn is
|
|
24
|
+
**a few at a time, never a battery**, each tied to **why**, playing the filled
|
|
25
|
+
understanding back.
|
|
26
|
+
|
|
27
|
+
**Live request vs a stored durable pref — ask, don't guess.** When the request
|
|
28
|
+
contradicts a stored **durable** PRD preference, the request wins **this** search,
|
|
29
|
+
but ask whether it is **one-off** or **standing**. "Just this once" → ephemeral, no
|
|
30
|
+
write. "From now on" → a **standing** change: **amend** the stored preference.
|
|
31
|
+
**Never silently overwrite** a standing preference.
|
|
32
|
+
|
|
33
|
+
**Hard constraints are inviolable — dual-enforced.** `user_spec [hard]` + PRD hard
|
|
34
|
+
requirements route to a real **filter** where one exists **and** to Beat 5's
|
|
35
|
+
**reject-at-pick** check — because a `specs` predicate can read `applied:false`.
|
|
36
|
+
|
|
37
|
+
**The split — persist stated durable answers NOW.** Fill is the **first** of two
|
|
38
|
+
persistence moments: a durable answer the buyer **stated** during elicitation is
|
|
39
|
+
**written** to the PRD's *Filled preferences* **now** via `sil_learn` — so an
|
|
40
|
+
abandoned session still recovers what was settled. What the buyer's **reaction**
|
|
41
|
+
surfaces is **Beat 6's** write (the **reaction half**). One-off direction stays
|
|
42
|
+
**ephemeral**, **never written** by either.
|
|
43
|
+
|
|
44
|
+
**Decline never blocks.** A declined question narrows **quality**, never **access**
|
|
45
|
+
— proceed on the best-defensible params and **state the assumption** ("assuming
|
|
46
|
+
waterproofing, since it's for the slope"). Unresolved-and-declined dimensions land
|
|
47
|
+
in the PRD's *Notes / open* so the next session recovers, not re-asks.
|
|
48
|
+
|
|
49
|
+
## Beat 6 — Feedback: the reaction half
|
|
50
|
+
|
|
51
|
+
Beat 6 is the loop's **only reaction-time persistence**, a standing beat.
|
|
52
|
+
|
|
53
|
+
**The capture gate — most reactions persist nothing.** Write only a signal that is
|
|
54
|
+
**durable AND new** — no **duplicate** (not already stored), no **noise**, no
|
|
55
|
+
**empty** entry. A this-pick reaction ("too pricey this time") is not durable, never
|
|
56
|
+
written.
|
|
57
|
+
|
|
58
|
+
**Confirm before every durable write.** When the gate surfaces a new durable
|
|
59
|
+
candidate, **confirm before** writing it ("want me to remember you run Shimano?") —
|
|
60
|
+
**never a silent harvest**. The confirm is gated behind the candidate, so most
|
|
61
|
+
reactions ask nothing.
|
|
62
|
+
|
|
63
|
+
**Route by scope — the placement rule.** A confirmed signal lands at the **broadest
|
|
64
|
+
scope where it stays true**:
|
|
65
|
+
|
|
66
|
+
- a cross-domain **fact** / **hard** constraint → **`user_spec`**;
|
|
67
|
+
- a durable per-domain **taste** → the **method**;
|
|
68
|
+
- a **this-job** preference → the **PRD**;
|
|
69
|
+
- an **image** → **`attach-asset`** (per-domain).
|
|
70
|
+
|
|
71
|
+
**Pick the kind.** New learning → **append**; a reaction contradicting a stored
|
|
72
|
+
**soft** pref → **amend** (it **supersedes** — **never a stacked second bullet**); a
|
|
73
|
+
withdrawal → **retract**.
|
|
74
|
+
|
|
75
|
+
**Re-scope = write-broader-then-retract-narrower.** When a reaction shows a stored
|
|
76
|
+
fact is broader than where it lives, write it to the **broader** target and
|
|
77
|
+
**retract** the narrower copy (two `sil_learn` calls). There is **no promote verb**.
|
|
78
|
+
|
|
79
|
+
## `sil_learn` — the one target + change write verb
|
|
80
|
+
|
|
81
|
+
`sil_learn` is the single **target + change** verb owning the whole method/PRD
|
|
82
|
+
lifecycle. `target` selects where the change lands (`user_spec` / `method` /
|
|
83
|
+
`prd`); the **kind** selects the change. **Five kinds:** **create** (mint a whole
|
|
84
|
+
method/PRD), **append**, **amend**, **retract**, **attach-asset** (persist image
|
|
85
|
+
bytes, linked by path). Every capture is reviewable via `sil_profile_get` and
|
|
86
|
+
erasable via `sil_profile_remove` — never silently harvested.
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: method-and-prds
|
|
3
|
+
description: Beat 2 of the loop — load, mint or signal-refresh a domain's method — plus the intent-keyed PRD model, the frontmatter-as-truth store, and discovery/manage via sil_profile_search / sil_profile_get / sil_profile_remove. Load when resolving a domain's method or managing what the shopper knows.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Beat 2 — the domain method, intent-keyed PRDs, and the store
|
|
7
|
+
|
|
8
|
+
Beat 1 hands off a resolved `domain` — a **HIT** (method exists) or a **MISS** (no
|
|
9
|
+
method yet). Beat 2 turns that into a method body in context, ready for Beat 3 to
|
|
10
|
+
fill. Three paths.
|
|
11
|
+
|
|
12
|
+
## LOAD — the hot path (HIT, fresh)
|
|
13
|
+
|
|
14
|
+
A plain revisit **LOADS**: `sil_profile_get(domain)` reads the durable method body
|
|
15
|
+
— **no research**. This is the default on every revisit; the method is
|
|
16
|
+
**recovered, never rebuilt**. Loading its `## Search vocabulary` brings the coined
|
|
17
|
+
`ns.key` dimensions into context for Beat 4.
|
|
18
|
+
|
|
19
|
+
## MINT — cold (MISS)
|
|
20
|
+
|
|
21
|
+
No method exists, so **mint** one — this is where you **explore**. Research the niche
|
|
22
|
+
on the web **freely and often** to learn how it is *really* bought: its load-bearing
|
|
23
|
+
attributes, its failure modes, what separates a good buy from a bad one. The one
|
|
24
|
+
boundary — you research the **domain** (how it's bought), you **never source products**
|
|
25
|
+
from the web; every pick comes only from `sil_search` in Beat 4.
|
|
26
|
+
Draft the buying guide + the buyer's durable per-domain taste (seeded from
|
|
27
|
+
`user_spec`) + the whole-domain **spec vocabulary** you **coin** from the research
|
|
28
|
+
(`ns.key` + data type + unit + why-it-matters) + a **volatility marker** (the
|
|
29
|
+
volatile axis + rough cadence). Persist with **`sil_learn create`** (`target:
|
|
30
|
+
"method"`, domain + name + body) — the file **is** the registration. Never the
|
|
31
|
+
**setup-only** `sil_profile_materialize` (which writes only the shared
|
|
32
|
+
`user_spec.md` and mints no domain). Then **announce** the inferred domain so the
|
|
33
|
+
buyer can correct it.
|
|
34
|
+
|
|
35
|
+
The vocabulary is **canonicalized before persist**. `sil_specs` is
|
|
36
|
+
**precision-first** — two specs converge only when **every field** agrees within the
|
|
37
|
+
same `namespace` and `data_type`, so the name decides whether a concept converges or
|
|
38
|
+
forks: a synonym (`speed_mbps` vs `transfer_speed_mbps`) splits one concept into two
|
|
39
|
+
specs that never match. So coin for the match:
|
|
40
|
+
|
|
41
|
+
- **One concept, one spelling.** Reuse the exact `ns.key`, `display_name`,
|
|
42
|
+
`data_type`, and `unit` you already coined for that concept — verbatim, across
|
|
43
|
+
every domain (consult a sibling method with `sil_profile_get` only when the
|
|
44
|
+
concept plausibly recurs, never an exhaustive scan).
|
|
45
|
+
- **Common attribute → conventional name.** For a widely-shared attribute you have
|
|
46
|
+
**not** coined before (screen size, weight, RAM, waterproof rating, material…),
|
|
47
|
+
take its **conventional** name — a Schelling point, there being no registry to
|
|
48
|
+
read. Coin fresh only for a genuinely niche attribute.
|
|
49
|
+
- **Corroborate the name.** Carry a concept-naming **`description`** — the
|
|
50
|
+
**corroborator** the dedupe leans on to merge synonyms and keep distinct concepts
|
|
51
|
+
apart — and get **`data_type`** and **`namespace`** right, the hard floors a wrong
|
|
52
|
+
value forks the concept past.
|
|
53
|
+
|
|
54
|
+
Submit the definitions to **`sil_specs`** (dedupe-or-create) and adopt the returned
|
|
55
|
+
**canonical** `ns.key`: **`matched`** → an equivalent exists, **drop your synonym for
|
|
56
|
+
the canonical**; **`created`** → yours is novel and canonical going forward (keep it).
|
|
57
|
+
Rewrite the `## Search vocabulary` and any PRD `specs` predicates to those names
|
|
58
|
+
before persisting — the method is **born canonical**, never write-then-amend. This is
|
|
59
|
+
what makes `filters.specs` filter across methods; naming is never a gate — a
|
|
60
|
+
fragmenting name costs precision, never blocks a search. If `sil_specs` is **not
|
|
61
|
+
`ok`** (a registry blip), **do not block the mint**: persist the **raw coined names**
|
|
62
|
+
(every predicate reads `applied:false`) and shop on — convergence retries next
|
|
63
|
+
mint/refresh. Canonicalization is **silent to the buyer**: never surface `ns.key`
|
|
64
|
+
plumbing.
|
|
65
|
+
|
|
66
|
+
## REFRESH — signal-driven (HIT, stale)
|
|
67
|
+
|
|
68
|
+
A plain revisit LOADS; a refresh fires **only on a signal** — never on a TTL, not
|
|
69
|
+
every revisit. The three signals: the buyer **contradicts** the guide, the
|
|
70
|
+
**volatility marker** is overdue, or the buyer **explicitly asks**. Signal-driven,
|
|
71
|
+
not a clock.
|
|
72
|
+
|
|
73
|
+
Refresh is **create-with-merge**: load the current method, re-research **only** the
|
|
74
|
+
stale volatile material, **carry every buyer-authored line forward verbatim**,
|
|
75
|
+
re-emit the whole body via `sil_learn create` (overwrite), announce the delta. The
|
|
76
|
+
merge rewrites stale *research* claims and **never clobbers** a buyer `sil_learn`
|
|
77
|
+
edit. The method stays fully buyer-mutable via `sil_learn` append/amend/retract.
|
|
78
|
+
|
|
79
|
+
Canonicalize any **newly-coined** specs via `sil_specs` before persisting — same
|
|
80
|
+
convergence discipline (reuse a name already coined for the concept; take the
|
|
81
|
+
conventional name for a common attribute), resubmitting **only** specs not yet
|
|
82
|
+
carrying a canonical name (already-canonical names are stable).
|
|
83
|
+
|
|
84
|
+
## Intent-keyed PRDs
|
|
85
|
+
|
|
86
|
+
A PRD's identity is the **job-to-be-done**, keyed by three coordinates so it stays
|
|
87
|
+
queryable: `{ domain, product, intent }` → `ski/gloves-slope` (intent always
|
|
88
|
+
present; a context-free request keys `general`). It holds the method's requirements
|
|
89
|
+
**specialized to this job** plus the buyer's **durable** filled preferences (the
|
|
90
|
+
per-job slice; the per-domain durable taste lives in the method). PRDs are
|
|
91
|
+
**durable** and **revisitable** — re-buying the same thing, or resuming an
|
|
92
|
+
unfinished session, **recovers** the PRD, never rebuilds it.
|
|
93
|
+
|
|
94
|
+
## The store — frontmatter-as-truth (no manifest)
|
|
95
|
+
|
|
96
|
+
Artefacts live at `shopper/domains/<slug>/{method.md, prds/<product>-<intent>.md,
|
|
97
|
+
assets/}`. There is **no manifest** — each file's own **frontmatter** IS the truth,
|
|
98
|
+
discovered by a filesystem **scan** over those coordinates. Malformed frontmatter is
|
|
99
|
+
skipped and surfaced as `unreadable`, never half-read.
|
|
100
|
+
|
|
101
|
+
## Discovery + manage
|
|
102
|
+
|
|
103
|
+
- **Discover / reuse-before-mint** with **`sil_profile_search`** — queries artefact
|
|
104
|
+
**frontmatter**, returns **coordinates** only (no bodies): the learned domains and
|
|
105
|
+
their PRDs. The frontmatter-as-truth query, **not a manifest** and not a
|
|
106
|
+
filesystem guess. The no-filter call is the "what does my shopper know?" overview.
|
|
107
|
+
- **Read one body** with **`sil_profile_get`** — `domainSlug` for the method body,
|
|
108
|
+
`+prd` for that PRD's body.
|
|
109
|
+
- **Remove** with **`sil_profile_remove`** — `domainSlug` alone removes the **whole
|
|
110
|
+
domain** subtree; `+prd` removes **just that PRD** (method + siblings survive).
|
|
111
|
+
Destructive: **confirm** with the buyer first.
|