Phase 15 plan — quests, victory, and the authored example - #60
Merged
Conversation
Two blocking findings addressed: the milestone script restructures to two town trips so the town-only sell/heal beats precede the concluding return (victory makes them illegal after it), and the quest.py deletion census corrects to four consumers, adding docs/front-ends/tui-crawler.md whose snippet includes would fail the strict docs build. Non-blocking: a third and fourth spec amendment (the validation sentence's lifecycle-references clause moves to the executed seam; the view enumeration gains speaker), the no-JournalEntryAddedEvent-for-quest-beats pin, the referee-fiat boundary documented, fact 3 owning the progress-carrier reassignment, and the SetFlag reward re-justified on its merits. Claude-Session: https://claude.ai/code/session_01NQ83sqNnXVeXEd55NK1xR7
This was referenced Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implementation plan for phase 15: the quest spec, the four lifecycle commands with engine-owned quest state and player-visible events, adventure completion into
victory, active quests in the player view, the per-level ambient guidance slot, quest/objective validation, and the example rework — the fetch quest authored as adventure data, the interpreter registered,FetchQuestListenerdeleted.Notable decisions
TriggerClause(phase 14 pattern + phase 11 conditions); rewards are the existingConsequenceCommandunion under the existing selectors.TriggerSpecis deliberately not restructured around the clause model — its flat shape is serialized inside saved adventures, and the rename would be aschema_versionbump bought for symmetry.MarkTriggerFiredpin. The view must render names and narrative the log only references, so the lifecycle handlers resolve everything from the spec and reject unknown ids and state-contradicting commands (three new rejection codes).CompleteQuestdoes not check the completion rule: referee fiat is the surface's standing posture; the interpreter is a disciplined issuer.GameSession.__init__seeds the quest-state block from the adventure —new, load, and replay agree by construction; an activation-less quest emits no activation beat (spec amendment).AddJournalEntry, noJournalEntryAddedEventfor quest beats — the lifecycle event is the beat's event). This resolves the one-journal-field/four-beats collision: the separately authored journal form is the voice of carriers whose display beat the player never sees (a trigger'sfired). One narrative carrier is knowingly reassigned (progressmoves to the objective's own block) with the docstring rewritten to match.CompleteQuesthandler, mirroring_end_on_party_wipe(clear play state, stick in terminal modes). Rewards land after the transition because they are separately issued logged commands; resume-play rewards drop with notes under the phase 12 carve-outs.GearTemplate, matched byItemAcquiredPattern; the return objective composesTownEnteredPattern+has_item) and the economy retunes around pay-on-delivery, which restructures the milestone script into two town trips — the town-onlysell/healbeats must precede the concluding return, because victory makes them illegal after it.docs/adaptations.mdgains nothing (no SRD basis). Closing deliverable: the osr-forge issue recording its overrides schema has no quest surface.Review provenance
Drafted, then rubber-ducked by a fresh skeptical reviewer with the spec, prior plans,
AGENTS.md, the crawl code, the examples, and the test surfaces as its reading list. Round one: NEEDS REVISION — two blocking findings (the milestone script'ssell/healare town-mode-only and became illegal after the victory transition, forcing the two-trip restructure; thequest.pydeletion census misseddocs/front-ends/tui-crawler.md, whose snippet includes would fail the strict docs build) and six non-blocking (the third and fourth spec amendments, the journal-event pin, the referee-fiat boundary, owning the carrier reassignment, and re-justifying theSetFlagreward on its merits instead of assertion continuity). All eight accepted and revised; round two re-verified every fix, stress-tested the two-trip script against the shipped code (cache-take semantics, mode legality, award timing, activation re-matching), and returned SOLID.https://claude.ai/code/session_01NQ83sqNnXVeXEd55NK1xR7