dotfiles/.agents/skills/research-execution.md
Brydon DeWitt 83f456f25b fix(plugin): guard against undefined output.output for MCP tools
MCP tools don't populate output.output in the tool.execute.after hook —
the MCP content flows through OpenCode's internal parts pipeline instead.
This caused a crash: undefined is not an object (evaluating 'text.length')
in the truncate function.
2026-06-06 02:11:24 -04:00

1.0 KiB

description: Execution rules for debugging: hypothesis testing, instrumentation, and trace cleanup

Research Execution

Keep context clean and evidence tracked during active investigation.

Context Management

Methodology degrades after ~15 tool calls. Re-read investigation file and dead-ends every ~10 tool calls. When drifting toward guess-and-check, pause and re-read notes. Hold references; load on demand.

Findings Format

Record each hypothesis test to .session/findings.md:

- [timestamp] Hypothesis: [one sentence]
  Falsification: [what you'd expect if wrong]
  Result: [ELIMINATED/CONFIRMED] — [why, in one sentence]

Timing Awareness

Prefix unknown commands with time. Fast (<5s): low barrier. Slow (>30s): reason first. Unknown: measure. Capture: time cmd 2>&1 | tee /tmp/output.txt

Techniques

  • Five Whys: trace causal chains; starting point, not sole method
  • Delta Debugging: binary search between passing/failing cases
  • Rubber Duck: explain the system step by step to expose gaps