Compare commits

...

2 Commits

Author SHA1 Message Date
c6dfa9349d feat(skill): mappa-presentation v1.1.0 — серверные display/card verbatim (UTC+Z), fallback до деплоя
- серверные display/card (task:1176/1177, репо 0bf09c6): копировать verbatim, row → display / карточка → card
- даты в серверных полях — UTC+Z (row YYYY-MM-DD / card YYYY-MM-DDTHH:MMZ), без конвертации
- шаблоны — fallback-канон до деплоя v0.20.0 (проверять /health)
- принцип 5 (даты) переписан: серверные поля verbatim / fallback — локальное время
2026-08-25 23:34:14 +03:00
3ea7e53f99 feat(skill): mappa-brainstorm-promote v1.9.0 — два пути (promote/close), forward-ref [[brainstorm:N]], критерий завершения
- task_create из буфера несёт [[brainstorm:N]] (ребро на write, same-project)
- close-путь (step 5b): уже-завершённый буфер → проверка тасок + финальный entry + status=archive
- финальный entry со списком [[task:N]] (step 8b)
- критерий: буфер done ⇔ все action-items поставлены ∧ все таски done (вкл. review-зонт) — wiki:3188 .workshop
- триггеры: «закрой буфер», «архивируй буфер», close the buffer
2026-08-25 23:34:14 +03:00
2 changed files with 100 additions and 28 deletions

View File

@@ -1,17 +1,20 @@
---
name: mappa-brainstorm-promote
author: ours
version: 1.8.0
version: 1.9.0
description: >
Finalize a matured brainstorm buffer (mappa entity type=brainstorm,
status=buffer): read buffer → choose target project → promote via
mcp__mappa__brainstorm_promote (atomic buffer → wiki-page in target +
archive, decision 7) → extract action-items into target tasks
(mcp__mappa__task_create, carve-out) → review umbrella → covering letter.
A general mappa mechanism, like task.create/wiki.create — no workshop
specifics. Old name — trigger-synonym: workshop-promote-brainstorm.
Triggers (bilingual): «промоутни брейнсторм», «выкати в вики»,
"promote the brainstorm", "finalize <topic>", "publish to wiki".
Finalize a brainstorm buffer (mappa type=brainstorm, status=buffer): two
paths. (1) Promote a matured buffer — read → target → brainstorm_promote
(atomic buffer → wiki-page + archive, decision 7) → action-items as tasks
(task_create, bodies carry [[brainstorm:N]]) → review umbrella → covering
letter → final entry. (2) Close an already-completed buffer (work done, no
wiki needed) — verify linked tasks done → final entry + status=archive.
Buffer done ⇔ all action-items created AND all tasks done (incl.
review-umbrella) — wiki concepts/buffer-completion-criteria. General mappa
mechanism. Old name — trigger-synonym: workshop-promote-brainstorm.
Triggers (bilingual): «промоутни брейнсторм», «выкати в вики», "promote
the brainstorm", "finalize <topic>", "publish to wiki"; «закрой буфер»,
«архивируй буфер», "close the buffer", "archive the buffer".
---
# mappa-brainstorm-promote
@@ -28,6 +31,20 @@ a loop: it's launched explicitly on the final buffer and takes it to the end.
In the forkflow it sits between work (`mappa-task-work`) and finish
(`mappa-closing-ritual`).
**Completion criteria** (wiki `concepts/buffer-completion-criteria`, .workshop):
a buffer is done ⇔ (all action-items are created as tasks) ∧ (all created
tasks are done, including the review-umbrella). Two entry paths to `archive`:
- **Promote** (steps 59): a maturing buffer whose content must land in a
wiki — `brainstorm_promote` (wiki page + archive atomically).
- **Close** (step 5b): an already-completed buffer — work done long ago
(tasks done / resolved / legacy-promoted in the file era), no wiki page
needed. Verify the chain — in the graph for same-project links, via
direct `task_get` for cross-project tasks — write the final entry,
`brainstorm_update(status='archive')`. This is how done-but-not-closed
buffers are swept (case: entity-uuid brainstorm:109, tasks 1067/1068/1093
done, buffer still `buffer` with zero edges — audit 2026-08-25).
**Content promotion — always via `mcp__mappa__brainstorm_promote`:**
atomically creates a wiki page (slug from the buffer, body preserved) in the
project from the call and moves the buffer to `archive` (number/slug stable,
@@ -59,6 +76,9 @@ brainstorm entity in mappa (type=brainstorm, status=buffer)
ask: target project (where to promote)
├── close (no promotion): work already done, no wiki page needed
│ → step 5b (graph check + final entry + status=archive)
├── ordinary project → brainstorm_promote(project=<target>)
│ → wiki page (spec) in the target wiki
@@ -138,6 +158,29 @@ brainstorm entity in mappa (type=brainstorm, status=buffer)
- If `brainstorm_promote` failed (version conflict, 409) → retry with the
fresh internal id; on a stable failure — abort before creating tasks.
5b. **Closing an already-completed buffer (no promotion).** When the work is
already done and no wiki page is needed (legacy-promoted, resolved by the
human, tasks all done, or the decision was reversed):
- Verify the chain: `mcp__mappa__graph_neighbors`/`graph_backlinks` on
the buffer for same-project links (edges resolve in the owner's project
scope, finding #1014); for cross-project tasks (workshop → target, the
normal case) resolve the refs from the body/final entry via direct
`mcp__mappa__task_get(task:N)` — every linked task must be status=done
(or the buffer is closed by content: «решено»/«отменено»).
If tasks are done but nothing is written — the chain was never recorded;
the final entry below fixes it (backward text refs).
- Append the final entry to the body via `mcp__mappa__brainstorm_update`
(body, expected version; 409 → re-GET → retry):
«Закрытие (дата) — цепочка завершена: [[task:N]]… done / решено /
промоутнуто (легаси). Критерий: [[concepts/buffer-completion-criteria]]».
The `[[task:N]]` and `[[wiki:…]]` links create the closing edges on
write (decision 4).
- Set `status='archive'` in the same `brainstorm_update`. Buffer archived
without a wiki page — the knowledge is already where it belongs or is
historical (review reports, legacy plans).
- Report: `brainstorm:N` → archive, with the reason.
6. **Action-items parsing:** regex over lines like `- [ ] ...` in the buffer
body, sections after `## Следующие шаги`/`## TODO`/`## Next steps`/
`## Action items`. Show the list, allow editing/removing/adding. If 0
@@ -151,7 +194,11 @@ brainstorm entity in mappa (type=brainstorm, status=buffer)
- **Ordinary target:** for each action-item —
`mcp__mappa__task_create(project=<target>, slug=<kebab>, title, description,
status='ready')`. Create — carve-out, no lease needed (wiki:2660/#1054).
The impl task description references the spec (wiki:NNNN from step 5).
The impl task description references the spec (wiki:NNNN from step 5) and
MUST start with the buffer wikilink `[[brainstorm:N]]` — a ref edge is
created on write (decision 4) when the buffer is in the same project as
the task; cross-project it stays a searchable text ref
(`entity_search "brainstorm:N"` finds the task).
- **Skill:** three baseline tasks in `project='skills'`:
- `[<name>-install]` — run `install.sh` in `~/projects/skills/`,
verify activation in a new session.
@@ -181,6 +228,15 @@ brainstorm entity in mappa (type=brainstorm, status=buffer)
- If the review task failed — report, **continue** to step 9 (the promotion
is already done, the buffer is in archive).
8b. **Final entry in the buffer (closing the chain).** After tasks are
created, append to the buffer body via `mcp__mappa__brainstorm_update`
(body + expected version; 409 → re-GET → retry): «Промоут → wiki:NNNN ·
таски [[task:N]]… · review-зонт [[task:M]]». This writes the backward
refs — the completion record per `concepts/buffer-completion-criteria`
(cross-project: text refs, verified by `task_get`; same-project: edges).
If the body PATCH on an archived entity is rejected — report to the user
(the chain stays visible through the tasks' [[brainstorm:N]] forward refs).
9. **Covering letter to the target's inbox (mappa-delegation canon).** A task
on the board doesn't ping a live session, a letter = ping + context:
@@ -205,6 +261,11 @@ brainstorm entity in mappa (type=brainstorm, status=buffer)
buffer stays in buffer — retried later.
- Buffer already `archive` (repeated call) → abort: promotion is one-shot,
idempotence via status (decision 7).
- Closing (step 5b): buffer still has open linked tasks → abort, don't close;
report which tasks are open. Buffer is a living storm → abort (close only
completed or reversed buffers).
- Closing: `brainstorm_update` 409 (version) → re-GET → retry; repeated
failure → report, buffer stays in `buffer`.
- `task_create` failed on the N-th content task → continue the rest, report
partial. The promotion is already done — the buffer is not rolled back.
- `task_create` review-umbrella failed → don't block, report to the user
@@ -224,6 +285,8 @@ brainstorm entity in mappa (type=brainstorm, status=buffer)
- **Always:** `brainstorm_promote` — atomically wiki page in the target +
buffer → `archive` + parent_of edges (wiki→buffer, refs→buffer) +
`brainstorm.promoted` event.
- **Closing (5b):** `brainstorm_update` — final entry with `[[task:N]]`/
`[[wiki:…]]` refs + status → `archive`; closing edges on write.
- **Ordinary target:** spec page in the target project's wiki (with
frontmatter-summary, wiki:2661) + impl tasks + review-umbrella + covering letter.
- **Skill:** skeleton `~/projects/skills/skills/<name>/SKILL.md` (only header +
@@ -244,6 +307,10 @@ brainstorm entity in mappa (type=brainstorm, status=buffer)
- Don't `git mv` the buffer into the archive — the promotion archives it itself.
- Don't delete the buffer instead of promoting — the graph history is lost
(parent_of, refs).
- Don't close a living buffer (5b) — closing is only for completed/reversed
work; verify linked tasks via the graph first.
- Don't close without the final entry — the backward refs are the chain.
- Don't invent wiki pages when closing (5b) — closing ≠ promotion.
- Don't batch `task_create` (race; incident 2026-08-24: 6/7 failed) — only
sequentially.
- Don't forget the covering letter — a task on the board doesn't ping a live session.

View File

@@ -1,20 +1,21 @@
---
name: mappa-presentation
author: ours
version: 1.0.0
version: 1.1.0
description: >
The single standard for showing Mappa entities to the human — the answer
format an agent renders for the eyes: list rows (board/inbox/search) and
full cards (one entity). Two modes, fixed field order, dates shown in the
session's local time (converted from mappa UTC), never raw JSON. Mandatory
full cards (one entity). Two modes, fixed field order; server display/card
fields copied verbatim (row → display, card → card, dates UTC+Z);
fallback templates render local time; never raw JSON. Mandatory
for ANY display of mappa entities
(task/inbox/wiki/brainstorm/session/handoff/repo/commit/operator/project) —
«покажи таски», «что на досках», «письма», «какой статус», «дай
подробнее», any answer carrying entities. Old name — trigger-synonym:
mappa-display. Complements (does not replace) convention #1028 (ref
format), task status emoji (mappa-task-work), search cards (wiki:2661);
server-side display/card fields (when they arrive) are copied verbatim —
the templates here are the canon fallback.
server-side display/card fields (task:1176/1177) copied verbatim —
the templates here are the canon fallback until the deploy (v0.20.0).
---
# mappa-presentation
@@ -37,23 +38,27 @@ about presentation.
3. **The card carries ALL fields** of the template. Do not trim "to avoid
clutter": the human re-asks precisely because a field was dropped.
4. **Field order is fixed** (per template), do not rearrange.
5. **Dates — stored UTC, shown local and human.** Mappa stores and returns
UTC (canonical machine truth — the server never converts). The agent renders
in the session's local timezone (the operator's machine):
row `YYYY-MM-DD`, card `YYYY-MM-DD HH:MM` — no seconds, no milliseconds,
no `T`/`Z`. Zone marker (e.g. `(+03:00)`) — optional, at most once per
card; omit in a single-machine setup. If the local timezone is unknown to
the agent — show UTC with an explicit `Z`. Never invent a zone.
5. **Dates — server fields: UTC+Z verbatim; fallback: local and human.**
Mappa stores and returns UTC (canonical machine truth — the server never
converts). If the entity carries server `display`/`card` — copy the date
verbatim as rendered (UTC + `Z`: row `YYYY-MM-DD`, card `YYYY-MM-DDTHH:MMZ`),
no conversion. Fallback (agent-rendered): show local (operator's machine):
row `YYYY-MM-DD`, card `YYYY-MM-DD HH:MM` — no seconds, no `T`/`Z`; if the
local timezone is unknown to the agent — show UTC with an explicit `Z`.
Never invent a zone.
6. **Refs always full-name** (`task:N`, `inbox:N`, `wiki:N`, … — convention
#1028), never `#<internal id>`, never short aliases.
## Server-side display/card fields (priority)
When mappa starts returning ready-made `display` (row) and `card` (markdown
block) fields on entities — **copy them verbatim** in the matching mode
(row/card). The templates below are the canon fallback and for composing
lists until server fields exist. If a server field exists but looks broken —
render per template and mention the discrepancy.
Серверные `display` (row) и `card` (markdown) поля реализованы (task:1176/1177,
репо 0bf09c6; каналы: /entities/:id, /wiki/:project/:slug, /wiki/:slug,
/search/full, /task/:id, /task/list) — **копировать verbatim** в
соответствующем режиме (row → display, карточка → card). Даты в серверных
полях — UTC с суффиксом Z (row YYYY-MM-DD / card YYYY-MM-DDTHH:MMZ), не
конвертировать. Шаблоны ниже — fallback-канон ДО деплоя (деплой: v0.20.0,
проверять /health) и для составления списков. Если серверное поле есть, но
выглядит битым — рендерить по шаблону и упомянуть расхождение.
---