English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

GoDotter: An AI-Native Editor Plugin Architecture for Godot 4.3+

Forum topic · ✨步子哥 · 2026-05-20

Summary

GoDotter is an open-source, AI-native editor plugin for Godot 4.3+, positioned as a 'Cursor for Godot.' It ships as a single addons/GoDotter/ folder containing both the GDScript EditorPlugin and a bundled local Python FastAPI backend (default 127.0.0.1:8765). The plugin layer provides the Forge Dock UI (chat, plan, inspect, diff, memory, settings), an EditorBridge that builds context bundles from the open scene, selected nodes, and scripts, plus safety, diff, logging, and screenshot modules. The backend handles project indexing, LLM orchestration (Google Gemini primary; OpenAI, Claude, and OpenAI-compatible endpoints supported), plan generation and execution, visual map analysis, log-driven fixes, and project memory. Design principles are plan-first, diff-before-execute, and conservative-by-default: file edits are disabled unless explicitly enabled, and every write passes dual safety gates (client SafetyManager.gd and backend safety.py) with approval modes from review to autopilot. Sensitive paths are blocked, keys stay out of git, and only LLM API calls leave the machine. The architecture document details the request pipeline, Plan JSON schema, HTTP API surface, security model, and extension points.

GoDotter: Full Architecture Breakdown

This is an English summary of the GoDotter architecture document. GoDotter (GitHub repo) is an AI-native editor plugin for Godot 4.3+ — described by its author as a "Godot version of Cursor."

Key points

  • Two-layer architecture: a Godot EditorPlugin (GDScript) plus a local Python FastAPI backend, launched by the plugin via OS.create_process (default 127.0.0.1:8765, scanning up to 64 ports if occupied).
  • Single-folder distribution: copying addons/GoDotter/ into any Godot project installs the full product, backend included. MIT-licensed, v0.2.0.
  • AI providers: Google Gemini primary; settings also support OpenAI, Claude, and OpenAI-compatible endpoints. Only LLM API calls leave the machine — project files stay local.
  • Core workflow: plan first → show diff → execute on approval. EditorBridge builds a context bundle (current scene, selected nodes, open scripts, project root); AgentClient POSTs it to the backend; the backend combines project index, memory files, and token budgeting into prompts and returns a structured JSON Plan.
  • Godot plugin layer (GDScript)

  • GoDotter.gd — EditorPlugin entry: mounts the Forge Dock, spawns the backend process, captures editor logs and signals.
  • ForgeState.gd — settings split into machine-level (godotter/machine/) and project-level (godotter/project/) keys in EditorSettings. Defaults are safe: enable_file_edits = false, approval_mode = "review".
  • ForgeDock.gd — main UI with tabs: Chat (multi-session, image attachments, thinking traces), Plan, Inspect, Diff, Memory, Settings.
  • Supporting modules: AgentClient, DiffManager, TaskQueue, SafetyManager, DebugVisualizer (Neon Visual Map), ScreenshotCapture, LogCollector, MemoryIndex, SetupWizard, and schema/prompt references in agents/.
  • Python backend layer

  • Stack: FastAPI + uvicorn, google-genai, httpx, Pydantic v2, Pillow, python-dotenv.
  • Key modules: app.py (FastAPI app), task_orchestrator.py (Architect planning / execution), agent_run.py (plan → validate → execute loop), project_indexer.py, context_engine.py, gemini_client.py, code_tools.py, safety.py, visual_map.py, asset3d_review.py, memory_store.py, token_policy.py.
  • REST surface (selected): POST /agent/plan, POST /agent/execute, POST /agent/run, POST /project/index, POST /project/context, POST /agent/visual_map, POST /agent/fix_from_logs, POST /tools/read_file|write_file|revert_file, GET /tools/git_status, GET /memory, GET /health.
  • The Plan JSON schema includes summary, relevant_files/relevant_scenes (must come from the index — no invented paths), assumptions, risks, steps, validation_plan, and approval_required. Client AgentSchemas.gd mirrors backend Pydantic schemas.
  • Security and trust model

    Double gate: user settings (file edits off by default; approval modes review / assisted / autopilot / yolo; per-run file and line caps) → SafetyManager.gd and safety.py (blocked paths like addons/, .godt//.godot/, project.godot; dangerous operation blacklist; review requires UI approval) → writes go through backup, optional git checkpoint, and diff-panel revert. API keys live in .env / .godotter_api_key* / config.json, all gitignored.

    Distinctive workflows

  • Neon Visual Map: colorize the scene tree by node type, screenshot the editor viewport, and send image + node spatial mapping to the LLM for layout analysis.
  • Fix from logs: live log capture (GoDotterEditorLogger + debugger hook → LogCollector) feeds /agent/fix_from_logs for batch fix plans.
  • Project memory: Markdown notes under .godot_forge/memory/ (gitignored) injected into planning context.
  • Chat images: files, drag-drop, or clipboard, sent as Base64 into plan/execute/run calls.
  • Boundaries and extension

    Explicit non-goals: not a replacement for learning Godot, not a managed SaaS (backend must run locally), not a general-purpose IDE. Extension points: new slash commands/chat modes in ForgeDock.gd + backend endpoints; new tools in app.py + code_tools + safety rules; new LLM providers in gemini_client.py / ai_model_settings.py; new context sources via EditorBridge / project_indexer / memory_store.

    Verification

  • GDScript: godot --headless --path <repo> --check-only
  • Python tests: cd addons/GoDotter/backend && python -m unittest discover -s tests -v
  • Plan integration test requires GEMINI_API_KEY (skips otherwise).
Both plugin and backend are at v0.2.0; the dev project targets Godot 4.6 while the plugin supports 4.3+.

Tags

#godot#godot-plugin#ai-agent#fastapi#gemini#editor-plugin#gamedev#llm

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/177620495