spec-gen-debug

Debug reproducible bugs using spec-gen structural analysis and hypothesis-first workflows.

270|34|Updated Jan 31, 2026
One-click install
npx skills add https://github.com/clay-good/spec-gen --skill spec-gen-debug
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spec-gen-debug
Source: https://github.com/clay-good/spec-gen/tree/main/examples/mistral-vibe/skills/spec-gen-debug
Command: npx skills add https://github.com/clay-good/spec-gen --skill spec-gen-debug

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Debugging in large codebases is slow and error-prone when engineers or agents browse files speculatively without architectural context. This Skill anchors root-cause analysis in spec-gen's structural knowledge so investigators form a falsifiable hypothesis before reading source, reducing wasted exploration and guiding minimal, test-backed fixes.

Core Features & Use Cases

  • Orient & Prioritize: Uses spec-gen orient to surface candidate functions, domains, and call paths related to a reported symptom.
  • Hypothesis-First Workflow: Requires an explicit, falsifiable hypothesis based on structural traces before reading code, preventing speculative edits.
  • Scoped Fix + RED/GREEN Verification: Guides minimal edits, enforces writing a failing test first, verifies the fix passes and runs the full suite, and triggers spec drift checks and invariant documentation.
  • Spec Maintenance: Appends discovered invariants to domain specs or records cross-cutting antipatterns to prevent future recurrence.

Quick Start

Use the spec-gen-debug skill to investigate a reproducible bug by providing reproduction steps, project root, expected and observed behaviour, then run the hypothesis-first debugging workflow.

Frequently Asked Questions about spec-gen-debug

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

FAQPage Schema
How do I debug a reproducible bug without speculatively browsing code?

Root-cause analysis is faster when you anchor debugging in structural knowledge, forming a falsifiable hypothesis before reading source. This approach uses spec-gen orient to surface candidate functions and call paths, reducing wasted exploration and guiding minimal, test-backed fixes.

What is hypothesis-driven debugging and how does it prevent spec drift?

Hypothesis-driven debugging requires an explicit, falsifiable hypothesis based on structural traces before editing code. After a scoped fix passes RED/GREEN verification, spec drift checks trigger, appending discovered invariants to domain specs to prevent future bug recurrence.

How do I trace call paths to find the root cause of a bug in a large codebase?

Tracing call paths for root-cause analysis uses spec-gen orient to surface candidate functions and domains related to a reported symptom. This structural knowledge guides reproducible bug investigation, preventing speculative edits by prioritizing architectural context over file browsing.

Can I use spec-gen tools for RED/GREEN verification and fixing failing tests?

Spec-gen tools support RED/GREEN verification by guiding minimal edits and enforcing a failing test first. You need project root access, reproducible steps, and the ability to run tests to verify the fix passes and execute the full suite for drift checks.

What are the limitations of hypothesis-first debugging for complex software engineering?

Hypothesis-first debugging requires spec-gen analysis tools like orient, analyze_impact, and search_specs to be available in your repository. Without reproducible steps and project root access to run tests and MCP tools, this structural root-cause analysis workflow cannot function.

Does spec-gen-debug work with any testing framework for root-cause analysis?

Root-cause analysis with this approach works with any testing framework as long as you have project root access and reproducible steps to run tests. It relies on spec-gen MCP tools for structural traces and RED/GREEN verification rather than a specific testing platform.