# ALPHA50.9.14_CHANGESET

## DigiDala — Living Chat Mandala vertical slice

**Release:** `v0.4.0-alpha.50.9.14`  
**Status:** local development complete; staging QA pending  
**Production:** untouched by this release

### Scope

This release introduces the first backend/bot vertical slice of **Living Chat Mandala** (`Живая чат-мандала`) for Telegram groups.

The group does not create a new picture from scratch. It jointly **colors a prepared SVG template**. The template determines the fixed visual structure; the group conversation determines the evolving color character and intensity.

Mini App functionality and existing Mandala mechanics are not changed by this feature slice.

### Implemented

- Six controlled SVG Chat Mandala templates with metadata and attribution:
  - `small_01_core_plain`
  - `small_02_core_accents`
  - `medium_01_flower_circle`
  - `medium_02_layered_flower`
  - `large_01_geometric_lace`
  - `large_02_geometric_lace_dense`
- Logical SVG game units with template metadata.
- Chat Mandala parser for:
  - Unicode letters;
  - selected punctuation;
  - emoji;
  - script statistics;
  - URL exclusion;
  - normalization and case normalization.
- Profiling thresholds:
  - 2,000 qualifying text symbols;
  - at least 12 unique text symbols.
- Deterministic profile class selection and channel assignment.
- Deterministic palette generation.
- Initial structure-progress calculation.
- Energy calculation from activity/diversity/emoji/punctuation signals.
- SVG state rendering without a pixel/cell grid.
- SQLite migration `020_chat_mandala.sql`.
- One active Chat Mandala per Telegram group, enforced by database constraint and transactional creation.
- Participant counting using a per-game salted hash of the Telegram user ID.
- Internal API rejection of raw message text.
- Group bot menu and commands for the Chat Mandala mode.
- Administrator-only start/template selection.
- Idempotent start behavior when a group already has an active game.
- `/status` rendering and delivery of the current SVG state.
- RU/EN public copy and privacy explanation.
- Open-source reference to `packages/chat-mandala/` in the group-facing explanation.

### Privacy contract

Original message text is used only as an in-memory input to the parser. Persistent Chat Mandala state stores aggregate statistics rather than message text.

The internal processing API rejects payloads containing raw message text. Application logs must not contain message contents.

No third-party AI/LLM or external semantic-analysis service is used by this implementation slice.

### Verification

Local technical verification passed:

- Structure check: OK
- JavaScript syntax check: OK
- Unit tests: **65/65**
- Integration tests: **61/61**
- API tests: **23/23**
- Total: **149/149**

Migration `020_chat_mandala.sql` is exercised by the integration test database setup.

### Explicitly not complete in this release

This is the first vertical slice, not the final Chat Mandala MVP.

The following remain for later iterations:

- full completion lifecycle (`active → saturated → completed → archived`);
- automatic completion by structure + energy threshold;
- manual `/finish` completion;
- 10-minute soft profiling checkpoint behavior;
- final image/asset publication and archive record;
- richer partial SVG reveal via masks/clip paths;
- achievements and final statistics;
- complete staging Telegram QA;
- production deployment.

The current renderer uses opacity-based reveal as a technical first implementation. This is intentionally separate from the later visual refinement of partial element filling.

### QA boundary

Local `npm.cmd run check` is a technical gate only.

Telegram group behavior is **not considered QA-tested until this exact release tag is deployed to staging** and exercised through the real Telegram bot.

Production must remain untouched until staging QA is passed.
