@boshu2/vibe-check 1.6.2 → 1.7.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 (107) hide show
  1. package/.agents/bundles/automatic-learning-cadence-plan-2025-12-02.md +1297 -0
  2. package/.agents/bundles/automatic-learning-cadence-research-2025-12-02.md +481 -0
  3. package/.agents/bundles/dashboard-data-quality-plan.md +458 -0
  4. package/.agents/bundles/rating-scoring-alignment-plan.md +427 -0
  5. package/.agents/bundles/rpi-session-capture-plan-2025-12-02.md +693 -0
  6. package/.agents/bundles/rpi-session-capture-research-2025-12-02.md +433 -0
  7. package/.agents/bundles/session-integration-plan-2025-12-02.md +144 -0
  8. package/CHANGELOG.md +17 -0
  9. package/CLAUDE.md +74 -2
  10. package/Makefile +173 -0
  11. package/README.md +33 -0
  12. package/claude-progress.json +34 -5
  13. package/claude-progress.txt +66 -0
  14. package/dashboard/app.js +699 -66
  15. package/dashboard/chart.min.js +20 -0
  16. package/dashboard/dashboard-data.js +764 -0
  17. package/dashboard/dashboard-data.json +182 -71
  18. package/dashboard/index.html +139 -14
  19. package/dashboard/styles.css +579 -4
  20. package/dist/cli.js +1 -1
  21. package/dist/cli.js.map +1 -1
  22. package/dist/commands/analyze.d.ts.map +1 -1
  23. package/dist/commands/analyze.js +38 -2
  24. package/dist/commands/analyze.js.map +1 -1
  25. package/dist/commands/dashboard.js +4 -1
  26. package/dist/commands/dashboard.js.map +1 -1
  27. package/dist/commands/index.d.ts +1 -1
  28. package/dist/commands/index.d.ts.map +1 -1
  29. package/dist/commands/index.js +3 -3
  30. package/dist/commands/index.js.map +1 -1
  31. package/dist/commands/learn.d.ts +3 -0
  32. package/dist/commands/learn.d.ts.map +1 -0
  33. package/dist/commands/learn.js +161 -0
  34. package/dist/commands/learn.js.map +1 -0
  35. package/dist/commands/lesson.d.ts +8 -0
  36. package/dist/commands/lesson.d.ts.map +1 -0
  37. package/dist/commands/lesson.js +206 -0
  38. package/dist/commands/lesson.js.map +1 -0
  39. package/dist/commands/profile.d.ts.map +1 -1
  40. package/dist/commands/profile.js +3 -202
  41. package/dist/commands/profile.js.map +1 -1
  42. package/dist/commands/session.d.ts +51 -0
  43. package/dist/commands/session.d.ts.map +1 -0
  44. package/dist/commands/session.js +561 -0
  45. package/dist/commands/session.js.map +1 -0
  46. package/dist/gamification/index.d.ts +1 -3
  47. package/dist/gamification/index.d.ts.map +1 -1
  48. package/dist/gamification/index.js +2 -5
  49. package/dist/gamification/index.js.map +1 -1
  50. package/dist/gamification/pattern-memory.d.ts +1 -1
  51. package/dist/gamification/pattern-memory.d.ts.map +1 -1
  52. package/dist/gamification/pattern-memory.js.map +1 -1
  53. package/dist/gamification/profile.d.ts +2 -2
  54. package/dist/gamification/profile.d.ts.map +1 -1
  55. package/dist/gamification/profile.js +2 -15
  56. package/dist/gamification/profile.js.map +1 -1
  57. package/dist/gamification/types.d.ts +8 -2
  58. package/dist/gamification/types.d.ts.map +1 -1
  59. package/dist/gamification/types.js.map +1 -1
  60. package/dist/insights/index.d.ts.map +1 -1
  61. package/dist/insights/index.js +16 -4
  62. package/dist/insights/index.js.map +1 -1
  63. package/dist/insights/types.d.ts +14 -0
  64. package/dist/insights/types.d.ts.map +1 -1
  65. package/dist/learning/cadence.d.ts +15 -0
  66. package/dist/learning/cadence.d.ts.map +1 -0
  67. package/dist/learning/cadence.js +130 -0
  68. package/dist/learning/cadence.js.map +1 -0
  69. package/dist/learning/index.d.ts +19 -0
  70. package/dist/learning/index.d.ts.map +1 -0
  71. package/dist/learning/index.js +35 -0
  72. package/dist/learning/index.js.map +1 -0
  73. package/dist/learning/lessons-storage.d.ts +48 -0
  74. package/dist/learning/lessons-storage.d.ts.map +1 -0
  75. package/dist/learning/lessons-storage.js +266 -0
  76. package/dist/learning/lessons-storage.js.map +1 -0
  77. package/dist/learning/lessons-types.d.ts +83 -0
  78. package/dist/learning/lessons-types.d.ts.map +1 -0
  79. package/dist/learning/lessons-types.js +15 -0
  80. package/dist/learning/lessons-types.js.map +1 -0
  81. package/dist/learning/nudges.d.ts +20 -0
  82. package/dist/learning/nudges.d.ts.map +1 -0
  83. package/dist/learning/nudges.js +68 -0
  84. package/dist/learning/nudges.js.map +1 -0
  85. package/dist/learning/retrospective.d.ts +27 -0
  86. package/dist/learning/retrospective.d.ts.map +1 -0
  87. package/dist/learning/retrospective.js +184 -0
  88. package/dist/learning/retrospective.js.map +1 -0
  89. package/dist/learning/storage.d.ts +44 -0
  90. package/dist/learning/storage.d.ts.map +1 -0
  91. package/dist/learning/storage.js +194 -0
  92. package/dist/learning/storage.js.map +1 -0
  93. package/dist/learning/surfacing.d.ts +36 -0
  94. package/dist/learning/surfacing.d.ts.map +1 -0
  95. package/dist/learning/surfacing.js +255 -0
  96. package/dist/learning/surfacing.js.map +1 -0
  97. package/dist/learning/synthesis.d.ts +17 -0
  98. package/dist/learning/synthesis.d.ts.map +1 -0
  99. package/dist/learning/synthesis.js +293 -0
  100. package/dist/learning/synthesis.js.map +1 -0
  101. package/dist/learning/types.d.ts +60 -0
  102. package/dist/learning/types.d.ts.map +1 -0
  103. package/dist/learning/types.js +17 -0
  104. package/dist/learning/types.js.map +1 -0
  105. package/docs/METRICS.md +528 -0
  106. package/feature-list.json +21 -0
  107. package/package.json +1 -1
@@ -0,0 +1,481 @@
1
+ # Automatic Learning & Retrospective Cadence Research
2
+
3
+ **Type:** Research
4
+ **Created:** 2025-12-02
5
+ **Loop:** Outer (architecture decision)
6
+ **Tags:** learning-loop, retrospective, cadence, spaced-repetition, behavioral-nudges
7
+
8
+ ---
9
+
10
+ ## Executive Summary
11
+
12
+ vibe-check currently has rich learning infrastructure (pattern memory, intervention tracking, insights) but relies entirely on **manual triggers**. The opportunity is to implement **automatic cadence-based learning** inspired by spaced repetition and behavioral nudge systems, transforming passive data collection into active system improvement.
13
+
14
+ **Key insight:** The data is already being collected. What's missing is the **trigger mechanism** to surface learnings and force the system to learn from accumulated patterns.
15
+
16
+ ---
17
+
18
+ ## Problem Statement
19
+
20
+ **Current state:**
21
+ - Pattern memory accumulates spiral data → requires manual review via `profile --stats`
22
+ - Intervention memory tracks what works → never surfaces recommendations automatically
23
+ - Insights generate on dashboard export → stale unless manually refreshed
24
+ - ML calibration (planned in ml-learning-loop bundle) → requires explicit `--calibrate` flag
25
+ - No periodic retrospective forcing function
26
+
27
+ **Gap:** The system learns passively but never **acts** on learnings without user intervention.
28
+
29
+ **Goal:** Implement automatic learning cadence that:
30
+ 1. Triggers learning at natural breakpoints (session boundaries, time-based)
31
+ 2. Surfaces insights proactively (nudges)
32
+ 3. Retrains models without explicit user action
33
+ 4. Forces periodic retrospectives to prevent staleness
34
+
35
+ ---
36
+
37
+ ## Current Learning Mechanisms Inventory
38
+
39
+ ### Data Collection (Passive - Working)
40
+
41
+ | Mechanism | Location | Data Collected | Current Trigger |
42
+ |-----------|----------|----------------|-----------------|
43
+ | **Pattern Memory** | `profile.patternMemory` | Spiral patterns, components, durations | `recordSession()` via analyze |
44
+ | **Intervention Memory** | `profile.interventionMemory` | What breaks spirals | `vibe-check intervene` (manual) |
45
+ | **Session History** | `profile.sessions` | 100 most recent sessions | `recordSession()` |
46
+ | **Timeline Store** | `.vibe-check/timeline.json` | Sessions, insights, trends | `vibe-check timeline` |
47
+ | **Commit Log** | `.vibe-check/commits.ndjson` | Append-only commit history | `vibe-check timeline` |
48
+ | **Calibration** | `.vibe-check/calibration.json` | Level prediction samples | `--calibrate N` flag |
49
+
50
+ ### Learning/Insight Generation (Partially Active)
51
+
52
+ | Mechanism | Location | What It Does | Current Trigger |
53
+ |-----------|----------|--------------|-----------------|
54
+ | **Insight Generators** | `src/insights/generators.ts` | 9 insight types | Dashboard data export |
55
+ | **Trend Calculation** | `timeline-store.ts` | Weekly/monthly trends | Timeline command |
56
+ | **Compounding Insights** | `timeline-store.ts` | Pattern-based insights | Timeline command |
57
+ | **Baseline Comparison** | `sessions/index.ts` | Compare to personal baseline | Analyze command |
58
+
59
+ ### Model Training (Planned - Not Implemented)
60
+
61
+ | Mechanism | Bundle | What It Does | Current State |
62
+ |-----------|--------|--------------|---------------|
63
+ | **partialFit** | ml-learning-loop | Incremental model updates | Not implemented |
64
+ | **retrain** | ml-learning-loop | Full model retraining | Not implemented |
65
+ | **ECE threshold** | ml-learning-loop | Trigger retraining | Not implemented |
66
+
67
+ ---
68
+
69
+ ## Natural Trigger Points (Already In Code)
70
+
71
+ ### 1. Session Boundary (analyze.ts:248-311)
72
+ **When:** Every `vibe-check` with `--score` or sufficient commits
73
+ **Current behavior:** Records session, updates profile, shows gamification
74
+ **Opportunity:** Perfect point for post-session micro-learning
75
+
76
+ ### 2. Streak Update (streaks.ts)
77
+ **When:** First session of the day
78
+ **Current behavior:** Increments streak, shows fire emoji
79
+ **Opportunity:** Daily check-in for retrospective prompt
80
+
81
+ ### 3. Timeline Analysis (timeline.ts)
82
+ **When:** `vibe-check timeline` command
83
+ **Current behavior:** Detects patterns, updates store
84
+ **Opportunity:** Already computes insights - just need to surface them
85
+
86
+ ### 4. Dashboard Export (dashboard.ts)
87
+ **When:** `vibe-check dashboard` command
88
+ **Current behavior:** Generates JSON data file
89
+ **Opportunity:** Trigger learning before export to ensure fresh data
90
+
91
+ ---
92
+
93
+ ## External Research: Cadence Patterns
94
+
95
+ ### Spaced Repetition (FSRS Algorithm)
96
+ - [FSRS](https://domenic.me/fsrs/) reduces reviews 20% while maintaining retention
97
+ - Key insight: **Test just before forgetting** = review when probability drops to 90%
98
+ - **Application:** Surface learnings when patterns start to decay (e.g., 7 days since last spiral)
99
+
100
+ ### Behavioral Nudges
101
+ - [AI behavioral nudging](https://aicompetence.org/ai-in-behavioral-nudging-apps-that-change-habits/) uses **micro nudges** that feel like intuition
102
+ - Adaptive reminders track patterns to time cues perfectly
103
+ - [Habit tracking apps](https://emizentech.com/blog/habit-tracking-app.html) use cue-routine-reward loop
104
+
105
+ ### Team Retrospective Tools
106
+ - [Sprint retrospectives](https://www.atlassian.com/agile/scrum/retrospectives) recommend 45 min per week of iteration
107
+ - [RetroCadence](https://www.scrumexpert.com/tools/retrocadence-the-best-retrospective-tool-for-agile-teams/) emphasizes regular cadence is key
108
+ - [CodeAnt AI](https://www.codeant.ai/blogs/developer-productivity-platform) sets weekly summaries by default
109
+
110
+ ### Key Cadence Patterns from Research
111
+
112
+ | Cadence | Purpose | Example |
113
+ |---------|---------|---------|
114
+ | **Per-session** | Immediate feedback | Post-analyze micro-learning |
115
+ | **Daily** | Streak maintenance | First-of-day nudge |
116
+ | **Weekly** | Pattern review | Sunday retrospective prompt |
117
+ | **N-sample** | Model improvement | Retrain every 10 calibration samples |
118
+ | **Threshold** | Quality maintenance | Retrain when ECE > 0.15 |
119
+
120
+ ---
121
+
122
+ ## Proposed Architecture: Learning Cadence System
123
+
124
+ ### Core Components
125
+
126
+ ```
127
+ ┌─────────────────────────────────────────────────────────────┐
128
+ │ AUTOMATIC LEARNING SYSTEM │
129
+ ├─────────────────────────────────────────────────────────────┤
130
+ │ │
131
+ │ ┌──────────────────────────────────────────────────────┐ │
132
+ │ │ CADENCE SCHEDULER │ │
133
+ │ │ │ │
134
+ │ │ Time-based triggers: │ │
135
+ │ │ • Daily (first session) │ │
136
+ │ │ • Weekly (7 days since last retro) │ │
137
+ │ │ • Monthly (trend analysis) │ │
138
+ │ │ │ │
139
+ │ │ Event-based triggers: │ │
140
+ │ │ • Post-session (every analyze --score) │ │
141
+ │ │ • Threshold (ECE > 0.15, samples >= 10) │ │
142
+ │ │ • Pattern (same spiral pattern 3x) │ │
143
+ │ │ │ │
144
+ │ └──────────────────────────────────────────────────────┘ │
145
+ │ │ │
146
+ │ ▼ │
147
+ │ ┌──────────────────────────────────────────────────────┐ │
148
+ │ │ LEARNING EXECUTOR │ │
149
+ │ │ │ │
150
+ │ │ Actions: │ │
151
+ │ │ • updatePatternAggregates() │ │
152
+ │ │ • retrainModel() if threshold met │ │
153
+ │ │ • generateInsights() │ │
154
+ │ │ • surfaceNudge() if actionable │ │
155
+ │ │ • promptRetrospective() if due │ │
156
+ │ │ │ │
157
+ │ └──────────────────────────────────────────────────────┘ │
158
+ │ │ │
159
+ │ ▼ │
160
+ │ ┌──────────────────────────────────────────────────────┐ │
161
+ │ │ NUDGE SYSTEM │ │
162
+ │ │ │ │
163
+ │ │ Output channels: │ │
164
+ │ │ • CLI hint after analyze │ │
165
+ │ │ • Dashboard notification │ │
166
+ │ │ • Profile summary section │ │
167
+ │ │ │ │
168
+ │ │ Nudge types: │ │
169
+ │ │ • Pattern warning (e.g., "SSL issues 3x this week")│ │
170
+ │ │ • Intervention suggestion (e.g., "Try tracer test")│ │
171
+ │ │ • Retrospective due (e.g., "Weekly review time") │ │
172
+ │ │ • Achievement close (e.g., "2 more for streak 7") │ │
173
+ │ │ │ │
174
+ │ └──────────────────────────────────────────────────────┘ │
175
+ │ │
176
+ └─────────────────────────────────────────────────────────────┘
177
+ ```
178
+
179
+ ### Storage: Learning State
180
+
181
+ **New file:** `~/.vibe-check/learning-state.json`
182
+
183
+ ```typescript
184
+ interface LearningState {
185
+ version: string;
186
+
187
+ // Cadence tracking
188
+ lastDailyCheck: string; // ISO date
189
+ lastWeeklyRetro: string; // ISO date
190
+ lastMonthlyReview: string; // ISO date
191
+ lastModelRetrain: string; // ISO datetime
192
+
193
+ // Threshold tracking
194
+ calibrationSamplesSinceRetrain: number;
195
+ currentECE: number;
196
+
197
+ // Nudge queue (FIFO, max 5)
198
+ pendingNudges: Nudge[];
199
+
200
+ // Retrospective state
201
+ retroDue: boolean;
202
+ retroDueReason: string;
203
+ lastRetroSummary?: RetroSummary;
204
+ }
205
+
206
+ interface Nudge {
207
+ id: string;
208
+ type: 'pattern' | 'intervention' | 'retro' | 'achievement' | 'learning';
209
+ message: string;
210
+ action?: string;
211
+ priority: number;
212
+ createdAt: string;
213
+ expiresAt?: string;
214
+ dismissed?: boolean;
215
+ }
216
+
217
+ interface RetroSummary {
218
+ date: string;
219
+ topPattern: string;
220
+ topIntervention: string;
221
+ keyInsight: string;
222
+ actionTaken?: string;
223
+ }
224
+ ```
225
+
226
+ ---
227
+
228
+ ## Implementation Approaches
229
+
230
+ ### Approach A: Hook into `recordSession()` (Recommended)
231
+
232
+ **Where:** `src/gamification/profile.ts:148-269`
233
+
234
+ **Advantages:**
235
+ - Single integration point - already called by `analyze --score`
236
+ - Has access to all relevant data (fix chains, metrics, session record)
237
+ - Already performs learning (pattern memory, XP, achievements)
238
+ - Natural post-session moment for nudges
239
+
240
+ **Implementation:**
241
+ ```typescript
242
+ // At end of recordSession(), add:
243
+ const learningResult = runLearningCadence(profile, sessionRecord, fixChains);
244
+ if (learningResult.nudge) {
245
+ // Store nudge for display
246
+ }
247
+ if (learningResult.shouldRetrain) {
248
+ // Trigger model retraining
249
+ }
250
+ if (learningResult.retroDue) {
251
+ // Mark retrospective as due
252
+ }
253
+ ```
254
+
255
+ **Risk:** Adds latency to every analyze command
256
+ **Mitigation:** Keep learning checks lightweight, defer heavy operations
257
+
258
+ ### Approach B: Separate `learn` Command
259
+
260
+ **Where:** New `src/commands/learn.ts`
261
+
262
+ **Advantages:**
263
+ - Explicit user control
264
+ - Can be run independently
265
+ - No latency impact on analyze
266
+
267
+ **Disadvantages:**
268
+ - Still manual trigger
269
+ - Won't be run unless reminded
270
+
271
+ **Implementation:**
272
+ ```bash
273
+ vibe-check learn # Run all learning operations
274
+ vibe-check learn --retro # Force retrospective
275
+ vibe-check learn --retrain # Force model retraining
276
+ ```
277
+
278
+ ### Approach C: Background Learning (Advanced)
279
+
280
+ **Where:** Filesystem watcher or git hook
281
+
282
+ **Advantages:**
283
+ - Truly automatic
284
+ - No CLI latency impact
285
+
286
+ **Disadvantages:**
287
+ - Complex implementation
288
+ - Platform-dependent (macOS launchd, cron, etc.)
289
+ - May feel intrusive
290
+
291
+ **Not recommended for v1.**
292
+
293
+ ---
294
+
295
+ ## Recommended Approach: Hybrid A+B
296
+
297
+ 1. **Automatic triggers in `recordSession()`** for lightweight operations:
298
+ - Check if daily nudge due → queue nudge
299
+ - Check if weekly retro due → queue retro prompt
300
+ - Check if pattern threshold met → queue warning
301
+ - Check if model retrain needed → trigger retrain (async)
302
+
303
+ 2. **Explicit `learn` command** for heavy operations:
304
+ - Force retrospective with summary
305
+ - Force model retraining
306
+ - Export learnings to bundle
307
+ - Generate learning report
308
+
309
+ 3. **Nudge display in CLI output** (analyze.ts):
310
+ - After gamification section, show pending nudges
311
+ - "💡 TIP: Your top spiral trigger is SSL_TLS - consider adding cert checks"
312
+ - "📅 Weekly retro due - run `vibe-check learn --retro`"
313
+
314
+ ---
315
+
316
+ ## Cadence Rules (Default Configuration)
317
+
318
+ | Trigger | Condition | Action |
319
+ |---------|-----------|--------|
320
+ | **Post-session** | Every `analyze --score` | Queue pattern warnings, achievement hints |
321
+ | **Daily** | First session of day | Show streak status, yesterday's summary |
322
+ | **Weekly** | 7+ days since last retro | Queue retro prompt, show top patterns |
323
+ | **Threshold: ECE** | ECE > 0.15 | Queue retrain prompt |
324
+ | **Threshold: Samples** | 10+ samples since retrain | Auto-retrain model |
325
+ | **Pattern: Repeat** | Same spiral pattern 3x in 7 days | Queue intervention suggestion |
326
+ | **Achievement: Close** | <20% XP to level or achievement | Queue motivation nudge |
327
+
328
+ ---
329
+
330
+ ## New Files to Create
331
+
332
+ ### 1. `src/learning/cadence.ts`
333
+ Core cadence scheduler and learning executor
334
+
335
+ ### 2. `src/learning/nudges.ts`
336
+ Nudge generation, queuing, and display
337
+
338
+ ### 3. `src/learning/retrospective.ts`
339
+ Weekly/monthly retrospective logic
340
+
341
+ ### 4. `src/learning/types.ts`
342
+ LearningState, Nudge, RetroSummary types
343
+
344
+ ### 5. `src/commands/learn.ts`
345
+ Explicit learn command
346
+
347
+ ---
348
+
349
+ ## Files to Modify
350
+
351
+ ### 1. `src/gamification/profile.ts`
352
+ - Add learning cadence check at end of `recordSession()`
353
+ - Import and call `runLearningCadence()`
354
+
355
+ ### 2. `src/commands/analyze.ts`
356
+ - Display pending nudges after gamification section
357
+ - Mark nudges as seen
358
+
359
+ ### 3. `src/cli.ts`
360
+ - Add `learn` command
361
+
362
+ ### 4. `src/commands/index.ts`
363
+ - Export `createLearnCommand`
364
+
365
+ ---
366
+
367
+ ## Example User Experience
368
+
369
+ ### Session with Pending Nudge
370
+
371
+ ```
372
+ $ vibe-check --score --since "4 hours ago"
373
+
374
+ ═══════════════════════════════════════════════════════════════════
375
+ VIBE-CHECK ANALYSIS
376
+ ═══════════════════════════════════════════════════════════════════
377
+
378
+ Period: 4 hours ago to now
379
+ Commits: 23
380
+ ...
381
+
382
+ ──────────────────────────────────────────────────────────────────
383
+ 🔥🔥 2-day streak
384
+ 🏔️ Level 6 Grandmaster (380/3000 XP) +85 XP
385
+ ──────────────────────────────────────────────────────────────────
386
+
387
+ 💡 LEARNING INSIGHT:
388
+ SSL/TLS issues caused 3 spirals this week (45 min total)
389
+ Your top intervention for this pattern: Read Docs 📚
390
+ Run `vibe-check learn --pattern SSL_TLS` for details
391
+
392
+ 📅 Weekly retro due in 2 days
393
+ Run `vibe-check learn --retro` to review your week
394
+
395
+ ```
396
+
397
+ ### Weekly Retrospective
398
+
399
+ ```
400
+ $ vibe-check learn --retro
401
+
402
+ ═══════════════════════════════════════════════════════════════════
403
+ WEEKLY RETROSPECTIVE
404
+ Nov 25 - Dec 2, 2025
405
+ ═══════════════════════════════════════════════════════════════════
406
+
407
+ SESSIONS: 12 sessions | 156 commits | 4.2h active time
408
+
409
+ TOP PATTERNS THIS WEEK:
410
+ 1. SSL_TLS (3 spirals, 45 min) - Consider cert validation
411
+ 2. API_MISMATCH (2 spirals, 28 min) - Schema validation helps
412
+
413
+ WHAT WORKED:
414
+ • Read Docs broke 60% of your spirals
415
+ • Peak productivity: 11am-1pm
416
+ • Tuesday was your best day
417
+
418
+ PROGRESS:
419
+ • Trust Pass Rate: 87% → 91% (+4%)
420
+ • Spiral Rate: 0.5 → 0.3 (-40%) 🎯
421
+
422
+ SUGGESTED ACTION:
423
+ Add SSL certificate validation to your CI pipeline
424
+
425
+ Save this retrospective? [Y/n] _
426
+ ```
427
+
428
+ ---
429
+
430
+ ## Success Metrics
431
+
432
+ | Metric | Current | Target | How to Measure |
433
+ |--------|---------|--------|----------------|
434
+ | **Learning staleness** | No limit | <7 days | Days since last insight refresh |
435
+ | **Pattern recurrence** | Unknown | -50% | Same pattern 3+ times in 7 days |
436
+ | **Model accuracy** | ~60% | >80% | ECE after 30 samples |
437
+ | **User engagement** | Manual only | 80% see nudges | Nudges displayed / sessions |
438
+ | **Retro completion** | 0% | 50%+ | Retros completed / retros due |
439
+
440
+ ---
441
+
442
+ ## Open Questions
443
+
444
+ 1. **Nudge persistence:** Should nudges persist across sessions or be ephemeral?
445
+ - Recommendation: Persist with 7-day TTL
446
+
447
+ 2. **Retro enforcement:** Force retro or just prompt?
448
+ - Recommendation: Prompt only (non-blocking)
449
+
450
+ 3. **Model retraining:** Sync or async?
451
+ - Recommendation: Async with progress indicator
452
+
453
+ 4. **Learning state location:** Global or per-repo?
454
+ - Recommendation: Global (cross-repo patterns are valuable)
455
+
456
+ ---
457
+
458
+ ## Dependencies
459
+
460
+ - **ml-learning-loop-complete-plan**: Required for model retraining
461
+ - **dashboard-data-quality-plan**: Ensures insights are meaningful
462
+ - **Current profile.ts**: Integration point
463
+
464
+ ---
465
+
466
+ ## Next Steps
467
+
468
+ 1. **Approve this research** or request clarification
469
+ 2. **Run `/plan`** to create implementation spec
470
+ 3. **Prioritize:** Start with post-session nudges (lowest risk, highest value)
471
+
472
+ ---
473
+
474
+ ## Sources
475
+
476
+ - [FSRS Algorithm - Spaced Repetition](https://domenic.me/fsrs/)
477
+ - [AI Behavioral Nudging](https://aicompetence.org/ai-in-behavioral-nudging-apps-that-change-habits/)
478
+ - [Habit Tracking App Guide](https://emizentech.com/blog/habit-tracking-app.html)
479
+ - [Agile Retrospectives - Atlassian](https://www.atlassian.com/agile/scrum/retrospectives)
480
+ - [RetroCadence Tool](https://www.scrumexpert.com/tools/retrocadence-the-best-retrospective-tool-for-agile-teams/)
481
+ - [CodeAnt Developer Productivity](https://www.codeant.ai/blogs/developer-productivity-platform)