gstack openclaw investigate

Engineering Community

Skill notes

Iron Law

NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST. Fixing symptoms creates whack-a-mole debugging. Every fix that doesn't address root cause makes the next bug harder to find. Find the root cause, then fix it.

Phase 1: Root Cause Investigation

Gather context before forming any hypothesis. Collect symptoms: Read the error messages, stack traces, and reproduction steps. If the user hasn't provided enough context, ask ONE question at a time. Don't ask five questions at once. Read the code: Trace the code path from the symptom back to potential causes. Search for all references, read the logic around the failure point. Check recent changes:

Phase 2: Pattern Analysis

Check if this bug matches a known pattern: Race condition ... Intermittent, timing-dependent. Look at concurrent access to shared state. Nil/null propagation ... NoMethodError, TypeError. Missing guards on optional values. State corruption ... Inconsistent data, partial updates. Check transactions, callbacks, hooks. Integration failure ... Timeout, unexpected response. External API calls, service boundaries.

Phase 3: Hypothesis Testing

Before writing ANY fix, verify your hypothesis. Confirm the hypothesis: Add a temporary log statement, assertion, or debug output at the suspected root cause. Run the reproduction. Does the evidence match? If the hypothesis is wrong: Search for the error (sanitize sensitive data first). Return to Phase 1. Gather more evidence. Do not guess. 3-strike rule: If 3 hypotheses fail, STOP. Tell the user:

Phase 4: Implementation

Once root cause is confirmed: Fix the root cause, not the symptom. The smallest change that eliminates the actual problem. Minimal diff: Fewest files touched, fewest lines changed. Resist the urge to refactor adjacent code. Write a regression test that: Fails without the fix (proves the test is meaningful)

Fluxly profile Runtime and permissions are inferred by Fluxly static checks, not author declarations or runtime test results.
Domain
Engineering
Author-declared agents
No explicit declaration found; this is not inferred or tested compatibility
Static check
88 / 100 · heuristic scan, not runtime safety proof
Runtime evidence
Not run; no isolated runtime test evidence is currently recorded
Author / version / license
@garrytan · no license declared
Token usage
Lean
Setup complexity
Plug-and-play
External API key
Not required
Operating systems
Unspecified (assume cross-platform)
Runtime requirements
No explicit requirements detected
Detected file/system behavior
  • Read-only
  • Write / modify
  • Env read
Network behavior
Local-only
Install commands
None (reference only)

Heads up: Tool permissions are not declared; actual access depends on the runtime.

01
Phase 1: Root Cause Investigation

Gather context before forming any hypothesis. Collect symptoms: Read the error messages, stack traces, and reproduction steps. If the user hasn't provided enough context, ask ONE question at a time. Don't ask five questions at once. Read the code: Trace the code path from the symptom back to potential causes. Search for all references, read the logic around the failure point. Check recent changes:

02
Phase 2: Pattern Analysis

Check if this bug matches a known pattern: Race condition ... Intermittent, timing-dependent. Look at concurrent access to shared state. Nil/null propagation ... NoMethodError, TypeError. Missing guards on optional values. State corruption ... Inconsistent data, partial updates. Check transactions, callbacks, hooks. Integration failure ... Timeout, unexpected response. External API calls, service boundaries.

03
Phase 3: Hypothesis Testing

Before writing ANY fix, verify your hypothesis. Confirm the hypothesis: Add a temporary log statement, assertion, or debug output at the suspected root cause. Run the reproduction. Does the evidence match? If the hypothesis is wrong: Search for the error (sanitize sensitive data first). Return to Phase 1. Gather more evidence. Do not guess. 3-strike rule: If 3 hypotheses fail, STOP. Tell the user:

04
Phase 4: Implementation

Once root cause is confirmed: Fix the root cause, not the symptom. The smallest change that eliminates the actual problem. Minimal diff: Fewest files touched, fewest lines changed. Resist the urge to refactor adjacent code. Write a regression test that: Fails without the fix (proves the test is meaningful)

05
Phase 5: Verification & Report

Fresh verification: Reproduce the original bug scenario and confirm it's fixed. This is not optional. Run the test suite. Output a structured debug report: DEBUG REPORT Symptom: what the user observed

Discussion

Powered by GitHub Discussions. Sign in with GitHub to comment, react, or subscribe.