con un clic
wlap-debug
Debug complex issues like a professional developer
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Debug complex issues like a professional developer
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
How to debug the e2e test failure
Have thorough understanding of codebase and describe the context like a professional developer
How to architect or design like a PROFESSIONAL developer or architect
How to architect, design, code and test the complex requirement like a professional developer
How to review changes like a professional developer
How to write automation test like a professional developer
| name | wlap:debug |
| version | 0.0.1 |
| description | Debug complex issues like a professional developer |
| user-invocable | true |
| allowed-tools | ["Read","Write","Edit","Bash","Glob","Grep","WebFetch","WebSearch","AskQuestion"] |
.agents/docs/design/[change-name]/context.mdAnalyze the codebase and find out the root cause.
If root cause was located, go to step 4. If root cause was NOT located, go to step 3.
scripts/log-server.tsfetch(`http://localhost:28080/log`, {...})
This loop could go several times until we fully locate the root cause. IMPORT The root cause can ONLY be confirmed with solid log evidence. 7. Clean Up
GET /shutdown). Log files are deleted automatically when the server shuts down — read them from path before shutdown.Brief the root cause and propose a fix. Draw a diagram or mermaid graph if root cause is complicated to describe. Ask user to type "approved" for explict approval. Apply the fix ONLY with the user approval.
IMPORTANT The proposal needs to cover the product code fix and test needs to supplement.
The log server is a small HTTP server that collects focused debug logs during steps 7–8 (reproduce / verify). It is a supplement, not a replacement for the project's own logging.
Use it to capture only the lines needed to confirm or reject hypotheses from step 6, without wading through noisy console or application log files.
Script: scripts/log-server.ts (Node.js built-ins only; runs on Node, Bun, or Deno).
# Bun (recommended in this monorepo)
bun scripts/log-server.ts
# Node 22+
node --experimental-strip-types scripts/log-server.ts
# Deno
deno run --allow-net --allow-write --allow-read scripts/log-server.ts
| Flag | Default | Description |
|---|---|---|
-p, --port | 28080 | Listen port |
--timeout | 15m | Auto-shutdown after this idle period (e.g. 30s, 15m, 1h, or milliseconds like 900000) |
-h, --help | — | Show usage |
The server binds to 127.0.0.1 only. When it exits (manual shutdown or timeout), it prints the reason to stderr.
Important: Call GET /shutdown when debugging is done, or rely on --timeout so the process does not stay running indefinitely. On shutdown (manual or timeout), the server deletes all session log files it created.
Base URL: http://127.0.0.1:<port>. Request bodies are JSON (Content-Type: application/json).
| Method | Path | Body | Success |
|---|---|---|---|
POST | /new | { "id": "...", "path": "..." } | 201 — create session and open log file |
POST | /log | { "id": "...", "message": "..." } | 200 — append one line |
POST | /end | { "id": "..." } | 200 — close session (log file kept on disk) |
GET | /sessions | — | 200 — { "sessions": [...] } |
GET | /shutdown | — | 200 then server exits and deletes all session log files |
GET | / | — | 200 — health check |
-, _ only.{PROJECT_ROOT}/issue-blablabla.log).# Terminal 1: start server (optional custom port / timeout)
bun scripts/log-server.ts -p 28080 --timeout 15m
# Terminal 2: instrumented debug session
curl -s -X POST http://127.0.0.1:28080/new -H "Content-Type: application/json" \
-d '{"id":"episode-rename","path":"./debug-logs/episode-rename.log"}'
curl -s -X POST http://127.0.0.1:28080/log -H "Content-Type: application/json" \
-d '{"id":"episode-rename","message":"before rename: foo.mkv"}'
curl -s http://127.0.0.1:28080/sessions
curl -s -X POST http://127.0.0.1:28080/end -H "Content-Type: application/json" \
-d '{"id":"episode-rename"}'
curl -s http://127.0.0.1:28080/shutdown
Instrument application code (or temporary logging) by POST /log to the server while reproducing the issue. After POST /end, analyze the file at path (it remains until shutdown). Call GET /shutdown only after you are done reading the logs.