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,550 @@
1
+ # Business Operations Reference
2
+
3
+ Workflows and procedures for business swarm agents.
4
+
5
+ ## Marketing Operations
6
+
7
+ ### Landing Page Checklist
8
+ ```
9
+ [ ] Hero section with clear value proposition
10
+ [ ] Problem/solution narrative
11
+ [ ] Feature highlights (3-5 key features)
12
+ [ ] Social proof (testimonials, logos, stats)
13
+ [ ] Pricing section (if applicable)
14
+ [ ] FAQ section
15
+ [ ] Call-to-action (primary and secondary)
16
+ [ ] Footer with legal links
17
+ ```
18
+
19
+ ### SEO Optimization
20
+ ```yaml
21
+ Technical SEO:
22
+ - meta title: 50-60 characters, include primary keyword
23
+ - meta description: 150-160 characters, compelling
24
+ - canonical URL set
25
+ - robots.txt configured
26
+ - sitemap.xml generated
27
+ - structured data (JSON-LD)
28
+ - Open Graph tags
29
+ - Twitter Card tags
30
+
31
+ Performance:
32
+ - Largest Contentful Paint < 2.5s
33
+ - First Input Delay < 100ms
34
+ - Cumulative Layout Shift < 0.1
35
+ - Images optimized (WebP, lazy loading)
36
+
37
+ Content:
38
+ - H1 contains primary keyword
39
+ - H2-H6 hierarchy logical
40
+ - Internal linking strategy
41
+ - Alt text on all images
42
+ - Content length appropriate for intent
43
+ ```
44
+
45
+ ### Content Calendar Template
46
+ ```markdown
47
+ # Week of [DATE]
48
+
49
+ ## Monday
50
+ - [ ] Blog post: [TITLE]
51
+ - [ ] Social: LinkedIn announcement
52
+
53
+ ## Wednesday
54
+ - [ ] Email newsletter
55
+ - [ ] Social: Twitter thread
56
+
57
+ ## Friday
58
+ - [ ] Case study update
59
+ - [ ] Social: Feature highlight
60
+ ```
61
+
62
+ ### Email Sequences
63
+
64
+ **Onboarding Sequence:**
65
+ ```
66
+ Day 0: Welcome email (immediate)
67
+ - Thank you for signing up
68
+ - Quick start guide link
69
+ - Support contact
70
+
71
+ Day 1: Getting started
72
+ - First feature tutorial
73
+ - Video walkthrough
74
+
75
+ Day 3: Value demonstration
76
+ - Success metrics
77
+ - Customer story
78
+
79
+ Day 7: Check-in
80
+ - How's it going?
81
+ - Feature discovery
82
+
83
+ Day 14: Advanced features
84
+ - Power user tips
85
+ - Integration options
86
+ ```
87
+
88
+ **Abandoned Cart/Trial:**
89
+ ```
90
+ Hour 1: Reminder
91
+ Day 1: Benefits recap
92
+ Day 3: Testimonial + urgency
93
+ Day 7: Final offer
94
+ ```
95
+
96
+ ---
97
+
98
+ ## Sales Operations
99
+
100
+ ### CRM Pipeline Stages
101
+ ```
102
+ 1. Lead (new contact)
103
+ 2. Qualified (fits ICP, has need)
104
+ 3. Meeting Scheduled
105
+ 4. Demo Completed
106
+ 5. Proposal Sent
107
+ 6. Negotiation
108
+ 7. Closed Won / Closed Lost
109
+ ```
110
+
111
+ ### Qualification Framework (BANT)
112
+ ```yaml
113
+ Budget:
114
+ - What's the allocated budget?
115
+ - Who controls the budget?
116
+
117
+ Authority:
118
+ - Who makes the final decision?
119
+ - Who else is involved?
120
+
121
+ Need:
122
+ - What problem are you solving?
123
+ - What's the impact of not solving it?
124
+
125
+ Timeline:
126
+ - When do you need a solution?
127
+ - What's driving that timeline?
128
+ ```
129
+
130
+ ### Outreach Template
131
+ ```markdown
132
+ Subject: [Specific pain point] at [Company]
133
+
134
+ Hi [Name],
135
+
136
+ I noticed [Company] is [specific observation about their business].
137
+
138
+ Many [similar role/company type] struggle with [problem], which leads to [negative outcome].
139
+
140
+ [Product] helps by [specific solution], resulting in [specific benefit with metric].
141
+
142
+ Would you be open to a 15-minute call to see if this could help [Company]?
143
+
144
+ Best,
145
+ [Name]
146
+ ```
147
+
148
+ ### Demo Script Structure
149
+ ```
150
+ 1. Rapport (2 min)
151
+ - Confirm attendees and roles
152
+ - Agenda overview
153
+
154
+ 2. Discovery (5 min)
155
+ - Confirm pain points
156
+ - Understand current process
157
+ - Success metrics
158
+
159
+ 3. Solution (15 min)
160
+ - Map features to their needs
161
+ - Show don't tell
162
+ - Address specific use cases
163
+
164
+ 4. Social Proof (3 min)
165
+ - Relevant customer stories
166
+ - Metrics and outcomes
167
+
168
+ 5. Pricing/Next Steps (5 min)
169
+ - Present options
170
+ - Answer objections
171
+ - Define next steps
172
+ ```
173
+
174
+ ---
175
+
176
+ ## Finance Operations
177
+
178
+ ### Billing Setup Checklist (Stripe)
179
+ ```bash
180
+ # Initialize Stripe
181
+ npm install stripe
182
+
183
+ # Required configurations:
184
+ - [ ] Products and prices created
185
+ - [ ] Customer portal enabled
186
+ - [ ] Webhook endpoints configured
187
+ - [ ] Tax settings (Stripe Tax or manual)
188
+ - [ ] Invoice settings customized
189
+ - [ ] Payment methods enabled
190
+ - [ ] Fraud protection rules
191
+ ```
192
+
193
+ ### Webhook Events to Handle
194
+ ```javascript
195
+ const relevantEvents = [
196
+ 'customer.subscription.created',
197
+ 'customer.subscription.updated',
198
+ 'customer.subscription.deleted',
199
+ 'invoice.paid',
200
+ 'invoice.payment_failed',
201
+ 'payment_intent.succeeded',
202
+ 'payment_intent.payment_failed',
203
+ 'customer.updated',
204
+ 'charge.refunded'
205
+ ];
206
+ ```
207
+
208
+ ### Key Metrics Dashboard
209
+ ```yaml
210
+ Revenue Metrics:
211
+ - MRR (Monthly Recurring Revenue)
212
+ - ARR (Annual Recurring Revenue)
213
+ - Net Revenue Retention
214
+ - Expansion Revenue
215
+ - Churn Rate
216
+
217
+ Customer Metrics:
218
+ - CAC (Customer Acquisition Cost)
219
+ - LTV (Lifetime Value)
220
+ - LTV:CAC Ratio (target: 3:1)
221
+ - Payback Period
222
+
223
+ Product Metrics:
224
+ - Trial to Paid Conversion
225
+ - Activation Rate
226
+ - Feature Adoption
227
+ - NPS Score
228
+ ```
229
+
230
+ ### Runway Calculation
231
+ ```
232
+ Monthly Burn = Total Monthly Expenses - Monthly Revenue
233
+ Runway (months) = Cash Balance / Monthly Burn
234
+
235
+ Healthy: > 18 months
236
+ Warning: 6-12 months
237
+ Critical: < 6 months
238
+ ```
239
+
240
+ ---
241
+
242
+ ## Legal Operations
243
+
244
+ ### Terms of Service Template Sections
245
+ ```
246
+ 1. Acceptance of Terms
247
+ 2. Description of Service
248
+ 3. User Accounts and Registration
249
+ 4. User Conduct and Content
250
+ 5. Intellectual Property Rights
251
+ 6. Payment Terms (if applicable)
252
+ 7. Termination
253
+ 8. Disclaimers and Limitations
254
+ 9. Indemnification
255
+ 10. Dispute Resolution
256
+ 11. Changes to Terms
257
+ 12. Contact Information
258
+ ```
259
+
260
+ ### Privacy Policy Requirements (GDPR)
261
+ ```
262
+ Required Disclosures:
263
+ - [ ] Data controller identity
264
+ - [ ] Types of data collected
265
+ - [ ] Purpose of processing
266
+ - [ ] Legal basis for processing
267
+ - [ ] Data retention periods
268
+ - [ ] Third-party sharing
269
+ - [ ] User rights (access, rectification, deletion)
270
+ - [ ] Cookie usage
271
+ - [ ] International transfers
272
+ - [ ] Contact information
273
+ - [ ] DPO contact (if applicable)
274
+ ```
275
+
276
+ ### GDPR Compliance Checklist
277
+ ```
278
+ Data Collection:
279
+ - [ ] Consent mechanism implemented
280
+ - [ ] Purpose limitation documented
281
+ - [ ] Data minimization practiced
282
+
283
+ User Rights:
284
+ - [ ] Right to access (data export)
285
+ - [ ] Right to rectification (edit profile)
286
+ - [ ] Right to erasure (delete account)
287
+ - [ ] Right to portability (download data)
288
+ - [ ] Right to object (marketing opt-out)
289
+
290
+ Technical:
291
+ - [ ] Encryption at rest
292
+ - [ ] Encryption in transit
293
+ - [ ] Access logging
294
+ - [ ] Breach notification process
295
+ ```
296
+
297
+ ### Cookie Consent Implementation
298
+ ```javascript
299
+ // Cookie categories
300
+ const cookieCategories = {
301
+ necessary: true, // Always enabled
302
+ functional: false, // User preference
303
+ analytics: false, // Tracking/analytics
304
+ marketing: false // Advertising
305
+ };
306
+
307
+ // Required: Show banner before non-necessary cookies
308
+ // Required: Allow granular control
309
+ // Required: Easy withdrawal of consent
310
+ // Required: Record consent timestamp
311
+ ```
312
+
313
+ ---
314
+
315
+ ## Customer Support Operations
316
+
317
+ ### Ticket Priority Matrix
318
+ | Priority | Description | Response SLA | Resolution SLA |
319
+ |----------|-------------|--------------|----------------|
320
+ | P1 - Critical | Service down, data loss | 15 min | 4 hours |
321
+ | P2 - High | Major feature broken | 1 hour | 8 hours |
322
+ | P3 - Medium | Feature impaired | 4 hours | 24 hours |
323
+ | P4 - Low | General questions | 24 hours | 72 hours |
324
+
325
+ ### Response Templates
326
+
327
+ **Acknowledgment:**
328
+ ```
329
+ Hi [Name],
330
+
331
+ Thanks for reaching out! I've received your message about [issue summary].
332
+
333
+ I'm looking into this now and will get back to you within [SLA time].
334
+
335
+ In the meantime, [helpful resource or workaround if applicable].
336
+
337
+ Best,
338
+ [Agent Name]
339
+ ```
340
+
341
+ **Resolution:**
342
+ ```
343
+ Hi [Name],
344
+
345
+ Great news - I've resolved the issue with [specific problem].
346
+
347
+ Here's what was happening: [brief explanation]
348
+
349
+ Here's what I did to fix it: [solution summary]
350
+
351
+ To prevent this in the future: [if applicable]
352
+
353
+ Please let me know if you have any questions!
354
+
355
+ Best,
356
+ [Agent Name]
357
+ ```
358
+
359
+ ### Knowledge Base Structure
360
+ ```
361
+ /help
362
+ ├── /getting-started
363
+ │ ├── quick-start-guide
364
+ │ ├── account-setup
365
+ │ └── first-steps
366
+ ├── /features
367
+ │ ├── feature-a
368
+ │ ├── feature-b
369
+ │ └── feature-c
370
+ ├── /billing
371
+ │ ├── plans-and-pricing
372
+ │ ├── payment-methods
373
+ │ └── invoices
374
+ ├── /integrations
375
+ │ ├── integration-a
376
+ │ └── integration-b
377
+ ├── /troubleshooting
378
+ │ ├── common-issues
379
+ │ └── error-messages
380
+ └── /api
381
+ ├── authentication
382
+ ├── endpoints
383
+ └── examples
384
+ ```
385
+
386
+ ---
387
+
388
+ ## Analytics Operations
389
+
390
+ ### Event Tracking Plan
391
+ ```yaml
392
+ User Lifecycle:
393
+ - user_signed_up:
394
+ properties: [source, referrer, plan]
395
+ - user_activated:
396
+ properties: [activation_method, time_to_activate]
397
+ - user_converted:
398
+ properties: [plan, trial_length, conversion_path]
399
+ - user_churned:
400
+ properties: [reason, lifetime_value, last_active]
401
+
402
+ Core Actions:
403
+ - feature_used:
404
+ properties: [feature_name, context]
405
+ - action_completed:
406
+ properties: [action_type, duration, success]
407
+ - error_encountered:
408
+ properties: [error_type, page, context]
409
+
410
+ Engagement:
411
+ - page_viewed:
412
+ properties: [page_name, referrer, duration]
413
+ - button_clicked:
414
+ properties: [button_name, page, context]
415
+ - search_performed:
416
+ properties: [query, results_count]
417
+ ```
418
+
419
+ ### A/B Testing Framework
420
+ ```yaml
421
+ Test Structure:
422
+ name: "Homepage CTA Test"
423
+ hypothesis: "Changing CTA from 'Sign Up' to 'Start Free' will increase conversions"
424
+ primary_metric: signup_rate
425
+ secondary_metrics: [time_on_page, bounce_rate]
426
+
427
+ variants:
428
+ control:
429
+ description: "Original 'Sign Up' button"
430
+ allocation: 50%
431
+ variant_a:
432
+ description: "'Start Free' button"
433
+ allocation: 50%
434
+
435
+ sample_size: 1000_per_variant
436
+ duration: 14_days
437
+ significance_level: 0.95
438
+
439
+ Analysis:
440
+ - Calculate conversion rate per variant
441
+ - Run chi-squared test for significance
442
+ - Check for novelty effects
443
+ - Segment by user type if needed
444
+ - Document learnings
445
+ ```
446
+
447
+ ### Funnel Analysis
448
+ ```
449
+ Signup Funnel:
450
+ 1. Landing Page Visit → 100% (baseline)
451
+ 2. Signup Page View → 40% (60% drop-off)
452
+ 3. Form Submitted → 25% (15% drop-off)
453
+ 4. Email Verified → 20% (5% drop-off)
454
+ 5. Onboarding Complete → 12% (8% drop-off)
455
+ 6. First Value Action → 8% (4% drop-off)
456
+
457
+ Optimization Targets:
458
+ - Biggest drop: Landing → Signup (improve CTA, value prop)
459
+ - Second biggest: Signup → Submit (simplify form)
460
+ ```
461
+
462
+ ### Weekly Metrics Report Template
463
+ ```markdown
464
+ # Weekly Metrics Report: [Date Range]
465
+
466
+ ## Key Metrics Summary
467
+ | Metric | This Week | Last Week | Change |
468
+ |--------|-----------|-----------|--------|
469
+ | New Users | X | Y | +Z% |
470
+ | Activated Users | X | Y | +Z% |
471
+ | Revenue | $X | $Y | +Z% |
472
+ | Churn | X% | Y% | -Z% |
473
+
474
+ ## Highlights
475
+ - [Positive trend 1]
476
+ - [Positive trend 2]
477
+
478
+ ## Concerns
479
+ - [Issue 1 and action plan]
480
+ - [Issue 2 and action plan]
481
+
482
+ ## Experiments Running
483
+ - [Test name]: [current results]
484
+
485
+ ## Next Week Focus
486
+ - [Priority 1]
487
+ - [Priority 2]
488
+ ```
489
+
490
+ ---
491
+
492
+ ## Cross-Functional Workflows
493
+
494
+ ### Feature Launch Checklist
495
+ ```
496
+ Pre-Launch:
497
+ [ ] Feature complete and tested
498
+ [ ] Documentation updated
499
+ [ ] Help articles written
500
+ [ ] Email announcement drafted
501
+ [ ] Social content prepared
502
+ [ ] Sales team briefed
503
+ [ ] Support team trained
504
+ [ ] Analytics events added
505
+ [ ] Feature flag ready
506
+
507
+ Launch:
508
+ [ ] Deploy to production
509
+ [ ] Enable feature flag (% rollout)
510
+ [ ] Send email announcement
511
+ [ ] Publish blog post
512
+ [ ] Post on social media
513
+ [ ] Update changelog
514
+
515
+ Post-Launch:
516
+ [ ] Monitor error rates
517
+ [ ] Track feature adoption
518
+ [ ] Collect user feedback
519
+ [ ] Iterate based on data
520
+ ```
521
+
522
+ ### Incident Communication Template
523
+ ```markdown
524
+ # [Incident Type] - [Brief Description]
525
+
526
+ ## Status: [Investigating | Identified | Monitoring | Resolved]
527
+
528
+ ## Timeline
529
+ - [HH:MM] Issue reported
530
+ - [HH:MM] Team engaged
531
+ - [HH:MM] Root cause identified
532
+ - [HH:MM] Fix deployed
533
+ - [HH:MM] Monitoring
534
+
535
+ ## Impact
536
+ - Affected: [% of users, specific features]
537
+ - Duration: [X hours/minutes]
538
+
539
+ ## Root Cause
540
+ [Brief explanation]
541
+
542
+ ## Resolution
543
+ [What was done to fix]
544
+
545
+ ## Prevention
546
+ [What changes will prevent recurrence]
547
+
548
+ ## Next Update
549
+ [Time of next update or "Resolved"]
550
+ ```