h-diagnose

Diagnose failures by testing rival hypotheses in parallel with read-only probes.

1.4k|102|Updated Dec 10, 2025
One-click install
npx skills add https://github.com/m0n0x41d/haft --skill h-diagnose
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: h-diagnose
Source: https://github.com/m0n0x41d/haft/tree/main/internal/cli/skill/h-diagnose
Command: npx skills add https://github.com/m0n0x41d/haft --skill h-diagnose

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When a test, runtime, data, integration, or operational failure has multiple plausible causes, jumping to the first plausible story leads to wrong fixes. This Skill structures the diagnosis so the observable signal is stabilized first, rival explanations are tested against evidence, and inconclusive outcomes stay honest.

Core Features & Use Cases

  • Rival-hypothesis testing: Generates at least three hypotheses that differ in kind, each with a discriminating probe that could refute it.
  • Parallel read-only investigation: Assigns each hypothesis to an investigator running read-only probes in parallel, with edits prohibited during diagnosis.
  • Evidence-ranked conclusions: Ranks hypotheses by evidence for, evidence against, and remaining uncertainty while keeping refuted rivals visible for fallback or replay.
  • Optional project-memory integration: Uses Haft MCP queries to resolve project context and, only on explicit request, persists a diagnosis frame or hypothesis portfolio.
  • Use Case: A CI test fails intermittently after a dependency upgrade. Use this Skill to stabilize the failure signal, generate rival explanations (timing race, version incompatibility, environment drift), probe each read-only in parallel, and report the leading explanation with live rivals.

Quick Start

Ask the agent to diagnose the observed failure, for example: "Diagnose why the payment integration test fails intermittently in CI using h-diagnose."

Frequently Asked Questions about h-diagnose

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I diagnose a bug with multiple possible causes?

Stabilize the observed signal first by stating the time window, scope, and reproducibility without naming a cause. Then generate at least three rival hypotheses that differ in kind, define a discriminating probe for each, and run read-only probes in parallel before ranking by evidence.

What is rival-hypothesis testing in debugging?

Rival-hypothesis testing is a diagnostic method where several distinct explanations for a failure are generated upfront and each is tested with probes designed to refute it. Hypotheses are ranked by evidence for, evidence against, and remaining uncertainty, keeping refuted rivals visible for fallback.

When should I use h-diagnose instead of h-frame?

Use h-diagnose when a concrete failure has observable symptoms but an unclear cause across test, runtime, data, integration, or operational domains. Use h-frame instead for feature or redesign questions where no failure signal exists yet.

Does h-diagnose apply a fix after finding the root cause?

No, diagnosis does not authorize a fix. The Skill returns the leading explanation, concrete evidence, live rivals, and the next discriminating probe, and implementation proceeds only when the operator separately requests the change.

Does h-diagnose save diagnosis results automatically?

No, it defaults to a conversational, non-persistent diagnosis. A ProblemCard or hypothesis portfolio is persisted only on explicit save request or when a concrete receiving use requires the diagnosis to remain addressable, with provenance recorded.