From oh-no-harness
Investigates failures and bugs to find root cause before applying fixes. Covers failing tests, builds, installs, regressions, flaky behavior, and unexpected output.
How this skill is triggered — by the user, by Claude, or both
Slash command
/oh-no-harness:systematic-debugging <failure, command, bug report, or unexpected behavior><failure, command, bug report, or unexpected behavior>The summary Claude sees in its skill listing — used to decide when to auto-load this skill
<!-- oh-no-harness-generated-skill-wrapper -->
This generated file is the Codex-facing runtime skill document. Codex should read this file directly; maintainers edit the source documents listed below instead.
Source order:
../../docs/skill-core/systematic-debugging.md../../docs/platforms/codex-runtime.mdThe sections below are already composed for this platform. Do not ask the runtime model to load another platform's runtime document or invocation syntax.
Find the root cause before changing behavior.
This skill is the direct debugging entry point for failures that do not need the full ralph execution loop.
Systematic Debugging is the failure-investigation and repair stage.
Use it when tests, builds, runtime behavior, installs, hooks, or user reports show a concrete failure. It should establish reproduction and root cause before returning to implementation or verification.
Use for:
Do not use for greenfield feature work. Use ralplan or ralph when the task is broader than a bounded failure.
Read a triggered owner immediately before the dependent gate. A path reference here is a pointer, not a substitute for reading. If a listed file cannot be read, record the blocker instead of proceeding past the gate that depends on it.
| Contract | Class | Trigger / timing |
|---|---|---|
docs/shared/ralph-subagent-policy.md | triggered | before dispatching a diagnostic, executor, reviewer, or verifier role |
docs/shared/cross-host-review.md | triggered | before paired debugger or post-fix review when a named THOROUGH risk selects it |
Use the listed roles as the failure requires. On subagent-capable hosts, use
isolated diagnostic and evidence roles when they provide decision-changing
evidence, context separation, or latency benefit so logs, traces, and
exploratory output do not pollute the main thread. The normal flow is diagnostic first
(debugger and, when context is missing, explore), then the minimal fix
(executor subagent when the write scope is isolated, otherwise inline with a
recorded reason), then evidence (verifier). plan-reviewer is a
conditional escalation role, not a required final step: use it immediately when
three fix attempts fail, architecture-level coupling appears, or the apparent
fix would change broad APIs, product behavior, data handling, security, or
delivery scope. Dispatch is governed by the active skill's platform policy and
Ralph's ## Mode-Gated Agent Dispatch when this debugging pass is inside Ralph.
For direct debugging outside Ralph, apply docs/shared/ralph-subagent-policy.md
for role isolation, fallback reasons, and eligible batch dispatch.
Apply the active platform's dispatch authorization for this skill's diagnostic,
fix, evidence, and post-fix review roles. Do not ask for per-run subagent
approval when the active platform already supplies standing authorization for
eligible debugger, explore, isolated executor, verifier, conditional
plan-reviewer, or warranted post-fix review roles. Use inline fallback only
when dispatch is unavailable, unsafe to isolate, or too small to benefit, and
record the fallback reason.
Respect the active platform runtime document for dispatch versus inline execution. Do not collapse diagnostic or evidence roles inline when the host can dispatch them with an isolated scope. When any listed role is dispatched, apply the active platform's role prompt and dispatch requirements before the task-specific failure, scope, expected output, and verification responsibility.
| Agent | Dispatch (when) |
|---|---|
debugger | Dispatch one debugger to reproduce the failure, identify root cause, and recommend the minimal fix. Use a paired cross-host/Same-Host investigation only for a named THOROUGH uncertainty or repeated-failure trigger. |
explore | Dispatch explore subagent to gather codebase facts, related call sites, working examples, and commands. |
executor | Dispatch executor subagent to apply the minimal fix only after root cause and reproduction evidence exist. |
verifier | Dispatch verifier subagent to confirm the fix and package evidence; its scenario lens covers post-fix validation when the failure affects user-facing flows, scenarios, or acceptance criteria. An unconditionally single self-host independent pass, never a cross-host or same-host pair. |
plan-reviewer | Dispatch plan-reviewer subagent as a conditional escalation to reassess direction after three failed fix attempts, when architecture-level coupling is exposed, or before broad API/product/data/security/scope changes. Cross-host merge: one verdict. |
code-reviewer | Dispatch code-reviewer post-fix when the changed code is nontrivial, shared, workflow-affecting, or maintainability-sensitive, or when its security lens is needed because auth, data, file system, network, secrets, sandbox, or policy-sensitive behavior is touched. Cross-host merge: merged findings. |
STANDARD uses one dispatched reviewer or debugger instance. Apply
docs/shared/cross-host-review.md only when a named THOROUGH trigger selects a
pair. The post-fix verifier remains one independent self-host pass governed by
the maker-verifier carve-out.
test-driven-development to create a
failing reproduction test before changing production code.fusion-rescue. Return control to
Systematic Debugging with the synthesis before applying a fix.executor when the write scope is isolated; use
inline work only with a recorded reason.verification-before-completion before claiming the failure is fixed. The
verification evidence must show that the failure mode is gone, not only that
the current trigger no longer appears in this environment.Parallel hypothesis testing for steps 5-7: when reproduction is established and
two or more plausible root-cause hypotheses are independently testable, dispatch
one debugger subagent per hypothesis (cap 3) in a single batch. Step 6's
one-active-hypothesis rule applies per debugger agent: each parallel debugger
receives exactly one hypothesis, the confirming/refuting evidence it should look
for, and its read-only diagnostic scope. Each parallel debugger runs only
non-mutating diagnostics in disjoint scopes and returns evidence, confidence
movement, and rejected-hypothesis rationale; if diagnostics would mutate state
or scopes overlap, keep the sequential one-active-hypothesis flow above. The
main thread synthesizes the returned evidence, selects the confirmed root cause,
and a single executor applies the fix. Below two hypotheses, or when
hypotheses are not independently testable, the sequential flow above applies
unchanged.
Stop and ask or escalate to plan-reviewer when:
plan-reviewer escalation trigger from ## Agent Roles fires (repeated
failed fix attempts; broad architecture or API scope; product behavior,
data handling, security, or delivery-scope ambiguity)Return:
None — this is a failure-investigation mid-loop skill. It may use
fusion-rescue as a bounded internal escalation when ordinary diagnostics
stall, then return to this debugging flow. After verification, return the result
to the caller (ralph, ultrawork, or direct invocation). Do not chain to
another workflow skill.
This compact platform section is embedded in generated Codex-facing skill documents.
Codex-facing public skills live under skills/. Generated
skills/<skill>/SKILL.md files compose the matching skill core, this compact
runtime section, and any Codex skill-specific overlay such as
docs/platforms/codex-<skill>.md.
Ask approval, preference, scope, or next-step questions directly in the Codex conversation. Keep prompts outcome-first: state the desired outcome, acceptance criteria, non-goals or side effects, expected evidence, and output shape before detailed steps.
Use compact final answers unless the active skill requires a plan, review, or verification report. Preserve durable state in written artifacts before long work, compaction, or handoff.
Dispatch only after the active skill's trigger fires, then read
docs/platforms/codex.md ## Role Dispatch for the full host contract. Use
spawn_agent(agent_type="oh-no-<role>", ...) first, do not combine it with
fork_context=true, and use generic prompt embedding only after the custom
agent is actually rejected. The task packet carries scope, ownership, expected
output, and lifecycle.
Every dispatched result is a dependency: wait_agent must reach final status,
the caller captures and uses the output, and only then performs lifecycle
cleanup. Timeout, empty output, or "No agents completed yet" is not final; do
not close, redo inline, or use missing output as evidence.
After confirmed custom-agent unavailability, embed
docs/agent-core/<role>.md; see the full platform doc for the fallback shape.
This channel is trigger-loaded, not embedded in every workflow decision. When a
named THOROUGH paired-review or Fusion Rescue trigger fires, read and apply
docs/platforms/codex.md ## Cross-Host Consult Channel before dispatch. Until
then, do not preload opposite-host invocation details.
npx claudepluginhub p/jcwleo-oh-no-harness-plugins-oh-no-harnessSystematically investigates and diagnoses bugs, failing tests, build failures, regressions, flaky behavior, and unexpected output to find root cause before applying fixes.
Enforces systematic root cause investigation for bugs, test failures, and unexpected behavior through four phases: investigation, pattern analysis, hypothesis testing, and implementation.
Executes systematic debugging loop: reproduce bug, analyze root cause, apply fix, verify with independent agent challenge to confirm fundamental resolution over workarounds.