@rsconcept/rstool 0.2.1 → 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/docs/DOMAIN.md CHANGED
@@ -1,91 +1,68 @@
1
- # Domain reference
2
-
3
- Compact English distillation of the canonical Russian domain glossary (`CONTEXT.md`). Read this first if you are an agent unfamiliar with the Concept Portal vocabulary.
4
-
5
- ## Core concepts
6
-
7
- - **Subject domain**a sphere of human activity that requires coordination and communication.
8
- - **Conceptual schema (`КС`)** — a formal system of definitions for a subject domain, made of constituents.
9
- - **Conceptual model (`РСМодель`)** — a pairing of a conceptual schema with an interpretation in concrete data.
10
- - **Operations Synthesis Schema (`ОСС`)** — a graph of load and synthesis operations that drives schema construction and evolution.
11
- - **RS language (`родоструктурная экспликация`)** — the formal genus-structure language used to define concepts, relations and operations inside a schema.
12
- - **Typification** the computable structural type of a constituent's formal definition; the formal constraint on admissible interpretations.
13
- - **Term graph**a directed dependency graph over constituents; an edge means "constituent A appears in constituent B's definition".
14
-
15
- ## Constituents
16
-
17
- A **constituent** is the atomic building block of a conceptual schema. Each constituent may carry a term, a convention, a typification, a formal definition, a textual interpretation, and a comment. By role, a constituent is either undefined, derived, or a statement.
18
-
19
- Constituent aliases follow a strict prefix scheme:
20
-
21
- | Alias prefix | Role | Notes |
22
- | ------------ | ---------------------------------------- | ----------------------------------------------------------------------------------------------- |
23
- | `N#` | Nominoid | Free vocabulary item, no formal definition |
24
- | `X#` | Base set | Undefined concept, set of elements |
25
- | `C#` | Constant set | Undefined concept, set of elements, allows arithmetic predicates and operations |
26
- | `S#` | Structured concept (**genus structure**) | Undefined concept; `definitionFormal` gives **typification**; meaning via `convention` / axioms |
27
- | `D#` | Term | Derived concept; `definitionFormal` is the **definition**; value computed in a model |
28
- | `F#` | Term-function | Parameterised derived concept yielding an STE |
29
- | `P#` | Predicate-function | Parameterised derived concept yielding a logical expression |
30
- | `A#` | Axiom | Logical statement asserting requirements |
31
- | `T#` | Statement | Logical assertion about the model |
32
- | `R#` | Radical | Template placeholder for arbitrary typification |
33
-
34
- **Undefined concepts** (`X#`, `C#`, `S#`) are introduced by conventions (and optional axioms). For `S#`, the formal field states **typification** (the grade of elements), not a defining construction. **Derived concepts** (`D#`, `F#`, `P#`, `A#`, `T#`) carry a formal **definition** and must follow declaration order — every referenced constituent must already exist; their model values are obtained by evaluation.
35
-
36
- **Structure vs term:** `S#` with `ℬ(X1×X1)` declares “elements are pairs over `X1`”; the actual pairs come from interpretation. `D#` with `X1×X1` as the whole expression denotes the **full Cartesian product** (all pairs), which is a computed set use `S#` + projections when modeling a relation.
37
-
38
- A **crucial constituent** is marked as content-bearing for filtering / focus; it has no semantic effect on the formal calculus.
39
-
40
- ## Statuses
41
-
42
- Each constituent has one of the following correctness statuses:
43
-
44
- | Status | Meaning |
45
- | ------------ | ------------------------------------------------------------------ |
46
- | Unknown | Not yet validated |
47
- | OK | Validated as correct |
48
- | Error | Validation failed |
49
- | Property | Defines a non-computable set; only membership tests are admissible |
50
- | Incalculable | Cannot be evaluated directly (e.g. expected exponential blow-up) |
51
-
52
- ## RSModel evaluation states
53
-
54
- In a conceptual model each item has one of the following evaluation statuses:
55
-
56
- | Status | Meaning |
57
- | ------------------- | ----------------------------------------------- |
58
- | `NO_EVAL` (1) | Not evaluated (definition is not interpretable) |
59
- | `NOT_PROCESSED` (2) | Interpretation has not been computed yet |
60
- | `INVALID_DATA` (3) | Provided data is invalid |
61
- | `EVAL_FAIL` (4) | Evaluation raised an error |
62
- | `AXIOM_FALSE` (5) | Axiom evaluated to FALSE |
63
- | `EMPTY` (6) | Result is the empty set |
64
- | `HAS_DATA` (7) | Interpretation computed and non-empty |
65
-
66
- ## Synthesis and OSS
67
-
68
- - **Load operation** attaches an existing schema to the OSS graph.
69
- - **Synthesis operation** combines operand schemas via an **identification table** (pairs of constituents to be treated as equivalent) and produces a result schema with **inherited constituents**.
70
- - **Cross-cutting changes** propagate edits from a **source constituent** to its **inherited constituents** through the OSS. Inherited constituents are not edited directly.
71
- - **Diamond synthesis** uses operand schemas with shared ancestors.
72
- - **Concept block** is a nominal grouping of schemas inside the OSS.
73
-
74
- ## Relationships
75
-
76
- - A conceptual schema **contains** many constituents.
77
- - A conceptual model **interprets** exactly one schema at a given state.
78
- - An OSS **contains** load and synthesis operations.
79
- - A synthesis operation **consumes** one or more input schemas plus an identification table and **produces** a result schema with inherited constituents.
80
- - Cross-cutting changes **propagate** from a source constituent to its inherited descendants.
81
- - The term graph is **derived** from the formal definitions of constituents.
82
-
83
- ## Dependency vocabulary
84
-
85
- - **Consumers** — constituents that mention this one in their definitions.
86
- - **Suppliers** — constituents this one mentions in its definition.
87
- - **Dependents** — direct and transitive consumers.
88
- - **Influencers** — direct and transitive suppliers.
89
- - **Generating expression** — a definition referencing a single external constituent with no added content.
90
- - **Base concept (for generation)** — the constituent on which a generating expression is built.
91
- - **Generated concept** — a constituent produced from a generating expression.
1
+ # Доменная справка
2
+
3
+ Термины, используемые в Concept Portal.
4
+
5
+ ## Основные термины
6
+
7
+ - **Предметная область**область, для которой строится система определений.
8
+ - **Концептуальная схема (`КС`)** — система понятий, утверждений и связей между ними.
9
+ - **Концептуальная модель (`КМ`)** — КС плюс интерпретация ее понятий на конечных данных.
10
+ - **Операционная схема синтеза (`ОСС`)** — граф загрузок и синтезов КС.
11
+ - **Родоструктурная экспликация (`RSLang`)** — формальный язык для понятий, отношений, операций и утверждений.
12
+ - **Типизация / ступень** структура значений выражения: элемент, целое, кортеж, множество, `Logic`.
13
+ - **Граф термов**зависимости: конституента ссылается на другую в формальном определении.
14
+
15
+ ## Конституенты
16
+
17
+ **Конституента** часть КС. Главное для агента: `alias`, `cstType`, `definitionFormal`, `term`, `definitionText`, `convention`. `comment` комментарий и пояснения разработчика схемы, полезно для контекста.
18
+
19
+ - `N#` **номиноид**: словарная сущность. В родоструктурной экспликации не используется.
20
+ - `X#` — **базисное множество**: неопределяемое понятие, формула пустая.
21
+ - `C#` **константное множество**: неопределяемое множество для арифметики и порядка, формула пустая.
22
+ - `S#` **родовая структура**: неопределяемое структурное понятие; формула задает типизацию.
23
+ - `D#` **терм**: определяемое понятие; формула вычисляет значение.
24
+ - `F#` **терм-функция**: параметризованный терм.
25
+ - `P#` **предикат-функция**: параметризованное логическое выражение.
26
+ - `A#` **аксиома**: логическое требование к модели.
27
+ - `T#` **высказывание**: логическое утверждение о модели.
28
+ - `R#` **радикал**: шаблонная ступень в параметрах.
29
+
30
+ Правило: `X#`, `C#`, `S#` задаются конвенцией и интерпретацией; `D#`, `F#`, `P#`, `A#`, `T#` выводятся по формуле. Поставщики должны идти раньше потребителей.
31
+
32
+ Не путай `S#` и `D#`: `S1: ℬ(X1×X1)` интерпретируемое отношение из пар; `D1 := X1×X1` — декартово произведение.
33
+
34
+ ## Статусы выражений
35
+
36
+ - `Unknown` — не проверено.
37
+ - `OK` — корректно.
38
+ - `Error` ошибка в определении.
39
+ - `Property` — неразмерное: доступна только проверка принадлежности.
40
+ - `Incalculable` — невычислимо напрямую.
41
+
42
+ ## Статусы вычисления в модели
43
+
44
+ - `NO_EVAL` — нечего вычислять.
45
+ - `NOT_PROCESSED` вычисление не запускалось.
46
+ - `INVALID_DATA` неверная интерпретация.
47
+ - `EVAL_FAIL` ошибка вычисления.
48
+ - `AXIOM_FALSE` аксиома ложна.
49
+ - `EMPTY` результат пуст.
50
+ - `HAS_DATA` результат вычислен и непустой.
51
+
52
+ ## Зависимости
53
+
54
+ - **Поставщики** конституенты, на которые ссылается текущая.
55
+ - **Потребители** — конституенты, которые ссылаются на текущую.
56
+ - **Влияющие** — прямые и транзитивные поставщики.
57
+ - **Зависимые** прямые и транзитивные потребители.
58
+ - **Основание** конституента, из которой формально порождают новые термы.
59
+ - **Порожденная конституента** построена из основания без новой предметной договоренности.
60
+
61
+ ## ОСС и синтез
62
+
63
+ - **Загрузка** добавляет внешнюю или собственную КС в ОСС.
64
+ - **Синтез** строит новую КС из операций-аргументов через таблицу отождествлений.
65
+ - **Наследованные конституенты** пришли из исходных схем; их определения обычно read-only.
66
+ - **Сквозные изменения** идут от исходной конституенты к наследникам.
67
+ - **Ромбовидный синтез** использует КС с общими предками; чаще требует ручного отождествления дублей.
68
+ - **Концептуальный блок** группа схем внутри предметной области.
@@ -1,98 +1,47 @@
1
- # Grammar reference (pointers)
1
+ # Грамматика: короткая карта
2
2
 
3
- Below is a compact token map agents can use without opening the grammar. For full grammar see `@rsconcept/domain` package.
3
+ Этого обычно достаточно агенту. Полная грамматика живет в `@rsconcept/domain`.
4
4
 
5
- ## Token classes
5
+ ## Токены
6
6
 
7
- | Class | Tokens / examples |
8
- | --------------- | ---------------------------------------------------------- |
9
- | Whitespace | space, tab, newline |
10
- | Integer literal | `0`, `42` |
11
- | Empty set | `∅` |
12
- | Integer set | `Z` |
13
- | Globals | `X#`, `C#`, `S#`, `D#`, `F#`, `P#`, `A#`, `T#`, `N#`, `R#` |
14
- | Locals | `x`, `ξ`, `μ2`, `y1` |
15
- | Punctuation | `(`, `)`, `[`, `]`, `{`, `}`, `,`, `;` |
16
- | Comment | none — RSLang has no comments inside formal expressions |
7
+ - Литералы: `0`, `42`, `Z`, `∅`.
8
+ - Алиасы: `X#`, `C#`, `S#`, `D#`, `F#`, `P#`, `A#`, `T#`, `R#`.
9
+ - Локальные переменные: `x`, `ξ`, `μ2`, `y1`.
10
+ - Скобки и разделители: `()`, `[]`, `{}`, `,`, `;`.
11
+ - Комментариев в формальных выражениях нет.
17
12
 
18
- ## Set / structural operators
13
+ ## Операторы
19
14
 
20
- | Token | Symbol |
21
- | -------------------- | -------------------------- |
22
- | Union | `∪` |
23
- | Intersection | `∩` |
24
- | Difference | `\` |
25
- | Symmetric difference | `∆` |
26
- | Cartesian product | `×` |
27
- | Boolean | `ℬ` |
28
- | Sum set | `red` |
29
- | Singleton | `bool` |
30
- | Desingleton | `debool` |
31
- | Small projection | `pr1`, `pr1,3`, … |
32
- | Large projection | `Pr1`, `Pr2,4`, … |
33
- | Filter | `Fi1[D](S)`, `Fi1,2[D](S)` |
34
- | Cardinality | `card` |
15
+ - Множества: `∪`, `∩`, `\`, `∆`, `×`, `ℬ`.
16
+ - Структуры: `red`, `bool`, `debool`, `pr1`, `Pr1`, `Fi1[D](S)`, `card`.
17
+ - Предикаты: `∈`, `∉`, `⊆`, `⊂`, `⊄`, `=`, `≠`, `<`, `≤`, `>`, `≥`.
18
+ - Связки: `¬`, `&`, `∨`, `⇒`, `⇔`.
19
+ - Кванторы: `∀`, `∃`.
35
20
 
36
- ## Predicates
21
+ Мультииндексы парсятся как список натуральных чисел: `pr1,3`, `Pr2,4`, `Fi1,2[D](S)`.
37
22
 
38
- | Token | Symbol |
39
- | ---------------- | ------ |
40
- | Membership | `∈` |
41
- | Non-membership | `∉` |
42
- | Inclusion | `⊆` |
43
- | Strict inclusion | `⊂` |
44
- | Non-inclusion | `⊄` |
45
- | Equality | `=` |
46
- | Inequality | `≠` |
47
- | Less | `<` |
48
- | Less-or-equal | `≤` |
49
- | Greater | `>` |
50
- | Greater-or-equal | `≥` |
23
+ ## Декларации
51
24
 
52
- ## Logical connectives
25
+ - Терм-функция: `F# ::= [<params>] <body STE>`.
26
+ - Предикат-функция: `P# ::= [<params>] <body LE>`.
27
+ - Параметр: `α ∈ <STE>`.
28
+ - Вызов: `F#[<arg1>, <arg2>]`.
53
29
 
54
- | Token | Symbol |
55
- | ----------- | ------ |
56
- | Negation | `¬` |
57
- | Conjunction | `&` |
58
- | Disjunction | `∨` |
59
- | Implication | `⇒` |
60
- | Equivalence | `⇔` |
30
+ ## Приоритеты
61
31
 
62
- ## Quantifiers
32
+ 1. Вызовы функций, проекции, `ℬ`, `bool`, `debool`, `red`, `card`.
33
+ 2. `×`.
34
+ 3. `*`.
35
+ 4. `+`, `-`.
36
+ 5. `∪`, `∩`, `\`, `∆`.
37
+ 6. Предикаты: `∈`, `=`, `<`, ...
38
+ 7. `¬`.
39
+ 8. `&`.
40
+ 9. `∨`.
41
+ 10. `⇒`.
42
+ 11. `⇔`.
63
43
 
64
- | Token | Symbol |
65
- | ----------- | ------ |
66
- | Universal | `∀` |
67
- | Existential | `∃` |
44
+ ## Когда читать исходники
68
45
 
69
- ## Declarators
70
-
71
- | Token | Form |
72
- | --------------------- | ------------------------------------------------- |
73
- | Function declaration | `F# ::= [<params>] <body STE>` |
74
- | Predicate declaration | `P# ::= [<params>] <body LE>` |
75
- | Parameter declaration | `α ∈ <STE>` (commas separate; commas inside `[]`) |
76
- | Function call | `F#[<arg1>, <arg2>, …]` |
77
-
78
- ## Precedence (from highest to lowest)
79
-
80
- 1. Function calls, projections, boolean
81
- 2. Cartesian product `×`
82
- 3. Multiplicative `*`
83
- 4. Additive `+`, `-`
84
- 5. Set operators `∪`, `∩`, `\`, `∆`
85
- 6. Predicates (`∈`, `=`, `<`, …)
86
- 7. Negation `¬`
87
- 8. Conjunction `&`
88
- 9. Disjunction `∨`
89
- 10. Implication `⇒`
90
- 11. Equivalence `⇔`
91
-
92
- Multi-index tokens inside projections / filters are parsed as a comma-separated list of natural numbers.
93
-
94
- ## When to consult the full grammar
95
-
96
- - Grammar conflicts or surprising error positions — read `rslang.grammar` directly.
97
- - Adding new operators or precedence rules — must be done in the domain package, not in rstool.
98
- - Lezer terms / token IDs — see `@rsconcept/domain/src/rslang/parser/token.ts` and `parser.terms.ts`.
46
+ - Позиция ошибки неожиданная.
47
+ - Нужны Lezer terms/token IDs: `@rsconcept/domain/src/rslang/parser/token.ts`, `parser.terms.ts`.
@@ -0,0 +1,57 @@
1
+ # Тестирование определений через концептуальную модель
2
+
3
+ Концептуальная модель (`КМ`) полезна как маленький стенд для проверки семантики выражений. Если агент не уверен, что формула означает именно нужную операцию, не угадывай по виду выражения: создай минимальную схему, задай тестовые значения для неопределяемых конституент и вычисли результат.
4
+
5
+ ## Когда использовать
6
+
7
+ - Неочевидны `S#` против `D#`, проекции `Pr*` / `pr*`, фильтры `Fi*`, `red`, `bool`, `debool`.
8
+ - Формула синтаксически корректна, но есть сомнение в семантике результата.
9
+ - Нужно проверить, что аксиома действительно ловит ошибочные данные.
10
+ - Пользователь просит надежно изменить важное определение, а пример данных можно сделать маленьким.
11
+
12
+ Для простой проверки типизации сначала используй `analyzeExpression`. КМ нужна, когда вопрос зависит от интерпретации данных и вычисленного значения.
13
+
14
+ ## Минимальный цикл
15
+
16
+ 1. Создай отдельную `createSession` или изолированную копию текущей сессии.
17
+ 2. Добавь только нужные поставщики: `X#`, `C#`, `S#` и проверяемые `D#` / `F#` / `P#` / `A#`.
18
+ 3. Проверь формулы через `analyzeExpression` и `addOrUpdateConstituenta`.
19
+ 4. Задай значения базисов и структур через `setConstituentaValue` или `setConstituentaValues`.
20
+ 5. Вычисли проверяемую формулу через `evaluateExpression` или сохраненную конституенту через `evaluateConstituenta`.
21
+ 6. Сравни результат с ожидаемым значением; если есть несколько зависимых определений, запусти `recalculateModel`.
22
+
23
+ ## Что задавать руками
24
+
25
+ `basic`, `constant`, `structure` можно интерпретировать напрямую. `term`, `function`, `predicate`, `axiom`, `statement` должны вычисляться из формулы, поэтому их напрямую не задавай.
26
+
27
+ Пример формы данных:
28
+
29
+ ```ts
30
+ const TUPLE_ID = -111;
31
+
32
+ tool.setConstituentaValues(sessionId, {
33
+ items: [
34
+ { target: 1, value: { 0: 'ann', 1: 'bob', 2: 'cat' } },
35
+ { target: 2, value: [[TUPLE_ID, 0, 1], [TUPLE_ID, 0, 2]] }
36
+ ]
37
+ });
38
+ ```
39
+
40
+ Здесь `X1` получает подписи элементов, а `S1: ℬ(X1×X1)` получает множество пар по индексам элементов `X1`.
41
+
42
+ ## Скрипты-тесты
43
+
44
+ Если проверка влияет на поведение схемы или есть риск регрессии, вынеси ее в маленький скрипт или colocated `*.test.ts`:
45
+
46
+ 1. Собери минимальную сессию с нужными конституентами.
47
+ 2. Задай тестовые значения неопределяемых конституент.
48
+ 3. Вычисли целевые конституенты.
49
+ 4. Проверь `success`, `status`, `diagnostics.length` и само `value`.
50
+
51
+ Тест должен проверять смысл формулы, а не только отсутствие диагностик. Для аксиом отдельно проверяй положительный и отрицательный набор данных: корректная модель должна давать истинную аксиому, ошибочная — `AXIOM_FALSE` или диагностируемый сбой вычисления.
52
+
53
+ ## Ограничения
54
+
55
+ - Маленькая КМ проверяет семантику на выбранных данных, но не доказывает определение для всех моделей.
56
+ - Не подменяй предметное соглашение тестом: если смысл `S#` не ясен, уточни `convention` или спроси пользователя.
57
+ - Не добавляй искусственные конституенты в рабочую схему только ради теста. Держи scratch-сессию или тестовый скрипт отдельно.
@@ -1,45 +1,31 @@
1
- # Portal REST API (read-only reference)
1
+ # Portal REST API
2
2
 
3
- When an agent needs to **inspect existing** RSForms, OSS, or RSModels persisted on the Portal, use the REST API on `api.portal.acconcept.ru`. The rstool library itself never calls the Portal API it always works on in-memory sessions. This document is for agents that combine rstool sessions with data fetched from a live Portal.
3
+ Справка только для чтения существующих КС, ОСС и RSModel. `rstool` сам не ходит в REST API: он работает с in-memory сессиями.
4
4
 
5
- ## Hosts
5
+ ## Хосты
6
6
 
7
- - **UI:** `https://portal.acconcept.ru/`
8
- - **REST API:** `https://api.portal.acconcept.ru/`
7
+ - UI: `https://portal.acconcept.ru/`
8
+ - REST API: `https://api.portal.acconcept.ru/`
9
9
 
10
- ## Path rewrite rules
10
+ ## Пути
11
11
 
12
- | Portal UI path | REST target |
13
- | -------------------------------- | ------------------------------------------------------- |
14
- | `/rsforms/:id` | `GET /api/rsforms/:id` (metadata: owner, titles) |
15
- | `/rsforms/:id` (full payload) | `GET /api/rsforms/:id/details` |
16
- | `/rsforms/:id` (a saved version) | `GET /api/library/:id/versions/:version` |
17
- | `/oss/:id` | `GET /api/oss/:id` (and the sibling OSS viewset routes) |
18
- | `/models/:id` | `GET /api/models/:id` (RSModel router) |
12
+ - `/rsforms/:id` в UI `GET /api/rsforms/:id` для метаданных.
13
+ - Полная КС `GET /api/rsforms/:id/details`.
14
+ - Версия КС → `GET /api/library/:id/versions/:version`.
15
+ - ОСС `GET /api/oss/:id` и соседние routes viewset.
16
+ - Модель `GET /api/models/:id`.
17
+ - OpenAPI JSON → `GET https://api.portal.acconcept.ru/schema`.
19
18
 
20
- ## OpenAPI
19
+ ## Как перенести КС в rstool
21
20
 
22
- Machine-readable schema:
21
+ 1. Получи `GET /api/rsforms/:id/details`.
22
+ 2. Создай `createSession`.
23
+ 3. Перенеси конституенты через `addOrUpdateConstituenta`: `alias`, `cstType`, `definitionFormal`, `term`, `definitionText`, `convention`.
24
+ 4. Работай локально: анализ, правки, вычисления.
25
+ 5. Для передачи результата используй `exportSession`.
23
26
 
24
- ```
25
- GET https://api.portal.acconcept.ru/schema
26
- ```
27
+ ## Не делай
27
28
 
28
- Prefer `/schema` for JSON. The Swagger UI is separate.
29
-
30
- ## What rstool consumes
31
-
32
- rstool itself works with in-memory sessions via `RSToolAgent` or the stdio wrapper. To bridge between the REST payload and a rstool session, the typical flow is:
33
-
34
- 1. `GET /api/rsforms/:id/details` to fetch the persisted RSForm.
35
- 2. Convert the response (constituents, formal definitions, term, convention, etc.) into a series of `addOrUpdateConstituenta` calls inside a fresh `createSession`.
36
- 3. Operate offline: analyse, edit, evaluate, then `exportSession` for hand-off.
37
-
38
- There is no backend write path in rstool: edits never round-trip to the Portal automatically. Publish changes back to the Portal through the existing Portal UI or REST writes.
39
-
40
- ## Don'ts
41
-
42
- - Do not scrape the SPA HTML.
43
- - Do not pass UI hash params (`?tab=editor`, etc.) to REST.
44
- - Do not call `/api/rsforms/:id/details` for trivial metadata — `GET /api/rsforms/:id` is cheaper.
45
- - Do not assume the API host is the same as the UI host in production — they are different.
29
+ - Не парси HTML SPA.
30
+ - Не переноси UI query/hash вроде `?tab=editor` в REST.
31
+ - Не запрашивай `/details`, если нужны только метаданные.
package/docs/README.md CHANGED
@@ -1,16 +1,17 @@
1
- # rstool docs
1
+ # Документация rstool
2
2
 
3
- Standalone English reference distilled from the Portal manuals and `CONTEXT.md`. Bundled with `@rsconcept/rstool` so external agents never need to read the Portal frontend source tree.
3
+ Краткая русская справка для агентов.
4
4
 
5
- | File | Read when |
6
- |------|-----------|
7
- | [`DOMAIN.md`](DOMAIN.md) | You need the Concept Portal vocabulary (constituenta, conceptual schema/model, OSS, synthesis). |
8
- | [`CONCEPTUAL-SCHEMA.md`](CONCEPTUAL-SCHEMA.md) | You are designing/reviewing a conceptual schema as a system (thesaurus value, closed-world text definitions, genus structures, axioms). |
9
- | [`CONSTITUENTA.md`](CONSTITUENTA.md) | You are upserting constituents — fields, `cstType` table, validation rules, recommended order. |
10
- | [`SYNTAX.md`](SYNTAX.md) | You are constructing RSLang expressions — operators, quantifiers, parameterised functions, examples. |
11
- | [`TYPIFICATION.md`](TYPIFICATION.md) | You are interpreting `AnalysisResult.type` / `valueClass` or constructing template expressions with radicals. |
12
- | [`DIAGNOSTICS.md`](DIAGNOSTICS.md) | You received `analysis.diagnostics` and need to map error codes to fixes. |
13
- | [`PORTAL-API.md`](PORTAL-API.md) | You need to fetch an existing RSForm/OSS/RSModel from the live Portal REST API. |
14
- | [`GRAMMAR-REF.md`](GRAMMAR-REF.md) | You need a compact token / precedence table; the full grammar lives in `@rsconcept/domain`. |
5
+ ## Какой файл читать
15
6
 
16
- For the rstool agent contract itself (methods, types, stdio protocol) see [`../skills/rstool-helper/REFERENCE.md`](../skills/rstool-helper/REFERENCE.md).
7
+ - **DOMAIN.md** термины Portal: конституента, концептуальная схема/модель, ОСС, синтез.
8
+ - **CONCEPTUAL-SCHEMA.md** — проектирование и ревью концептуальных схем.
9
+ - **CONSTITUENTA.md** — структура и правила конституент.
10
+ - **SYNTAX.md** — операторы, кванторы, функции и примеры выражений.
11
+ - **TYPIFICATION.md** — типизация (`AnalysisResult.type`, `valueClass`).
12
+ - **MODEL-TESTING.md** — проверка семантики определений на маленьких концептуальных моделях.
13
+ - **DIAGNOSTICS.md** — диагностики анализа и способы исправления ошибок.
14
+ - **PORTAL-API.md** — объекты REST API Portal.
15
+ - **GRAMMAR-REF.md** — краткая карта токенов и приоритетов.
16
+
17
+ Контракт агента `rstool` см. в `../skills/rstool-helper/REFERENCE.md`.