world-groupchat

Community@xixi/world-groupchat
Community skill — not reviewed. It was shared by 西西 and has not been checked by Neta. Read SKILL.md below before letting an agent use it.
Use it in Cohub

Paste this into your agent's chat — it fetches the skill and follows it.

Use the skill: world-groupchat. Run `npx -y @neta-art/neta-search-cli@latest skills use @xixi/world-groupchat --via site` and follow what it prints. Read its complete output, redirecting it to a temporary file first if necessary, and resolve relative paths from the skill directory it prints.
Install from a terminal
npx -y @neta-art/neta-search-cli@latest skills use @xixi/world-groupchat
Summary

A chat room where your characters talk among themselves and answer when you join in.

  • Watch 3 to 7 characters from your world have a conversation in their own voices, each keeping their own secrets.
  • Jump in anytime, @ someone to get their attention, read what they remember about you in their profile.
  • Set it in everyday life, a scene from your story, a special event, or a mystery where clues are split between members.
  • Works best with characters who have clear personalities and relationships, plus portraits you've already made.
  • Players sign in with Neta and chat on their own credits; you pay nothing to publish it.
SKILL.md
# World Group Chat

You build **one group chat** as a Web Work: a phone-style chat room where characters from the creator's world
talk among themselves while the player reads along, jumps in, or @-mentions someone.

What the player gets (already built into the engine):

- **Before signing in**, the group is visible behind the sign-in card: portraits, the world as background, and an
  opening exchange you write. After sign-in the chat continues from that opening on its own.
- Each member speaks **only from what they would know**: their persona, secrets and private ties go to them alone.
- **Members remember.** Every stretch of chat, each involved member writes a short first-person diary entry and
  updates what they think of the player and of themselves (the memory-weaver v2 format used by Neta's companion
  memory). Each member is told only their own memory, and it outlives a single chat. The player can read it in
  each member's profile and can make everyone forget.
- The player talks at any time; an @-mentioned member answers, the others go back to their own conversation.
- Optional **beats** (things that happen after N turns; in an everyday chat only ambient ones such as the rain stopping) and, for mysteries, a **Solve** button that judges the
  player's answer and shows the truth.
- Chats and memories are saved to the player's account. Every model call runs on **the player's own Neta
  credits**; Settings shows what this chat has used. The chat stops while the tab is hidden and pauses itself
  after 40 messages with no word from the player.

Your job is **casting**: find out what the group is for and in which language, read the world, write
`data/group.js`, bring in the world's images, check, publish.

**Done means:** `check.mjs` and `qa.mjs` end `ok:true`, `persona-test.mjs --all` shows no leaks, and you have
looked at every QA screenshot.

`<skill>` is this skill's folder; `<slug>` is the Work's folder under `works/webs/`; commands run from the world root.

```
references/modes.md           what the group is for: daily · canon · event · mystery · custom
references/languages.md       output language: asking, codes, translating cards and the interface
references/casting.md         members, the moment, the player, every field, secrets, voices, openings, minors
references/group-schema.md    data/group.js fields and limits, what players can see
references/book-extraction.md book or long text → cast with book-to-world
references/publish.md         sign-in and credits, cost, publishing, cover, what to tell the creator
scripts/                      world-scan · new-group · avatars · book-atoms · ui-strings · check · persona-test · qa
template/                     the engine copied into every group; never edit it per group
examples/                     clockwork-harbor (zh), lantern-street (en), lantern-street-ja (ja)
vendor/                       studio-login-gate (Neta sign-in) · book-to-world (by ATou)
```

## Rules

1. **Ask what the group is for and in which language.** Never assume an everyday chat because the creator only
   named characters; never take the output language from the world, the source or the request unconfirmed.
2. **Canon first.** Use the world's entries (or the book, or the IP's canon) as written; invent only what they
   leave open, never against them. Keep a ledger of canon vs invented in `work/<slug>/ledger.md`.
3. **Secrets stay with their owner**: one member's `privateNotes` or one `private` relationship, nowhere else,
   not in the opening or beats either. `check.mjs` fails the Work otherwise.
4. **One moment.** `worldview`, `sharedFacts`, the opening and the beats agree on one time and place.
5. **Use the world's images.** Character covers become avatars and the world cover the background
   (`avatars.mjs --from-world`). Generate images only when the creator asks, in the world's `visualStyle`, and
   never likenesses of real people.
6. **The gate is always on.** Never remove or bypass it, add publisher scopes, put a key anywhere, or call a
   model another way.
7. **Minors stay minors**, written as such, with romance kept away from them.
8. **The world is the creator's.** Read `world/`, never edit it (importing extracted characters only when asked).
   Your files live in the Work folder or `work/<slug>/`, never elsewhere under `works/`.
9. **Offstage.** Talk about their world and their group, not files or commands; share only `neta.art` links.

## Workflow

### 1 · Read the world

```bash
node <skill>/scripts/world-scan.mjs .                     # settings, world cover, characters with covers, who is tied to whom
node <skill>/scripts/world-scan.mjs . --focus "<name>"    # full text of one character and everyone tied to them
```

Characters in a book or long text instead: extract first (`references/book-extraction.md`). A known IP with
nothing in the world: use its canon and note it in the ledger. Nothing at all: ask who should be in the group.

### 2 · Ask two things, then propose

Ask, in one short message with examples from their world:

1. **What the group is for** (`references/modes.md`): everyday chat · a canon scene · a themed event · a mystery ·
   something else.
2. **The output language** (`references/languages.md`): the language they write in, the world's, English, other.

Then propose the rest as **one plan** for a yes or a change: the members (3–5 is best, up to 7), the moment, who
the player is (default: a newcomer everyone knows a little, never a canon lover or relative), and, for a
non-modern world, modern-AU chat or an in-world device. If the creator already settled something, do not ask it
again. If they said "just start": everyday chat, their language, the richest line-up; say so in one line.

### 3 · Plan in `work/<slug>/`

`ledger.md` (canon vs invented, what you left out) and, for a mystery, `case.md` (truth, clues, who knows what,
two routes to the answer) before any card.

### 4 · Scaffold, write, bring in images

```bash
node /mods/neta/neta work init web works/webs/<slug> --title "<group name>"      # in a Neta world
node <skill>/scripts/new-group.mjs works/webs/<slug> --data work/<slug>/group.json --force
node <skill>/scripts/avatars.mjs works/webs/<slug> --from-world                  # covers → avatars, world cover → background
node <skill>/scripts/check.mjs works/webs/<slug>
node <skill>/scripts/persona-test.mjs works/webs/<slug> --all
```

Write `work/<slug>/group.json` following `references/casting.md` and the mode's rules; the bar is the examples.
Every field in the output language; `mode`, `lang`, `source` on each member; an `opening` of 4–8 messages from
2–4 members that shows who they are and leaves a thread for the player to pull; `beats` for events (optional
otherwise); `case` for mysteries; `ui` for languages other than zh / en. Outside a Neta world, create
`works/webs/<slug>/meta.json` yourself (`references/publish.md`).

### 5 · Check and look

```bash
node <skill>/scripts/qa.mjs works/webs/<slug>     # ok:true; then open every screenshot
```

`qa.mjs` plays a copy with a mock gate (no sign-in, no credits): the preview before sign-in, the opening, auto-start,
a memory digest shown in a profile, usage counting, beats, the Solve flow, no secret on any screen, every model
request carrying only the speaker's own secrets, an answered @-mention, reload, a cleared browser on the same
account, a paused chat staying paused, 320 px. If Chrome or `npm` is unavailable it says so; then open the Work
yourself and walk the same list.

### 6 · Publish and hand over

Publish, set the cover, open the live link signed out (`references/publish.md`). Tell the creator in their own
language and in a few lines of world voice: who is in the group, what it is for and when it is set, what the
player can do (watch, talk, @, read what members remember, solve), that players sign in and chat on their own
credits with the rough cost per hour, what you invented, and what you could not verify.

### 7 · Later changes

Edit `work/<slug>/group.json` → `new-group.mjs --data … --force` → `check.mjs` → `qa.mjs` → publish. Keep the
group `id`, or every player loses their chats and the members' memories of them. Engine updates:
`new-group.mjs works/webs/<slug> --update`.

## Quality bar

- The preview alone makes someone want to sign in: portraits, a lived-in opening, a thread left hanging.
- Within the first five live messages at least two members sound unmistakably different.
- Asked directly, a member answers in character with only what they would know; secrets surface as hints.
- After the player has talked a while, members refer back to it, and their profiles show what they made of it.
- The mode shows: a canon scene stays at its point in time; an event has beats; a mystery has one truth and an end.
- Everything after sign-in is in the output language.

## Maintaining this skill

`node --test <skill>/tests/` covers the engine (memory, beats, opening, languages), the scripts on all examples and
the directory rules. The gate and the extractor have their own tests under `vendor/`. Record versions in
`CHANGELOG.md` and bump `template/VERSION.json`.

## Credits

- Group chat engine: adapted from the "groupchat" project in the Neta production and operations workspace.
- Character memory follows the memory-weaver v2 format of Neta's `companion-onboarding` skill.
- `vendor/book-to-world/`: by ATou (https://github.com/atou42/book-to-world-skill, commit 19e5c22), unchanged
  except `SKILL.md` renamed to `UPSTREAM-SKILL.md`.
- `vendor/studio-login-gate/`: the Neta Studio sign-in gate; a newer installed `studio-login-gate` is preferred.