@paulduvall/claude-dev-toolkit 0.0.1-alpha.11 → 0.0.1-alpha.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +7 -7
- package/bin/claude-commands +72 -9
- package/commands/active/xcontinue.md +92 -0
- package/commands/active/xexplore.md +94 -0
- package/commands/active/xverify.md +80 -0
- package/commands/experiments/xdevcontainer.md +238 -0
- package/commands/experiments/xnew.md +5 -0
- package/hooks/README.md +32 -0
- package/hooks/file-logger.sh +4 -2
- package/hooks/lib/argument-parser.sh +7 -2
- package/hooks/lib/config-constants.sh +4 -4
- package/hooks/lib/context-manager.sh +19 -8
- package/hooks/lib/error-handler.sh +21 -10
- package/hooks/lib/execution-engine.sh +11 -194
- package/hooks/lib/execution-results.sh +113 -0
- package/hooks/lib/execution-simulation.sh +114 -0
- package/hooks/lib/field-validators.sh +104 -0
- package/hooks/lib/file-utils.sh +49 -26
- package/hooks/lib/subagent-discovery.sh +9 -6
- package/hooks/lib/subagent-validator.sh +19 -209
- package/hooks/lib/validation-reporter.sh +134 -0
- package/hooks/on-error-debug.sh +16 -11
- package/hooks/pre-commit-test-runner.sh +132 -0
- package/hooks/pre-write-security.sh +14 -6
- package/hooks/prevent-credential-exposure.sh +55 -45
- package/hooks/subagent-trigger-simple.sh +17 -8
- package/hooks/verify-before-edit.sh +135 -0
- package/lib/oidc-command.js +385 -8
- package/lib/setup-wizard.js +155 -262
- package/lib/uninstall-command.js +100 -0
- package/package.json +2 -2
- package/scripts/postinstall.js +168 -171
- package/subagents/debug-specialist.md +6 -0
- package/templates/README.md +15 -0
- package/templates/basic-settings.json +33 -19
- package/templates/comprehensive-settings.json +68 -171
- package/templates/global-claude.md +344 -0
- package/templates/security-focused-settings.json +58 -41
- package/lib/installation-instruction-generator-backup.js +0 -579
- package/lib/package-manager-service.js +0 -270
- package/subagents/debug-context.md +0 -197
|
@@ -1,270 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Package Manager Service
|
|
3
|
-
*
|
|
4
|
-
* Handles cross-platform package manager operations and configurations.
|
|
5
|
-
* Extracted from DependencyValidator as part of Phase 1 bloater refactoring.
|
|
6
|
-
*
|
|
7
|
-
* Features:
|
|
8
|
-
* - Multi-platform package manager support
|
|
9
|
-
* - Package name mapping across different managers
|
|
10
|
-
* - Command generation for install/check operations
|
|
11
|
-
* - Platform-specific package manager detection
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
const { execSync } = require('child_process');
|
|
15
|
-
const PlatformUtils = require('./platform-utils');
|
|
16
|
-
|
|
17
|
-
class PackageManagerService {
|
|
18
|
-
constructor() {
|
|
19
|
-
this.platformUtils = new PlatformUtils();
|
|
20
|
-
this.config = {
|
|
21
|
-
packageManagers: this._createPackageManagersConfig(),
|
|
22
|
-
dependencyMappings: this._createDependencyMappings()
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Create package managers configuration by platform
|
|
28
|
-
* @returns {Object} Package managers by platform
|
|
29
|
-
* @private
|
|
30
|
-
*/
|
|
31
|
-
_createPackageManagersConfig() {
|
|
32
|
-
return {
|
|
33
|
-
linux: [
|
|
34
|
-
{ name: 'apt', install: 'sudo apt-get install {package}', check: 'dpkg -l {package}' },
|
|
35
|
-
{ name: 'yum', install: 'sudo yum install {package}', check: 'rpm -q {package}' },
|
|
36
|
-
{ name: 'dnf', install: 'sudo dnf install {package}', check: 'rpm -q {package}' },
|
|
37
|
-
{ name: 'pacman', install: 'sudo pacman -S {package}', check: 'pacman -Q {package}' },
|
|
38
|
-
{ name: 'snap', install: 'sudo snap install {package}', check: 'snap list {package}' }
|
|
39
|
-
],
|
|
40
|
-
darwin: [
|
|
41
|
-
{ name: 'brew', install: 'brew install {package}', check: 'brew list {package}' },
|
|
42
|
-
{ name: 'port', install: 'sudo port install {package}', check: 'port installed {package}' },
|
|
43
|
-
{ name: 'npm', install: 'npm install -g {package}', check: 'npm list -g {package}' }
|
|
44
|
-
],
|
|
45
|
-
win32: [
|
|
46
|
-
{ name: 'chocolatey', install: 'choco install {package}', check: 'choco list --local-only {package}' },
|
|
47
|
-
{ name: 'winget', install: 'winget install {package}', check: 'winget list {package}' },
|
|
48
|
-
{ name: 'npm', install: 'npm install -g {package}', check: 'npm list -g {package}' },
|
|
49
|
-
{ name: 'scoop', install: 'scoop install {package}', check: 'scoop list {package}' }
|
|
50
|
-
]
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Create dependency mappings for package managers
|
|
56
|
-
* @returns {Object} Dependency mappings by tool and platform
|
|
57
|
-
* @private
|
|
58
|
-
*/
|
|
59
|
-
_createDependencyMappings() {
|
|
60
|
-
return {
|
|
61
|
-
git: {
|
|
62
|
-
linux: { apt: 'git', yum: 'git', dnf: 'git', pacman: 'git' },
|
|
63
|
-
darwin: { brew: 'git' },
|
|
64
|
-
win32: { chocolatey: 'git', winget: 'Git.Git' }
|
|
65
|
-
},
|
|
66
|
-
python: {
|
|
67
|
-
linux: { apt: 'python3', yum: 'python3', dnf: 'python3' },
|
|
68
|
-
darwin: { brew: 'python@3.11' },
|
|
69
|
-
win32: { chocolatey: 'python', winget: 'Python.Python.3' }
|
|
70
|
-
},
|
|
71
|
-
docker: {
|
|
72
|
-
linux: { apt: 'docker.io', snap: 'docker' },
|
|
73
|
-
darwin: { brew: 'docker' },
|
|
74
|
-
win32: { chocolatey: 'docker-desktop' }
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Get package managers for a specific platform
|
|
81
|
-
* @param {string} platform - Platform identifier (optional, defaults to current)
|
|
82
|
-
* @returns {Array<Object>} List of package managers for the platform
|
|
83
|
-
*/
|
|
84
|
-
getPackageManagersForPlatform(platform = this.platformUtils.getCurrentPlatform()) {
|
|
85
|
-
return this.config.packageManagers[platform] || [];
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Get package name for a specific dependency and package manager
|
|
90
|
-
* @param {string} dependencyName - Name of the dependency
|
|
91
|
-
* @param {string} packageManagerName - Name of the package manager
|
|
92
|
-
* @param {string} platform - Platform identifier (optional, defaults to current)
|
|
93
|
-
* @returns {string} Mapped package name or original dependency name
|
|
94
|
-
*/
|
|
95
|
-
getPackageName(dependencyName, packageManagerName, platform = this.platformUtils.getCurrentPlatform()) {
|
|
96
|
-
const dependencyMapping = this.config.dependencyMappings[dependencyName];
|
|
97
|
-
|
|
98
|
-
if (dependencyMapping && dependencyMapping[platform] && dependencyMapping[platform][packageManagerName]) {
|
|
99
|
-
return dependencyMapping[platform][packageManagerName];
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
return dependencyName;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* Generate install command for a package
|
|
107
|
-
* @param {string} dependencyName - Name of the dependency
|
|
108
|
-
* @param {string} packageManagerName - Name of the package manager
|
|
109
|
-
* @param {string} platform - Platform identifier (optional, defaults to current)
|
|
110
|
-
* @returns {string|null} Install command or null if package manager not found
|
|
111
|
-
*/
|
|
112
|
-
generateInstallCommand(dependencyName, packageManagerName, platform = this.platformUtils.getCurrentPlatform()) {
|
|
113
|
-
const packageManagers = this.getPackageManagersForPlatform(platform);
|
|
114
|
-
const packageManager = packageManagers.find(pm => pm.name === packageManagerName);
|
|
115
|
-
|
|
116
|
-
if (!packageManager) {
|
|
117
|
-
return null;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
const packageName = this.getPackageName(dependencyName, packageManagerName, platform);
|
|
121
|
-
return packageManager.install.replace('{package}', packageName);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Generate check command for a package
|
|
126
|
-
* @param {string} dependencyName - Name of the dependency
|
|
127
|
-
* @param {string} packageManagerName - Name of the package manager
|
|
128
|
-
* @param {string} platform - Platform identifier (optional, defaults to current)
|
|
129
|
-
* @returns {string|null} Check command or null if package manager not found
|
|
130
|
-
*/
|
|
131
|
-
generateCheckCommand(dependencyName, packageManagerName, platform = this.platformUtils.getCurrentPlatform()) {
|
|
132
|
-
const packageManagers = this.getPackageManagersForPlatform(platform);
|
|
133
|
-
const packageManager = packageManagers.find(pm => pm.name === packageManagerName);
|
|
134
|
-
|
|
135
|
-
if (!packageManager) {
|
|
136
|
-
return null;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
const packageName = this.getPackageName(dependencyName, packageManagerName, platform);
|
|
140
|
-
return packageManager.check.replace('{package}', packageName);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* Check if a package manager is available on the system
|
|
145
|
-
* @param {string} packageManagerName - Name of the package manager
|
|
146
|
-
* @returns {boolean} True if package manager is available
|
|
147
|
-
*/
|
|
148
|
-
isPackageManagerAvailable(packageManagerName) {
|
|
149
|
-
try {
|
|
150
|
-
const command = this.platformUtils.getPathCommand();
|
|
151
|
-
execSync(`${command} ${packageManagerName}`, {
|
|
152
|
-
encoding: 'utf8',
|
|
153
|
-
timeout: 3000,
|
|
154
|
-
stdio: 'pipe'
|
|
155
|
-
});
|
|
156
|
-
return true;
|
|
157
|
-
} catch (error) {
|
|
158
|
-
return false;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Get available package managers for the current platform
|
|
164
|
-
* @param {string} platform - Platform identifier (optional, defaults to current)
|
|
165
|
-
* @returns {Array<Object>} List of available package managers
|
|
166
|
-
*/
|
|
167
|
-
getAvailablePackageManagers(platform = this.platformUtils.getCurrentPlatform()) {
|
|
168
|
-
const allManagers = this.getPackageManagersForPlatform(platform);
|
|
169
|
-
return allManagers.filter(pm => this.isPackageManagerAvailable(pm.name));
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* Get the best available package manager for a platform
|
|
174
|
-
* @param {string} platform - Platform identifier (optional, defaults to current)
|
|
175
|
-
* @returns {Object|null} Best available package manager or null
|
|
176
|
-
*/
|
|
177
|
-
getBestAvailablePackageManager(platform = this.platformUtils.getCurrentPlatform()) {
|
|
178
|
-
const availableManagers = this.getAvailablePackageManagers(platform);
|
|
179
|
-
|
|
180
|
-
// Return the first available manager (they're ordered by preference)
|
|
181
|
-
return availableManagers.length > 0 ? availableManagers[0] : null;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* Generate package manager options for installation instructions
|
|
186
|
-
* @param {string} dependencyName - Name of the dependency
|
|
187
|
-
* @param {string} platform - Platform identifier (optional, defaults to current)
|
|
188
|
-
* @returns {Array<Object>} List of package manager options
|
|
189
|
-
*/
|
|
190
|
-
generatePackageManagerOptions(dependencyName, platform = this.platformUtils.getCurrentPlatform()) {
|
|
191
|
-
const packageManagers = this.getPackageManagersForPlatform(platform);
|
|
192
|
-
const options = [];
|
|
193
|
-
|
|
194
|
-
for (const pm of packageManagers) {
|
|
195
|
-
const packageName = this.getPackageName(dependencyName, pm.name, platform);
|
|
196
|
-
const installCommand = pm.install.replace('{package}', packageName);
|
|
197
|
-
const checkCommand = pm.check.replace('{package}', packageName);
|
|
198
|
-
|
|
199
|
-
options.push({
|
|
200
|
-
name: pm.name,
|
|
201
|
-
command: installCommand,
|
|
202
|
-
check: checkCommand,
|
|
203
|
-
packageName: packageName,
|
|
204
|
-
available: this.isPackageManagerAvailable(pm.name)
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
return options;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* Check if a specific package is installed
|
|
213
|
-
* @param {string} dependencyName - Name of the dependency
|
|
214
|
-
* @param {string} packageManagerName - Name of the package manager
|
|
215
|
-
* @param {string} platform - Platform identifier (optional, defaults to current)
|
|
216
|
-
* @returns {boolean} True if package is installed
|
|
217
|
-
*/
|
|
218
|
-
isPackageInstalled(dependencyName, packageManagerName, platform = this.platformUtils.getCurrentPlatform()) {
|
|
219
|
-
const checkCommand = this.generateCheckCommand(dependencyName, packageManagerName, platform);
|
|
220
|
-
|
|
221
|
-
if (!checkCommand) {
|
|
222
|
-
return false;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
try {
|
|
226
|
-
execSync(checkCommand, {
|
|
227
|
-
encoding: 'utf8',
|
|
228
|
-
timeout: 5000,
|
|
229
|
-
stdio: 'pipe'
|
|
230
|
-
});
|
|
231
|
-
return true;
|
|
232
|
-
} catch (error) {
|
|
233
|
-
return false;
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
/**
|
|
238
|
-
* Execute a package manager command safely
|
|
239
|
-
* @param {string} command - Command to execute
|
|
240
|
-
* @param {Object} options - Execution options
|
|
241
|
-
* @returns {Object} Execution result
|
|
242
|
-
*/
|
|
243
|
-
executePackageManagerCommand(command, options = {}) {
|
|
244
|
-
const defaultOptions = {
|
|
245
|
-
encoding: 'utf8',
|
|
246
|
-
timeout: 30000, // 30 seconds for package operations
|
|
247
|
-
stdio: 'pipe'
|
|
248
|
-
};
|
|
249
|
-
|
|
250
|
-
const execOptions = { ...defaultOptions, ...options };
|
|
251
|
-
|
|
252
|
-
try {
|
|
253
|
-
const output = execSync(command, execOptions);
|
|
254
|
-
return {
|
|
255
|
-
success: true,
|
|
256
|
-
output: output.toString(),
|
|
257
|
-
command: command
|
|
258
|
-
};
|
|
259
|
-
} catch (error) {
|
|
260
|
-
return {
|
|
261
|
-
success: false,
|
|
262
|
-
error: error.message,
|
|
263
|
-
command: command,
|
|
264
|
-
exitCode: error.status
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
module.exports = PackageManagerService;
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
# Debug Context Management System
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
This system enables the Debug Specialist sub-agent to maintain persistent debugging context across multiple interactions, building comprehensive understanding of complex issues.
|
|
5
|
-
|
|
6
|
-
## Context Structure
|
|
7
|
-
|
|
8
|
-
### Debug Session Context
|
|
9
|
-
```json
|
|
10
|
-
{
|
|
11
|
-
"session_id": "debug_session_[timestamp]",
|
|
12
|
-
"issue_summary": "Brief description of the main problem",
|
|
13
|
-
"status": "active|investigating|resolved|escalated",
|
|
14
|
-
"priority": "low|medium|high|critical",
|
|
15
|
-
"created_at": "ISO timestamp",
|
|
16
|
-
"updated_at": "ISO timestamp",
|
|
17
|
-
"context": {
|
|
18
|
-
"error_details": {
|
|
19
|
-
"primary_error": "Main error message",
|
|
20
|
-
"secondary_errors": ["Related error messages"],
|
|
21
|
-
"stack_traces": ["Full stack trace data"],
|
|
22
|
-
"error_frequency": "once|intermittent|frequent|constant",
|
|
23
|
-
"reproduction_steps": ["Step-by-step reproduction"]
|
|
24
|
-
},
|
|
25
|
-
"environment": {
|
|
26
|
-
"os": "Operating system details",
|
|
27
|
-
"language_version": "Programming language version",
|
|
28
|
-
"dependencies": ["Package versions and details"],
|
|
29
|
-
"configuration": ["Relevant config settings"],
|
|
30
|
-
"deployment_context": "local|staging|production"
|
|
31
|
-
},
|
|
32
|
-
"codebase_state": {
|
|
33
|
-
"recent_changes": ["Recent commits or modifications"],
|
|
34
|
-
"affected_files": ["Files related to the issue"],
|
|
35
|
-
"test_status": "passing|failing|mixed",
|
|
36
|
-
"last_working_state": "Known good configuration"
|
|
37
|
-
},
|
|
38
|
-
"investigation_history": [
|
|
39
|
-
{
|
|
40
|
-
"timestamp": "ISO timestamp",
|
|
41
|
-
"action": "hypothesis_formed|test_executed|solution_attempted",
|
|
42
|
-
"details": "What was done or discovered",
|
|
43
|
-
"result": "success|failure|partial|inconclusive",
|
|
44
|
-
"notes": "Additional observations"
|
|
45
|
-
}
|
|
46
|
-
],
|
|
47
|
-
"hypotheses": [
|
|
48
|
-
{
|
|
49
|
-
"theory": "Potential root cause explanation",
|
|
50
|
-
"confidence": "low|medium|high",
|
|
51
|
-
"status": "untested|testing|confirmed|rejected",
|
|
52
|
-
"evidence": ["Supporting or contradicting evidence"],
|
|
53
|
-
"test_plan": ["Steps to validate this hypothesis"]
|
|
54
|
-
}
|
|
55
|
-
],
|
|
56
|
-
"solutions_attempted": [
|
|
57
|
-
{
|
|
58
|
-
"approach": "Description of solution attempted",
|
|
59
|
-
"implementation": "Code changes or actions taken",
|
|
60
|
-
"result": "resolved|partial_fix|no_change|made_worse",
|
|
61
|
-
"rollback_info": "How to undo if needed",
|
|
62
|
-
"learned": "Key insights from this attempt"
|
|
63
|
-
}
|
|
64
|
-
]
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
## Context Operations
|
|
70
|
-
|
|
71
|
-
### Initialize Debug Session
|
|
72
|
-
```markdown
|
|
73
|
-
# Debug Session: [Issue Summary]
|
|
74
|
-
**Session ID**: debug_session_[timestamp]
|
|
75
|
-
**Status**: Active
|
|
76
|
-
**Priority**: [Based on impact assessment]
|
|
77
|
-
|
|
78
|
-
## Current Understanding
|
|
79
|
-
- **Primary Issue**: [Main problem description]
|
|
80
|
-
- **Environment**: [Key environment details]
|
|
81
|
-
- **Recent Changes**: [What changed recently]
|
|
82
|
-
|
|
83
|
-
## Investigation Plan
|
|
84
|
-
1. [Initial hypothesis or investigation step]
|
|
85
|
-
2. [Next planned action]
|
|
86
|
-
3. [Validation approach]
|
|
87
|
-
|
|
88
|
-
*This is a persistent debugging session. Context will be maintained across interactions.*
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
### Update Context During Investigation
|
|
92
|
-
```markdown
|
|
93
|
-
## Investigation Update - [Timestamp]
|
|
94
|
-
|
|
95
|
-
**Action Taken**: [What was investigated or attempted]
|
|
96
|
-
**Result**: [Outcome of the action]
|
|
97
|
-
**New Evidence**: [What was discovered]
|
|
98
|
-
|
|
99
|
-
### Updated Hypotheses
|
|
100
|
-
- **Theory A**: [Status and confidence level]
|
|
101
|
-
- **Theory B**: [New theory based on evidence]
|
|
102
|
-
|
|
103
|
-
### Next Steps
|
|
104
|
-
1. [Immediate next action]
|
|
105
|
-
2. [Follow-up investigation]
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
### Context Retrieval Prompts
|
|
109
|
-
When the debug sub-agent is invoked, it should check for existing context:
|
|
110
|
-
|
|
111
|
-
```markdown
|
|
112
|
-
**Context Check**: Is this related to an existing debug session?
|
|
113
|
-
- Check for similar error patterns
|
|
114
|
-
- Look for related file paths or components
|
|
115
|
-
- Match against recent debugging history
|
|
116
|
-
|
|
117
|
-
**If Related**: Load existing context and continue investigation
|
|
118
|
-
**If New**: Initialize new debug session with context tracking
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
## Context Persistence Strategies
|
|
122
|
-
|
|
123
|
-
### File-Based Context Storage
|
|
124
|
-
- Store context in `/debug-sessions/` directory
|
|
125
|
-
- Use session IDs for file naming
|
|
126
|
-
- JSON format for structured data
|
|
127
|
-
- Markdown summaries for human readability
|
|
128
|
-
|
|
129
|
-
### Cross-Session Learning
|
|
130
|
-
- Maintain database of resolved issues
|
|
131
|
-
- Pattern recognition for similar problems
|
|
132
|
-
- Solution effectiveness tracking
|
|
133
|
-
- Environmental correlation analysis
|
|
134
|
-
|
|
135
|
-
### Context Sharing
|
|
136
|
-
- Share context with other sub-agents when relevant
|
|
137
|
-
- Security Analyst: For security-related debugging
|
|
138
|
-
- Code Quality Reviewer: For quality-related issues
|
|
139
|
-
- Architecture Consultant: For systemic problems
|
|
140
|
-
|
|
141
|
-
## Usage Patterns
|
|
142
|
-
|
|
143
|
-
### New Debug Session
|
|
144
|
-
```
|
|
145
|
-
@debug-specialist I'm getting a "ModuleNotFoundError" in my Flask app
|
|
146
|
-
→ Creates new debug session
|
|
147
|
-
→ Initializes context tracking
|
|
148
|
-
→ Begins systematic investigation
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
### Continuing Existing Session
|
|
152
|
-
```
|
|
153
|
-
@debug-specialist Update on the Flask ModuleNotFoundError - tried your suggestion but still failing
|
|
154
|
-
→ Loads existing session context
|
|
155
|
-
→ Updates investigation history
|
|
156
|
-
→ Adjusts hypotheses based on new information
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
### Complex Multi-Day Debugging
|
|
160
|
-
```
|
|
161
|
-
Day 1: Initial investigation and hypothesis formation
|
|
162
|
-
Day 2: Environment analysis and dependency checking
|
|
163
|
-
Day 3: Solution implementation and validation
|
|
164
|
-
→ All context preserved across days
|
|
165
|
-
→ Investigation history maintained
|
|
166
|
-
→ Learning captured for future similar issues
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
## Integration with Slash Commands
|
|
170
|
-
|
|
171
|
-
### From /xdebug
|
|
172
|
-
When `/xdebug` delegates to debug-specialist:
|
|
173
|
-
- Include current error details in context initialization
|
|
174
|
-
- Transfer any preliminary analysis done
|
|
175
|
-
- Set appropriate priority based on error severity
|
|
176
|
-
|
|
177
|
-
### Context Handoff
|
|
178
|
-
```markdown
|
|
179
|
-
**Debugging Handoff from /xdebug**
|
|
180
|
-
- **Error**: [Error details]
|
|
181
|
-
- **Preliminary Analysis**: [Any initial findings]
|
|
182
|
-
- **User Request**: [What user specifically asked for]
|
|
183
|
-
- **Context Priority**: [Suggested session priority]
|
|
184
|
-
|
|
185
|
-
*Continuing with Debug Specialist sub-agent for persistent context and deep analysis...*
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
## Benefits of Persistent Context
|
|
189
|
-
|
|
190
|
-
1. **Avoid Repetition**: Don't re-investigate known facts
|
|
191
|
-
2. **Build Understanding**: Accumulate knowledge over time
|
|
192
|
-
3. **Pattern Recognition**: Identify recurring issues
|
|
193
|
-
4. **Solution Tracking**: Remember what works and what doesn't
|
|
194
|
-
5. **Learning**: Improve debugging effectiveness over time
|
|
195
|
-
6. **Collaboration**: Share context with team members and other agents
|
|
196
|
-
|
|
197
|
-
This context management system transforms debugging from isolated problem-solving into systematic investigation with memory and learning capabilities.
|