Parser to Dev#3
Merged
Merged
Conversation
Introduce the first parser-mediator pipeline with explicit context, action, and result JSON stages for LOOK, TAKE, and INVENTORY commands. Separate console commands from gameplay parsing, switch console tooling to #RUN/#HALT/#HELP/#CLS, and add #PEEK-ON/#PEEK-OFF for parser execution tracing. Filter parser context to text-relevant entities, update test scene/text assets used for validation, and extend GDD with the current parser architecture, executor contract, console commands, and near-term roadmap.
Hide TA controls for Walkbox objects and hard-block Walkbox text asset operations in the text asset manager. Preserve scene text assets on Save As by carrying the previous scene TA to the new scene id when needed, while still creating a default TA when no prior asset exists.
Shift the parser from a message-producing executor pipeline toward an orchestrator flow built around semantic game API calls and structured outcomes. Add game.look, game.take, game.showInventory, and game.goTo with shared outcome contracts, introduce pending clarification state in the parser, and update parser service text plus GDD to match the new architecture.
Introduce scene registry plus adaptive cache eviction for loaded scenes.\nChoose cache budget from device memory class and log the detected profile on startup.\nShow editor cache stats as MEM x | y in the bottom bar.\nUpdate scene save/save-as flow and game.goTo() to work with the new registry/cache model.
Rework scene caching around texture-first memory weighting so scene eviction better tracks real image cost.\nAdd scene-aware image cache metadata with active/warm/cold states and cold-first LRU eviction.\nExpose updated scene memory profiler data and document the profiler workflow in GDD technical implementation notes.
Use player.moveTo() instead of player.walkTo() when game.goTo targets an in-scene object, so unreachable targets behave like mouse clicks and the actor walks as close as possible instead of failing immediately.
Centralize entity resolution for look, take, and goTo so parser-facing commands share the same matching rules across exact title/id matches and partial title matches. Add clarification prompts for ambiguous matches, preserve pending clarification flows in the parser, and make disabled entities invisible to parser/runtime object lookup as required by the GDD.
Ensure runtime and parser-adjacent messages use TA titles instead of technical object IDs. Escalate stage-1 cases that would need to name untitled objects in success or clarification flows, and fall back to generic engine text when naming is not possible. Also prevent locked-item and distance messages from exposing raw IDs.
Introduce parser stage 2 with NLP.js-based intent recognition for look/take/go-to/inventory, plus parser debug support for stage2 and console toggles for parser staging. Add #STAGE1-ON and #STAGE1-OFF, extend #PEEK output with NLP diagnostics, and wire async parser flow through the UI layer. Refactor parser architecture so language interpretation stays inside Parser instead of leaking into Game and SceneManager. Replace string-target Game methods with resolved-target APIs (lookScene, lookEntity, examineEntity, takeEntity, goToScene, goToEntity), move scene/entity textual resolution and ambiguity handling into Parser, remove Scene title-based entity lookup, and remove the old SceneManager textual scene-target helper. Add inventory-aware parser target resolution for non-movement actions and introduce a separate EXAMINE action with stage1 aliases EXAMINE/X/CHECK/INSPECT and NLP intent support. EXAMINE reads the TA field details, escalates when details are missing, and is allowed for inventory items, active subscene objects, or nearby objects using the same distance threshold as item pickup. Improve target normalization and matching across cascades, including shared target cleanup, clarification prompts, partial matching, disabled-object exclusion, and player-facing message safety. Update parser/system TA strings, component distance helpers, and supporting test scene/text assets used to validate the new parser behavior end-to-end.
Add Parser.md describing the Scanline parser as mediator, orchestrator, and Game Master for Blue Signal. Document the separation between Player Input and Parser Context, the role of Context Builder and future Scope Builder, the sequential cascade model (Stage 1.1 regex, Stage 1.2 NLP, future Stage 2 LLM), and the central role of Parser Core. Include Mermaid diagrams for the high-level parser flow, Stage 1 flow, Core flow, clarification loop, and future stage-2 plan execution. Document why Game/runtime must stay language-agnostic, how resolved targets are passed into Game API, and how Core can escalate both before and after API calls. Also capture the first draft of the constrained parser DSL for future LLM planning, plus parser language-asset principles and the roadmap toward richer scope, relations, and world understanding.
Move stage1 lexicon and stage2 NLP training data out of code and into dedicated parser text assets so the parser language layer can evolve independently of parser logic. Add parser lexicon/training loading to TextAssetManager, switch stage1 and stage2 to consume the same language pack, and introduce parserLanguage helpers for asset-driven command matching and target normalization. Add console-side gameplay preprocessing so single-letter shorthands are expanded before gameplay parsing: I -> INVENTORY, X -> EXAMINE..., L -> LOOK.... Keep these aliases out of the parser lexicon itself. Add #STAGE2-ON and #STAGE2-OFF to control the NLP cascade independently from stage1. Update parser flow so stage2 handoff is skipped when disabled. Also update Parser.md to document the current language-asset layout and how stage1 and stage2 consume it.
Update Parser.md to reflect the agreed parser contract more precisely: Game API is a shared gameplay API used by parser, UI, scripts, and game logic; Stage 1.1 and Stage 1.2 both follow the same intent -> target -> envelope flow; the parser DSL is described as a unified protocol for all cascades rather than a special Stage 2 format; object TA now includes optional synonyms as parser-owned text knowledge; and parser debugging docs now include Stage 2 toggles.
Introduce ParserWorldModelBuilder to produce parser context and scope together, replace ad-hoc resolution with scope-driven target lookup, and add parser-owned synonym support via object text assets. Unify stage1 regex and stage1 NLP outputs under a shared ParserCascadeEnvelope so both cascades speak the same Core-facing protocol. Also extend TextAssetManager with list-field support and include synonyms in the default object TA template. Update tasks.md to reflect the completed scope/world-model work and the start of Step 3.
Add a scene-owned spatial hierarchy for entities and subscenes, with editor authoring fields for parent/relation metadata and nested hierarchy rendering in the scene tree. Integrate spatial data into ParserWorldModelBuilder so relation queries like LOOK UNDER / IN / BEHIND execute against runtime world structure instead of fallback-only parser logic. Tighten parser context for future LLM use by removing noisy empty fields, normalizing spatial nodes, preventing technical ids from leaking to players, and moving scene-transition resolution out of parser scope into Game.
Apply the same spatial-tree ordering and indentation logic used for entities to triggerboxes and walkboxes in the editor hierarchy panel, so nested scene objects render consistently regardless of object type.
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.
No description provided.