11# Architecture Notes
22
3- Current repository scope is intentionally constrained.
3+ Kirie is evolving into an application framework with an embeddable low-level
4+ Godot plugin and IPC core. The repository scope is still intentionally
5+ constrained, but the constraint now applies to where higher-level behavior
6+ belongs, not to limiting the whole project to a minimum plugin shape.
47
5- We are standardizing only the minimum plugin shape needed to support :
8+ The low-level plugin and IPC core provide :
69
710- a Godot-facing Kirie service
811- a scene-friendly KirieNode node
@@ -12,8 +15,9 @@ We are standardizing only the minimum plugin shape needed to support:
1215- packaged ` res:// ` web resource loading for exported apps
1316- a repo-level platform integration test project
1417
15- Anything beyond that, such as broad application frameworks, is deferred until
16- the IPC model is proven. The current ` @gd-kirie/ipc ` package is intentionally
18+ Application-framework behavior such as CLI workflows, BrowserWindow-style
19+ composition, routing, export orchestration, and mobile development sessions
20+ belongs above that core. The current ` @gd-kirie/ipc ` package is intentionally
1721only a browser-side transport wrapper on top of the raw native bridge. Eventa
1822adapters live above Kirie and use that low-level text transport.
1923
@@ -154,19 +158,71 @@ Kirie does not own native platform project directories. Do not introduce
154158Capacitor-style ` ios/ ` or ` android/ ` project trees into Kirie user projects.
155159Native capabilities should be provided by Godot plugins.
156160
157- The planned Kirie CLI surface is intentionally small but covers the full local
158- app workflow :
161+ The planned Kirie CLI surface is intentionally small. The current implemented
162+ subset covers desktop development and local build inputs :
159163
160164``` sh
161165kirie dev
162166kirie build
163167kirie build web
164168kirie build dotnet
169+ ```
170+
171+ The broader application workflow should keep these command semantics. The
172+ ` --mode <mode> ` option is planned; the current implementation does not support
173+ it yet:
174+
175+ ``` sh
176+ kirie build [--mode < mode> ]
177+ kirie export [--mode < mode> ]
178+ kirie run [--mode < mode> ] [--export]
179+ kirie dev
165180kirie init
166181kirie doctor
167182kirie doctor --fix
168183```
169184
185+ ``` mermaid
186+ flowchart TD
187+ Command["User command"] --> Which{"Which command?"}
188+
189+ Which --> Build["kirie build\n--mode <mode>\ndefault: production"]
190+ Build --> BuildInputs["Prepare local inputs"]
191+ BuildInputs --> BuildDone["Finish"]
192+
193+ Which --> Export["kirie export\n--mode <mode>\ndefault: production"]
194+ Export --> ExportBuild["Prepare local inputs"]
195+ ExportBuild --> Package["Produce platform package"]
196+ Package --> ExportDone["Finish"]
197+
198+ Which --> Run["kirie run\n--mode <mode>\ndefault: production"]
199+ Run --> RunBuild["Prepare local inputs"]
200+ RunBuild --> RunExport{"--export?"}
201+ RunExport -->|yes| RunPackage["Produce platform package"]
202+ RunPackage --> RunPackageTarget["Run exported package"]
203+ RunExport -->|no| RunDirect["Direct run / deploy built outputs"]
204+
205+ Which --> Dev["kirie dev"]
206+ Dev --> DevServer["Start Vite hot-reload server"]
207+ DevServer --> DevDotnet["Build C#/.NET if configured"]
208+ DevDotnet --> DevTarget{"Target requires deploy package?"}
209+ DevTarget -->|desktop no| DevDesktop["Run Godot project directly"]
210+ DevTarget -->|mobile/deploy yes| DevPackage["Produce development package"]
211+ DevPackage --> DevDeploy["Install / launch / attach logs"]
212+ ```
213+
214+ In this model, ` build ` prepares local inputs, ` export ` packages those inputs,
215+ ` run ` runs or deploys the built inputs without exporting by default, and ` dev `
216+ runs a hot-reload development session. ` run --export ` is the explicit form for
217+ exporting before running; users may also run ` kirie export && kirie run ` when
218+ they want the steps separated. ` build ` , ` export ` , and ` run ` default to
219+ ` production ` mode and should accept ` --mode <mode> ` for ` development ` ,
220+ ` staging ` , or other user-defined modes once that option is implemented. ` dev `
221+ should never run the production web build because it owns the Vite hot-reload
222+ server; desktop development can run without exporting, while mobile or
223+ deploy-style development may use a development export path. ` dev ` may still
224+ build the Godot C#/.NET project when one is configured.
225+
170226` kirie dev ` starts a Vite development server, reads the actual resolved URL
171227after Vite listens, launches Godot as a child process, and injects:
172228
@@ -197,10 +253,13 @@ Godot C#/.NET project when one is configured or discovered. If no C# project is
197253configured or discovered, the aggregate ` kirie build ` command may skip the
198254` .NET ` step; if a C# project is present, C# build failure must fail the command.
199255
200- ` kirie export ` remains future work. When it exists, it should mean a complete
201- platform export workflow: build local inputs first, then call Godot's export
202- flow for the selected platform or preset. It should not silently create or
203- repair project configuration as part of export.
256+ ` kirie export ` and ` kirie run ` remain future work. ` kirie export ` should mean a
257+ complete platform export workflow: build local inputs first, then call Godot's
258+ export flow for the selected platform or preset. ` kirie run ` should build local
259+ inputs first, then directly run the scene or deploy the built outputs by
260+ default. It should only run an export workflow when the user passes
261+ ` --export ` . Neither command should silently create or repair project
262+ configuration.
204263
205264` kirie init ` and ` kirie doctor --fix ` are the explicit commands allowed to
206265write configuration. ` kirie init ` initializes Kirie-owned files and may register
0 commit comments