@instruments/taxonomy 0.3.0 → 1.0.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 +33 -96
- package/dist/index.d.ts +304 -264
- package/dist/index.js +6989 -373
- package/package.json +3 -22
- package/dist/chunk-4ECRPD2I.js +0 -7508
- package/dist/chunk-CTKOLWGS.js +0 -23
- package/dist/chunk-FCMCKNQF.js +0 -103
- package/dist/chunk-WIRA24HM.js +0 -42
- package/dist/crosswalks/designshop.d.ts +0 -33
- package/dist/crosswalks/designshop.js +0 -363
- package/dist/crosswalks/materialgraph.d.ts +0 -41
- package/dist/crosswalks/materialgraph.js +0 -178
- package/dist/crosswalks/miu.d.ts +0 -19
- package/dist/crosswalks/miu.js +0 -406
- package/dist/estate/index.d.ts +0 -233
- package/dist/estate/index.js +0 -1808
- package/dist/mapping-pvHk5VjC.d.ts +0 -31
- package/dist/match-CWzTEuL-.d.ts +0 -403
- package/dist/taste.d.ts +0 -155
- package/dist/taste.js +0 -14
package/README.md
CHANGED
|
@@ -1,116 +1,53 @@
|
|
|
1
1
|
# @instruments/taxonomy
|
|
2
2
|
|
|
3
|
-
The canonical
|
|
3
|
+
The canonical, data-only interiors and architecture terminology corpus.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Version one contract
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
The package root exports the governed corpus and its release metadata:
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
### `@instruments/taxonomy` — the dictionaries
|
|
9
|
+
- `TAXONOMY_BASE_URI` — the authority used for every canonical concept URI.
|
|
10
|
+
- `KNOWLEDGE_GRAPH` — normalized axis, facet, and concept nodes plus typed, bidirectional edges.
|
|
11
|
+
- `LEXICAL_ENTRIES` — exhaustive declarative `equivalent`, `ambiguous`, and `declined` records for every canonical or observed authored spelling.
|
|
12
|
+
- `TAXONOMY_CORPUS_METADATA` — deterministic node, edge, and lexical counts with the corpus revision, snapshot, and package version.
|
|
13
|
+
- `TAXONOMY_CORPUS_REVISION`, `TAXONOMY_SNAPSHOT`, and `TAXONOMY_VERSION` — the exact content fingerprint, source snapshot, and package release identifiers.
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
It also exports the TypeScript types for those values. It does not export a resolver, matcher, ranker, search route, local IDs, semantic IDs, or legacy aliases. Consumers build policy on top of the same data; the repository's private HTTP adapter is one such consumer.
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
import {
|
|
21
|
-
APPLICATIONS,
|
|
22
|
-
MATERIAL_FAMILIES,
|
|
23
|
-
applicationTopLevelOf,
|
|
24
|
-
isMaterialFamily,
|
|
25
|
-
type Application,
|
|
26
|
-
} from "@instruments/taxonomy";
|
|
17
|
+
Every public identity is a permanent HTTPS URI with lowercase kebab-case path segments:
|
|
27
18
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
19
|
+
```text
|
|
20
|
+
https://taxonomy.materialinstruments.com/id/axis/material
|
|
21
|
+
https://taxonomy.materialinstruments.com/id/facet/palette/hue
|
|
22
|
+
https://taxonomy.materialinstruments.com/id/material/walnut
|
|
31
23
|
```
|
|
32
24
|
|
|
33
|
-
|
|
25
|
+
ColorScope remains authoritative for colour concepts. Taxonomy does not mint graph nodes or URIs for ColorScope-governed terms; lexical records reference ColorScope identifiers without merging them into Taxonomy hierarchy. For example, `walnut` has a governed primary material reading and a secondary ColorScope reading.
|
|
34
26
|
|
|
35
|
-
|
|
27
|
+
## Install and consume
|
|
36
28
|
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
miuFamilyToCanonical,
|
|
40
|
-
MIU_SURFACE_APPLICATION_TO_CANONICAL,
|
|
41
|
-
} from "@instruments/taxonomy/crosswalks/miu";
|
|
42
|
-
|
|
43
|
-
miuFamilyToCanonical("ceramic_porcelain"); // "tile"
|
|
44
|
-
miuFamilyToCanonical("greenery_planting"); // null (declines to classify)
|
|
45
|
-
MIU_SURFACE_APPLICATION_TO_CANONICAL.railing; // "stair_railing"
|
|
29
|
+
```sh
|
|
30
|
+
pnpm add @instruments/taxonomy
|
|
46
31
|
```
|
|
47
32
|
|
|
48
|
-
### Canonical bundles and match semantics
|
|
49
|
-
|
|
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.
|
|
51
|
-
|
|
52
33
|
```ts
|
|
53
|
-
import {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
{ assertion: "style.minimalism" },
|
|
59
|
-
]);
|
|
60
|
-
|
|
61
|
-
matchBundle(quietKitchen, ["space.kitchen", "mood.calm"]);
|
|
62
|
-
// { eligible: true, score: 0.75, ... }
|
|
63
|
-
```
|
|
64
|
-
|
|
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.
|
|
66
|
-
|
|
67
|
-
### Appearance axes
|
|
68
|
-
|
|
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.
|
|
70
|
-
|
|
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.
|
|
72
|
-
|
|
73
|
-
### `@instruments/taxonomy/crosswalks/designshop`
|
|
74
|
-
|
|
75
|
-
The frozen DesignShop vocabulary resolves through a versioned four-state crosswalk:
|
|
34
|
+
import {
|
|
35
|
+
KNOWLEDGE_GRAPH,
|
|
36
|
+
LEXICAL_ENTRIES,
|
|
37
|
+
TAXONOMY_CORPUS_METADATA,
|
|
38
|
+
} from "@instruments/taxonomy";
|
|
76
39
|
|
|
77
|
-
|
|
78
|
-
|
|
40
|
+
const walnut = KNOWLEDGE_GRAPH.nodes.find(
|
|
41
|
+
(node) =>
|
|
42
|
+
node.kind === "concept" &&
|
|
43
|
+
node.uri === "https://taxonomy.materialinstruments.com/id/material/walnut"
|
|
44
|
+
);
|
|
79
45
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
sourceSnapshotVersion: "designshop-estate-1",
|
|
84
|
-
sourceSystem: "designshop",
|
|
85
|
-
},
|
|
86
|
-
sourceField: "pattern",
|
|
87
|
-
sourceValue: "Solid",
|
|
88
|
-
});
|
|
89
|
-
// resolved -> pattern.plain
|
|
46
|
+
const walnutReadings = LEXICAL_ENTRIES.find(
|
|
47
|
+
(entry) => entry.phrase === "walnut"
|
|
48
|
+
);
|
|
90
49
|
```
|
|
91
50
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
### `@instruments/taxonomy/taste`
|
|
95
|
-
|
|
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.
|
|
97
|
-
|
|
98
|
-
`PORTABLE_ASSERTION_TEST_VECTORS` gives TypeScript and non-TypeScript consumers stable fixtures for serialization and contract tests.
|
|
99
|
-
|
|
100
|
-
## Provenance and the re-sync ritual
|
|
101
|
-
|
|
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.
|
|
103
|
-
|
|
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).
|
|
105
|
-
|
|
106
|
-
## The other-vs-null policy
|
|
107
|
-
|
|
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`.
|
|
109
|
-
|
|
110
|
-
## Versioning
|
|
111
|
-
|
|
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.
|
|
113
|
-
|
|
114
|
-
## Roadmap
|
|
51
|
+
Changes to canonical meaning or identity are governed corpus changes. There is deliberately no backward-compatibility layer in V1; consumers migrate to the canonical URI.
|
|
115
52
|
|
|
116
|
-
|
|
53
|
+
Pin the exact package version and compare `TAXONOMY_CORPUS_REVISION` when a deployment needs to detect content drift. The revision is computed from the normalized graph and lexical entries, so it changes when governed corpus content changes even if the V1 API shape does not.
|