[PR #2175] [MERGED] feat(otome-forge): a personality quiz to play while a chapter is planned (0.17.0) #2170

Closed
opened 2026-11-08 05:54:02 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/2175
Author: @SpicyMarinara
Created: 11/7/2026
Status: ✅ Merged
Merged: 11/7/2026
Merged by: @SpicyMarinara

Base: staging ← Head: feat/otome-quiz


📝 Commits (6)

  • fd010a0 feat(otome-forge): a personality quiz to play while a chapter is planned (0.17.0)
  • 19b7e7d Merge origin/staging into feat/otome-quiz (0.17.0 after the arc fix's 0.13.1)
  • 4949514 fix(otome-forge): quiz review fixes (18+ tags, SFW refill prompt, waits and focus)
  • 5f12ce5 fix(otome-forge): quiz statements keep their own emphasis
  • 3fdb40c Merge origin/staging into feat/otome-quiz (0.17.0 after touch's 0.14.0)
  • 55d7209 Merge origin/staging into feat/otome-quiz (0.17.0 after grievances' 0.16.0)

📊 Changes

36 files changed (+2759 additions, -616 deletions)

View changed files

➕ artifacts/otome-forge-0.17.0.zip (+0 -0)
📝 catalog/catalog.json (+8 -8)
📝 catalog/notes.json (+6 -6)
📝 catalog/v2/catalog.json (+8 -8)
📝 catalog/v2/notes.json (+6 -6)
📝 catalog/v3/catalog.json (+8 -8)
📝 catalog/v3/notes.json (+6 -6)
📝 packages/otome-forge/CHANGELOG.md (+6 -0)
📝 packages/otome-forge/README.md (+5 -3)
📝 packages/otome-forge/client.js (+354 -327)
📝 packages/otome-forge/manifest.json (+5 -5)
📝 packages/otome-forge/server.mjs (+176 -167)
📝 packages/otome-forge/src/engine/packages/client/src/features/otome-forge/locales/en.json (+19 -1)
📝 packages/otome-forge/src/engine/packages/client/src/features/otome-forge/screens/setup/ReviewStep.tsx (+2 -1)
➕ packages/otome-forge/src/engine/packages/client/src/features/otome-forge/screens/story/PersonalityQuiz.tsx (+247 -0)
📝 packages/otome-forge/src/engine/packages/client/src/features/otome-forge/screens/story/StoryHome.tsx (+76 -51)
➕ packages/otome-forge/src/engine/packages/client/src/features/otome-forge/shared/quiz.ts (+56 -0)
📝 packages/otome-forge/src/engine/packages/client/src/features/otome-forge/theme/styles.ts (+28 -1)
📝 packages/otome-forge/src/engine/packages/server/src/services/otome-forge/generation.ts (+16 -5)
📝 packages/otome-forge/src/engine/packages/server/src/services/otome-forge/ids.ts (+7 -0)

...and 16 more files

📄 Description

Pull request

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #2174

Why this change

The maintainer asked for a personality quiz to play while a chapter is planned. It's modelled on online BDSM, relationship and personality tests. The player answers statements from strongly disagree (1) to strongly agree (5), then compares their answers with how each love interest answered. The love interests' answers come from their bibles and are never sent with model calls. Sexual and kink statements are hidden when NSFW is off.

The waits also change. "What happened so far" shows only while an arc is planned. Other chapter-planning waits offer the quiz, and Who said what? stays on scene writing.

What changed

  • Take the personality quiz while a chapter is planned. Tap Play the personality quiz, pick 1 to 5, and see every love interest's answer next to yours, with how alike you are so far. Sex and kink statements appear only when Heat is NSFW. Once you've answered them all, 50 new statements are written in the background.
  • Your love interests answer it once. A new story scores them in the background after the bibles. An older story, or someone new who joins later, gets scored in the background when the story is next opened.
  • What happened so far… now shows while an arc is planned. Other chapter-planning waits offer the quiz, and Who said what? still plays while a scene is written.

In detail (package otome-forge, 0.17.0):

  • Statements: 100 original starting statements in S/minigames/quiz-statements.ts, each with a stable id, a category and an 18+ flag: 32 18+, 20 love, 20 together and 28 temperament. They are asked interleaved.

  • Storage: a separate ${R}:quiz run document holds the statements, each love interest's 1–5 score and the player's answers. It is never stored in the bible, which is serialized into prompts. A regression proves a stored marker never reaches a chapter prompt. A structural guard proves only minigames/quiz.ts reads the document.

  • Scoring: one background call in the maintainer's line format, <statement>: <name> <score> | <name> <score> | …, with tolerant parsing:

    • numbering, brackets, a colon inside a statement, and Kai: 5 / Kai (5) forms;
    • titles and honorifics;
    • a slightly reworded statement still matches;
    • namesakes are never guessed, and scores outside 1–5 are skipped.

    The prompts (quizScoreMessages, quizRefillMessages) are logged in debug mode.

  • When scoring runs:

    • setup/forge.ts queues it after every bible is written.
    • Opening a story (GET /runs/:run) calls ensureQuizScores, which queues one call for whatever is missing: an older story, a newcomer, or 18+ statements after Heat goes NSFW.
    • Only one call runs per story at a time, and it never blocks the open. A failed or partial call waits 10 minutes before a later open retries it.
    • Reading the quiz is a fallback trigger.
  • Refill: answering the last visible statement queues one call that writes 50 new statements together with every love interest's score.

    • Repeats are dropped.
    • [18+]-tagged lines are dropped while Heat is SFW, and the prompt asks for none then.
    • Only one refill runs at a time.
  • Agreement: computed with no model call, as the mean of 1 − |yours − theirs| / 4, shown as "N% alike" for each love interest.

  • Loading screens (StoryHome.tsx):

    • The Lead dialog shows "What happened so far" only when the chapter opens an arc, and the quiz otherwise.
    • The route, repair and extra-story planning dialog shows the quiz, and its focus now starts on Cancel.
    • "Planning the next arc…" shows "What happened so far".
    • The Reader keeps Who said what?.
  • Play flow (PersonalityQuiz.tsx): like Who said what?. Play comes first, focus moves only after the player's own action, and the reveal is announced politely. Each answer is saved as it's given, and the first answer is final.

  • Setup and docs: the setup screen's cost line counts the quiz call. The README covers the waits, the costs and what is stored.

  • Generated outputs rebuilt: client.js, server.mjs, manifest.json, artifacts/otome-forge-0.17.0.zip and the catalogs. Staging is merged in after #2173.

Package and security impact

  • Affected package IDs: otome-forge (0.17.0)
  • Engine compatibility impact: none; minEngineVersion is unchanged.
  • New or changed permissions/entrypoints:
    • New package routes: GET /runs/:run/quiz and POST /runs/:run/quiz/answer.
    • New background model calls on the Planning connection: setup scoring, missing-score fill and the 50-statement refill.
  • Restart, storage, update, or uninstall impact:
    • A new per-run quiz document. Removing the package removes its data like other run documents.
    • Older stories score their love interests in the background on first open.

Validation

  • node scripts/validate-catalog.mjs passes locally
  • git diff --check passes locally
  • Rebuilt every affected manifest, payload, artifact, and catalog entry
  • Installed or updated the affected package through Marinara Engine
  • Checked supported modes, restart behavior, and uninstall cleanup
  • Read and followed CONTRIBUTING.md

Agent runs, for the record (not a substitute for the boxes above):

  • npm run test:otome-forge after the staging merge: 809 passed, 0 failed.

    • New otome-forge-quiz.regression.ts (14 tests) and one setup test.
    • Opening an older story with no scores queues exactly one call, even when it's opened twice while that call waits. Without the hook this test fails (0 calls).
  • node scripts/typecheck-packages.mjs otome-forge: clean. ESLint and Prettier on the changed sources: clean.

  • Browser, before the staging merge: the reader "waits" tests, 12 passed, including the new quiz test on phone and desktop. The presentation file passed 130.

  • Local review:

    • CodeRabbit: 1 trivial finding, fixed. Scale labels now use a static key map.
    • Dottore: 1 low defect, fixed. "Their answers are still being written" now shows only while scoring runs; otherwise "They haven't answered this one yet". A 60 s re-read lets the view recover after the server's 10-minute retry wait.
    • Independent review (3 lenses, each claim verified separately): 13 claims raised, 6 confirmed and fixed with regressions:
      • The SFW refill prompt no longer lists 18+ starters or 18+ statements written earlier. Dedupe still drops their repeats.
      • The [18+] tag is found wherever the model puts it: in bold, in quotes, at the end, or before a colon.
      • Statements written by a refill under NSFW are stored as 18+, so an untagged one never shows after Heat is lowered.
      • "What happened so far" shows inside the "Meet someone new" dialog during that arc wait, not behind its scrim.
      • Play keeps focus while the quiz loads, and offers Try again on a failed read.
      • New statements after a refill are announced.
    • A verification pass then found the tag cleanup ate emphasis inside statements. That is fixed, with a regression.
    • Not fixed, because it predates this PR: if planning the newcomer's arc fails, the error shows on the card behind the dialog.

Manual verification notes

  • Manually verify: in a story with several love interests, plan a chapter that does not open an arc. Play the personality quiz should appear under the planning status and not "What happened so far". Tap it and pick 1 to 5. Every love interest's answer should show beside yours, with "% alike" for each.
  • Manually verify: reach the end of an arc and go on with the story. While the arc is planned, "What happened so far" should show.
  • Manually verify: with Heat SFW, no sex or kink statements appear. Switch Heat to NSFW, reopen the story, and plan a chapter. 18+ statements should appear, and the love interests should get scores for them after a short while.
  • Manually verify: open a story created before this update with debug mode on. One quiz scoring call should be logged, and opening the story again should log no second one.
  • Manually verify: while a scene is written, Who said what? still plays.
  • Manually verify: on a phone-width screen, the quiz fits the planning dialog and Cancel still stops planning.

Documentation impact

  • No documentation changes needed
  • Updated this README catalog and package guidance
  • Updated linked Marinara Engine documentation

packages/otome-forge/README.md and CHANGELOG.md are updated. The 100 starting statements are English; refilled statements are written in the story's language.

UI evidence (if applicable)

The browser test captures the quiz on desktop and phone (artifacts of the package browser run).

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Agents/pull/2175 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 11/7/2026 **Status:** ✅ Merged **Merged:** 11/7/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `feat/otome-quiz` --- ### 📝 Commits (6) - [`fd010a0`](https://github.com/Pasta-Devs/Marinara-Agents/commit/fd010a0bdb29823e7f56b132cba57a093f59d75c) feat(otome-forge): a personality quiz to play while a chapter is planned (0.17.0) - [`19b7e7d`](https://github.com/Pasta-Devs/Marinara-Agents/commit/19b7e7d0d67ef548a826f041df37db817745af7c) Merge origin/staging into feat/otome-quiz (0.17.0 after the arc fix's 0.13.1) - [`4949514`](https://github.com/Pasta-Devs/Marinara-Agents/commit/494951442609fe83762dc6b0bd8de6acbbc9e4f9) fix(otome-forge): quiz review fixes (18+ tags, SFW refill prompt, waits and focus) - [`5f12ce5`](https://github.com/Pasta-Devs/Marinara-Agents/commit/5f12ce570bdc44c9d579e90bf0b254d84b2e4fb8) fix(otome-forge): quiz statements keep their own emphasis - [`3fdb40c`](https://github.com/Pasta-Devs/Marinara-Agents/commit/3fdb40c35e62e423004cb596c2e55994fe4c4f7e) Merge origin/staging into feat/otome-quiz (0.17.0 after touch's 0.14.0) - [`55d7209`](https://github.com/Pasta-Devs/Marinara-Agents/commit/55d72092614bcbc92c39b066415862bdc8c1d4cd) Merge origin/staging into feat/otome-quiz (0.17.0 after grievances' 0.16.0) ### 📊 Changes **36 files changed** (+2759 additions, -616 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/otome-forge-0.17.0.zip` (+0 -0) 📝 `catalog/catalog.json` (+8 -8) 📝 `catalog/notes.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+8 -8) 📝 `catalog/v2/notes.json` (+6 -6) 📝 `catalog/v3/catalog.json` (+8 -8) 📝 `catalog/v3/notes.json` (+6 -6) 📝 `packages/otome-forge/CHANGELOG.md` (+6 -0) 📝 `packages/otome-forge/README.md` (+5 -3) 📝 `packages/otome-forge/client.js` (+354 -327) 📝 `packages/otome-forge/manifest.json` (+5 -5) 📝 `packages/otome-forge/server.mjs` (+176 -167) 📝 `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/locales/en.json` (+19 -1) 📝 `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/screens/setup/ReviewStep.tsx` (+2 -1) ➕ `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/screens/story/PersonalityQuiz.tsx` (+247 -0) 📝 `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/screens/story/StoryHome.tsx` (+76 -51) ➕ `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/shared/quiz.ts` (+56 -0) 📝 `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/theme/styles.ts` (+28 -1) 📝 `packages/otome-forge/src/engine/packages/server/src/services/otome-forge/generation.ts` (+16 -5) 📝 `packages/otome-forge/src/engine/packages/server/src/services/otome-forge/ids.ts` (+7 -0) _...and 16 more files_ </details> ### 📄 Description # Pull request > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #2174 ## Why this change The maintainer asked for a personality quiz to play while a chapter is planned. It's modelled on online BDSM, relationship and personality tests. The player answers statements from strongly disagree (1) to strongly agree (5), then compares their answers with how each love interest answered. The love interests' answers come from their bibles and are never sent with model calls. Sexual and kink statements are hidden when NSFW is off. The waits also change. "What happened so far" shows only while an arc is planned. Other chapter-planning waits offer the quiz, and Who said what? stays on scene writing. ## What changed - **Take the personality quiz while a chapter is planned.** Tap **Play the personality quiz**, pick 1 to 5, and see every love interest's answer next to yours, with how alike you are so far. Sex and kink statements appear only when Heat is NSFW. Once you've answered them all, 50 new statements are written in the background. - **Your love interests answer it once.** A new story scores them in the background after the bibles. An older story, or someone new who joins later, gets scored in the background when the story is next opened. - **What happened so far… now shows while an arc is planned.** Other chapter-planning waits offer the quiz, and Who said what? still plays while a scene is written. In detail (package `otome-forge`, 0.17.0): - **Statements:** 100 original starting statements in `S/minigames/quiz-statements.ts`, each with a stable id, a category and an 18+ flag: 32 18+, 20 love, 20 together and 28 temperament. They are asked interleaved. - **Storage:** a separate `${R}:quiz` run document holds the statements, each love interest's 1–5 score and the player's answers. It is never stored in the bible, which is serialized into prompts. A regression proves a stored marker never reaches a chapter prompt. A structural guard proves only `minigames/quiz.ts` reads the document. - **Scoring:** one background call in the maintainer's line format, `<statement>: <name> <score> | <name> <score> | …`, with tolerant parsing: - numbering, brackets, a colon inside a statement, and `Kai: 5` / `Kai (5)` forms; - titles and honorifics; - a slightly reworded statement still matches; - namesakes are never guessed, and scores outside 1–5 are skipped. The prompts (`quizScoreMessages`, `quizRefillMessages`) are logged in debug mode. - **When scoring runs:** - `setup/forge.ts` queues it after every bible is written. - Opening a story (`GET /runs/:run`) calls `ensureQuizScores`, which queues one call for whatever is missing: an older story, a newcomer, or 18+ statements after Heat goes NSFW. - Only one call runs per story at a time, and it never blocks the open. A failed or partial call waits 10 minutes before a later open retries it. - Reading the quiz is a fallback trigger. - **Refill:** answering the last visible statement queues one call that writes 50 new statements together with every love interest's score. - Repeats are dropped. - `[18+]`-tagged lines are dropped while Heat is SFW, and the prompt asks for none then. - Only one refill runs at a time. - **Agreement:** computed with no model call, as the mean of 1 − |yours − theirs| / 4, shown as "N% alike" for each love interest. - **Loading screens (`StoryHome.tsx`):** - The Lead dialog shows "What happened so far" only when the chapter opens an arc, and the quiz otherwise. - The route, repair and extra-story planning dialog shows the quiz, and its focus now starts on Cancel. - "Planning the next arc…" shows "What happened so far". - The Reader keeps Who said what?. - **Play flow (`PersonalityQuiz.tsx`):** like Who said what?. Play comes first, focus moves only after the player's own action, and the reveal is announced politely. Each answer is saved as it's given, and the first answer is final. - **Setup and docs:** the setup screen's cost line counts the quiz call. The README covers the waits, the costs and what is stored. - **Generated outputs rebuilt:** `client.js`, `server.mjs`, `manifest.json`, `artifacts/otome-forge-0.17.0.zip` and the catalogs. Staging is merged in after #2173. ## Package and security impact - Affected package IDs: `otome-forge` (0.17.0) - Engine compatibility impact: none; `minEngineVersion` is unchanged. - New or changed permissions/entrypoints: - New package routes: `GET /runs/:run/quiz` and `POST /runs/:run/quiz/answer`. - New background model calls on the Planning connection: setup scoring, missing-score fill and the 50-statement refill. - Restart, storage, update, or uninstall impact: - A new per-run `quiz` document. Removing the package removes its data like other run documents. - Older stories score their love interests in the background on first open. ## Validation - [ ] `node scripts/validate-catalog.mjs` passes locally - [ ] `git diff --check` passes locally - [ ] Rebuilt every affected manifest, payload, artifact, and catalog entry - [ ] Installed or updated the affected package through Marinara Engine - [ ] Checked supported modes, restart behavior, and uninstall cleanup - [ ] Read and followed `CONTRIBUTING.md` Agent runs, for the record (not a substitute for the boxes above): - `npm run test:otome-forge` after the staging merge: 809 passed, 0 failed. - New `otome-forge-quiz.regression.ts` (14 tests) and one setup test. - Opening an older story with no scores queues exactly one call, even when it's opened twice while that call waits. Without the hook this test fails (0 calls). - `node scripts/typecheck-packages.mjs otome-forge`: clean. ESLint and Prettier on the changed sources: clean. - Browser, before the staging merge: the reader "waits" tests, 12 passed, including the new quiz test on phone and desktop. The presentation file passed 130. - Local review: - CodeRabbit: 1 trivial finding, fixed. Scale labels now use a static key map. - Dottore: 1 low defect, fixed. "Their answers are still being written" now shows only while scoring runs; otherwise "They haven't answered this one yet". A 60 s re-read lets the view recover after the server's 10-minute retry wait. - Independent review (3 lenses, each claim verified separately): 13 claims raised, 6 confirmed and fixed with regressions: - The SFW refill prompt no longer lists 18+ starters or 18+ statements written earlier. Dedupe still drops their repeats. - The `[18+]` tag is found wherever the model puts it: in bold, in quotes, at the end, or before a colon. - Statements written by a refill under NSFW are stored as 18+, so an untagged one never shows after Heat is lowered. - "What happened so far" shows inside the "Meet someone new" dialog during that arc wait, not behind its scrim. - Play keeps focus while the quiz loads, and offers Try again on a failed read. - New statements after a refill are announced. - A verification pass then found the tag cleanup ate emphasis inside statements. That is fixed, with a regression. - Not fixed, because it predates this PR: if planning the newcomer's arc fails, the error shows on the card behind the dialog. ### Manual verification notes - Manually verify: in a story with several love interests, plan a chapter that does not open an arc. **Play the personality quiz** should appear under the planning status and not "What happened so far". Tap it and pick 1 to 5. Every love interest's answer should show beside yours, with "% alike" for each. - Manually verify: reach the end of an arc and go on with the story. While the arc is planned, "What happened so far" should show. - Manually verify: with Heat SFW, no sex or kink statements appear. Switch Heat to NSFW, reopen the story, and plan a chapter. 18+ statements should appear, and the love interests should get scores for them after a short while. - Manually verify: open a story created before this update with debug mode on. One quiz scoring call should be logged, and opening the story again should log no second one. - Manually verify: while a scene is written, Who said what? still plays. - Manually verify: on a phone-width screen, the quiz fits the planning dialog and Cancel still stops planning. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation `packages/otome-forge/README.md` and `CHANGELOG.md` are updated. The 100 starting statements are English; refilled statements are written in the story's language. ## UI evidence (if applicable) The browser test captures the quiz on desktop and phone (artifacts of the package browser run). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi changed title from [PR #2175] feat(otome-forge): a personality quiz to play while a chapter is planned (0.17.0) to [PR #2175] [MERGED] feat(otome-forge): a personality quiz to play while a chapter is planned (0.17.0) 2026-11-08 07:05:02 +07:00
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-Agents#2170
No description provided.