[GH-ISSUE #8688] [Feature]: Shared character and persona cards (one card model, one editor) #8457

Closed
opened 2026-11-07 16:43:04 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @ylli-selmani on GitHub (Nov 2, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8688

Originally assigned to: @ylli-selmani on GitHub.

What problem does this solve?

Characters and personas are two separate card models with two editors, two write schemas and two storage paths, even though most of what an author writes (name, summary, description, personality, backstory, appearance, scenario, example dialogue, colors, tags) is the same. Every shared field has to be added twice, and one library keeps falling behind the other.

Example: a character can have name aliases, so a nickname in chat gets the character's name color. Personas never got that, because adding one field to personas means touching another editor, another write schema, another serialized row and another reader.

The split also blocks a common wish: using the same card as the player in one chat and as a cast member in another, without keeping two divergent copies in sync by hand.

Proposed solution

One authored card model, one storage path and one shared editor, delivered in three reviewable PRs:

  • A: shared editor (no storage change). One typed adapter maps both existing shapes to a shared authored payload. The Character and Persona editors become thin entry points over one shared editor (shell, identity fields, colors, RPG fields, card fields, draft and save handling). Both libraries, the word "Persona" and the current tab layout stay. Fully reversible.
  • B: unified storage and migration. One card store with a verified pre-migration backup, a format marker and downgrade refusal. It preserves IDs, library placement, revisions and media ownership. Both existing APIs keep working as views.
  • C: chat roles and parity. The chat references which card is the player and which are cast. {{user}} / {{char}} resolve per chat at use time. Persona alias parity (nickname coloring) comes through the shared binding.

Decisions:

  • Explicit "duplicate" stays an independent copy.
  • Distinct legacy cards are never merged, even if they look identical.
  • Game player eligibility stays as it is until Game and village fixtures prove the player contract.

Alternatives considered

  • A permanent role field on each card ("this card is a persona"). Rejected: the same card can be the player in one chat and a character in another, so the role belongs to the chat, not the card.
  • Keep two models and add each shared field twice. That's the current state, and the reason personas keep missing features.
  • Merge both libraries into one list. Out of scope: users and authored villages expect the separate Persona library.

Additional context

The plan follows a Pasta-Devs discussion on 2026-10-30 (a chat-role proposal, a player-avatar compatibility concern, and a preference to keep the current surface). PR A is ready now. B and C follow as separate PRs, stacked on A.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @ylli-selmani on GitHub (Nov 2, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8688 Originally assigned to: @ylli-selmani on GitHub. ## What problem does this solve? Characters and personas are two separate card models with two editors, two write schemas and two storage paths, even though most of what an author writes (name, summary, description, personality, backstory, appearance, scenario, example dialogue, colors, tags) is the same. Every shared field has to be added twice, and one library keeps falling behind the other. Example: a character can have name aliases, so a nickname in chat gets the character's name color. Personas never got that, because adding one field to personas means touching another editor, another write schema, another serialized row and another reader. The split also blocks a common wish: using the same card as the player in one chat and as a cast member in another, without keeping two divergent copies in sync by hand. ## Proposed solution One authored card model, one storage path and one shared editor, delivered in three reviewable PRs: - **A: shared editor (no storage change).** One typed adapter maps both existing shapes to a shared authored payload. The Character and Persona editors become thin entry points over one shared editor (shell, identity fields, colors, RPG fields, card fields, draft and save handling). Both libraries, the word "Persona" and the current tab layout stay. Fully reversible. - **B: unified storage and migration.** One card store with a verified pre-migration backup, a format marker and downgrade refusal. It preserves IDs, library placement, revisions and media ownership. Both existing APIs keep working as views. - **C: chat roles and parity.** The chat references which card is the player and which are cast. `{{user}}` / `{{char}}` resolve per chat at use time. Persona alias parity (nickname coloring) comes through the shared binding. Decisions: - Explicit "duplicate" stays an independent copy. - Distinct legacy cards are never merged, even if they look identical. - Game player eligibility stays as it is until Game and village fixtures prove the player contract. ## Alternatives considered - **A permanent role field on each card ("this card is a persona").** Rejected: the same card can be the player in one chat and a character in another, so the role belongs to the chat, not the card. - **Keep two models and add each shared field twice.** That's the current state, and the reason personas keep missing features. - **Merge both libraries into one list.** Out of scope: users and authored villages expect the separate Persona library. ## Additional context The plan follows a Pasta-Devs discussion on 2026-10-30 (a chat-role proposal, a player-avatar compatibility concern, and a preference to keep the current surface). PR A is ready now. B and C follow as separate PRs, stacked on A. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-11-07 16:43:04 +07:00
Author
Owner

@ylli-selmani commented on GitHub (Nov 2, 2026):

PRs B and C will wait until after stable - i'll reopen this then

<!-- gh-comment-id:6584004687 --> @ylli-selmani commented on GitHub (Nov 2, 2026): PRs B and C will wait until after stable - i'll reopen this then
Author
Owner

@Gunterlie commented on GitHub (Nov 2, 2026):

Heads-up for part B (unified storage and migration), found during a routine sweep of the Marinara-Agents packages against current staging.

Part A (#8689) is safe for packages: it is client-only, and no package imports the editors or authored-card.

Part B is different. Several Agent packages read characters and personas straight through the Engine storage/runtime, with the current shapes:

Package What it reads
slurp2 ~18 files with getPersona( plus flat persona fields aboutMe, appearance, avatarCrop, description, personality, backstory; ~22 files read characters.getById + character.data JSON incl. extensions.appearance / extensions.backstory
noodle getPersona(, listPersonas(, persona.aboutMe, persona.avatarCrop, persona.description; 8 files read character data
otome-forge listPersonas(, persona.appearance, persona.backstory, persona.description (setup prompts, art)
conversation-calls getPersona( + appearance, backstory, description, personality
long-term-memory listPersonas( (subject catalog, notes, runtime)
memory-nag listPersonas( (prompt context)
hierarchical-maps, saucelings, story-writer character data only

What would break them in part B:

  • renamed or moved persona fields (for example aboutMe → description, flat fields → a data blob),
  • getPersona / listPersonas removed or returning a different shape,
  • persona IDs changing during migration (packages store persona and character IDs in their own tables),
  • extensions.appearance / extensions.backstory moving.

Ask: please keep getPersona / listPersonas and the flat persona fields as a compatibility shape (or list the new shape in the PR), keep IDs stable, and ping the Agents side before B merges so we can run the package regressions against the branch.

<!-- gh-comment-id:6584100935 --> @Gunterlie commented on GitHub (Nov 2, 2026): Heads-up for **part B (unified storage and migration)**, found during a routine sweep of the Marinara-Agents packages against current `staging`. Part A (#8689) is safe for packages: it is client-only, and no package imports the editors or `authored-card`. Part B is different. Several Agent packages read characters and personas straight through the Engine storage/runtime, with the current shapes: | Package | What it reads | |---|---| | **slurp2** | ~18 files with `getPersona(` plus flat persona fields `aboutMe`, `appearance`, `avatarCrop`, `description`, `personality`, `backstory`; ~22 files read `characters.getById` + `character.data` JSON incl. `extensions.appearance` / `extensions.backstory` | | **noodle** | `getPersona(`, `listPersonas(`, `persona.aboutMe`, `persona.avatarCrop`, `persona.description`; 8 files read character data | | **otome-forge** | `listPersonas(`, `persona.appearance`, `persona.backstory`, `persona.description` (setup prompts, art) | | **conversation-calls** | `getPersona(` + `appearance`, `backstory`, `description`, `personality` | | **long-term-memory** | `listPersonas(` (subject catalog, notes, runtime) | | **memory-nag** | `listPersonas(` (prompt context) | | hierarchical-maps, saucelings, story-writer | character data only | What would break them in part B: - renamed or moved persona fields (for example `aboutMe` → `description`, flat fields → a `data` blob), - `getPersona` / `listPersonas` removed or returning a different shape, - persona IDs changing during migration (packages store persona and character IDs in their own tables), - `extensions.appearance` / `extensions.backstory` moving. Ask: please keep `getPersona` / `listPersonas` and the flat persona fields as a compatibility shape (or list the new shape in the PR), keep IDs stable, and ping the Agents side before B merges so we can run the package regressions against the branch.
Author
Owner

@ylli-selmani commented on GitHub (Nov 2, 2026):

thanks gunterlie, that's very valuable feedback!!!! i'll keep it in mind, though: i probably won't touch anything else today, i wanna play minecraft. however, if you want (and you don't have to), you can have your agent look at my feature doc and amend it as you wish.

SHARED-CARDS.md

and my current branch is right here: PR-B Branch

<!-- gh-comment-id:6584215375 --> @ylli-selmani commented on GitHub (Nov 2, 2026): thanks gunterlie, that's very valuable feedback!!!! i'll keep it in mind, though: i probably won't touch anything else today, i wanna play minecraft. however, if you want (and you don't have to), you can have your agent look at my feature doc and amend it as you wish. [SHARED-CARDS.md](https://github.com/user-attachments/files/34284167/SHARED-CARDS.md) and my current branch is right here: [PR-B Branch](https://github.com/ylli-selmani/Marinara-Engine-Ylli-Edits/tree/feat/shared-cards-b)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#8457
No description provided.