developer-like-execution
When to use
- Implementing features
- Fixing bugs
- Refactoring code
- Analyzing unexpected behavior
- Debugging backend or frontend issues
- Creating or refactoring skills, rules, commands, or agent docs
- Working with APIs, frontend, or backend logic
Do NOT use when only explaining concepts or writing pure reference documentation without execution.
Goal
Act like a real developer: think before acting, analyze before coding, verify before concluding.
Avoid unnecessary trial-and-error. Minimize output, token usage, and irrelevant data.
Develop against expected behavior, ideally test-first.
Core principles
- Never start coding before understanding the affected system
- Prefer analysis over guessing
- Prefer targeted queries over large output dumps
- Avoid unnecessary loops, retries, and blind experimentation
- Always verify behavior with real execution when possible
- Prefer tests first when expected behavior can be defined
- If requirements are unclear, ask a precise question instead of filling gaps with assumptions
Tool priority
Use the smallest, most targeted tool that gives the needed evidence.
If a tool is available as MCP server, prefer it over manual alternatives.
Verification tool mapping
| What changed | Primary tool | MCP alternative |
|---|---|---|
| Backend/API endpoint | curl -s \| jq | Postman MCP (if configured) |
| Frontend/UI | Manual browser check | Playwright MCP (navigate + snapshot) |
| Execution flow/debugging | Print statements, logs | Xdebug MCP (breakpoints, variable inspection) |
| CLI commands/jobs | Run command, check exit code | — |
| Database | SQL query, migration status | — |
| External APIs | Http::fake() in tests | Postman MCP for manual checks |
Xdebug workflow (when available)
If Xdebug is available (as MCP or IDE integration):
- Set breakpoints at the suspected code path
- Trigger the request (curl, browser, test)
- Inspect variables at breakpoint — don't guess values from reading code
- Step through to verify actual execution flow vs. assumed flow
- Check: is the data what you expected? Is the branch taken what you expected?
Use Xdebug before adding print statements or debug logging.
It's faster and leaves no cleanup work.
Playwright for frontend verification
When UI changes are involved:
- Navigate to the affected page
- Take a snapshot of the rendered state
- Verify the expected elements are present and interactive
- Check console/network for errors
- Compare before/after if refactoring
Prefer targeted output
jqfor JSON:curl -s /api/users | jq '.[0] | {id, email}'— never the full responserg,grepfor text: specific patterns, not full fileshead,tail,cut,sort,uniqfor narrowing results--filter,--json,--formatflags on CLI tools — always use them- Route lookup — Laravel
php artisan route:list --json | jq '…', Railsbin/rails routes | grep users, Expressconsole.log(app._router.stack), FastAPIapp.routes, Symfonybin/console debug:router. - Logs —
rg "request_id=abc123" <log-dir>— nevercat <log-file>. Log dirs by stack: Laravelstorage/logs/, Railslog/, Node./logs/orjournalctl, Python./logs/orjournalctl, Dockerdocker compose logs <svc> --since 5m.
Avoid large output by default
Do NOT:
- Dump full JSON if one field is enough
- Load full route lists when filtering one route is enough
- Inspect full log files when one request ID or timestamp can isolate the case
- Re-run broad commands repeatedly without narrowing
- Load full database tables when a WHERE clause is enough
Procedure
1. Understand the task
- Read the request carefully
- Identify expected outcome
- Identify affected system area
- Identify whether the task is implementation, debugging, refactoring, or analysis
2. Check whether requirements are complete
Before acting, verify:
- Expected behavior is clear
- Acceptance criteria are clear
- Edge cases are known
- Affected user flow or API contract is known
If important information is missing:
- Stop execution planning
- Output a precise clarification request
- Do NOT silently assume missing requirements
3. Analyze BEFORE acting
- Read the affected files
- Trace data flow and execution path
- Compare with requirements, tickets, current behavior, tests, existing patterns
- Identify likely cause and smallest correct change
- Consult memory — invariants and prior decisions. Via