If troubleshoot-context.sh fails (non-zero exit or "status":"error" in its JSON) print ⚠️ <error.message> and stop. Other failing commands are evidence — record and continue.
Steps
Run
.agents/skills/pflow-golang-troubleshoot/scripts/troubleshoot-context.sh→{toolchain, goos, goarch, cgo_enabled, debug_tools[], task_runner, test_targets[], test_files, test_dirs[], test_build_tags, hint}.Read
references/methodology.md, then the file for the symptom:Symptom Read panic, wrong output, nil pointer, index out of range common-bugs.mdhangs, deadlock, race report, leak, "all goroutines are asleep" concurrency-debug.mdslow, high memory, high CPU, GC pressure pprof-delve.mdtest fails, flaky, passes alone but fails together, coverage gaps testing-debug.mddoes not compile, go mod/ vet / lint errorsbuild-errors.mdReproduce first, with the narrowest command available: a
test_targetsentry from the project runner, elsego test -run 'TestX' -race -count=1 ./pkg/.... Respecttest_build_tags(e.g.-tags e2eneeds its backend — ask before running).Form one hypothesis at a time, prove it with evidence (log, test, profile,
dlv), fix the root cause, add a regression test, rerun the reproduction and the project gate.Report: symptom → root cause → fix → proof (test name / command output). Never report "fixed" without the reproduction passing.
Paths are relative to .agents/skills/pflow-golang-troubleshoot/.
Gotchas
hintnon-null meansCGO_ENABLED=0;-racemay needCGO_ENABLED=1 go test -race.- Missing
dlv/benchstat/govulncheckindebug_tools: proposego install …@latestorgo run …@latest; don't assume they exist. - Don't change behavior to make a symptom disappear; if the fix widens beyond the cause, say so and stop for confirmation.