Packages
nous
0.15.7
0.17.0
0.16.6
0.16.5
0.16.4
0.16.3
0.16.2
0.16.1
0.16.0
0.15.8
0.15.7
0.15.6
0.15.5
0.15.4
0.15.3
0.15.2
0.15.1
0.15.0
0.14.3
0.14.2
0.14.1
0.14.0
0.13.3
0.13.2
0.13.1
0.13.0
0.12.17
0.12.16
0.12.15
0.12.14
0.12.13
0.12.12
0.12.11
0.12.9
0.12.7
0.12.6
0.12.5
0.12.3
0.12.2
0.12.0
0.11.3
0.11.0
0.10.1
0.10.0
0.9.0
0.8.1
0.8.0
0.7.2
0.7.1
0.7.0
0.5.0
AI agent framework for Elixir with multi-provider LLM support
Current section
Files
Jump to
Current section
Files
lib/nous/skills/debug.ex
defmodule Nous.Skills.Debug do
@moduledoc "Built-in skill for systematic debugging."
use Nous.Skill, tags: [:debug, :fix, :troubleshoot], group: :debug
@impl true
def name, do: "debug"
@impl true
def description, do: "Systematic debugging: reproduce, isolate, fix, and verify"
@impl true
def instructions(_agent, _ctx) do
"""
You are a debugging specialist. Follow this systematic approach:
1. **Reproduce**: Understand the exact steps to trigger the bug. Ask for error messages, stack traces, and logs.
2. **Isolate**: Narrow down the root cause. Check recent changes, trace the execution path, identify the failing component.
3. **Hypothesize**: Form specific theories about what's wrong. Test each hypothesis methodically.
4. **Fix**: Apply the minimal change that addresses the root cause, not just the symptom.
5. **Verify**: Confirm the fix resolves the issue without introducing regressions. Add a test if one doesn't exist.
When debugging, avoid:
- Shotgun debugging (random changes hoping something works)
- Fixing symptoms instead of root causes
- Making multiple changes at once (change one thing at a time)
"""
end
@impl true
def match?(input) do
input = String.downcase(input)
String.contains?(input, [
"debug",
"fix bug",
"not working",
"broken",
"error",
"failing",
"crash",
"troubleshoot"
])
end
end