crackerjack 0.30.3__py3-none-any.whl → 0.31.4__py3-none-any.whl

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.

Potentially problematic release.


This version of crackerjack might be problematic. Click here for more details.

Files changed (155) hide show
  1. crackerjack/CLAUDE.md +1005 -0
  2. crackerjack/RULES.md +380 -0
  3. crackerjack/__init__.py +42 -13
  4. crackerjack/__main__.py +225 -299
  5. crackerjack/agents/__init__.py +41 -0
  6. crackerjack/agents/architect_agent.py +281 -0
  7. crackerjack/agents/base.py +169 -0
  8. crackerjack/agents/coordinator.py +512 -0
  9. crackerjack/agents/documentation_agent.py +498 -0
  10. crackerjack/agents/dry_agent.py +388 -0
  11. crackerjack/agents/formatting_agent.py +245 -0
  12. crackerjack/agents/import_optimization_agent.py +281 -0
  13. crackerjack/agents/performance_agent.py +669 -0
  14. crackerjack/agents/proactive_agent.py +104 -0
  15. crackerjack/agents/refactoring_agent.py +788 -0
  16. crackerjack/agents/security_agent.py +529 -0
  17. crackerjack/agents/test_creation_agent.py +652 -0
  18. crackerjack/agents/test_specialist_agent.py +486 -0
  19. crackerjack/agents/tracker.py +212 -0
  20. crackerjack/api.py +560 -0
  21. crackerjack/cli/__init__.py +24 -0
  22. crackerjack/cli/facade.py +104 -0
  23. crackerjack/cli/handlers.py +267 -0
  24. crackerjack/cli/interactive.py +471 -0
  25. crackerjack/cli/options.py +401 -0
  26. crackerjack/cli/utils.py +18 -0
  27. crackerjack/code_cleaner.py +618 -928
  28. crackerjack/config/__init__.py +19 -0
  29. crackerjack/config/hooks.py +218 -0
  30. crackerjack/core/__init__.py +0 -0
  31. crackerjack/core/async_workflow_orchestrator.py +406 -0
  32. crackerjack/core/autofix_coordinator.py +200 -0
  33. crackerjack/core/container.py +104 -0
  34. crackerjack/core/enhanced_container.py +542 -0
  35. crackerjack/core/performance.py +243 -0
  36. crackerjack/core/phase_coordinator.py +561 -0
  37. crackerjack/core/proactive_workflow.py +316 -0
  38. crackerjack/core/session_coordinator.py +289 -0
  39. crackerjack/core/workflow_orchestrator.py +640 -0
  40. crackerjack/dynamic_config.py +94 -103
  41. crackerjack/errors.py +263 -41
  42. crackerjack/executors/__init__.py +11 -0
  43. crackerjack/executors/async_hook_executor.py +431 -0
  44. crackerjack/executors/cached_hook_executor.py +242 -0
  45. crackerjack/executors/hook_executor.py +345 -0
  46. crackerjack/executors/individual_hook_executor.py +669 -0
  47. crackerjack/intelligence/__init__.py +44 -0
  48. crackerjack/intelligence/adaptive_learning.py +751 -0
  49. crackerjack/intelligence/agent_orchestrator.py +551 -0
  50. crackerjack/intelligence/agent_registry.py +414 -0
  51. crackerjack/intelligence/agent_selector.py +502 -0
  52. crackerjack/intelligence/integration.py +290 -0
  53. crackerjack/interactive.py +576 -315
  54. crackerjack/managers/__init__.py +11 -0
  55. crackerjack/managers/async_hook_manager.py +135 -0
  56. crackerjack/managers/hook_manager.py +137 -0
  57. crackerjack/managers/publish_manager.py +411 -0
  58. crackerjack/managers/test_command_builder.py +151 -0
  59. crackerjack/managers/test_executor.py +435 -0
  60. crackerjack/managers/test_manager.py +258 -0
  61. crackerjack/managers/test_manager_backup.py +1124 -0
  62. crackerjack/managers/test_progress.py +144 -0
  63. crackerjack/mcp/__init__.py +0 -0
  64. crackerjack/mcp/cache.py +336 -0
  65. crackerjack/mcp/client_runner.py +104 -0
  66. crackerjack/mcp/context.py +615 -0
  67. crackerjack/mcp/dashboard.py +636 -0
  68. crackerjack/mcp/enhanced_progress_monitor.py +479 -0
  69. crackerjack/mcp/file_monitor.py +336 -0
  70. crackerjack/mcp/progress_components.py +569 -0
  71. crackerjack/mcp/progress_monitor.py +949 -0
  72. crackerjack/mcp/rate_limiter.py +332 -0
  73. crackerjack/mcp/server.py +22 -0
  74. crackerjack/mcp/server_core.py +244 -0
  75. crackerjack/mcp/service_watchdog.py +501 -0
  76. crackerjack/mcp/state.py +395 -0
  77. crackerjack/mcp/task_manager.py +257 -0
  78. crackerjack/mcp/tools/__init__.py +17 -0
  79. crackerjack/mcp/tools/core_tools.py +249 -0
  80. crackerjack/mcp/tools/error_analyzer.py +308 -0
  81. crackerjack/mcp/tools/execution_tools.py +370 -0
  82. crackerjack/mcp/tools/execution_tools_backup.py +1097 -0
  83. crackerjack/mcp/tools/intelligence_tool_registry.py +80 -0
  84. crackerjack/mcp/tools/intelligence_tools.py +314 -0
  85. crackerjack/mcp/tools/monitoring_tools.py +502 -0
  86. crackerjack/mcp/tools/proactive_tools.py +384 -0
  87. crackerjack/mcp/tools/progress_tools.py +141 -0
  88. crackerjack/mcp/tools/utility_tools.py +341 -0
  89. crackerjack/mcp/tools/workflow_executor.py +360 -0
  90. crackerjack/mcp/websocket/__init__.py +14 -0
  91. crackerjack/mcp/websocket/app.py +39 -0
  92. crackerjack/mcp/websocket/endpoints.py +559 -0
  93. crackerjack/mcp/websocket/jobs.py +253 -0
  94. crackerjack/mcp/websocket/server.py +116 -0
  95. crackerjack/mcp/websocket/websocket_handler.py +78 -0
  96. crackerjack/mcp/websocket_server.py +10 -0
  97. crackerjack/models/__init__.py +31 -0
  98. crackerjack/models/config.py +93 -0
  99. crackerjack/models/config_adapter.py +230 -0
  100. crackerjack/models/protocols.py +118 -0
  101. crackerjack/models/task.py +154 -0
  102. crackerjack/monitoring/ai_agent_watchdog.py +450 -0
  103. crackerjack/monitoring/regression_prevention.py +638 -0
  104. crackerjack/orchestration/__init__.py +0 -0
  105. crackerjack/orchestration/advanced_orchestrator.py +970 -0
  106. crackerjack/orchestration/execution_strategies.py +341 -0
  107. crackerjack/orchestration/test_progress_streamer.py +636 -0
  108. crackerjack/plugins/__init__.py +15 -0
  109. crackerjack/plugins/base.py +200 -0
  110. crackerjack/plugins/hooks.py +246 -0
  111. crackerjack/plugins/loader.py +335 -0
  112. crackerjack/plugins/managers.py +259 -0
  113. crackerjack/py313.py +8 -3
  114. crackerjack/services/__init__.py +22 -0
  115. crackerjack/services/cache.py +314 -0
  116. crackerjack/services/config.py +347 -0
  117. crackerjack/services/config_integrity.py +99 -0
  118. crackerjack/services/contextual_ai_assistant.py +516 -0
  119. crackerjack/services/coverage_ratchet.py +347 -0
  120. crackerjack/services/debug.py +736 -0
  121. crackerjack/services/dependency_monitor.py +617 -0
  122. crackerjack/services/enhanced_filesystem.py +439 -0
  123. crackerjack/services/file_hasher.py +151 -0
  124. crackerjack/services/filesystem.py +395 -0
  125. crackerjack/services/git.py +165 -0
  126. crackerjack/services/health_metrics.py +611 -0
  127. crackerjack/services/initialization.py +847 -0
  128. crackerjack/services/log_manager.py +286 -0
  129. crackerjack/services/logging.py +174 -0
  130. crackerjack/services/metrics.py +578 -0
  131. crackerjack/services/pattern_cache.py +362 -0
  132. crackerjack/services/pattern_detector.py +515 -0
  133. crackerjack/services/performance_benchmarks.py +653 -0
  134. crackerjack/services/security.py +163 -0
  135. crackerjack/services/server_manager.py +234 -0
  136. crackerjack/services/smart_scheduling.py +144 -0
  137. crackerjack/services/tool_version_service.py +61 -0
  138. crackerjack/services/unified_config.py +437 -0
  139. crackerjack/services/version_checker.py +248 -0
  140. crackerjack/slash_commands/__init__.py +14 -0
  141. crackerjack/slash_commands/init.md +122 -0
  142. crackerjack/slash_commands/run.md +163 -0
  143. crackerjack/slash_commands/status.md +127 -0
  144. crackerjack-0.31.4.dist-info/METADATA +742 -0
  145. crackerjack-0.31.4.dist-info/RECORD +148 -0
  146. crackerjack-0.31.4.dist-info/entry_points.txt +2 -0
  147. crackerjack/.gitignore +0 -34
  148. crackerjack/.libcst.codemod.yaml +0 -18
  149. crackerjack/.pdm.toml +0 -1
  150. crackerjack/crackerjack.py +0 -3805
  151. crackerjack/pyproject.toml +0 -286
  152. crackerjack-0.30.3.dist-info/METADATA +0 -1290
  153. crackerjack-0.30.3.dist-info/RECORD +0 -16
  154. {crackerjack-0.30.3.dist-info → crackerjack-0.31.4.dist-info}/WHEEL +0 -0
  155. {crackerjack-0.30.3.dist-info → crackerjack-0.31.4.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,122 @@
1
+ ______________________________________________________________________
2
+
3
+ ## description: Initialize or update crackerjack configuration for a Python project with best practices, quality hooks, and AI guidelines.
4
+
5
+ # /crackerjack:init
6
+
7
+ Initialize or update crackerjack configuration for a Python project.
8
+
9
+ ## Usage
10
+
11
+ ```
12
+ /crackerjack:init
13
+ /crackerjack:init --force
14
+ ```
15
+
16
+ ## Description
17
+
18
+ This slash command initializes a new Python project with crackerjack's best practices or updates an existing project's configuration to the latest standards.
19
+
20
+ ## What It Does
21
+
22
+ 1. **Checks Project State**: Verifies which configuration files exist
23
+ 1. **Smart Merge Configuration**:
24
+ - `pyproject.toml` - Intelligently merges tool configurations, preserves higher coverage requirements
25
+ - `.pre-commit-config.yaml` - Adds missing repos, preserves existing hooks
26
+ - `CLAUDE.md` - Appends crackerjack guidelines without overwriting existing content
27
+ - `RULES.md` - Copies only if missing, preserves existing coding standards
28
+ 1. **Preserves Project Identity**: Never overwrites existing project metadata, dependencies, or configurations
29
+ 1. **Installs Pre-commit Hooks**: Sets up git hooks for quality enforcement
30
+
31
+ ## When to Use /crackerjack:init
32
+
33
+ ### Automatic Detection
34
+
35
+ The MCP server can detect when initialization is needed:
36
+
37
+ - **Missing Core Files**: No pyproject.toml or .pre-commit-config.yaml
38
+ - **New Project**: Git repository just initialized
39
+ - **Outdated Hooks**: Pre-commit hooks older than 30 days
40
+ - **Manual Request**: User explicitly asks for initialization
41
+
42
+ ### Recommended Frequency
43
+
44
+ - **New Projects**: Always run on project creation
45
+ - **Weekly**: For active development projects
46
+ - **After Tool Updates**: When crackerjack or dependencies update
47
+ - **Team Onboarding**: When new developers join
48
+
49
+ ## Options
50
+
51
+ - `--force`: Force reinitialization even if configuration exists
52
+
53
+ ## Example
54
+
55
+ ```
56
+ User: Set up this Python project with best practices
57
+ AI: I'll initialize crackerjack configuration for your project.
58
+
59
+ /crackerjack:init
60
+
61
+ [AI executes initialization and reports results]
62
+
63
+ The project has been initialized with:
64
+ ✅ pyproject.toml - Project configuration
65
+ ✅ .pre-commit-config.yaml - Quality hooks
66
+ ✅ CLAUDE.md - AI guidelines
67
+ ✅ RULES.md - Coding standards
68
+
69
+ Your project now follows Python best practices!
70
+ ```
71
+
72
+ ## Auto-Init Behavior
73
+
74
+ When connected via MCP, crackerjack can automatically suggest initialization when:
75
+
76
+ 1. Running `/crackerjack:run` in an uninitialized project
77
+ 1. Detecting missing critical configuration files
78
+ 1. Finding outdated pre-commit hooks (>30 days old)
79
+
80
+ This ensures projects always have up-to-date quality standards without manual intervention.
81
+
82
+ ## Smart Merge Behavior
83
+
84
+ **Crackerjack uses intelligent smart merging instead of destructive overwrites:**
85
+
86
+ ### pyproject.toml Smart Merge
87
+
88
+ - **Preserves Project Identity**: Project name, version, description, dependencies remain untouched
89
+ - **Ensures Crackerjack Dependency**: Adds `crackerjack` to `[dependency-groups].dev` if missing
90
+ - **Merges Tool Configurations**: Adds missing tool sections (`[tool.ruff]`, `[tool.pyright]`, etc.)
91
+ - **Preserves Higher Coverage**: If target has higher `--cov-fail-under` than source, keeps the higher value
92
+ - **Adds Missing Pytest Markers**: Appends new test markers while preserving existing ones
93
+
94
+ ### CLAUDE.md Smart Append
95
+
96
+ - **Non-Destructive**: Appends crackerjack guidelines with clear markers
97
+ - **Prevents Duplicates**: Skips if crackerjack section already exists
98
+ - **Clear Boundaries**: Uses `<!-- CRACKERJACK_START -->` and `<!-- CRACKERJACK_END -->` markers
99
+
100
+ ### .pre-commit-config.yaml Smart Merge
101
+
102
+ - **Adds Missing Repos**: Only adds pre-commit repos that don't already exist
103
+ - **Preserves Existing Hooks**: Never modifies existing hook configurations
104
+ - **Skips if No New Repos**: Intelligent detection prevents unnecessary changes
105
+
106
+ ### Universal Compatibility
107
+
108
+ This smart merge approach works with **any Python package**, not just specific projects:
109
+
110
+ - ✅ **MCP Servers** (session-mgmt-mcp, excalidraw-mcp)
111
+ - ✅ **Django Projects** with existing configurations
112
+ - ✅ **Flask Applications** with established tooling
113
+ - ✅ **Data Science Projects** with Jupyter-specific settings
114
+ - ✅ **CLI Tools** with complex pyproject.toml configurations
115
+
116
+ ### Example Smart Merge Results
117
+
118
+ **Before**: Project with 85% coverage requirement
119
+ **After**: Keeps 85% coverage, adds all crackerjack tools, preserves project identity
120
+
121
+ **Before**: CLAUDE.md with project-specific guidelines
122
+ **After**: Original content + crackerjack section appended with clear markers
@@ -0,0 +1,163 @@
1
+ ______________________________________________________________________
2
+
3
+ ## description: Run Crackerjack with advanced orchestrated AI-powered auto-fix mode to automatically resolve all code quality issues with intelligent execution strategies and granular progress tracking.
4
+
5
+ # /crackerjack:run
6
+
7
+ Run Crackerjack with advanced orchestrated AI-powered auto-fix mode to automatically resolve all code quality issues with intelligent execution strategies and granular progress tracking.
8
+
9
+ ## Usage
10
+
11
+ ```
12
+ /crackerjack:run [--debug]
13
+ ```
14
+
15
+ ### Arguments
16
+
17
+ - `--debug`: Run in foreground with debug output visible (for troubleshooting)
18
+ - Shows all crackerjack command output directly to console
19
+ - Runs synchronously instead of in background
20
+ - Useful for debugging issues with hooks, tests, or AI fixes
21
+ - No need for progress monitoring - output is immediate
22
+
23
+ ## Description
24
+
25
+ This slash command runs Crackerjack with AI agent mode for autonomous code quality enforcement:
26
+
27
+ - `--ai-agent`: AI agent mode for structured error output and intelligent fixing
28
+ - `--test`: Run tests with comprehensive test coverage
29
+ - `--verbose`: Show detailed AI decision-making and execution details
30
+
31
+ ## 💡 Agent Recommendation
32
+
33
+ **For optimal results, use the `crackerjack-architect` agent alongside `/crackerjack:run`:**
34
+
35
+ ```bash
36
+ # 1. Plan with crackerjack-architect first
37
+ Task tool with subagent_type="crackerjack-architect" for feature planning
38
+
39
+ # 2. Run crackerjack for quality enforcement
40
+ /crackerjack:run
41
+
42
+ # 3. Use crackerjack-architect for any remaining issues
43
+ ```
44
+
45
+ **Why?** The crackerjack-architect agent ensures code follows crackerjack patterns from the start, reducing the number of iterations needed for `/crackerjack:run` to achieve full compliance.
46
+
47
+ ## What It Does
48
+
49
+ **Iterative AI-Powered Auto-Fixing Process (up to 10 iterations):**
50
+
51
+ ### Pre-Execution Safety Checks:
52
+
53
+ 0. 🔍 **Comprehensive Status Check** (automatic conflict prevention)
54
+
55
+ - Check for active crackerjack jobs in the same project to prevent file conflicts
56
+ - Verify MCP and WebSocket server health status
57
+ - Identify beneficial cleanup opportunities (stale temp files, old debug logs)
58
+ - Auto-start missing services if needed
59
+ - Report resource usage and system health
60
+
61
+ ### Each Iteration Cycle:
62
+
63
+ 1. ⚡ **Fast Hooks** (formatting & basic fixes)
64
+
65
+ - Run `trailing-whitespace`, `end-of-file-fixer`, `ruff-format`, `ruff-check`, `gitleaks`
66
+ - If any fail → **Retry fast hooks once** (formatting fixes often resolve downstream issues)
67
+ - Only proceed when fast hooks pass or have been retried
68
+
69
+ 1. 🧪 **Full Test Suite**
70
+
71
+ - Run ALL tests, collect ALL test failures (don't stop on first failure)
72
+ - Gather complete list of failing tests with error details
73
+
74
+ 1. 🔍 **Comprehensive Hooks** (type checking, security, complexity)
75
+
76
+ - Run `pyright`, `bandit`, `vulture`, `refurb`, `creosote`, `complexipy`
77
+ - Collect ALL hook failures (don't stop on first failure)
78
+ - Gather complete list of quality issues
79
+
80
+ 1. 🤖 **AI Analysis & Batch Fixing**
81
+
82
+ - Analyze ALL collected failures (tests + comprehensive hooks)
83
+ - Apply intelligent fixes for ALL issues in one coordinated pass:
84
+ - **Type Errors**: Adds missing annotations, fixes type mismatches
85
+ - **Security Issues**: Removes hardcoded paths, fixes vulnerabilities
86
+ - **Dead Code**: Removes unused imports, variables, functions
87
+ - **Test Failures**: Fixes missing fixtures, import errors, assertions
88
+ - **Code Quality**: Applies refactoring, reduces complexity
89
+ - **Hook Failures**: All formatting, linting, style issues
90
+
91
+ 1. 🔄 **Next Full Iteration**: Repeat entire cycle until ALL checks pass or max iterations (10) reached
92
+
93
+ ### Final Result:
94
+
95
+ 🎉 **Perfect Code Quality**: All hooks pass, all tests pass, zero manual intervention!
96
+
97
+ ## Example
98
+
99
+ When an AI assistant uses this command:
100
+
101
+ ```
102
+ User: Can you fix all the code quality issues in this project?
103
+ AI: I'll use the /crackerjack:run command to automatically fix all code quality issues.
104
+
105
+ /crackerjack:run
106
+
107
+ [AI runs: python -m crackerjack --ai-agent --test --verbose]
108
+
109
+ The crackerjack AI agent completed successfully after 3 iterations! Here's what was automatically fixed:
110
+
111
+ **Iteration 1**: Fixed formatting and imports
112
+ - Reformatted 5 files with proper indentation
113
+ - Organized imports in 3 modules
114
+ - Removed trailing whitespace
115
+
116
+ **Iteration 2**: Resolved type and security issues
117
+ - Added type hints to 7 functions
118
+ - Fixed 2 hardcoded temp path security warnings
119
+ - Removed 1 unused variable
120
+
121
+ **Iteration 3**: Final test fixes
122
+ - Fixed missing test fixture import
123
+ - Updated assertion in test_workflow.py
124
+ - All 42 tests now pass with 45% coverage
125
+
126
+ 🎉 **Result**: Perfect code quality achieved with zero manual intervention!
127
+ ```
128
+
129
+ ## Benefits
130
+
131
+ - **Zero Configuration**: AI doesn't need to remember complex flag combinations
132
+ - **Optimal Settings**: Always uses the most effective options
133
+ - **Complete Automation**: Handles the entire quality workflow automatically
134
+ - **Consistent Results**: Same high-quality outcome every time
135
+
136
+ ## Implementation
137
+
138
+ **CRITICAL**: When an AI assistant encounters `/crackerjack:run`, it MUST ONLY use the MCP server tools. Never fall back to bash/shell execution of `python -m crackerjack`.
139
+
140
+ When an AI assistant encounters `/crackerjack:run`, it calls the MCP server tool directly:
141
+
142
+ **Note**: The WebSocket server on localhost:8675 is automatically started when the command runs, so no manual setup is required.
143
+
144
+ ```python
145
+ # Call MCP server tool for orchestrated iterative auto-fixing (returns job_id immediately)
146
+ job_result = execute_crackerjack("/crackerjack:run")
147
+ job_id = job_result["job_id"]
148
+
149
+ # For debugging, use the --debug flag:
150
+ job_result = execute_crackerjack("/crackerjack:run --debug")
151
+ # This runs in foreground and shows all output directly
152
+ ```
153
+
154
+ This runs the AI agent auto-fixing process:
155
+
156
+ - **Background Execution**: Workflow runs in background, returns job_id immediately
157
+ - **Progress Tracking**: Real-time progress updates via MCP tools
158
+ - **Autonomous Fixing**: Makes actual code changes to resolve all issues
159
+ - **Comprehensive Coverage**: Handles ALL error types (not just formatting)
160
+ - **Iterative Process**: Continues fixing until perfect quality achieved (up to 10 iterations)
161
+ - **Zero Manual Work**: No human intervention required
162
+
163
+ **Note**: This is NOT the same as basic hook auto-fix modes (like `ruff --fix`) which only handle simple formatting. The AI agent performs sophisticated code analysis and coordinated modification.
@@ -0,0 +1,127 @@
1
+ ______________________________________________________________________
2
+
3
+ ## description: Check comprehensive Crackerjack system status including running jobs, MCP server health, WebSocket connections, and progress monitoring with real-time updates.
4
+
5
+ # /crackerjack:status - Comprehensive System Status
6
+
7
+ Check the comprehensive status of the Crackerjack system including running jobs, MCP server health, WebSocket server status, and progress monitoring. This command provides real-time status from all system components.
8
+
9
+ ## Usage
10
+
11
+ ```
12
+ /crackerjack:status
13
+ ```
14
+
15
+ ## What This Command Does
16
+
17
+ 1. **MCP Server Status** - Shows running processes, health, and resource usage
18
+ 1. **WebSocket Server Status** - Displays connection status, port, and active monitoring
19
+ 1. **Job Management** - Lists all active, completed, and failed jobs with detailed progress
20
+ 1. **Progress Tracking** - Shows iteration counts, stage completion, and error resolution metrics
21
+ 1. **System Health** - Comprehensive monitoring of all Crackerjack services and components
22
+ 1. **Resource Usage** - Memory, CPU, and temporary file statistics
23
+
24
+ ## Example Output
25
+
26
+ The command will show information like:
27
+
28
+ ```json
29
+ {
30
+ "services": {
31
+ "mcp_server": {
32
+ "running": true,
33
+ "processes": [
34
+ {
35
+ "pid": 12345,
36
+ "cpu": "0.5%",
37
+ "mem": "0.8%",
38
+ "command": "python -m crackerjack --start-mcp-server"
39
+ }
40
+ ]
41
+ },
42
+ "websocket_server": {
43
+ "running": true,
44
+ "port": 8675,
45
+ "processes": [
46
+ {
47
+ "pid": 12346,
48
+ "cpu": "0.2%",
49
+ "mem": "0.6%"
50
+ }
51
+ ]
52
+ }
53
+ },
54
+ "jobs": {
55
+ "active_count": 2,
56
+ "completed_count": 1,
57
+ "failed_count": 0,
58
+ "details": [
59
+ {
60
+ "job_id": "abc123-def456-ghi789",
61
+ "status": "running",
62
+ "iteration": 3,
63
+ "max_iterations": 10,
64
+ "current_stage": "comprehensive_hooks",
65
+ "overall_progress": 30,
66
+ "stage_progress": 75,
67
+ "message": "Running pyright type checking...",
68
+ "error_counts": {
69
+ "hook_errors": 0,
70
+ "test_failures": 2,
71
+ "total": 13
72
+ }
73
+ }
74
+ ]
75
+ },
76
+ "server_stats": {
77
+ "resource_usage": {
78
+ "temp_files_count": 5,
79
+ "progress_dir": "/tmp/crackerjack-mcp-progress"
80
+ },
81
+ "rate_limiting": {
82
+ "requests_per_minute": 60,
83
+ "current_requests": 2,
84
+ "can_execute": true
85
+ }
86
+ }
87
+ }
88
+ ```
89
+
90
+ ## When to Use
91
+
92
+ - **Before starting work** - Check if any jobs are already running
93
+ - **During development** - Monitor progress of long-running jobs
94
+ - **Troubleshooting** - Verify services are running correctly
95
+ - **Planning** - See completion status before starting new work
96
+
97
+ ## Technical Implementation
98
+
99
+ This command uses the `get_comprehensive_status` MCP tool which:
100
+
101
+ - **Process Discovery**: Uses `ps aux` to find running Crackerjack processes
102
+ - **Progress File Analysis**: Reads job progress from `/tmp/crackerjack-mcp-progress/job-*.json` files
103
+ - **WebSocket Health**: Checks port availability and connection status
104
+ - **Resource Monitoring**: Tracks temporary files, memory usage, and rate limiting
105
+ - **State Management**: Integrates with MCP server state for session tracking
106
+
107
+ ## Integration
108
+
109
+ This command integrates with:
110
+
111
+ - **WebSocket Progress Server** (localhost:8675)
112
+ - **MCP Server** progress and state files
113
+ - **Service Watchdog** monitoring
114
+ - **TUI Monitor** data sources
115
+ - **Server Manager** process discovery
116
+
117
+ The status information comes from the same sources that power the TUI monitor and web interface, ensuring consistent data across all interfaces.
118
+
119
+ ## Usage in Claude Code
120
+
121
+ When using this command in Claude Code, the AI agent will:
122
+
123
+ 1. Call the `get_comprehensive_status` MCP tool
124
+ 1. Parse the JSON response for relevant information
125
+ 1. Present a formatted summary of system health
126
+ 1. Highlight any issues requiring attention
127
+ 1. Suggest next actions based on current status