sil-openclaw 0.4.0 → 0.4.2
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 +105 -0
- package/dist/lib/profile-store.js +44 -147
- package/dist/tools/catalog.js +9 -19
- package/dist/tools/profile.js +59 -75
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/scripts/create-shopper.mjs +34 -23
- package/sil-shopping/SKILL.md +55 -60
- package/sil-shopping/examples/multi_domain_shopper_walkthrough.md +44 -35
- package/sil-shopping/references/agent_creation_engine.md +177 -119
- package/sil-shopping/references/fill_and_feedback.md +58 -44
- package/sil-shopping/references/method_and_prds.md +116 -83
- package/sil-shopping/references/setup_onboarding.md +48 -52
- package/sil-shopping/references/shop_loop.md +72 -71
- package/sil-shopping/references/brainstorm_interview.md +0 -97
- package/sil-shopping/references/catalog_tools_reference.md +0 -44
- package/sil-shopping/references/search_param_mapping.md +0 -80
|
@@ -1,110 +1,143 @@
|
|
|
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
|
|
7
7
|
|
|
8
|
-
Beat 1 hands off a resolved `domain` — a **HIT** (
|
|
9
|
-
|
|
10
|
-
|
|
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
11
|
|
|
12
12
|
## LOAD — the hot path (HIT, fresh)
|
|
13
13
|
|
|
14
14
|
A plain revisit **LOADS**: `sil_profile_get(domain)` reads the durable method body
|
|
15
|
-
— **no research
|
|
16
|
-
|
|
17
|
-
|
|
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
18
|
|
|
19
19
|
## MINT — cold (MISS)
|
|
20
20
|
|
|
21
|
-
No method exists, so **
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
the
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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
|
+
|
|
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.
|
|
47
|
+
|
|
48
|
+
The vocabulary is **canonicalized before persist**. `sil_specs` is
|
|
49
|
+
**precision-first** — two specs converge only when **every field** agrees within the
|
|
50
|
+
same `namespace` and `data_type`, so the name decides whether a concept converges or
|
|
51
|
+
forks: a synonym (`speed_mbps` vs `transfer_speed_mbps`) splits one concept into two
|
|
52
|
+
specs that never match. So coin for the match:
|
|
53
|
+
|
|
54
|
+
- **One concept, one spelling.** Reuse the exact `ns.key`, `display_name`,
|
|
55
|
+
`data_type`, and `unit` you already coined for that concept — verbatim, across
|
|
56
|
+
every domain (consult a sibling method with `sil_profile_get` only when the
|
|
57
|
+
concept plausibly recurs, never an exhaustive scan).
|
|
58
|
+
- **Common attribute → conventional name.** For a widely-shared attribute you have
|
|
59
|
+
**not** coined before (screen size, weight, RAM, waterproof rating, material…),
|
|
60
|
+
take its **conventional** name — a Schelling point, there being no registry to
|
|
61
|
+
read. Coin fresh only for a genuinely niche attribute.
|
|
62
|
+
- **Corroborate the name.** Carry a concept-naming **`description`** — the
|
|
63
|
+
**corroborator** the dedupe leans on to merge synonyms and keep distinct concepts
|
|
64
|
+
apart — and get **`data_type`** and **`namespace`** right, the hard floors a wrong
|
|
65
|
+
value forks the concept past.
|
|
66
|
+
|
|
67
|
+
Submit the definitions to **`sil_specs`** (dedupe-or-create) and adopt the returned
|
|
68
|
+
**canonical** `ns.key`: **`matched`** → an equivalent exists, **drop your synonym for
|
|
69
|
+
the canonical**; **`created`** → yours is novel and canonical going forward (keep it).
|
|
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
|
|
73
|
+
fragmenting name costs precision, never blocks a search. If `sil_specs` is **not
|
|
74
|
+
`ok`** (a registry blip), **do not block the mint**: persist the **raw coined names**
|
|
75
|
+
(every predicate reads `applied:false`) and shop on — convergence retries next
|
|
76
|
+
mint/refresh. Canonicalization is **silent to the buyer**: never surface `ns.key`
|
|
77
|
+
plumbing.
|
|
60
78
|
|
|
61
79
|
## REFRESH — signal-driven (HIT, stale)
|
|
62
80
|
|
|
63
|
-
A plain revisit LOADS; a refresh fires **only on a signal
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
already coined for the concept; take the conventional name for a common attribute)
|
|
79
|
-
and resubmit **only** the specs not yet carrying a canonical name (already-canonical
|
|
80
|
-
names are stable; do not resubmit them).
|
|
81
|
+
A plain revisit LOADS; a refresh fires **only on a signal** — never on a TTL, not
|
|
82
|
+
every revisit. The three signals: the buyer **contradicts** the guide, the
|
|
83
|
+
**volatility marker** is overdue, or the buyer **explicitly asks**. Signal-driven,
|
|
84
|
+
not a clock.
|
|
85
|
+
|
|
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.
|
|
91
|
+
|
|
92
|
+
Canonicalize any **newly-coined** specs via `sil_specs` before persisting — same
|
|
93
|
+
convergence discipline (reuse a name already coined for the concept; take the
|
|
94
|
+
conventional name for a common attribute), resubmitting **only** specs not yet
|
|
95
|
+
carrying a canonical name (already-canonical names are stable).
|
|
81
96
|
|
|
82
97
|
## Intent-keyed PRDs
|
|
83
98
|
|
|
84
|
-
A PRD's identity is the **job-to-be-done
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
99
|
+
A PRD's identity is the **job-to-be-done**, keyed by three coordinates so it stays
|
|
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.
|
|
91
124
|
|
|
92
125
|
## The store — frontmatter-as-truth (no manifest)
|
|
93
126
|
|
|
94
127
|
Artefacts live at `shopper/domains/<slug>/{method.md, prds/<product>-<intent>.md,
|
|
95
|
-
assets/}`. There is **no manifest** — each file's own **frontmatter** IS the
|
|
96
|
-
|
|
97
|
-
|
|
128
|
+
assets/}`. There is **no manifest** — each file's own **frontmatter** IS the truth,
|
|
129
|
+
discovered by a filesystem **scan** over those coordinates. Malformed frontmatter is
|
|
130
|
+
skipped and surfaced as `unreadable`, never half-read.
|
|
98
131
|
|
|
99
132
|
## Discovery + manage
|
|
100
133
|
|
|
101
|
-
- **Discover / reuse-before-mint** with **`sil_profile_search`** —
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
"what does my shopper know?" overview.
|
|
134
|
+
- **Discover / reuse-before-mint** with **`sil_profile_search`** — queries artefact
|
|
135
|
+
**frontmatter**, returns **coordinates** only (no bodies): the learned domains and
|
|
136
|
+
their PRDs. The frontmatter-as-truth query, **not a manifest** and not a
|
|
137
|
+
filesystem guess. The no-filter call is the "what does my shopper know?" overview.
|
|
106
138
|
- **Read one body** with **`sil_profile_get`** — `domainSlug` for the method body,
|
|
107
|
-
`+prd` for that PRD's body.
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
139
|
+
`+prd` for that PRD's body. **Read before every `write`** — reconcile from the real
|
|
140
|
+
current body, never from memory.
|
|
141
|
+
- **Remove** with **`sil_profile_remove`** — `domainSlug` alone removes the **whole
|
|
142
|
+
domain** subtree; `+prd` removes **just that PRD** (method + siblings survive).
|
|
143
|
+
Destructive: **confirm** with the buyer first.
|
|
@@ -1,68 +1,64 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: setup-onboarding
|
|
3
|
-
description: The one-time setup script the router defers to — the five-stage onboarding progression, the after-register shopper offer, and the per-search pitch. Load while a shopper is still being set up
|
|
3
|
+
description: The one-time setup script the router defers to — the five-stage onboarding progression, the after-register shopper offer, and the per-search pitch. Load while a shopper is still being set up; shed once setup is complete.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Setting up the shopper — the staged onboarding
|
|
7
7
|
|
|
8
|
-
The router defers the **one-time setup script** here: the five-stage
|
|
9
|
-
after-register offer,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
and its single next step**.
|
|
8
|
+
The router defers the **one-time setup script** here: the five-stage progression, the
|
|
9
|
+
after-register offer, the per-search pitch. None applies once setup is complete — the router
|
|
10
|
+
sheds it. **Read the stage from state, never guess:** `sil_whoami` (registered?) + a no-arg
|
|
11
|
+
**`sil_profile_search`** (any `domains`?). Present **only the current stage's beat and its
|
|
12
|
+
single next step**.
|
|
14
13
|
|
|
15
|
-
## The five-stage progression
|
|
14
|
+
## The five-stage progression
|
|
16
15
|
|
|
17
|
-
1. **Unregistered** — `sil_whoami` finds no
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
5. **Setup complete** — a shopper with at least one domain. **Shed** every onboarding beat:
|
|
36
|
-
none of the stages above apply. **Show only how to use** the plugin well — the
|
|
37
|
-
**domain-gated shop loop** and **Spec-Driven Shopping** ([`shop_loop.md`](shop_loop.md)).
|
|
16
|
+
1. **Unregistered** — `sil_whoami` finds no identity. Before `sil_register`, state plainly
|
|
17
|
+
what it does and **how 4GPTs & SIL use the user's data**, grounded strictly in this plugin
|
|
18
|
+
(no invented policy): registering opens a browser sign-in creating their **sil identity**
|
|
19
|
+
(name + addresses, read by `sil_whoami`), stored **locally**; the shopper's setup + memory
|
|
20
|
+
live under `$SIL_DATA_DIR`, never leaving the device via the plugin; **search** hits sil's
|
|
21
|
+
catalog. Next: `sil_register`.
|
|
22
|
+
2. **Registered, no shopper** — identity exists, `sil_profile_search` returns no domains, no
|
|
23
|
+
shopper created. Bare `sil_search` works but isn't the finished state; guide the user to
|
|
24
|
+
**set up their shopper**, naming up front it takes a **couple of minutes and a few
|
|
25
|
+
questions**. The after-register offer owns the gate.
|
|
26
|
+
3. **Shopper, no domain** — the shopper was created (engine `created`) but `sil_profile_search`
|
|
27
|
+
still returns no domains. The first shopping intent **mints the first domain**, announced
|
|
28
|
+
with the inferred niche so the user can correct it. Next: state a shopping intent.
|
|
29
|
+
4. **Shopper active** — `sil_profile_search` returns ≥ 1 domain. Milestones: the **first domain
|
|
30
|
+
created**, and softer, that `sil_learn` stored a fact or taste.
|
|
31
|
+
5. **Setup complete** — a shopper with ≥ 1 domain. **Shed** every onboarding beat; **show only
|
|
32
|
+
how to use** the plugin well — the domain-gated six-beat loop and Spec-Driven Shopping
|
|
33
|
+
([`shop_loop.md`](shop_loop.md)).
|
|
38
34
|
|
|
39
|
-
## After register — offer
|
|
35
|
+
## After register — offer the shopper, once (offer_shopper)
|
|
40
36
|
|
|
41
|
-
`sil_register` returns `already_registered` with `next_step: "offer_shopper"` on a
|
|
42
|
-
|
|
43
|
-
(the overview) to read shopper state, then branch:
|
|
37
|
+
`sil_register` returns `already_registered` with `next_step: "offer_shopper"` on a confirmed
|
|
38
|
+
registration. Run a no-arg **`sil_profile_search`**, then branch:
|
|
44
39
|
|
|
45
|
-
- **
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
[`
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
40
|
+
- **No domains, no shopper:** introduce the shopper in one beat and offer to set it up — name
|
|
41
|
+
the value (shops each niche in depth; reuses the sizes + hard limits it knows so nothing is
|
|
42
|
+
re-asked; explains why each pick fits). Load
|
|
43
|
+
[`agent_creation_engine.md`](agent_creation_engine.md) **only if the user accepts** — its
|
|
44
|
+
Part 1 onboarding runs first, the engine only after endorsement. Take no for an answer; bare
|
|
45
|
+
`sil_search` stays first-class.
|
|
46
|
+
- **A shopper exists:** **skip this beat.** The shopper is a **singleton** — never offer a
|
|
47
|
+
second.
|
|
52
48
|
|
|
53
49
|
## After a bare search — the per-search pitch (post-result)
|
|
54
50
|
|
|
55
|
-
When a plain `sil_search` **completes
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
51
|
+
When a plain `sil_search` **completes `ok`** in a **profile-less** session, present the results
|
|
52
|
+
best-first **exactly as returned**, then append **one short trailing line** naming what a
|
|
53
|
+
shopper adds. Never a pre-search question, never a re-rank. Name one or two of three levers,
|
|
54
|
+
rotating which you lead with:
|
|
59
55
|
|
|
60
|
-
- **niche depth** —
|
|
61
|
-
- **memory** —
|
|
62
|
-
- **the why** —
|
|
56
|
+
- **niche depth** — weighs picks against how the niche actually buys;
|
|
57
|
+
- **memory** — keeps your sizes + hard limits on file, so no search re-asks them;
|
|
58
|
+
- **the why** — explains which pick fits you and why.
|
|
63
59
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
60
|
+
It **recurs on every** completed profile-less search — **no fire-once gate, no cooldown**;
|
|
61
|
+
brevity + lever rotation keep it from nagging. Two suppressors: a **shopper exists** (that
|
|
62
|
+
session is the shopper's — drop the line), or the search **not `ok`** (its own recovery
|
|
63
|
+
carries; add no tip).
|
|
64
|
+
</content>
|
|
@@ -6,112 +6,113 @@ description: The six-beat Spec-Driven Shopping loop — the state machine the sh
|
|
|
6
6
|
# The six-beat Spec-Driven Shopping loop
|
|
7
7
|
|
|
8
8
|
As the shopper you run one loop on every request — a **six-beat** state machine.
|
|
9
|
-
Most of it is reasoning over what you already know; you
|
|
10
|
-
the genuine residue. The beats
|
|
9
|
+
Most of it is reasoning over what you already know; you ask the buyer only about
|
|
10
|
+
the genuine residue. The beats, **in order**:
|
|
11
11
|
|
|
12
|
-
1. **Classify** — resolve
|
|
13
|
-
|
|
12
|
+
1. **Classify** — resolve `{domain, product, intent}`, reuse a learned domain/PRD
|
|
13
|
+
before minting (owned here).
|
|
14
14
|
2. **Method load / mint / refresh** — recover or research the domain's method +
|
|
15
15
|
its intent-keyed PRDs — [`method_and_prds.md`](method_and_prds.md).
|
|
16
|
-
3. **Fill** — resolve the PRD by precedence, eliciting only the residue
|
|
16
|
+
3. **Fill** — resolve the PRD by precedence, eliciting only the residue —
|
|
17
|
+
[`fill_and_feedback.md`](fill_and_feedback.md).
|
|
17
18
|
4. **Search-space** — project the filled PRD into a bounded fan-out (owned here).
|
|
18
19
|
5. **Reflect** — judge best-available against the PRD + method (owned here).
|
|
19
|
-
6. **Feedback** — capture what the reaction surfaced
|
|
20
|
+
6. **Feedback** — capture what the reaction surfaced —
|
|
21
|
+
[`fill_and_feedback.md`](fill_and_feedback.md).
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
This file owns Beats 1, 4 and 5.
|
|
22
24
|
|
|
23
25
|
## Beat 1 — Classify: `{domain, product, intent}`, reuse before mint
|
|
24
26
|
|
|
25
|
-
Resolve the request through **three coordinates, top-down**:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
**
|
|
29
|
-
|
|
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.
|
|
30
42
|
|
|
31
43
|
**Reuse-before-mint.** Query existing coordinates with **`sil_profile_search`**
|
|
32
44
|
(the frontmatter-as-truth discovery tool — never a filesystem guess) and
|
|
33
|
-
**semantic-match** the request
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
45
|
+
**semantic-match** the request: **prefer existing** when a learned domain/PRD
|
|
46
|
+
covers the job, mint only when nothing does. The one guard against over-merging is
|
|
47
|
+
the requirements-divergence test — two requests share a PRD only if they resolve
|
|
48
|
+
to the same requirements.
|
|
37
49
|
|
|
38
|
-
**Never over-ask just to key.**
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
50
|
+
**Never over-ask just to key.** A silent request keys `general` and moves on —
|
|
51
|
+
keying forces no extra question. When intent is genuinely requirement-defining but
|
|
52
|
+
the request is silent, that surfaces as the first Beat-3 question, not a keying
|
|
53
|
+
interrogation.
|
|
42
54
|
|
|
43
55
|
**Announce a mint.** A new-domain or new-PRD mint is **announced** — state the
|
|
44
|
-
inferred `domain / product / intent` so the buyer can **correct** it
|
|
45
|
-
silent**. A reuse passes through
|
|
56
|
+
inferred `domain / product / intent` so the buyer can **correct** it, **never
|
|
57
|
+
silent**. A reuse passes through unannounced.
|
|
46
58
|
|
|
47
59
|
## Beat 4 — Search-space: a bounded, priority-ordered fan-out (not a re-rank)
|
|
48
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
|
+
|
|
49
66
|
Project the filled PRD onto **`sil_search`** as a **bounded ≤ 4 priority-ordered**
|
|
50
|
-
fan-out
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
- **Call 1 is the tightest projection
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
- **
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
Beat-2 canonical `## Search vocabulary` (the `sil_specs`-coined names) — one
|
|
71
|
-
`{ns, key, op, value, unit?, hard?}` per annotated requirement, marking an
|
|
72
|
-
inviolable one `hard:true`. **Prefer a dedicated param over a predicate** for
|
|
73
|
-
the SAME attribute — never send both (a `price_max` param OR a price spec, not
|
|
74
|
-
both);
|
|
75
|
-
3. else — a purely descriptive residue (a colour, a phrasing) — fold it into the
|
|
76
|
-
free-text `query`, which **you author yourself**. The plugin is **pure
|
|
77
|
-
transport**: it never folds a predicate into `query`, so a requirement that
|
|
78
|
-
belongs in `filters.specs` stays a predicate, never `query` prose.
|
|
79
|
-
Leave **`ship_to`** empty (the server resolves the registered default). **Never
|
|
80
|
-
invent** a param or a predicate that isn't real — the params live in the
|
|
81
|
-
`sil_search` description, the predicate vocabulary in the domain method (see
|
|
82
|
-
[`search_param_mapping.md`](search_param_mapping.md)). Then read the per-predicate
|
|
83
|
-
**`specs_status`** the response returns (each `{ns, key, applied}`) — it feeds
|
|
84
|
-
Beat 5's honesty pass, which rejects at pick any `hard` predicate the backend left
|
|
85
|
-
`applied:false`.
|
|
67
|
+
fan-out — not one search, not unbounded (the bound is a production budget: each call is
|
|
68
|
+
a round-trip + tokens):
|
|
69
|
+
|
|
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**.
|
|
74
|
+
- **Merge = dedup + concatenate in issue order — NOT a re-rank.** Concatenate the
|
|
75
|
+
per-call backend-ranked lists in issue order and **drop** any product already
|
|
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`.
|
|
86
87
|
|
|
87
88
|
## Beat 5 — Reflect: honesty pass first, judgment not threshold, propose-and-wait
|
|
88
89
|
|
|
89
|
-
Take Beat 4's merged issue-order list and its per-call `specs_status`. Run
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
Take Beat 4's merged issue-order list and its per-call `specs_status`. Run
|
|
91
|
+
**honesty pass → judge → branch**, and **never re-rank**: the engine owns order,
|
|
92
|
+
you own the verdict.
|
|
92
93
|
|
|
93
94
|
**1 — Honesty pass, first.** Before judging fitness, walk the survivors and
|
|
94
95
|
**reject-at-pick** any candidate that violates a *hard* constraint the backend
|
|
95
96
|
could not enforce — exactly the predicates the response marked **`applied:false`**,
|
|
96
|
-
plus the `user_spec` `[hard]` markers. A violator
|
|
97
|
-
the pick; if rejection empties the set,
|
|
97
|
+
plus the `user_spec` `[hard]` markers. A violator leaves contention, never becomes
|
|
98
|
+
the pick; if rejection empties the set, take the empty path.
|
|
98
99
|
|
|
99
100
|
**2 — Judge, then branch.** Weigh the best surviving candidate against the PRD +
|
|
100
|
-
method.
|
|
101
|
-
|
|
101
|
+
method. Satisfies-or-falls-short is a **judgment**, **not a threshold** and not a
|
|
102
|
+
mechanical any-unmet-requirement rule — read the whole set.
|
|
102
103
|
|
|
103
104
|
- **Satisfies → a hero + 1–2 justified alternatives.** Lead with **one**
|
|
104
105
|
recommendation carrying the SDS-bar *why* (a met requirement, a researched method
|
|
105
|
-
mechanic,
|
|
106
|
+
mechanic, a stored preference reused without re-asking), then **one or two**
|
|
106
107
|
considered **alternatives**, each with a one-line reason. Best-first **as
|
|
107
108
|
returned** — **never re-rank**, never a bare list.
|
|
108
109
|
- **Shortfall or empty → propose a specific relaxation and wait.** Name the gap,
|
|
109
|
-
show the closest survivors,
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
show the closest survivors, **propose** the specific change that would widen it,
|
|
111
|
+
then **wait** for the buyer's nod. **No silent re-search**, no silent auto-widen;
|
|
112
|
+
the buyer can redirect instead.
|
|
112
113
|
|
|
113
114
|
A **non-`ok`** status is not an empty match — do not relax params; follow that
|
|
114
115
|
tool's own **`recovery`** exactly.
|
|
115
116
|
|
|
116
|
-
**Then Beat 6.** The buyer's reaction
|
|
117
|
-
|
|
117
|
+
**Then Beat 6.** The buyer's reaction is what Beat 6 captures —
|
|
118
|
+
[`fill_and_feedback.md`](fill_and_feedback.md).
|