docs(skills): mappa-closing-ritual 1.2.0→1.3.0 — English translation, bilingual triggers (task:1086)

This commit is contained in:
2026-08-25 17:42:34 +03:00
parent 271fcfae93
commit e91eb701aa

View File

@@ -1,148 +1,152 @@
--- ---
name: mappa-closing-ritual name: mappa-closing-ritual
author: ours author: ours
version: 1.2.0 version: 1.3.0
description: > description: >
Финиш-фаза форкфлоу: handoff write (mcp__mappa__handoff_write, версия h:N) Finish phase of the forkflow: handoff write (mcp__mappa__handoff_write,
+ PROPOSE wiki-ingest + PROPOSE закрытий тасок. Мутации — только после version h:N) + PROPOSE wiki-ingest + PROPOSE task closes. Mutations — only
подтверждения пользователя. Ad-hoc: mode=light — явный вопрос «Сделать after user confirmation. Ad-hoc: mode=light — an explicit question "Write
handoff?» в конце сессии (НЕ автоматический sweep), решение за человеком. handoff?" at the end of the session (NOT an automatic sweep), the decision
Старое имя — триггер-синоним: session-handoff (write-часть). Чтение на is the human's. Old name — trigger-synonym: session-handoff (write part).
старте — mappa-session-orient. Триггеры: «завершаем сессию», «сворачиваемся», Reading at start — mappa-session-orient. Triggers (bilingual): «завершаем
«закругляемся», «wrap up session», «end session», «we're done for now». сессию», «сворачиваемся», «закругляемся», "wrap up session", "end session",
Анти-триггеры (task-зона, не session-end): «закрываем эту таску», «pause», "we're done for now". Anti-triggers (task-zone, not session-end):
«отбой», «разбегаемся». «закрываем эту таску», «pause», «отбой», «разбегаемся».
--- ---
# mappa-closing-ritual # mappa-closing-ritual
Финиш-фаза цикла агента: **записать handoff → предложить wiki-ingest → Finish phase of the agent cycle: **write handoff → propose wiki-ingest →
предложить закрытия тасок**. Старт ≠ финиш: чтение handoff на старте propose task closes**. Start ≠ finish: reading the handoff at start
`mappa-session-orient`; здесь — write-путь с процедурой и подтверждением. `mappa-session-orient`; here — the write path with procedure and confirmation.
Канал — **handoff-сущность Mappa** (`mcp__mappa__handoff_write`, тип `h:`, Channel — the **Mappa handoff entity** (`mcp__mappa__handoff_write`, type
per-project): поля `session_id`/`date`/`status`/`summary`/`open_treks[]`/ `h:`, per-project): fields `session_id`/`date`/`status`/`summary`/
`ask_user[]`/`guards[]`/`recent_commits[]`. Каждый write = **новая версия** `open_treks[]`/`ask_user[]`/`guards[]`/`recent_commits[]`. Each write = a **new
(append-only, versioned-история). Файлового `.tasks/NEXT_SESSION.md` больше нет. version** (append-only, versioned history). The file-based
`.tasks/NEXT_SESSION.md` no longer exists.
## Когда использовать ## When to use
- Session-end фразы: «завершаем сессию», «сворачиваемся», «закругляемся», - Session-end phrases: «завершаем сессию», «сворачиваемся», «закругляемся»,
«wrap up session», «end session», «we're done for now». "wrap up session", "end session", "we're done for now".
- Ad-hoc-сессия без трека/таски в конце: **mode=light**явный вопрос - Ad-hoc session without a track/task at the end: **mode=light**an explicit
«Сделать handoff?» (не автоматический sweep), решение за человеком. question "Write handoff?" (not an automatic sweep), the human decides.
- AGENTS.md проекта содержит trigger-строку `session handoff: read on start, write on end`. - The project's AGENTS.md contains the trigger line
`session handoff: read on start, write on end`.
**Skip (task-зона, не session-end):** «закрываем эту таску» (task close → **Skip (task-zone, not session-end):** «закрываем эту таску» (task close →
`mappa-task-work`), «pause», «приостанови» (task-pause), «отбой», «разбегаемся» `mappa-task-work`), «pause», «приостанови» (task-pause), «отбой», «разбегаемся»
(слишком broad), «сейчас завершу одну задачу и тогда поговорим» (частичное (too broad), "let me finish one task first, then we'll talk" (partial finish).
завершение). При неоднозначности — **ASK**: «закрываем сессию или таску?» On ambiguity — **ASK**: "are we closing the session or a task?"
## Steps ## Steps
### 1. Scope check ### 1. Scope check
Это текущий проект (cwd). Никаких global мутаций, никаких других проектов. This is the current project (cwd). No global mutations, no other projects.
### 2. Mid-task capture ### 2. Mid-task capture
Если есть 🔴 active таска проекта (борд mappa / `.tasks/`) — захватить в summary: If there is a 🔴 active task of the project (mappa board / `.tasks/`) — capture
into summary:
``` ```
left mid-task: <slug> left mid-task: <slug>
where_stopped: <одна строка> where_stopped: <one line>
``` ```
Без борда — писать handoff без mid-task секции, не блокировать. No board — write the handoff without the mid-task section, don't block.
### 3. Compose content (поля handoff) ### 3. Compose content (handoff fields)
- `session_id``<ISO дата>` или идентификатор сессии; - `session_id``<ISO date>` or session identifier;
- `status``active` (работа продолжается) / `paused` (заморожено) / `done` (завершено); - `status``active` (work continues) / `paused` (frozen) / `done` (finished);
- `summary`связка: где остановились, mid-task, ключевые решения; - `summary`the link: where we stopped, mid-task, key decisions;
- `open_treks`массив открытых треков (готовность + entry-point); - `open_treks`array of open tracks (readiness + entry-point);
- `ask_user` — pending решения / ожидаемые разрешения; - `ask_user` — pending decisions / expected resolutions;
- `guards`«не делать» (preemptive guards); - `guards`"don't do" (preemptive guards);
- `recent_commits` — 35 последних коммитов (`<slug>: <subject>`). - `recent_commits` — 35 latest commits (`<slug>: <subject>`).
Forward-looking, не timeline: handoff = связка новых вещей конкретно для Forward-looking, not a timeline: handoff = a link of new things specifically
следующего разворота, не overview всего проекта. Борд mappa / вики остаются for the next turn, not an overview of the whole project. The mappa board / wiki
авторитетными для своего scope'ане дублировать их в handoff. remain authoritative for their own scope — don't duplicate them in the handoff.
### 4. Append ### 4. Append
`mcp__mappa__handoff_write(project=<имя>, session_id, status, summary, open_treks?, ask_user?, guards?, recent_commits?)`сервис создаёт новую версию `h:N` (предыдущие остаются; чтение последней — `entity_search(type='handoff', project, limit=1)`). Поля-массивы передавать как `[]`, если пусто (следующий агент видит: пусто, не забыто). Пишется без лиза (как инбокс). `mcp__mappa__handoff_write(project=<name>, session_id, status, summary, open_treks?, ask_user?, guards?, recent_commits?)`the service creates a new `h:N` version (previous ones remain; reading the latest — `entity_search(type='handoff', project, limit=1)`). Pass array fields as `[]` when empty (the next agent sees: empty, not forgotten). Written without a lease (like inbox).
> **Confirm gate:** handoff write — мутация. В mode=light (ad-hoc) и при > **Confirm gate:** handoff write is a mutation. In mode=light (ad-hoc) and on
> неоднозначности — сначала явный вопрос «Сделать handoff?», только после «да» > ambiguity — first an explicit question "Write handoff?", only after "yes"
> write. > write.
### 5. Propose wiki-ingest (не писать!) ### 5. Propose wiki-ingest (don't write!)
Если за сессию появилось durable-знание — **ПРЕДЛОЖИТЬ** ingest If durable knowledge appeared during the session — **PROPOSE** the ingest
(`mappa-knowledge`: mappa wiki create — карв-аут, update — version+409, wiki:2660), перечислив кандидатов. (`mappa-knowledge`: mappa wiki create — carve-out, update — version+409,
Ничего не писать без подтверждения. wiki:2660), listing the candidates. Don't write anything without confirmation.
### 6. Propose task-board closes (не закрывать!) ### 6. Propose task-board closes (don't close!)
Если есть задачи, выглядящие закрытыми — **ПРЕДЛОЖИТЬ** закрытия If there are tasks that look closed — **PROPOSE** the closes
(`mappa-task-work`: task_close с version+409, wiki:2660). Уважать ralph-loop: verifier-задачи (`mappa-task-work`: task_close with version+409, wiki:2660). Respect ralph-loop:
закрывать только через verifier (attempt/harness-record). verifier tasks close only via the verifier (attempt/harness-record).
### 7. Формат предложения — один блок ### 7. Proposal format — one block
``` ```
Ритуал закрытия: Closing ritual:
(а) заингестить X в вики? (a) ingest X into the wiki?
(б) закрыть Y? (b) close Y?
(в) ничего. (c) nothing.
``` ```
Ждать ответа. Отказ = пропуск (не настаивать, не повторять в этой сессии). Wait for the answer. Refusal = skip (don't insist, don't repeat in this session).
--- ---
## mode=light (ad-hoc-сессии) ## mode=light (ad-hoc sessions)
Ad-hoc-сессия (без таски/трека, но могут рождаться артефакты): след в mappa Ad-hoc session (no task/track, but artifacts may be born): the trace in mappa
пишется всегда (контракт сервиса — session live-ingest), но **структурирование — is always written (service contract — session live-ingest), but
по явному вопросу**: в конце сессии спроси «Сделать handoff?» (решение за **structuring happens only on an explicit question**: at the end of the
человеком). НЕ автоматический sweep: без «да» — ничего не писать, след session ask "Write handoff?" (the human decides). NOT an automatic sweep:
остаётся в mappa как есть. without "yes" — write nothing, the trace stays in mappa as is.
## Failure modes ## Failure modes
- **Secret detected.** Контент матчит паттерны секретов (`AKIA...`, `sk-...`, - **Secret detected.** Content matches secret patterns (`AKIA...`, `sk-...`,
`ghp_...`, `ssh-rsa`, `BEGIN PRIVATE KEY`, `password=`/`token=`) → **abort `ghp_...`, `ssh-rsa`, `BEGIN PRIVATE KEY`, `password=`/`token=`) → **abort
write**. Сообщить user'у с указанием подозрительной строки. write**. Tell the user with the suspicious line indicated.
- **Неоднозначная фраза** → ASK «закрываем сессию или таску?», не угадывать. - **Ambiguous phrase** → ASK "are we closing the session or a task?", don't guess.
- **Mid-task без борда** → handoff без mid-task секции, не блокировать. - **Mid-task without a board** → handoff without the mid-task section, don't block.
- **User отказал на предложения ритуала** → пропустить, не настаивать. - **User refused the ritual proposals** → skip, don't insist.
- **Проект не в mappa** → silent exit (первая сессия). - **Project not in mappa** → silent exit (first session).
## Side effects ## Side effects
- Пишет handoff-сущность проекта (append-only, versioned-история). Никаких - Writes the project's handoff entity (append-only, versioned history). No
файлов, никаких git-коммитов за handoff. files, no git commits for the handoff.
- Ритуал **предлагает** wiki-ingest и закрытия тасок — но НЕ пишет их без «да». - The ritual **proposes** wiki-ingest and task closes — but does NOT write
- Никаких global мутаций, никаких других проектов. them without "yes".
- No global mutations, no other projects.
## What NOT to do ## What NOT to do
- **Не auto-execute** — каждая мутация (handoff write / wiki-ingest / task - **No auto-execute** — every mutation (handoff write / wiki-ingest / task
close) только после явного «да» пользователя. close) only after an explicit "yes" from the user.
- **Не гонять ритуал на substantive commit.** Только session-end фраза (или - **Don't run the ritual on a substantive commit.** Only a session-end phrase
явный запрос user'а). (or an explicit user request).
- **Не sweep автоматически в ad-hoc** — mode=light: явный вопрос «Сделать - **Don't sweep automatically in ad-hoc** — mode=light: an explicit question
handoff?», решение за человеком. "Write handoff?", the human decides.
- **Не писать секреты** в handoff. Матч secret-patterns → abort. - **Don't write secrets** into the handoff. Secret-pattern match → abort.
- **Не писать handoff на каждый commit** — только финиш. - **Don't write a handoff on every commit** — only at the finish.
- **Не дублировать борд / вики** — handoff = forward-looking связка. - **Don't duplicate the board / wiki** — handoff = forward-looking link.
- **Не cross-project** — per-project scope. - **No cross-project** — per-project scope.
- **Не считать handoff авторитетным** на стороне читателя — это рекомендация - **Don't treat the handoff as authoritative** on the reader's side — it's the
прошлой сессии, не директива; user может override. previous session's recommendation, not a directive; the user can override.
## Reference ## Reference
- Чтение handoff на старте: `mappa-session-orient`. - Reading the handoff at start: `mappa-session-orient`.
- Закрытия тасок: `mappa-task-work` (pre-close coverage, notify-письмо). - Task closes: `mappa-task-work` (pre-close coverage, notify letter).
- Wiki-ingest: `mappa-knowledge`. - Wiki-ingest: `mappa-knowledge`.
- Письма: `mappa-messaging`. Делегирование: `mappa-delegation`. - Letters: `mappa-messaging`. Delegation: `mappa-delegation`.
- Session live-ingest (след в mappa пишется всегда): `concepts/session-live-ingest` (wiki:2604). - Session live-ingest (the trace in mappa is always written): `concepts/session-live-ingest` (wiki:2604).