sil-openclaw 0.4.1 → 0.4.3
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 +83 -0
- package/dist/index.js +26 -0
- package/dist/lib/creation-entrypoint.js +111 -0
- package/dist/lib/derive-agent-id.js +36 -0
- package/dist/lib/findings.js +40 -0
- package/dist/lib/host-wiring.js +238 -0
- package/dist/lib/profile-store.js +44 -147
- package/dist/lib/version-advisory.js +275 -0
- package/dist/tools/catalog.js +10 -9
- package/dist/tools/doctor.js +596 -0
- package/dist/tools/identity.js +13 -3
- package/dist/tools/profile.js +25 -25
- package/openclaw.plugin.json +4 -2
- package/package.json +1 -1
- package/scripts/create-shopper.mjs +29 -60
- package/sil-shopping/SKILL.md +16 -4
- package/sil-shopping/examples/multi_domain_shopper_walkthrough.md +28 -12
- package/sil-shopping/references/agent_creation_engine.md +54 -26
- package/sil-shopping/references/fill_and_feedback.md +40 -24
- package/sil-shopping/references/method_and_prds.md +56 -24
- package/sil-shopping/references/shop_loop.md +37 -32
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
---
|
|
2
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.
|
|
3
|
+
description: Beat 3 (fill the PRD by precedence, multi-turn, author the Search specs block, 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 (create | write | attach-asset). Load when eliciting requirements or capturing what a reaction surfaced.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Beat 3 (Fill) and Beat 6 (Feedback) — via `sil_learn`
|
|
7
7
|
|
|
8
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
|
|
9
|
+
what the reaction surfaces — both persist through **`sil_learn write`** (the whole
|
|
10
|
+
reconciled doc, never a stacked bullet).
|
|
10
11
|
|
|
11
12
|
## Beat 3 — Fill by precedence
|
|
12
13
|
|
|
@@ -24,27 +25,37 @@ Pursue each until **resolved** or explicitly **declined**, then search. Each tur
|
|
|
24
25
|
**a few at a time, never a battery**, each tied to **why**, playing the filled
|
|
25
26
|
understanding back.
|
|
26
27
|
|
|
28
|
+
**Author the `## Search specs` block.** As dimensions resolve, project each into a
|
|
29
|
+
`{ ns, key, op, value, unit?, hard? }` predicate (keys from the method's `## Search
|
|
30
|
+
vocabulary`) — the block Beat 4 sends verbatim. A **preferred-value-with-fallback**
|
|
31
|
+
("prefer ear hooks, fins acceptable") is **one `op:in` set** over the acceptable
|
|
32
|
+
values, **not** a hard `eq` on the favourite; the favourite is a **Beat-5 ranking**
|
|
33
|
+
preference. Mark a predicate **`hard: true`** only when a miss must **reject at pick** —
|
|
34
|
+
loose hard-marking empties result sets.
|
|
35
|
+
|
|
27
36
|
**Live request vs a stored durable pref — ask, don't guess.** When the request
|
|
28
37
|
contradicts a stored **durable** PRD preference, the request wins **this** search,
|
|
29
38
|
but ask whether it is **one-off** or **standing**. "Just this once" → ephemeral, no
|
|
30
|
-
write. "From now on" → a **standing** change:
|
|
31
|
-
**Never silently overwrite** a standing preference.
|
|
39
|
+
write. "From now on" → a **standing** change: **`write`** the reconciled PRD (the
|
|
40
|
+
changed line rewritten in place). **Never silently overwrite** a standing preference.
|
|
32
41
|
|
|
33
|
-
**Hard constraints are inviolable — dual-enforced.** `user_spec [hard]`
|
|
34
|
-
|
|
35
|
-
**reject-at-pick** check — because a `specs` predicate can read
|
|
42
|
+
**Hard constraints are inviolable — dual-enforced.** A `user_spec` `[hard]` line and a
|
|
43
|
+
PRD `## Search specs` `hard:true` predicate route to a real **filter** where one exists
|
|
44
|
+
**and** to Beat 5's **reject-at-pick** check — because a `specs` predicate can read
|
|
45
|
+
`applied:false`.
|
|
36
46
|
|
|
37
47
|
**The split — persist stated durable answers NOW.** Fill is the **first** of two
|
|
38
48
|
persistence moments: a durable answer the buyer **stated** during elicitation is
|
|
39
|
-
**written**
|
|
40
|
-
abandoned session still recovers what was settled. What
|
|
41
|
-
surfaces is **Beat 6's** write
|
|
49
|
+
**written** into the PRD **now** — a `write` that folds it into `## Search specs` /
|
|
50
|
+
`## Filled preferences` — so an abandoned session still recovers what was settled. What
|
|
51
|
+
the buyer's **reaction** surfaces is **Beat 6's** write. One-off direction stays
|
|
42
52
|
**ephemeral**, **never written** by either.
|
|
43
53
|
|
|
44
54
|
**Decline never blocks.** A declined question narrows **quality**, never **access**
|
|
45
55
|
— proceed on the best-defensible params and **state the assumption** ("assuming
|
|
46
56
|
waterproofing, since it's for the slope"). Unresolved-and-declined dimensions land
|
|
47
|
-
in the PRD's
|
|
57
|
+
in the PRD's **`## Notes / open`** so the next session recovers, not re-asks — a
|
|
58
|
+
non-answer is a note, never a preference.
|
|
48
59
|
|
|
49
60
|
## Beat 6 — Feedback: the reaction half
|
|
50
61
|
|
|
@@ -64,23 +75,28 @@ reactions ask nothing.
|
|
|
64
75
|
scope where it stays true**:
|
|
65
76
|
|
|
66
77
|
- a cross-domain **fact** / **hard** constraint → **`user_spec`**;
|
|
67
|
-
- a durable per-domain **taste** → the **method
|
|
68
|
-
- a **this-job** preference → the **PRD
|
|
78
|
+
- a durable per-domain **taste** → the **method** (`## Durable taste`);
|
|
79
|
+
- a **this-job** preference or spec → the **PRD** (`## Filled preferences` /
|
|
80
|
+
`## Search specs`);
|
|
69
81
|
- an **image** → **`attach-asset`** (per-domain).
|
|
70
82
|
|
|
71
|
-
**
|
|
72
|
-
|
|
73
|
-
|
|
83
|
+
**Every write is a reconciled whole-doc `write`.** Read the target
|
|
84
|
+
(`sil_profile_get`), fold the new signal into the coherent whole, and `sil_learn write`
|
|
85
|
+
it back — a correction **rewrites** the line it changes, so the doc **never stacks a
|
|
86
|
+
contradicting bullet**. There is no append/amend/retract; reconciliation is the only
|
|
87
|
+
update path.
|
|
74
88
|
|
|
75
|
-
**Re-scope = write-broader-then-
|
|
76
|
-
|
|
77
|
-
**
|
|
89
|
+
**Re-scope = write-broader-then-write-narrower.** When a reaction shows a stored fact
|
|
90
|
+
is broader than where it lives, `write` it into the **broader** target and `write` the
|
|
91
|
+
**narrower** one without the moved line (two `sil_learn write` calls). There is **no
|
|
92
|
+
promote verb**.
|
|
78
93
|
|
|
79
94
|
## `sil_learn` — the one target + change write verb
|
|
80
95
|
|
|
81
96
|
`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
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
97
|
+
lifecycle. `target` selects where the change lands (`user_spec` / `method` / `prd`);
|
|
98
|
+
the **kind** selects the change. **Three kinds:** **create** (mint a NEW method/PRD —
|
|
99
|
+
errors if one already exists), **write** (replace an existing doc's whole body with the
|
|
100
|
+
reconciled version you author — read it first, carry every buyer line forward),
|
|
101
|
+
**attach-asset** (persist image bytes, linked by path). Every capture is reviewable via
|
|
102
|
+
`sil_profile_get` and erasable via `sil_profile_remove` — never silently harvested.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
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.
|
|
3
|
+
description: Beat 2 of the loop — load, mint or signal-refresh a domain's method — plus the intent-keyed PRD model, the method/PRD templates, 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
4
|
---
|
|
5
5
|
|
|
6
6
|
# Beat 2 — the domain method, intent-keyed PRDs, and the store
|
|
@@ -23,14 +23,27 @@ on the web **freely and often** to learn how it is *really* bought: its load-bea
|
|
|
23
23
|
attributes, its failure modes, what separates a good buy from a bad one. The one
|
|
24
24
|
boundary — you research the **domain** (how it's bought), you **never source products**
|
|
25
25
|
from the web; every pick comes only from `sil_search` in Beat 4.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
|
|
27
|
+
**The method is GENERAL — the whole product category, reusable across every intent.**
|
|
28
|
+
It holds *how the category is bought* and the *dimensions* that decide a buy — **never
|
|
29
|
+
this buyer's values** (those are the PRD). Mint at the **broadest slug whose buying
|
|
30
|
+
guide generalises**: `earbuds` serves gym, commute, and office; the gym specifics live
|
|
31
|
+
in the gym PRD, not a `wireless-gym-earbuds` method. Folding the use-context into the
|
|
32
|
+
domain forks a near-duplicate method per intent and kills reuse.
|
|
33
|
+
|
|
34
|
+
Persist with **`sil_learn create`** (`target: "method"`, domain + name + body) — the
|
|
35
|
+
file **is** the registration (it errors if the method already exists: a revisit LOADs,
|
|
36
|
+
a stale one REFRESHes with `write`). Never the setup-only `sil_profile_materialize`.
|
|
37
|
+
Then **announce** the inferred domain so the buyer can correct it. The method body
|
|
38
|
+
carries these sections, and only these:
|
|
39
|
+
|
|
40
|
+
- **`## How it's bought`** — the buying guide: load-bearing attributes, failure modes,
|
|
41
|
+
what separates a good buy from a bad one — general to the category, not this buyer.
|
|
42
|
+
- **`## Search vocabulary`** — the spec **dimensions** you coin (`ns.key` + `data_type`
|
|
43
|
+
+ unit + `allowed_values` + why-it-matters) — names only, **no values**.
|
|
44
|
+
- **`## Durable taste`** — the buyer's cross-intent per-domain taste, seeded from
|
|
45
|
+
`user_spec` (omit until something durable is known).
|
|
46
|
+
- **`## Volatility`** — the volatile axis + a rough refresh cadence.
|
|
34
47
|
|
|
35
48
|
The vocabulary is **canonicalized before persist**. `sil_specs` is
|
|
36
49
|
**precision-first** — two specs converge only when **every field** agrees within the
|
|
@@ -54,9 +67,9 @@ specs that never match. So coin for the match:
|
|
|
54
67
|
Submit the definitions to **`sil_specs`** (dedupe-or-create) and adopt the returned
|
|
55
68
|
**canonical** `ns.key`: **`matched`** → an equivalent exists, **drop your synonym for
|
|
56
69
|
the canonical**; **`created`** → yours is novel and canonical going forward (keep it).
|
|
57
|
-
Rewrite the `## Search vocabulary` and any PRD
|
|
58
|
-
before persisting — the method is **born canonical**, never write-then-
|
|
59
|
-
what makes `filters.specs` filter across methods; naming is never a gate — a
|
|
70
|
+
Rewrite the `## Search vocabulary` and any PRD `## Search specs` predicates to those
|
|
71
|
+
names before persisting — the method is **born canonical**, never write-then-fix. This
|
|
72
|
+
is what makes `filters.specs` filter across methods; naming is never a gate — a
|
|
60
73
|
fragmenting name costs precision, never blocks a search. If `sil_specs` is **not
|
|
61
74
|
`ok`** (a registry blip), **do not block the mint**: persist the **raw coined names**
|
|
62
75
|
(every predicate reads `applied:false`) and shop on — convergence retries next
|
|
@@ -70,11 +83,11 @@ every revisit. The three signals: the buyer **contradicts** the guide, the
|
|
|
70
83
|
**volatility marker** is overdue, or the buyer **explicitly asks**. Signal-driven,
|
|
71
84
|
not a clock.
|
|
72
85
|
|
|
73
|
-
Refresh is **
|
|
74
|
-
stale volatile material, **carry every buyer-authored line forward verbatim**,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
86
|
+
Refresh is a **reconciled `write`**: load the current method, re-research **only** the
|
|
87
|
+
stale volatile material, **carry every buyer-authored line forward verbatim**, and
|
|
88
|
+
`sil_learn write` (`target: "method"`) the whole reconciled body — announce the delta.
|
|
89
|
+
The rewrite supersedes stale *research* claims and **never clobbers** a buyer line. The
|
|
90
|
+
method stays fully buyer-mutable — every edit is a `write` of the reconciled whole.
|
|
78
91
|
|
|
79
92
|
Canonicalize any **newly-coined** specs via `sil_specs` before persisting — same
|
|
80
93
|
convergence discipline (reuse a name already coined for the concept; take the
|
|
@@ -84,12 +97,30 @@ carrying a canonical name (already-canonical names are stable).
|
|
|
84
97
|
## Intent-keyed PRDs
|
|
85
98
|
|
|
86
99
|
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
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
100
|
+
queryable: `{ domain, product, intent }` → `ski/gloves-slope` (intent always present;
|
|
101
|
+
a context-free request keys `general`). It holds the method's dimensions **resolved to
|
|
102
|
+
this job** — the buyer's actual values — **specialized, never a copy of the method's
|
|
103
|
+
guide**. PRDs are **durable** and **revisitable** — re-buying the same thing, or
|
|
104
|
+
resuming an unfinished session, **recovers** the PRD, never rebuilds it. The PRD body
|
|
105
|
+
carries these sections:
|
|
106
|
+
|
|
107
|
+
- **`## Search specs`** — the load-bearing block: the **resolved predicate set**, a
|
|
108
|
+
list of `{ ns, key, op, value, unit?, hard? }` entries **projected verbatim** into
|
|
109
|
+
`sil_search`'s `filters.specs` at Beat 4 (one entry per decided dimension, keys drawn
|
|
110
|
+
from the method's `## Search vocabulary`). A *"prefer X, Y/Z acceptable"* requirement
|
|
111
|
+
is **one `op:in` set** over `{X, Y, Z}` — mark it `hard` only when a miss must
|
|
112
|
+
reject-at-pick — with the X-preference applied as **Beat-5 ranking**, **never** a hard
|
|
113
|
+
`eq` on X alone (that rejects the acceptable alternatives and empties the set).
|
|
114
|
+
- **`## Filled preferences`** — the buyer's stated durable answers, reconciled: **one
|
|
115
|
+
truth per dimension**. A correction **rewrites** the line it changes; it never adds a
|
|
116
|
+
second, contradicting one.
|
|
117
|
+
- **`## Notes / open`** — declined or unresolved dimensions, so the next session
|
|
118
|
+
recovers rather than re-asks. A **non-answer** ("no budget stated") lives here,
|
|
119
|
+
**never** as a preference.
|
|
120
|
+
|
|
121
|
+
Every PRD write is a whole-body **`sil_learn write`** (or **`create`** for the first
|
|
122
|
+
mint): read the current PRD, reconcile in context, write the coherent whole — so the
|
|
123
|
+
`## Search specs` block and `## Filled preferences` never drift apart or self-contradict.
|
|
93
124
|
|
|
94
125
|
## The store — frontmatter-as-truth (no manifest)
|
|
95
126
|
|
|
@@ -105,7 +136,8 @@ skipped and surfaced as `unreadable`, never half-read.
|
|
|
105
136
|
their PRDs. The frontmatter-as-truth query, **not a manifest** and not a
|
|
106
137
|
filesystem guess. The no-filter call is the "what does my shopper know?" overview.
|
|
107
138
|
- **Read one body** with **`sil_profile_get`** — `domainSlug` for the method body,
|
|
108
|
-
`+prd` for that PRD's body.
|
|
139
|
+
`+prd` for that PRD's body. **Read before every `write`** — reconcile from the real
|
|
140
|
+
current body, never from memory.
|
|
109
141
|
- **Remove** with **`sil_profile_remove`** — `domainSlug` alone removes the **whole
|
|
110
142
|
domain** subtree; `+prd` removes **just that PRD** (method + siblings survive).
|
|
111
143
|
Destructive: **confirm** with the buyer first.
|
|
@@ -24,11 +24,21 @@ This file owns Beats 1, 4 and 5.
|
|
|
24
24
|
|
|
25
25
|
## Beat 1 — Classify: `{domain, product, intent}`, reuse before mint
|
|
26
26
|
|
|
27
|
-
Resolve the request through **three coordinates, top-down**:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
**
|
|
31
|
-
|
|
27
|
+
Resolve the request through **three coordinates, top-down**:
|
|
28
|
+
|
|
29
|
+
- **domain** — the **broad product category** that owns the reusable buying guide.
|
|
30
|
+
Pick the **widest** slug whose method generalises across use-contexts: `earbuds`,
|
|
31
|
+
not `wireless-gym-earbuds`; `ski`, not `ski-touring`.
|
|
32
|
+
- **product** — the product type within the domain (`earbuds`, `boots`).
|
|
33
|
+
- **intent** — the **use-context** that reshapes the requirements (`gym`, `slope`).
|
|
34
|
+
|
|
35
|
+
**Never fold the use-context into the domain.** "Earbuds for the gym" is
|
|
36
|
+
`domain: earbuds, product: earbuds, intent: gym` — the gym-ness is the **intent**, so
|
|
37
|
+
next week's "earbuds for the office" reuses the same method and only mints a new PRD. A
|
|
38
|
+
`wireless-gym-earbuds` domain forks a near-duplicate buying guide per use and kills that
|
|
39
|
+
reuse. **Intent is always present**: a **context-free** request keys the `general`
|
|
40
|
+
intent (`ski/boots-general`), so every job carries all three coordinates and stays
|
|
41
|
+
uniformly queryable.
|
|
32
42
|
|
|
33
43
|
**Reuse-before-mint.** Query existing coordinates with **`sil_profile_search`**
|
|
34
44
|
(the frontmatter-as-truth discovery tool — never a filesystem guess) and
|
|
@@ -48,37 +58,32 @@ silent**. A reuse passes through unannounced.
|
|
|
48
58
|
|
|
49
59
|
## Beat 4 — Search-space: a bounded, priority-ordered fan-out (not a re-rank)
|
|
50
60
|
|
|
61
|
+
The PRD's **`## Search specs`** block is the resolved predicate set — Beat 4 **projects
|
|
62
|
+
it, never re-derives it**. Send those `{ns, key, op, value, unit?, hard?}` predicates
|
|
63
|
+
**verbatim** as `sil_search`'s `filters.specs`; the only per-call work is choosing the
|
|
64
|
+
fan-out and lifting any attribute a **dedicated param** serves better.
|
|
65
|
+
|
|
51
66
|
Project the filled PRD onto **`sil_search`** as a **bounded ≤ 4 priority-ordered**
|
|
52
|
-
fan-out — not one search, not unbounded (the bound is a production budget: each
|
|
53
|
-
|
|
67
|
+
fan-out — not one search, not unbounded (the bound is a production budget: each call is
|
|
68
|
+
a round-trip + tokens):
|
|
54
69
|
|
|
55
|
-
- **Call 1 is the tightest projection
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
70
|
+
- **Call 1 is the tightest projection** — the full `## Search specs` set. **Calls 2–4
|
|
71
|
+
are deliberate widenings**: relax the least load-bearing **soft** predicate, an
|
|
72
|
+
adjacent phrasing that lifts recall, or an explicit either/or branch. **Never relax a
|
|
73
|
+
`hard` predicate.** Core first, widenings after — the **priority order**.
|
|
59
74
|
- **Merge = dedup + concatenate in issue order — NOT a re-rank.** Concatenate the
|
|
60
75
|
per-call backend-ranked lists in issue order and **drop** any product already
|
|
61
|
-
**seen** earlier. Because issue order *is* priority order, this **never
|
|
62
|
-
|
|
63
|
-
- **
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
free-text `query`, which **you author yourself**. The plugin is **pure
|
|
73
|
-
transport**: it never folds a predicate into `query`, so a requirement that
|
|
74
|
-
belongs in `filters.specs` stays a predicate, never `query` prose.
|
|
75
|
-
Leave **`ship_to`** empty (the server resolves the registered default). **Never
|
|
76
|
-
invent** a param or predicate that isn't real — the real `sil_search` params live in
|
|
77
|
-
its tool description, the predicate vocabulary in the domain method. Then read the
|
|
78
|
-
per-predicate **`specs_status`** the response returns (each `{ns, key, applied}`) — it
|
|
79
|
-
feeds
|
|
80
|
-
Beat 5's honesty pass, which rejects at pick any `hard` predicate the backend left
|
|
81
|
-
`applied:false`.
|
|
76
|
+
**seen** earlier. Because issue order *is* priority order, this **never re-ranks** —
|
|
77
|
+
the engine owns order *within* a call, the fan-out *across* calls.
|
|
78
|
+
- **Prefer a dedicated param over a predicate** for the SAME attribute — a `price_max`
|
|
79
|
+
param OR a price spec, never both; likewise `category`, `condition`, `available`,
|
|
80
|
+
`local_merchants`. A purely descriptive residue (a colour, a phrasing) folds into the
|
|
81
|
+
free-text `query`, which **you author** — the plugin is **pure transport** and never
|
|
82
|
+
folds a predicate into `query`. Leave **`ship_to`** empty (the server resolves the
|
|
83
|
+
registered default); **never invent** a param or predicate that isn't real. Then read
|
|
84
|
+
the per-predicate **`specs_status`** the response returns (each `{ns, key, applied}`) —
|
|
85
|
+
it feeds Beat 5's honesty pass, which rejects at pick any `hard` predicate the backend
|
|
86
|
+
left `applied:false`.
|
|
82
87
|
|
|
83
88
|
## Beat 5 — Reflect: honesty pass first, judgment not threshold, propose-and-wait
|
|
84
89
|
|