@instruments/taxonomy 0.2.0 → 0.3.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/README.md +16 -60
- package/dist/chunk-4ECRPD2I.js +7508 -0
- package/dist/{chunk-XLUE3IC2.js → chunk-FCMCKNQF.js} +11 -2
- package/dist/chunk-WIRA24HM.js +42 -0
- package/dist/crosswalks/designshop.d.ts +3 -11
- package/dist/crosswalks/designshop.js +125 -43
- package/dist/crosswalks/materialgraph.d.ts +41 -0
- package/dist/crosswalks/materialgraph.js +178 -0
- package/dist/crosswalks/miu.d.ts +2 -1
- package/dist/crosswalks/miu.js +9 -3
- package/dist/estate/index.d.ts +1 -1
- package/dist/estate/index.js +644 -551
- package/dist/index.d.ts +83 -6
- package/dist/index.js +103 -6104
- package/dist/mapping-pvHk5VjC.d.ts +31 -0
- package/dist/{match-BDI6Evro.d.ts → match-CWzTEuL-.d.ts} +37 -1
- package/dist/taste.d.ts +12 -1
- package/dist/taste.js +1 -1
- package/package.json +5 -1
- package/dist/chunk-C2ZPDTOU.js +0 -151
package/README.md
CHANGED
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
# @instruments/taxonomy
|
|
2
2
|
|
|
3
|
-
The canonical materials taxonomy for the Material Instruments ecosystem: the governed
|
|
4
|
-
**dictionaries** (material families, sectors, and the hierarchical application zones) plus the
|
|
5
|
-
**consumer crosswalks** that map an external vendor's local vocabulary onto the canon. This package
|
|
6
|
-
is the single publishable home of the Material Semantics vocabularies that were previously vendored
|
|
7
|
-
per-repo as drifting local copies.
|
|
3
|
+
The canonical materials taxonomy for the Material Instruments ecosystem: the governed **dictionaries** (material families, sectors, and the hierarchical application zones) plus the **consumer crosswalks** that map an external vendor's local vocabulary onto the canon. This package is the single publishable home of the Material Semantics vocabularies that were previously vendored per-repo as drifting local copies.
|
|
8
4
|
|
|
9
|
-
It also publishes appearance concepts and a portable taste-assertion contract. Applications own
|
|
10
|
-
their evidence stores and ranking policy; this package owns shared meaning, source crosswalk
|
|
11
|
-
verdicts, and the envelope that lets evidence travel without turning a source label into fact.
|
|
5
|
+
It also publishes appearance concepts and a portable taste-assertion contract. Applications own their evidence stores and ranking policy; this package owns shared meaning, source crosswalk verdicts, and the envelope that lets evidence travel without turning a source label into fact.
|
|
12
6
|
|
|
13
7
|
## Install
|
|
14
8
|
|
|
@@ -20,9 +14,7 @@ pnpm add @instruments/taxonomy
|
|
|
20
14
|
|
|
21
15
|
### `@instruments/taxonomy` — the dictionaries
|
|
22
16
|
|
|
23
|
-
The pinned public vocabularies: `MATERIAL_FAMILIES` (17), `SECTORS` (10), `APPLICATIONS` (88 — 30
|
|
24
|
-
top-level zones plus 58 children). Each ships a `*_TERMS` array of labelled `TaxonomyTerm`s, an
|
|
25
|
-
`as const` id tuple, a string-literal type, and a `Set`-backed guard.
|
|
17
|
+
The pinned public vocabularies: `MATERIAL_FAMILIES` (17), `SECTORS` (10), `APPLICATIONS` (88 — 30 top-level zones plus 58 children). Each ships a `*_TERMS` array of labelled `TaxonomyTerm`s, an `as const` id tuple, a string-literal type, and a `Set`-backed guard.
|
|
26
18
|
|
|
27
19
|
```ts
|
|
28
20
|
import {
|
|
@@ -40,9 +32,7 @@ applicationTopLevelOf("wall"); // "wall" (already top-level)
|
|
|
40
32
|
|
|
41
33
|
### `@instruments/taxonomy/crosswalks/miu` — the MIU consumer crosswalk
|
|
42
34
|
|
|
43
|
-
Maps the Materials In Use (MIU) local vocabularies onto the canonical dictionaries. Total,
|
|
44
|
-
compile-time-checked `Record` maps plus string accessors that resolve unknown input to `null`
|
|
45
|
-
instead of throwing.
|
|
35
|
+
Maps the Materials In Use (MIU) local vocabularies onto the canonical dictionaries. Total, compile-time-checked `Record` maps plus string accessors that resolve unknown input to `null` instead of throwing.
|
|
46
36
|
|
|
47
37
|
```ts
|
|
48
38
|
import {
|
|
@@ -57,11 +47,7 @@ MIU_SURFACE_APPLICATION_TO_CANONICAL.railing; // "stair_railing"
|
|
|
57
47
|
|
|
58
48
|
### Canonical bundles and match semantics
|
|
59
49
|
|
|
60
|
-
Consumers compose qualified assertions into canonical bundles rather than minting app-specific
|
|
61
|
-
compound tags. Every constitutive assertion is required; matched constitutive assertions score 2
|
|
62
|
-
and matched accents score 1. Unroled assertions default to accent, extra candidate annotations are
|
|
63
|
-
not penalised, and the package publishes residential and commercial test vectors so another
|
|
64
|
-
language can reproduce the ranking exactly.
|
|
50
|
+
Consumers compose qualified assertions into canonical bundles rather than minting app-specific compound tags. Every constitutive assertion is required; matched constitutive assertions score 2 and matched accents score 1. Unroled assertions default to accent, extra candidate annotations are not penalised, and the package publishes residential and commercial test vectors so another language can reproduce the ranking exactly.
|
|
65
51
|
|
|
66
52
|
```ts
|
|
67
53
|
import { defineBundle, matchBundle } from "@instruments/taxonomy";
|
|
@@ -76,21 +62,13 @@ matchBundle(quietKitchen, ["space.kitchen", "mood.calm"]);
|
|
|
76
62
|
// { eligible: true, score: 0.75, ... }
|
|
77
63
|
```
|
|
78
64
|
|
|
79
|
-
`defineAlternatives` preserves a source term known to have one of several readings without
|
|
80
|
-
guessing. The DesignShop and materia `Modern` crosswalk rows now carry an explicit any-of between
|
|
81
|
-
`style.modernism` and `style.contemporary` instead of disappearing from downstream joins.
|
|
65
|
+
`defineAlternatives` preserves a source term known to have one of several readings without guessing. The DesignShop and materia `Modern` crosswalk rows now carry an explicit any-of between `style.modernism` and `style.contemporary` instead of disappearing from downstream joins.
|
|
82
66
|
|
|
83
67
|
### Appearance axes
|
|
84
68
|
|
|
85
|
-
Product category, specific material, pattern, finish, format and construction are independent
|
|
86
|
-
axes. That separation is deliberate: plain porcelain, geometric porcelain and stone-effect
|
|
87
|
-
porcelain share `material.porcelain` while carrying different pattern concepts. A commercial
|
|
88
|
-
carpet and residential wallcovering use the same pattern semantics; there is no “commercial
|
|
89
|
-
style” branch.
|
|
69
|
+
Product category, specific material, pattern, finish, format and construction are independent axes. That separation is deliberate: plain porcelain, geometric porcelain and stone-effect porcelain share `material.porcelain` while carrying different pattern concepts. A commercial carpet and residential wallcovering use the same pattern semantics; there is no “commercial style” branch.
|
|
90
70
|
|
|
91
|
-
Requirement concepts name dimensions such as slip resistance, availability and fire performance.
|
|
92
|
-
The assertion envelope carries the operator and required value separately, because a taxonomy can
|
|
93
|
-
name the question but cannot assert that a particular product passes it.
|
|
71
|
+
Requirement concepts name dimensions such as slip resistance, availability and fire performance. The assertion envelope carries the operator and required value separately, because a taxonomy can name the question but cannot assert that a particular product passes it.
|
|
94
72
|
|
|
95
73
|
### `@instruments/taxonomy/crosswalks/designshop`
|
|
96
74
|
|
|
@@ -111,50 +89,28 @@ canonicaliseDesignShop({
|
|
|
111
89
|
// resolved -> pattern.plain
|
|
112
90
|
```
|
|
113
91
|
|
|
114
|
-
`resolved`, `ambiguous`, `unresolved` and `declined` are different results. Unknown input remains
|
|
115
|
-
unresolved with its raw value intact; only a curated row can decline. `Modern` remains an ambiguous
|
|
116
|
-
choice between contemporary and modernism until another source or a person confirms one reading.
|
|
117
|
-
`DESIGNSHOP_APPEARANCE_TEST_VECTORS` is the executable consumer contract.
|
|
92
|
+
`resolved`, `ambiguous`, `unresolved` and `declined` are different results. Unknown input remains unresolved with its raw value intact; only a curated row can decline. `Modern` remains an ambiguous choice between contemporary and modernism until another source or a person confirms one reading. `DESIGNSHOP_APPEARANCE_TEST_VECTORS` is the executable consumer contract.
|
|
118
93
|
|
|
119
94
|
### `@instruments/taxonomy/taste`
|
|
120
95
|
|
|
121
|
-
`PortableTasteAssertion` separates actor, taste subject and project; taste, context and
|
|
122
|
-
requirement roles; canonical and unresolved meaning; scope, authority, polarity, time and
|
|
123
|
-
provenance. It intentionally contains no boost, rank or serving weight. Those are application
|
|
124
|
-
policy, not portable meaning. Requirement assertions additionally carry a typed constraint.
|
|
96
|
+
`PortableTasteAssertion` separates actor, taste subject and project; taste, context and requirement roles; canonical and unresolved meaning; scope, authority, polarity, time and provenance. It intentionally contains no boost, rank or serving weight. Those are application policy, not portable meaning. Requirement assertions additionally carry a typed constraint.
|
|
125
97
|
|
|
126
|
-
`PORTABLE_ASSERTION_TEST_VECTORS` gives TypeScript and non-TypeScript consumers stable fixtures for
|
|
127
|
-
serialization and contract tests.
|
|
98
|
+
`PORTABLE_ASSERTION_TEST_VECTORS` gives TypeScript and non-TypeScript consumers stable fixtures for serialization and contract tests.
|
|
128
99
|
|
|
129
100
|
## Provenance and the re-sync ritual
|
|
130
101
|
|
|
131
|
-
The dictionaries are lifted **verbatim** from materialgraph —
|
|
132
|
-
`packages/schema/src/registry/value-dictionaries.ts`, snapshot `2026-07-08` (see the exported
|
|
133
|
-
`PROVENANCE` constant). Every term was lifecycle-active at that snapshot; lifecycle fields are
|
|
134
|
-
deferred from the published shape until governance needs them.
|
|
102
|
+
The dictionaries are lifted **verbatim** from materialgraph — `packages/schema/src/registry/value-dictionaries.ts`, snapshot `2026-07-08` (see the exported `PROVENANCE` constant). Every term was lifecycle-active at that snapshot; lifecycle fields are deferred from the published shape until governance needs them.
|
|
135
103
|
|
|
136
|
-
To re-sync: re-read the upstream file, re-check the terms list, the `broaderTermId` edges, and the
|
|
137
|
-
lifecycle fields, then bump this package. `src/materialgraph-sync.test.ts` mechanises the check — it
|
|
138
|
-
reads a sibling `~/Sites/materialgraph` checkout and asserts every id is still present upstream
|
|
139
|
-
(skipping only when that checkout is absent).
|
|
104
|
+
To re-sync: re-read the upstream file, re-check the terms list, the `broaderTermId` edges, and the lifecycle fields, then bump this package. `src/materialgraph-sync.test.ts` mechanises the check — it reads a sibling `~/Sites/materialgraph` checkout and asserts every id is still present upstream (skipping only when that checkout is absent).
|
|
140
105
|
|
|
141
106
|
## The other-vs-null policy
|
|
142
107
|
|
|
143
|
-
For families and sectors, `other` is a **positive** classification — the canon's own dictionary
|
|
144
|
-
would file the term under `other`. `null` **declines** to classify: it is not a member at all, it
|
|
145
|
-
spans members, or any claim (including `other`) would be false. `unknown` therefore always maps to
|
|
146
|
-
`null`, never `other` — unknown is epistemic ("we couldn't identify it") while other is ontological
|
|
147
|
-
("identified; fits no bucket"); the application crosswalk has no `other` term at all, so there its
|
|
148
|
-
policy collapses to mapped-or-`null`.
|
|
108
|
+
For families and sectors, `other` is a **positive** classification — the canon's own dictionary would file the term under `other`. `null` **declines** to classify: it is not a member at all, it spans members, or any claim (including `other`) would be false. `unknown` therefore always maps to `null`, never `other` — unknown is epistemic ("we couldn't identify it") while other is ontological ("identified; fits no bucket"); the application crosswalk has no `other` term at all, so there its policy collapses to mapped-or-`null`.
|
|
149
109
|
|
|
150
110
|
## Versioning
|
|
151
111
|
|
|
152
|
-
Semver; changesets will drive releases later. Consumers should keep a **single pin** of this
|
|
153
|
-
package. The anti-pattern to avoid is the colorscope `3.6.0` / `3.7.1` split, where two pinned
|
|
154
|
-
copies of the same taxonomy drifted apart inside one dependency graph — the exact fragmentation this
|
|
155
|
-
package exists to end.
|
|
112
|
+
Semver; changesets will drive releases later. Consumers should keep a **single pin** of this package. The anti-pattern to avoid is the colorscope `3.6.0` / `3.7.1` split, where two pinned copies of the same taxonomy drifted apart inside one dependency graph — the exact fragmentation this package exists to end.
|
|
156
113
|
|
|
157
114
|
## Roadmap
|
|
158
115
|
|
|
159
|
-
Additive minors, all backward-compatible: an exported Material Bank category tree artifact, and
|
|
160
|
-
per-term lifecycle fields (status, deprecation, successor pointers) once governance requires them.
|
|
116
|
+
Additive minors, all backward-compatible: an exported Material Bank category tree artifact, and per-term lifecycle fields (status, deprecation, successor pointers) once governance requires them.
|