debug-with-user
Human-in-the-loop macOS debugging checkpoints. Use when automation needs a human to confirm UI state, report observations, or proceed through manual steps.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- debug-with-user
- description
- Human-in-the-loop macOS debugging checkpoints. Use when automation needs a human to confirm UI state, report observations, or proceed through manual steps.
02 资源文件 36
- 脚本dialog/dialog_test.go2.8 KB
- 脚本dialog/dialog.go6.9 KB
- 脚本main.go4.7 KB
- 参考文档tests/agent-pro/DOCTEST.md2.8 KB
- 参考文档tests/agent-pro/register/ASSERT.md725 B
- 参考文档tests/agent-pro/register/SETUP.md420 B
- 参考文档tests/agent-pro/SETUP.md1.8 KB
- 参考文档tests/cli/ask/dry-run/button-affirmed/ASSERT.md530 B
- 参考文档tests/cli/ask/dry-run/button-affirmed/SETUP.md451 B
- 参考文档tests/cli/ask/dry-run/button-not-affirmed/ASSERT.md512 B
- 参考文档tests/cli/ask/dry-run/button-not-affirmed/SETUP.md475 B
- 参考文档tests/cli/ask/dry-run/customize/ASSERT.md596 B
- 参考文档tests/cli/ask/dry-run/customize/SETUP.md569 B
- 参考文档tests/cli/ask/dry-run/dismissed/ASSERT.md599 B
- 参考文档tests/cli/ask/dry-run/dismissed/SETUP.md409 B
- 参考文档tests/cli/ask/dry-run/SETUP.md507 B
- 参考文档tests/cli/ask/non-mac/ASSERT.md1.2 KB
- 参考文档tests/cli/ask/non-mac/SETUP.md958 B
- 参考文档tests/cli/ask/SETUP.md618 B
- 参考文档tests/cli/DOCTEST.md5.0 KB
- 参考文档tests/cli/SETUP.md1.6 KB
- 参考文档tests/cli/skill-show/ASSERT.md749 B
- 参考文档tests/cli/skill-show/SETUP.md396 B
- 参考文档tests/dialog/escape/newlines/ASSERT.md556 B
- 参考文档tests/dialog/escape/newlines/SETUP.md408 B
- 参考文档tests/dialog/escape/quotes-and-backslashes/ASSERT.md499 B
- 参考文档tests/dialog/escape/quotes-and-backslashes/SETUP.md345 B
- 参考文档tests/dialog/escape/SETUP.md503 B
- 参考文档tests/dialog/parse/button-returned/ASSERT.md544 B
- 参考文档tests/dialog/parse/button-returned/SETUP.md380 B
- 参考文档tests/dialog/parse/SETUP.md491 B
- 参考文档tests/dialog/parse/text-returned/ASSERT.md562 B
- 参考文档tests/dialog/parse/text-returned/SETUP.md445 B
- 参考文档tests/dialog/SETUP.md711 B
- 参考文档tests/DOCTEST.md5.0 KB
- 参考文档tests/SETUP.md1.0 KB
03 SKILL.md 正文
debug-with-user
Human-assisted debugging for macOS workflows. Automate everything scriptable; at checkpoints, ask the user via native dialogs and parse structured JSON answers.
When to use
/debug-with-useror explicit human-assisted debug requests- macOS UI steps that need confirmation (window opened, correct app focused, etc.)
- After automation completes a step and you need a human report
Workflow
- Automate first — run every scriptable step (open apps, post notifications, etc.).
- Checkpoint — run
debug-with-user askwith a clear title, message, and absolute paths. - Parse JSON — read the single-line stdout object:
via == "button": useaffirmed(true/false) for pass/fail semantics.via == "free_text": treatansweras the user's report (Customize path).
- Exit codes —
0answer,1dismissed/cancel,2error (e.g. non-macOS without dry-run).
CLI examples
debug-with-user ask \
--title "Step 1 — Did VS Code open?" \
--message "Project folder:\n/tmp/demo" \
--option "Yes — window opened" \
--option "No — window did not open" \
--affirm "Yes — window opened" \
--cancel "Cancel"
The CLI always appends a Customize button for free-text reports.
macOS display alert allows at most 3 buttons. The CLI keeps Customize and
up to 3 options total (2 --option plus Customize). More than that exits
with an error suggesting multi-step confirmation (no silent truncation). Every preset returns a normal answer
(affirmed true/false); press Escape to dismiss without choosing.
Aliases: confirm (--yes / --no), proceed (--proceed / --cancel).
Install
If debug-with-user is not on PATH:
go install github.com/xhd2015/agent-pro/agents/debug-with-user@latest
CI / non-macOS
Real dialogs require macOS osascript. In CI, set DEBUG_WITH_USER_DRY_RUN=1 and stage
responses with DEBUG_WITH_USER_DRY_RUN_BUTTON, DEBUG_WITH_USER_DRY_RUN_TEXT, or
DEBUG_WITH_USER_DRY_RUN_DISMISSED=1.
JSON contract
Preset button:
{"answer":"Yes — window opened","via":"button","affirmed":true}
Customize (free text):
{"answer":"VS Code opened but wrong workspace","via":"free_text"}
04 同仓库更多 Skills
verify-with-prototype
Prototype-before-production workflow for risky host integrations (sudo, privileges, system config). Use when a feature touches the real OS, when behavior must be proven with a small script before full implementation, or when the user mentions prototype verification, POC script, or verify-with-prototype. Run after investigate/followup and before doctest-TDD integration.
verify-on-behalf-of-user
Run human-style scenario verification after an agent claims work is done: git status, build into ~/.sandbox/bin (default sandbox mode) or opt-in host mode (outside sandbox: wrk --reinstall-local / change-scoped install), real integration/E2E scenarios (start servers, browser-agent for UI), always-labeled depth, markdown transcript written and inlined for review. Use for "verify on my behalf", before commit. Complements doctests; does not replace them. Load a sub-topic with: agent-pro skill --show verify-on-behalf-of-user/<topic>
test-case-tree-design-expert
Use when the user wants a decision-tree style test case design with inherited setup and per-leaf assertions.
test-case-design-expert
Use when the user wants comprehensive user-facing end-to-end test scenarios for a feature description.
tdd-expert
Use when the user has a test-case-tree output and wants runnable Go tests plus stub implementation following Test-Driven Development.
summarize-a-skill
Meta-skill: distill durable high-signal guidance (worked vs failed, wrong → correct, and anything else that quickens future similar tasks) into a brief reusable skill document with YAML frontmatter. When the user does not explicitly ask for a new skill/file, prefer updating an existing skill over creating one. Writes skills/<name>/SKILL.md (or docs|doc/skills/…). Use for /summarize-a-skill, "summarize what worked", "lessons learned into a skill", or "write a skill from this session".