@boshu2/vibe-check 1.5.0 → 1.6.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 (147) hide show
  1. package/.agents/bundles/insight-mining-dashboard-research-2025-11-30.md +400 -0
  2. package/.agents/bundles/storage-enhancement-research-2025-11-30.md +292 -0
  3. package/.agents/bundles/timeline-feature-research-complete-2025-11-30.md +301 -0
  4. package/.agents/plans/insight-dashboard-plan-2025-11-30.md +1130 -0
  5. package/.agents/plans/json-storage-enhancement-plan.md +717 -0
  6. package/.agents/plans/storage-hardening-and-cache-plan.md +592 -0
  7. package/.agents/plans/test-coverage-gaps-plan.md +1117 -0
  8. package/.agents/plans/timeline-feature-plan.md +193 -0
  9. package/.agents/plans/vibe_timeline_research_findings.md +553 -0
  10. package/.claude/settings.local.json +1 -0
  11. package/.vibe-check/.gitignore +6 -0
  12. package/CHANGELOG.md +46 -0
  13. package/CLAUDE.md +24 -0
  14. package/CONTRIBUTING.md +227 -0
  15. package/README.md +200 -143
  16. package/claude-progress.json +191 -9
  17. package/claude-progress.txt +257 -0
  18. package/dashboard/app.js +75 -2
  19. package/dashboard/dashboard-data.json +653 -0
  20. package/dashboard/index.html +13 -0
  21. package/dashboard/styles.css +61 -0
  22. package/dist/analysis/cross-session-analysis.d.ts +68 -0
  23. package/dist/analysis/cross-session-analysis.d.ts.map +1 -0
  24. package/dist/analysis/cross-session-analysis.js +174 -0
  25. package/dist/analysis/cross-session-analysis.js.map +1 -0
  26. package/dist/analysis/index.d.ts +2 -0
  27. package/dist/analysis/index.d.ts.map +1 -0
  28. package/dist/analysis/index.js +12 -0
  29. package/dist/analysis/index.js.map +1 -0
  30. package/dist/cli.js +10 -1
  31. package/dist/cli.js.map +1 -1
  32. package/dist/commands/analyze.d.ts +2 -0
  33. package/dist/commands/analyze.d.ts.map +1 -1
  34. package/dist/commands/analyze.js +105 -2
  35. package/dist/commands/analyze.js.map +1 -1
  36. package/dist/commands/cache.d.ts +6 -0
  37. package/dist/commands/cache.d.ts.map +1 -0
  38. package/dist/commands/cache.js +168 -0
  39. package/dist/commands/cache.js.map +1 -0
  40. package/dist/commands/dashboard.d.ts +8 -0
  41. package/dist/commands/dashboard.d.ts.map +1 -0
  42. package/dist/commands/dashboard.js +109 -0
  43. package/dist/commands/dashboard.js.map +1 -0
  44. package/dist/commands/index.d.ts +3 -0
  45. package/dist/commands/index.d.ts.map +1 -1
  46. package/dist/commands/index.js +8 -1
  47. package/dist/commands/index.js.map +1 -1
  48. package/dist/commands/timeline.d.ts +14 -0
  49. package/dist/commands/timeline.d.ts.map +1 -0
  50. package/dist/commands/timeline.js +462 -0
  51. package/dist/commands/timeline.js.map +1 -0
  52. package/dist/git.d.ts +24 -0
  53. package/dist/git.d.ts.map +1 -1
  54. package/dist/git.js +94 -0
  55. package/dist/git.js.map +1 -1
  56. package/dist/insights/generators.d.ts +44 -0
  57. package/dist/insights/generators.d.ts.map +1 -0
  58. package/dist/insights/generators.js +289 -0
  59. package/dist/insights/generators.js.map +1 -0
  60. package/dist/insights/index.d.ts +16 -0
  61. package/dist/insights/index.d.ts.map +1 -0
  62. package/dist/insights/index.js +171 -0
  63. package/dist/insights/index.js.map +1 -0
  64. package/dist/insights/types.d.ts +93 -0
  65. package/dist/insights/types.d.ts.map +1 -0
  66. package/dist/insights/types.js +6 -0
  67. package/dist/insights/types.js.map +1 -0
  68. package/dist/output/timeline-html.d.ts +6 -0
  69. package/dist/output/timeline-html.d.ts.map +1 -0
  70. package/dist/output/timeline-html.js +389 -0
  71. package/dist/output/timeline-html.js.map +1 -0
  72. package/dist/output/timeline-markdown.d.ts +6 -0
  73. package/dist/output/timeline-markdown.d.ts.map +1 -0
  74. package/dist/output/timeline-markdown.js +167 -0
  75. package/dist/output/timeline-markdown.js.map +1 -0
  76. package/dist/output/timeline.d.ts +9 -0
  77. package/dist/output/timeline.d.ts.map +1 -0
  78. package/dist/output/timeline.js +318 -0
  79. package/dist/output/timeline.js.map +1 -0
  80. package/dist/patterns/detour.d.ts +32 -0
  81. package/dist/patterns/detour.d.ts.map +1 -0
  82. package/dist/patterns/detour.js +137 -0
  83. package/dist/patterns/detour.js.map +1 -0
  84. package/dist/patterns/flow-state.d.ts +16 -0
  85. package/dist/patterns/flow-state.d.ts.map +1 -0
  86. package/dist/patterns/flow-state.js +40 -0
  87. package/dist/patterns/flow-state.js.map +1 -0
  88. package/dist/patterns/index.d.ts +8 -0
  89. package/dist/patterns/index.d.ts.map +1 -0
  90. package/dist/patterns/index.js +22 -0
  91. package/dist/patterns/index.js.map +1 -0
  92. package/dist/patterns/intervention-effectiveness.d.ts +42 -0
  93. package/dist/patterns/intervention-effectiveness.d.ts.map +1 -0
  94. package/dist/patterns/intervention-effectiveness.js +196 -0
  95. package/dist/patterns/intervention-effectiveness.js.map +1 -0
  96. package/dist/patterns/late-night.d.ts +30 -0
  97. package/dist/patterns/late-night.d.ts.map +1 -0
  98. package/dist/patterns/late-night.js +141 -0
  99. package/dist/patterns/late-night.js.map +1 -0
  100. package/dist/patterns/post-delete-sprint.d.ts +28 -0
  101. package/dist/patterns/post-delete-sprint.d.ts.map +1 -0
  102. package/dist/patterns/post-delete-sprint.js +85 -0
  103. package/dist/patterns/post-delete-sprint.js.map +1 -0
  104. package/dist/patterns/spiral-regression.d.ts +49 -0
  105. package/dist/patterns/spiral-regression.d.ts.map +1 -0
  106. package/dist/patterns/spiral-regression.js +219 -0
  107. package/dist/patterns/spiral-regression.js.map +1 -0
  108. package/dist/patterns/thrashing.d.ts +25 -0
  109. package/dist/patterns/thrashing.d.ts.map +1 -0
  110. package/dist/patterns/thrashing.js +111 -0
  111. package/dist/patterns/thrashing.js.map +1 -0
  112. package/dist/storage/atomic.d.ts +40 -0
  113. package/dist/storage/atomic.d.ts.map +1 -0
  114. package/dist/storage/atomic.js +155 -0
  115. package/dist/storage/atomic.js.map +1 -0
  116. package/dist/storage/commit-log.d.ts +35 -0
  117. package/dist/storage/commit-log.d.ts.map +1 -0
  118. package/dist/storage/commit-log.js +128 -0
  119. package/dist/storage/commit-log.js.map +1 -0
  120. package/dist/storage/index.d.ts +5 -0
  121. package/dist/storage/index.d.ts.map +1 -0
  122. package/dist/storage/index.js +33 -0
  123. package/dist/storage/index.js.map +1 -0
  124. package/dist/storage/schema.d.ts +32 -0
  125. package/dist/storage/schema.d.ts.map +1 -0
  126. package/dist/storage/schema.js +37 -0
  127. package/dist/storage/schema.js.map +1 -0
  128. package/dist/storage/timeline-store.d.ts +117 -0
  129. package/dist/storage/timeline-store.d.ts.map +1 -0
  130. package/dist/storage/timeline-store.js +438 -0
  131. package/dist/storage/timeline-store.js.map +1 -0
  132. package/dist/types.d.ts +96 -0
  133. package/dist/types.d.ts.map +1 -1
  134. package/docs/ARCHITECTURE.md +458 -0
  135. package/docs/DATA-ARCHITECTURE.md +565 -0
  136. package/docs/GAMIFICATION.md +564 -0
  137. package/docs/JSON-STORAGE-PATTERNS.md +512 -0
  138. package/docs/METRICS-EXPLAINED.md +394 -0
  139. package/docs/UNIFIED-ECOSYSTEM.md +560 -0
  140. package/docs/VIBE-ECOSYSTEM.md +406 -0
  141. package/feature-list.json +48 -0
  142. package/package.json +2 -1
  143. package/vitest.config.ts +1 -5
  144. package/.vibe-check/calibration.json +0 -38
  145. package/.vibe-check/latest.json +0 -114
  146. package/.vibe-check/sessions.json +0 -44
  147. package/PLAN-ultimate-game.md +0 -1362
@@ -0,0 +1,93 @@
1
+ /**
2
+ * Insight types for vibe-check dashboard
3
+ */
4
+ export type InsightCategory = 'productivity' | 'patterns' | 'growth' | 'warning' | 'celebration';
5
+ export type InsightSeverity = 'info' | 'warning' | 'critical' | 'success';
6
+ export interface Insight {
7
+ id: string;
8
+ category: InsightCategory;
9
+ severity: InsightSeverity;
10
+ icon: string;
11
+ title: string;
12
+ message: string;
13
+ metric?: string;
14
+ value?: number;
15
+ comparison?: {
16
+ type: 'baseline' | 'previous' | 'goal';
17
+ label: string;
18
+ value: number;
19
+ change: number;
20
+ };
21
+ action?: string;
22
+ source: string;
23
+ priority: number;
24
+ }
25
+ export interface DashboardData {
26
+ version: string;
27
+ generatedAt: string;
28
+ repo: string;
29
+ profile: {
30
+ level: number;
31
+ levelName: string;
32
+ levelIcon: string;
33
+ xp: {
34
+ current: number;
35
+ next: number;
36
+ total: number;
37
+ };
38
+ streak: {
39
+ current: number;
40
+ longest: number;
41
+ };
42
+ achievementCount: number;
43
+ totalAchievements: number;
44
+ };
45
+ stats: {
46
+ current: {
47
+ vibeScore: number;
48
+ rating: string;
49
+ };
50
+ averages: {
51
+ day7: number;
52
+ day30: number;
53
+ allTime: number;
54
+ };
55
+ totals: {
56
+ sessions: number;
57
+ commits: number;
58
+ spirals: number;
59
+ features: number;
60
+ };
61
+ };
62
+ charts: {
63
+ scoreTrend: Array<{
64
+ date: string;
65
+ score: number;
66
+ rating: string;
67
+ }>;
68
+ ratingDistribution: Record<string, number>;
69
+ hourlyActivity: Record<string, number>;
70
+ scopeHealth: Array<{
71
+ scope: string;
72
+ commits: number;
73
+ fixRatio: number;
74
+ }>;
75
+ };
76
+ insights: Insight[];
77
+ sessions: Array<{
78
+ date: string;
79
+ vibeScore: number;
80
+ rating: string;
81
+ commits: number;
82
+ spirals: number;
83
+ xpEarned: number;
84
+ }>;
85
+ achievements: Array<{
86
+ id: string;
87
+ name: string;
88
+ icon: string;
89
+ description: string;
90
+ unlockedAt?: string;
91
+ }>;
92
+ }
93
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/insights/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,eAAe,GACvB,cAAc,GACd,UAAU,GACV,QAAQ,GACR,SAAS,GACT,aAAa,CAAC;AAElB,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;AAE1E,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,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AC;QAC3D,MAAM,EAAE;YAAE,QAAQ,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAC;KAClF,CAAC;IAEF,MAAM,EAAE;QACN,UAAU,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;QACnE,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC3C,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACvC,WAAW,EAAE,KAAK,CAAC;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KAC1E,CAAC;IAEF,QAAQ,EAAE,OAAO,EAAE,CAAC;IAEpB,QAAQ,EAAE,KAAK,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC,CAAC;IAEH,YAAY,EAAE,KAAK,CAAC;QAClB,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC,CAAC;CACJ"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ /**
3
+ * Insight types for vibe-check dashboard
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/insights/types.ts"],"names":[],"mappings":";AAAA;;GAEG"}
@@ -0,0 +1,6 @@
1
+ import { TimelineResult } from '../types';
2
+ /**
3
+ * Format timeline as shareable HTML (self-contained single file)
4
+ */
5
+ export declare function formatTimelineHtml(timeline: TimelineResult): string;
6
+ //# sourceMappingURL=timeline-html.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline-html.d.ts","sourceRoot":"","sources":["../../src/output/timeline-html.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAA+C,MAAM,UAAU,CAAC;AAEvF;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,cAAc,GAAG,MAAM,CAgPnE"}
@@ -0,0 +1,389 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.formatTimelineHtml = formatTimelineHtml;
4
+ const date_fns_1 = require("date-fns");
5
+ /**
6
+ * Format timeline as shareable HTML (self-contained single file)
7
+ */
8
+ function formatTimelineHtml(timeline) {
9
+ const dateRange = `${(0, date_fns_1.format)(timeline.from, 'MMM d')} - ${(0, date_fns_1.format)(timeline.to, 'MMM d, yyyy')}`;
10
+ const activeHours = Math.round(timeline.totalActiveMinutes / 60);
11
+ return `<!DOCTYPE html>
12
+ <html lang="en">
13
+ <head>
14
+ <meta charset="UTF-8">
15
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
16
+ <title>Vibe-Check Timeline | ${dateRange}</title>
17
+ <style>
18
+ :root {
19
+ --bg: #1a1a2e;
20
+ --surface: #16213e;
21
+ --text: #eee;
22
+ --muted: #888;
23
+ --accent: #00d9ff;
24
+ --green: #4ade80;
25
+ --blue: #60a5fa;
26
+ --yellow: #facc15;
27
+ --red: #f87171;
28
+ --purple: #c084fc;
29
+ }
30
+
31
+ * { box-sizing: border-box; margin: 0; padding: 0; }
32
+
33
+ body {
34
+ font-family: 'SF Mono', 'Menlo', 'Monaco', monospace;
35
+ background: var(--bg);
36
+ color: var(--text);
37
+ line-height: 1.6;
38
+ padding: 2rem;
39
+ max-width: 800px;
40
+ margin: 0 auto;
41
+ }
42
+
43
+ header {
44
+ text-align: center;
45
+ margin-bottom: 2rem;
46
+ padding-bottom: 1rem;
47
+ border-bottom: 2px solid var(--accent);
48
+ }
49
+
50
+ h1 {
51
+ color: var(--accent);
52
+ font-size: 1.5rem;
53
+ margin-bottom: 0.5rem;
54
+ }
55
+
56
+ .subtitle {
57
+ color: var(--muted);
58
+ font-size: 0.9rem;
59
+ }
60
+
61
+ .trend {
62
+ font-size: 2rem;
63
+ letter-spacing: 2px;
64
+ margin: 1rem 0;
65
+ }
66
+
67
+ .stats {
68
+ display: grid;
69
+ grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
70
+ gap: 1rem;
71
+ margin-bottom: 2rem;
72
+ }
73
+
74
+ .stat {
75
+ background: var(--surface);
76
+ padding: 1rem;
77
+ border-radius: 8px;
78
+ text-align: center;
79
+ }
80
+
81
+ .stat-value {
82
+ font-size: 1.5rem;
83
+ font-weight: bold;
84
+ color: var(--accent);
85
+ }
86
+
87
+ .stat-label {
88
+ color: var(--muted);
89
+ font-size: 0.75rem;
90
+ text-transform: uppercase;
91
+ }
92
+
93
+ .day {
94
+ background: var(--surface);
95
+ border-radius: 8px;
96
+ margin-bottom: 1rem;
97
+ overflow: hidden;
98
+ }
99
+
100
+ .day-header {
101
+ padding: 1rem;
102
+ display: flex;
103
+ justify-content: space-between;
104
+ align-items: center;
105
+ border-bottom: 1px solid rgba(255,255,255,0.1);
106
+ }
107
+
108
+ .day-date {
109
+ font-weight: bold;
110
+ }
111
+
112
+ .rating {
113
+ padding: 0.25rem 0.5rem;
114
+ border-radius: 4px;
115
+ font-size: 0.75rem;
116
+ font-weight: bold;
117
+ }
118
+
119
+ .rating-elite { background: var(--green); color: #000; }
120
+ .rating-high { background: var(--blue); color: #000; }
121
+ .rating-medium { background: var(--yellow); color: #000; }
122
+ .rating-low { background: var(--red); color: #000; }
123
+
124
+ .day-summary {
125
+ padding: 0.5rem 1rem;
126
+ color: var(--muted);
127
+ font-size: 0.85rem;
128
+ }
129
+
130
+ .sessions {
131
+ padding: 0.5rem 1rem 1rem;
132
+ }
133
+
134
+ .session {
135
+ padding: 0.5rem 0;
136
+ border-bottom: 1px solid rgba(255,255,255,0.05);
137
+ }
138
+
139
+ .session:last-child {
140
+ border-bottom: none;
141
+ }
142
+
143
+ .session-time {
144
+ color: var(--muted);
145
+ font-size: 0.8rem;
146
+ }
147
+
148
+ .session-work {
149
+ margin-top: 0.25rem;
150
+ }
151
+
152
+ .badge {
153
+ display: inline-block;
154
+ padding: 0.125rem 0.375rem;
155
+ border-radius: 4px;
156
+ font-size: 0.7rem;
157
+ margin-left: 0.5rem;
158
+ }
159
+
160
+ .badge-flow { background: rgba(96, 165, 250, 0.2); color: var(--blue); }
161
+ .badge-spiral { background: rgba(250, 204, 21, 0.2); color: var(--yellow); }
162
+
163
+ .insights {
164
+ background: var(--surface);
165
+ border-radius: 8px;
166
+ padding: 1.5rem;
167
+ margin-top: 2rem;
168
+ }
169
+
170
+ .insights h2 {
171
+ color: var(--accent);
172
+ font-size: 1rem;
173
+ margin-bottom: 1rem;
174
+ }
175
+
176
+ .insight {
177
+ padding: 0.5rem 0;
178
+ display: flex;
179
+ gap: 0.75rem;
180
+ }
181
+
182
+ .insight-icon {
183
+ font-size: 1.2rem;
184
+ }
185
+
186
+ footer {
187
+ text-align: center;
188
+ color: var(--muted);
189
+ font-size: 0.75rem;
190
+ margin-top: 2rem;
191
+ padding-top: 1rem;
192
+ border-top: 1px solid rgba(255,255,255,0.1);
193
+ }
194
+
195
+ footer a {
196
+ color: var(--accent);
197
+ text-decoration: none;
198
+ }
199
+ </style>
200
+ </head>
201
+ <body>
202
+ <header>
203
+ <h1>VIBE-CHECK TIMELINE</h1>
204
+ <div class="subtitle">${dateRange}</div>
205
+ <div class="trend">${buildTrendHtml(timeline.trend)}</div>
206
+ </header>
207
+
208
+ <div class="stats">
209
+ <div class="stat">
210
+ <div class="stat-value">~${activeHours}h</div>
211
+ <div class="stat-label">Active Time</div>
212
+ </div>
213
+ <div class="stat">
214
+ <div class="stat-value">${timeline.totalCommits}</div>
215
+ <div class="stat-label">Commits</div>
216
+ </div>
217
+ <div class="stat">
218
+ <div class="stat-value">${timeline.totalFeatures}</div>
219
+ <div class="stat-label">Features</div>
220
+ </div>
221
+ <div class="stat">
222
+ <div class="stat-value">${timeline.flowStates}</div>
223
+ <div class="stat-label">Flow States</div>
224
+ </div>
225
+ <div class="stat">
226
+ <div class="stat-value">${timeline.totalSpirals}</div>
227
+ <div class="stat-label">Spirals</div>
228
+ </div>
229
+ <div class="stat">
230
+ <div class="stat-value">+${timeline.totalXp}</div>
231
+ <div class="stat-label">XP Earned</div>
232
+ </div>
233
+ </div>
234
+
235
+ ${timeline.days.map(day => formatDayHtml(day)).join('\n')}
236
+
237
+ <div class="insights">
238
+ <h2>INSIGHTS</h2>
239
+ ${generateInsightsHtml(timeline)}
240
+ </div>
241
+
242
+ <footer>
243
+ Generated by <a href="https://github.com/boshu2/vibe-check">vibe-check</a> on ${(0, date_fns_1.format)(new Date(), 'yyyy-MM-dd HH:mm')}
244
+ </footer>
245
+ </body>
246
+ </html>`;
247
+ }
248
+ /**
249
+ * Build trend sparkline HTML with colors
250
+ */
251
+ function buildTrendHtml(scores) {
252
+ const bars = ['▁', '▂', '▃', '▄', '▅', '▆', '▇', '█'];
253
+ return scores
254
+ .map(score => {
255
+ if (score === null)
256
+ return '<span style="color: var(--muted)">▁</span>';
257
+ const idx = Math.min(7, Math.floor(score / 12.5));
258
+ const bar = bars[idx];
259
+ if (score >= 80)
260
+ return `<span style="color: var(--green)">${bar}</span>`;
261
+ if (score >= 60)
262
+ return `<span style="color: var(--blue)">${bar}</span>`;
263
+ if (score >= 40)
264
+ return `<span style="color: var(--yellow)">${bar}</span>`;
265
+ return `<span style="color: var(--red)">${bar}</span>`;
266
+ })
267
+ .join('');
268
+ }
269
+ /**
270
+ * Format a single day for HTML
271
+ */
272
+ function formatDayHtml(day) {
273
+ const ratingClass = `rating-${day.dayRating.toLowerCase()}`;
274
+ const trophy = day.dayRating === 'ELITE' ? ' 🏆' : '';
275
+ return `
276
+ <div class="day">
277
+ <div class="day-header">
278
+ <span class="day-date">📅 ${day.displayDate}</span>
279
+ <span class="rating ${ratingClass}">${day.dayScore}% ${day.dayRating}${trophy}</span>
280
+ </div>
281
+ <div class="day-summary">
282
+ ${day.sessions.length} session${day.sessions.length > 1 ? 's' : ''},
283
+ ${day.totalCommits} commits,
284
+ ${day.spiralCount} spirals,
285
+ +${day.totalXp} XP
286
+ </div>
287
+ <div class="sessions">
288
+ ${day.sessions.map(session => formatSessionHtml(session)).join('\n')}
289
+ </div>
290
+ </div>`;
291
+ }
292
+ /**
293
+ * Format a single session for HTML
294
+ */
295
+ function formatSessionHtml(session) {
296
+ const timeRange = `${(0, date_fns_1.format)(session.start, 'HH:mm')}-${(0, date_fns_1.format)(session.end, 'HH:mm')}`;
297
+ const durationStr = formatDuration(session.duration);
298
+ // Badges
299
+ const flowBadge = session.flowState ? '<span class="badge badge-flow">🌊 Flow</span>' : '';
300
+ const spiralBadge = session.spirals.length > 0 ? '<span class="badge badge-spiral">⚠️ Spiral</span>' : '';
301
+ // Get main work summary
302
+ const featCount = session.commits.filter(c => c.type === 'feat').length;
303
+ const fixCount = session.commits.filter(c => c.type === 'fix').length;
304
+ let workSummary = '';
305
+ if (featCount > 0) {
306
+ const firstFeat = session.commits.find(c => c.type === 'feat');
307
+ workSummary = firstFeat ? escapeHtml(truncate(firstFeat.subject, 60)) : `${featCount} features`;
308
+ }
309
+ else if (fixCount > 0) {
310
+ workSummary = `${fixCount} fix${fixCount > 1 ? 'es' : ''}`;
311
+ }
312
+ else {
313
+ const first = session.commits[0];
314
+ workSummary = escapeHtml(truncate(first.subject, 60));
315
+ }
316
+ return `
317
+ <div class="session">
318
+ <div class="session-time">${timeRange} (${durationStr})${flowBadge}${spiralBadge}</div>
319
+ <div class="session-work">${workSummary}</div>
320
+ </div>`;
321
+ }
322
+ /**
323
+ * Generate insights HTML
324
+ */
325
+ function generateInsightsHtml(timeline) {
326
+ const insights = [];
327
+ if (timeline.postDeleteSprint?.detected) {
328
+ insights.push(`<div class="insight"><span class="insight-icon">⚡</span><span>${escapeHtml(timeline.postDeleteSprint.message)}</span></div>`);
329
+ }
330
+ if (timeline.flowStates > 0) {
331
+ const avgFlowDuration = timeline.sessions
332
+ .filter(s => s.flowState)
333
+ .reduce((sum, s) => sum + s.duration, 0) / timeline.flowStates;
334
+ insights.push(`<div class="insight"><span class="insight-icon">🌊</span><span>Flow states: ${timeline.flowStates} detected (avg ${Math.round(avgFlowDuration)} min)</span></div>`);
335
+ }
336
+ if (timeline.detours?.detected) {
337
+ insights.push(`<div class="insight"><span class="insight-icon">🚧</span><span>${escapeHtml(timeline.detours.message)}</span></div>`);
338
+ }
339
+ if (timeline.lateNightSpirals?.detected) {
340
+ insights.push(`<div class="insight"><span class="insight-icon">🌙</span><span>${escapeHtml(timeline.lateNightSpirals.message)}</span></div>`);
341
+ }
342
+ if (timeline.thrashing?.detected) {
343
+ insights.push(`<div class="insight"><span class="insight-icon">🔄</span><span>${escapeHtml(timeline.thrashing.message)}</span></div>`);
344
+ }
345
+ if (timeline.totalSpirals > 0) {
346
+ insights.push(`<div class="insight"><span class="insight-icon">⚠️</span><span>Debug spirals: ${timeline.totalSpirals} detected</span></div>`);
347
+ }
348
+ // Productivity ratio
349
+ const wallClockHours = timeline.totalDays * 24;
350
+ const activeHours = Math.round(timeline.totalActiveMinutes / 60);
351
+ const efficiencyPercent = Math.round((activeHours / wallClockHours) * 100);
352
+ insights.push(`<div class="insight"><span class="insight-icon">⏱️</span><span>Active time: ${activeHours}h of ${wallClockHours}h (${efficiencyPercent}% efficiency)</span></div>`);
353
+ // Best day
354
+ const bestDay = timeline.days.reduce((best, day) => (day.dayScore || 0) > (best.dayScore || 0) ? day : best);
355
+ if (bestDay.dayScore && bestDay.dayScore >= 80) {
356
+ insights.push(`<div class="insight"><span class="insight-icon">🏆</span><span>Best day: ${bestDay.displayDate} (${bestDay.dayScore}%)</span></div>`);
357
+ }
358
+ return insights.join('\n ');
359
+ }
360
+ /**
361
+ * Format duration in human-readable form
362
+ */
363
+ function formatDuration(minutes) {
364
+ if (minutes < 60)
365
+ return `${minutes}m`;
366
+ const hours = Math.floor(minutes / 60);
367
+ const mins = minutes % 60;
368
+ return mins > 0 ? `${hours}h ${mins}m` : `${hours}h`;
369
+ }
370
+ /**
371
+ * Truncate string with ellipsis
372
+ */
373
+ function truncate(str, maxLen) {
374
+ if (str.length <= maxLen)
375
+ return str;
376
+ return str.substring(0, maxLen - 1) + '…';
377
+ }
378
+ /**
379
+ * Escape HTML entities
380
+ */
381
+ function escapeHtml(str) {
382
+ return str
383
+ .replace(/&/g, '&amp;')
384
+ .replace(/</g, '&lt;')
385
+ .replace(/>/g, '&gt;')
386
+ .replace(/"/g, '&quot;')
387
+ .replace(/'/g, '&#39;');
388
+ }
389
+ //# sourceMappingURL=timeline-html.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline-html.js","sourceRoot":"","sources":["../../src/output/timeline-html.ts"],"names":[],"mappings":";;AAMA,gDAgPC;AAtPD,uCAAkC;AAGlC;;GAEG;AACH,SAAgB,kBAAkB,CAAC,QAAwB;IACzD,MAAM,SAAS,GAAG,GAAG,IAAA,iBAAM,EAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,MAAM,IAAA,iBAAM,EAAC,QAAQ,CAAC,EAAE,EAAE,aAAa,CAAC,EAAE,CAAC;IAC9F,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,kBAAkB,GAAG,EAAE,CAAC,CAAC;IAEjE,OAAO;;;;;iCAKwB,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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C,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;IACvC,MAAM,IAAI,GAAG,OAAO,GAAG,EAAE,CAAC;IAC1B,OAAO,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,KAAK,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC;AACvD,CAAC;AAED;;GAEG;AACH,SAAS,QAAQ,CAAC,GAAW,EAAE,MAAc;IAC3C,IAAI,GAAG,CAAC,MAAM,IAAI,MAAM;QAAE,OAAO,GAAG,CAAC;IACrC,OAAO,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;AAC5C,CAAC;AAED;;GAEG;AACH,SAAS,UAAU,CAAC,GAAW;IAC7B,OAAO,GAAG;SACP,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;SACtB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC;SACvB,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC5B,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { TimelineResult } from '../types';
2
+ /**
3
+ * Format timeline as shareable Markdown
4
+ */
5
+ export declare function formatTimelineMarkdown(timeline: TimelineResult): string;
6
+ //# sourceMappingURL=timeline-markdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline-markdown.d.ts","sourceRoot":"","sources":["../../src/output/timeline-markdown.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAA+C,MAAM,UAAU,CAAC;AAEvF;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,cAAc,GAAG,MAAM,CAwGvE"}