Skip to content

Commit 445aa1b

Browse files
authored
docs(cli): flow chart for build command (#35)
1 parent 52c16ba commit 445aa1b

3 files changed

Lines changed: 108 additions & 36 deletions

File tree

AGENTS.md

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
11
# AGENTS
22

3-
This repository is an experimental but intentionally reusable Godot plugin
4-
project.
3+
This repository is an experimental Godot application framework built around an
4+
intentionally reusable low-level WebView plugin and IPC core.
55

66
## Current Scope
77

8-
The current milestone is limited to:
8+
The low-level plugin and IPC milestone covers:
99

1010
1. create a platform WebView
1111
2. establish bidirectional IPC between Godot and the WebView
1212
3. support packaged `res://` web content loading enough for bridge tests
1313
4. add desktop Godot CEF compatibility, starting with macOS
14-
5. stabilize the Kirie plugin shape before adding larger tooling layers
14+
5. stabilize the Kirie plugin shape used by higher-level framework tooling
1515

16-
Do not introduce extra packages, adapters, or broad CLI workflows unless they
17-
are required to make the current IPC milestone work. The existing
18-
`@gd-kirie/ipc` package is a thin browser-side transport wrapper; do not expand
19-
it into an application event or invocation layer unless the user explicitly asks
20-
for that higher-level work. The planned Kirie CLI exception is limited to the
21-
core app workflow described below: development, local build inputs,
22-
initialization, and diagnostics.
16+
Application-framework behavior belongs above the low-level plugin and IPC core.
17+
The existing `@gd-kirie/ipc` package is a thin browser-side transport wrapper;
18+
do not expand it into an application event or invocation layer unless the user
19+
explicitly asks for that higher-level work. The planned Kirie CLI owns the app
20+
workflow described below: development sessions, local build inputs, export and
21+
run semantics, initialization, and diagnostics.
2322

2423
The mobile IPC v1 experiment keeps Kirie core byte-oriented and CBOR-based with
2524
text, binary, and data lanes. JSON belongs to callers or adapters, not to Kirie
@@ -143,7 +142,7 @@ The planned Kirie app layout is:
143142
- `addons/kirie/`
144143
- optional `addons/godot_cef/`
145144

146-
Kirie CLI should be installed through npm and expose these planned commands:
145+
Kirie CLI should be installed through npm. The current foundation commands are:
147146

148147
- `kirie dev`: start the Vite development server, launch Godot as a child
149148
process, and inject `KIRIE_DEV=1` and
@@ -158,9 +157,22 @@ Kirie CLI should be installed through npm and expose these planned commands:
158157
- `kirie doctor`: diagnose project configuration without writing files.
159158
- `kirie doctor --fix`: explicitly repair supported configuration problems.
160159

161-
Keep `kirie create`, `kirie export`, and mobile dev targets outside the current
162-
CLI scope. These may be implemented later when explicitly planned. Future
163-
mobile dev targets should use a unified platform and device selector such as
160+
The broader app workflow should keep these command semantics:
161+
162+
- `kirie build [--mode <mode>]`: prepare local inputs and finish. The default
163+
mode is `production`; `development` and custom modes are planned but not
164+
implemented yet.
165+
- `kirie export [--mode <mode>]`: build first, then produce a platform package.
166+
- `kirie run [--mode <mode>]`: build first, then directly run the scene or
167+
deploy built outputs by default.
168+
- `kirie run --export`: explicitly export before running the exported package.
169+
- `kirie dev`: start the Vite hot-reload server and run a development session;
170+
do not run the production web build. Desktop development can run without
171+
exporting, while mobile or deploy-style development may use a development
172+
export path. C#/.NET may be built when configured.
173+
174+
Keep `kirie create` outside the current CLI scope. Future mobile dev targets
175+
should use a unified platform and device selector such as
164176
`kirie dev ios --device <selector>` or
165177
`kirie dev android --device <selector>`; do not expose simulator and real device
166178
as separate user-facing target names.

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# godot-kirie
22

3-
Kirie is an experimental Godot plugin project for embedding platform WebViews and
4-
building IPC between Godot and web content.
3+
Kirie is an experimental Godot application framework built around an embeddable
4+
low-level Godot WebView plugin and IPC core.
55

66
## Installation
77

@@ -70,20 +70,21 @@ example, and regression-test areas:
7070

7171
Primary references live in [docs/references.md](docs/references.md).
7272

73-
The first milestone is limited to:
73+
The low-level plugin and IPC milestone covers:
7474

7575
1. Create a WebView on mobile and desktop platforms.
7676
2. Establish bidirectional IPC between Godot and the WebView.
7777
3. Support packaged `res://` web content loading for bridge tests.
7878
4. Add desktop Godot CEF compatibility, starting with macOS.
79-
5. Stabilize the minimum Kirie plugin shape before adding adapters and tooling.
80-
81-
At this stage, Kirie is intended to stay a low-level WebView and IPC bridge. A
82-
small `@gd-kirie/ipc` browser package exists as a convenience transport wrapper.
83-
Eventa adapters live above that bridge: `@gd-kirie/ipc-eventa` for browser
84-
pages, and `GdKirie.EventaAdapter` for .NET 10 C# projects. The C# surface is a
85-
thin `KirieClient` wrapper over the same platform singleton used by GDScript,
86-
with C# events for the current Kirie signals.
79+
5. Stabilize the Kirie plugin shape used by higher-level framework tooling.
80+
81+
The plugin and IPC layers are intended to stay low-level WebView and IPC
82+
surfaces. A small `@gd-kirie/ipc` browser package exists as a convenience
83+
transport wrapper. Eventa adapters live above that bridge:
84+
`@gd-kirie/ipc-eventa` for browser pages, and `GdKirie.EventaAdapter` for
85+
.NET 10 C# projects. The C# surface is a thin `KirieClient` wrapper over the
86+
same platform singleton used by GDScript, with C# events for the current Kirie
87+
signals.
8788

8889
The mobile IPC experiment uses explicit text, binary, and data lanes over CBOR
8990
packets. The browser package encodes and decodes those packets with `cborg`.

docs/architecture.md

Lines changed: 69 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
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
1721
only a browser-side transport wrapper on top of the raw native bridge. Eventa
1822
adapters 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
154158
Capacitor-style `ios/` or `android/` project trees into Kirie user projects.
155159
Native 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
161165
kirie dev
162166
kirie build
163167
kirie build web
164168
kirie 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
165180
kirie init
166181
kirie doctor
167182
kirie 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
171227
after 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
197253
configured 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
206265
write configuration. `kirie init` initializes Kirie-owned files and may register

0 commit comments

Comments
 (0)