godotmaker-cli 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +64 -0
- package/GETTING_STARTED.md +400 -0
- package/GETTING_STARTED.zh-CN.md +346 -0
- package/LICENSE +48 -0
- package/README.md +240 -0
- package/README.zh-CN.md +224 -0
- package/dist/run.js +2 -0
- package/package.json +50 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# godotmaker-cli
|
|
2
|
+
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#2](https://github.com/RandallLiuXin/GodotMakerApp/pull/2) [`f075453`](https://github.com/RandallLiuXin/GodotMakerApp/commit/f075453cb04bc57e30fef5056f80f7bb9f60fcef) Thanks [@RandallLiuXin](https://github.com/RandallLiuXin)! - Add an agent runner abstraction with Claude Code and Codex runner implementations, per-launch and config-driven agent selection, neutral preflight probing, Windows npm-shim agent launching, Codex PTY handoff, project-local Codex runtime validation, Git work-tree validation, and unknown-cost usage rendering for agents that do not report USD cost.
|
|
8
|
+
|
|
9
|
+
- [`ae4e72a`](https://github.com/RandallLiuXin/GodotMakerApp/commit/ae4e72a85a2c9ad7424f2018d140f98450c18271) Thanks [@RandallLiuXin](https://github.com/RandallLiuXin)! - Drop all numeric scoring from the evaluate path. `Evaluation` now carries a binary `verdict` (`approve` / `reject`) plus categorized issue arrays (critical / major / minor / gameplay / orphan tests); the legacy `overall` / `scores` / `passThreshold` model is gone. CLI surfaces the verdict in the Header eval cell as `✓ approved` (green) or `✗ Nc+Mm` (yellow, where N/M are critical / major counts); `--pass-threshold` flag and `pipeline.passThreshold` config are removed. Pre-v0.3.x `evaluation.json` files no longer parse — re-run `/gm-evaluate` to upgrade.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`e441348`](https://github.com/RandallLiuXin/GodotMakerApp/commit/e4413487d92b093e50aba1b6d04373ce823cf282) Thanks [@RandallLiuXin](https://github.com/RandallLiuXin)! - The accept stage no longer prompts mid-run for the `Bash` permission its decision-recording and stage-commit steps need; without it the user had to confirm each command and a denial halted the gate as a false failure.
|
|
14
|
+
|
|
15
|
+
- [`c10ebbb`](https://github.com/RandallLiuXin/GodotMakerApp/commit/c10ebbbbb79ef2b24e55334feec9ef897ea28f1c) Thanks [@RandallLiuXin](https://github.com/RandallLiuXin)! - Each cli launch resets iteration / build budgets to 0 (was a lifetime project cap that leaked across sessions); new `/refresh` slash command lets the user reset mid-session in idle / paused / finished / failed states.
|
|
16
|
+
|
|
17
|
+
- [`916c3b3`](https://github.com/RandallLiuXin/GodotMakerApp/commit/916c3b368c63aad21c1a03108bb1b27304dfacb7) Thanks [@RandallLiuXin](https://github.com/RandallLiuXin)! - `/start` on a failed pipeline now reliably retries the run; an earlier fix in this release cycle left the keystroke without effect.
|
|
18
|
+
|
|
19
|
+
- [`0d07944`](https://github.com/RandallLiuXin/GodotMakerApp/commit/0d07944e27699605e387f0797a594b127a99c52a) Thanks [@RandallLiuXin](https://github.com/RandallLiuXin)! - Interactive stages (scaffold, gdd, accept) now hold the cli pipeline panel for 2 seconds before launching the agent, so the stage change is visible instead of flashing past too fast to read.
|
|
20
|
+
|
|
21
|
+
- [`f3e3c7d`](https://github.com/RandallLiuXin/GodotMakerApp/commit/f3e3c7dccee6d9536dd40bf596979de312527b4f) Thanks [@RandallLiuXin](https://github.com/RandallLiuXin)! - Clarify package license terms for npm distribution and generated project ownership.
|
|
22
|
+
|
|
23
|
+
- [`8db205f`](https://github.com/RandallLiuXin/GodotMakerApp/commit/8db205fd4de00bc4f32347641f60fdeff61d742c) Thanks [@RandallLiuXin](https://github.com/RandallLiuXin)! - Cli no longer exits after a successful first framework publish (R-310 followup) — the TTY handoff publish needs to release the terminal was previously misclassified as a permanent exit.
|
|
24
|
+
|
|
25
|
+
- [`70e7f3c`](https://github.com/RandallLiuXin/GodotMakerApp/commit/70e7f3cc59edca719c6dc40b530d9165dc721f7f) Thanks [@RandallLiuXin](https://github.com/RandallLiuXin)! - Fix the header run timer so it includes the active pipeline state's elapsed time instead of only settled stages.
|
|
26
|
+
|
|
27
|
+
- [`614fb50`](https://github.com/RandallLiuXin/GodotMakerApp/commit/614fb50a29d7b3348e6e7699072dc1b14d9e0fb7) Thanks [@RandallLiuXin](https://github.com/RandallLiuXin)! - `/usage` "Recent runs" rows now show subagent dispatch + compaction counts as a tail clause (e.g. `3 subagents · 1 compaction`) when either is non-zero. Hidden otherwise to keep rows uncluttered on projects that do not have the upstream GodotMaker hook subsystem installed.
|
|
28
|
+
|
|
29
|
+
- [`7fb1a86`](https://github.com/RandallLiuXin/GodotMakerApp/commit/7fb1a86439aa2431d48a8ace588c6875501fb3f7) Thanks [@RandallLiuXin](https://github.com/RandallLiuXin)! - Fix: `/usage` "Recent runs" no longer shows duplicate entries after pausing via Ctrl-C or `q`. The cli was writing the same run summary to `usage.json` twice on the pause-and-unmount path — once from the paused branch and once from the post-loop persist block — producing two `recentRuns[]` entries with identical `startedAt`. The overlay rendered both rows and Ink reported a React key collision in the terminal.
|
|
30
|
+
|
|
31
|
+
- [`3f7eb8d`](https://github.com/RandallLiuXin/GodotMakerApp/commit/3f7eb8de1e7746bf70b9e8f48614c714de15287d) Thanks [@RandallLiuXin](https://github.com/RandallLiuXin)! - `/start` is now valid from `failed` as a retry path. Pipeline failure lives only in memory (it does not touch `pipeline_state.json`), so re-issuing `/start` simply re-enters the state machine at the unchanged `currentState` — transient causes (quota 429, stream error) typically recover on retry. The footer on the failure screen now surfaces the `/start` option alongside `q` / `/quit`, and the `finished` message is no longer conflated with `failed` ("already finished. Restart the cli with --fresh to start over." vs the retry-friendly failure footer).
|
|
32
|
+
|
|
33
|
+
- [`015df5f`](https://github.com/RandallLiuXin/GodotMakerApp/commit/015df5fb52db857fc944645f41ea9912139f4182) Thanks [@RandallLiuXin](https://github.com/RandallLiuXin)! - Codex interactive stages (scaffold, gdd, accept) no longer flicker the bottom status bar on Windows.
|
|
34
|
+
|
|
35
|
+
- [`f6f6598`](https://github.com/RandallLiuXin/GodotMakerApp/commit/f6f659836e34fa953de6b1ac6e784f4fbedeac7d) Thanks [@RandallLiuXin](https://github.com/RandallLiuXin)! - Treat non-quota Codex stream error events as diagnostic session output instead of stage failure results, so successful stages no longer fail after Codex recovers the stream connection.
|
|
36
|
+
|
|
37
|
+
- [`fc527b2`](https://github.com/RandallLiuXin/GodotMakerApp/commit/fc527b2a383fbad2b9379492d604cbd26329f13d) Thanks [@RandallLiuXin](https://github.com/RandallLiuXin)! - Interactive pipeline stages (`scaffold` / `gdd` / `accept`) now record token usage in `.godotmaker/usage.json`. Previously their `--output-format stream-json` path was disabled (the spawn inherits stdio, so the cli could not read claude's output) and the states ended every run with 0 tokens despite real work. The runner now scans Claude Code's per-session record at `~/.claude/projects/<encoded-cwd>/*.jsonl` after the interactive process exits and forwards the recovered per-model totals to the same usage handler the non-interactive states use. Cost stays undefined for these stages (the session jsonl does not record `total_cost_usd`); the tracker treats missing cost as zero, so $ math stays correct but under-counts interactive-state spend.
|
|
38
|
+
|
|
39
|
+
- [`d4ae310`](https://github.com/RandallLiuXin/GodotMakerApp/commit/d4ae310f17dadbb6dc5f1e38286c12eae53912f4) Thanks [@RandallLiuXin](https://github.com/RandallLiuXin)! - `runInteractive` now spawns the child claude session through a node-pty pseudo-terminal so keyboard input flows cleanly into claude on Windows. Adds `node-pty` as a runtime dependency.
|
|
40
|
+
|
|
41
|
+
- [`16b5ee9`](https://github.com/RandallLiuXin/GodotMakerApp/commit/16b5ee9e7c7bcdedebb8964be3a1de3d69b7a3ca) Thanks [@RandallLiuXin](https://github.com/RandallLiuXin)! - `/usage` "Recent runs" now shows a per-state breakdown line (e.g. `scaffold 6m10s · gdd 58s`) under any row whose run visited more than one state, and `.godotmaker/usage.json` `recentRuns[]` persists the same data alongside the run-level totals. Older usage.json files without the field load as an empty map.
|
|
42
|
+
|
|
43
|
+
- [`f65409f`](https://github.com/RandallLiuXin/GodotMakerApp/commit/f65409fe49025244909c2130811b4ab948628cce) Thanks [@RandallLiuXin](https://github.com/RandallLiuXin)! - Show whether project config has been created during preflight, and let interactive publishes pause after first creating `.godotmaker/config.yaml` so users can edit model settings before the pipeline starts.
|
|
44
|
+
|
|
45
|
+
- [`e649b4b`](https://github.com/RandallLiuXin/GodotMakerApp/commit/e649b4b5f7fc1b8a93a19d01cda943441351ee84) Thanks [@RandallLiuXin](https://github.com/RandallLiuXin)! - Echo upstream role model config during preflight.
|
|
46
|
+
|
|
47
|
+
- [`5ea064b`](https://github.com/RandallLiuXin/GodotMakerApp/commit/5ea064b9fafca920e4ebd407af6c27e331e52bff) Thanks [@RandallLiuXin](https://github.com/RandallLiuXin)! - Prepare the CLI for npm publishing with a bundled, minified, obfuscated runtime and a publish-ready release workflow.
|
|
48
|
+
|
|
49
|
+
## 0.1.0
|
|
50
|
+
|
|
51
|
+
Initial baseline. Consolidates pre-changesets internal history (former 0.1.0–0.3.0 releases). See git log for the full evolution and the frozen root `CHANGELOG.md` for narrative pre-baseline release notes.
|
|
52
|
+
|
|
53
|
+
### Capabilities at 0.1.0
|
|
54
|
+
|
|
55
|
+
- Ink-based 3-panel TUI (Header / Pipeline / Session) driving the core state machine (R-301).
|
|
56
|
+
- Slash commands: `/help`, `/quit`, `/start`, `/pause`, `/peek`, `/usage` with always-on input bar and overlay panel (R-303 / R-310 / R-312 / R-314).
|
|
57
|
+
- Live slash-command suggestion popup with Tab-complete and Enter-execute (R-315).
|
|
58
|
+
- Preflight panel + `/start` IDLE flow: cli mounts idle, waits for `/start` before running; `--auto-start` and non-TTY stdin auto-fire (R-304 / R-310).
|
|
59
|
+
- Graceful pause via `/pause` (typed) or Ctrl-C (unmount cleanup); resume target written to `pipeline_state.json` for `/start` to pick up (R-310).
|
|
60
|
+
- Token / cost / duration tracking surfaced live in the Header and detailed in the `/usage` overlay (R-314).
|
|
61
|
+
- Diagnostic `/peek` overlay: cross-stage tool history with per-tool status pairing (✓ / ✗ / …), full args, result preview, render hygiene for ANSI / control bytes (R-312 / R-318).
|
|
62
|
+
- Persistent rolling JSONL session logger at `~/.godotmaker/cli/logs/`, levels driven by `cli-config.yaml` (R-306).
|
|
63
|
+
- Interactive-handoff ASCII banner printed at TTY handoff so the operator keeps stage / iter context while the cli TUI is unmounted (R-308).
|
|
64
|
+
- Bilingual cli docs (`README.zh-CN.md`, `GETTING_STARTED.zh-CN.md`).
|
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
# Getting Started with godotmaker-cli
|
|
2
|
+
|
|
3
|
+
> 中文版:[GETTING_STARTED.zh-CN.md](./GETTING_STARTED.zh-CN.md) · Reference: [README.md](./README.md)
|
|
4
|
+
|
|
5
|
+
This guide walks you through your first end-to-end testing session.
|
|
6
|
+
It assumes you've never run the tool before. By the end you'll have:
|
|
7
|
+
|
|
8
|
+
1. Verified your environment without burning agent tokens.
|
|
9
|
+
2. Generated a complete Godot project from a one-line idea.
|
|
10
|
+
3. Touched all the failure / resume / interactive paths so nothing
|
|
11
|
+
surprises you in real use.
|
|
12
|
+
|
|
13
|
+
If anything in here doesn't match what you see, capture
|
|
14
|
+
`.godotmaker/` and the terminal output and file an issue.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 0. Prerequisites
|
|
19
|
+
|
|
20
|
+
| Tool | Version | How to verify |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| Node.js | 22+ | `node --version` |
|
|
23
|
+
| Claude Code CLI or Codex CLI | latest | `claude --version` or `codex --version` |
|
|
24
|
+
| Godot | 4.x | `godot --version` (or open the GUI) |
|
|
25
|
+
|
|
26
|
+
The selected agent binary must be on your PATH **and authenticated**. If
|
|
27
|
+
the version probe fails, install the selected agent CLI and reopen your shell.
|
|
28
|
+
|
|
29
|
+
The CLI auto-publishes the GodotMaker framework (`/gm-scaffold`,
|
|
30
|
+
`/gm-gdd`, `/gm-asset`, `/gm-build`, `/gm-verify`, `/gm-evaluate`,
|
|
31
|
+
`/gm-fixgap`, `/gm-accept`, `/gm-finalize`) into each project during
|
|
32
|
+
preflight, pinned to the version in `cliConfig.pinnedGodotmakerVersion`
|
|
33
|
+
(currently `v0.5.0`).
|
|
34
|
+
|
|
35
|
+
### Install or run the CLI
|
|
36
|
+
|
|
37
|
+
Use `npx` for one-off runs, or install the binary globally if you will
|
|
38
|
+
run several test sessions from different project folders:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npx godotmaker-cli --help
|
|
42
|
+
# or
|
|
43
|
+
npm install -g godotmaker-cli
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The rest of this guide uses the global `godotmaker-cli` command. If
|
|
47
|
+
you choose `npx`, replace it with `npx godotmaker-cli`.
|
|
48
|
+
|
|
49
|
+
For local development from a checkout, build first and optionally link
|
|
50
|
+
the workspace package:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
cd /path/to/GodotMakerApp
|
|
54
|
+
npm install
|
|
55
|
+
npm run build
|
|
56
|
+
npm link -w godotmaker-cli # optional: registers `godotmaker-cli` system-wide
|
|
57
|
+
godotmaker-cli --help
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Confirm tests + types are green before changing repo code (stay in the
|
|
61
|
+
repo root for these):
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npm test # vitest, fast — does NOT type-check
|
|
65
|
+
npm run typecheck # tsc --noEmit on both workspaces, includes test files
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Both should exit clean. `npm test` runs Vitest under esbuild (no type
|
|
69
|
+
checking), so a separate typecheck pass is what catches missing
|
|
70
|
+
fields and signature drift in test fixtures.
|
|
71
|
+
|
|
72
|
+
> Need to remove the local development link later? `npm unlink -w
|
|
73
|
+
> godotmaker-cli` from the same repo root.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 1. Smoke test with `--dry-run` (no tokens)
|
|
78
|
+
|
|
79
|
+
Dry-run walks the full 9-stage pipeline using local stubs. It
|
|
80
|
+
proves your install is wired up without spending agent credits.
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
mkdir test-pong && cd test-pong
|
|
84
|
+
godotmaker-cli --dry-run --auto-start
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
What you should see:
|
|
88
|
+
|
|
89
|
+
- The TUI launches: header, 9-row pipeline panel, session view, input bar, footer.
|
|
90
|
+
- A yellow `DRY-RUN` badge appears in the header area.
|
|
91
|
+
- Each row turns ✓ as its stub runs (≈1 second total).
|
|
92
|
+
- Footer turns green: `Pipeline complete. Press q or type /quit to exit.`
|
|
93
|
+
|
|
94
|
+
Files that should now exist:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
test-pong/
|
|
98
|
+
├── project.godot # stub project
|
|
99
|
+
├── GDD.md # stub design doc
|
|
100
|
+
└── .godotmaker/
|
|
101
|
+
├── pipeline_state.json # status: completed
|
|
102
|
+
├── stage.jsonl # 9 events, one per stage
|
|
103
|
+
├── evaluation.json # result: approve
|
|
104
|
+
└── final_report.json
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Press `q` or type `/quit` and Enter to exit.
|
|
108
|
+
|
|
109
|
+
**If any stage halts here, stop and fix it before going further.**
|
|
110
|
+
A dry-run failure means the wiring itself is broken.
|
|
111
|
+
|
|
112
|
+
### Try the slash commands while still on the dry-run output
|
|
113
|
+
|
|
114
|
+
Re-run dry-run without `--auto-start`, type `/start`, and before pressing `q`:
|
|
115
|
+
|
|
116
|
+
- Type `/help` Enter — overlay listing all commands and the hotkeys appears.
|
|
117
|
+
- Press any key to dismiss it.
|
|
118
|
+
- Look at the Header at the top of the TUI — it shows current stage
|
|
119
|
+
(in PipelinePanel below), iteration N/maxN, build try N/maxN, and
|
|
120
|
+
the last evaluation cell (`✓ approved` in green for the dry-run
|
|
121
|
+
happy path). No overlay needed; this info is always on screen
|
|
122
|
+
during a run.
|
|
123
|
+
- Type `/peek` Enter — under dry-run there is no live non-interactive
|
|
124
|
+
agent session to tail, so you'll see `no active agent session to tail.`
|
|
125
|
+
as a yellow message. In a real run during a non-interactive state
|
|
126
|
+
(build / verify / etc.), this opens a 1 Hz live tail of the active
|
|
127
|
+
state's stream-json + stderr; press any key to dismiss.
|
|
128
|
+
- Type just `/` (no command) — a popup appears under the input bar
|
|
129
|
+
listing every slash command. **Up / Down** navigate (wrap-around),
|
|
130
|
+
**Tab** completes the highlighted command into the buffer, **Enter**
|
|
131
|
+
auto-completes-and-runs it (so `/h` + Enter executes `/help`).
|
|
132
|
+
Matching is case-sensitive — `/H` shows nothing.
|
|
133
|
+
- Type `/foo` Enter — popup hides (no matches), yellow message:
|
|
134
|
+
`unknown command: /foo — try /help`.
|
|
135
|
+
- Type any character — message clears.
|
|
136
|
+
- Type `/quit` Enter — exits in any state (during a run, also aborts
|
|
137
|
+
the active selected agent child and writes a resume checkpoint to
|
|
138
|
+
`pipeline_state.json`; the next launch can `/start` to continue).
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## 2. Real first run (one authenticated agent account, ~10–30 min)
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
mkdir my-pong && cd my-pong
|
|
146
|
+
godotmaker-cli
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
The TUI opens in `idle` after preflight. Type `/start` to begin. If
|
|
150
|
+
you need unattended behavior, pass `--auto-start`.
|
|
151
|
+
|
|
152
|
+
Walk the 9 stages. Three of them are interactive — TUI hands the
|
|
153
|
+
terminal off to a selected-agent session, so you'll see that agent's own UI
|
|
154
|
+
for those.
|
|
155
|
+
|
|
156
|
+
### 2a. scaffold (interactive)
|
|
157
|
+
|
|
158
|
+
The selected agent asks for:
|
|
159
|
+
- **game name** — e.g. `Pong`
|
|
160
|
+
- **perspective** — `2D` or `3D`
|
|
161
|
+
|
|
162
|
+
When `/gm-scaffold` finishes, the selected agent exits. The TUI re-mounts. The
|
|
163
|
+
scaffold row turns ✓.
|
|
164
|
+
|
|
165
|
+
If `project.godot` did not appear in your project root, the run
|
|
166
|
+
halts. Recheck selected agent authentication.
|
|
167
|
+
|
|
168
|
+
### 2b. gdd (interactive)
|
|
169
|
+
|
|
170
|
+
The selected agent conducts a brief design interview (mechanics, win condition,
|
|
171
|
+
…). Answer succinctly. `GDD.md` lands in your project root.
|
|
172
|
+
|
|
173
|
+
### 2c. asset (auto, ~30 s – 2 min)
|
|
174
|
+
|
|
175
|
+
Runs in the background. The session view streams `[tool] Bash`,
|
|
176
|
+
`[tool] Read`, `[agent] ...` lines as the selected agent works. No input needed.
|
|
177
|
+
|
|
178
|
+
### 2d. build (auto, longest stage)
|
|
179
|
+
|
|
180
|
+
This is where the actual scenes / scripts get written. Default
|
|
181
|
+
idle-timeout is 900 s. This is not a wall-clock cap: it only fires
|
|
182
|
+
when the selected agent produces no stdout/stderr for that long. Watch
|
|
183
|
+
the session view to gauge progress; if nothing moves for 5+ minutes,
|
|
184
|
+
something may be stalled. `Ctrl-C` to abort.
|
|
185
|
+
|
|
186
|
+
### 2e. verify (auto)
|
|
187
|
+
|
|
188
|
+
Read-only check. Pipeline routes based on a freshness-checked
|
|
189
|
+
`stage.jsonl` event:
|
|
190
|
+
- pass → evaluate
|
|
191
|
+
- fail → build (counts toward `maxBuildAttempts`)
|
|
192
|
+
|
|
193
|
+
### 2f. evaluate (auto)
|
|
194
|
+
|
|
195
|
+
Writes `.godotmaker/evaluation.json` with a binary
|
|
196
|
+
`result: "approve" | "reject"` verdict plus categorized issue
|
|
197
|
+
arrays. Look at the Header's `eval` cell — `✓ approved` in green
|
|
198
|
+
on approve, `✗ Nc+Mm` in yellow on reject (N/M are critical /
|
|
199
|
+
major issue counts).
|
|
200
|
+
|
|
201
|
+
Routing:
|
|
202
|
+
- `verdict === "approve"` → **accept**
|
|
203
|
+
- `verdict === "reject"` AND max iterations reached → **accept**
|
|
204
|
+
(the agent escape hatch: `/gm-accept` triages and either OKs the
|
|
205
|
+
build or recommends a different SKILL — see 0509 e2e test session)
|
|
206
|
+
- otherwise → **fixgap**
|
|
207
|
+
|
|
208
|
+
### 2g. fixgap (auto, only when retrying)
|
|
209
|
+
|
|
210
|
+
Reads the latest evaluation, feeds it as guidance into a
|
|
211
|
+
build-style session, then re-enters verify. This is one full loop
|
|
212
|
+
of the Generator-Evaluator pattern.
|
|
213
|
+
|
|
214
|
+
### 2h. accept (interactive)
|
|
215
|
+
|
|
216
|
+
The selected agent shows you the project state and the evaluation, then asks
|
|
217
|
+
for a decision:
|
|
218
|
+
- `accept` → finalize → done
|
|
219
|
+
- `fix` → another fixgap loop with your free-form feedback
|
|
220
|
+
- `done` → pause the pipeline at accept; **next launch resumes here**
|
|
221
|
+
|
|
222
|
+
### 2i. finalize (auto)
|
|
223
|
+
|
|
224
|
+
`/gm-finalize` writes `final_report.json` with a consistency check
|
|
225
|
+
and archive summary. Pipeline complete; press `q`.
|
|
226
|
+
|
|
227
|
+
### Open the result in Godot
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
godot --path .
|
|
231
|
+
# or just: godot project.godot
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
You should be able to launch the project. If it crashes on launch,
|
|
235
|
+
the build was technically correct but functionally broken — that's
|
|
236
|
+
material for `/gm-fixgap` next iteration. Re-run with `--max-iterations`
|
|
237
|
+
bumped if you want more loops.
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## 3. Test the resume path
|
|
242
|
+
|
|
243
|
+
Resume is the most-used real-world path. Verify it works:
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
# in a project that paused at accept (you picked `done`):
|
|
247
|
+
godotmaker-cli
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
What to confirm:
|
|
251
|
+
- TUI re-launches; rows that already finished show ✓ from frame 0.
|
|
252
|
+
- Header shows the right `iter N/maxN`.
|
|
253
|
+
- Header's `eval` cell shows the previous run's verdict immediately
|
|
254
|
+
(not `--`) — this is the P1 fix: `restoreContext` reads
|
|
255
|
+
`evaluation.json` on resume.
|
|
256
|
+
|
|
257
|
+
Then test the destructive path:
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
godotmaker-cli --fresh
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
`.godotmaker/` clears (state, stage events, evaluation, report);
|
|
264
|
+
your `GDD.md`, scenes, scripts are untouched. Pipeline restarts at
|
|
265
|
+
scaffold.
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## 4. Test interactive handoff failure modes
|
|
270
|
+
|
|
271
|
+
Edge cases worth poking:
|
|
272
|
+
|
|
273
|
+
### 4a. `Ctrl-C` during an interactive stage
|
|
274
|
+
While inside `/gm-scaffold` (or `/gm-gdd` / `/gm-accept`) hit
|
|
275
|
+
`Ctrl-C`. The handed-off selected-agent session exits, control returns to
|
|
276
|
+
the cli, the unmount-cleanup hook writes a resume checkpoint, and
|
|
277
|
+
the cli exits. The next launch can `/start` to resume that state.
|
|
278
|
+
|
|
279
|
+
### 4b. `Ctrl-C` during an auto stage
|
|
280
|
+
Hit `Ctrl-C` while `build` or `evaluate` is running. Ink unmounts
|
|
281
|
+
the cli; the unmount-cleanup hook aborts the in-flight selected agent child
|
|
282
|
+
and writes a paused checkpoint to `pipeline_state.json`. The next
|
|
283
|
+
launch can `/start` to resume from the interrupted state. If you
|
|
284
|
+
want to pause WITHOUT exiting (cli stays mounted, `/start` resumes
|
|
285
|
+
immediately), type `/pause` instead.
|
|
286
|
+
|
|
287
|
+
### 4c. mid-run `q`
|
|
288
|
+
Try `q` while the pipeline is running. **Nothing happens** — `q` is
|
|
289
|
+
intentionally gated to non-running statuses (`idle` / `paused` /
|
|
290
|
+
`finished` / `failed`); the keystroke just falls through to the
|
|
291
|
+
input buffer. To exit during a run use `Ctrl-C` or `/quit` (both
|
|
292
|
+
abort the selected agent + write a checkpoint); to pause without exiting use
|
|
293
|
+
`/pause`. The footer should remind you `running… (/pause to pause,
|
|
294
|
+
Ctrl-C to exit; /help for commands)`.
|
|
295
|
+
|
|
296
|
+
### 4d. crash recovery
|
|
297
|
+
This is hard to trigger on purpose, but if a state throws an
|
|
298
|
+
unexpected error, `run.tsx` catches it, `unmountForCrash()` tears
|
|
299
|
+
Ink down cleanly (terminal returns to cooked mode), and the stack
|
|
300
|
+
trace lands on stderr. Test by hand only if you have a way to
|
|
301
|
+
inject a throw.
|
|
302
|
+
|
|
303
|
+
---
|
|
304
|
+
|
|
305
|
+
## 5. Configuration
|
|
306
|
+
|
|
307
|
+
### CLI flags (precedence: CLI > config.yaml > defaults)
|
|
308
|
+
|
|
309
|
+
```bash
|
|
310
|
+
node ... --agent codex --max-iterations 5 --model gpt-5.5
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
Use `--agent claude-code` or `--agent codex` to select the agent runtime
|
|
314
|
+
for one launch without changing project or global config. The CLI resolves
|
|
315
|
+
agent selection in this order: command-line flag, project config, CLI-global
|
|
316
|
+
config, then the default `claude-code`.
|
|
317
|
+
Default build / evaluate models are agent-aware: Claude Code uses `opus`,
|
|
318
|
+
while Codex uses `gpt-5.5`.
|
|
319
|
+
|
|
320
|
+
### Per-project config
|
|
321
|
+
|
|
322
|
+
Create `.godotmaker/config.yaml`:
|
|
323
|
+
|
|
324
|
+
```yaml
|
|
325
|
+
agent: codex
|
|
326
|
+
pipeline:
|
|
327
|
+
maxIterations: 5
|
|
328
|
+
maxBuildAttempts: 3
|
|
329
|
+
buildModel: gpt-5.5
|
|
330
|
+
evalModel: gpt-5.5
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
Idle-timeout for spawned non-interactive agent sessions is configured globally
|
|
334
|
+
via `~/.godotmaker/cli/config.yaml` (`idle_timeout_seconds`, default
|
|
335
|
+
900) — not per-project, because every workspace shares the same
|
|
336
|
+
machine-level definition of "the selected agent is wedged".
|
|
337
|
+
|
|
338
|
+
### Environment variables
|
|
339
|
+
|
|
340
|
+
- `GMA_DRY_RUN=1` — same effect as `--dry-run`. Useful for CI or one-off scripts.
|
|
341
|
+
|
|
342
|
+
---
|
|
343
|
+
|
|
344
|
+
## 6. What to capture in a bug report
|
|
345
|
+
|
|
346
|
+
```
|
|
347
|
+
.godotmaker/pipeline_state.json
|
|
348
|
+
.godotmaker/stage.jsonl
|
|
349
|
+
.godotmaker/evaluation.json # if it exists
|
|
350
|
+
.godotmaker/final_report.json # if it exists
|
|
351
|
+
project.godot # if it exists
|
|
352
|
+
GDD.md # if it exists
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
Plus the terminal output if you can scroll back. The TUI streams
|
|
356
|
+
real-time, so the post-mortem comes from these files + your
|
|
357
|
+
recollection of which stage halted.
|
|
358
|
+
|
|
359
|
+
---
|
|
360
|
+
|
|
361
|
+
## 7. Cheat sheet
|
|
362
|
+
|
|
363
|
+
```bash
|
|
364
|
+
# first time, verify install
|
|
365
|
+
godotmaker-cli --dry-run --auto-start
|
|
366
|
+
|
|
367
|
+
# real run
|
|
368
|
+
godotmaker-cli
|
|
369
|
+
# then type /start in the TUI
|
|
370
|
+
|
|
371
|
+
# resume after a pause
|
|
372
|
+
godotmaker-cli
|
|
373
|
+
|
|
374
|
+
# blow it all up and start over
|
|
375
|
+
godotmaker-cli --fresh
|
|
376
|
+
|
|
377
|
+
# more retries
|
|
378
|
+
godotmaker-cli --max-iterations 5
|
|
379
|
+
|
|
380
|
+
# inside the TUI
|
|
381
|
+
/start # begin (or resume after a pause) the pipeline
|
|
382
|
+
/pause # pause the running pipeline (cli stays mounted; /start to resume)
|
|
383
|
+
/refresh # reset iteration / build budget (idle / paused / finished / failed; /pause first if running)
|
|
384
|
+
/help # commands list
|
|
385
|
+
/peek # live tail of the active agent session (non-interactive states only)
|
|
386
|
+
/usage # token / cost / time totals (this run + project lifetime)
|
|
387
|
+
/quit # exit in any state; during a run also aborts the selected agent + writes a resume checkpoint
|
|
388
|
+
q # exit, but only when not running (input bar empty); same checkpoint path as /quit
|
|
389
|
+
Ctrl-C # exit in any state; during a run also aborts the selected agent + writes a resume checkpoint
|
|
390
|
+
Esc # clear input buffer
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
---
|
|
394
|
+
|
|
395
|
+
## Where to go next
|
|
396
|
+
|
|
397
|
+
- Reference docs: [`README.md`](./README.md)
|
|
398
|
+
- Design / internals: [`../docs/design/cli-design.md`](../docs/design/cli-design.md)
|
|
399
|
+
- Roadmap: [`../ROADMAP.md`](../ROADMAP.md)
|
|
400
|
+
- Upstream skill source: [GodotMaker](https://github.com/RandallLiuXin/GodotMaker)
|