fix(play): solo cold-open starts the player ALONE — no auto-recruited companion (G6); G5 streaming verified already-works - #414
Conversation
… companion (G6)
G6 — "a companion was just THERE with no reason" (solo cold-open):
A fresh SOLO play.sh session opened with a companion already in the party with
no earned, in-fiction meeting. Reproduced live: a solo cold-open seated a
2-member party [PC + a silently-added companion].
Trace — the engine seed path is already correct on main:
- server.start_world("baldurs-gate") seeds the party EMPTY (verified
deterministically: party length 0 immediately after start_world).
- questgen.py records the cold-open companion as a prelude REFERENCE only
(0 party.append, 0 add_to_party); every engine party.append lives in the
recruit / load_canon_character tools, gated on add_to_party / kind.
The companion was seated at PLAY time: play.sh's solo cold-open prompt — BOTH
the authored-hero branch and the DM-invents-PC branch (byte-identical lines) —
told the DM "A companion should ENTER as part of that opening scene ... Recruit
them into the party as that meeting lands." So a "solo" run recruited a sidekick
on the very first DM turn.
Fix: rewrite that instruction in both cold-open branches so a SOLO session
starts with the player ALONE — the DM does NOT recruit a companion at cold-open
(no recruit_companion / load_canon_character add_to_party=true for a sidekick,
and no companion in the party). Companions are MET later, in play, and only then
introduced on-screen and recruited; a roster figure may still appear as a face
in the world but not as a party member. The engine is untouched (its
reference-only prelude already keeps the companion available to be met later).
play_party.sh (the multi-agent path, where a pre-seeded AI companion IS
intended) is untouched. Engine stays the sole writer.
Verified live (before -> after): solo cold-open party 2 -> 1 (PC only); the
opening narration no longer names a companion.
G5 ("I can't see the DM streaming") was VERIFIED on current main and already
works — no change made. skills/dungeon-master/SKILL.md already has a
"Streaming your narration" section ("Stream your narration as you write it, not
in one dump at the end of the turn"; "Your FIRST act on a beat is a short
log_event(kind=narration)"; "Persist beat at the end") AND a "Format your
narration" line ("Separate distinct beats with a blank line (two newlines) so
paragraphs render as paragraphs"). The viewer's /events reads the live chronicle
(log_event sink) with a since/seq cursor, and a live beat showed narration
appearing incrementally mid-turn with paragraph breaks. No fabricated fix.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR modifies the Dungeon Master prompt instructions in ChangesSolo party enforcement in DM cold-open instructions
Possibly related PRs
Poem
🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
⚔️ Resolve merge conflicts
Comment |
Two play-experience bugs. Scope:
scripts/play.shonly (engine + skill verified, not changed). Engine stays the sole writer; no wire contracts /--resume/persist_beatbatching touched.Do NOT close on merge — verify on the next 8799 + .app playtest.
G6 — "a companion was just THERE with no reason" (solo cold-open) — FIXED
Where the companion was seated (trace):
server.start_world("baldurs-gate")seeds the party empty — verified deterministically:get_stateparty length is0immediately afterstart_world.questgen.pyrecords the cold-open companion as a prelude REFERENCE only (0party.append,0add_to_party); everyparty.appendin the engine lives inside therecruit/load_canon_charactertools, gated onadd_to_party/kind.scripts/play.sh's solo cold-open prompt. Both branches — the authored-hero path and the DM-invents-PC path (byte-identical lines, MD5 matched) — instructed the DM: "A companion should ENTER as part of that opening scene … Recruit them into the party as that meeting lands." So a "solo" run recruited a sidekick on the very first DM turn.Reproduced live (before fix): a solo
play.shcold-open produced a 2-member party — the PC plus a silently-seated companion (the verified bug).Fix (option a — solo starts alone): rewrite that instruction in both cold-open branches so a SOLO session starts with the player ALONE — the DM does not recruit a companion at cold-open (no
recruit_companion/load_canon_character(add_to_party=true)for a sidekick, and no companion in the party). Companions are met later, in play, and only then introduced on-screen and recruited (the "voiced, with a real wound and a reason they fall in together" craft guidance is preserved, just deferred to the meeting). A roster figure may still appear as a face in the world, but not as a party member.play_party.sh— the multi-agent path where a pre-seeded AI companion is intended — untouched.Verified live (after fix): a fresh solo
play.shcold-open produced a 1-member party — the PC only; the opening narration names no companion. Before → after: party2 → 1. Acceptance met.Diff: 1 file, 2 lines (
bash -nclean).G5 — "I can't see the DM streaming" — VERIFIED ALREADY WORKS (no change)
skills/dungeon-master/SKILL.mdon current main already contains both pieces the task asked for:log_event(kind="narration", …)"; "Persist beat at the end. After the prose has streamed, callpersist_beatto commit the STATE deltas."The viewer's
/eventsreads the live chronicle (thelog_eventsink) with asince/seqcursor, so mid-turn narration surfaces immediately. A live beat confirmed narration appearing incrementally mid-turn (the/eventscount climbed across the turn rather than jumping once at the end) with\n\nparagraph breaks present.Verdict: streaming + paragraph breaks already work end-to-end on current
origin/main. Per "if streaming already works, say so and make no change," no skill change was made (no fabricated fix).Verification notes
scripts/play.sh(no engine code path); validated bybash -n+ a deterministic engine probe (empty seed party) + live before/after solo runs (party2 → 1).claude -pDM lane was intermittently dropping turns during testing (an environment/rate-limit condition, unrelated to this prompt change) — hence the do-not-close note and the ask to re-confirm on the real 8799 / .app playtest.Summary by CodeRabbit