arcanea 3.0.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 (105) hide show
  1. package/CLAUDE.md +169 -0
  2. package/README.md +376 -0
  3. package/agents/arcanea-ai-specialist.md +732 -0
  4. package/agents/arcanea-architect.md +351 -0
  5. package/agents/arcanea-backend.md +809 -0
  6. package/agents/arcanea-character-crafter.md +381 -0
  7. package/agents/arcanea-development.md +304 -0
  8. package/agents/arcanea-devops.md +736 -0
  9. package/agents/arcanea-frontend.md +543 -0
  10. package/agents/arcanea-lore-master.md +366 -0
  11. package/agents/arcanea-master-orchestrator.md +223 -0
  12. package/agents/arcanea-story-master.md +144 -0
  13. package/agents/arcanea-world-expander.md +380 -0
  14. package/agents/coding/arcanea-architect.md +72 -0
  15. package/agents/coding/arcanea-coder.md +78 -0
  16. package/agents/coding/arcanea-debugger.md +113 -0
  17. package/agents/coding/arcanea-reviewer.md +102 -0
  18. package/agents/creation-architect.md +176 -0
  19. package/agents/design-sage.md +213 -0
  20. package/agents/developer-documentation.md +373 -0
  21. package/agents/developer-qa-engineer.md +345 -0
  22. package/agents/luminor-oracle.md +125 -0
  23. package/agents/production/format-master.md +208 -0
  24. package/agents/production/sound-designer.md +199 -0
  25. package/agents/production/visual-director.md +176 -0
  26. package/agents/prompt-sage.md +227 -0
  27. package/agents/research/archivist.md +174 -0
  28. package/agents/research/muse.md +163 -0
  29. package/agents/research/sage.md +177 -0
  30. package/agents/research/scout.md +143 -0
  31. package/agents/teacher-assessor.md +287 -0
  32. package/agents/teacher-companion.md +243 -0
  33. package/agents/teacher-curriculum-designer.md +261 -0
  34. package/agents/teacher-mentor.md +175 -0
  35. package/agents/visionary-futurist.md +290 -0
  36. package/agents/visionary-innovator.md +291 -0
  37. package/agents/visionary-strategist.md +321 -0
  38. package/agents/visionary-synthesizer.md +310 -0
  39. package/agents/writing/continuity-guardian.md +156 -0
  40. package/agents/writing/line-editor.md +129 -0
  41. package/agents/writing/prose-weaver.md +113 -0
  42. package/agents/writing/story-architect.md +96 -0
  43. package/agents/writing/voice-alchemist.md +124 -0
  44. package/commands/arcanea-author.md +177 -0
  45. package/commands/arcanea-build.md +241 -0
  46. package/commands/arcanea-council.md +143 -0
  47. package/commands/arcanea-db.md +272 -0
  48. package/commands/arcanea-deploy.md +176 -0
  49. package/commands/arcanea-dev.md +29 -0
  50. package/commands/arcanea-lore-expand.md +142 -0
  51. package/commands/arcanea-sync.md +281 -0
  52. package/commands/arcanea-team.md +130 -0
  53. package/commands/arcanea-test.md +151 -0
  54. package/commands/bestiary.md +38 -0
  55. package/commands/character-forge.md +55 -0
  56. package/commands/check-continuity.md +119 -0
  57. package/commands/compose-theme.md +134 -0
  58. package/commands/craft-prompt.md +40 -0
  59. package/commands/edit-chapter.md +118 -0
  60. package/commands/export-book.md +146 -0
  61. package/commands/luminor.md +46 -0
  62. package/commands/outline-story.md +79 -0
  63. package/commands/story-help.md +40 -0
  64. package/commands/teacher-team.md +43 -0
  65. package/commands/ultrabook.md +147 -0
  66. package/commands/ultraworld.md +201 -0
  67. package/commands/ultrawrite.md +103 -0
  68. package/commands/visionary-team.md +78 -0
  69. package/commands/visualize.md +126 -0
  70. package/commands/world-build.md +41 -0
  71. package/commands/write-chapter.md +97 -0
  72. package/dist/cli/index.d.ts +3 -0
  73. package/dist/cli/index.d.ts.map +1 -0
  74. package/dist/cli/index.js +2675 -0
  75. package/dist/index.d.ts +117 -0
  76. package/dist/index.d.ts.map +1 -0
  77. package/dist/index.js +425 -0
  78. package/dist/install.d.ts +13 -0
  79. package/dist/install.d.ts.map +1 -0
  80. package/package.json +54 -0
  81. package/skills/ai-symbiosis.md +266 -0
  82. package/skills/arcanea/arcanea-anti-trope.md +60 -0
  83. package/skills/arcanea/arcanea-canon/SKILL.md +596 -0
  84. package/skills/arcanea/arcanea-creator-academy/SKILL.md +418 -0
  85. package/skills/arcanea/arcanea-design-system/SKILL.md +626 -0
  86. package/skills/arcanea/arcanea-lore/ENHANCEMENT_SUMMARY.md +908 -0
  87. package/skills/arcanea/arcanea-lore/ONBOARDING_NARRATIVES.md +642 -0
  88. package/skills/arcanea/arcanea-lore/SKILL.md +1534 -0
  89. package/skills/arcanea/arcanea-voice/SKILL.md +510 -0
  90. package/skills/arcanea/centaur-mode/SKILL.md +399 -0
  91. package/skills/arcanea/design-system/SKILL.md +601 -0
  92. package/skills/arcanea/luminor-wisdom/SKILL.md +359 -0
  93. package/skills/arcanea/prompt-craft/SKILL.md +400 -0
  94. package/skills/character-alchemist.md +242 -0
  95. package/skills/creative/bestiary-nav/SKILL.md +425 -0
  96. package/skills/creative/character-forge/SKILL.md +443 -0
  97. package/skills/creative/story-weave/SKILL.md +441 -0
  98. package/skills/creative/world-build/SKILL.md +513 -0
  99. package/skills/creative-bestiary.md +231 -0
  100. package/skills/development/code-review/SKILL.md +412 -0
  101. package/skills/development/systematic-debug/SKILL.md +480 -0
  102. package/skills/development/tdd/SKILL.md +450 -0
  103. package/skills/luminor-council.md +241 -0
  104. package/skills/story-weaver.md +308 -0
  105. package/skills/world-architect.md +253 -0
@@ -0,0 +1,480 @@
1
+ ---
2
+ name: arcanea-systematic-debug
3
+ description: Systematic debugging methodology - scientific approach to finding and fixing bugs using hypothesis testing, isolation, and root cause analysis. Based on the Arcanean principle that understanding precedes execution.
4
+ version: 2.0.0
5
+ author: Arcanea
6
+ tags: [debugging, troubleshooting, development, problem-solving]
7
+ triggers:
8
+ - bug
9
+ - error
10
+ - not working
11
+ - debug
12
+ - broken
13
+ - failing
14
+ - unexpected behavior
15
+ ---
16
+
17
+ # Systematic Debugging: The Arcanean Method
18
+
19
+ > *"Sophron teaches: Understanding precedes execution. Do not guess at the bug. Understand the system, and the bug reveals itself."*
20
+
21
+ ---
22
+
23
+ ## The Debugging Mindset
24
+
25
+ ### What Debugging Is NOT
26
+ ```
27
+ ❌ Random changes hoping something works
28
+ ❌ Blaming the framework/library/language
29
+ ❌ Assuming you know the cause without evidence
30
+ ❌ Deleting and rewriting until it works
31
+ ```
32
+
33
+ ### What Debugging IS
34
+ ```
35
+ ✓ Scientific investigation
36
+ ✓ Hypothesis formation and testing
37
+ ✓ Systematic isolation
38
+ ✓ Understanding before fixing
39
+ ```
40
+
41
+ ---
42
+
43
+ ## The Scientific Method for Bugs
44
+
45
+ ```
46
+ ╭─────────────────────────────────────────────────────────╮
47
+ │ THE DEBUG CYCLE │
48
+ ├─────────────────────────────────────────────────────────┤
49
+ │ │
50
+ │ 1. OBSERVE → What exactly is happening? │
51
+ │ ↓ │
52
+ │ 2. REPRODUCE → Can I make it happen reliably? │
53
+ │ ↓ │
54
+ │ 3. HYPOTHESIZE→ What could cause this? │
55
+ │ ↓ │
56
+ │ 4. TEST → Is my hypothesis correct? │
57
+ │ ↓ │
58
+ │ 5. FIX → Address the root cause │
59
+ │ ↓ │
60
+ │ 6. VERIFY → Is it actually fixed? │
61
+ │ ↓ │
62
+ │ 7. PREVENT → How do we stop it happening again? │
63
+ │ │
64
+ ╰─────────────────────────────────────────────────────────╯
65
+ ```
66
+
67
+ ---
68
+
69
+ ## Step 1: Observe
70
+
71
+ ### Gather the Facts
72
+ ```
73
+ WHAT is happening?
74
+ - Exact error message (copy it!)
75
+ - Actual behavior vs. expected behavior
76
+ - What does "not working" mean specifically?
77
+
78
+ WHEN does it happen?
79
+ - Always, or intermittently?
80
+ - After a specific action?
81
+ - At a specific time?
82
+
83
+ WHERE does it happen?
84
+ - Which environment? (dev, staging, prod)
85
+ - Which browser/device/OS?
86
+ - Which user/account?
87
+
88
+ WHO does it affect?
89
+ - All users or specific users?
90
+ - New users or existing?
91
+ - Any pattern in affected users?
92
+ ```
93
+
94
+ ### The Bug Report Template
95
+ ```markdown
96
+ ## Bug: [Clear, specific title]
97
+
98
+ ### Observed Behavior
99
+ [What actually happens]
100
+
101
+ ### Expected Behavior
102
+ [What should happen]
103
+
104
+ ### Steps to Reproduce
105
+ 1. [Step 1]
106
+ 2. [Step 2]
107
+ 3. [Step 3]
108
+
109
+ ### Environment
110
+ - Browser/Client:
111
+ - OS:
112
+ - Environment:
113
+ - User role:
114
+
115
+ ### Error Messages
116
+ [Exact error text or screenshot]
117
+
118
+ ### Frequency
119
+ [Always / Sometimes / Once]
120
+
121
+ ### Impact
122
+ [Who is affected and how severely]
123
+ ```
124
+
125
+ ---
126
+
127
+ ## Step 2: Reproduce
128
+
129
+ ### The Reproduction Requirement
130
+ ```
131
+ IF YOU CAN'T REPRODUCE IT, YOU CAN'T FIX IT
132
+ (Or at least, you can't verify the fix)
133
+ ```
134
+
135
+ ### Creating a Minimal Reproduction
136
+ ```
137
+ 1. Start with the full scenario
138
+ 2. Remove one element at a time
139
+ 3. Does the bug still occur?
140
+ 4. Continue until you have the smallest case
141
+
142
+ The minimal reproduction reveals the cause.
143
+ ```
144
+
145
+ ### When You Can't Reproduce
146
+ ```
147
+ Consider:
148
+ - Environment differences
149
+ - Timing/race conditions
150
+ - State dependencies
151
+ - User-specific data
152
+ - Cached vs. fresh state
153
+ - Network conditions
154
+ ```
155
+
156
+ ---
157
+
158
+ ## Step 3: Hypothesize
159
+
160
+ ### Generate Hypotheses
161
+ ```
162
+ List possible causes without judgment:
163
+
164
+ "The bug could be caused by:"
165
+ 1. [Hypothesis A]
166
+ 2. [Hypothesis B]
167
+ 3. [Hypothesis C]
168
+
169
+ Rank by:
170
+ - Likelihood (most to least likely)
171
+ - Testability (easiest to hardest to test)
172
+ ```
173
+
174
+ ### Common Bug Categories
175
+ ```
176
+ STATE BUGS
177
+ - Wrong initial state
178
+ - State not updated
179
+ - State updated incorrectly
180
+ - Stale state (caching)
181
+
182
+ LOGIC BUGS
183
+ - Wrong condition
184
+ - Off-by-one
185
+ - Wrong operator
186
+ - Missing case
187
+
188
+ DATA BUGS
189
+ - Wrong type
190
+ - Null/undefined
191
+ - Malformed data
192
+ - Encoding issues
193
+
194
+ TIMING BUGS
195
+ - Race condition
196
+ - Wrong order
197
+ - Timeout too short/long
198
+ - Async not awaited
199
+
200
+ INTEGRATION BUGS
201
+ - API contract mismatch
202
+ - Environment difference
203
+ - Missing dependency
204
+ - Version mismatch
205
+
206
+ EDGE CASES
207
+ - Empty input
208
+ - Maximum input
209
+ - Invalid input
210
+ - Concurrent access
211
+ ```
212
+
213
+ ---
214
+
215
+ ## Step 4: Test Hypotheses
216
+
217
+ ### Isolation Techniques
218
+
219
+ #### Binary Search Debugging
220
+ ```
221
+ If you don't know where the bug is:
222
+
223
+ 1. Find the midpoint of the suspicious code
224
+ 2. Add a log/breakpoint there
225
+ 3. Is the state correct at that point?
226
+ 4. If yes: bug is after that point
227
+ 5. If no: bug is before that point
228
+ 6. Repeat until found
229
+
230
+ This finds any bug in O(log n) checks.
231
+ ```
232
+
233
+ #### Diff Debugging
234
+ ```
235
+ If the code used to work:
236
+
237
+ 1. Find last known working version (git bisect)
238
+ 2. Compare with current version
239
+ 3. What changed?
240
+ 4. The bug is in the diff
241
+
242
+ git bisect start
243
+ git bisect bad HEAD
244
+ git bisect good <known-good-commit>
245
+ git bisect run npm test
246
+ ```
247
+
248
+ #### Rubber Duck Debugging
249
+ ```
250
+ Explain the code line by line to:
251
+ - A rubber duck
252
+ - A colleague
253
+ - Yourself out loud
254
+
255
+ The act of explaining often reveals the bug.
256
+ ```
257
+
258
+ ### Diagnostic Tools
259
+ ```
260
+ LOGGING
261
+ - Add strategic console.log/print statements
262
+ - Log inputs, outputs, intermediate state
263
+ - Remove logs after debugging
264
+
265
+ BREAKPOINTS
266
+ - Pause execution at specific lines
267
+ - Inspect variable state
268
+ - Step through execution
269
+
270
+ ASSERTIONS
271
+ - Add runtime checks for assumptions
272
+ - assert(value !== null, 'value should exist')
273
+ - Fail fast when assumptions break
274
+
275
+ PROFILERS
276
+ - For performance bugs
277
+ - Identify slow functions
278
+ - Find memory leaks
279
+ ```
280
+
281
+ ---
282
+
283
+ ## Step 5: Fix
284
+
285
+ ### The Fix Principles
286
+ ```
287
+ FIX THE ROOT CAUSE, NOT THE SYMPTOM
288
+
289
+ Symptom: "Users get 500 error on profile page"
290
+ Surface fix: Catch the error, show generic message
291
+ Root cause fix: Prevent the null pointer in user data
292
+
293
+ Surface fixes hide bugs. Root cause fixes eliminate them.
294
+ ```
295
+
296
+ ### Before Fixing
297
+ ```
298
+ □ I understand WHY the bug occurs
299
+ □ I can explain the fix to someone else
300
+ □ The fix addresses root cause, not symptom
301
+ □ The fix won't introduce new bugs
302
+ □ The fix is the simplest solution
303
+ ```
304
+
305
+ ### The Minimal Fix
306
+ ```
307
+ Change as little as possible.
308
+ One bug = one fix.
309
+ Don't refactor while fixing bugs.
310
+ Don't add features while fixing bugs.
311
+ ```
312
+
313
+ ---
314
+
315
+ ## Step 6: Verify
316
+
317
+ ### Verification Checklist
318
+ ```
319
+ □ Original bug is fixed
320
+ □ Bug cannot be reproduced anymore
321
+ □ All existing tests still pass
322
+ □ New test written for this bug
323
+ □ Related functionality still works
324
+ □ Fix works in all affected environments
325
+ ```
326
+
327
+ ### The Regression Test
328
+ ```
329
+ Write a test that:
330
+ 1. Failed before the fix
331
+ 2. Passes after the fix
332
+ 3. Prevents this bug from returning
333
+
334
+ This is the most important test you can write.
335
+ ```
336
+
337
+ ---
338
+
339
+ ## Step 7: Prevent
340
+
341
+ ### Post-Mortem Questions
342
+ ```
343
+ 1. Why did this bug exist?
344
+ - Missing test?
345
+ - Unclear requirement?
346
+ - Complex code?
347
+ - Communication failure?
348
+
349
+ 2. Why wasn't it caught earlier?
350
+ - Code review missed it?
351
+ - Tests didn't cover it?
352
+ - QA didn't test this flow?
353
+
354
+ 3. How can we prevent similar bugs?
355
+ - Add tests?
356
+ - Improve code review?
357
+ - Simplify code?
358
+ - Better tooling?
359
+ ```
360
+
361
+ ### Prevention Strategies
362
+ ```
363
+ ADD TESTS
364
+ - Unit test for this specific bug
365
+ - Integration test for this flow
366
+ - Edge case tests
367
+
368
+ IMPROVE CODE
369
+ - Simplify complex logic
370
+ - Add defensive checks
371
+ - Improve error messages
372
+
373
+ IMPROVE PROCESS
374
+ - Update code review checklist
375
+ - Add to QA test cases
376
+ - Document the gotcha
377
+ ```
378
+
379
+ ---
380
+
381
+ ## Debugging Specific Bug Types
382
+
383
+ ### Null Pointer / Undefined
384
+ ```
385
+ 1. Find the null value
386
+ 2. Trace backward: where should it have been set?
387
+ 3. Why wasn't it set?
388
+ - Never initialized
389
+ - Initialization failed
390
+ - Set then cleared
391
+ - Wrong variable
392
+ ```
393
+
394
+ ### Race Condition
395
+ ```
396
+ 1. Identify the shared resource
397
+ 2. What operations are racing?
398
+ 3. What's the problematic order?
399
+ 4. Add proper synchronization:
400
+ - Locks/mutexes
401
+ - Atomic operations
402
+ - Message queues
403
+ ```
404
+
405
+ ### Performance Bug
406
+ ```
407
+ 1. Profile: where is time spent?
408
+ 2. Is it algorithmic? (O(n²) vs O(n))
409
+ 3. Is it I/O? (database, network)
410
+ 4. Is it memory? (garbage collection)
411
+ 5. Fix the biggest bottleneck first
412
+ ```
413
+
414
+ ### Memory Leak
415
+ ```
416
+ 1. Take memory snapshots over time
417
+ 2. What objects are growing?
418
+ 3. Why aren't they being collected?
419
+ - Event listeners not removed
420
+ - Closures holding references
421
+ - Global references
422
+ - Caching without limits
423
+ ```
424
+
425
+ ---
426
+
427
+ ## Quick Reference
428
+
429
+ ### The Debug Checklist
430
+ ```
431
+ □ Exact error message captured
432
+ □ Steps to reproduce documented
433
+ □ Minimal reproduction created
434
+ □ Hypotheses listed
435
+ □ Most likely hypothesis tested first
436
+ □ Root cause identified
437
+ □ Minimal fix applied
438
+ □ Fix verified
439
+ □ Regression test written
440
+ □ Prevention documented
441
+ ```
442
+
443
+ ### Debug Commands
444
+ ```javascript
445
+ // Quick state logging
446
+ console.log('State:', JSON.stringify(state, null, 2));
447
+
448
+ // Trace function calls
449
+ console.trace('Called from:');
450
+
451
+ // Measure timing
452
+ console.time('operation');
453
+ // ... operation ...
454
+ console.timeEnd('operation');
455
+
456
+ // Assert assumptions
457
+ console.assert(condition, 'This should be true');
458
+
459
+ // Group related logs
460
+ console.group('Processing user');
461
+ console.log('id:', user.id);
462
+ console.log('status:', user.status);
463
+ console.groupEnd();
464
+ ```
465
+
466
+ ### When You're Stuck
467
+ ```
468
+ 1. Take a break (fresh eyes find bugs)
469
+ 2. Explain it to someone else
470
+ 3. Question your assumptions
471
+ 4. Look at what changed recently
472
+ 5. Search for similar issues online
473
+ 6. Add more logging
474
+ 7. Reduce to minimal case
475
+ 8. Sleep on it (seriously)
476
+ ```
477
+
478
+ ---
479
+
480
+ *"The bug exists in the gap between what you think the code does and what it actually does. Close that gap with understanding."*