Draft
Conversation
Replaces the Python FastAPI + WebSocket + LangGraph backend with a pure C# game engine that runs entirely client-side. The engine makes direct Anthropic API calls (Claude Haiku) instead of routing through the server, eliminating deployment complexity and latency. New GameEngine/ (.NET 8 class library): - State machine, goal system, action system ported from testing_8.py/actions.py - Direct Anthropic API client replacing LangGraph pipeline - Prompt builder with eval context assembly from reflexion.py - Terminal test harness with mock, interactive, and automated modes Unity integration (Assets/Scripts/): - GameManager.cs singleton wraps GameSession, loads from StreamingAssets - GameEngine/ pure C# sources compiled by Unity - WebSocketManager.HandleResponse made public for local response injection - csc.rsp enables C# 10 for Unity compiler compatibility - State/character/prompt data in StreamingAssets/GameData/ Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Collaborator
Author
|
Porting from this version of |
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.
Summary
GameEngine/) that replaces the Python FastAPI + WebSocket + LangGraph backend, making direct Anthropic API calls (Claude Haiku) from the clientpython_response_curator/to C# — includes terminal test harness with mock, interactive, and automated modesGameManager.csUnity MonoBehaviour that wraps the engine, loads data from StreamingAssets, and feeds responses into the existing WebSocketManager/Yarn dialogue pipelineWhat changed
GameEngine/— Standalone .NET 8 class library:Models/(GameState, GameSession, ActionDefinition, DrafterOutput),Systems/(ActionSystem, GoalSystem, StateLoader),LLM/(AnthropicClient, PromptBuilder, EvalContext),Data/(states, characters, prompts)Assets/Scripts/GameEngine/— Same pure C# sources compiled by UnityAssets/Scripts/GameManager.cs— Singleton wrapper wiring engine to Yarn/UIAssets/Scripts/WebSocketManager.cs—HandleResponse()visibility changed fromprivatetopublic(1 word)Assets/StreamingAssets/GameData/— State JSONs, character JSONs, prompt templatesAssets/csc.rsp— Enables C# 10 for Unity compiler.gitignore— Excludesconfig.json(API key), .NET build artifactsWhat is NOT changed
python_response_curator/is untouched — it remains as referenceTest plan
dotnet buildsucceeds for both GameEngine and TestHarness projectsdotnet run -- --mockpasses full state machine flow: intro → protein selection → lab transition → reflection → farewelldotnet run -- --config config.jsoninteractive mode with real Claude APIdotnet run -- --config config.json --autoautomated end-to-endGameManagerto scene, verify compilation🤖 Generated with Claude Code