@el-j/magic-helix-core 4.0.0-beta.2 → 4.0.0-beta.3

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 (165) hide show
  1. package/dist/index-B88j4AyE.js +13 -0
  2. package/dist/index-B88j4AyE.js.map +1 -0
  3. package/dist/index-CY-pQbuu.cjs +2 -0
  4. package/dist/index-CY-pQbuu.cjs.map +1 -0
  5. package/dist/index.cjs +75 -1
  6. package/dist/index.cjs.map +1 -1
  7. package/dist/index.d.ts +0 -1
  8. package/dist/index.mjs +2234 -51
  9. package/dist/index.mjs.map +1 -1
  10. package/dist/pattern-combiner.d.ts +1 -1
  11. package/dist/plugin-loader.d.ts +2 -1
  12. package/package.json +4 -4
  13. package/dist/BasePlugin-6wv0hYJ9.js +0 -98
  14. package/dist/BasePlugin-6wv0hYJ9.js.map +0 -1
  15. package/dist/BasePlugin-odQJAKA-.cjs +0 -2
  16. package/dist/BasePlugin-odQJAKA-.cjs.map +0 -1
  17. package/dist/builtin-plugins/base/BasePlugin.d.ts +0 -69
  18. package/dist/builtin-plugins/cpp/index.d.ts +0 -46
  19. package/dist/builtin-plugins/csharp/index.d.ts +0 -20
  20. package/dist/builtin-plugins/go/index.d.ts +0 -23
  21. package/dist/builtin-plugins/index.d.ts +0 -16
  22. package/dist/builtin-plugins/java/index.d.ts +0 -22
  23. package/dist/builtin-plugins/nodejs/index.d.ts +0 -44
  24. package/dist/builtin-plugins/php/index.d.ts +0 -20
  25. package/dist/builtin-plugins/python/index.d.ts +0 -27
  26. package/dist/builtin-plugins/ruby/index.d.ts +0 -20
  27. package/dist/builtin-plugins/rust/index.d.ts +0 -53
  28. package/dist/builtin-plugins/swift/index.d.ts +0 -22
  29. package/dist/default_templates/angular/angular-core.md +0 -19
  30. package/dist/default_templates/architecture/codeowners.md +0 -123
  31. package/dist/default_templates/architecture/monorepo.md +0 -146
  32. package/dist/default_templates/architecture/nx.md +0 -122
  33. package/dist/default_templates/architecture/turborepo.md +0 -114
  34. package/dist/default_templates/ci/github-actions.md +0 -268
  35. package/dist/default_templates/ci/gitlab-ci.md +0 -330
  36. package/dist/default_templates/containers/docker-multistage.md +0 -120
  37. package/dist/default_templates/containers/kubernetes-deploy.md +0 -210
  38. package/dist/default_templates/devops/docker-compose.md +0 -111
  39. package/dist/default_templates/devops/docker-dockerfile.md +0 -94
  40. package/dist/default_templates/devops/github-actions.md +0 -160
  41. package/dist/default_templates/devops/gitlab-ci.md +0 -210
  42. package/dist/default_templates/dotnet/framework-aspnetcore.md +0 -205
  43. package/dist/default_templates/dotnet/framework-blazor.md +0 -271
  44. package/dist/default_templates/dotnet/lang-csharp.md +0 -162
  45. package/dist/default_templates/generic/lang-typescript.md +0 -57
  46. package/dist/default_templates/generic/state-redux.md +0 -21
  47. package/dist/default_templates/generic/state-rxjs.md +0 -6
  48. package/dist/default_templates/generic/style-mui.md +0 -23
  49. package/dist/default_templates/generic/style-tailwind.md +0 -76
  50. package/dist/default_templates/generic/test-cypress.md +0 -21
  51. package/dist/default_templates/generic/test-jest.md +0 -20
  52. package/dist/default_templates/generic/test-playwright.md +0 -21
  53. package/dist/default_templates/generic/test-vitest.md +0 -131
  54. package/dist/default_templates/go/lang-go.md +0 -571
  55. package/dist/default_templates/java/build-gradle.md +0 -102
  56. package/dist/default_templates/java/build-maven.md +0 -86
  57. package/dist/default_templates/java/framework-spring-boot.md +0 -179
  58. package/dist/default_templates/java/lang-java.md +0 -78
  59. package/dist/default_templates/java/lang-kotlin.md +0 -88
  60. package/dist/default_templates/meta/magic-helix-meta.md +0 -213
  61. package/dist/default_templates/meta/meta-debug.md +0 -459
  62. package/dist/default_templates/meta/meta-implement.md +0 -450
  63. package/dist/default_templates/meta/meta-roadmap.md +0 -265
  64. package/dist/default_templates/nestjs/nestjs-core.md +0 -7
  65. package/dist/default_templates/patterns/architecture/clean-architecture.md +0 -469
  66. package/dist/default_templates/patterns/architecture/dependency-injection.md +0 -517
  67. package/dist/default_templates/patterns/architecture/domain-driven-design.md +0 -621
  68. package/dist/default_templates/patterns/architecture/layered-architecture.md +0 -382
  69. package/dist/default_templates/patterns/architecture/repository-pattern.md +0 -408
  70. package/dist/default_templates/patterns/domain-expertise/nextjs-rules.md +0 -115
  71. package/dist/default_templates/patterns/domain-expertise/react-patterns.md +0 -181
  72. package/dist/default_templates/patterns/domain-expertise/server-components.md +0 -212
  73. package/dist/default_templates/patterns/domain-expertise/shadcn-ui.md +0 -52
  74. package/dist/default_templates/patterns/domain-expertise/tailwind-patterns.md +0 -52
  75. package/dist/default_templates/patterns/environment/container-awareness.md +0 -17
  76. package/dist/default_templates/patterns/environment/ide-features.md +0 -17
  77. package/dist/default_templates/patterns/environment/os-commands.md +0 -17
  78. package/dist/default_templates/patterns/organization/heading-hierarchy.md +0 -103
  79. package/dist/default_templates/patterns/organization/sequential-workflows.md +0 -102
  80. package/dist/default_templates/patterns/organization/xml-rule-groups.md +0 -64
  81. package/dist/default_templates/patterns/reasoning/agent-loop.md +0 -151
  82. package/dist/default_templates/patterns/reasoning/confirmation-gates.md +0 -141
  83. package/dist/default_templates/patterns/reasoning/dependency-analysis.md +0 -132
  84. package/dist/default_templates/patterns/reasoning/one-tool-per-iteration.md +0 -152
  85. package/dist/default_templates/patterns/reasoning/preview-before-action.md +0 -194
  86. package/dist/default_templates/patterns/reasoning/reflection-checkpoints.md +0 -166
  87. package/dist/default_templates/patterns/reasoning/result-verification.md +0 -157
  88. package/dist/default_templates/patterns/reasoning/subtask-breakdown.md +0 -131
  89. package/dist/default_templates/patterns/reasoning/thinking-tags.md +0 -100
  90. package/dist/default_templates/patterns/role-definition/capability-declarations.md +0 -72
  91. package/dist/default_templates/patterns/role-definition/expert-identity.md +0 -45
  92. package/dist/default_templates/patterns/role-definition/scope-boundaries.md +0 -61
  93. package/dist/default_templates/patterns/safety/code-safety-rules.md +0 -17
  94. package/dist/default_templates/patterns/safety/credential-handling.md +0 -17
  95. package/dist/default_templates/patterns/safety/destructive-warnings.md +0 -17
  96. package/dist/default_templates/patterns/safety/refusal-messages.md +0 -17
  97. package/dist/default_templates/patterns/tone/adaptive-tone.md +0 -17
  98. package/dist/default_templates/patterns/tone/concise-communication.md +0 -17
  99. package/dist/default_templates/patterns/tone/forbidden-phrases.md +0 -17
  100. package/dist/default_templates/patterns/tool-guidelines/function-schemas.md +0 -143
  101. package/dist/default_templates/patterns/tool-guidelines/parameter-examples.md +0 -137
  102. package/dist/default_templates/patterns/tool-guidelines/usage-policies.md +0 -105
  103. package/dist/default_templates/php/framework-laravel.md +0 -112
  104. package/dist/default_templates/php/lang-php.md +0 -94
  105. package/dist/default_templates/python/lang-python.md +0 -508
  106. package/dist/default_templates/react/react-core.md +0 -677
  107. package/dist/default_templates/react/react-zustand.md +0 -7
  108. package/dist/default_templates/ruby/framework-rails.md +0 -309
  109. package/dist/default_templates/ruby/framework-sinatra.md +0 -227
  110. package/dist/default_templates/ruby/lang-ruby.md +0 -216
  111. package/dist/default_templates/rust/lang-rust.md +0 -89
  112. package/dist/default_templates/swift/framework-vapor.md +0 -352
  113. package/dist/default_templates/swift/lang-swift.md +0 -291
  114. package/dist/default_templates/vue/style-primevue.md +0 -6
  115. package/dist/default_templates/vue/style-quasar.md +0 -22
  116. package/dist/default_templates/vue/vue-core.md +0 -108
  117. package/dist/default_templates/vue/vue-pinia.md +0 -5
  118. package/dist/index-0GK4RlUx.js +0 -1748
  119. package/dist/index-0GK4RlUx.js.map +0 -1
  120. package/dist/index-AkVwRl-r.js +0 -92
  121. package/dist/index-AkVwRl-r.js.map +0 -1
  122. package/dist/index-B6BeG1yT.cjs +0 -68
  123. package/dist/index-B6BeG1yT.cjs.map +0 -1
  124. package/dist/index-B8pyjKdF.js +0 -94
  125. package/dist/index-B8pyjKdF.js.map +0 -1
  126. package/dist/index-BQ6v041y.js +0 -13
  127. package/dist/index-BQ6v041y.js.map +0 -1
  128. package/dist/index-Baxb1vI_.js +0 -210
  129. package/dist/index-Baxb1vI_.js.map +0 -1
  130. package/dist/index-Bg8DD8ku.js +0 -216
  131. package/dist/index-Bg8DD8ku.js.map +0 -1
  132. package/dist/index-BqTqxCpG.cjs +0 -89
  133. package/dist/index-BqTqxCpG.cjs.map +0 -1
  134. package/dist/index-Bv4Q1Pr7.cjs +0 -33
  135. package/dist/index-Bv4Q1Pr7.cjs.map +0 -1
  136. package/dist/index-CN8J45Nc.cjs +0 -24
  137. package/dist/index-CN8J45Nc.cjs.map +0 -1
  138. package/dist/index-CPbv2Od1.js +0 -62
  139. package/dist/index-CPbv2Od1.js.map +0 -1
  140. package/dist/index-Cf-MC6Al.js +0 -63
  141. package/dist/index-Cf-MC6Al.js.map +0 -1
  142. package/dist/index-DDPXXXDy.cjs +0 -19
  143. package/dist/index-DDPXXXDy.cjs.map +0 -1
  144. package/dist/index-DO30AzDe.cjs +0 -19
  145. package/dist/index-DO30AzDe.cjs.map +0 -1
  146. package/dist/index-DkvW5yBY.js +0 -2249
  147. package/dist/index-DkvW5yBY.js.map +0 -1
  148. package/dist/index-Dn1ehjIj.cjs +0 -80
  149. package/dist/index-Dn1ehjIj.cjs.map +0 -1
  150. package/dist/index-DqHvgoXJ.cjs +0 -19
  151. package/dist/index-DqHvgoXJ.cjs.map +0 -1
  152. package/dist/index-K39pdw94.cjs +0 -31
  153. package/dist/index-K39pdw94.cjs.map +0 -1
  154. package/dist/index-OT2XAJkc.js +0 -117
  155. package/dist/index-OT2XAJkc.js.map +0 -1
  156. package/dist/index-TPAX4XKg.cjs +0 -30
  157. package/dist/index-TPAX4XKg.cjs.map +0 -1
  158. package/dist/index-WmVSB57y.js +0 -107
  159. package/dist/index-WmVSB57y.js.map +0 -1
  160. package/dist/index-mYXvc3Fs.js +0 -68
  161. package/dist/index-mYXvc3Fs.js.map +0 -1
  162. package/dist/index-nioXOg4m.cjs +0 -76
  163. package/dist/index-nioXOg4m.cjs.map +0 -1
  164. package/dist/index-okhY3fWD.cjs +0 -2
  165. package/dist/index-okhY3fWD.cjs.map +0 -1
@@ -1,459 +0,0 @@
1
- # 🐛 Debugging & Problem-Solving Mode
2
-
3
- *This context-specific meta-instruction activates when you're debugging issues, investigating errors, or troubleshooting problems.*
4
-
5
- ## Debugging Mindset
6
-
7
- You are in **debugging mode**. Focus on:
8
- - Systematic problem investigation
9
- - Root cause analysis
10
- - Minimal, targeted fixes
11
- - Preventing regression
12
-
13
- ## Systematic Debugging Process
14
-
15
- ### 1. Reproduce the Problem
16
-
17
- **First, confirm the issue:**
18
- - Can you reproduce it consistently?
19
- - What are the exact steps to trigger it?
20
- - Does it happen in all environments?
21
- - Are there specific conditions required?
22
-
23
- **Document reproduction steps:**
24
- ```
25
- Steps to reproduce:
26
- 1. Navigate to /users page
27
- 2. Click "Add User" button
28
- 3. Enter email without @ symbol
29
- 4. Click "Submit"
30
- 5. Observe: Error thrown instead of validation message
31
- ```
32
-
33
- ### 2. Gather Information
34
-
35
- **Read error messages completely:**
36
- - Full error text (don't skim)
37
- - Stack trace (which files/lines)
38
- - Error type/code
39
- - Any additional context
40
-
41
- **Example error analysis:**
42
- ```
43
- TypeError: Cannot read property 'email' of undefined
44
- at validateUser (validation.ts:42:15)
45
- at processForm (form-handler.ts:89:20)
46
- at onClick (UserForm.tsx:156:5)
47
-
48
- Analysis:
49
- - Error occurs in validation.ts line 42
50
- - Trying to access 'email' property
51
- - Value is undefined (should be object)
52
- - Called from form-handler.ts during form processing
53
- ```
54
-
55
- **Collect context:**
56
- - What changed recently? (check git log)
57
- - What's the expected behavior?
58
- - What's the actual behavior?
59
- - Are there related issues/tickets?
60
-
61
- ### 3. Form Hypotheses
62
-
63
- **List possible causes:**
64
-
65
- ```
66
- Hypothesis 1: Form data not being passed correctly
67
- - Check: Form submission code
68
- - Verify: Data reaching validation function
69
-
70
- Hypothesis 2: User object structure changed
71
- - Check: Recent type/interface changes
72
- - Verify: Object shape at runtime
73
-
74
- Hypothesis 3: Missing null check
75
- - Check: Validation function implementation
76
- - Verify: Handling of undefined/null cases
77
- ```
78
-
79
- **Prioritize by likelihood:**
80
- 1. Most likely cause first
81
- 2. Easiest to test second
82
- 3. Least likely but possible last
83
-
84
- ### 4. Test Hypotheses Systematically
85
-
86
- **One hypothesis at a time:**
87
-
88
- ```typescript
89
- // Hypothesis 1: Data not passed
90
- console.log('Form data:', formData); // Add logging
91
- // Result: formData is undefined ✓ Confirmed!
92
-
93
- // Root cause found: form submission not collecting data
94
- ```
95
-
96
- **Use debugging techniques:**
97
- - `console.log()` for quick checks
98
- - Debugger breakpoints for step-through
99
- - Unit tests for isolated testing
100
- - Integration tests for workflow testing
101
-
102
- ### 5. Identify Root Cause
103
-
104
- **Don't just fix symptoms:**
105
-
106
- ```
107
- ❌ Symptom fix (bad):
108
- function validateUser(user) {
109
- if (!user) return { valid: false }; // Band-aid
110
- // ... rest of validation
111
- }
112
-
113
- ✓ Root cause fix (good):
114
- function handleSubmit() {
115
- const formData = collectFormData(); // Was missing!
116
- const result = validateUser(formData);
117
- // ...
118
- }
119
- ```
120
-
121
- **Ask "Why?" 5 times:**
122
- ```
123
- Problem: App crashes on user submit
124
- Why? → validateUser receives undefined
125
- Why? → handleSubmit doesn't pass data
126
- Why? → collectFormData() not called
127
- Why? → Refactored code removed the call
128
- Why? → No test coverage caught regression
129
-
130
- Fix: Add unit test + restore collectFormData() call
131
- ```
132
-
133
- ### 6. Implement Minimal Fix
134
-
135
- **Smallest change that fixes root cause:**
136
-
137
- ```typescript
138
- // Before (broken)
139
- function handleSubmit() {
140
- const result = validateUser(formData); // formData not defined
141
- processResult(result);
142
- }
143
-
144
- // After (fixed)
145
- function handleSubmit() {
146
- const formData = collectFormData(); // Added missing call
147
- const result = validateUser(formData);
148
- processResult(result);
149
- }
150
- ```
151
-
152
- **Verify fix:**
153
- - Manual test: Follow reproduction steps
154
- - Automated test: Add regression test
155
- - Code review: Ensure no side effects
156
-
157
- ### 7. Prevent Regression
158
-
159
- **Add test coverage:**
160
-
161
- ```typescript
162
- describe('handleSubmit', () => {
163
- it('should collect form data before validation', () => {
164
- const collectSpy = jest.spyOn(form, 'collectFormData');
165
-
166
- handleSubmit();
167
-
168
- expect(collectSpy).toHaveBeenCalled();
169
- expect(collectSpy).toHaveBeenCalledBefore(validateUser);
170
- });
171
-
172
- it('should not crash with empty form', () => {
173
- expect(() => handleSubmit()).not.toThrow();
174
- });
175
- });
176
- ```
177
-
178
- ## Debugging Strategies by Error Type
179
-
180
- ### TypeError / NullReferenceError
181
-
182
- **Common causes:**
183
- - Accessing property of null/undefined
184
- - Calling method on wrong type
185
- - Incorrect type assumptions
186
-
187
- **Investigation:**
188
- ```typescript
189
- // Add defensive checks
190
- if (!obj) {
191
- console.error('Object is null/undefined', { obj, context });
192
- return;
193
- }
194
-
195
- // Log type
196
- console.log('Type:', typeof obj, 'Value:', obj);
197
-
198
- // Check prototype chain
199
- console.log('Constructor:', obj?.constructor?.name);
200
- ```
201
-
202
- ### Logic Errors
203
-
204
- **Common causes:**
205
- - Off-by-one errors
206
- - Wrong comparison operators
207
- - Incorrect boolean logic
208
- - Edge case not handled
209
-
210
- **Investigation:**
211
- ```typescript
212
- // Log intermediate values
213
- const isValid = age >= 18 && age <= 65;
214
- console.log({ age, isValid,
215
- check1: age >= 18,
216
- check2: age <= 65
217
- });
218
-
219
- // Test boundary conditions
220
- expect(isAdult(17)).toBe(false); // Just below
221
- expect(isAdult(18)).toBe(true); // Exact boundary
222
- expect(isAdult(19)).toBe(true); // Just above
223
- ```
224
-
225
- ### Performance Issues
226
-
227
- **Common causes:**
228
- - Unnecessary re-renders
229
- - N+1 queries
230
- - Large data processing
231
- - Memory leaks
232
-
233
- **Investigation:**
234
- ```typescript
235
- // Measure execution time
236
- console.time('expensiveOperation');
237
- const result = expensiveOperation();
238
- console.timeEnd('expensiveOperation');
239
-
240
- // Profile memory usage
241
- const before = process.memoryUsage();
242
- doOperation();
243
- const after = process.memoryUsage();
244
- console.log('Memory delta:',
245
- (after.heapUsed - before.heapUsed) / 1024 / 1024, 'MB');
246
-
247
- // Check call frequency
248
- let callCount = 0;
249
- function tracked() {
250
- console.log('Call #', ++callCount);
251
- // ...
252
- }
253
- ```
254
-
255
- ### Integration Issues
256
-
257
- **Common causes:**
258
- - API contract mismatch
259
- - Environment differences
260
- - Timing/race conditions
261
- - Dependency version conflicts
262
-
263
- **Investigation:**
264
- ```typescript
265
- // Log full request/response
266
- console.log('Request:', {
267
- url,
268
- method,
269
- headers,
270
- body: JSON.stringify(body, null, 2)
271
- });
272
-
273
- console.log('Response:', {
274
- status,
275
- headers,
276
- body: JSON.stringify(data, null, 2)
277
- });
278
-
279
- // Check environment
280
- console.log('Environment:', {
281
- NODE_ENV: process.env.NODE_ENV,
282
- API_URL: process.env.API_URL,
283
- version: process.version
284
- });
285
- ```
286
-
287
- ## Debugging Tools & Techniques
288
-
289
- ### Console Debugging
290
-
291
- ```typescript
292
- // Structured logging
293
- console.log('User data:', { id, email, role });
294
-
295
- // Conditional logging
296
- if (DEBUG) {
297
- console.log('Debug info:', state);
298
- }
299
-
300
- // Stack trace
301
- console.trace('How did we get here?');
302
-
303
- // Timing
304
- console.time('operation');
305
- // ... code
306
- console.timeEnd('operation');
307
-
308
- // Table format (for arrays)
309
- console.table(users);
310
- ```
311
-
312
- ### Debugger
313
-
314
- ```typescript
315
- // Pause execution
316
- debugger; // Browser/Node will break here
317
-
318
- // Conditional breakpoint
319
- if (userId === '123') {
320
- debugger; // Only break for specific case
321
- }
322
- ```
323
-
324
- ### Git Bisect
325
-
326
- ```bash
327
- # Find which commit introduced bug
328
- git bisect start
329
- git bisect bad # Current commit is bad
330
- git bisect good v1.2.0 # v1.2.0 was good
331
- # Git will checkout commits for testing
332
- # Mark each as good/bad until found
333
- ```
334
-
335
- ### Binary Search Debugging
336
-
337
- ```typescript
338
- // Comment out half the code
339
- // Does error still occur?
340
- // If yes → bug is in remaining code
341
- // If no → bug is in commented code
342
- // Repeat until isolated
343
- ```
344
-
345
- ## Common Debugging Pitfalls
346
-
347
- ❌ **Don't:**
348
- - Jump to conclusions without evidence
349
- - Fix symptoms instead of root cause
350
- - Change multiple things at once
351
- - Ignore error messages
352
- - Give up after first attempt
353
-
354
- ✓ **Do:**
355
- - Follow systematic process
356
- - Test one hypothesis at a time
357
- - Read error messages completely
358
- - Document findings
359
- - Add tests to prevent regression
360
-
361
- ## Debugging Checklist
362
-
363
- Before concluding debugging:
364
-
365
- ### Understanding
366
- - [ ] Can reproduce consistently
367
- - [ ] Understand exact failure mode
368
- - [ ] Know expected vs actual behavior
369
- - [ ] Identified root cause (not symptom)
370
-
371
- ### Fix Validation
372
- - [ ] Fix works in all test cases
373
- - [ ] No new errors introduced
374
- - [ ] Edge cases handled
375
- - [ ] Code is clean (no debug statements left)
376
-
377
- ### Prevention
378
- - [ ] Added regression test
379
- - [ ] Updated documentation if needed
380
- - [ ] Considered similar issues
381
- - [ ] Team informed of gotchas
382
-
383
- ## Communication During Debugging
384
-
385
- **Keep user informed:**
386
-
387
- ```
388
- Finding: "I've identified the issue - the form data isn't being
389
- collected before validation."
390
-
391
- Plan: "I'll add the missing collectFormData() call and add a test
392
- to prevent this regression."
393
-
394
- Status: "Fixed and tested. The form now properly validates user input."
395
- ```
396
-
397
- **Be transparent about uncertainty:**
398
-
399
- ```
400
- "I've identified two possible causes:
401
- 1. Data not being passed (most likely)
402
- 2. Validation logic changed (less likely)
403
-
404
- Testing hypothesis 1 first..."
405
- ```
406
-
407
- ## Advanced Debugging Scenarios
408
-
409
- ### Race Conditions
410
-
411
- ```typescript
412
- // Add sequence logging
413
- let seq = 0;
414
- async function operation() {
415
- const id = ++seq;
416
- console.log(`[${id}] Start`);
417
- await asyncWork();
418
- console.log(`[${id}] End`);
419
- }
420
-
421
- // Check for: [1] Start, [2] Start, [1] End, [2] End
422
- // vs expected: [1] Start, [1] End, [2] Start, [2] End
423
- ```
424
-
425
- ### Memory Leaks
426
-
427
- ```typescript
428
- // Track object creation
429
- const tracker = new WeakMap();
430
- function track(obj) {
431
- tracker.set(obj, new Error().stack);
432
- }
433
-
434
- // Check for growing collections
435
- setInterval(() => {
436
- console.log('Active items:', cache.size);
437
- }, 1000);
438
- ```
439
-
440
- ### Intermittent Issues
441
-
442
- ```typescript
443
- // Add extensive logging
444
- function problamaticFunction() {
445
- logger.debug('Entry', { args: Array.from(arguments) });
446
- try {
447
- const result = doWork();
448
- logger.debug('Success', { result });
449
- return result;
450
- } catch (error) {
451
- logger.error('Failure', { error, state: captureState() });
452
- throw error;
453
- }
454
- }
455
- ```
456
-
457
- ---
458
-
459
- *This meta-instruction helps you debug issues systematically and effectively. It activates automatically when debugging tasks are detected.*