godmode-core 0.8.1

Core library for godmode: task graphs, session state, dispatch, and Claude Code plugin integrations.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! systematic-debugging — PostToolUse/Bash hook.
//! After non-zero exit (not godmode/git), nudges systematic debugging.

/// Run the systematic-debugging hook. Returns a message for stderr (may be empty).
pub fn run(command: &str, exit_code: i64) -> String {
    if exit_code == 0 {
        return String::new();
    }

    // Skip godmode and git commands
    if command.contains("godmode") || command.contains("git") {
        return String::new();
    }

    format!(
        "[godmode:debug] Command failed (exit {exit_code}) — run /godmode:systematic-debugging before guessing a fix"
    )
}