一键导入
debug
Interactive debugging with systematic root-cause analysis. Use when encountering any bug, test failure, or unexpected behavior — before proposing fixes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Interactive debugging with systematic root-cause analysis. Use when encountering any bug, test failure, or unexpected behavior — before proposing fixes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Cut a PPDS release — CHANGELOG refresh, version bump, tag push sequence, CI monitoring, post-publish verification. Use when preparing a new prerelease or stable release across CLI, TUI, MCP, Extension, and NuGet libraries.
Triage and merge open dependabot PRs per docs/MERGE-POLICY.md — classify each PR (auto-merge / verify-then-merge / manual review), enable auto-merge for safe ones, run targeted test suites for risky ones, and surface anything needing human judgment. Use when there's a backlog of dependabot PRs, after a quiet period, or as a routine drain.
AI self-verification of implemented work across surfaces (extension, CLI, MCP, TUI, workflow). Use after implementation to verify code works in its runtime environment.
Create, triage, and manage GitHub issues per PPDS backlog conventions. Use when creating issues, grooming the backlog, reviewing what to work on next, or filing bugs.
Brainstorm ideas into specs and plans through collaborative dialogue. Use when starting a new feature, exploring an idea, or designing a system — before any implementation.
Gates
| name | debug |
| description | Interactive debugging with systematic root-cause analysis. Use when encountering any bug, test failure, or unexpected behavior — before proposing fixes. |
Systematic debugging for CLI, TUI, Extension, and MCP development. Combines interactive feedback loops with disciplined root-cause analysis.
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST.
If you have not completed Phase 1 (Root Cause Investigation), you cannot propose fixes. Period. Skipping this is the single most common source of thrashing, wasted time, and user frustration.
Before touching any code:
git diff and git log for what changed since it last workedDo NOT skip this phase. Do NOT propose "quick fixes" during this phase.
If three or more fix attempts have failed, STOP. This is not a failed hypothesis — this is a wrong architecture. The pattern or approach is fundamentally unsound.
Before attempting more fixes:
| Thought | Reality |
|---|---|
| "Quick fix for now" | Return to Phase 1 |
| "Just try changing X" | Return to Phase 1 |
| "I don't fully understand but this might work" | Return to Phase 1 |
| "One more fix attempt" (after 2+ failures) | Question architecture |
When the user says these things, they are telling you your approach is wrong:
When you see these signals: STOP. Return to Phase 1. Re-read the error messages. Re-trace the data flow. Start fresh.
Based on recent changes or explicit argument (/debug cli, /debug tui, /debug extension, /debug mcp):
src/PPDS.Cli/Commands/ → CLI modesrc/PPDS.Cli/Tui/ → TUI modesrc/PPDS.Extension/ → Extension modesrc/PPDS.Mcp/ → MCP modedotnet build src/PPDS.Cli/PPDS.Cli.csproj -f net10.0
.\src\PPDS.Cli\bin\Debug\net10.0\ppds.exe <command> <args>
Verify: command executes without error, output format is correct, exit code is 0.
# Run TUI unit tests
dotnet test tests/PPDS.Cli.Tests/PPDS.Cli.Tests.csproj --filter "Category=TuiUnit" --no-build
# Run TUI visual snapshots (if Node.js available)
npm test --prefix tests/PPDS.Tui.E2eTests
If visual issues, update snapshots:
npm test --prefix tests/PPDS.Tui.E2eTests -- --update-snapshots
cd <root>/src/PPDS.Extension && npm run lint && npm run compile && npm run test && npm run local
Then reload VS Code (Ctrl+Shift+P -> Reload Window) and test manually.
Run from repo root with ext: prefix, or from src/PPDS.Extension/ directly:
| Request | Command |
|---|---|
| Build + install | npm run ext:local |
| Just install existing build | npm run ext:local:install |
| Revert to marketplace version | npm run ext:local:revert |
| Uninstall local | npm run ext:local:uninstall |
| Run unit tests only | npm run ext:test |
| Run E2E tests | npm run ext:test:e2e |
| Watch mode (hot reload) | npm run ext:watch |
| Full release test | npm run ext:release:test |
From VS Code debug panel:
| Configuration | When to use |
|---|---|
| Run Extension | Default — full build, then launch debug host |
| Run Extension (Watch Mode) | Iterating — hot reloads on file changes |
| Run Extension (No Build) | Quick — skip build, use existing compiled code |
| Run Extension (Open Folder) | Testing with a specific project folder |
| Run Extension Tests | Run VS Code extension integration tests |
For AI self-verification: Use /verify extension to exercise commands, inspect state, and verify webview rendering. See the CDP tool reference in /verify REFERENCE.md §ext.
Test MCP tools via MCP Inspector:
npx @modelcontextprotocol/inspector --cli --server "ppds-mcp-server"
Or use /verify mcp for structured verification.
After completing root-cause investigation (Phases 1-2), apply fixes iteratively:
When investigating a bug, trace backward through the call chain:
The root cause is often 3-5 steps removed from the symptom. Fixing the symptom without finding the root cause guarantees the bug will return in a different form.
After finding the root cause, add validation at every layer — not just at the fix point:
One fix at the root cause plus validation at every layer is more robust than a single fix at the symptom.
When tests fail due to timing (async operations, UI rendering, daemon startup):
sleep/delay — they are flaky by definitionWait until: condition is true
Check every: 100-500ms
Timeout after: reasonable upper bound (5s for UI, 30s for daemon)
On timeout: fail with descriptive message including what was expected
waitFor, retry, Eventually) rather than raw sleepCondition-based waiting makes tests both faster (they proceed as soon as the condition is met) and more reliable (they don't fail on slow machines).