loki-mode 4.2.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 (54) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +691 -0
  3. package/SKILL.md +191 -0
  4. package/VERSION +1 -0
  5. package/autonomy/.loki/dashboard/index.html +2634 -0
  6. package/autonomy/CONSTITUTION.md +508 -0
  7. package/autonomy/README.md +201 -0
  8. package/autonomy/config.example.yaml +152 -0
  9. package/autonomy/loki +526 -0
  10. package/autonomy/run.sh +3636 -0
  11. package/bin/loki-mode.js +26 -0
  12. package/bin/postinstall.js +60 -0
  13. package/docs/ACKNOWLEDGEMENTS.md +234 -0
  14. package/docs/COMPARISON.md +325 -0
  15. package/docs/COMPETITIVE-ANALYSIS.md +333 -0
  16. package/docs/INSTALLATION.md +547 -0
  17. package/docs/auto-claude-comparison.md +276 -0
  18. package/docs/cursor-comparison.md +225 -0
  19. package/docs/dashboard-guide.md +355 -0
  20. package/docs/screenshots/README.md +149 -0
  21. package/docs/screenshots/dashboard-agents.png +0 -0
  22. package/docs/screenshots/dashboard-tasks.png +0 -0
  23. package/docs/thick2thin.md +173 -0
  24. package/package.json +48 -0
  25. package/references/advanced-patterns.md +453 -0
  26. package/references/agent-types.md +243 -0
  27. package/references/agents.md +1043 -0
  28. package/references/business-ops.md +550 -0
  29. package/references/competitive-analysis.md +216 -0
  30. package/references/confidence-routing.md +371 -0
  31. package/references/core-workflow.md +275 -0
  32. package/references/cursor-learnings.md +207 -0
  33. package/references/deployment.md +604 -0
  34. package/references/lab-research-patterns.md +534 -0
  35. package/references/mcp-integration.md +186 -0
  36. package/references/memory-system.md +467 -0
  37. package/references/openai-patterns.md +647 -0
  38. package/references/production-patterns.md +568 -0
  39. package/references/prompt-repetition.md +192 -0
  40. package/references/quality-control.md +437 -0
  41. package/references/sdlc-phases.md +410 -0
  42. package/references/task-queue.md +361 -0
  43. package/references/tool-orchestration.md +691 -0
  44. package/skills/00-index.md +120 -0
  45. package/skills/agents.md +249 -0
  46. package/skills/artifacts.md +174 -0
  47. package/skills/github-integration.md +218 -0
  48. package/skills/model-selection.md +125 -0
  49. package/skills/parallel-workflows.md +526 -0
  50. package/skills/patterns-advanced.md +188 -0
  51. package/skills/production.md +292 -0
  52. package/skills/quality-gates.md +180 -0
  53. package/skills/testing.md +149 -0
  54. package/skills/troubleshooting.md +109 -0
@@ -0,0 +1,109 @@
1
+ # Troubleshooting
2
+
3
+ ## Common Issues & Solutions
4
+
5
+ | Issue | Cause | Solution |
6
+ |-------|-------|----------|
7
+ | Agent stuck/no progress | Lost context | Read `.loki/CONTINUITY.md` first thing every turn |
8
+ | Task repeating | Not checking queue state | Check `.loki/queue/*.json` before claiming |
9
+ | Code review failing | Skipped static analysis | Run static analysis BEFORE AI reviewers |
10
+ | Breaking API changes | Code before spec | Follow Spec-First workflow |
11
+ | Rate limit hit | Too many parallel agents | Check circuit breakers, use exponential backoff |
12
+ | Tests failing after merge | Skipped quality gates | Never bypass Severity-Based Blocking |
13
+ | Can't find what to do | Not following decision tree | Use Decision Tree, check orchestrator.json |
14
+ | Memory/context growing | Not using ledgers | Write to ledgers after completing tasks |
15
+
16
+ ---
17
+
18
+ ## Red Flags - Never Do These
19
+
20
+ ### Implementation Anti-Patterns
21
+ - **NEVER** skip code review between tasks
22
+ - **NEVER** proceed with unfixed Critical/High/Medium issues
23
+ - **NEVER** dispatch reviewers sequentially (always parallel - 3x faster)
24
+ - **NEVER** dispatch multiple implementation subagents in parallel WITHOUT worktree isolation
25
+ - **NEVER** implement without reading task requirements first
26
+
27
+ ### Review Anti-Patterns
28
+ - **NEVER** use sonnet for reviews (always opus for deep analysis)
29
+ - **NEVER** aggregate before all 3 reviewers complete
30
+ - **NEVER** skip re-review after fixes
31
+
32
+ ### System Anti-Patterns
33
+ - **NEVER** delete .loki/state/ directory while running
34
+ - **NEVER** manually edit queue files without file locking
35
+ - **NEVER** skip checkpoints before major operations
36
+ - **NEVER** ignore circuit breaker states
37
+
38
+ ### Always Do These
39
+ - **ALWAYS** launch all 3 reviewers in single message (3 Task calls)
40
+ - **ALWAYS** specify model: "sonnet" for each reviewer
41
+ - **ALWAYS** wait for all reviewers before aggregating
42
+ - **ALWAYS** fix Critical/High/Medium immediately
43
+ - **ALWAYS** re-run ALL 3 reviewers after fixes
44
+ - **ALWAYS** checkpoint state before spawning subagents
45
+
46
+ ---
47
+
48
+ ## Multi-Tiered Fallback System
49
+
50
+ ### Model-Level Fallbacks
51
+ ```
52
+ Primary (opus) fails -> Try sonnet -> Try haiku -> Escalate
53
+ ```
54
+
55
+ ### Workflow-Level Fallbacks
56
+ ```
57
+ Complex approach fails -> Try simpler approach -> Try minimal approach -> Escalate
58
+ ```
59
+
60
+ ### Human Escalation Triggers
61
+ - Confidence score below 0.40
62
+ - 3+ consecutive failures on same task
63
+ - Security-critical decisions
64
+ - Irreversible operations without clear rollback
65
+
66
+ ---
67
+
68
+ ## Rate Limit Handling
69
+
70
+ ```yaml
71
+ rate_limit_handling:
72
+ detection:
73
+ - HTTP 429 responses
74
+ - "rate limit" in error message
75
+ - Exponential backoff triggers
76
+
77
+ strategy:
78
+ initial_delay: 5s
79
+ max_delay: 300s
80
+ backoff_multiplier: 2
81
+ max_retries: 5
82
+
83
+ circuit_breaker:
84
+ threshold: 3 failures in 60s
85
+ cooldown: 300s
86
+ state_file: ".loki/state/circuit-breakers.json"
87
+ ```
88
+
89
+ ---
90
+
91
+ ## Recovery Procedures
92
+
93
+ ### Context Loss Recovery
94
+ 1. Read `.loki/CONTINUITY.md`
95
+ 2. Check `.loki/state/orchestrator.json` for current phase
96
+ 3. Review `.loki/queue/in-progress.json` for interrupted tasks
97
+ 4. Resume from last checkpoint
98
+
99
+ ### Rate Limit Recovery
100
+ 1. Check circuit breaker state
101
+ 2. Wait for cooldown period
102
+ 3. Reduce parallel agent count
103
+ 4. Resume with exponential backoff
104
+
105
+ ### Test Failure Recovery
106
+ 1. Read test output carefully
107
+ 2. Check if test is flaky vs real failure
108
+ 3. Roll back to last passing commit if needed
109
+ 4. Fix and re-run full test suite