unoverse 0.1.222 → 0.1.223

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.
@@ -54,7 +54,7 @@ cmd_db_verify() {
54
54
  "error", "created_at", "fingerprint"
55
55
  ],
56
56
  credentials: [
57
- "id", "name", "type", "scope", "data", "created_at", "updated_at", "ref"
57
+ "id", "name", "type", "scope", "data", "created_at", "updated_at", "ref", "org", "copied_from"
58
58
  ],
59
59
  token_usage: [
60
60
  "id", "workflow_id", "execution_id", "node_id", "node_type",
@@ -74,7 +74,7 @@ cmd_db_verify() {
74
74
  "id", "user_id", "org", "workflow_id", "memory_id", "content",
75
75
  "source_conversation_id", "created_at", "updated_at", "type",
76
76
  "domain", "certainty", "reinforcement_count", "last_reinforced",
77
- "supports", "contradicts", "supersedes"
77
+ "supports", "contradicts", "supersedes", "company_id"
78
78
  ],
79
79
  analytics_events: [
80
80
  "id", "user_id", "workflow_id", "memory_id", "actual_user_id",
@@ -216,7 +216,13 @@ cmd_db_verify() {
216
216
  people: [
217
217
  "person_id", "org", "stage", "email", "linkedin", "user_id", "crm_provider",
218
218
  "crm_id", "name", "company", "role", "observed", "understood", "inferred",
219
- "researched", "created_at", "updated_at"
219
+ "researched", "created_at", "updated_at", "company_id"
220
+ ],
221
+ accounts: [
222
+ "sub", "name", "email", "picture", "first_seen", "last_seen"
223
+ ],
224
+ companies: [
225
+ "company_id", "org", "name", "domain", "website", "researched", "created_at", "updated_at"
220
226
  ],
221
227
  dictionary_merges: [
222
228
  "id", "org", "survivor_id", "gone_id", "name", "snapshot", "changed", "by",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unoverse",
3
- "version": "0.1.222",
3
+ "version": "0.1.223",
4
4
  "description": "The Unoverse front door — create a Studio project, a universe, or a client app, and launch Studio.",
5
5
  "license": "SEE LICENSE IN README.md",
6
6
  "type": "module",
@@ -65,6 +65,15 @@ function orgDesignSystemDir(dir) {
65
65
  return join(dir, "plugins", "node_modules", "@unoverse-platform", "marketplace", "definitions");
66
66
  }
67
67
  /** Collect an org repo into items: the same walk as a monorepo project, rooted at the repo. */
68
+ /**
69
+ * EVERY KIND THE WALK READS from an org's folder. A sync that reads a folder with this walk
70
+ * knows each of these completely: none of a kind in the folder means none in the org, so the
71
+ * sync may remove what is gone. A kind not listed (a recipe) is never read here, so a sync
72
+ * never removes it.
73
+ */
74
+ export const COLLECTED_KINDS = new Set([
75
+ "component", "app", "template", "atom", "identity", "agent", "object", "pipeline", "style", "skill", "prompt-block", "node",
76
+ ]);
68
77
  export function collectOrg(home) {
69
78
  return collectFrom(home.dir, home.org, orgDesignSystemDir(home.dir));
70
79
  }
@@ -183,6 +183,16 @@
183
183
  }
184
184
  }
185
185
  },
186
+ "signal": {
187
+ "type": "object",
188
+ "additionalProperties": false,
189
+ "properties": {
190
+ "addsPeople": {
191
+ "type": "boolean",
192
+ "description": "false: its own save updates people Signal holds and never adds one; a new person comes in only through a lane's fixed save. Left out, it may add."
193
+ }
194
+ }
195
+ },
186
196
  "askWhenUnsure": {
187
197
  "type": "string"
188
198
  }
@@ -112,6 +112,8 @@
112
112
  "within": { "type": "object", "required": ["link"], "properties": { "link": { "type": "string" }, "field": { "type": "string" } }, "description": "How a subject sits inside another: the link to its parent (subFundOf) and the field naming the parent (umbrella)." },
113
113
  "part": { "type": "object", "required": ["object", "column", "level", "name", "of"], "properties": { "object": { "type": "string" }, "column": { "type": "string" }, "level": { "type": "string" }, "name": { "type": "string" }, "of": { "type": "string" } }, "description": "Its parts (a fund's share classes): their object, column, `level` value, name field and the field naming their subject." },
114
114
  "none": { "type": "string", "description": "The `level` value for a document about no subject (market)." },
115
+ "relative": { "type": "array", "items": { "type": "string" }, "description": "The measures that are a subject's figure against its comparison (excess return: the return above the benchmark's): a row of one that names no subject of its own is the subject the table's own rows name, when they name exactly one; with two or more it names none. Each is one of the measure column's `enum`." },
116
+ "vehicles": { "type": "array", "items": { "type": "string" }, "description": "The words a name of the subject's kind carries when it names one (fund; a segregated portfolio's portfolio): an allocation table's row whose name holds one of them, with words of its own, is a holding, a line from the subject to it (pipelines/tables.md 3c rule 3); a row of words alone is a heading. Absent, the word fund." },
115
117
  "terms": { "type": "array", "items": { "type": "string" }, "description": "The measures that are a record's standing terms, never figures over time (fee): a rate of one is a field of the subject's or part's record, read by the layout, and never a row; an amount of money of one (fees charged over a period) stays a row. Each is one of the measure column's `enum`." }
116
118
  }
117
119
  }
@@ -240,7 +240,7 @@
240
240
  "remember": { "type": "string", "description": "One of names, a list: where a name confirmed by the judge or a person is added, so the next one matches at once." },
241
241
  "evidence": { "type": "array", "items": { "type": "string" }, "description": "Fields shown to the judge beside each candidate, to tell like names apart." },
242
242
  "ruleOut": { "type": "array", "items": { "type": "string" }, "description": "Fields that, filled on both and different as words, mean never the same thing." },
243
- "judge": { "type": "string", "description": "The node that decides a name the rules leave open, choosing among the candidates or none (TypeSafeChoice). Absent, an open name goes to review." },
243
+ "judge": { "oneOf": [ { "type": "string" }, { "type": "object", "required": ["node"], "properties": { "node": { "type": "string" }, "config": { "type": "object" } }, "additionalProperties": false } ], "description": "The node that decides a name the rules leave open, choosing among the candidates or none (TypeSafeChoice). Absent, an open name goes to review." },
244
244
  "link": {
245
245
  "type": "object",
246
246
  "additionalProperties": false,
@@ -248,7 +248,7 @@
248
248
  "description": "The node that scores the name against each candidate's names before the judge (Splink on Beam): sure the same, linked; sure different, none; between, the judge.",
249
249
  "properties": { "node": { "type": "string", "minLength": 1 }, "config": { "type": "object" } }
250
250
  },
251
- "review": { "type": "object", "additionalProperties": false, "required": ["node"], "description": "The node that looks last at every name a run left open, with what the documents say where the name is used (OpenAIDecision): sure, it decides as a person would, with Undo; not sure, the name stays open for a person. Absent, the judge looks.", "properties": { "node": { "type": "string", "minLength": 1 }, "config": { "type": "object" } } },
251
+ "review": { "type": "object", "additionalProperties": false, "minProperties": 1, "description": "The last look at every name a run left open, with what the documents say where the name is used: a decision node (OpenAIDecision) with its config, or `task`, one of the org's own tasks by name, answered by the org's agent (2026-10-31). Sure, it decides as a person would, with Undo (a task: a new record on a createFrom line); not sure, the name stays open for a person. Absent, the judge looks.", "properties": { "node": { "type": "string", "minLength": 1 }, "config": { "type": "object" }, "task": { "type": "string", "minLength": 1 } }, "oneOf": [ { "required": ["node"] }, { "required": ["task"] } ] },
252
252
  "createFrom": { "type": "array", "items": { "type": "string" }, "description": "The lines, by name (a document's about), whose name the judge is sure is no record held makes the record. A mention on any other line, or a name of one word, never does." }
253
253
  }
254
254
  },
@@ -86,8 +86,8 @@
86
86
  "description": "The field's id in the org's field list (one org's list is openfunds: OFST452010). A table's column or row named by this field's wordings, or by the standard field's own name, fills it (docs/unoverse/data/pipelines/tables.md)."
87
87
  },
88
88
  "format": {
89
- "enum": ["date", "country"],
90
- "description": "date: the field is a date, written yyyy-mm-dd. A date a document prints another way (31/Mar/2025, 21 October 2024) is written so; one that could be read two ways (03/04/2025) is left, never guessed. country: the field is a country, held by its one name from ISO 3166-1 (its code named by the CLDR English region names) however a document prints it (UK, GB and United Kingdom are United Kingdom); a value no country fits stays as printed."
89
+ "enum": ["date", "country", "currency"],
90
+ "description": "date: the field is a date, written yyyy-mm-dd. A date a document prints another way (31/Mar/2025, 21 October 2024) is written so; one that could be read two ways (03/04/2025) is left, never guessed. country: the field is a country, held by its one name from ISO 3166-1 (its code named by the CLDR English region names) however a document prints it (UK, GB and United Kingdom are United Kingdom); a value no country fits stays as printed. currency: the field is a currency, held by its ISO 4217 code (named by the CLDR English currency names, one and many, and its country's names before the unit) however a document prints it (U.S. Dollars, US dollar and United States Dollars are USD); a value no currency fits, or two fit (Dollars), stays as printed."
91
91
  },
92
92
  "pattern": {
93
93
  "type": "string",
@@ -100,6 +100,17 @@
100
100
  "items": { "type": "string", "minLength": 1 },
101
101
  "description": "The words documents print for this field (management related fees, mgmt fee), matched exactly after lower case. A new wording is proposed, approved by a person, then added here (docs/unoverse/data/pipelines/tables.md)."
102
102
  },
103
+ "wordingsIn": {
104
+ "type": "object",
105
+ "minProperties": 1,
106
+ "additionalProperties": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } },
107
+ "description": "Words that name this field in one kind of document only, as { <document type>: [<words>] }, where one type prints for this field the words another prints for another field (an offering document's management fee is its maximum). The scoped words win over the plain wordings for that type."
108
+ },
109
+ "onlyWith": {
110
+ "type": "string",
111
+ "minLength": 1,
112
+ "description": "Another field of this object that this one is a term of; where a record states that field as none, this one is not kept (a hurdle only with a performance fee)."
113
+ },
103
114
  "none": {
104
115
  "description": "The value a table cell that states there is none (\"None\", \"N/A\", \"-\", \"Nil\") stands for (0 for a fee), kept as stated; without it such a cell fills nothing. Never a default: a field the documents do not state stays empty."
105
116
  },
@@ -13,6 +13,7 @@
13
13
  "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
14
14
  "description": "Equals the file name."
15
15
  },
16
+ "figures": { "enum": ["none"], "description": "A type whose figures are never metrics (a letter, a market note): every number stays in its table, where search finds it." },
16
17
  "reportType": {
17
18
  "type": "string",
18
19
  "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
@@ -65,6 +66,17 @@
65
66
  "type": "array",
66
67
  "items": { "$ref": "#/definitions/never" },
67
68
  "description": "Names this type prints that are never records. Structured so the confirm step can apply them."
69
+ },
70
+ "codes": {
71
+ "type": "object",
72
+ "additionalProperties": false,
73
+ "required": ["column", "rules"],
74
+ "description": "A FIXED TEMPLATE READ BY ITS PRINTED CELL CODES (owner 2026-10-26): a type whose every figure cell carries the template's own code (its item number and a bracketed tag naming its column, \"1.2.3 (AB)\") is read by this map alone, never by the general figure reader. A table whose header holds `column` is a coded table: each figure is paired with its code; every rule whose code and tag match applies, in order, a later one over an earlier; a figure whose code gets no measure and unit stays in its table with the reason. Written once from the published template (its sections, its tags as its header rows print them), never from one document. Names no fund, firm or document.",
75
+ "properties": {
76
+ "column": { "type": "string", "minLength": 1, "description": "The header of the column holding each row's codes (a regular expression). The parser writes one slot per value column, in column order, ' | ' between them, '' for a column with no code; a row whose codes are printed elsewhere keeps them as a list." },
77
+ "pattern": { "type": "string", "minLength": 1, "description": "How a code is printed: group 1 the number, group 2 the tag. Default ^(\\d+(?:\\.\\d+)+)(?:\\s*\\(\\s*([^)]*?)\\s*\\))?$." },
78
+ "rules": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/codeRule" } }
79
+ }
68
80
  }
69
81
  },
70
82
  "definitions": {
@@ -156,11 +168,22 @@
156
168
  "group": { "type": "integer", "minimum": 1, "description": "The group of `pattern` that is the value; alone, in a record's `fields`, the group of the record's name match (\"Minimum Initial Subscription for (Class B) Shares: (250,000)\" gives the class and its minimum)." },
157
169
  "case": { "type": "string", "enum": ["any"], "description": "`any`: the pattern matches whatever the case of the page's words (a heading in capitals, the same words in a sentence)." },
158
170
  "scope": { "type": "string", "enum": ["section", "document"], "description": "Where the pattern is searched: the section (default) or the whole document, for a value printed outside its section (an umbrella named only in the notices)." },
159
- "cell": { "type": "string", "enum": ["value", "label"], "description": "With `table` and `row`: take the value cell (default) or the row's label (a class named in the label, 'ISIN - Base Shares')." },
160
- "line": { "type": "string", "enum": ["after-heading", "first-heading", "first", "last"] },
171
+ "cell": { "type": "string", "enum": ["value", "label", "each"], "description": "With `table` and `row`: take the value cell (default) or the row's label (a class named in the label, 'ISIN - Base Shares'). `each`, as a record's `name` with `table` and `pattern`: every cell of the table that matches `pattern` is its own record (a returns table heading one column per class)." },
172
+ "line": { "type": "string", "enum": ["after-heading", "first-heading", "first", "last", "title"], "description": "`title`: the document's own title (a workbook may name its class only there)." },
161
173
  "table": { "type": "string", "minLength": 1 },
162
174
  "row": { "type": "string", "minLength": 1 },
163
- "column": { "type": "integer", "minimum": 1 },
175
+ "column": {
176
+ "oneOf": [{ "type": "integer", "minimum": 1 }, { "const": "own" }],
177
+ "description": "With `table` and `row`: the cell at this position. `own`, as a field of a record found by `cell: each`: the cell in that record's own column. `{name}` in such a field's `row` stands for the record's name ('Inception Date for {name}')."
178
+ },
179
+ "classes": {
180
+ "oneOf": [
181
+ { "type": "integer", "minimum": 1 },
182
+ { "const": "other" },
183
+ { "type": "object", "properties": { "column": { "type": "string", "minLength": 1 }, "is": { "type": "string", "minLength": 1 } }, "required": ["column", "is"], "additionalProperties": false }
184
+ ],
185
+ "description": "A term a section instance states for SOME of its classes, given as a `kind.prop` field of another kind: it is only those classes'. A number: that group of `pattern` is a printed list of designations ('For I, IA and IB shares: <term>'; a run is each class), and the term is each listed class's. `other`: every class of the instance that no list in the same field named ('For all other shares: <term>'), only where a list matched. `{ column, is }`: every class whose row, in a class table of the instance, holds `is` in the column headed `column` (both regular expressions; 'For Share Classes subject to a performance fee: <term>' and the table's Performance Fee column saying Yes). Applied before the terms stated for every class; a class's own value is never replaced."
186
+ },
164
187
  "na": { "description": "The value when the page prints N/A or 'none'." },
165
188
  "map": {
166
189
  "type": "object",
@@ -178,7 +201,7 @@
178
201
  "name": { "oneOf": [ { "$ref": "#/definitions/finder" }, { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/finder" } } ] },
179
202
  "role": { "type": "string", "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$" },
180
203
  "country": { "oneOf": [ { "type": "string" }, { "type": "object", "properties": { "group": { "type": "integer", "minimum": 1 } }, "required": ["group"], "additionalProperties": false } ], "description": "The country the provider serves: a word, or a group of the name pattern that prints it beside the name." },
181
- "split": { "type": "string", "minLength": 1, "description": "Breaks one match into several records." },
204
+ "split": { "type": "string", "minLength": 1, "description": "Breaks one match into several records: a separator the match is split on (\"; \"), or `run`: a run of designations (\"X1-X5\", \"X1-6\", \"X1 to X3\": a letter code and a number, the second end larger) is one record per designation, each with the fields of the run's match. A match that is no run stays one record." },
182
205
  "trim": { "type": "string", "minLength": 1, "description": "After `split`, a pattern applied to each part; group 1 is the name (the words before the address)." },
183
206
  "fields": {
184
207
  "type": "object",
@@ -207,6 +230,28 @@
207
230
  { "type": "string", "minLength": 1 },
208
231
  { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } }
209
232
  ]
233
+ },
234
+ "codeRule": {
235
+ "type": "object",
236
+ "additionalProperties": false,
237
+ "minProperties": 2,
238
+ "description": "What the cells of a code are. `code`: a prefix ('1.2': the item and every item under it) or a regular expression (opening with ^); `tag`: the bracketed column tag, case ignored. Without `code` a rule holds for every code with its tag; without `tag`, for every column. Values are the org dataset's own (measure, unit, side, adjustment, dimension, period), checked by the lint; null clears what an earlier rule gave.",
239
+ "properties": {
240
+ "code": { "$ref": "#/definitions/oneOrMore" },
241
+ "tag": { "$ref": "#/definitions/oneOrMore" },
242
+ "measure": { "type": ["string", "null"] },
243
+ "unit": { "type": ["string", "null"] },
244
+ "currency": { "type": ["string", "null"], "description": "Which money, an ISO code, when the unit is an amount; null for a share or a count." },
245
+ "adjustment": { "type": ["string", "null"] },
246
+ "scale": { "type": "number", "description": "A bare cell times this, in decimal arithmetic (a fraction stored bare takes 100); a cell printing its own '%' is read as it shows." },
247
+ "side": { "type": ["string", "null"] },
248
+ "dimension": { "type": ["string", "null"], "description": "The slicing the code's section is. The category is the row's own label resolved to the dimension's standard value (the dataset's category wordings), else the label as printed." },
249
+ "category": { "enum": ["label", "none"], "description": "`none`: the slicing without a category (a whole)." },
250
+ "about": { "type": "string", "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$", "description": "Whose the figure is when not the document's subject: the dataset's `whose.owner.object` (filed at the owner's level) or `whose.part.object` (the one class the layout names)." },
251
+ "period": { "type": "string" },
252
+ "annualised": { "type": "boolean" },
253
+ "skip": { "type": "string", "minLength": 1, "description": "These cells are no metric: the reason, kept with the number in its table." }
254
+ }
210
255
  }
211
256
  }
212
257
  }
@@ -108,6 +108,11 @@
108
108
  "content": {
109
109
  "type": "object",
110
110
  "description": "What the row carries instead of the item as listed, each value over item, index, config and collect."
111
+ },
112
+ "about": {
113
+ "type": "object",
114
+ "description": "Whose the row is: names to references over the run (collect, config, item), written as `about` on every record the row's reads make; never an identity (SIGNAL.md § 4b).",
115
+ "additionalProperties": { "type": "string" }
111
116
  }
112
117
  },
113
118
  "additionalProperties": {
@@ -26,6 +26,10 @@
26
26
  },
27
27
  "description": "Per collect step name, the node's outputs as if it had run."
28
28
  },
29
+ "inputs": {
30
+ "type": "object",
31
+ "description": "What the caller hands the pipeline's Input Trigger (pipelines README, collect), for a pipeline that opens with one; its output under test is this, stamped with a timestamp."
32
+ },
29
33
  "expect": {
30
34
  "type": "object",
31
35
  "additionalProperties": {
@@ -31,7 +31,7 @@ export const FACE_KEYS = ["title", "description", "whenToUse", "category", "vers
31
31
  /** The prop grammar of UNOVERSE_AUTHORING 3b plus the object's one word, `from` (README 4c). */
32
32
  // `none` IS NO DEFAULT (2026-10-15): it is what a cell that STATES there is none ("None", "N/A") stands for, so a
33
33
  // stated "no performance fee" is 0 and a fee nobody states stays empty.
34
- export const PROP_KEYS = new Set(["type", "input", "description", "from", "hydrate", "enum", "oneOf", "minLength", "maxLength", "minItems", "maxItems", "items", "reuse", "answeredBy", "standard", "wordings", "format", "pattern", "none"]);
34
+ export const PROP_KEYS = new Set(["type", "input", "description", "from", "hydrate", "enum", "oneOf", "minLength", "maxLength", "minItems", "maxItems", "items", "reuse", "answeredBy", "standard", "wordings", "wordingsIn", "onlyWith", "format", "pattern", "none"]);
35
35
  export const LIMIT_KEYS = ["minLength", "maxLength", "minItems", "maxItems"];
36
36
 
37
37
  /** Words that left the object grammar and must not come back (README 11.7, 12.3, 12.4). */
@@ -120,7 +120,9 @@ export function envelopeFindings(name, envelope, file = `${name}.yaml`) {
120
120
  for (const k of ["ids", "evidence", "ruleOut"]) if (m[k] != null && !fields(m[k])) refuse(`object ${name}: matching: ${k} is a list of field names`);
121
121
  if (m.createFrom != null && !fields(m.createFrom)) refuse(`object ${name}: matching: createFrom is a list of line names (about)`);
122
122
  if (m.remember != null && (typeof m.remember !== "string" || !(m.names ?? []).includes(m.remember))) refuse(`object ${name}: matching: remember names one of names, the list a confirmed name is added to`);
123
- if (m.judge != null && (typeof m.judge !== "string" || !/^[A-Z][A-Za-z0-9]*$/.test(m.judge))) refuse(`object ${name}: matching: judge names a node by its type (TypeSafeChoice)`);
123
+ // A JUDGE IS A NODE BY ITS TYPE, OR A DECISION NODE WITH ITS CONFIG as `review` is ({ node: OpenAIDecision, config: { model } }).
124
+ const judgeNode = isRecord(m.judge) ? m.judge.node : m.judge;
125
+ if (m.judge != null && (typeof judgeNode !== "string" || !/^[A-Z][A-Za-z0-9]*$/.test(judgeNode) || (isRecord(m.judge) && m.judge.config != null && !isRecord(m.judge.config)))) refuse(`object ${name}: matching: judge names a node by its type (TypeSafeChoice), or a decision node with its config ({ node: OpenAIDecision, config: { model } })`);
124
126
  for (const k of Object.keys(m)) if (!["ids", "names", "remember", "evidence", "ruleOut", "judge", "link", "review", "createFrom"].includes(k)) say(`object ${name}: matching: "${k}" is not a word here`);
125
127
  }
126
128
  }
@@ -169,7 +171,14 @@ export function propsFindings(name, ownProps, parentProps = null, base = null, f
169
171
  if (raw.standard != null && (typeof raw.standard !== "string" || !raw.standard.trim())) say(`object ${name}: prop "${k}": standard is the field's id in the org's field list, one word (OFST452010)`);
170
172
  if (raw.wordings != null && (!Array.isArray(raw.wordings) || !raw.wordings.length || raw.wordings.some((w) => typeof w !== "string" || !w.trim()))) say(`object ${name}: prop "${k}": wordings is a list of the words documents print for this field, e.g. [management fee, mgmt fee]`);
171
173
  if (raw.pattern != null) { try { if (typeof raw.pattern !== "string" || !raw.pattern.trim()) throw 0; new RegExp(raw.pattern); } catch { say(`object ${name}: prop "${k}": pattern is the regular expression a value must match, e.g. ^[A-Z]{2}[A-Z0-9]{9}[0-9]$; a value that does not match is never saved`); } }
172
- if (raw.format != null && raw.format !== "date" && raw.format !== "country") say(`object ${name}: prop "${k}": format is date, country, or nothing (a date is written yyyy-mm-dd; a country is held by its one name from ISO 3166, "UK" saved as United Kingdom)`);
174
+ if (raw.format != null && raw.format !== "date" && raw.format !== "country" && raw.format !== "currency") say(`object ${name}: prop "${k}": format is date, country, currency, or nothing (a date is written yyyy-mm-dd; a country is held by its one name from ISO 3166, "UK" saved as United Kingdom; a currency by its ISO 4217 code, "U.S. Dollars" saved as USD)`);
175
+ // A WORDING SCOPED TO ONE KIND OF DOCUMENT (2026-10-26): `wordingsIn` lists, under a document type, the words that name
176
+ // this field in that type only, where one type prints for this field the words another prints for another field.
177
+ if (raw.wordingsIn != null && (!isRecord(raw.wordingsIn) || !Object.keys(raw.wordingsIn).length || Object.values(raw.wordingsIn).some((ws) => !Array.isArray(ws) || !ws.length || ws.some((w) => typeof w !== "string" || !w.trim())))) say(`object ${name}: prop "${k}": wordingsIn lists, under each document type, the words that name this field in that type only, as { <document type>: [<words>] }`);
178
+ if (raw.wordingsIn != null && raw.input !== true) say(`object ${name}: prop "${k}" says wordingsIn but not input: true; only a field read from documents is filled from a table`);
179
+ // A TERM OF ANOTHER FIELD (2026-10-26): `onlyWith` names the field this one is a term of; where that field is none,
180
+ // this one is not kept.
181
+ if (raw.onlyWith != null && (typeof raw.onlyWith !== "string" || raw.onlyWith === k || !(raw.onlyWith in ownProps || (parentProps && raw.onlyWith in parentProps)))) say(`object ${name}: prop "${k}": onlyWith names another field of this object that this one is a term of, and is kept only where that field is not none`);
173
182
  if ((raw.standard != null || raw.wordings != null) && raw.input !== true) say(`object ${name}: prop "${k}" says standard or wordings but not input: true; only a field read from documents is filled from a table`);
174
183
  }
175
184
  // FILLED FROM DOCUMENTS, EVERY FIELD SAYS WHICH (proved-before-built.md, ruled 2026-10-07): an
@@ -319,7 +328,7 @@ export function objectTestFindings(name, test, service, file = "test.yaml") {
319
328
  // ─────────────────────────────────────────────────────────────────────────────
320
329
 
321
330
  /** What an entry under `each` says about its row; every other key is an object that row becomes. */
322
- export const PIPELINE_READ_KEYS = new Set(["each", "sourceUrl", "sourceId", "content"]);
331
+ export const PIPELINE_READ_KEYS = new Set(["each", "sourceUrl", "sourceId", "content", "about"]);
323
332
  /** Words the 2026-09-15 shape dropped (docs/unoverse/data/pipelines/history.md), refused with a pointer. */
324
333
  const DROPPED_MAKE_KEYS = ["partsOf", "by", "under", "when", "from", "any", "index"];
325
334
 
@@ -491,7 +500,7 @@ export function pipelineFolderFindings(name, { file, config, test }, { nodeTypes
491
500
  */
492
501
  /** A legal form as one word of a name, in any jurisdiction's spelling: the mark of a firm's or a fund's name. */
493
502
  const LEGAL_FORM_WORD = /^(?:Ltd|Limited|LLC|LLP|L\.?P\.?|LP|plc|PLC|Inc\.?|Corp\.?|Co\.?|GmbH|AG|S\.?A\.?|S\.?C\.?A\.?|S\.?p\.?A\.?|SpA|B\.?V\.?|BV|N\.?V\.?|NV|S\.?à\.?r\.?l\.?|SARL|Sàrl|Pte\.?|Pty\.?|KGaA|KG|ApS|AB|AS|Oy|SE|SAS|SL|SRL|Srl|V)\.?$/;
494
- const LAYOUT_TEXT_KEYS = new Set(["pattern", "after", "heading", "text", "row", "table", "say", "describe", "trim", "split"]);
503
+ const LAYOUT_TEXT_KEYS = new Set(["pattern", "after", "heading", "text", "row", "table", "say", "describe", "trim", "split", "column", "is"]);
495
504
  const LAYOUT_NAME_KEYS = new Set(["names", "sameAs", "neverMerge", "aliases"]);
496
505
  /** Every capitalised run of two or more words in a string, regex syntax and escapes aside. */
497
506
  function capitalisedRuns(str) {
@@ -507,7 +516,7 @@ const LITERAL_CODE = /\b(?:[A-Z]{2}[A-Z0-9]{9}\d|[A-Z]{4,}\s[A-Z]{2}|[A-Z]+\d+[A
507
516
  * a code with digits or an identifier's shape is refused as everywhere.
508
517
  */
509
518
  const LITERAL_CODE_ANY_CASE = /\b(?:[A-Z]{2}[A-Z0-9]{9}\d|[A-Z]+\d+[A-Z]+|TL-[A-Z]\d*)\b|(?<![A-Za-z][\s-]?)\b[A-Z]{4,}\s[A-Z]{2}\b(?![\s-]?[A-Za-z])/;
510
- export function layoutFindings(name, file, fileName = `${name}.yaml`) {
519
+ export function layoutFindings(name, file, fileName = `${name}.yaml`, { columns = null } = {}) {
511
520
  const out = [];
512
521
  const refuse = (msg) => out.push({ file: fileName, msg, refuses: true });
513
522
  if (!isRecord(file)) return [{ file: fileName, msg: `layout ${name}: ${fileName} must be a record`, refuses: true }];
@@ -543,6 +552,55 @@ export function layoutFindings(name, file, fileName = `${name}.yaml`) {
543
552
  if ((anyCase ? LITERAL_CODE_ANY_CASE : LITERAL_CODE).test(str.replace(/\[[^\]]*\]|\{[^}]*\}|\\[A-Za-z]/g, " "))) refuse(`layout ${name}: "${str.slice(0, 60)}" at ${path} spells out a code or ticker; a layout names no document (document-map.md, 2026-10-21)`);
544
553
  };
545
554
  walk(file, "");
555
+ // A TERM FOR SOME CLASSES (`classes`, 2026-10-28): a list group the pattern has, `other`, or a column and the words that mark a
556
+ // class in it; anything else would give the term to no class, or every class, silently.
557
+ const compiles = (re) => { try { new RegExp(re); return true; } catch { return false; } };
558
+ const classesOf = (v, path) => {
559
+ if (Array.isArray(v)) { v.forEach((x, i) => classesOf(x, `${path}[${i}]`)); return; }
560
+ if (!isRecord(v)) return;
561
+ if ("classes" in v && "pattern" in v) {
562
+ const c = v.classes, groups = compiles(v.pattern) ? new RegExp(`${v.pattern}|`).exec("").length - 1 : 0;
563
+ if (typeof c === "number" ? !(Number.isInteger(c) && c >= 1 && c <= groups && c !== (v.group ?? 1)) : c === "other" ? false : !(isRecord(c) && typeof c.column === "string" && typeof c.is === "string" && compiles(c.column) && compiles(c.is)))
564
+ refuse(`layout ${name}: classes at ${path} must be a group of the pattern holding the list (not the value's group), "other", or { column, is } as regular expressions`);
565
+ }
566
+ for (const [k, x] of Object.entries(v)) if (k !== "map") classesOf(x, path ? `${path}.${k}` : k);
567
+ };
568
+ classesOf(file, "");
569
+ out.push(...codeMapFindings(name, file.codes, fileName, columns));
570
+ return out;
571
+ }
572
+
573
+ /**
574
+ * A TYPE'S CODE MAP (layout `codes`, layout.schema.json; owner 2026-10-26): a fixed template read by its printed cell
575
+ * codes. Its patterns must compile (a bad one would stop every read of the type: refused). Each rule names a code or a tag
576
+ * (a rule naming neither speaks for every cell), and a rule that skips gives no measure. With the org's metric dataset
577
+ * (`columns`, its dataset.yaml), every measure, unit, side, adjustment, dimension and period a rule gives is one the
578
+ * dataset declares: a word it does not know would file figures under nothing. Structure only: the map names no document.
579
+ */
580
+ export function codeMapFindings(name, codes, fileName = `${name}.yaml`, columns = null) {
581
+ const out = [];
582
+ if (codes == null) return out;
583
+ const at = (i) => `layout ${name}: codes.rules[${i}]`;
584
+ if (!isRecord(codes) || typeof codes.column !== "string" || !Array.isArray(codes.rules)) return [{ file: fileName, msg: `layout ${name}: codes needs a column (the header of the code column) and rules`, refuses: true }];
585
+ const compiles = (re) => { try { new RegExp(re); return true; } catch { return false; } };
586
+ for (const [k, re] of [["column", codes.column], ["pattern", codes.pattern]]) if (re != null && !compiles(re)) out.push({ file: fileName, msg: `layout ${name}: codes.${k} "${re}" is no regular expression`, refuses: true });
587
+ const declared = new Map();
588
+ for (const c of Array.isArray(columns) ? columns : []) {
589
+ if (!isRecord(c) || typeof c.name !== "string") continue;
590
+ const words = new Set([...(Array.isArray(c.enum) ? c.enum : []), ...(isRecord(c.values) ? Object.keys(c.values) : [])].map(String));
591
+ if (words.size) declared.set(c.name, words);
592
+ }
593
+ codes.rules.forEach((r, i) => {
594
+ if (!isRecord(r)) { out.push({ file: fileName, msg: `${at(i)} must be a record` }); return; }
595
+ if (r.code == null && r.tag == null) out.push({ file: fileName, msg: `${at(i)} names no code and no tag, so it speaks for every cell; give the code or the tag it is for` });
596
+ for (const p of [].concat(r.code ?? [])) if (typeof p === "string" && p.startsWith("^") && !compiles(p)) out.push({ file: fileName, msg: `${at(i)}: code "${p}" is no regular expression`, refuses: true });
597
+ if (r.skip != null && r.measure != null) out.push({ file: fileName, msg: `${at(i)} both skips and gives a measure; a skipped cell is no metric` });
598
+ for (const key of ["measure", "unit", "side", "adjustment", "dimension", "period"]) {
599
+ const v = r[key];
600
+ if (v == null || !declared.has(key)) continue;
601
+ if (!declared.get(key).has(String(v))) out.push({ file: fileName, msg: `${at(i)}: ${key} "${v}" is not one the org's dataset declares (dataset.yaml ${key}); a code's figures are filed in the dataset's own words` });
602
+ }
603
+ });
546
604
  return out;
547
605
  }
548
606