docs(skills): mappa-knowledge 1.4.1→1.5.0 — English translation, bilingual triggers (task:1086)
This commit is contained in:
@@ -1,193 +1,195 @@
|
||||
---
|
||||
name: mappa-knowledge
|
||||
author: ours
|
||||
version: 1.4.1
|
||||
version: 1.5.0
|
||||
description: >
|
||||
Цикл работы со знаниями проекта в Mappa (Karpathy LLM Wiki, канал =
|
||||
mappa-сущности): ingest → query → lint + граф-слой для
|
||||
реляционных/структурных вопросов. Поглощает using-wiki + using-wiki-graph
|
||||
(старые имена — триггер-синонимы). Триггеры: «заингесть», «обнови вики»,
|
||||
«запроси вики», «проверь вики», «use project wiki», «query the wiki»,
|
||||
«что связывает X и Y», «как связаны», «путь между X и Y», «what connects
|
||||
X and Y», «что ссылается на X», «backlinks of X», «сироты», «битые ссылки»,
|
||||
«orphan pages». Wiki = сущности type=wiki (чтение — карв-аут; create —
|
||||
карв-аут, update — version+409; контракт wiki:2660). Реляционные вопросы — через graph_* (BFS на
|
||||
стороне сервиса), guarded failure-mode: одна страница и стоп, без
|
||||
многохоповых цепочек чтением. Skip для одно-страничных контентных вопросов.
|
||||
The cycle of working with a project's knowledge in Mappa (Karpathy LLM Wiki,
|
||||
channel = mappa entities): ingest → query → lint + a graph layer for
|
||||
relational/structural questions. Absorbs using-wiki + using-wiki-graph (old
|
||||
names — trigger-synonyms). Triggers (bilingual): «заингесть», «обнови вики»,
|
||||
«запроси вики», «проверь вики», "use project wiki", "query the wiki",
|
||||
«что связывает X и Y», «как связаны», «путь между X и Y», "what connects
|
||||
X and Y", «что ссылается на X», «backlinks of X», «сироты», «битые ссылки»,
|
||||
"orphan pages". Wiki = entities type=wiki (read — carve-out; create —
|
||||
carve-out, update — version+409; contract wiki:2660). Relational questions —
|
||||
via graph_* (BFS server-side), guarded failure-mode: one page and stop,
|
||||
no multi-hop chains by reading. Skip for single-page content questions.
|
||||
---
|
||||
|
||||
# mappa-knowledge
|
||||
|
||||
Единый цикл работы со знаниями проекта в **Mappa**: три операции (ingest /
|
||||
query / lint) + **граф-слой** для реляционных и структурных вопросов. Скилл =
|
||||
цикл, не тул: знание **компилируется один раз и держится актуальным**
|
||||
(ingest), к нему обращаются (query), его проверяют (lint), а связи между
|
||||
сущностями читают через граф (graph_*).
|
||||
The single cycle of working with a project's knowledge in **Mappa**: three
|
||||
operations (ingest / query / lint) + a **graph layer** for relational and
|
||||
structural questions. The skill is a cycle, not a tool: knowledge is
|
||||
**compiled once and kept current** (ingest), queried (query), checked (lint),
|
||||
and the links between entities are read through the graph (graph_*).
|
||||
|
||||
Канал — Mappa (`mcp__mappa__*`), НЕ файлы. Страница — сущность `type=wiki`
|
||||
(`wiki:N`); чтение — карв-аут; **create — карв-аут без лиза; update —
|
||||
optimistic concurrency (version+409 → retry)** (контракт wiki:2660, v0.12.0).
|
||||
Файлового `.wiki/` больше нет; `setup-wiki` умер (нечего настраивать).
|
||||
Channel — Mappa (`mcp__mappa__*`), NOT files. A page is an entity `type=wiki`
|
||||
(`wiki:N`); read — carve-out; **create — carve-out without a lease; update —
|
||||
optimistic concurrency (version+409 → retry)** (contract wiki:2660, v0.12.0).
|
||||
The file-based `.wiki/` no longer exists; `setup-wiki` is dead (nothing to set up).
|
||||
|
||||
## Когда использовать
|
||||
## When to use
|
||||
|
||||
- Заингестить документ/источник в вики («заингесть X», «обнови вики»).
|
||||
- Ответить из вики / проверить вики («запроси вики», «проверь вики», lint).
|
||||
- Реляционный/структурный вопрос («что связывает X и Y», «backlinks», «сироты») — граф-слой.
|
||||
- Модифицировать любую страницу — форматы ниже обязательны; конвенции проекта
|
||||
живут в `AGENTS`-сущности (legacy — `CLAUDE`-указатель).
|
||||
- Ingest a document/source into the wiki («заингесть X», «обнови вики»).
|
||||
- Answer from the wiki / check the wiki («запроси вики», «проверь вики», lint).
|
||||
- Relational/structural question («что связывает X и Y», «backlinks», «сироты») — the graph layer.
|
||||
- Modify any page — formats below are mandatory; project conventions live in
|
||||
the `AGENTS` entity (legacy — `CLAUDE` pointer).
|
||||
|
||||
**НЕ для:** разовых вопросов по коду (обычное чтение файлов), однофайловых
|
||||
README/ADR (не персистентная база знаний), проекта без вики в mappa.
|
||||
**NOT for:** one-off code questions (normal file reading), single-file
|
||||
README/ADR (not a persistent knowledge base), a project without a wiki in mappa.
|
||||
|
||||
## Три слоя (не смешивать)
|
||||
## Three layers (don't mix)
|
||||
|
||||
1. **Raw-источники** — `summaries/<slug>` страницы. Иммутабельны: читай, не
|
||||
редактируй (единственное исключение — блок-цитата `> Status` по явной
|
||||
просьбе пользователя).
|
||||
2. **Вики** — остальные страницы (entities/concepts/packages/contradictions/open-questions/overview).
|
||||
3. **Схема** — сущности `AGENTS` (канон, slug `AGENTS`) + `CLAUDE` (legacy-
|
||||
указатель «Canon is AGENTS»). Читай `AGENTS` первой; она перекрывает этот
|
||||
скил при конфликте.
|
||||
1. **Raw sources** — `summaries/<slug>` pages. Immutable: read, don't edit
|
||||
(the only exception — the `> Status` blockquote on an explicit user request).
|
||||
2. **Wiki** — the other pages (entities/concepts/packages/contradictions/open-questions/overview).
|
||||
3. **Schema** — the `AGENTS` entity (canon, slug `AGENTS`) + `CLAUDE` (legacy
|
||||
pointer "Canon is AGENTS"). Read `AGENTS` first; it overrides this skill on
|
||||
conflict.
|
||||
|
||||
## Первый шаг любой операции
|
||||
## First step of any operation
|
||||
|
||||
1. `mcp__mappa__wiki_get(project, 'AGENTS')` — если есть, читай (канон; если
|
||||
нет — `wiki_get(project, 'CLAUDE')`, легаси-указатель).
|
||||
2. `mcp__mappa__wiki_get(project, 'index')` — каталог; найди нужные страницы.
|
||||
(Каталог по умолчанию — `entity_search`, решение 1; `index` — опора ориентации.)
|
||||
3. Только потом действуй.
|
||||
1. `mcp__mappa__wiki_get(project, 'AGENTS')` — if present, read it (canon; if
|
||||
not — `wiki_get(project, 'CLAUDE')`, the legacy pointer).
|
||||
2. `mcp__mappa__wiki_get(project, 'index')` — the catalog; find the needed
|
||||
pages. (Default catalog — `entity_search`, decision 1; `index` is an
|
||||
orientation aid.)
|
||||
3. Only then act.
|
||||
|
||||
Если `AGENTS`/`CLAUDE` нет — вики либо новая, либо неухоженная: не
|
||||
импровизируй структуру, первый ingest создаёт `AGENTS` (+ `CLAUDE`-указатель).
|
||||
If `AGENTS`/`CLAUDE` is missing — the wiki is either new or unmaintained:
|
||||
don't improvise the structure, the first ingest creates `AGENTS`
|
||||
(+ `CLAUDE` pointer).
|
||||
|
||||
## MCP-поверхность
|
||||
## MCP surface
|
||||
|
||||
| Операция | Тул | Примечание |
|
||||
| Operation | Tool | Note |
|
||||
|---|---|---|
|
||||
| Чтение страницы | `mcp__mappa__wiki_get(project?, slug)` | чтение — карв-аут |
|
||||
| Поиск страниц | `mcp__mappa__entity_search(q, type='wiki', project?, scope?, limit)` | ILIKE по body/title (полные тела) |
|
||||
| Карточный поиск | `mcp__mappa__wiki.search(q, scope?, project?, projects?, limit?)` | карточки {ref, project, slug, title, summary, snippet, related} — без тел (wiki:2661) |
|
||||
| Создать страницу | `mcp__mappa__wiki_create(project, slug, body)` | **карв-аут без лиза** |
|
||||
| Обновить страницу | `mcp__mappa__wiki_update(project, id, title?, body?, version)` | **version-based**: конфликт → 409 → retry со свежей version из wiki_get |
|
||||
| Путь между сущностями | `mcp__mappa__graph_path({from, to})` | кратчайшая цепочка, BFS |
|
||||
| Соседи / исходящие | `mcp__mappa__graph_neighbors({id})` | рёбра узла с резолвом целей |
|
||||
| Входящие ссылки | `mcp__mappa__graph_backlinks({id})` | кто ссылается на узел |
|
||||
| Здоровье графа | `mcp__mappa__graph_stats()` | nodes/edges/components |
|
||||
| Read a page | `mcp__mappa__wiki_get(project?, slug)` | read — carve-out |
|
||||
| Search pages | `mcp__mappa__entity_search(q, type='wiki', project?, scope?, limit)` | ILIKE over body/title (full bodies) |
|
||||
| Card search | `mcp__mappa__wiki.search(q, scope?, project?, projects?, limit?)` | cards {ref, project, slug, title, summary, snippet, related} — without bodies (wiki:2661) |
|
||||
| Create a page | `mcp__mappa__wiki_create(project, slug, body)` | **carve-out without a lease** |
|
||||
| Update a page | `mcp__mappa__wiki_update(project, id, title?, body?, version)` | **version-based**: conflict → 409 → retry with the fresh version from wiki_get |
|
||||
| Path between entities | `mcp__mappa__graph_path({from, to})` | shortest chain, BFS |
|
||||
| Neighbors / outgoing | `mcp__mappa__graph_neighbors({id})` | node edges with target resolution |
|
||||
| Incoming links | `mcp__mappa__graph_backlinks({id})` | who references the node |
|
||||
| Graph health | `mcp__mappa__graph_stats()` | nodes/edges/components |
|
||||
|
||||
**Запись — карв-аут (create) / version-based (update), без лиза (interactive
|
||||
contract, wiki:2660).** `wiki_create` не требует claim_token; `wiki_update`
|
||||
принимает ожидаемую `version` (свежую из `wiki_get`) — конфликт → 409 →
|
||||
**Writing — carve-out (create) / version-based (update), no lease (interactive
|
||||
contract, wiki:2660).** `wiki_create` requires no claim_token; `wiki_update`
|
||||
takes the expected `version` (fresh from `wiki_get`) — conflict → 409 →
|
||||
re-GET → retry.
|
||||
|
||||
**Frontmatter-summary (wiki:2661, карточный поиск).** При create/update/
|
||||
promote пиши `summary:` — ОДНУ строку-суть в frontmatter страницы (`---\ntitle: …\nsummary: одна строка\n---`). Карточки `wiki.search` читают его
|
||||
(без summary карточка беднее — fallback только сниппет). Информацию-дубликат
|
||||
в body не вставляй: summary компилируется один раз, в frontmatter.
|
||||
**Frontmatter-summary (wiki:2661, card search).** On create/update/promote
|
||||
write `summary:` — ONE essence line in the page frontmatter (`---\ntitle: …\nsummary: one line\n---`). The `wiki.search` cards read it (without summary the
|
||||
card is poorer — snippet fallback only). Don't insert duplicate info into the
|
||||
body: the summary is compiled once, in the frontmatter.
|
||||
|
||||
**Рефы и id (#1037/#1028).** Публичная поверхность несёт per-type реф полным
|
||||
именем первым полем: `ref: "wiki:3"` (решение 20, конвенция #1028), `num`
|
||||
следом, глобальный `id` — internal (последним). Для `wiki_update` нужен
|
||||
internal `id` — из ответа `wiki_get`/`entity_search`. В прозе — слаг/имя
|
||||
первым, реф как якорь: «спека `concepts/session-live-ingest` (wiki:2604)».
|
||||
В теле страниц — викилинки по слагу (`[[concepts/foo]]`, решение 4) или
|
||||
per-type рефы полными именами (`[[task:N]]`/`[[inbox:N]]`).
|
||||
**Refs and ids (#1037/#1028).** The public surface carries the per-type ref by
|
||||
full name as the first field: `ref: "wiki:3"` (decision 20, convention #1028),
|
||||
`num` next, the global `id` — internal (last). `wiki_update` needs the
|
||||
internal `id` — from the `wiki_get`/`entity_search` response. In prose —
|
||||
slug/name first, ref as anchor: "the spec `concepts/session-live-ingest`
|
||||
(wiki:2604)". In page bodies — wikilinks by slug (`[[concepts/foo]]`,
|
||||
decision 4) or per-type refs by full names (`[[task:N]]`/`[[inbox:N]]`).
|
||||
|
||||
---
|
||||
|
||||
## Цикл: три операции
|
||||
## The cycle: three operations
|
||||
|
||||
### Ingest — «заингесть X»
|
||||
|
||||
1. Прочитай источник полностью.
|
||||
2. Извлеки: entities, concepts, packages, кросс-резы.
|
||||
3. Создай `summaries/<slug>` — одну страницу-резюме на источник (~50–150 строк;
|
||||
ссылку на raw клади в frontmatter `raw_path` + `ingested:`).
|
||||
4. Для каждой затронутой страницы:
|
||||
- есть → обнови (`wiki_update(project, id, body, version)` — version свежая
|
||||
из `wiki_get`; 409 → re-GET → retry). **Противоречия помечай явно** блоком
|
||||
`> **Противоречие:** источник A говорит X, источник B — Y`.
|
||||
Не затирай молча.
|
||||
- нет → создай (`wiki_create`, карв-аут).
|
||||
5. Обнови `index` (каталог: одна строка на страницу) — опционально; каталог
|
||||
по умолчанию — `entity_search` (решение 1).
|
||||
6. Отчитайся пользователю: что создано, что обновлено, какие противоречия.
|
||||
Первый ingest новой вики: создай `AGENTS` (канон) + `CLAUDE` (указатель).
|
||||
1. Read the source completely.
|
||||
2. Extract: entities, concepts, packages, cross-results.
|
||||
3. Create `summaries/<slug>` — one summary page per source (~50–150 lines;
|
||||
put the raw link in frontmatter `raw_path` + `ingested:`).
|
||||
4. For every affected page:
|
||||
- exists → update (`wiki_update(project, id, body, version)` — version
|
||||
fresh from `wiki_get`; 409 → re-GET → retry). **Mark contradictions
|
||||
explicitly** with a `> **Contradiction:** source A says X, source B — Y`
|
||||
block. Don't overwrite silently.
|
||||
- missing → create (`wiki_create`, carve-out).
|
||||
5. Update `index` (catalog: one line per page) — optional; the default catalog
|
||||
is `entity_search` (decision 1).
|
||||
6. Report to the user: what was created, what updated, which contradictions.
|
||||
First ingest of a new wiki: create `AGENTS` (canon) + `CLAUDE` (pointer).
|
||||
|
||||
**Оп-лог — автоматический.** Каждая write-операция уже пишется сервисом в
|
||||
таблицу `logs` (component=тип сущности, message=slug+operation; смотреть —
|
||||
`mcp__mappa__admin_logs`). Ручную `log`-страницу НЕ веди — это дубль,
|
||||
аудит-след живёт в сервисе (решение 12, ратификация 2026-08-24).
|
||||
**Op-log — automatic.** Every write operation is already logged by the service
|
||||
into the `logs` table (component=entity type, message=slug+operation; to view —
|
||||
`mcp__mappa__admin_logs`). Don't maintain a manual `log` page — it's a
|
||||
duplicate, the audit trail lives in the service (decision 12, ratified
|
||||
2026-08-24).
|
||||
|
||||
**Один ingest может затронуть 10–15 страниц. Это нормально — для того LLM и нужны.**
|
||||
**One ingest can touch 10–15 pages. That's normal — that's what LLMs are for.**
|
||||
|
||||
Порядок записи: все wiki-мутации одним циклом; create — карв-аут, update — с
|
||||
version (свежей из `wiki_get`); 409 → re-GET → retry. Лиз/claim для записи НЕ
|
||||
нужен (wiki:2660).
|
||||
Write order: all wiki mutations in one cycle; create — carve-out, update — with
|
||||
version (fresh from `wiki_get`); 409 → re-GET → retry. No lease/claim needed
|
||||
for writing (wiki:2660).
|
||||
|
||||
### Query — вопрос по вики
|
||||
### Query — a question to the wiki
|
||||
|
||||
1. Читай `index` сначала, затем углубляйся в страницы (`wiki_get` по слагу).
|
||||
2. Отвечай с цитатами-викилинками: `[[concepts/foo]]` (рёбра создаются при
|
||||
записи, решение 4).
|
||||
3. **Компаундируй вики.** Если ответ — реальный синтез (сравнение, анализ,
|
||||
новая связь) — спроси пользователя: «Сохранить как страницу wiki?» Хорошие
|
||||
вопросы становятся страницами в `concepts/`.
|
||||
1. Read `index` first, then dig into pages (`wiki_get` by slug).
|
||||
2. Answer with quote-wikilinks: `[[concepts/foo]]` (edges are created on
|
||||
write, decision 4).
|
||||
3. **Compounding the wiki.** If the answer is a real synthesis (comparison,
|
||||
analysis, new link) — ask the user: "Save as a wiki page?" Good questions
|
||||
become pages in `concepts/`.
|
||||
|
||||
**Реляционные/структурные вопросы — не читай, а зови граф** (следующая секция):
|
||||
связи образуют граф, который LLM не обходит надёжно чтением.
|
||||
**Relational/structural questions — don't read, call the graph** (next
|
||||
section): links form a graph that an LLM doesn't traverse reliably by reading.
|
||||
|
||||
### Lint — «проверь вики»
|
||||
|
||||
Ищи:
|
||||
- **Противоречия** между страницами.
|
||||
- **Сирот** — страницы без входящих ссылок: `graph_backlinks(id)` (id из
|
||||
`wiki_get`) → нет входящих рёбер = сирота.
|
||||
- **Stale-claims** — `updated_at` страницы старше источника, который она резюмирует.
|
||||
- **Потерянные сущности** — понятия из текста без своей страницы
|
||||
(`entity_search` по имени → пусто).
|
||||
- **Пустые/TODO-секции.**
|
||||
Look for:
|
||||
- **Contradictions** between pages.
|
||||
- **Orphans** — pages without incoming links: `graph_backlinks(id)` (id from
|
||||
`wiki_get`) → no incoming edges = orphan.
|
||||
- **Stale-claims** — a page's `updated_at` older than the source it summarizes.
|
||||
- **Lost entities** — concepts from the text without their own page
|
||||
(`entity_search` by name → empty).
|
||||
- **Empty/TODO sections.**
|
||||
|
||||
Отчёт — панч-лист. Ничего не удаляй автоматически.
|
||||
Report — a punch list. Don't delete anything automatically.
|
||||
|
||||
---
|
||||
|
||||
## Граф-слой (реляционные/структурные вопросы)
|
||||
## Graph layer (relational/structural questions)
|
||||
|
||||
**Stop and call the graph.** На реляционный/структурный вопрос о вики или
|
||||
любых сущностях mappa (таски, письма, сессии) **не отвечай, прочитав одну
|
||||
страницу** — это 0%-recall провал, ради которого существует граф-слой.
|
||||
Сервис ходит по рёбрам детерминированно (BFS) и возвращает ответ в
|
||||
нескольких строках; контекст не засоряется.
|
||||
**Stop and call the graph.** On a relational/structural question about the wiki
|
||||
or any mappa entities (tasks, letters, sessions) **don't answer after reading
|
||||
one page** — that's the 0%-recall failure the graph layer exists for. The
|
||||
service walks the edges deterministically (BFS) and returns the answer in a few
|
||||
lines; context doesn't get polluted.
|
||||
|
||||
Формы вопроса → тул:
|
||||
Question form → tool:
|
||||
|
||||
| Вопрос | Тул |
|
||||
| Question | Tool |
|
||||
|---|---|
|
||||
| relational — «что связывает X и Y», «путь между», "what connects", "shortest path" | `graph_path({from, to})` |
|
||||
| neighbourhood — «соседи X», "neighbours of X" | `graph_neighbors({id})` |
|
||||
| incoming — «кто ссылается на X», «backlinks», "what links to X" | `graph_backlinks({id})` |
|
||||
| health — «сироты», «битые ссылки», «здоровье вики», "orphan pages" | `graph_stats()` + `graph_backlinks(id)` |
|
||||
|
||||
**Адресация: slug → internal id.** Резолвь `id` через `wiki_get`/`entity_search`
|
||||
(последнее поле ответа; `ref`/`num` — для показа). Ответы graph несут per-type
|
||||
refs полными именами (`task:N`/`inbox:N`/`wiki:N`, конвенция #1028) — реферируй
|
||||
по ним, не по id. Пустой `path` = связи реально нет — так и скажи; не выдумывай
|
||||
цепочку из текстовой близости.
|
||||
**Addressing: slug → internal id.** Resolve `id` via `wiki_get`/`entity_search`
|
||||
(the last response field; `ref`/`num` — for display). Graph responses carry
|
||||
per-type refs by full names (`task:N`/`inbox:N`/`wiki:N`, convention #1028) —
|
||||
reference them, not ids. An empty `path` = the link genuinely doesn't exist —
|
||||
say so; don't invent a chain from textual proximity.
|
||||
|
||||
**Precondition — граф реально связан.** Если сомневаешься — сначала
|
||||
`graph_stats()`: `edges` ≈ 0 ⇒ граф пуст, отвечай чтением. (Слаги без
|
||||
[[линков]] рёбер не создают; сироты — норма для разреженных вики.)
|
||||
**Precondition — the graph is actually connected.** If unsure — first
|
||||
`graph_stats()`: `edges` ≈ 0 ⇒ empty graph, answer by reading. (Slugs without
|
||||
[[links]] create no edges; orphans are normal for sparse wikis.)
|
||||
|
||||
---
|
||||
|
||||
## Форматы страниц (ОБЯЗАТЕЛЬНО)
|
||||
## Page formats (MANDATORY)
|
||||
|
||||
### Frontmatter
|
||||
|
||||
```yaml
|
||||
---
|
||||
title: Человекочитаемое имя
|
||||
title: Human-readable name
|
||||
type: entity | concept | package | summary | contradiction | open-question | overview
|
||||
tags: [short, tokens]
|
||||
sources: [concepts/mappa.md]
|
||||
@@ -195,74 +197,81 @@ updated: 2026-08-24
|
||||
---
|
||||
```
|
||||
|
||||
Страницы `summaries/` дополнительно несут `ingested: YYYY-MM-DD` и `raw_path: …`.
|
||||
`contradictions/` — `status: open | resolved | accepted-divergence` и `affects:`.
|
||||
`open-questions/` — `status: open | answered | obsolete` и `touches:`.
|
||||
`summaries/` pages additionally carry `ingested: YYYY-MM-DD` and `raw_path: …`.
|
||||
`contradictions/` — `status: open | resolved | accepted-divergence` and
|
||||
`affects:`. `open-questions/` — `status: open | answered | obsolete` and
|
||||
`touches:`.
|
||||
|
||||
### Слаги
|
||||
### Slugs
|
||||
|
||||
- `kebab-case`, **только латиница**. Кириллицу/др. скрипты транслитерируй
|
||||
(`план переписывания` → `ozon-client-rewrite`). Оригинальный title — в H1 и frontmatter.
|
||||
- `kebab-case`, **Latin only**. Transliterate Cyrillic/other scripts
|
||||
(«план переписывания» → `ozon-client-rewrite`). The original title — in H1
|
||||
and frontmatter.
|
||||
- `entities/<name>`, `concepts/<name>`, `packages/<name>`, `summaries/<slug>`,
|
||||
`contradictions/<slug>`, `open-questions/<slug>`.
|
||||
|
||||
### Оп-лог — таблица `logs`, не страница
|
||||
### Op-log — the `logs` table, not a page
|
||||
|
||||
File-based `log.md` мёртв (решение 12/15, ратификация 2026-08-24). Сервис пишет
|
||||
оп-лог сам при каждой write-операции: `mcp__mappa__admin_logs` (фильтры
|
||||
level/since/component/entity, retention 14d). Ручную `log`-страницу не заводи,
|
||||
не дописывай, не парси.
|
||||
File-based `log.md` is dead (decision 12/15, ratified 2026-08-24). The service
|
||||
writes the op-log itself on every write operation: `mcp__mappa__admin_logs`
|
||||
(filters level/since/component/entity, retention 14d). Don't create, append,
|
||||
or parse a manual `log` page.
|
||||
|
||||
### `index` — каталог через поиск
|
||||
### `index` — catalog via search
|
||||
|
||||
Каталог = `entity_search(q, type='wiki', project)` (решение 1). `index`-страница
|
||||
— опциональная опора для ориентации: одна строка на страницу
|
||||
`- [Title](concepts/foo.md) — hook.`, секции по типам. Обновляй только если
|
||||
страница уже существует; не плоди каталог-дубли.
|
||||
Catalog = `entity_search(q, type='wiki', project)` (decision 1). The `index`
|
||||
page — optional orientation aid: one line per page
|
||||
`- [Title](concepts/foo.md) — hook.`, sections by type. Update only if the
|
||||
page already exists; don't proliferate catalog duplicates.
|
||||
|
||||
## Quick reference
|
||||
|
||||
| Ситуация | Что трогаем |
|
||||
| Situation | What we touch |
|
||||
|---|---|
|
||||
| Ingest одного документа | `summaries/<slug>` (новая) + 3–15 entities/concepts/packages (+ опционально `index`) |
|
||||
| Query | (чтение) + возможно новая страница |
|
||||
| Query реляционный | graph_* (BFS), не чтение |
|
||||
| Lint | (чтение) + graph_backlinks/stats для сирот |
|
||||
| Новая вики проекта | первый ingest создаёт `AGENTS` + `CLAUDE`-указатель; оп-лог — автоматический |
|
||||
| Ingest one document | `summaries/<slug>` (new) + 3–15 entities/concepts/packages (+ optional `index`) |
|
||||
| Query | (read) + possibly a new page |
|
||||
| Query relational | graph_* (BFS), not reading |
|
||||
| Lint | (read) + graph_backlinks/stats for orphans |
|
||||
| New project wiki | the first ingest creates `AGENTS` + `CLAUDE` pointer; op-log — automatic |
|
||||
|
||||
## Частые ошибки
|
||||
## Common mistakes
|
||||
|
||||
- **Правка `summaries/`.** Нельзя. Только статус-блок по явной просьбе.
|
||||
- **Дамп сырья в `summaries/`.** Резюме — это резюме. Ссылайся на raw, не копируй.
|
||||
- **Молчаливые перезаписи.** Новый источник противоречит странице — пометь
|
||||
блоком `> **Противоречие:**`; не затирай.
|
||||
- **Нарративный оп-лог.** Не веди его руками: сервис пишет logs сам (admin.logs).
|
||||
- **Не-ASCII слаги.** Ломают grep и кросс-платформенность. Транслитерируй.
|
||||
- **Пропущенные противоречия в lint.** Ценность вики — во вскрытых напряжениях,
|
||||
а не в ложном консенсусе.
|
||||
- **Запись без version (update).** `wiki_update` без свежей version →
|
||||
last-write-wins, риск затирания чужого; бери version из `wiki_get`, 409 → retry.
|
||||
- **Держать claim на чтение/раздумья.** Claim — на время работы; чтение — карв-аут.
|
||||
- **Реляционный вопрос чтением одной страницы.** Это тот самый 0%-recall
|
||||
провал — зови graph_*.
|
||||
- **Слаги/пути в graph-тулы.** Только internal id, и только свежие (удалённая
|
||||
сущность → ошибка).
|
||||
- **Тащить всю вики в контекст**, чтобы «проследить» связи руками — сервис
|
||||
делает это за ноль токенов.
|
||||
- **Editing `summaries/`.** Not allowed. Only a status block on an explicit request.
|
||||
- **Dumping raw content into `summaries/`.** A summary is a summary. Reference
|
||||
the raw, don't copy it.
|
||||
- **Silent overwrites.** A new source contradicts a page — mark with a
|
||||
`> **Contradiction:**` block; don't wipe it.
|
||||
- **Narrative op-log.** Don't maintain it by hand: the service writes logs
|
||||
itself (admin.logs).
|
||||
- **Non-ASCII slugs.** Break grep and cross-platform compatibility. Transliterate.
|
||||
- **Missed contradictions in lint.** The wiki's value is in exposed tensions,
|
||||
not in false consensus.
|
||||
- **Writing without version (update).** `wiki_update` without a fresh version →
|
||||
last-write-wins, risk of wiping someone else's work; take the version from
|
||||
`wiki_get`, 409 → retry.
|
||||
- **Holding a claim for reading/thinking.** A claim is for the duration of
|
||||
work; reading — carve-out.
|
||||
- **Answering a relational question by reading one page.** That's the exact
|
||||
0%-recall failure — call graph_*.
|
||||
- **Slugs/paths into graph tools.** Only internal ids, and only fresh ones (a
|
||||
deleted entity → error).
|
||||
- **Dragging the whole wiki into context** to "trace" links by hand — the
|
||||
service does it for zero tokens.
|
||||
|
||||
## Red flags
|
||||
|
||||
- Реляционный вопрос → читаешь страницу вместо `graph_*`.
|
||||
- Правка `summaries/` или молчаливая перезапись противоречия.
|
||||
- Wiki-мутация update без version (last-write-wins) или create с выдуманным claim.
|
||||
- Нарративный оп-лог руками.
|
||||
- Relational question → reading a page instead of `graph_*`.
|
||||
- Editing `summaries/` or silently overwriting a contradiction.
|
||||
- Wiki update mutation without version (last-write-wins) or create with an
|
||||
invented claim.
|
||||
- Narrative op-log by hand.
|
||||
|
||||
---
|
||||
|
||||
## Reference
|
||||
|
||||
- Поиск по сущностям: `mcp__mappa__entity_search` (FTS, решение 1).
|
||||
- Оп-лог: `mcp__mappa__admin_logs` (автоматический, решение 12).
|
||||
- Дерево/зонтики: `mcp__mappa__graph_tree(root, depth?, fields?, limit?)`.
|
||||
- Задачи: `mappa-task-work`. Почта: `mappa-messaging`. Делегирование: `mappa-delegation`.
|
||||
- Related: `using-projects-meta` (мост до флипа), `project-discipline`.
|
||||
- Entity search: `mcp__mappa__entity_search` (FTS, decision 1).
|
||||
- Op-log: `mcp__mappa__admin_logs` (automatic, decision 12).
|
||||
- Tree/umbrellas: `mcp__mappa__graph_tree(root, depth?, fields?, limit?)`.
|
||||
- Tasks: `mappa-task-work`. Mail: `mappa-messaging`. Delegation: `mappa-delegation`.
|
||||
- Related: `using-projects-meta` (bridge until the flip), `project-discipline`.
|
||||
|
||||
Reference in New Issue
Block a user