agentleFS
tyronerosstyroneross/claude-code-debugger/CLAUDE.md

claude-code-debugger

CLAUDE.md2 starsChanged 2 months agoApache-2.0View on GitHub

This project uses Coding Debugger for debugging memory. The npm package is @tyroneross/coding-debugger; the claude-code-debugger CLI binary remains available as a compatibility alias. Automatic behavior: - Past debugging sessions are stored and indexed - Similar incidents surface automatically when investigating bugs - Patterns are extracted from repeated issues - Session stop hook mines audit trail for missed incidents Commands: - coding-debugger debug "symptom" - CLI alias for memory search - /debugger "symptom" - Search past bugs for similar issues -…

The file

We split this CLAUDE.md into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Transparency: Every report uses ✅ Verified / ⚠️ Assumed / ❓ Unknown markers.

    line 40
  2. Very specific:

    When updating commands, edit only commands/*.md - both systems will use them.

    line 88
  3. Very specific:

    Trigger: Call /debugger "symptom" BEFORE investigating when you see:

    line 104
  4. Very specific:

    Progressive: Use /debugger-detail <ID> to drill into any match <!-- debugger-dynamic-end -->

    line 112

≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md
<!-- Plugin: coding-debugger · Version: 1.9.0 · Source of truth: local (~/dev/git-folder/claude-code-debugger) --><!-- Before any commit, version bump, or major change, read ./VERSIONING.md. Update it on version bumps. -->

Debugging Memory

This project uses Coding Debugger for debugging memory. The npm package is @tyroneross/coding-debugger; the claude-code-debugger CLI binary remains available as a compatibility alias.

Automatic behavior:

  • Past debugging sessions are stored and indexed
  • Similar incidents surface automatically when investigating bugs
  • Patterns are extracted from repeated issues
  • Session stop hook mines audit trail for missed incidents

Commands:

  • coding-debugger debug "symptom" - CLI alias for memory search
  • /debugger "symptom" - Search past bugs for similar issues
  • /debugger - Show recent bugs, pick one to debug
  • /debugger-status - Show memory statistics
  • /debugger-scan - Scan recent sessions for debugging work

The system learns from your debugging sessions automatically.

Debug Loop — Iterative Root Cause Debugging

For non-trivial bugs, the debug-loop skill provides deep investigation with iteration.

Workflow: Investigate (causal tree) → Hypothesize → Fix → Verify → Score → Critique → Report (up to 5 iterations)

Key agents:

  • root-cause-investigator — builds causal trees (branching, not linear), traces multiple potential causes, flags when to research externally
  • fix-critique — pressure-tests fixes before declaring resolved (root cause vs symptom, regression risk, evidence gaps)

Commands:

  • /debugger-agent "symptom" — Enter the iterative debugging loop explicitly

Auto-activation: The debugging-memory skill escalates to debug-loop when verdict is LIKELY_MATCH, WEAK_SIGNAL, or NO_MATCH — any verdict other than KNOWN_FIX.

State storage: .claude-code-debugger/debug-loop/ — state.json (iteration tracking), scorecard.md (pass/fail per criterion). Storage path is kept stable for backward compatibility.

Transparency: Every report uses ✅ Verified / ⚠️ Assumed / ❓ Unknown markers. No overclaiming.

v1.5.0 Storage Architecture

Tiered storage (new):

  • index.json — O(1) lookups by category, tag, file, quality tier
  • incidents.jsonl — append-only log for fast full-text search
  • MEMORY_SUMMARY.md — compressed context for LLM cold starts (<150 lines)
  • Individual INC_*.json files loaded on-demand for full details

Verdict system — search results return actionable verdicts:

  • KNOWN_FIX — high-confidence pattern match, apply directly
  • LIKELY_MATCH — similar incidents found, review for guidance
  • WEAK_SIGNAL — loosely related, worth considering
  • NO_MATCH — debug fresh, no prior knowledge

Compound IDs — incident IDs now include category:

  • Format: INC_CATEGORY_YYYYMMDD_HHMMSS_xxxx (e.g., INC_API_20260215_143022_a1b2)
  • Self-documenting filenames — browse incidents without opening them

Memory management:

  • Auto-archival: incidents beyond 200 active or 180 days old move to archive/
  • Context compression: compressContext() generates token-optimized strings
  • Batch I/O: file reads capped at 50 concurrent to prevent EMFILE errors

Key functions:

  • checkMemoryWithVerdict(symptom) — recommended entry point (returns verdict)
  • rebuildIndex() / loadIndex() — manage the memory index
  • buildMemorySummary() — generate compressed summary
  • searchIncidentLog(query) — fast JSONL search
  • archiveOldIncidents({ dryRun: true }) — preview archival

Plugin Development

This project is both an npm package and an AI coding agent plugin (Claude Code and Codex).

Plugin structure:

  • .claude-plugin/plugin.json - Plugin manifest
  • commands/ - Slash commands (single source of truth)
  • skills/debugging-memory/ - Auto-activating debugging skill (escalates to debug-loop for complex issues)
  • skills/debug-loop/ - Iterative root cause debugging skill (causal tree, critique, scorecard)
  • hooks/hooks.json - Session stop hook for auto-mining

Syncing: Commands in commands/ are read by:

  1. The plugin system (directly)
  2. The npm postinstall script (copies to .claude/commands/)

When updating commands, edit only commands/*.md - both systems will use them.

Architecture Patterns (from IBR & NavGator)

This project follows patterns proven in Interface Built Right and NavGator:

  1. Tiered storage — summary (always-loaded) → index (fast lookup) → files (on-demand)
  2. Verdict-first — classify results into actions, not raw scores
  3. Append-only logs — JSONL for audit trail and fast search
  4. Batch I/O — cap concurrent file operations at 50
  5. Compound IDs — encode type/category in IDs for self-documentation
  6. Context compression — minimize token usage when injecting into LLM context
<!-- debugger-dynamic-start -->

Debugging Memory (Auto-Active)

Trigger: Call /debugger "symptom" BEFORE investigating when you see:

  • Error messages, stack traces, test failures
  • "fix", "debug", "broken", "not working" from user
  • Editing a file listed in Hot Files below

Memory State: 4 incidents | 0 patterns | Quality: 2E/2G/0F Categories: api(1), error-handling(1), config(1), react-hooks(1) Hot files: lib/logger.ts(2), app/api/users/route.ts(1), components/TrendingTopics.tsx(1) Progressive: Use /debugger-detail <ID> to drill into any match

<!-- debugger-dynamic-end -->

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.