| name | debug |
| description | Debug errors, test failures, or unexpected behavior. Auto-detects project type. |
| argument-hint | [error message or description] |
Debug Command
Context
TECH_STACK = config_read("tech_stack", "generic")
LESSONS_PATH = config_read("lessons_path", ".agents/lessons/")
Bug Description
<bug_description>$ARGUMENTS</bug_description>
If the bug description above is empty, ask the user: "What error or issue are you experiencing? Please paste the error message or describe the unexpected behavior."
Do not proceed until you have a clear bug description.
Discover Similar Past Issues
Check if lessons directory exists, then discover similar past issues:
Task(subagent_type="majestic-engineer:workflow:lessons-discoverer",
prompt="workflow_phase: debugging | tech_stack: [tech_stack from context] | task: [bug_description]")
If lessons found with score > 70:
Present the high-confidence matches to the user BEFORE starting investigation:
Found similar past issues:
1. [Lesson title] (score: 78)
{lessons_path}/[category]/[filename].md
2. [Lesson title] (score: 65)
{lessons_path}/[category]/[filename].md
Use AskUserQuestion:
High-confidence match found. Read the documented solution first?
1. Read Lesson 1 (Recommended)
2. Read Lesson 2
3. Continue with full investigation
If user chooses to read a lesson:
- Display the lesson content using
Read(file_path="[lesson_path]")