@taptap/instant-games-open-mcp 1.24.4 → 1.24.6

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.
@@ -1,55 +0,0 @@
1
- ---
2
- name: taptap-maker-dev-kit-guide
3
- description: Explain the local TapTap Maker AI dev kit installed during Maker project clone. Use after a Maker project is cloned or bound, or when the user asks what CLAUDE.md, examples, templates, or urhox-libs are for.
4
- ---
5
-
6
- # TapTap Maker AI Dev Kit
7
-
8
- Use this skill to orient the local AI/Agent after `taptap-maker init` installs the AI dev kit into a
9
- Maker project directory.
10
-
11
- ## What To Tell The Local Agent
12
-
13
- After the Maker project is cloned, point the local AI/Agent at these local resources:
14
-
15
- - `CLAUDE.md`: the main AI development guide entry. Read this first before changing Maker game code.
16
- - `examples/`: runnable or copyable examples for common Maker development patterns.
17
- - `templates/`: starter templates for creating new files or common game structures.
18
- - `urhox-libs/`: engine APIs, capabilities, and local reference material for Maker runtime features.
19
-
20
- Keep the explanation short. The goal is to help the local AI discover the installed development
21
- resources, not to duplicate their contents in chat.
22
-
23
- ## Usage Guidance
24
-
25
- When a user asks to develop or modify a Maker project after clone:
26
-
27
- 1. Check whether the current directory contains the dev-kit entries above.
28
- 2. Tell the local AI/Agent that `CLAUDE.md` is the first document to read.
29
- 3. Use `examples/` when the user asks for implementation patterns.
30
- 4. Use `templates/` when creating new game files or scaffolding.
31
- 5. Use `urhox-libs/` when engine API behavior or capability names are needed.
32
-
33
- If these entries are missing in a bound Maker project, read `maker://status` or call
34
- `maker_status_lite` with the actual project directory as `target_dir` to confirm state, then run
35
- `taptap-maker dev-kit update` in that project directory to restore missing local dev-kit entries.
36
- If status includes `Maker remote sync`, follow that section before editing: pull first only when the
37
- workspace is clean, otherwise let the local AI help the user submit, stash, or cancel before pulling.
38
-
39
- These files are local development aids. Do not submit them to Maker Git unless the user explicitly
40
- asks and understands they are local environment files.
41
-
42
- ## Testing And Result Check
43
-
44
- Keep validation simple for Maker users. 用户可以直接说“提交”或“构建”:
45
-
46
- - If the user says “提交”, “推送”, “构建”, “预览”, or “跑一下”, use
47
- `maker_build_current_directory`. The tool commits when needed, pushes to Maker remote, and then
48
- runs the remote build.
49
- - If push fails, do not start a separate build or generic Git push. Explain the returned recovery
50
- details, follow the returned classification-specific recovery (`remote_rejected`,
51
- `branch_not_allowed`, `forbidden_path`, or `auth`), then retry `maker_build_current_directory`.
52
- - After submit or build finishes, tell the user to open the TapMaker 网页端查看结果.
53
-
54
- Do not create local-only test scripts just to verify Maker changes. The expected validation path is
55
- chat request -> Maker MCP submit/build tool -> TapMaker web result check.
@@ -1,489 +0,0 @@
1
- ---
2
- name: taptap-maker-local
3
- description: Guide TapTap Maker local development workflows. Use when a user asks to initialize Maker local development, clone/download a Maker project, continue a Maker project, inspect local Maker status, pull, submit, push, or resolve Git conflicts.
4
- ---
5
-
6
- # TapTap Maker Local Workflow
7
-
8
- Use this skill as the workflow layer for Maker local development. The Maker CLI owns one-time
9
- initialization; MCP tools own the high-frequency development loop. This skill decides the sequence,
10
- asks the user for choices, and explains local state in plain language.
11
-
12
- ## Scope
13
-
14
- This skill covers:
15
-
16
- - initialize local Maker development
17
- - run the Maker CLI initialization flow
18
- - clone a Maker project
19
- - prepare local AI dev kit after project checkout
20
- - choose a Maker app from the CLI app list
21
- - explain PAT, Git, project binding, and editor reloads
22
- - inspect local changes
23
- - pull remote changes
24
- - submit local changes
25
- - push local commits
26
- - explain and resolve conflicts with user approval
27
-
28
- Build, submit, push, preview, and verify behavior belongs to the single Maker MCP build tool. The
29
- post-build runtime log polling loop belongs to the local Maker CLI watcher.
30
-
31
- ## Responsibilities
32
-
33
- Keep this split clear:
34
-
35
- - Skill: user intent, step order, whether to ask the user, friendly explanations, failure recovery.
36
- - CLI: save PAT, fetch app list, clone, prepare dev kit, install MCP config, verify local setup,
37
- and run the local runtime log watcher.
38
- - MCP tools/resources: inspect Maker status, run the combined commit/push/build path, and support
39
- one-shot runtime log pulls.
40
-
41
- Do not reimplement Maker API calls or Git authentication in shell when the Maker CLI or MCP tool
42
- exists.
43
-
44
- ## Main Intent Table
45
-
46
- | User intent | Required workflow |
47
- | --------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
48
- | initialize / configure / continue Maker local development | Run the Maker CLI initialization workflow. |
49
- | clone / download Maker project locally | Follow "Initialization Workflow"; do not ask for app_id directly. |
50
- | status / is Maker ready | Read `maker://status`, call `maker_status_lite` if resources are unavailable, then follow `Maker remote sync` if present. |
51
- | submit / commit / push to Maker | Inspect local Git state, summarize changed files, then call `maker_build_current_directory` unless blocked. |
52
- | pull / update from remote | Inspect local changes first; if dirty, explain options before pulling. |
53
- | conflict / merge failed | Explain why the conflict happened, list conflict files, inspect conflict hunks, propose a resolution plan, and ask before editing. |
54
- | build / preview / run / verify | Use `maker_build_current_directory`; it starts the local runtime log watcher after a successful remote build result. |
55
-
56
- ## Project Detection
57
-
58
- A directory is a Maker project when the user's current project directory or one of its parents contains:
59
-
60
- ```text
61
- .maker-mcp/config.json
62
- ```
63
-
64
- When this file exists, explain that the directory is already bound to a Maker project.
65
-
66
- When this file is missing and the user asks to clone, initialize, or continue Maker local
67
- development, do not ask the user for an app_id directly. Follow the initialization workflow.
68
-
69
- The user's current project directory is the business target. Do not ask the user to choose a
70
- directory and do not scan unrelated Maker projects. If the MCP process cwd is a transient
71
- dialogue/session directory, pass the user's current project directory as `target_dir`. If the AI
72
- client does not expose that directory, say the current client did not provide the project directory
73
- instead of guessing.
74
-
75
- ### Attached Workspace Selection
76
-
77
- Some AI clients start MCP from a dialogue/session directory and expose the real project as an
78
- attached workspace. For Maker status, clone, submit, and build, compare:
79
-
80
- - the AI dialogue current directory, often containing `dialogues`
81
- - the attached workspace directories shown by the client
82
-
83
- If there is a single attached workspace, use that single attached workspace as `target_dir` when
84
- calling Maker tools. If there are multiple attached workspaces, show the paths and ask the user
85
- which one is the Maker project directory. Do not treat the dialogue/session directory as the Maker
86
- project directory, and do not ask the user to clone an app into that directory.
87
-
88
- If status output returns `AI client workspace selection`, follow that hint: choose an attached
89
- workspace first, then read `maker://status` or call `maker_status_lite` with the attached project
90
- directory.
91
-
92
- ## Initialization Workflow
93
-
94
- Trigger phrases include:
95
-
96
- - 我要开发 Maker 游戏
97
- - 本地 Maker 开发
98
- - 拉取 Maker 游戏到本地
99
- - clone Maker 项目
100
- - 下载 Maker 项目代码
101
- - 初始化 Maker 项目
102
- - 初始化 Maker 开发目录
103
- - 配置 Maker 本地开发
104
- - 打开/继续开发 Maker 项目
105
-
106
- Workflow:
107
-
108
- 1. Run `taptap-maker doctor` for the user's intended Maker directory, or read `maker://status` when
109
- the MCP server is already available.
110
- 2. If the status reports the current directory is already bound to a Maker project, stop the
111
- initialization/clone path. Continue with the user's current intent in that bound project. Do not
112
- ask which app to clone unless the user explicitly asks to switch or re-clone.
113
- 3. If Git is missing, stop. Tell the user Git is required for clone/submit/build-side Git work.
114
- 4. Run `taptap-maker init` in the user's intended Maker directory. The CLI will request PAT if
115
- missing, fetch TapTap token, show a paged app preview, ask the user to choose, prepare the AI dev
116
- kit, clone the Maker project, and install/verify MCP config.
117
- Tell the user that the first Maker clone can take 20+ seconds because the server may be
118
- preparing the repository, and that they should keep the command running while the CLI retries
119
- transient 503/5xx failures.
120
- 5. If the CLI reports ordinary local files or parent Git repository risk, explain the warning and
121
- ask whether the user wants to continue in this directory or switch to a clean independent one.
122
- 6. After clone succeeds, run `taptap-maker doctor` again or explain that `.maker-mcp/config.json`
123
- now binds the directory to the Maker project.
124
- 7. Tell the local AI/Agent to use the `taptap-maker-dev-kit-guide` skill for the installed dev-kit
125
- resources, especially `CLAUDE.md`, `examples/`, `templates/`, and `urhox-libs/`.
126
-
127
- Keep the user-facing explanation short:
128
-
129
- ```text
130
- 我会先用 Maker CLI 检查本机 Git、PAT 和当前目录是否已绑定 Maker 项目。
131
- 如果还没有 PAT,CLI 会让你去页面创建一个;拿到项目列表后你选游戏,我再拉代码。
132
- ```
133
-
134
- ## AI Dev Kit Preparation
135
-
136
- `taptap-maker init` checks out the Maker project before preparing local development environment
137
- files in the current working directory. Init reinstalls the dev kit after checkout and allows
138
- dev-kit files to overwrite same-path local helper files; the managed `.gitignore` block keeps
139
- those files local-only so they are not submitted to Maker Git.
140
-
141
- `taptap-maker doctor` and `maker://status` check the dev-kit top-level entries for an already bound
142
- Maker project. If `CLAUDE.md`, `examples/`, `templates/`, or `urhox-libs/` are missing, run
143
- `taptap-maker dev-kit update` to restore the dev kit without overwriting existing local files and
144
- refresh the managed `.gitignore` block.
145
-
146
- The CLI downloads and installs (selected automatically by `TAPTAP_MCP_ENV`):
147
-
148
- ```text
149
- # production (default)
150
- https://urhox-demo-platform.spark.xd.com/ai-dev-kit/pd/stable/ai-dev-kit.zip
151
-
152
- # rnd
153
- https://urhox-demo-platform.spark.xd.com/ai-dev-kit/rnd/latest/ai-dev-kit.zip
154
- ```
155
-
156
- After clone, use the bundled `taptap-maker-dev-kit-guide` skill to explain the installed dev-kit
157
- resources to the local AI/Agent:
158
-
159
- - `CLAUDE.md` is the AI development guide entry.
160
- - `examples/` contains Maker development examples.
161
- - `templates/` contains reusable templates.
162
- - `urhox-libs/` contains engine APIs and capability references.
163
-
164
- The CLI is responsible for deterministic file operations:
165
-
166
- - extract the ZIP into the current directory after checkout
167
- - skip the ZIP top-level `scripts` directory because it conflicts with Maker project code
168
- - delete the downloaded `ai-dev-kit.zip` after extraction
169
- - write a temporary `.gitignore.dev-kit-before-clone` block for installed dev-kit entries
170
- - after dev-kit preparation succeeds, merge that block into the checked-out `.gitignore`
171
- - keep the dev-kit files local-only so they are not submitted to Maker Git
172
-
173
- Do not hand-write a custom download/unzip script while this CLI command is available.
174
-
175
- If dev-kit network access is unavailable after clone succeeds, explain that the Maker project is
176
- already checked out, but local AI development docs/API/demo support may be incomplete. Ask whether
177
- the user wants to retry `taptap-maker init` for a full post-checkout dev-kit reinstall or continue
178
- without the dev kit.
179
-
180
- If clone or fetch fails with Maker Git output, inspect the returned error fields instead of asking
181
- the user to delete local files immediately. Treat `retryable: yes`, `classification:
182
- remote_transient`, or retry reasons such as `remote_http_5xx`, `network_or_timeout`, and
183
- `connection_interrupted` as temporary service/network failures. For first clone, explain that 503
184
- often means the Maker server is still preparing the repository and can take more than 20 seconds.
185
- The CLI already retried these automatically; if it still fails, tell the user they can retry
186
- `taptap-maker init` later or switch to a cleaner independent directory after repeated failures. Do
187
- not retry for auth, permission, repository-not-found, remote-rejected, local file conflict, or local
188
- permission errors until the reported cause is fixed.
189
-
190
- ## PAT Handling
191
-
192
- If the user pastes a token-like string while the initialization flow is waiting for PAT, let the
193
- running `taptap-maker init` prompt consume it, or run `taptap-maker pat set` and paste the PAT into
194
- the prompt. Do not put PAT directly in argv unless the user explicitly accepts the ps/shell-history
195
- exposure. Do not just say "received". If the directory is already bound, treat `taptap-maker apps`
196
- output as account reference only and continue the user's current bound-project task.
197
-
198
- If PAT exchange fails:
199
-
200
- 1. Show the PAT page URL for the current environment:
201
- production `https://maker.taptap.cn/pat-tokens`, RND `https://fuping.agnt.xd.com/pat-tokens`.
202
- 2. Ask the user to create a new Maker PAT on that page.
203
- 3. Run `taptap-maker pat set` and paste the PAT into the prompt.
204
-
205
- ## App Selection
206
-
207
- Use app selection only when the current directory is unbound and the user is initializing or cloning
208
- a Maker project, or when the user explicitly asks to switch or re-clone.
209
-
210
- If the current directory is already bound, app lists from `taptap-maker apps` are reference only.
211
- Continue operating on the current bound project. When the user explicitly requests a different
212
- project, start the project selection flow for that request.
213
-
214
- When app selection is needed, show the returned app preview and total count, then ask the user to
215
- choose by index, app id, or name. The default preview shows the 40 most recently active apps.
216
- If the target is not visible, ask the user to type `all` inside `taptap-maker init` to expand the
217
- full list, or run `taptap-maker apps --all` for a one-shot human-readable dump; use
218
- `taptap-maker apps --json` only when AI / scripts need the machine-readable list. If the
219
- chat/client width is enough, you may present the preview as a compact two-column layout;
220
- otherwise keep a single column. Keep app_id visible in every app row, and include the preview
221
- details instead of only a summary such as "40 apps are available".
222
-
223
- Selection confirmation:
224
-
225
- - Ask the user to choose by index, app id, or name.
226
- - Treat the user's explicit reply as the selected app.
227
- - If there is only one app, still ask for confirmation before selecting it.
228
-
229
- After the user chooses, route the next action to `taptap-maker init` so the Maker initialization
230
- workflow can continue with the selected app. For non-interactive CLI runs, pass the selected app id
231
- through the supported CLI option.
232
-
233
- ## Working Directory Compliance Check
234
-
235
- Before every clone attempt, run `taptap-maker doctor` for the user's intended Maker development
236
- directory. Use that result as the source of truth for Git availability, existing Maker binding,
237
- outer Git repository detection, and AI dev-kit status.
238
-
239
- ### Directory Suitability Decision
240
-
241
- After `taptap-maker doctor`, decide whether the directory is suitable for clone:
242
-
243
- - If the directory is already bound to a Maker project, do not clone again unless the user
244
- explicitly asks to switch or re-clone.
245
- - If Git is missing, stop and tell the user to install Git first.
246
- - If `Maker Git directory` reports `inside_parent_git_repo` or `target_is_git_root: no` with an
247
- outer `git_root`, explain that the directory is under another Git repository. Recommend a
248
- completely independent directory, such as `~/MakerProjects/<game-name>`.
249
- - If the directory is unbound and only contains ignored local config folders, continue after the
250
- user chooses an app.
251
- - If the directory contains ordinary user files or folders, explain that Maker clone keeps local
252
- files but may stop on path conflicts. Ask whether to continue here or switch to a clean directory.
253
-
254
- Before clone, inspect only the current directory top level.
255
- The goal is to avoid surprising overwrites, not to deeply audit game code.
256
-
257
- Acceptable local config entries include:
258
-
259
- - `.claude`
260
- - `.mcp`
261
- - `.skill`
262
- - `.config`
263
- - `.ini`
264
- - `.cursor`
265
- - `.codex`
266
-
267
- If the directory contains ordinary user files or folders, explain that Maker initialization will
268
- keep local files, but clone can fail if a local path conflicts with the Maker project. Ask whether
269
- to continue in this directory or switch to a clean directory.
270
-
271
- If the current directory is inside a larger Git repository but is not itself a Git root, warn the
272
- user before clone:
273
-
274
- - The outer repository may be an existing user project.
275
- - A Maker project can live under that directory only if the Maker directory gets its own `.git`.
276
- - Recommend a completely independent directory, such as `~/MakerProjects/<game-name>`, for safer
277
- local development.
278
- - If the user explicitly continues, continue `taptap-maker init`; the CLI must initialize an
279
- independent Maker Git repository in the target directory and must not modify the outer repository
280
- remote.
281
-
282
- Do not delete, move, or overwrite user files during this check.
283
-
284
- ## Clone Directory Safety
285
-
286
- Before clone, the Maker CLI checks local files and reports conflicts. The current init flow installs
287
- the AI dev kit after checkout, so a fresh directory should not get checkout conflicts from newly
288
- generated dev-kit files. Explain this in non-technical terms:
289
-
290
- - existing local config folders such as `.claude`, `.mcp`, `.skill`, `.config`, `.ini` are kept
291
- - normal local files are kept unless they conflict with files from the Maker project
292
- - if conflicts are reported, tell the user exactly which pre-existing files block clone and ask whether to move,
293
- rename, or choose another directory
294
-
295
- Do not delete or overwrite user files to make clone work unless the user explicitly asks.
296
-
297
- If `taptap-maker init` fails and returns `partial_state`, explain the state in plain language:
298
-
299
- - `project_bound: no` usually means clone did not finish; retrying clone is allowed.
300
- - `git_initialized: yes` with `project_bound: no` means the directory may contain a partial local
301
- Git setup; retry once, and if it fails again recommend a fresh independent directory.
302
- - `ai_dev_kit_present: yes` means local AI docs/examples may already be present even though Maker
303
- project checkout failed.
304
- - `project_bound: yes` means the directory already has Maker binding; run `taptap-maker doctor` before
305
- attempting anything else.
306
-
307
- Do not delete partial files automatically. For novice users, prefer recommending a new independent
308
- directory over manual cleanup.
309
-
310
- ### `.gitignore` Merge During Clone
311
-
312
- The Maker CLI stages the dev-kit managed ignore block in
313
- `.gitignore.dev-kit-before-clone` while preparing the dev kit. After the Maker checkout and dev-kit
314
- preparation both succeed, the CLI merges that managed block into the checked-out `.gitignore` and
315
- removes the temporary file.
316
-
317
- If clone still reports conflicts for files other than `.gitignore.dev-kit-before-clone`, do not
318
- auto-merge them. Show the conflict list and ask the user whether to move the local files, choose
319
- another directory, or let the local AI inspect and resolve the conflict.
320
-
321
- Explain to the user that this `.gitignore` merge prevents local dev-kit files from being
322
- submitted to Maker Git.
323
-
324
- ## Bundled Skills
325
-
326
- When `taptap-maker doctor`, `maker://status`, or `maker_status_lite` reports TapTap bundled workflow
327
- skills, show the skill names and document paths. Do not install or register skills automatically.
328
-
329
- `taptap-maker-local` covers Maker local workflow. `taptap-maker-dev-kit-guide` explains the local
330
- AI dev-kit resources installed during clone. `update-taptap-mcp` covers local TapTap MCP cache
331
- updates.
332
-
333
- Prefer user/global scope for Maker MCP installation. If a project/local config already exists,
334
- do not block the workflow; just explain that user/global scope is recommended to avoid config
335
- being tied to a specific project folder.
336
-
337
- ## Remote Sync Status
338
-
339
- For a bound Maker project, `maker://status` and `maker_status_lite` include `Maker remote sync`.
340
- Read this section before the user starts editing in a fresh conversation:
341
-
342
- - For frequent polling or quick local-only status checks, call `maker_status_lite` with
343
- `skip_remote_sync: true` to avoid a `git fetch origin` network round trip on every status read.
344
- - `up_to_date`: continue development.
345
- - `needs_pull` with `local_changes: no`: tell the user the workspace is clean and the local AI can
346
- run `git pull --ff-only origin main` before editing.
347
- - `needs_pull` with `local_changes: yes`: do not pull immediately. Explain that remote changes exist
348
- and local edits are present; ask the local AI to inspect `git status` and help the user choose
349
- submit current changes, stash then pull and restore, or cancel.
350
- - `diverged`: do not push or blindly pull. Ask the local AI to plan a rebase or merge of current
351
- Maker remote changes.
352
- - `branch_not_allowed`: Maker only accepts `main`; switch/migrate local commits to `main` before
353
- build or submit.
354
- - `remote_unavailable`: follow the failure classification and retry later only for temporary
355
- 5xx/network/timeout failures.
356
-
357
- ## Local Change Review
358
-
359
- Before submitting, run local Git inspection when available:
360
-
361
- ```bash
362
- git status --short --branch
363
- git diff --stat
364
- ```
365
-
366
- If the change set is small, inspect relevant diffs before summarizing. Do not paste large diffs
367
- unless the user asks. Summaries should be understandable to non-programmers:
368
-
369
- - what changed
370
- - why these files are being submitted
371
- - whether any generated or suspicious files are included
372
-
373
- If there are no local changes, do not create an empty commit unless the user explicitly asks.
374
-
375
- ## Submit And Push
376
-
377
- For Maker projects, user words like "提交", "提交代码", "推送", "push", or "提交到 Maker"
378
- mean:
379
-
380
- ```text
381
- commit + push + Maker build
382
- ```
383
-
384
- Use `maker_build_current_directory` for this path. Do not use generic Git task-id,
385
- branch-creation, or PR rules inside Maker project repositories.
386
-
387
- If `maker_build_current_directory` returns a build failure after a successful push, report both:
388
-
389
- - submit/push succeeded
390
- - build failed, with the concrete build error
391
-
392
- If `maker_build_current_directory` returns a successful remote build, check
393
- `runtime_logs.watch_started`. The MCP starts the local watcher as a detached CLI process. The
394
- standard command is:
395
-
396
- ```bash
397
- taptap-maker logs watch --target-dir <PROJECT_ROOT> --reset --interval 5s
398
- ```
399
-
400
- This CLI flow clears old local runtime logs before polling, then appends server-shaped rows to
401
- `.maker/logs/runtime/runtime.log`. Do not start a second watcher unless the first one failed to
402
- start. For gameplay/runtime diagnostics after a successful build, read
403
- `runtime_logs.local_file`. To check whether the watcher is alive or failing, read
404
- `runtime_logs.state_file`.
405
-
406
- Watcher protection rules:
407
-
408
- - The watcher owns `.maker/logs/runtime/watcher.pid`; a new watcher replaces the old watcher for
409
- the same project before writing logs.
410
- - Temporary poll failures are retried by default. Treat `logs_poll_error` as diagnostic output,
411
- not as a final failure, unless the watcher exits.
412
- - If server cursor metadata lags behind returned log timestamps, the local cursor is advanced past
413
- the newest written log. Local log writing appends server-returned rows as-is.
414
- - `.maker/logs/runtime/state.json` records heartbeat fields including `lastPollAt`,
415
- `lastSuccessAt`, `lastWrittenLogs`, `consecutiveFailures`, and `lastError`.
416
-
417
- If submit created a local commit but push failed because the Maker remote was temporarily
418
- unavailable, do not run a manual generic `git push`. Fix the reported cause if needed, then retry
419
- `maker_build_current_directory`. Maker MCP will detect committed-but-unpushed local commits and push
420
- them before build.
421
-
422
- For push failures, use the returned `classification`, `retryable`, `retry_reason`, and
423
- `retry_attempts` fields. Temporary 5xx/network/timeout failures may be retried with the Maker build
424
- tool; `remote_rejected` means remote updates require pull/rebase first; `auth` means refreshing PAT;
425
- `branch_not_allowed` means Maker remote only accepts `main`; `forbidden_path` means the remote
426
- pre-receive hook rejected one or more paths/directories and the forbidden pattern from stderr must
427
- be removed from the unpushed commit before retrying.
428
-
429
- When a Maker tool output contains `push_recovery`, follow it exactly:
430
-
431
- - Tell the user the local commit is preserved but not yet on Maker remote.
432
- - Do not ask for permission to run a generic `git push`.
433
- - Retry with `maker_build_current_directory` for submit and build requests.
434
- - If the failure is `remote_rejected`, ask before pull/rebase; do not create a new branch or PR.
435
- - If the failure is `branch_not_allowed`, do not pull/rebase. Tell the user Maker only accepts
436
- `main`, switch back to `main`, cherry-pick the preserved local commit there, then retry.
437
- - If the failure is `forbidden_path`, do not refresh PAT. Read the forbidden pattern in stderr,
438
- remove those paths from the unpushed commit while keeping local files, then retry after
439
- `git status` is clean for them.
440
-
441
- ## Pull And Conflict Handling
442
-
443
- Before pulling:
444
-
445
- 1. Run `git status --short --branch`.
446
- 2. If the workspace is dirty, explain that pulling can mix remote changes with local edits.
447
- 3. Offer safe options:
448
- - submit current local changes first
449
- - stash local changes, pull, then restore
450
- - cancel and let the user review local files
451
-
452
- If conflicts occur:
453
-
454
- 1. Run `git status --short`.
455
- 2. Identify conflicted files (`UU`, `AA`, `DU`, `UD`, or unmerged paths).
456
- 3. Show the user the conflict files and explain why the conflict happened.
457
- 4. Inspect conflict markers in each file.
458
- 5. Explain the competing versions in plain language.
459
- 6. Propose a resolution strategy.
460
- 7. Ask for confirmation before editing files.
461
-
462
- When showing conflict content, keep excerpts small and focused around conflict markers:
463
-
464
- ```text
465
- <<<<<<<
466
- local version
467
- =======
468
- remote version
469
- >>>>>>>
470
- ```
471
-
472
- Do not hide unresolved conflicts. After editing, run:
473
-
474
- ```bash
475
- git status --short
476
- ```
477
-
478
- Only submit after conflicts are fully resolved.
479
-
480
- ## User Communication
481
-
482
- Maker users may not understand Git terminology. Prefer concrete wording:
483
-
484
- - "本地改动" instead of "working tree"
485
- - "提交到 Maker" instead of "commit and push"
486
- - "远端版本" instead of "origin/main"
487
- - "冲突文件" instead of "unmerged paths"
488
-
489
- Always explain the next irreversible step before taking it.