@taptap/maker 0.0.38-beta.1 → 0.0.39-beta.1

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.
@@ -0,0 +1,252 @@
1
+ # Initialize or Clone
2
+
3
+ Read only for project creation, initialization, clone or login recovery.
4
+
5
+ ## Create New Maker Project Intent
6
+
7
+ Standard initialization, clone, download, continue, or "pull remote project" requests use
8
+ `taptap-maker init`; the CLI shows the Maker app list and asks the user to choose an existing app
9
+ or `0`/`new`. Add `--create` only when the user clearly asks to create a new Maker project.
10
+
11
+ Treat these user phrases as an explicit request to create a new Maker project:
12
+
13
+ - 创建新项目
14
+ - 创建项目
15
+ - 创建maker项目
16
+ - 创建 Maker 项目
17
+ - 创建游戏
18
+ - 创建新游戏
19
+ - 创建新游戏/项目
20
+ - 新建项目
21
+ - 新建游戏
22
+
23
+ When this intent is present, project creation has higher priority than matching an existing app by
24
+ name. If the current directory is unbound, guide the user into the Maker init creation path:
25
+
26
+ ```bash
27
+ taptap-maker init --create
28
+ ```
29
+
30
+ If the user already provided a project/game name, pass it explicitly:
31
+
32
+ ```bash
33
+ taptap-maker init --create --name "<PROJECT_NAME>"
34
+ ```
35
+
36
+ If no name is provided, ask for the project name or suggest the current directory name as the
37
+ default, but do not silently invent a name. If the current directory is already bound to a Maker
38
+ project, do not create a new project there; tell the user to open or create a new independent
39
+ directory first. A same-name app may be shown as an alternative existing-project choice, but a
40
+ same-name app must not override the user's explicit create-project intent.
41
+
42
+ ## Initialization Workflow
43
+
44
+ Trigger phrases include:
45
+
46
+ - 我要开发 Maker 游戏
47
+ - 本地 Maker 开发
48
+ - 拉取 Maker 游戏到本地
49
+ - clone Maker 项目
50
+ - 下载 Maker 项目代码
51
+ - 初始化 Maker 项目
52
+ - 初始化 Maker 开发目录
53
+ - 配置 Maker 本地开发
54
+ - 打开/继续开发 Maker 项目
55
+
56
+ Workflow:
57
+
58
+ 1. Run `taptap-maker doctor` for the user's intended Maker directory, or read `maker://status` when
59
+ the MCP server is already available.
60
+ 2. If the status reports the current directory is already bound to a Maker project, stop the
61
+ initialization/clone path. Continue with the user's current intent in that bound project. Do not
62
+ ask which app to clone unless the user explicitly asks to switch or re-clone.
63
+ 3. If Git is missing, stop. Tell the user Git is required for clone/submit/build-side Git work.
64
+ 4. Python plus `maker-lua-lsp` is the local Lua diagnostics prerequisite for Maker local
65
+ development. `taptap-maker init` checks Python before PAT, app list, clone, and MCP config
66
+ installation. If Python is not ready, init tries `taptap-maker python setup` up to 3 total
67
+ attempts. After Python is ready, setup best-effort creates a Maker private LSP venv,
68
+ installs/upgrades `maker-lua-lsp` there, and runs
69
+ `maker-lua-lsp install --ide codex,cursor,claude`; LSP failure should be reported but must not
70
+ block remote build. If Python setup still fails, explain that init has paused before
71
+ login/project clone/MCP config, then guide the user to retry `taptap-maker python setup` with
72
+ the current AI or install Python 3.12 manually and run `taptap-maker python doctor`.
73
+ 5. Run `taptap-maker init` in the user's intended Maker directory. The CLI will request PAT if
74
+ missing, fetch TapTap token, show a paged app preview, ask the user to choose or create a Maker
75
+ project, clone the Maker project, prepare the AI dev kit, and install/verify MCP config.
76
+ For ordinary init/clone/download requests, use `taptap-maker init` so the CLI shows the app
77
+ list first. Add `--create` only when the user clearly asks to create a new Maker project.
78
+ The app preview always includes `0,创建新项目 / 0. Create a new Maker project`. This row must
79
+ remain visible when an AI summarizes or truncates a long app list, even if another app name
80
+ appears to match the current directory. Users can choose `0`/`new` and enter a project name,
81
+ or use `taptap-maker init --create --name "my-local-game"` for non-interactive runs.
82
+ User-level MCP config never pins the selected Maker project directory as `cwd`. Clients that
83
+ support MCP Roots should let the current workspace root identify the Maker project. If a client
84
+ does not support MCP Roots, pass the real project directory as `target_dir` on the concrete
85
+ Maker tool call. Never rewrite shared user-level MCP config to switch projects.
86
+ Tell the user that the first Maker clone can take 20+ seconds because the server may be
87
+ preparing the repository, and that they should keep the command running while the CLI retries
88
+ transient 503/5xx failures.
89
+ 6. If the CLI reports ordinary local files or parent Git repository risk, explain the warning and
90
+ ask whether the user wants to continue in this directory or switch to a clean independent one.
91
+ 7. After clone succeeds, run `taptap-maker doctor` again or explain that `.maker-mcp/config.json`
92
+ now binds the directory to the Maker project.
93
+ 8. Tell the local AI/Agent to use the `taptap-maker-dev-kit-guide` skill for the installed dev-kit
94
+ resources, especially `CLAUDE.md`, `examples/`, `templates/`, and `urhox-libs/`.
95
+
96
+ Keep the user-facing explanation short:
97
+
98
+ ```text
99
+ 我会先用 Maker CLI 检查本机 Git、PAT 和当前目录是否已绑定 Maker 项目。
100
+ 如果还没有本地鉴权,CLI 会打开 Maker 授权页;授权完成后拿到项目列表,你选游戏,我再拉代码。
101
+ ```
102
+
103
+ ## PAT Handling
104
+
105
+ If local Maker auth is missing or expired, run `taptap-maker login`. The CLI opens the Maker auth
106
+ page and polls the authorization result; do not ask the user to open a PAT page or manually paste a
107
+ PAT for normal local development. `taptap-maker pat set <PAT>`, `--pat PAT`, and `--pat-stdin` are
108
+ compatibility fallbacks for CI or emergency debugging only. Do not put PAT directly in argv unless
109
+ the user explicitly accepts the ps/shell-history exposure. If the directory is already bound, treat
110
+ `taptap-maker apps` output as account reference only and continue the user's current bound-project
111
+ task.
112
+
113
+ If PAT exchange fails:
114
+
115
+ 1. Ask the user to run `taptap-maker login` again.
116
+ 2. Do not switch to JWT/OAuth fallback or manual PAT fallback unless the user explicitly asks for
117
+ CI/emergency debugging.
118
+
119
+ ## App Selection
120
+
121
+ Use app selection only when the current directory is unbound and the user is initializing or cloning
122
+ a Maker project, or when the user explicitly asks to switch or re-clone.
123
+
124
+ If the current directory is already bound, app lists from `taptap-maker apps` are reference only.
125
+ Continue operating on the current bound project. When the user explicitly requests a different
126
+ project or wants to create a new project, require a new independent directory before starting the
127
+ project selection or creation flow.
128
+
129
+ When app selection is needed, show the returned app preview and total count, then ask the user to
130
+ choose by index, app id, or name. The default preview shows the 40 most recently active apps.
131
+ If the target is not visible, ask the user to type `all` inside `taptap-maker init` to expand the
132
+ full list, or run `taptap-maker apps --all` for a one-shot human-readable dump; use
133
+ `taptap-maker apps --json` only when AI / scripts need the machine-readable list. If the
134
+ chat/client width is enough, you may present the preview as a compact two-column layout;
135
+ otherwise keep a single column. Keep app_id visible in every app row, and include the preview
136
+ details instead of only a summary such as "40 apps are available". Always preserve and show
137
+ `0,创建新项目 / 0. Create a new Maker project`, because it is the supported creation entry even
138
+ when the app preview is cropped or a same-name app exists.
139
+
140
+ Selection confirmation:
141
+
142
+ - Ask the user to choose by index, app id, or name.
143
+ - If the user wants a new project, tell them to choose `0`/`new` in `taptap-maker init` and enter a
144
+ project name; do not invent a project name unless the user explicitly asks the AI to name it.
145
+ - Treat the user's explicit reply as the selected app.
146
+ - If there is only one app, still ask for confirmation before selecting it.
147
+
148
+ After the user chooses or creates a project, route the next action to `taptap-maker init` so the
149
+ Maker initialization workflow can continue. For non-interactive CLI runs, pass the selected app id
150
+ through the supported CLI option, or use `--create --name <NAME>` for creation.
151
+
152
+ ## Working Directory Compliance Check
153
+
154
+ Before every clone attempt, run `taptap-maker doctor` for the user's intended Maker development
155
+ directory. Use that result as the source of truth for Git availability, existing Maker binding,
156
+ outer Git repository detection, and AI dev-kit status.
157
+
158
+ ### Directory Suitability Decision
159
+
160
+ After `taptap-maker doctor`, decide whether the directory is suitable for clone:
161
+
162
+ - If the directory is already bound to a Maker project, do not clone again unless the user
163
+ explicitly asks to switch or re-clone.
164
+ - If the directory is already bound to a Maker project and the user wants a new project, stop and
165
+ require a new independent directory; do not create a new Maker project into the existing binding.
166
+ - If Git is missing, stop and tell the user to install Git first.
167
+ - If `Maker Git directory` reports `inside_parent_git_repo` or `target_is_git_root: no` with an
168
+ outer `git_root`, explain that the directory is under another Git repository. Recommend a
169
+ completely independent directory, such as `~/MakerProjects/<game-name>`.
170
+ - If the directory is unbound and only contains ignored local config folders, continue after the
171
+ user chooses an app.
172
+ - If the directory contains ordinary user files or folders, explain that Maker clone keeps local
173
+ files but may stop on path conflicts. Ask whether to continue here or switch to a clean directory.
174
+
175
+ Before clone, inspect only the current directory top level.
176
+ The goal is to avoid surprising overwrites, not to deeply audit game code.
177
+
178
+ Acceptable local config entries include:
179
+
180
+ - `.claude`
181
+ - `.mcp`
182
+ - `.skill`
183
+ - `.config`
184
+ - `.ini`
185
+ - `.cursor`
186
+ - `.codex`
187
+
188
+ If the directory contains ordinary user files or folders, explain that Maker initialization will
189
+ keep local files, but clone can fail if a local path conflicts with the Maker project. Ask whether
190
+ to continue in this directory or switch to a clean directory.
191
+
192
+ If the current directory is inside a larger Git repository but is not itself a Git root, warn the
193
+ user before clone:
194
+
195
+ - The outer repository may be an existing user project.
196
+ - A Maker project can live under that directory only if the Maker directory gets its own `.git`.
197
+ - Recommend a completely independent directory, such as `~/MakerProjects/<game-name>`, for safer
198
+ local development.
199
+ - If the user explicitly continues, continue `taptap-maker init`; the CLI must initialize an
200
+ independent Maker Git repository in the target directory and must not modify the outer repository
201
+ remote.
202
+
203
+ Do not delete, move, or overwrite user files during this check.
204
+
205
+ ## Clone Directory Safety
206
+
207
+ Before clone, the Maker CLI checks local files and reports conflicts. The current init flow installs
208
+ the AI dev kit after checkout, so a fresh directory should not get checkout conflicts from newly
209
+ generated dev-kit files. Explain this in non-technical terms:
210
+
211
+ - existing local config folders such as `.claude`, `.mcp`, `.skill`, `.config`, `.ini` are kept
212
+ - normal local files are kept unless they conflict with files from the Maker project
213
+ - if conflicts are reported, tell the user exactly which pre-existing files block clone and ask whether to move,
214
+ rename, or choose another directory
215
+
216
+ Do not delete or overwrite user files to make clone work unless the user explicitly asks.
217
+
218
+ If clone or fetch fails with Maker Git output, inspect the returned error fields instead of asking
219
+ the user to delete local files immediately. Treat `retryable: yes`, `classification:
220
+ remote_transient`, or retry reasons such as `remote_http_5xx`, `network_or_timeout`, and
221
+ `connection_interrupted` as temporary service/network failures. For first clone, explain that 503
222
+ often means the Maker server is still preparing the repository and can take more than 20 seconds.
223
+ The CLI already retried these automatically; if it still fails, tell the user they can retry
224
+ `taptap-maker init` later or switch to a cleaner independent directory after repeated failures. Do
225
+ not retry for auth, permission, repository-not-found, remote-rejected, local file conflict, or local
226
+ permission errors until the reported cause is fixed.
227
+
228
+ If `taptap-maker init` fails and returns `partial_state`, explain the state in plain language:
229
+
230
+ - `project_bound: no` usually means clone did not finish; retry only for the temporary failures
231
+ above.
232
+ - `git_initialized: yes` with `project_bound: no` means the directory may contain a partial local
233
+ Git setup; retry once, and if it fails again recommend a fresh independent directory.
234
+ - `ai_dev_kit_present: yes` means local AI docs/examples may already be present even though Maker
235
+ project checkout failed.
236
+ - `project_bound: yes` means the directory already has Maker binding; run `taptap-maker doctor` before
237
+ attempting anything else.
238
+
239
+ Do not delete partial files automatically. For novice users, prefer recommending a new independent
240
+ directory over manual cleanup.
241
+
242
+ ### `.gitignore` Managed Block
243
+
244
+ The CLI refreshes the checked-out `.gitignore` managed block for local dev-kit files, Agent skill
245
+ discovery directories, and Maker runtime state.
246
+
247
+ If clone reports conflicts for project files, do not auto-merge them. Show the conflict list and
248
+ ask the user whether to move the local files, choose another directory, or let the local AI inspect
249
+ and resolve the conflict.
250
+
251
+ Explain to the user that this `.gitignore` managed block prevents local dev-kit files from being
252
+ submitted to Maker Git, while the `.gitignore` file itself should be submitted.
@@ -0,0 +1,23 @@
1
+ # Windows Preview Diagnostics
2
+
3
+ Read only when a Windows local preview launch fails.
4
+
5
+ ### Windows Node 与后台启动诊断
6
+
7
+ Maker 预览优先使用当前宿主进程的 `process.execPath`;宿主 Node 不可用时才回退系统 Node。
8
+ 不要因为看到 system Node,或因为它不是 WorkBuddy managed Node,就直接判定环境错误、要求用户
9
+ 切换 Node、修改 PATH 或重装依赖。只有在 Node 缺失、版本不满足,或用实际配置的 Node 直接执行
10
+ Maker bundle 已失败时,才把 Node 环境列为主要怀疑对象。
11
+
12
+ Windows 预览失败时,先收集并区分以下证据,再决定修复方向:
13
+
14
+ 1. Node 来源、`process.execPath`、版本,以及直接执行 bundle 的结果。
15
+ 2. Runtime 可执行文件、资源准备结果、supervisor 状态和 `supervisor_log_path`。
16
+ 3. Runtime 原始日志、control channel 发布/超时结果,以及 Windows 后台启动器的返回信息。
17
+
18
+ 仅在显式 legacy 模式下,WMI/CIM 返回已受理或 PID 只证明请求被接受,不证明 Runtime 已执行。
19
+ 正常进程内模式不要求生成独立 supervisor.log,优先读取所属 Node 的 stderr、status 和本轮 logs。
20
+ legacy 模式若 supervisor 日志为空且 control channel 超时,先归类为 Windows 后台启动链路
21
+ 的待确认问题;不要直接改 PATH、切换 Node、修改游戏代码,或把问题归因于 Runtime 文件缺失。
22
+ Issue/反馈中附上上述脱敏证据,让后续处理基于实际环境,而不是把某一次 Windows 兼容性问题写死
23
+ 成所有项目的结论。
@@ -0,0 +1,110 @@
1
+ # Local Window Preview
2
+
3
+ Read only for a local preview task. For one-shot validation read [validation.md](validation.md);
4
+ for Windows launch failures also read [preview-windows.md](preview-windows.md).
5
+
6
+ ## Local Window Preview
7
+
8
+ Use the active distribution's Maker CLI and the current real Maker project absolute path as
9
+ `--target-dir`; never guess a business project from the dialogue directory. Every command supports
10
+ `--json`. Local preview does not require Git clean, commit or push. Single-player preview needs
11
+ no PAT or remote build. Multiplayer preview uses the existing Maker login and a previously built
12
+ remote test version; it never builds or uploads server code automatically.
13
+
14
+ 1. For an explicit local-preview request, run `taptap-maker preview status --target-dir <PROJECT> --json`.
15
+ If Runtime is missing, follow host approval for downloading/installing with
16
+ `taptap-maker preview install --target-dir <PROJECT> --json`, then start. Installation requires
17
+ Python and curl; do not install dependencies or bypass client approval silently.
18
+ Explain that preparation and Runtime may download public indexes/assets. Start/refresh prepare
19
+ a copy only when preparation is needed; plain source previews do not copy. Prepared source is
20
+ reused at `<PROJECT>/.maker-preview/source`, overwritten after the old Runtime exits, and ignored
21
+ by Git. History keeps evidence, not source snapshots. `preview prepare` rejects active previews.
22
+ The console distinguishes all-project usage from current-project usage and offers explicit cleanup. Platform support,
23
+ installation recovery and cache behavior are documented in `docs/MAKER_LOCAL_PREVIEW.md`.
24
+
25
+ 2. Run `taptap-maker preview start --target-dir <PROJECT> --json`. Report process launch only,
26
+ not game readiness. Never substitute validate/headless mode or remote build.
27
+ 3. During a user-requested local-preview iteration, after a batch changes the running game's
28
+ code/resources, query preview status once for that project. Skip this for documentation-only
29
+ edits, unrelated files, or work outside that preview task.
30
+ If `process_alive=true`, automatically run preview refresh and collect logs/check.
31
+ This includes a failed-but-live Runtime after Lua fixes within the same preview task.
32
+ If stopped, missing, or ownership is unknown, do not start or revive the session.
33
+ 4. Explicit refresh also only refreshes an active session. Tell the user it is a restart and loses
34
+ in-memory state. Merge related edits into batches; do not restart on every file save. The CLI
35
+ coalesces overlapping refreshes, with stop/cancel taking priority. No default file watcher exists;
36
+ edits from other editors/agents need explicit refresh unless they follow this same preview task.
37
+ 5. For stop, run `taptap-maker preview stop --target-dir <PROJECT> --json`. Manual window close
38
+ is detected by status. Never kill by process name or trust a stored PID alone.
39
+ 6. Fetch current evidence with `preview logs` and `preview check`, each with
40
+ the same `--target-dir`. Incremental logs use the returned `--session-id`, `--reload-id`,
41
+ `--cursor` and optionally `--limit` (1–500). Reset cursor after a reload. Keep local evidence
42
+ separate from `.maker/logs/runtime/`, which belongs to the remote watcher.
43
+
44
+ ### AI Local Preview Launch Playbook
45
+
46
+ Goal: open the shared local `UrhoXRuntime` window for the current bound Maker project. Do not
47
+ commit, push, or remote-build. Do not rewrite PATH, switch Node, or disable antivirus unless the
48
+ collected evidence names that cause.
49
+
50
+ Launch chain (normal paths):
51
+
52
+ 1. Agent debugging: keep CLI `preview run --target-dir <PROJECT> --json` running in the
53
+ foreground. It directly owns Runtime, emits a preview.started event on stderr and returns
54
+ final JSON on stdout. Query logs/status/check or stop using its session identity. Default
55
+ safety limit is 10 minutes; --duration-ms 1000..600000 selects a shorter smoke test.
56
+ 2. User preview: `preview start` submits the registered project to the same console task
57
+ used by the browser. `console open` automatically starts/reuses the console with Node.
58
+ The console directly owns Runtime; finishing the request CLI does not stop the game.
59
+ 3. No intermediate preview CLI or supervisor process. Existing session/control-channel,
60
+ project classification, prepare and manifest code remain shared in process. The legacy
61
+ supervisor_pid field identifies the owning Node. Normal paths never invoke WMI/CIM.
62
+ 4. An entire IDE process-tree teardown can still terminate preview. Optional external
63
+ `console serve` is for that separate requirement, not a mandatory first-use step.
64
+ 5. Runtime logs include bounded, identity-checked current-round Lua logs. Live-window screenshots
65
+ and game assertion JSON remain unsupported in run/start/check; use `preview validate` for
66
+ the original Skill's one-shot evidence. Process status JSON is not gameplay validation.
67
+ 6. Never auto-retry an unknown launch or disable antivirus. Only explicit --legacy-wmi
68
+ selects the old launcher. Never kill by process name or an unverified historical PID.
69
+ Evidence files, all under Maker home preview/runtime directories returned by status/start JSON:
70
+
71
+ - `supervisor.log`
72
+ - current-round `prepare.log`
73
+ - Runtime `logs/game` and `logs/lua`
74
+ - `session.json` (`supervisor_pid`, `runtime_pid`, `runtime_launch_pending`, `port`)
75
+
76
+ Classify from evidence, then act:
77
+
78
+ | Evidence | Meaning | Next action |
79
+ | ---------------------------------------------------------------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
80
+ | `install_state: missing` | Runtime not installed | Host-approved `preview install`, then start |
81
+ | `Local prepare failed` + Python/Builder/timeout in `prepare.log` | Manifest/copy failed; Runtime was not started | Read `prepare.log`. Retry `preview prepare --json`. Do not treat as CIM/antivirus. Public-index download and managed Python must be ready |
82
+ | NATIVE_LAUNCH_FAILED + EACCES | Node background process creation was denied | Check the security product event for this exact process; do not disable protection or switch back to WMI automatically. |
83
+ | Empty supervisor.log + control-channel TIMEOUT | Only meaningful for an explicit legacy launcher | Normal in-process preview uses owner stderr and status; an absent standalone log is not evidence of antivirus blocking. |
84
+ | supervisor exit is unverified | Process ownership is unknown | Do not kill by PID or name; inspect session identity and logs. |
85
+ | `preferred loopback port` / recovery ports in use | Lock-recovery mutex collided with another local bind | Retry the same CLI. Do not kill the occupying process |
86
+ | Runtime PID exists / window opened | Launch succeeded | Report process launch only; use `preview logs` / `preview check` for evidence |
87
+
88
+ Console open starts/reuses a Node console automatically; no mandatory manual Host step.
89
+ Stop an incompatible older console explicitly after its previews are stopped. A separate browser
90
+ window does not prove that its service will survive the entire IDE shutting down. Only that
91
+ separate requirement calls for the optional external console serve entry.
92
+ Never kill by process name. Never use a stored PID without matching session identity. Stop with
93
+ `preview stop` or `console stop`. Closing the browser does not stop a Host-owned Runtime; ending Agent preview run stops only its owned Runtime.
94
+
95
+ Process launch and clean logs do not prove gameplay or visual correctness. Do not promise
96
+ live-window screenshots, input automation or cloud/server emulation. One-shot validation
97
+ screenshots use the separate `preview validate` adapter.
98
+
99
+ Only an AI authorized to modify the game may fix it. Bound automatic fixes to two attempts and an
100
+ agreed time budget, permit cancellation, refresh after each attempt, and return remaining failures
101
+ and evidence. Without modification authorization only report.
102
+
103
+ Multiplayer settings automatically select a remote test server using PAT authentication on the
104
+ Maker side and skip_login/WebSocket direct connect in Runtime. A refresh creates a new test game,
105
+ not a restored room. Local server changes require an explicit remote build before taking effect.
106
+ Missing game configuration requires a successful build and test QR generation; authentication or
107
+ allocation failures must not silently fall back to single-player. No local Server/cloud mock or
108
+ game-save isolation is provided. Do not classify shared scripts by filename suffix,
109
+ inject stubs, delete old dist/manifest files, copy whole resource libraries, or silently fetch
110
+ official-res/uuid assets. Explain missing references/cache state and seek approval for retrieval.
@@ -0,0 +1,69 @@
1
+ # Project Context
2
+
3
+ Read when selecting a workspace, checking status or resuming after an upgrade.
4
+
5
+ ## Project Detection
6
+
7
+ A directory is a Maker project when the user's current project directory or one of its parents contains:
8
+
9
+ ```text
10
+ .maker-mcp/config.json
11
+ ```
12
+
13
+ When this file exists, explain that the directory is already bound to a Maker project.
14
+
15
+ For a bound project, always inspect `maker://status` or `maker_status_lite` before continuing
16
+ development after an MCP/package or plugin upgrade. If the status includes an `AGENTS.md` section
17
+ with `status: missing_file`, `missing_block`, or `outdated`, run
18
+ `taptap-maker agents update --target-dir <project dir>` before making gameplay/code changes. After
19
+ updating `AGENTS.md`, tell the user the current session remains usable; updated instructions load on
20
+ the next MCP start or user-requested reconnect. Do not require a new conversation. Package or plugin
21
+ updates are a separate workflow and must follow the active distribution's update skill.
22
+
23
+ If status or doctor reports a `.project/settings.json` health problem, read Build Settings in
24
+ [Maker Git and Remote Build](git.md) before any repair. It limits which fields may be restored and
25
+ which missing defaults need user confirmation.
26
+
27
+ When this file is missing and the user asks to clone, initialize, or continue Maker local
28
+ development, do not ask the user for an app_id directly. Follow the initialization workflow.
29
+
30
+ The user's current project directory is the business target. Do not ask the user to choose a
31
+ directory and do not scan unrelated Maker projects. If the MCP process cwd is a transient
32
+ dialogue/session directory, pass the user's current project directory as `target_dir`. If the AI
33
+ client does not expose that directory, say the current client did not provide the project directory
34
+ instead of guessing.
35
+
36
+ ### Attached Workspace Selection
37
+
38
+ Some AI clients start MCP from a dialogue/session directory and expose the real project as an
39
+ attached workspace. For Maker status, clone, submit, and build, compare:
40
+
41
+ - the AI dialogue current directory, often containing `dialogues`
42
+ - the attached workspace directories shown by the client
43
+
44
+ If there is a single attached workspace, use that single attached workspace as `target_dir` when
45
+ calling Maker tools. If there are multiple attached workspaces, show the paths and ask the user
46
+ which one is the Maker project directory. Do not treat the dialogue/session directory as the Maker
47
+ project directory, and do not ask the user to clone an app into that directory.
48
+
49
+ If status output returns `AI client workspace selection`, follow that hint: choose an attached
50
+ workspace first, then read `maker://status` or call `maker_status_lite` with the attached project
51
+ directory.
52
+
53
+ DeepSeek Harness (DSH) uses `@deepseek-ai/dsh-mcp-client` and currently does not advertise MCP
54
+ Roots. In DSH, resolve the active game workspace from the conversation/IDE context and pass that
55
+ absolute directory as `target_dir` on every project-related Maker call. Never persist it as plugin
56
+ `cwd`; multiple DSH projects share the same user-level plugin configuration.
57
+
58
+ ## Bundled Skills
59
+
60
+ When `taptap-maker doctor`, `maker://status`, or `maker_status_lite` reports TapTap bundled workflow
61
+ skills, show the skill names and document paths. Do not install or register skills automatically.
62
+
63
+ `taptap-maker-local` covers Maker local workflow. `taptap-maker-dev-kit-guide` explains the local
64
+ AI dev-kit resources installed during clone. `update-taptap-mcp` covers the active distribution's
65
+ supported update workflow.
66
+
67
+ Prefer user/global scope for Maker MCP installation. If a project/local config already exists,
68
+ do not block the workflow; just explain that user/global scope is recommended to avoid config
69
+ being tied to a specific project folder.
@@ -0,0 +1,93 @@
1
+ # Local Runtime Validation
2
+
3
+ Read only for runtime tests, assertions or screenshot acceptance using preview validate.
4
+
5
+ ### Local run-lua-validate
6
+
7
+ Use the project's `run-lua-validate` Skill for runtime checks, screenshots, assertions and
8
+ controlled-state visual verification. Keep its review/fix/retest workflow; Maker supplies the
9
+ local execution adapter, not another test framework.
10
+
11
+ On a bound macOS/Windows Maker project, use this distribution's CLI instead of the Skill's
12
+ standalone Runtime installer/launch commands. Query `preview status` first; an active preview
13
+ must be explicitly stopped with user authorization. For the command mapping and options read
14
+ `docs/MAKER_LOCAL_PREVIEW.md` section `run-lua-validate 本地接入`.
15
+ Example: `preview validate --target-dir <PROJECT> --mode both --screenshot-frame <N> --json`,
16
+ where N is selected for the current test, not a fixed readiness guarantee.
17
+ Use the returned report/log/artifact paths with the original Skill's review rules.
18
+ `COMPLETED` means evidence collected, not game PASS. Preserve failures and inspect partial
19
+ evidence. No Computer Use capture, engine modification or remote-build fallback is required.
20
+ When the user requests Validate and the project Skill is unavailable, the Agent must first
21
+ enable/install the existing local Skill; do not immediately download or update ai-dev-kit:
22
+
23
+ 1. Check `<PROJECT>/skills/run-lua-validate/SKILL.md` and
24
+ `<PROJECT>/.installer/skills/run-lua-validate/SKILL.md`. If neither exists, explain that
25
+ the source is missing and guide `dev-kit update --target-dir <PROJECT>` through this
26
+ distribution. Do not invent or rewrite the original Skill.
27
+ 2. If source exists, inspect `<PROJECT>/.installer/local-skill-filter.json` as JSON.
28
+ When `exclude_skills.win32` (Windows) or `exclude_skills.darwin` (macOS) contains
29
+ `run-lua-validate`, tell the user before removing only that entry for this platform.
30
+ Preserve all other values. A missing filter needs no repair; malformed/unwritable
31
+ configuration must be reported, not replaced with an empty configuration.
32
+ 3. Run the existing project installer: Windows uses
33
+ `powershell.exe -NoProfile -ExecutionPolicy Bypass -File "<PROJECT>/tools/install-skills.ps1" all`;
34
+ macOS uses `bash "<PROJECT>/tools/install-skills.sh" all`.
35
+ Check its exit status and the installed Skill file, not just its success message.
36
+ 4. For Codex, ensure `<PROJECT>/.agents/skills/run-lua-validate/SKILL.md` is readable.
37
+ If the old installer only installs `.codex`, copy the original Skill directory, including
38
+ supporting files, from `.installer/skills` (or `skills` if still there) into the missing
39
+ `.agents/skills/run-lua-validate` directory. If the installer is absent, likewise install
40
+ only this Skill into the current host's documented project Skill directory.
41
+ Do not overwrite an existing directory or broken link; inspect/report conflicts first.
42
+ 5. Read the installed `SKILL.md` and its needed references, then continue validation using
43
+ the local mapping below. If the host needs a Skill refresh/new session for discovery,
44
+ explain that; do not claim the current session has loaded it merely because installation
45
+ succeeded. Report permission/install failures rather than pretending the Skill is ready.
46
+
47
+ These are Agent-executed local setup steps, not a new CLI command or automatic download.
48
+ Skill distribution belongs to UrhoX ai-dev-kit. Maker detects legacy exclusions, warns before
49
+ removing only this Skill from the current platform's list, and preserves all other entries.
50
+ If original Skill files were already deleted, guide the user to `dev-kit update` through the
51
+ current distribution; a repaired exclusion is not proof of an installed Skill. Do not rewrite
52
+ the Skill, auto-upgrade, or block Runtime execution because compatibility repair failed.
53
+
54
+ Local iterations are Agent-controlled: choose test states, assertion scripts, screenshot timing
55
+ and the number of runs from the acceptance goal. Repeat `preview validate` sequentially as needed;
56
+ each invocation launches its own Runtime, not a capture of an existing preview window. Do not
57
+ add a fixed frame/count policy or interpret loading-screen captures as acceptance. Inspect the
58
+ collected JSON/logs/images, then fix and rerun using the original Skill's rules.
59
+
60
+ For screenshots, Maker checks near-total black/transparent pixels and observed engine bootstrap
61
+ ordering. An unsafe capture is marked `screenshot_assessment.status=NOT_READY`; when the run
62
+ completed safely without actual runtime errors it waits three seconds and retries at a later
63
+ frame, up to two retries. Each attempt keeps its own evidence/run ID; the final result includes
64
+ `attempt_run_ids`. Do not overwrite earlier failed evidence or treat the raw game report as fixed.
65
+ Automatic retries scale the default timeout with the frame count, capped at 580 seconds; an
66
+ explicit `--validate-timeout` is never increased. If the next run's estimated Runtime duration
67
+ exceeds the budget, no retry launches: inspect retained evidence and explicitly adjust the timeout.
68
+ The estimate uses the preceding Runtime duration and is not a guarantee of future loading speed.
69
+ `REVIEW_REQUIRED` only means these narrow checks found no issue, not that loading/gameplay passed.
70
+ Open every PNG. If visual inspection still shows game-specific loading, wait three seconds,
71
+ choose a later screenshot frame and adjust validate frames/timeout to cover it, then rerun the
72
+ same test. Waiting before relaunch at the same early frame is not a readiness fix. Stop and inspect
73
+ errors or repeated lack of progress; do not loop forever, change the engine, or hide a game FAIL.
74
+
75
+ The stderr `validation.started` event returns `run_id`, `evidence_directory`, `log_path` and
76
+ `invocation_path` before preparation. Poll the returned run's `run.json` and bounded log tails
77
+ while the CLI is running; do not start another Runtime to poll progress. The final stdout JSON
78
+ remains the command result. Missing final evidence means incomplete/unknown, never PASS.
79
+ The Maker console's Build/Test > Validate tab reads the same local evidence and does not launch
80
+ or control validation. All loaded rounds appear newest first in a scrollable process
81
+ list; scrolling to the bottom loads older pages. Logs/JSON show a three-line collapsed preview,
82
+ screenshots show thumbnails linked to the original. It shows collected evidence, not proof the
83
+ Agent inspected an image.
84
+
85
+ Validation evidence is project-realpath isolated and retains the latest three completed runs,
86
+ with active or unverified runs additionally protected. Each invocation checks cleanup eligibility
87
+ after it finishes; there is no age-based or 24-hour cleanup delay.
88
+ Failures do not advance that timestamp or change the validation result. There is no background
89
+ timer, console lifecycle trigger, or automatic cross-project cleanup. For durable acceptance output, pass
90
+ `--output-dir <ABSOLUTE_DIRECTORY_OUTSIDE_PREVIEW_CACHE>` on each invocation: completed or failed
91
+ run artifacts are copied into a unique run subdirectory, never automatically cleaned. Verify
92
+ `archive_directory` in the result; archive failures remain explicit. Prepared game source is not
93
+ part of the archive. A 5 GiB cache warning is not permission to delete recent acceptance evidence.