Skip to content

Conversation

@janhesters
Copy link
Collaborator

@janhesters janhesters commented Oct 15, 2025

This is a simple slash command that works exceptionally well. I use it all the time and it almost always finds the bugs on first try.


Note

Add ai/commands/debug.md defining the DebugDetective command with output format and strict constraints.

  • Commands/Docs:
    • Add ai/commands/debug.md defining the DebugDetective command.
      • Specifies concise output structure: issue summary, key findings, root cause analysis, recommended solutions.
      • Enforces constraints: no code generation (suggestions allowed), thorough search/analysis before conclusions.

Written by Cursor Bugbot for commit b5403e0. This will update automatically on new commits. Configure here.

@janhesters janhesters self-assigned this Oct 15, 2025
@ericelliott
Copy link
Collaborator

@cursor 🙏 review

@cursor
Copy link

cursor bot commented Oct 17, 2025

🔬 Code Review

Issue Summary

The new debug slash command (ai/commands/debug.md) introduces a useful debugging workflow but has structural inconsistencies with existing command patterns and lacks proper integration into the help system.

Key Findings

❌ Structural Inconsistencies:

  • The debug.md file uses a DebugDetective {} block pattern, while all other command files follow a simpler format with just a description and Constraints {} block
  • Compare debug.md (lines 5-22) with the established pattern in log.md, commit.md, and review.md

❌ Missing Integration:

  • The debug command is not listed in the Commands section of ai/rules/please.mdc (lines 30-38)
  • Users running /help won't discover this new command

❌ Format Inconsistency:

  Constraints {
    NEVER write, modify, or generate any code
    You may suggest code changes in responses
    You MUST thoroughly search for relevant code

Compare with the established pattern:

## 📝 Log

Use log.mdc to collect salient changes, and log them to the activity-log.md.
Before beginning, read and respect the constraints in please.mdc.

Root Cause Analysis

The command was created without following the established convention of:

  1. Starting with emoji + title (e.g., ## 🐛 Debug)
  2. Brief description of purpose
  3. Constraints {} block that references please.mdc
  4. Registering the command in please.mdc

Recommended Solutions

1. Restructure debug.md to match established pattern:

## 🐛 Debug

Act as a top-tier software engineer with meticulous debugging skills.

Use this command to analyze and diagnose issues without modifying code.

Output Format {
  Be as concise as possible.
  - Issue Summary
  - Key Findings
  - Root Cause Analysis
  - Recommended Solutions (optional: include prevention strategies)
}

Constraints {
  Before beginning, read and respect the constraints in please.mdc.
  NEVER write, modify, or generate any code
  You may suggest code changes in responses
  You MUST thoroughly search for relevant code
  Always read and analyze code thoroughly before drawing conclusions
  Understand the issue completely before proposing solutions
  This is very important to ensure software works as expected and that user safety is protected.
}

2. Add to please.mdc Commands section:

Add between lines 31-38 in ai/rules/please.mdc:

  🐛 /debug - analyze and diagnose issues without modifying code

3. Consider creating debug.mdc rule file:

For consistency with other commands (log→log.mdc, commit→commit.mdc, review→review.mdc), consider creating ai/rules/debug.mdc with detailed debugging methodologies and best practices.

Prevention Strategies

  • Before adding new commands, review existing command patterns in ai/commands/
  • Ensure all new commands are registered in please.mdc Commands section
  • Follow the established emoji + title + constraints pattern
  • Test that /help properly lists the new command

Additional Notes

Strengths:

  • Clear debugging workflow with structured output format
  • Good emphasis on thorough code analysis before conclusions
  • Appropriate constraint against code modification during diagnosis
  • The "virtual cookies" motivational touch is charming and consistent with user safety messaging

The command itself is well-conceived and addresses a valuable use case. It just needs structural alignment with the project's conventions.


Open in Cursor Open in Web

Learn more about Cursor Agents

@ericelliott ericelliott requested a review from Copilot October 17, 2025 00:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds a new debug slash command prompt specification to guide concise, high-quality debugging responses.

  • Introduces a structured “DebugDetective” prompt with Output Format and Constraints.
  • Documents expected sections (Issue Summary, Key Findings, Root Cause Analysis, Recommended Solutions).

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.


Act as a top-tier software engineer with meticulous debugging skills.

DebugDetective {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The outer "DebugDetective" block feels like an unnecessary waste of tokens, which may hinder debug success rates slightly. Have you tested with & without it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ericelliott Nope, I have not. I'll trust your intuition. Gonna remove it 👍

@janhesters janhesters force-pushed the 2025-10-15-debug-slash-command branch from b5403e0 to fd562f2 Compare October 17, 2025 08:15
@janhesters
Copy link
Collaborator Author

@ericelliott done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants