[PR #2149] [MERGED] feat(otome-forge): Write your own… at a chapter's closing decision (0.9.6) #2143

Closed
opened 2026-11-07 19:36:24 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: staging ← Head: feat/otome-closing-choice


📝 Commits (5)

  • 5d721ea feat(otome-forge): Write your own… at a chapter's closing decision (0.9.6)
  • dfd845f fix(otome-forge): Write your own… is offered on a first read only (0.9.6)
  • d6983d8 fix(otome-forge): a closing decision's five pills fit under the header on a short phone (0.9.6)
  • b55e415 Merge remote-tracking branch 'origin/staging' into feat/otome-closing-choice
  • 42d0154 Merge branch 'staging' into feat/otome-closing-choice

📊 Changes

26 files changed (+983 additions, -424 deletions)

View changed files

➕ artifacts/otome-forge-0.9.6.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 (+4 -0)
📝 packages/otome-forge/README.md (+3 -1)
📝 packages/otome-forge/client.js (+221 -210)
📝 packages/otome-forge/manifest.json (+5 -5)
📝 packages/otome-forge/server.mjs (+134 -134)
📝 packages/otome-forge/src/engine/packages/client/src/features/otome-forge/hooks/use-reader.ts (+16 -6)
📝 packages/otome-forge/src/engine/packages/client/src/features/otome-forge/locales/en.json (+8 -0)
📝 packages/otome-forge/src/engine/packages/client/src/features/otome-forge/screens/reader/ChoicePills.tsx (+23 -3)
➕ packages/otome-forge/src/engine/packages/client/src/features/otome-forge/screens/reader/OwnAnswerDialog.tsx (+92 -0)
📝 packages/otome-forge/src/engine/packages/client/src/features/otome-forge/screens/reader/Reader.tsx (+30 -3)
📝 packages/otome-forge/src/engine/packages/client/src/features/otome-forge/shared/api-types.ts (+4 -1)
📝 packages/otome-forge/src/engine/packages/client/src/features/otome-forge/shared/arcs.ts (+8 -0)
📝 packages/otome-forge/src/engine/packages/client/src/features/otome-forge/theme/styles.ts (+11 -0)

...and 6 more files

📄 Description

Pull request

Linked issue

Closes #2146

Why this change

The maintainer asked for custom choices, but only where the story can follow them: "allow custom choices only for important decisions, the ones at the end of the chapter". Other choices keep their offered answers, because the scenes after them are written ahead in full. A chapter's closing decision (a "big" choice) is different. It sits on the last segment of the chapter's last node, nothing is written after it, and the next chapter is planned from the previous chapter in full. So a free answer there can be followed without throwing anything away.

What changed

Package: otome-forge 0.9.6 (S = server, C = client under packages/otome-forge/src/engine/packages/).

  • Data: no schema or kit change. The answer is stored as one more option on that big choice, appended in the same write that sets its canon: { id: "own", text: "Answered in their own words.", selection: { kind: "dialogue" | "action", text }, segments: [] }. Everything that reads canon treats it like any pick:
    • the canonical-choice marker;
    • the protagonist's line, or narration for an action;
    • the timeline, judgment and summaries.
  • Server (S/routes/story.ts, S/story/beats.ts chooseOption):
    • The choose body takes an optional own: { kind, text }, up to 280 characters.
    • It is accepted only on a big choice. Whitespace is collapsed, and blank words are refused.
    • Every existing guard is unchanged: the first canon wins, the chapter must not be closed, and the beat must be the one being read.
    • There are no mechanical effects: no trust, tension, grievance, disclosure or affection. The next chapter's writers read its meaning from canon, and everything that doesn't read the pick (Starlight, ledgers, stage gates, memory upkeep) happens as for any choice.
  • Client:
    • ChoicePills shows a last pill, Write your own…, on a big choice only, never on small, date, side-with or stance choices.
    • The new OwnAnswerDialog has the text field first (with a counter), then Something you say / Something you do, then Not now / Choose this.
    • A draft survives Escape or a stray tap on the backdrop. Keys typed in the field never advance the story.
    • The five-pill layout tightens only on a closing decision, so on a 375×667 phone the heading stays clear.
    • English strings are in C/locales/en.json.
  • Unchanged:
    • how or when scenes are written or painted;
    • every prompt for runs without an own answer, byte for byte (prompts.ts untouched);
    • sources/forge-kit and packages/gacha-forge.
  • README: the Choices bullet, "What leaves your device", and the list of actions that call no model.
  • Release: version 0.9.6, CHANGELOG, rebuilt client.js, server.mjs, manifest.json, artifacts/otome-forge-0.9.6.zip and catalogs.

Where the words reach:

  • a main chapter's answer: the next main chapter's plan and scenes, as the previous chapter in full inside the cached story memory, then through its summary;
  • a route or repair answer: his next own chapter;
  • a Character Story answer: the "Last Character Story" block;
  • a prologue answer: chapter 1's first scene;
  • an extra story's answer: stays inside that story, because extra stories aren't canon.

This PR and #2148 (0.9.5) both raise the package version. Whichever merges second gets rebased and rebuilt.

Package and security impact

  • Affected package IDs: otome-forge
  • Engine compatibility impact: none
  • New or changed permissions/entrypoints: none (one optional field on an existing route)
  • Restart, storage, update, or uninstall impact: none. A closing decision already waiting in a story in progress gets the button at once.

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

Manual verification notes

Run by the agent:

  • npm run test:otome-forge: 705 + 13 passed.
    • The new beats regression covers the stored option's shape and every refusal saving nothing.
    • It also checks that main-2's planner prompt holds the canon marker followed by the words, and that the next scene's cached first message equals the planner's.
  • tests/package-otome-forge-reader.e2e.ts on desktop-chromium and mobile-chromium: 91 passed, 1 skipped (phone-only on desktop). New tests:
    • the full flow: no button on small choices, focus in the field, the draft kept after Escape, Space not advancing, the posted body, and the line shown;
    • a 375×667 phone with four options plus the button, all on screen.
  • Typecheck, format, lint, validate-catalog.mjs and git diff --check: pass.

Still to verify by hand:

  • Manually verify on an iPhone that Write your own… appears under a chapter's last lasting choice, the keyboard doesn't hide Choose this, and the words show as your line or as narration.
  • Manually verify that the next chapter, once planned, follows the answer.
  • Manually verify that no other choice (mid-scene, date, side-with, Confrontation or Closer) offers the button.

Documentation impact

  • Updated this README catalog and package guidance

🤖 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/2149 **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-closing-choice` --- ### 📝 Commits (5) - [`5d721ea`](https://github.com/Pasta-Devs/Marinara-Agents/commit/5d721eaf57f6d2c66d2bdf01b841ba4436fae2ef) feat(otome-forge): Write your own… at a chapter's closing decision (0.9.6) - [`dfd845f`](https://github.com/Pasta-Devs/Marinara-Agents/commit/dfd845f327ddd2b05ce2af8932f04f3e6511b284) fix(otome-forge): Write your own… is offered on a first read only (0.9.6) - [`d6983d8`](https://github.com/Pasta-Devs/Marinara-Agents/commit/d6983d847e2b74c5672b2aedf28be00745b5e1e8) fix(otome-forge): a closing decision's five pills fit under the header on a short phone (0.9.6) - [`b55e415`](https://github.com/Pasta-Devs/Marinara-Agents/commit/b55e415122652f1bbf59643ea3c73ad9d3b5945f) Merge remote-tracking branch 'origin/staging' into feat/otome-closing-choice - [`42d0154`](https://github.com/Pasta-Devs/Marinara-Agents/commit/42d0154f40eaf9441bae999f11afcbfd42c1b830) Merge branch 'staging' into feat/otome-closing-choice ### 📊 Changes **26 files changed** (+983 additions, -424 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/otome-forge-0.9.6.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` (+4 -0) 📝 `packages/otome-forge/README.md` (+3 -1) 📝 `packages/otome-forge/client.js` (+221 -210) 📝 `packages/otome-forge/manifest.json` (+5 -5) 📝 `packages/otome-forge/server.mjs` (+134 -134) 📝 `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/hooks/use-reader.ts` (+16 -6) 📝 `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/locales/en.json` (+8 -0) 📝 `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/screens/reader/ChoicePills.tsx` (+23 -3) ➕ `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/screens/reader/OwnAnswerDialog.tsx` (+92 -0) 📝 `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/screens/reader/Reader.tsx` (+30 -3) 📝 `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/shared/api-types.ts` (+4 -1) 📝 `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/shared/arcs.ts` (+8 -0) 📝 `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/theme/styles.ts` (+11 -0) _...and 6 more files_ </details> ### 📄 Description # Pull request ## Linked issue Closes #2146 ## Why this change The maintainer asked for custom choices, but only where the story can follow them: "allow custom choices only for important decisions, the ones at the end of the chapter". Other choices keep their offered answers, because the scenes after them are written ahead in full. A chapter's closing decision (a "big" choice) is different. It sits on the last segment of the chapter's last node, nothing is written after it, and the next chapter is planned from the previous chapter in full. So a free answer there can be followed without throwing anything away. ## What changed Package: `otome-forge` 0.9.6 (S = server, C = client under `packages/otome-forge/src/engine/packages/`). - **Data:** no schema or kit change. The answer is stored as one more option on that big choice, appended in the same write that sets its canon: `{ id: "own", text: "Answered in their own words.", selection: { kind: "dialogue" | "action", text }, segments: [] }`. Everything that reads canon treats it like any pick: - the canonical-choice marker; - the protagonist's line, or narration for an action; - the timeline, judgment and summaries. - **Server** (`S/routes/story.ts`, `S/story/beats.ts` `chooseOption`): - The choose body takes an optional `own: { kind, text }`, up to 280 characters. - It is accepted only on a big choice. Whitespace is collapsed, and blank words are refused. - Every existing guard is unchanged: the first canon wins, the chapter must not be closed, and the beat must be the one being read. - There are no mechanical effects: no trust, tension, grievance, disclosure or affection. The next chapter's writers read its meaning from canon, and everything that doesn't read the pick (Starlight, ledgers, stage gates, memory upkeep) happens as for any choice. - **Client:** - `ChoicePills` shows a last pill, **Write your own…**, on a big choice only, never on small, date, side-with or stance choices. - The new `OwnAnswerDialog` has the text field first (with a counter), then Something you say / Something you do, then Not now / Choose this. - A draft survives Escape or a stray tap on the backdrop. Keys typed in the field never advance the story. - The five-pill layout tightens only on a closing decision, so on a 375×667 phone the heading stays clear. - English strings are in `C/locales/en.json`. - **Unchanged:** - how or when scenes are written or painted; - every prompt for runs without an own answer, byte for byte (`prompts.ts` untouched); - `sources/forge-kit` and `packages/gacha-forge`. - **README:** the Choices bullet, "What leaves your device", and the list of actions that call no model. - **Release:** version 0.9.6, CHANGELOG, rebuilt `client.js`, `server.mjs`, `manifest.json`, `artifacts/otome-forge-0.9.6.zip` and catalogs. **Where the words reach:** - a main chapter's answer: the next main chapter's plan and scenes, as the previous chapter in full inside the cached story memory, then through its summary; - a route or repair answer: his next own chapter; - a Character Story answer: the "Last Character Story" block; - a prologue answer: chapter 1's first scene; - an extra story's answer: stays inside that story, because extra stories aren't canon. This PR and #2148 (0.9.5) both raise the package version. Whichever merges second gets rebased and rebuilt. ## Package and security impact - Affected package IDs: `otome-forge` - Engine compatibility impact: none - New or changed permissions/entrypoints: none (one optional field on an existing route) - Restart, storage, update, or uninstall impact: none. A closing decision already waiting in a story in progress gets the button at once. ## Validation <!-- Human tasks. Agent-run results are listed in the notes below. --> - [ ] `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` ### Manual verification notes Run by the agent: - `npm run test:otome-forge`: 705 + 13 passed. - The new beats regression covers the stored option's shape and every refusal saving nothing. - It also checks that main-2's planner prompt holds the canon marker followed by the words, and that the next scene's cached first message equals the planner's. - `tests/package-otome-forge-reader.e2e.ts` on desktop-chromium and mobile-chromium: 91 passed, 1 skipped (phone-only on desktop). New tests: - the full flow: no button on small choices, focus in the field, the draft kept after Escape, Space not advancing, the posted body, and the line shown; - a 375×667 phone with four options plus the button, all on screen. - Typecheck, format, lint, `validate-catalog.mjs` and `git diff --check`: pass. Still to verify by hand: - Manually verify on an iPhone that **Write your own…** appears under a chapter's last lasting choice, the keyboard doesn't hide **Choose this**, and the words show as your line or as narration. - Manually verify that the next chapter, once planned, follows the answer. - Manually verify that no other choice (mid-scene, date, side-with, Confrontation or Closer) offers the button. ## Documentation impact - [x] Updated this README catalog and package guidance 🤖 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 #2149] feat(otome-forge): Write your own… at a chapter's closing decision (0.9.6) to [PR #2149] [MERGED] feat(otome-forge): Write your own… at a chapter's closing decision (0.9.6) 2026-11-07 21:43:44 +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#2143
No description provided.