sil-openclaw 0.5.2 → 0.7.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.
- package/CHANGELOG.md +47 -0
- package/README.md +27 -26
- package/SECURITY.md +3 -4
- package/dist/index.js +1 -1
- package/dist/lib/shopping-call.js +7 -4
- package/dist/lib/sil-client.js +36 -66
- package/dist/lib/tool-result.js +1 -1
- package/dist/tools/catalog.js +83 -242
- package/dist/tools/identity.js +74 -87
- package/openclaw.plugin.json +12 -7
- package/package.json +1 -1
- package/schema/PROVENANCE.md +7 -4
- package/schema/shopping-brief-read-response.schema.json +1 -1
- package/schema/shopping-brief-write-request.schema.json +225 -0
- package/schema/{shopping-brief-create-response.schema.json → shopping-brief-write-response.schema.json} +3 -3
- package/schema/shopping-content-request.schema.json +89 -0
- package/schema/shopping-content-response.schema.json +298 -0
- package/schema/shopping-domain-get-request.schema.json +19 -1
- package/schema/shopping-domain-get-response.schema.json +330 -66
- package/schema/shopping-domain-search-request.schema.json +1 -1
- package/schema/shopping-domain-search-response.schema.json +40 -35
- package/schema/shopping-offers-request.schema.json +174 -23
- package/schema/shopping-offers-response.schema.json +20 -10
- package/schema/shopping-product-get-request.schema.json +2 -2
- package/schema/shopping-product-get-response.schema.json +119 -16
- package/schema/shopping-search-request.schema.json +16 -25
- package/schema/shopping-search-response.schema.json +101 -21
- package/schema/shopping-seller-get-response.schema.json +249 -221
- package/schema/shopping-user-forget-request.schema.json +43 -0
- package/schema/shopping-user-forget-response.schema.json +74 -0
- package/schema/shopping-user-read-request.schema.json +36 -0
- package/schema/shopping-user-read-response.schema.json +372 -0
- package/schema/shopping-user-remember-request.schema.json +340 -0
- package/schema/shopping-user-remember-response.schema.json +66 -0
- package/schema/sil-whoami-request.schema.json +8 -0
- package/schema/sil-whoami-response.schema.json +90 -0
- package/sil-shopping/SKILL.md +139 -180
- package/schema/shopping-brief-create-request.schema.json +0 -98
- package/schema/shopping-brief-edit-request.schema.json +0 -125
- package/schema/shopping-brief-edit-response.schema.json +0 -24
- package/schema/shopping-domain-create-request.schema.json +0 -160
- package/schema/shopping-domain-create-response.schema.json +0 -60
- package/schema/shopping-profile-edit-request.schema.json +0 -97
- package/schema/shopping-profile-edit-response.schema.json +0 -17
- package/sil-shopping/references/mint.md +0 -190
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://schemas.sil.com/shopping-domain-create-request.schema.json",
|
|
4
|
-
"title": "sil shopping_domain_create — request",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"required": [
|
|
7
|
-
"path",
|
|
8
|
-
"guide",
|
|
9
|
-
"name",
|
|
10
|
-
"specs"
|
|
11
|
-
],
|
|
12
|
-
"properties": {
|
|
13
|
-
"path": {
|
|
14
|
-
"type": "string",
|
|
15
|
-
"pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)*$",
|
|
16
|
-
"maxLength": 255,
|
|
17
|
-
"description": "Mints this path; only its root must already stand. A path directly under `product` is refused — name the family the thing is shelved in, as `product.sports.winter.ski.boots` does."
|
|
18
|
-
},
|
|
19
|
-
"guide": {
|
|
20
|
-
"type": "string",
|
|
21
|
-
"minLength": 1,
|
|
22
|
-
"maxLength": 4096,
|
|
23
|
-
"description": "Writes the domain document every later buyer inherits, in markdown: what the thing is bought on, what goes wrong and what that costs the buyer, what to trust and what not to, and what buying it online takes in place of handling it. A domain sil has curated already carries one — write one only for a domain the registry does not hold."
|
|
24
|
-
},
|
|
25
|
-
"name": {
|
|
26
|
-
"type": "string",
|
|
27
|
-
"minLength": 1,
|
|
28
|
-
"maxLength": 64,
|
|
29
|
-
"description": "Names the thing in English, and there is ONE. A name a standing domain already answers to is refused, naming that domain."
|
|
30
|
-
},
|
|
31
|
-
"labels": {
|
|
32
|
-
"type": "array",
|
|
33
|
-
"items": {
|
|
34
|
-
"type": "string",
|
|
35
|
-
"minLength": 1,
|
|
36
|
-
"maxLength": 64
|
|
37
|
-
},
|
|
38
|
-
"minItems": 1,
|
|
39
|
-
"maxItems": 20,
|
|
40
|
-
"description": "Seeds the market's own words for the thing, in any language — `καφετιέρα φίλτρου`, `dripper`. sil asks the indexes in them and grows more from the titles it holds."
|
|
41
|
-
},
|
|
42
|
-
"specs": {
|
|
43
|
-
"type": "array",
|
|
44
|
-
"items": {
|
|
45
|
-
"type": "object",
|
|
46
|
-
"required": [
|
|
47
|
-
"key",
|
|
48
|
-
"display_name",
|
|
49
|
-
"type"
|
|
50
|
-
],
|
|
51
|
-
"properties": {
|
|
52
|
-
"key": {
|
|
53
|
-
"type": "string",
|
|
54
|
-
"minLength": 1,
|
|
55
|
-
"maxLength": 64,
|
|
56
|
-
"description": "Coins the key here; naming one an ancestor defines redefines it for this subtree, or answers `inherited: true` when the declaration states nothing new."
|
|
57
|
-
},
|
|
58
|
-
"display_name": {
|
|
59
|
-
"type": "string",
|
|
60
|
-
"minLength": 1,
|
|
61
|
-
"maxLength": 128,
|
|
62
|
-
"description": "Names the key for a reader in the buyer's words."
|
|
63
|
-
},
|
|
64
|
-
"description": {
|
|
65
|
-
"type": "string",
|
|
66
|
-
"maxLength": 1024,
|
|
67
|
-
"description": "Writes how this one key moves the fit, for every agent that reads this domain after you — what it decides, what goes wrong at either end of it, and how a measurement or a stated preference becomes a value for it."
|
|
68
|
-
},
|
|
69
|
-
"type": {
|
|
70
|
-
"anyOf": [
|
|
71
|
-
{
|
|
72
|
-
"type": "string",
|
|
73
|
-
"const": "number"
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
"type": "string",
|
|
77
|
-
"const": "boolean"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"type": "string",
|
|
81
|
-
"const": "enum"
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
"type": "string",
|
|
85
|
-
"const": "money"
|
|
86
|
-
}
|
|
87
|
-
],
|
|
88
|
-
"description": "Types the value the agent sends and reads for this key."
|
|
89
|
-
},
|
|
90
|
-
"unit": {
|
|
91
|
-
"type": "string",
|
|
92
|
-
"minLength": 1,
|
|
93
|
-
"description": "Declares the unit every value of this key is in."
|
|
94
|
-
},
|
|
95
|
-
"allowed_values": {
|
|
96
|
-
"type": "array",
|
|
97
|
-
"items": {
|
|
98
|
-
"type": "string",
|
|
99
|
-
"minLength": 1
|
|
100
|
-
},
|
|
101
|
-
"minItems": 1,
|
|
102
|
-
"description": "Declares the closed set an enum takes."
|
|
103
|
-
},
|
|
104
|
-
"step": {
|
|
105
|
-
"type": "number",
|
|
106
|
-
"exclusiveMinimum": 0,
|
|
107
|
-
"description": "Declares the increment the maker prints this numeric axis in — 0.5 for a Mondopoint size. Only on a number."
|
|
108
|
-
},
|
|
109
|
-
"forms": {
|
|
110
|
-
"type": "object",
|
|
111
|
-
"patternProperties": {
|
|
112
|
-
"^.*$": {
|
|
113
|
-
"type": "string",
|
|
114
|
-
"minLength": 1
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
"maxProperties": 100,
|
|
118
|
-
"description": "Declares what pages print for a value, mapped to the value — `{\"1-4 cups\": \"02\", \"43⅓\": \"43.3\"}` — so a page sil has never read keys it without a model."
|
|
119
|
-
},
|
|
120
|
-
"labels": {
|
|
121
|
-
"type": "array",
|
|
122
|
-
"items": {
|
|
123
|
-
"type": "string",
|
|
124
|
-
"minLength": 1,
|
|
125
|
-
"maxLength": 60
|
|
126
|
-
},
|
|
127
|
-
"minItems": 1,
|
|
128
|
-
"maxItems": 20,
|
|
129
|
-
"description": "Maps the headings pages print this key under — `Flex`, `Flex Index`, `Ευρετήριο Flex` — so a page sil has never read keys the value without a model."
|
|
130
|
-
},
|
|
131
|
-
"aliases": {
|
|
132
|
-
"type": "array",
|
|
133
|
-
"items": {
|
|
134
|
-
"type": "string",
|
|
135
|
-
"minLength": 1,
|
|
136
|
-
"maxLength": 60
|
|
137
|
-
},
|
|
138
|
-
"minItems": 1,
|
|
139
|
-
"maxItems": 20,
|
|
140
|
-
"description": "Maps the names another agent may send for this key — `mondopoint`, `mondo` — so a search naming one of them is answered on this key instead of refused."
|
|
141
|
-
},
|
|
142
|
-
"variant_spec": {
|
|
143
|
-
"type": "boolean",
|
|
144
|
-
"const": true,
|
|
145
|
-
"description": "Marks a key that, alone or with the others so marked, identifies a purchasable variant."
|
|
146
|
-
},
|
|
147
|
-
"product_spec": {
|
|
148
|
-
"type": "boolean",
|
|
149
|
-
"const": true,
|
|
150
|
-
"description": "Marks a key that, with the brand and the others so marked, tells one product from the next."
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
"additionalProperties": false
|
|
154
|
-
},
|
|
155
|
-
"maxItems": 50,
|
|
156
|
-
"description": "Coins the keys this domain is bought by; the registry derives the operators."
|
|
157
|
-
}
|
|
158
|
-
},
|
|
159
|
-
"additionalProperties": false
|
|
160
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://schemas.sil.com/shopping-domain-create-response.schema.json",
|
|
4
|
-
"title": "sil shopping_domain_create — response",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"required": [
|
|
7
|
-
"status",
|
|
8
|
-
"path",
|
|
9
|
-
"specs"
|
|
10
|
-
],
|
|
11
|
-
"properties": {
|
|
12
|
-
"status": {
|
|
13
|
-
"type": "string",
|
|
14
|
-
"const": "ok",
|
|
15
|
-
"description": "Reads the answer. Every other status arrives as an error body carrying recovery."
|
|
16
|
-
},
|
|
17
|
-
"path": {
|
|
18
|
-
"type": "string",
|
|
19
|
-
"description": "Searches it."
|
|
20
|
-
},
|
|
21
|
-
"specs": {
|
|
22
|
-
"type": "array",
|
|
23
|
-
"items": {
|
|
24
|
-
"type": "object",
|
|
25
|
-
"required": [
|
|
26
|
-
"key"
|
|
27
|
-
],
|
|
28
|
-
"properties": {
|
|
29
|
-
"key": {
|
|
30
|
-
"type": "string",
|
|
31
|
-
"description": "Uses this key in the Brief and in `shopping_search`."
|
|
32
|
-
},
|
|
33
|
-
"variant_spec": {
|
|
34
|
-
"type": "boolean",
|
|
35
|
-
"const": true,
|
|
36
|
-
"description": "Knows it must settle this key for a variant."
|
|
37
|
-
},
|
|
38
|
-
"product_spec": {
|
|
39
|
-
"type": "boolean",
|
|
40
|
-
"const": true,
|
|
41
|
-
"description": "Knows this key tells one product from the next."
|
|
42
|
-
},
|
|
43
|
-
"inherited": {
|
|
44
|
-
"type": "boolean",
|
|
45
|
-
"const": true,
|
|
46
|
-
"description": "Knows it may filter on this key without having minted it."
|
|
47
|
-
},
|
|
48
|
-
"bound_from": {
|
|
49
|
-
"type": "string",
|
|
50
|
-
"maxLength": 64,
|
|
51
|
-
"description": "Reads the key it sent, which named a key that already stands: sil answers on the standing one and maps what was sent onto it. Uses `key`, never this."
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
"additionalProperties": false
|
|
55
|
-
},
|
|
56
|
-
"description": "Reads back the keys the registry accepted, as it accepted them."
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
"additionalProperties": false
|
|
60
|
-
}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://schemas.sil.com/shopping-profile-edit-request.schema.json",
|
|
4
|
-
"title": "sil shopping_profile_edit — request",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"properties": {
|
|
7
|
-
"currency": {
|
|
8
|
-
"type": "string",
|
|
9
|
-
"pattern": "^[A-Z]{3}$",
|
|
10
|
-
"minLength": 3,
|
|
11
|
-
"maxLength": 3,
|
|
12
|
-
"description": "Writes the currency the buyer prices in; every money row that names none means this one. sil converts nothing."
|
|
13
|
-
},
|
|
14
|
-
"measurements": {
|
|
15
|
-
"type": "array",
|
|
16
|
-
"items": {
|
|
17
|
-
"type": "object",
|
|
18
|
-
"required": [
|
|
19
|
-
"name",
|
|
20
|
-
"value"
|
|
21
|
-
],
|
|
22
|
-
"properties": {
|
|
23
|
-
"name": {
|
|
24
|
-
"type": "string",
|
|
25
|
-
"pattern": "^[a-z0-9_]+$",
|
|
26
|
-
"minLength": 1,
|
|
27
|
-
"maxLength": 64,
|
|
28
|
-
"description": "Names the measurement in lower snake_case (`foot_length`, never \"foot length\"); writing the same name again replaces it."
|
|
29
|
-
},
|
|
30
|
-
"value": {
|
|
31
|
-
"anyOf": [
|
|
32
|
-
{
|
|
33
|
-
"type": "number"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"type": "string",
|
|
37
|
-
"minLength": 1,
|
|
38
|
-
"maxLength": 128
|
|
39
|
-
}
|
|
40
|
-
],
|
|
41
|
-
"description": "Reads a number to translate through the guide, or a size as it is printed."
|
|
42
|
-
},
|
|
43
|
-
"unit": {
|
|
44
|
-
"type": "string",
|
|
45
|
-
"minLength": 1,
|
|
46
|
-
"maxLength": 16,
|
|
47
|
-
"description": "Reads which unit the number is in before comparing it with a spec."
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
"additionalProperties": false
|
|
51
|
-
},
|
|
52
|
-
"maxItems": 32,
|
|
53
|
-
"description": "Writes what the buyer said about their body before the next search; an entry replaces the one of the same `name`."
|
|
54
|
-
},
|
|
55
|
-
"preferences": {
|
|
56
|
-
"type": "array",
|
|
57
|
-
"items": {
|
|
58
|
-
"type": "object",
|
|
59
|
-
"required": [
|
|
60
|
-
"name",
|
|
61
|
-
"value"
|
|
62
|
-
],
|
|
63
|
-
"properties": {
|
|
64
|
-
"name": {
|
|
65
|
-
"type": "string",
|
|
66
|
-
"pattern": "^[a-z0-9_]+$",
|
|
67
|
-
"minLength": 1,
|
|
68
|
-
"maxLength": 64,
|
|
69
|
-
"description": "Names the preference in lower snake_case (`boot_closure`, never \"boot closure\"); writing the same name again replaces it."
|
|
70
|
-
},
|
|
71
|
-
"value": {
|
|
72
|
-
"type": "string",
|
|
73
|
-
"minLength": 1,
|
|
74
|
-
"maxLength": 256,
|
|
75
|
-
"description": "Reads the taste in the buyer's own words, and never asks what it answers."
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
"additionalProperties": false
|
|
79
|
-
},
|
|
80
|
-
"maxItems": 32,
|
|
81
|
-
"description": "Writes a taste that will still be true next session, in the buyer’s words."
|
|
82
|
-
},
|
|
83
|
-
"remove": {
|
|
84
|
-
"type": "array",
|
|
85
|
-
"items": {
|
|
86
|
-
"type": "string",
|
|
87
|
-
"pattern": "^[a-z0-9_]+$",
|
|
88
|
-
"minLength": 1,
|
|
89
|
-
"maxLength": 64,
|
|
90
|
-
"description": "Names an entry that goes."
|
|
91
|
-
},
|
|
92
|
-
"maxItems": 32,
|
|
93
|
-
"description": "Drops what stopped being true of the buyer."
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
"additionalProperties": false
|
|
97
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://schemas.sil.com/shopping-profile-edit-response.schema.json",
|
|
4
|
-
"title": "sil shopping_profile_edit — response",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"required": [
|
|
7
|
-
"status"
|
|
8
|
-
],
|
|
9
|
-
"properties": {
|
|
10
|
-
"status": {
|
|
11
|
-
"type": "string",
|
|
12
|
-
"const": "ok",
|
|
13
|
-
"description": "Reads the answer. Every other status arrives as an error body carrying recovery."
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
"additionalProperties": false
|
|
17
|
-
}
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: mint
|
|
3
|
-
description: The fallback — sil does not hold a domain for what the buyer is buying, so you write one. How to be sure it is really missing, where the leaf hangs, what the document says, what sil refuses, and what you ask the buyer once it stands. Load only when shopping_domain_search came back with no match, or when shopping_search refused the domain.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Minting a domain sil does not hold
|
|
7
|
-
|
|
8
|
-
A domain sil has curated already carries a document: a markdown guide on how the thing is
|
|
9
|
-
bought well, and the keys it is bought by. **That is the normal path** — read it with
|
|
10
|
-
`shopping_domain_get` and get on with the job.
|
|
11
|
-
|
|
12
|
-
This file is the fallback. The registry is **global and permanent**, so what you write here
|
|
13
|
-
is what every later buyer inherits. A mint runs once, but the document is not frozen: sil
|
|
14
|
-
grows it from the guide-like pages your own searches fetch, so a word, a value or a key
|
|
15
|
-
missing today may stand tomorrow.
|
|
16
|
-
|
|
17
|
-
## First, be sure it is missing
|
|
18
|
-
|
|
19
|
-
1. **`shopping_domain_search { q }`** in the buyer's own words, not a path guess — `q` is
|
|
20
|
-
matched against each standing path's text *and* its guide, so prose finds a domain that a
|
|
21
|
-
path-shaped guess walks past. At most two reads: their own sentence, then the plain name.
|
|
22
|
-
2. **Judge fit on the `about` that comes back, never on how a path reads.**
|
|
23
|
-
- a line describing *this* thing ⇒ **adopt** that path verbatim, read it with
|
|
24
|
-
`shopping_domain_get`, use its keys as they are, coin nothing beside them;
|
|
25
|
-
- a line describing a *broader* thing ⇒ the only mint allowed is a **descendant** of that
|
|
26
|
-
path, never a sibling and never a re-rooted one;
|
|
27
|
-
- **`matches: []`** ⇒ and only then, research how the thing is bought and write one.
|
|
28
|
-
3. **Then read the `tree` for where the family sits.** It groups every standing path by its
|
|
29
|
-
family, which is how you shelve the new leaf where a specialist shop would.
|
|
30
|
-
4. **A read that did not return is not a read that returned nothing.** Any non-`ok` status
|
|
31
|
-
leaves the mint out of reach: settle the read first. A `shopping_domain_get` answering
|
|
32
|
-
`not_found` licenses nothing either — it is silent about the standing path under another
|
|
33
|
-
parent, which is the fork this exists to prevent.
|
|
34
|
-
|
|
35
|
-
```json
|
|
36
|
-
{ "q": "pour-over coffee dripper" }
|
|
37
|
-
|
|
38
|
-
→ { "status": "ok", "matches": [],
|
|
39
|
-
"tree": [ { "family": "product.coffee", "domains": 2,
|
|
40
|
-
"paths": [ { "path": "product.coffee.espresso_machines", "name": "espresso machines" },
|
|
41
|
-
{ "path": "product.coffee.grinders", "name": "coffee grinders" } ] } ] }
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Nothing there is a dripper, and `product.coffee` is where the gear is shelved, so the leaf
|
|
45
|
-
to write is `product.coffee.pour_over_drippers`.
|
|
46
|
-
|
|
47
|
-
When `shopping_search` refuses with `invalid_request`, its refusals read alike — a domain the
|
|
48
|
-
registry does not hold and a spec row it will not take carry the same status. Read the domain
|
|
49
|
-
you submitted with `shopping_domain_get`: a guide back means fix the row and re-send,
|
|
50
|
-
`not_found` means the domain was the problem.
|
|
51
|
-
|
|
52
|
-
## A leaf or a value
|
|
53
|
-
|
|
54
|
-
Things bought on different keys are different leaves; the same keys with another value is a
|
|
55
|
-
value; one thing has one leaf. An espresso machine, a dripper, a grinder and a kettle share
|
|
56
|
-
almost no keys, so they are four sibling leaves under `product.coffee` — never four values
|
|
57
|
-
of one `brew_method`, never a kitchen department. A black dripper is a value of `color`.
|
|
58
|
-
|
|
59
|
-
- **A path names its ancestors** — the way the thing is shelved, dotted and lower-case:
|
|
60
|
-
`product.coffee.pour_over_drippers`, never `product.pour_over_drippers` hung on the root,
|
|
61
|
-
which sil refuses and which would be a fork every later buyer inherits.
|
|
62
|
-
- **A setup of several things is several domains.** *"Everything for pour-over at home"* is
|
|
63
|
-
a dripper, a grinder and a kettle: find or mint each, and run each search in the domain of
|
|
64
|
-
the thing it is for. A kettle searched under coffee makers runs on the wrong keys.
|
|
65
|
-
|
|
66
|
-
## What the document has to say
|
|
67
|
-
|
|
68
|
-
Write the guide the way sil's own read: **markdown, explanatory, for an agent who has never
|
|
69
|
-
sold this thing.** Four things earn their place.
|
|
70
|
-
- **What it is bought on** — the few things that actually decide it, said plainly.
|
|
71
|
-
- **What goes wrong** — each common mistake and what it costs the buyer in real terms. Not
|
|
72
|
-
"poor extraction": *the water runs through in ninety seconds and the cup is thin and
|
|
73
|
-
sour.* This is what lets a later agent explain why a question matters.
|
|
74
|
-
- **What to trust** — whose numbers mean something, whose tags are marketing, and which
|
|
75
|
-
comparisons do not hold across makers.
|
|
76
|
-
- **What buying it online takes** — what stands in for handling the thing: a measurement
|
|
77
|
-
taken at home, a tolerance, a return window. Never "go to a shop" — they came here instead.
|
|
78
|
-
|
|
79
|
-
Research it on the web first — how the thing is bought, never products.
|
|
80
|
-
|
|
81
|
-
## The axis
|
|
82
|
-
|
|
83
|
-
One key is the axis the thing is sold in — the variant the buyer picks on the page. Mark it
|
|
84
|
-
`variant_spec: true`, give it the `unit` it is printed in and the `step` the maker moves it
|
|
85
|
-
by, and map what shops print onto its values with `forms`. A colour is never that key: a
|
|
86
|
-
dripper is chosen by size and then offered in colours.
|
|
87
|
-
|
|
88
|
-
```json
|
|
89
|
-
{ "key": "brew_capacity", "display_name": "Brew capacity", "type": "number", "unit": "cups",
|
|
90
|
-
"step": 1, "variant_spec": true, "labels": ["size", "μέγεθος"],
|
|
91
|
-
"description": "How much the cone brews in one pour. A 01 overflows past two cups; a 02 run for one pours thin.",
|
|
92
|
-
"forms": { "01": "2", "02": "4", "1-4 cups": "4", "03": "6" } }
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
A value a page prints off that grid is not a value — sil keeps it as a proposed row.
|
|
96
|
-
|
|
97
|
-
## The values
|
|
98
|
-
|
|
99
|
-
Enumerate the ways the thing is made **before** you coin an enum: one with no
|
|
100
|
-
`allowed_values` is refused, because nothing can ever be asked of it. Where the values are
|
|
101
|
-
numbers, use a number with a `unit` and a `step` instead.
|
|
102
|
-
|
|
103
|
-
```json
|
|
104
|
-
{ "key": "material", "display_name": "Material", "type": "enum", "allowed_values": ["ceramic", "glass", "plastic", "metal"],
|
|
105
|
-
"description": "What the cone is made of. Ceramic holds the temperature and chips; plastic loses a degree and survives everything." }
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
## The name
|
|
109
|
-
|
|
110
|
-
**`name` is what the thing is called, in English, and there is one.** Everything else the
|
|
111
|
-
market calls it goes in `labels`, in any language: what shops print in a listing title,
|
|
112
|
-
never a dictionary form. A Greek shop prints *καφετιέρα φίλτρου*, so that is the label —
|
|
113
|
-
*καφεμηχανές* is the dictionary word and finds nothing:
|
|
114
|
-
`{ "name": "pour-over dripper", "labels": ["dripper", "καφετιέρα φίλτρου", "V60"] }`.
|
|
115
|
-
|
|
116
|
-
A spec carries the same two lists: `labels` are the headings pages print that key under,
|
|
117
|
-
`aliases` the names another agent may send for it — both land in one mapping, so either
|
|
118
|
-
spelling is answered on the standing key.
|
|
119
|
-
|
|
120
|
-
**One concept, one spelling.** A widely shared attribute takes its conventional name; coin a
|
|
121
|
-
fresh one only for a genuinely niche attribute.
|
|
122
|
-
|
|
123
|
-
## The bind
|
|
124
|
-
|
|
125
|
-
- **You inherit every ancestor's key and may never rename one.** Use it by its own name.
|
|
126
|
-
- **Re-declare a key only to change its configuration for your subtree** — unit, values, mark.
|
|
127
|
-
- Re-declared with nothing the ancestor does not already say, it is not coined again: the
|
|
128
|
-
reply answers `inherited: true`, and you filter on it anyway.
|
|
129
|
-
- **A key that names a standing one binds to it.** Send `colour` and sil answers the standing
|
|
130
|
-
`color`, names what it bound in `bound_from`, and keeps your spelling as a label of it.
|
|
131
|
-
Never flip an inherited key's mark to get a different shape — a `gender` re-declared as a
|
|
132
|
-
variant spec made every product read `gender: unknown`.
|
|
133
|
-
- **Seller terms are never yours to coin.** Read them off `shopping_domain_get`'s `seller_specs`.
|
|
134
|
-
|
|
135
|
-
```json
|
|
136
|
-
{ "key": "colour", "display_name": "Colour", "type": "enum" }
|
|
137
|
-
|
|
138
|
-
→ { "key": "color", "variant_spec": true, "inherited": true, "bound_from": "colour" }
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
## The questions the mint just earned
|
|
142
|
-
|
|
143
|
-
The keys you coined are the questions you now owe the buyer — one message, before the first
|
|
144
|
-
search, each with what it costs them to get it wrong, never the field it fills. You coined
|
|
145
|
-
them because they decide the buy: asking nothing is a search run on your own guesses.
|
|
146
|
-
|
|
147
|
-
> Three things decide a dripper, and I'd rather ask than guess. How many cups you brew at
|
|
148
|
-
> once — a small cone overflows past two, a big one run for one pours thin. What it's made
|
|
149
|
-
> of — ceramic holds the heat and chips, plastic survives the sink and loses you a degree.
|
|
150
|
-
> And whether you have filters already, because the cone size has to match the pack.
|
|
151
|
-
|
|
152
|
-
## What sil refuses, and what to send instead
|
|
153
|
-
|
|
154
|
-
Each is an `invalid_request` whose `message` names the standing thing and the fix.
|
|
155
|
-
|
|
156
|
-
- **A name that already stands.** *"product.coffee.espresso_machines already stands for
|
|
157
|
-
"espresso machines" — adopt it, or descend from it"*: your `name`, a `label` or your
|
|
158
|
-
path's last word collided.
|
|
159
|
-
- **An enum with no values.** *"spec "size" is an enum with no allowed_values — list its
|
|
160
|
-
values, or make it a number with a unit and a step"*.
|
|
161
|
-
- **A mark flipped on an inherited key.** *"spec "gender" is a product spec at product — a
|
|
162
|
-
leaf cannot make it a variant spec; drop the mark"*.
|
|
163
|
-
- **A path hung on the root.** Only the path's root has to stand already, but a path
|
|
164
|
-
directly under `product` is refused: name the family, or no family can give the leaf words.
|
|
165
|
-
|
|
166
|
-
## A mint, whole
|
|
167
|
-
|
|
168
|
-
```json
|
|
169
|
-
{ "path": "product.coffee.pour_over_drippers", "name": "pour-over dripper",
|
|
170
|
-
"labels": ["dripper", "καφετιέρα φίλτρου"],
|
|
171
|
-
"guide": "A pour-over dripper is bought on two things: how much it brews at once and what it is made of. …\n\n## What goes wrong\n\n- **A cone too big for the cup.** … The water runs the bed dry, the cup is thin and sour, and no grind setting rescues it. …\n\n## What to trust\n\nThe maker's own cup rating and filter size. A shop's \"barista grade\" tag measures nothing. …\n\n## Buying it online\n\nNothing has to be handled: count the cups actually poured in a morning, and buy where the filter pack is sold beside it …",
|
|
172
|
-
"specs": [
|
|
173
|
-
{ "key": "brew_capacity", "display_name": "Brew capacity", "type": "number", "unit": "cups",
|
|
174
|
-
"step": 1, "variant_spec": true, "labels": ["size", "μέγεθος"],
|
|
175
|
-
"forms": { "01": "2", "02": "4", "1-4 cups": "4", "03": "6" },
|
|
176
|
-
"description": "How much the cone brews in one pour. A 01 overflows past two; a 02 run for one pours thin." },
|
|
177
|
-
{ "key": "material", "display_name": "Material", "type": "enum", "allowed_values": ["ceramic", "glass", "plastic", "metal"],
|
|
178
|
-
"description": "What the cone is made of, which decides the heat it takes out of the pour." },
|
|
179
|
-
{ "key": "colour", "display_name": "Colour", "type": "enum",
|
|
180
|
-
"description": "The finish it is sold in." } ] }
|
|
181
|
-
|
|
182
|
-
→ { "status": "ok", "path": "product.coffee.pour_over_drippers",
|
|
183
|
-
"specs": [ { "key": "brew_capacity", "variant_spec": true },
|
|
184
|
-
{ "key": "material" },
|
|
185
|
-
{ "key": "color", "variant_spec": true, "inherited": true, "bound_from": "colour" } ] }
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
`colour` is the bind: the declaration says nothing the root's own `color` does not, so
|
|
189
|
-
nothing was coined and `colour` is now one of its labels. Naming is silent to the buyer —
|
|
190
|
-
the one thing you tell them is the domain you settled on, before a search spends on it.
|