Skip to content

Commit 4fc4d8c

Browse files
author
Nick Sullivan
committed
📋 Add troubleshoot command and refine personality system
Adds autonomous error resolution system with `/troubleshoot` command for production debugging. Refactors personality switching to automatically manage Cursor's `alwaysApply` flags across all personality files instead of requiring manual setup. Adds git collaboration and worktree task rules to standardize autonomous development workflows. Activates Bob Ross personality as default baseline.
1 parent 07a21e3 commit 4fc4d8c

8 files changed

Lines changed: 666 additions & 9 deletions

File tree

.claude/commands/personality-change.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,20 @@ d. If not removing (name != "none"):
5757

5858
e. Write updated `.claude/context.md`
5959

60-
### 3. Verify Cursor Setup
60+
### 3. Update Cursor Configuration
6161

62-
a. Read `.cursor/rules/personalities/<name>.mdc` frontmatter b. Check if
63-
`alwaysApply: true` is set c. If not set and name != "none", inform user: "⚠️ Note: For
64-
Cursor, manually set `alwaysApply: true` in .cursor/rules/personalities/<name>.mdc"
62+
a. Find all personality files in `.cursor/rules/personalities/` (except
63+
`common-personality.mdc`)
64+
65+
b. For each personality file:
66+
67+
- Read the file content
68+
- Extract frontmatter (between `---` markers)
69+
- If this is the selected personality and name != "none": set `alwaysApply: true`
70+
- If this is NOT the selected personality OR name == "none": set `alwaysApply: false`
71+
- Write the updated file back
72+
73+
c. Confirm updates were made
6574

6675
### 4. Report Results
6776

@@ -71,7 +80,8 @@ Cursor, manually set `alwaysApply: true` in .cursor/rules/personalities/<name>.m
7180
✓ Switched from <old-name> to <new-name> personality
7281
7382
Claude Code: Updated .claude/context.md
74-
Cursor: Active at .cursor/rules/personalities/<name>.mdc
83+
Cursor: Set alwaysApply=true in .cursor/rules/personalities/<new-name>.mdc
84+
Set alwaysApply=false in .cursor/rules/personalities/<old-name>.mdc
7585
```
7686

7787
**If activating (no previous):**
@@ -80,7 +90,7 @@ Cursor: Active at .cursor/rules/personalities/<name>.mdc
8090
✓ Activated <name> personality
8191
8292
Claude Code: Added to .claude/context.md
83-
Cursor: Active at .cursor/rules/personalities/<name>.mdc
93+
Cursor: Set alwaysApply=true in .cursor/rules/personalities/<name>.mdc
8494
```
8595

8696
**If removing:**
@@ -89,7 +99,7 @@ Cursor: Active at .cursor/rules/personalities/<name>.mdc
8999
✓ Removed active personality
90100
91101
Claude Code: Removed from .claude/context.md
92-
Cursor: Manually set alwaysApply: false if desired
102+
Cursor: Set alwaysApply=false for all personalities
93103
```
94104

95105
**If already active:**
@@ -111,5 +121,6 @@ Cursor: Manually set alwaysApply: false if desired
111121
- Only one personality active at a time (plus common-personality baseline)
112122
- Personality affects ALL future interactions in this project
113123
- `.cursor/rules/personalities/common-personality.mdc` is always applied as baseline
114-
- Cursor requires `alwaysApply: true` in frontmatter for auto-activation
124+
- Cursor frontmatter is automatically updated (`alwaysApply: true` for active, `false`
125+
for others)
115126
- Claude Code reads from `.claude/context.md` which is always included
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Setting Up /troubleshoot Command
2+
3+
## Quick Start
4+
5+
### 1. Configure MCP Server
6+
7+
Create `.mcp.json` in your project root:
8+
9+
```json
10+
{
11+
"mcpServers": {
12+
"sentry": {
13+
"url": "https://mcp.sentry.dev/mcp"
14+
}
15+
}
16+
}
17+
```
18+
19+
(Or use `"honeybadger"` with `https://mcp.honeybadger.io/mcp`)
20+
21+
### 2. Symlink for Cursor Compatibility
22+
23+
If you use both Claude Code and Cursor:
24+
25+
```bash
26+
ln -s ../.mcp.json .cursor/mcp.json
27+
```
28+
29+
This ensures both tools share the same MCP configuration.
30+
31+
### 3. Connect Error Monitoring Service
32+
33+
- **Sentry:** https://mcphubby.ai/integrations/sentry
34+
- **HoneyBadger:** https://mcphubby.ai/integrations/honeybadger
35+
36+
Click "Connect" and authorize MCP Hubby to access your account.
37+
38+
### 4. Install the Command
39+
40+
From ai-coding-config repo:
41+
42+
```bash
43+
ln -s ../ai-coding-config/.claude/commands/troubleshoot.md .claude/commands/troubleshoot.md
44+
```
45+
46+
### 5. Run It
47+
48+
```bash
49+
/troubleshoot
50+
```
51+
52+
The AI will autonomously fix production errors!
53+
54+
## What Happens
55+
56+
1. AI detects which error monitoring service is connected
57+
2. Fetches all unresolved errors
58+
3. Groups errors by root cause (cluster analysis)
59+
4. Calculates priority scores (recency + frequency + impact + blast radius)
60+
5. Fixes highest priority errors in isolated git worktrees
61+
6. Operates in parallel (multiple fixes simultaneously)
62+
7. Submits PRs with full context
63+
8. Monitors deployment and verifies fixes
64+
65+
## Advanced Usage
66+
67+
```bash
68+
/troubleshoot auto 5 # Fix top 5 bugs in parallel
69+
/troubleshoot watch # Continuous monitoring mode
70+
/troubleshoot analyze # Pattern analysis only
71+
/troubleshoot 3 # Fix specific bug by priority rank
72+
```
73+
74+
## Architecture
75+
76+
```
77+
Project Root/
78+
├── .mcp.json # MCP server config (source of truth)
79+
├── .cursor/
80+
│ └── mcp.json -> ../.mcp.json # Symlink for Cursor
81+
├── .claude/
82+
│ └── commands/
83+
│ └── troubleshoot.md -> ... # Command symlink
84+
└── .cursor/rules/
85+
├── git-worktree-task.mdc # Worktree workflow
86+
└── git-commit-message.md # Commit standards
87+
```
88+
89+
## Why This Approach
90+
91+
**Unified Configuration:** `.mcp.json` is the single source. Both Claude Code and Cursor
92+
symlink to it.
93+
94+
**AI-First Design:** The command trusts the AI to make intelligent decisions.
95+
Goal-focused, not prescriptive.
96+
97+
**Parallel Workflows:** Multiple bugs fixed simultaneously in isolated worktrees. Much
98+
faster than sequential fixing.
99+
100+
**Pattern Recognition:** AI clusters related errors and fixes root causes, not just
101+
symptoms.
102+
103+
**Autonomous Operation:** No hand-holding needed. AI operates continuously until
104+
production is clean.

0 commit comments

Comments
 (0)