@atlashub/smartstack-cli 1.23.0 → 1.25.0

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.
Files changed (46) hide show
  1. package/.documentation/agents.html +3 -3
  2. package/.documentation/apex.html +18 -18
  3. package/.documentation/business-analyse.html +38 -38
  4. package/.documentation/cli-commands.html +1 -1
  5. package/.documentation/commands.html +29 -29
  6. package/.documentation/efcore.html +246 -91
  7. package/.documentation/gitflow.html +1 -1
  8. package/.documentation/hooks.html +1 -1
  9. package/.documentation/index.html +8 -8
  10. package/.documentation/init.html +1 -1
  11. package/.documentation/installation.html +9 -9
  12. package/.documentation/ralph-loop.html +2 -2
  13. package/.documentation/test-web.html +2 -2
  14. package/dist/index.js +13 -0
  15. package/dist/index.js.map +1 -1
  16. package/package.json +1 -1
  17. package/templates/skills/check-version/SKILL.md +183 -0
  18. package/templates/skills/debug/SKILL.md +161 -0
  19. package/templates/skills/explore/SKILL.md +96 -0
  20. package/templates/skills/quick-search/SKILL.md +87 -0
  21. package/templates/skills/refactor/SKILL.md +219 -0
  22. package/templates/skills/review-code/SKILL.md +72 -44
  23. package/templates/skills/review-code/references/smartstack-conventions.md +93 -33
  24. package/templates/skills/ui-components/responsive-guidelines.md +278 -0
  25. package/templates/skills/utils/SKILL.md +37 -0
  26. package/templates/{commands/utils → skills/utils/subcommands}/test-web-config.md +35 -43
  27. package/templates/{commands/utils → skills/utils/subcommands}/test-web.md +25 -53
  28. package/templates/{commands/validate.md → skills/validate/SKILL.md} +80 -139
  29. package/templates/commands/check-version.md +0 -267
  30. package/templates/commands/debug.md +0 -95
  31. package/templates/commands/efcore/_env-check.md +0 -153
  32. package/templates/commands/efcore/_shared.md +0 -352
  33. package/templates/commands/efcore/conflicts.md +0 -90
  34. package/templates/commands/efcore/db-deploy.md +0 -109
  35. package/templates/commands/efcore/db-reset.md +0 -180
  36. package/templates/commands/efcore/db-seed.md +0 -103
  37. package/templates/commands/efcore/db-status.md +0 -102
  38. package/templates/commands/efcore/migration.md +0 -186
  39. package/templates/commands/efcore/rebase-snapshot.md +0 -172
  40. package/templates/commands/efcore/scan.md +0 -94
  41. package/templates/commands/efcore/squash.md +0 -329
  42. package/templates/commands/efcore.md +0 -96
  43. package/templates/commands/explore.md +0 -45
  44. package/templates/commands/quick-search.md +0 -72
  45. package/templates/commands/refactor.md +0 -164
  46. /package/templates/{commands → skills}/_resources/formatting-guide.md +0 -0
@@ -1,36 +1,42 @@
1
1
  ---
2
+ name: validate
2
3
  description: Validate SmartStack conventions using MCP
3
- agent: action
4
+ argument-hint: "[scope]"
4
5
  model: sonnet
5
6
  ---
6
7
 
7
- # /validate - SmartStack Conventions Validator
8
-
9
- Validates the SmartStack project against established conventions using **SmartStack MCP**.
10
-
11
- **USAGE:** Before commits, PRs, or as part of CI/CD to ensure code quality.
12
-
13
- **INTEGRATION:** Uses `mcp__smartstack__validate_conventions` for comprehensive analysis.
14
-
15
- ---
8
+ <objective>
9
+ Validate the SmartStack project against established conventions using the SmartStack MCP server.
10
+ Use before commits, PRs, or as part of CI/CD to ensure code quality.
11
+ </objective>
12
+
13
+ <quick_start>
14
+ ```bash
15
+ /validate # Run all validations
16
+ /validate:tables # Validate table naming only
17
+ /validate:migrations # Validate migration naming only
18
+ /validate:services # Validate service patterns only
19
+ /validate:namespaces # Validate namespace structure only
20
+ ```
21
+ </quick_start>
16
22
 
17
- ## Available Commands
23
+ <subcommands>
18
24
 
19
- | Command | Description | Checks |
20
- |---------|-------------|--------|
21
- | `/validate` | Run all validations | All |
22
- | `/validate:tables` | Validate table naming | SQL schemas, prefixes |
23
- | `/validate:migrations` | Validate migration naming | Format, order |
24
- | `/validate:services` | Validate service pattern | I*Service interfaces |
25
- | `/validate:namespaces` | Validate namespace structure | Layer separation |
25
+ | Command | Checks | Description |
26
+ |---------|--------|-------------|
27
+ | `/validate` | all | Run all convention checks |
28
+ | `/validate:tables` | tables | SQL schemas, domain prefixes |
29
+ | `/validate:migrations` | migrations | Naming format, ordering |
30
+ | `/validate:services` | services | I*Service interfaces |
31
+ | `/validate:namespaces` | namespaces | Layer separation |
26
32
 
27
- ---
33
+ </subcommands>
28
34
 
29
- ## STEP 1: Invoke MCP validate_conventions
35
+ <mcp_integration>
30
36
 
31
- > **MCP INTEGRATION:** This command uses the SmartStack MCP server for validation.
37
+ **Tool:** `mcp__smartstack__validate_conventions`
32
38
 
33
- **Claude instruction:** Call the MCP tool:
39
+ Call the MCP tool with appropriate checks:
34
40
 
35
41
  ```json
36
42
  {
@@ -42,46 +48,55 @@ Validates the SmartStack project against established conventions using **SmartSt
42
48
  ```
43
49
 
44
50
  For specific checks:
45
-
46
51
  ```json
47
52
  {
48
- "tool": "mcp__smartstack__validate_conventions",
49
- "parameters": {
50
- "checks": ["tables", "migrations"]
51
- }
53
+ "checks": ["tables", "migrations"]
52
54
  }
53
55
  ```
54
56
 
55
- ---
57
+ </mcp_integration>
56
58
 
57
- ## STEP 2: Parse MCP Response
59
+ <validation_rules>
58
60
 
59
- The MCP returns a `ValidationResult`:
61
+ ### Tables (`checks: ["tables"]`)
60
62
 
61
- ```typescript
62
- interface ValidationResult {
63
- valid: boolean;
64
- errors: ValidationIssue[];
65
- warnings: ValidationIssue[];
66
- summary: string;
67
- }
63
+ | Rule | Valid | Invalid |
64
+ |------|-------|---------|
65
+ | Schema | `core`, `extensions` | `dbo`, custom |
66
+ | Prefix | `auth_Users`, `nav_Items` | `Users`, `Items` |
68
67
 
69
- interface ValidationIssue {
70
- type: 'error' | 'warning';
71
- category: 'tables' | 'migrations' | 'services' | 'namespaces';
72
- message: string;
73
- file?: string;
74
- line?: number;
75
- suggestion?: string;
76
- }
77
- ```
68
+ **Valid prefixes:** `auth_`, `nav_`, `usr_`, `ai_`, `cfg_`, `wkf_`, `support_`, `entra_`, `ref_`, `loc_`, `lic_`
78
69
 
79
- ---
70
+ ### Migrations (`checks: ["migrations"]`)
80
71
 
81
- ## STEP 3: Display Results
72
+ | Rule | Valid | Invalid |
73
+ |------|-------|---------|
74
+ | Format | `core_v1.0.0_001_AddUsers` | `AddUsersTable` |
75
+ | Order | v1.0.0 before v1.1.0 | v1.1.0 before v1.0.0 |
82
76
 
83
- **If `valid: true` with no warnings:**
77
+ **Format:** `{context}_v{version}_{sequence}_{Description}`
78
+
79
+ ### Services (`checks: ["services"]`)
80
+
81
+ | Rule | Valid | Invalid |
82
+ |------|-------|---------|
83
+ | Interface | `IUserService` | `UserServiceInterface` |
84
+ | Implementation | `UserService : IUserService` | `UserService` (no interface) |
85
+
86
+ ### Namespaces (`checks: ["namespaces"]`)
84
87
 
88
+ | Layer | Expected Namespace |
89
+ |-------|-------------------|
90
+ | Domain | `SmartStack.Domain.*` |
91
+ | Application | `SmartStack.Application.*` |
92
+ | Infrastructure | `SmartStack.Infrastructure.*` |
93
+ | Api | `SmartStack.Api.*` |
94
+
95
+ </validation_rules>
96
+
97
+ <output_format>
98
+
99
+ **If `valid: true` with no warnings:**
85
100
  ```
86
101
  ================================================================================
87
102
  SMARTSTACK CONVENTIONS VALIDATION
@@ -94,12 +109,10 @@ Errors: 0
94
109
  Warnings: 0
95
110
 
96
111
  All conventions validated successfully!
97
-
98
112
  ================================================================================
99
113
  ```
100
114
 
101
115
  **If `valid: false` or has warnings:**
102
-
103
116
  ```
104
117
  ================================================================================
105
118
  SMARTSTACK CONVENTIONS VALIDATION
@@ -107,68 +120,25 @@ All conventions validated successfully!
107
120
 
108
121
  STATUS: {valid ? "PASSED (with warnings)" : "FAILED"}
109
122
 
110
- ERRORS ({errors.length})
123
+ ERRORS ({count})
111
124
  --------------------------------------------------------------------------------
112
- {for each error in errors}
113
- [{error.category}] {error.message}
114
- File: {error.file}
115
- Suggestion: {error.suggestion}
116
- {end for}
125
+ [{category}] {message}
126
+ File: {file}
127
+ Suggestion: {suggestion}
117
128
  --------------------------------------------------------------------------------
118
129
 
119
- WARNINGS ({warnings.length})
130
+ WARNINGS ({count})
120
131
  --------------------------------------------------------------------------------
121
- {for each warning in warnings}
122
- [{warning.category}] {warning.message}
123
- File: {warning.file}
124
- Suggestion: {warning.suggestion}
125
- {end for}
132
+ [{category}] {message}
133
+ File: {file}
134
+ Suggestion: {suggestion}
126
135
  --------------------------------------------------------------------------------
127
-
128
136
  ================================================================================
129
137
  ```
130
138
 
131
- ---
132
-
133
- ## Validation Rules
134
-
135
- ### Tables (`checks: ["tables"]`)
136
-
137
- | Rule | Valid | Invalid |
138
- |------|-------|---------|
139
- | Schema | `core`, `extensions` | `dbo`, custom |
140
- | Prefix | `auth_Users`, `nav_Items` | `Users`, `Items` |
141
-
142
- **Valid prefixes:** `auth_`, `nav_`, `usr_`, `ai_`, `cfg_`, `wkf_`, `support_`, `entra_`, `ref_`, `loc_`, `lic_`
143
-
144
- ### Migrations (`checks: ["migrations"]`)
145
-
146
- | Rule | Valid | Invalid |
147
- |------|-------|---------|
148
- | Format | `core_v1.0.0_001_AddUsers` | `AddUsersTable` |
149
- | Order | v1.0.0 before v1.1.0 | v1.1.0 before v1.0.0 |
150
-
151
- **Format:** `{context}_v{version}_{sequence}_{Description}`
152
-
153
- ### Services (`checks: ["services"]`)
154
-
155
- | Rule | Valid | Invalid |
156
- |------|-------|---------|
157
- | Interface | `IUserService` | `UserServiceInterface` |
158
- | Implementation | `UserService : IUserService` | `UserService` (no interface) |
139
+ </output_format>
159
140
 
160
- ### Namespaces (`checks: ["namespaces"]`)
161
-
162
- | Layer | Expected Namespace |
163
- |-------|-------------------|
164
- | Domain | `SmartStack.Domain.*` |
165
- | Application | `SmartStack.Application.*` |
166
- | Infrastructure | `SmartStack.Infrastructure.*` |
167
- | Api | `SmartStack.Api.*` |
168
-
169
- ---
170
-
171
- ## Options
141
+ <options>
172
142
 
173
143
  | Option | Description |
174
144
  |--------|-------------|
@@ -176,9 +146,9 @@ WARNINGS ({warnings.length})
176
146
  | `--json` | Output raw MCP JSON response |
177
147
  | `--strict` | Treat warnings as errors |
178
148
 
179
- ---
149
+ </options>
180
150
 
181
- ## CI/CD Integration
151
+ <cicd_integration>
182
152
 
183
153
  ```yaml
184
154
  # GitHub Actions
@@ -192,42 +162,13 @@ WARNINGS ({warnings.length})
192
162
  fi
193
163
  ```
194
164
 
195
- ---
196
-
197
- ## Pre-Commit Hook Integration
165
+ </cicd_integration>
198
166
 
199
- Add to `.claude/hooks/PreToolUse`:
200
-
201
- ```json
202
- {
203
- "matcher": "Edit|Write",
204
- "hooks": [{
205
- "type": "command",
206
- "command": "claude-code /validate:quick"
207
- }]
208
- }
209
- ```
210
-
211
- ---
212
-
213
- ## MCP Tool Reference
214
-
215
- **Tool:** `mcp__smartstack__validate_conventions`
216
-
217
- **Description:** Validate AtlasHub/SmartStack conventions: SQL schemas (core/extensions), domain table prefixes (auth_, nav_, ai_, etc.), migration naming ({context}_v{version}_{sequence}_*), service interfaces (I*Service), namespace structure
218
-
219
- **Parameters:**
220
-
221
- | Parameter | Type | Description |
222
- |-----------|------|-------------|
223
- | `path` | string | Project path (default: auto-detect) |
224
- | `checks` | string[] | Types of checks: `tables`, `migrations`, `services`, `namespaces`, `all` |
225
-
226
- ---
227
-
228
- ## Why MCP Integration?
167
+ <why_mcp>
229
168
 
230
169
  1. **Centralized Rules:** Convention rules defined once in MCP config
231
170
  2. **Consistency:** Same validation in CLI, CI/CD, and IDE
232
171
  3. **Extensibility:** Add new checks in MCP, available everywhere
233
172
  4. **Structured Output:** Typed responses for automation
173
+
174
+ </why_mcp>
@@ -1,267 +0,0 @@
1
- ---
2
- description: Verify version alignment between package.json and documentation
3
- agent: action
4
- model: haiku
5
- ---
6
-
7
- # /check-version - Version Alignment Validator
8
-
9
- Verifies that the version in `package.json` is aligned with all documentation files in `.documentation/`.
10
-
11
- **USAGE:** Run before releases or as part of release process to ensure documentation is up-to-date.
12
-
13
- **INTEGRATION:** Called automatically by `/gitflow:11-finish` for release branches.
14
-
15
- ---
16
-
17
- ## STEP 1: Read Package Version
18
-
19
- **EXECUTE:**
20
-
21
- ```bash
22
- # Get version from package.json
23
- PKG_VERSION=$(cat package.json | grep -oP '"version":\s*"\K[^"]+' | head -1)
24
- echo "Package version: $PKG_VERSION"
25
- ```
26
-
27
- ---
28
-
29
- ## STEP 2: Scan Documentation Files
30
-
31
- **EXECUTE:**
32
-
33
- ```bash
34
- # Find all HTML files with version-badge
35
- echo ""
36
- echo "Scanning documentation files..."
37
- echo ""
38
-
39
- # Extract versions from all doc files
40
- for file in .documentation/*.html; do
41
- if [ -f "$file" ]; then
42
- DOC_VERSION=$(grep -oP 'version-badge">v?\K[^<]+' "$file" | head -1)
43
- if [ -n "$DOC_VERSION" ]; then
44
- FILENAME=$(basename "$file")
45
- # Remove 'v' prefix if present for comparison
46
- DOC_VERSION_CLEAN=${DOC_VERSION#v}
47
-
48
- if [ "$DOC_VERSION_CLEAN" = "$PKG_VERSION" ]; then
49
- echo "OK $FILENAME: v$DOC_VERSION_CLEAN"
50
- else
51
- echo "MISMATCH $FILENAME: v$DOC_VERSION_CLEAN (expected v$PKG_VERSION)"
52
- fi
53
- fi
54
- fi
55
- done
56
- ```
57
-
58
- ---
59
-
60
- ## STEP 3: Generate Report
61
-
62
- **EXECUTE:**
63
-
64
- ```bash
65
- echo ""
66
- echo "====================================================================="
67
- echo " VERSION ALIGNMENT CHECK"
68
- echo "====================================================================="
69
- echo ""
70
-
71
- PKG_VERSION=$(cat package.json | grep -oP '"version":\s*"\K[^"]+' | head -1)
72
- MISMATCH_COUNT=0
73
- TOTAL_COUNT=0
74
-
75
- for file in .documentation/*.html; do
76
- if [ -f "$file" ]; then
77
- DOC_VERSION=$(grep -oP 'version-badge">v?\K[^<]+' "$file" | head -1)
78
- if [ -n "$DOC_VERSION" ]; then
79
- TOTAL_COUNT=$((TOTAL_COUNT + 1))
80
- DOC_VERSION_CLEAN=${DOC_VERSION#v}
81
- if [ "$DOC_VERSION_CLEAN" != "$PKG_VERSION" ]; then
82
- MISMATCH_COUNT=$((MISMATCH_COUNT + 1))
83
- fi
84
- fi
85
- fi
86
- done
87
-
88
- echo "Package version: v$PKG_VERSION"
89
- echo "Documentation files checked: $TOTAL_COUNT"
90
- echo "Mismatches found: $MISMATCH_COUNT"
91
- echo ""
92
-
93
- if [ "$MISMATCH_COUNT" -eq 0 ]; then
94
- echo "STATUS: PASSED - All versions aligned"
95
- else
96
- echo "STATUS: FAILED - Version mismatches detected"
97
- echo ""
98
- echo "Run /check-version:fix to auto-update documentation"
99
- fi
100
- echo ""
101
- echo "====================================================================="
102
- ```
103
-
104
- ---
105
-
106
- ## Conditional: If Mismatches Detected
107
-
108
- **IF** `MISMATCH_COUNT > 0`:
109
-
110
- Use `AskUserQuestion` tool to ask:
111
-
112
- ```json
113
- {
114
- "questions": [{
115
- "question": "Des fichiers de documentation ont des versions obsoletes. Voulez-vous les mettre a jour automatiquement ?",
116
- "header": "Fix versions",
117
- "options": [
118
- {
119
- "label": "Oui, mettre a jour (Recommended)",
120
- "description": "Met a jour tous les fichiers avec la version actuelle"
121
- },
122
- {
123
- "label": "Non, ignorer",
124
- "description": "Continuer sans corriger les versions"
125
- }
126
- ],
127
- "multiSelect": false
128
- }]
129
- }
130
- ```
131
-
132
- **IF** user selects "Oui":
133
- - Execute the fix command below
134
-
135
- ---
136
-
137
- ## /check-version:fix - Auto-Update Documentation Versions
138
-
139
- **EXECUTE:**
140
-
141
- ```bash
142
- PKG_VERSION=$(cat package.json | grep -oP '"version":\s*"\K[^"]+' | head -1)
143
-
144
- echo "Updating documentation to v$PKG_VERSION..."
145
- echo ""
146
-
147
- UPDATED_COUNT=0
148
-
149
- for file in .documentation/*.html; do
150
- if [ -f "$file" ]; then
151
- DOC_VERSION=$(grep -oP 'version-badge">v?\K[^<]+' "$file" | head -1)
152
- if [ -n "$DOC_VERSION" ]; then
153
- DOC_VERSION_CLEAN=${DOC_VERSION#v}
154
- if [ "$DOC_VERSION_CLEAN" != "$PKG_VERSION" ]; then
155
- # Update version in file
156
- sed -i "s/version-badge\">v[^<]*/version-badge\">v$PKG_VERSION/" "$file"
157
- UPDATED_COUNT=$((UPDATED_COUNT + 1))
158
- echo "UPDATED $(basename "$file"): v$DOC_VERSION_CLEAN -> v$PKG_VERSION"
159
- fi
160
- fi
161
- fi
162
- done
163
-
164
- echo ""
165
- if [ "$UPDATED_COUNT" -gt 0 ]; then
166
- echo "OK $UPDATED_COUNT file(s) updated"
167
- echo ""
168
- echo "Files modified:"
169
- git status --porcelain .documentation/*.html | grep "^ M" | sed 's/^ M / /'
170
- echo ""
171
- echo "Next steps:"
172
- echo " 1. Review changes: git diff .documentation/"
173
- echo " 2. Commit: /gitflow:commit"
174
- else
175
- echo "OK No files needed updating"
176
- fi
177
- ```
178
-
179
- ---
180
-
181
- ## /check-version:report - Detailed Report
182
-
183
- **EXECUTE:**
184
-
185
- ```bash
186
- PKG_VERSION=$(cat package.json | grep -oP '"version":\s*"\K[^"]+' | head -1)
187
-
188
- echo "====================================================================="
189
- echo " VERSION ALIGNMENT DETAILED REPORT"
190
- echo "====================================================================="
191
- echo ""
192
- echo "Package: @atlashub/smartstack-cli"
193
- echo "Current version: v$PKG_VERSION"
194
- echo ""
195
- echo "---------------------------------------------------------------------"
196
- echo "FILE | DOC VERSION | STATUS"
197
- echo "---------------------------------------------------------------------"
198
-
199
- for file in .documentation/*.html; do
200
- if [ -f "$file" ]; then
201
- DOC_VERSION=$(grep -oP 'version-badge">v?\K[^<]+' "$file" | head -1)
202
- if [ -n "$DOC_VERSION" ]; then
203
- FILENAME=$(basename "$file")
204
- DOC_VERSION_CLEAN=${DOC_VERSION#v}
205
-
206
- # Pad filename to 30 chars
207
- PADDED_NAME=$(printf "%-28s" "$FILENAME")
208
-
209
- if [ "$DOC_VERSION_CLEAN" = "$PKG_VERSION" ]; then
210
- printf "%s | v%-10s | OK\n" "$PADDED_NAME" "$DOC_VERSION_CLEAN"
211
- else
212
- printf "%s | v%-10s | MISMATCH\n" "$PADDED_NAME" "$DOC_VERSION_CLEAN"
213
- fi
214
- fi
215
- fi
216
- done
217
-
218
- echo "---------------------------------------------------------------------"
219
- ```
220
-
221
- ---
222
-
223
- ## Integration with GitFlow Release
224
-
225
- This command is automatically called during `/gitflow:11-finish` for release branches.
226
-
227
- **In release finish workflow:**
228
-
229
- ```bash
230
- # Before creating tag, verify versions are aligned
231
- if [[ "$TYPE" = "release" ]]; then
232
- /check-version
233
-
234
- # If mismatches, prompt to fix before continuing
235
- if [ "$MISMATCH_COUNT" -gt 0 ]; then
236
- echo "WARNING: Documentation versions not aligned"
237
- echo "Fix with: /check-version:fix"
238
- # Block release until fixed
239
- fi
240
- fi
241
- ```
242
-
243
- ---
244
-
245
- ## Usage Examples
246
-
247
- | Command | Description |
248
- |---------|-------------|
249
- | `/check-version` | Check version alignment (interactive) |
250
- | `/check-version:fix` | Auto-update all doc files |
251
- | `/check-version:report` | Detailed report without prompts |
252
-
253
- ---
254
-
255
- ## Exit Codes
256
-
257
- | Code | Meaning |
258
- |------|---------|
259
- | 0 | All versions aligned |
260
- | 1 | Mismatches detected (blocking for releases) |
261
-
262
- ---
263
-
264
- ## Files Checked
265
-
266
- - `.documentation/*.html` - All HTML documentation files
267
- - Looks for `<span class="version-badge">vX.Y.Z</span>` pattern
@@ -1,95 +0,0 @@
1
- ---
2
- description: Systematic bug debugging with deep analysis and resolution
3
- argument-hint: <log|error|problem-description>
4
- allowed-tools: Bash, Read, Edit, MultiEdit, Write, Grep, Glob, Task, WebSearch, WebFetch
5
- ---
6
-
7
- You are a systematic debugging specialist. Follow this ultra-deep analysis workflow to identify, understand, and resolve bugs.
8
-
9
- **You need to always ULTRA THINK.**
10
-
11
- ## Workflow
12
-
13
- 1. **ANALYZE**: Deep log/error analysis
14
- - Parse the provided log/error message carefully
15
- - Extract key error patterns, stack traces, and symptoms
16
- - Identify error types: runtime, compile-time, logic, performance
17
- - **CRITICAL**: Document exact error context and reproduction steps
18
-
19
- 2. **EXPLORE**: Targeted codebase investigation
20
- - Launch **parallel subagents** to search for error-related code (`explore-codebase`, `explore-docs`, `websearch`)
21
- - Search for similar error patterns in codebase using Grep
22
- - Find all files related to the failing component/module
23
- - Examine recent changes that might have introduced the bug
24
- - **ULTRA THINK**: Connect error symptoms to potential root causes
25
-
26
- 3. **ULTRA-THINK**: Deep root cause analysis
27
- - **THINK DEEPLY** about the error chain: symptoms → immediate cause → root cause
28
- - Consider all possible causes:
29
- - Code logic errors
30
- - Configuration issues
31
- - Environment problems
32
- - Race conditions
33
- - Memory issues
34
- - Network problems
35
- - **CRITICAL**: Map the complete failure path from root cause to visible symptom
36
- - Validate hypotheses against the evidence
37
-
38
- 4. **RESEARCH**: Solution investigation
39
- - Launch **parallel subagents** for web research (`websearch`)
40
- - Search for similar issues and solutions online
41
- - Check documentation for affected libraries/frameworks
42
- - Look for known bugs, workarounds, and best practices
43
- - **THINK**: Evaluate solution approaches for this specific context
44
-
45
- 5. **IMPLEMENT**: Systematic resolution
46
- - Choose the most appropriate solution based on analysis
47
- - Follow existing codebase patterns and conventions
48
- - Implement minimal, targeted fixes
49
- - **STAY IN SCOPE**: Fix only what's needed for this specific bug
50
- - Add defensive programming where appropriate
51
-
52
- 6. **VERIFY**: Comprehensive testing
53
- - Test the specific scenario that was failing
54
- - Run related tests to ensure no regressions
55
- - Check edge cases around the fix
56
- - **CRITICAL**: Verify the original error is completely resolved
57
-
58
- ## Deep Analysis Techniques
59
-
60
- ### Log Analysis
61
-
62
- - Extract timestamps, error codes, stack traces
63
- - Identify error propagation patterns
64
- - Look for correlation with system events
65
-
66
- ### Code Investigation
67
-
68
- - Trace execution path to error location
69
- - Check variable states and data flow
70
- - Examine error handling patterns
71
- - Review recent commits affecting the area
72
-
73
- ### Root Cause Mapping
74
-
75
- - **WHY technique**: Ask "why" 5 times minimum
76
- - Consider environmental factors
77
- - Check for timing/concurrency issues
78
- - Validate assumptions about data/state
79
-
80
- ## Execution Rules
81
-
82
- - **ULTRA THINK** at each phase transition
83
- - Use parallel agents for comprehensive investigation
84
- - Document findings and reasoning at each step
85
- - **NEVER guess** - validate all hypotheses with evidence
86
- - **MINIMAL CHANGES**: Fix root cause, not symptoms
87
- - Test thoroughly before declaring resolution complete
88
-
89
- ## Priority
90
-
91
- Understanding > Speed > Completeness. Every bug must be fully understood before attempting fixes.
92
-
93
- ---
94
-
95
- User: $ARGUMENTS