task-summary-extractor 8.1.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.
package/EXPLORATION.md ADDED
@@ -0,0 +1,451 @@
1
+ # Task Summary Extractor — Where We Are & Where We Can Go
2
+
3
+ > **Version 8.1.0** — February 2026
4
+ > Module map, codebase stats, and future roadmap.
5
+ > For setup and CLI reference, see [README.md](README.md) · [Quick Start](QUICK_START.md)
6
+ > For architecture diagrams and algorithms, see [ARCHITECTURE.md](ARCHITECTURE.md)
7
+
8
+ ---
9
+
10
+ ## Part 1: Where We Are Now
11
+
12
+ ### Architecture Overview
13
+
14
+ ```
15
+ ┌─────────────────────────────────────────────────────────────────────┐
16
+ │ taskex (bin/taskex.js) or process_and_upload.js │
17
+ │ (Entry Points) │
18
+ └─────────────────────────┬───────────────────────────────────────────┘
19
+
20
+ ┌─────────────────────────▼───────────────────────────────────────────┐
21
+ │ pipeline.js (1,738 lines) │
22
+ │ 8-Phase Orchestrator │
23
+ │ │
24
+ │ Init ──────► Discover ──► Services ──► ProcessVideo ──► Compile │
25
+ │ │ learning │ │ │ │
26
+ │ │ insights ┌─────▼────▼──┐ Diff │
27
+ │ │ loaded │ For each │ Engine │
28
+ │ │ │ segment: │ │ │
29
+ │ │ │ ┌─────────┐ │ Output │
30
+ │ │ │ │Compress │ │ │ │
31
+ │ │ │ │Upload │ │ Health │
32
+ │ │ │ │Analyze ◄──┼── Quality Gate │
33
+ │ │ │ │ ↻Retry │ │ + Confidence│
34
+ │ │ │ │ 🔍Focus │ │ Scoring │
35
+ │ │ │ └─────────┘ │ │
36
+ │ │ └─────────────┘ Summary │
37
+ │ │ │ │
38
+ │ └──────────────────── learning history saved ◄──────────┘ │
39
+ └────┬──────────┬──────────┬──────────┬──────────┬───────────────────┘
40
+ │ │ │ │ │
41
+ ┌────▼───┐ ┌───▼──────┐ ┌▼────────┐ ┌▼─────┐ ┌▼──────────┐
42
+ │Services│ │ Utils │ │Renderers│ │Logger│ │ Config │
43
+ │ │ │ │ │ │ │ │ │ │
44
+ │gemini │ │quality │ │markdown │ │JSONL │ │dotenv │
45
+ │firebase│ │-gate │ │(879 ln) │ │struct│ │validation │
46
+ │video │ │focused │ │+ conf │ │spans │ │env helpers│
47
+ │git │ │-reanalysis│ │ badges│ │phases│ │model reg │
48
+ │ │ │learning │ │+ diff │ │metrics│ │ │
49
+ │ │ │-loop │ │ section │ │ │ │ │
50
+ │ │ │diff │ │ │ │ │ │ │
51
+ │ │ │-engine │ │ │ │ │ │ │
52
+ │ │ │adapt-budg│ │ │ │ │ │ │
53
+ │ │ │context │ │ │ │ │ │ │
54
+ │ │ │+12 more │ │ │ │ │ │ │
55
+ └────────┘ └──────────┘ └─────────┘ └──────┘ └───────────┘
56
+ ```
57
+
58
+ ### Codebase Stats
59
+
60
+ | Category | Files | Lines |
61
+ |----------|-------|-------|
62
+ | Pipeline orchestrator | 1 | 1,985 |
63
+ | Services (Gemini, Firebase, Video, Git) | 4 | 1,330 |
64
+ | Utilities (21 modules) | 21 | 4,890 |
65
+ | Renderers | 1 | 969 |
66
+ | Config + Logger | 2 | 578 |
67
+ | Entry points (taskex + legacy) | 2 | 165 |
68
+ | Setup script | 1 | 505 |
69
+ | Prompt (JSON) | 1 | 265 |
70
+ | **Total** | **33 files** | **~10,600 lines** |
71
+
72
+ ### Version History
73
+
74
+ | Version | Theme | Key Additions |
75
+ |---------|-------|---------------|
76
+ | **v3** | Core Improvements | dotenv, logger, retry logic, CLI args, graceful shutdown, config validation, progress persistence, error handling, video fixes, parallel uploads |
77
+ | **v4** | Architecture & Orchestration | Phase decomposition (7 phases), CostTracker, configurable thinking budget, poll timeouts, dead code cleanup, no `process.exit()`, CLI enhancements |
78
+ | **v5** | Smart & Accurate | Quality Gate (4-dimension scoring), auto-retry with corrective hints, adaptive thinking budget, smart boundary detection, health dashboard, enhanced prompt engineering, compilation quality assessment |
79
+ | **v6** | Self-Improving Intelligence | Confidence scoring per item, focused re-analysis for weak areas, learning loop (historical auto-tuning), diff-aware compilation (cross-run deltas), structured JSONL logging with phase spans, confidence badges in Markdown |
80
+ | **v6.1** | Smart Change Detection | Git-based progress tracking, AI-powered change correlation, automatic item status assessment (DONE/IN_PROGRESS/NOT_STARTED), progress markdown reports, `--update-progress` mode |
81
+ | **v6.2** | Deep Dive | `--deep-dive` generates explanatory docs per topic, 8 content categories |
82
+ | **v7.0** | Dynamic Mode | `--dynamic` doc-only mode, interactive folder selection, fully flexible pipeline |
83
+ | **v7.1** | Dynamic + Video | `--dynamic` now processes videos: compress, segment, analyze — works with any content |
84
+ | **v7.2** | Model Selection | Interactive model selector, `--model` flag, 5-model registry with pricing, runtime model switching |
85
+ | **v7.2.1** | Storage URL + Audit | Firebase Storage URLs as Gemini External URLs (skip File API upload), 3-strategy file resolution, URI reuse for retry/focused pass, Gemini file cleanup, confidence % fix, logger/firebase/git/version fixes |
86
+ | **v7.2.2** | Upload Control | `--force-upload` to re-upload existing files, `--no-storage-url` to force Gemini File API, production-ready docs |
87
+ | **v8.1.0** | Smart Global Config | Persistent `~/.taskexrc` config, `taskex config` subcommand, first-run API key prompting, 5-level config resolution, production audit (14 fixes), shared CLI flag injection, boolean flag parser fix |
88
+ | **v8.0.0** | npm Package | Global CLI (`taskex`), `--gemini-key`/`--firebase-*` config flags, CWD-based path resolution, CWD-first `.env`, `bin/taskex.js` entry point, npm publish-ready `package.json` |
89
+ | **v7.2.3** | Production Hardening | Cross-platform ffmpeg detection, shell injection fix (spawnSync), auto git init for `--update-progress`, `runs/` excluded from doc discovery, entry point docs updated |
90
+
91
+ ### What v6 Delivers
92
+
93
+ #### 1. Confidence Scoring Per Extracted Item
94
+ Every ticket, action item, CR, blocker, and scope change now carries a `confidence` field (HIGH / MEDIUM / LOW) and a `confidence_reason` explaining the evidence basis.
95
+
96
+ | Confidence | Meaning | Example |
97
+ |------------|---------|---------|
98
+ | **HIGH** | Explicitly stated + corroborated by docs/context | "Mentioned by name with ticket ID in VTT and Azure DevOps" |
99
+ | **MEDIUM** | Partially stated or single-source | "Discussed verbally but no written reference" |
100
+ | **LOW** | Inferred from context, not directly stated | "Implied from related discussion, not explicitly assigned" |
101
+
102
+ **Where it shows up:**
103
+ - **Quality Gate** (`quality-gate.js` — 430 lines): New 15-point confidence coverage dimension in density scoring. Flags missing confidence fields and suspicious uniformity (all HIGH = likely not calibrated). Generates retry hints for poor confidence.
104
+ - **Markdown Renderer** (`markdown.js` — 969 lines): Confidence badges (🟢 🟡 🔴) on every ticket header, action item row, CR row, blocker, scope change, and todo item. "📊 Confidence Distribution" summary table near report header.
105
+ - **Prompt** (`prompt.json` — 265 lines): Explicit confidence scoring instructions injected into extraction prompt. Self-verification checklist updated.
106
+
107
+ #### 2. Focused Re-Analysis (`focused-reanalysis.js` — 318 lines)
108
+ When the quality gate identifies specific weak dimensions (score <60, ≥2 weak areas), a **targeted second pass** runs instead of a full re-analysis.
109
+
110
+ | Component | What It Does |
111
+ |-----------|--------------|
112
+ | `identifyWeaknesses()` | Analyzes quality dimensions + confidence coverage to find gaps (missing tickets, sparse assignees, low confidence items, broken cross-refs) |
113
+ | `runFocusedPass()` | Sends a focused Gemini prompt targeting ONLY the weak areas, with reduced thinking budget (12K tokens) |
114
+ | `mergeFocusedResults()` | Intelligent merge: updates existing items by ID, appends new items, marks `_enhanced_by_focused_pass` / `_from_focused_pass` |
115
+
116
+ **Pipeline integration**: Runs after the quality gate + retry cycle for each segment. Controlled by `--no-focused-pass` flag. Costs tracked separately in cost tracker.
117
+
118
+ #### 3. Learning & Improvement Loop (`learning-loop.js` — 302 lines)
119
+ The pipeline remembers its past performance and auto-tunes for the future.
120
+
121
+ **How it works:**
122
+ 1. **Before processing**: `loadHistory()` reads `history.json` (up to 50 past runs), `analyzeHistory()` computes trends and budget adjustments
123
+ 2. **Budget auto-tuning**: If avg quality <45 across recent runs → boost thinking budget +4096 tokens. If >80 → reduce by 2048 to save cost.
124
+ 3. **Retry effectiveness**: Tracks whether retries actually improve quality. If retry success rate <30%, recommends increasing base budget instead.
125
+ 4. **After processing**: `saveHistory()` persists compact metrics (quality scores, extraction counts, costs, budgets, retry stats) for the next run.
126
+
127
+ ```
128
+ 📈 Learning Insights:
129
+ Historical runs : 12
130
+ Quality trend : improving (avg: 74/100)
131
+ Budget adjust : -2048 tokens (analysis)
132
+ Recommendations :
133
+ • High average quality (74/100) — reducing thinking budget by 2048 tokens to save cost
134
+ • Focused re-analysis was used in 3/10 runs — system is self-correcting effectively
135
+ ```
136
+
137
+ #### 4. Diff-Aware Compilation (`diff-engine.js` — 316 lines)
138
+ Compares the current run's compiled analysis against the previous run to produce a delta report.
139
+
140
+ | Diff Category | What's Detected |
141
+ |---------------|-----------------|
142
+ | **New items** | Tickets, CRs, action items, blockers, scope changes that didn't exist before |
143
+ | **Removed items** | Items from the previous run that no longer appear |
144
+ | **Changed items** | Status, priority, assignee, or confidence changes on existing items |
145
+ | **Unchanged** | Items that remain identical |
146
+
147
+ **Output**: Appended to `results.md` as a "🔄 Changes Since Previous Run" section with summary table + detailed new/removed/changed listings. Also saved as `diff.json` in the run folder.
148
+
149
+ #### 5. Structured Logging & Observability (`logger.js` — 352 lines)
150
+ The logger now writes **three parallel outputs**:
151
+
152
+ | Output | Format | Purpose |
153
+ |--------|--------|---------|
154
+ | `*_detailed.log` | Human-readable | Full debug/info/warn/error messages |
155
+ | `*_minimal.log` | Compact steps | Steps + timestamps only |
156
+ | `*_structured.jsonl` | Machine-readable JSONL | Every event as a JSON object with level, timestamp, context, phase |
157
+
158
+ **New capabilities:**
159
+ - **Phase spans**: `phaseStart(name)` / `phaseEnd(meta)` track timing per pipeline phase with structured records
160
+ - **Operation context**: `setContext()` / `clearContext()` stack for enriching log entries with segment/operation metadata
161
+ - **Structured metrics**: `metric(name, value)` for recording quantitative data (confidence coverage, token counts, etc.)
162
+ - All phase timers auto-emit structured span events
163
+
164
+ #### 6. Enhanced Quality Gate (`quality-gate.js` — 430 lines)
165
+ **New in v6:** Confidence coverage is now a scoring dimension within density (15 points):
166
+ - Checks percentage of items with valid confidence fields
167
+ - Detects suspicious uniformity (all same confidence = likely not calibrated)
168
+ - New `getConfidenceStats(analysis)` export returns `{total, high, medium, low, missing, coverage}`
169
+ - Two new retry hint generators for missing/uniform confidence
170
+
171
+ ### All v5 Features Retained
172
+
173
+ | Feature | Module | Description |
174
+ |---------|--------|-------------|
175
+ | Quality Gate | `quality-gate.js` | 4-dimension scoring (structure, density, integrity, cross-refs), auto-retry on FAIL |
176
+ | Adaptive Thinking Budget | `adaptive-budget.js` | Segment position, complexity, context docs → dynamic 8K–32K range |
177
+ | Smart Boundary Detection | `context-manager.js` | Mid-conversation detection, open ticket carry-forward, continuity hints |
178
+ | Health Dashboard | `health-dashboard.js` | Quality scores, extraction density bars, retry stats, efficiency metrics |
179
+ | Enhanced Prompt | `prompt.json` | Timestamp accuracy, dedup rules, self-verification checklist, retry hints |
180
+
181
+ ### Current Capabilities
182
+
183
+ | Capability | Status | Description |
184
+ |------------|--------|-------------|
185
+ | Video compression | ✅ Mature | ffmpeg-based, CRF, configurable speed/preset |
186
+ | Video segmentation | ✅ Mature | Time-based splitting, segment pre-validation |
187
+ | Firebase upload | ✅ Mature | Parallel, retry, skip-existing, anonymous auth, async I/O, `--force-upload` re-upload |
188
+ | Storage URL optimization | ✅ v7.2.1 New | Firebase download URLs used as Gemini External URLs — skips File API upload, `--no-storage-url` to disable |
189
+ | Gemini segment analysis | ✅ Premium | 1M context, VTT slicing, progressive context, adaptive budget, 3-strategy file resolution |
190
+ | Gemini file cleanup | ✅ v7.2.1 New | Auto-delete File API uploads after all passes complete |
191
+ | Quality gate + retry | ✅ Enhanced | 4-dimension scoring + confidence coverage dimension, auto-retry with hints |
192
+ | Confidence scoring | ✅ v6 New | HIGH/MEDIUM/LOW per item with evidence reasoning |
193
+ | Focused re-analysis | ✅ v6 New | Targeted second pass for weak quality dimensions |
194
+ | Learning loop | ✅ v6 New | Historical auto-tuning of budgets/thresholds across runs |
195
+ | Diff engine | ✅ v6 New | Cross-run delta reports (new/removed/changed items) |
196
+ | Structured logging | ✅ v6 New | JSONL structured log, phase spans, operation contexts, metrics |
197
+ | Cross-segment continuity | ✅ Premium | Progressive context compression, boundary detection, focus instructions |
198
+ | AI compilation | ✅ Premium | Dedup, name normalization, adaptive compilation budget |
199
+ | Markdown rendering | ✅ Enhanced | Name clustering, ID dedup, confidence badges, diff section |
200
+ | Cost tracking | ✅ Mature | Per-segment + compilation + focused passes, long-context tier pricing |
201
+ | Progress persistence | ✅ Mature | Checkpoint/resume after crashes |
202
+ | CLI | ✅ Complete | 18 flags, help, version, output dir |
203
+ | Logging | ✅ v6 Rewritten | Triple output: detailed + minimal + structured JSONL |
204
+ | Health dashboard | ✅ Mature | Quality, density, retries, efficiency |
205
+
206
+ ### CLI Reference
207
+
208
+ ```
209
+ Usage: taskex [options] [folder]
210
+
211
+ Install: npm i -g task-summary-extractor
212
+
213
+ If no folder is specified, shows an interactive folder selector.
214
+
215
+ Configuration (override .env):
216
+ --gemini-key <key> Gemini API key
217
+ --firebase-key <key> Firebase API key
218
+ --firebase-project <id> Firebase project ID
219
+ --firebase-bucket <bucket> Firebase storage bucket
220
+ --firebase-domain <domain> Firebase auth domain
221
+
222
+ Modes:
223
+ (default) Video analysis — compress, analyze, extract, compile
224
+ --dynamic Document-only mode — no video required
225
+ --update-progress Track item completion via git
226
+ --deep-dive Generate explanatory docs per topic discussed
227
+
228
+ Core Options:
229
+ --name <name> Your name (skips interactive prompt)
230
+ --model <id> Gemini model to use (skips interactive selector)
231
+ --skip-upload Skip all Firebase Storage uploads
232
+ --force-upload Re-upload files even if they already exist in Storage
233
+ --no-storage-url Disable Storage URL optimization (force Gemini File API)
234
+ --skip-compression Skip video compression (use existing segments)
235
+ --skip-gemini Skip Gemini AI analysis
236
+ --resume Resume from last checkpoint
237
+ --reanalyze Force re-analysis of all segments
238
+ --dry-run Show what would be done without executing
239
+
240
+ Dynamic Mode:
241
+ --dynamic Enable document-only mode
242
+ --request <text> What to generate (prompted if omitted)
243
+
244
+ Progress Tracking:
245
+ --repo <path> Path to the project git repo
246
+
247
+ Tuning:
248
+ --parallel <n> Max parallel uploads (default: 3)
249
+ --parallel-analysis <n> Concurrent segment analysis batches (default: 2)
250
+ --thinking-budget <n> Thinking tokens per segment (default: 24576)
251
+ --compilation-thinking-budget <n> Thinking tokens for compilation (default: 10240)
252
+ --log-level <level> debug | info | warn | error (default: info)
253
+ --output <dir> Custom output directory for results
254
+ --no-focused-pass Disable focused re-analysis
255
+ --no-learning Disable learning loop
256
+ --no-diff Disable diff comparison
257
+
258
+ Info:
259
+ --help, -h Show help
260
+ --version, -v Show version
261
+ ```
262
+
263
+ ### Full Module Map
264
+
265
+ ```
266
+ bin/
267
+ └── taskex.js 72 ln ★ v8.0.0 — Global CLI entry point, config flag injection
268
+
269
+ src/
270
+ ├── config.js 277 ln Central config, env vars, model registry, validation
271
+ ├── logger.js 306 ln ★ v6 — Triple output: detailed + minimal + structured JSONL, phase spans, metrics
272
+ ├── pipeline.js 1,985 ln Multi-mode orchestrator with Storage URL optimization, upload control flags, learning loop, focused re-analysis, diff engine, deep-dive, dynamic, auto git init
273
+ ├── renderers/
274
+ │ └── markdown.js 879 ln ★ v6 — Confidence badges (🟢🟡🔴), confidence distribution table, diff section
275
+ ├── services/
276
+ │ ├── firebase.js 92 ln Init, upload, exists check (with retry, async I/O)
277
+ │ ├── gemini.js 677 ln ★ v7.2.1 — 3-strategy file resolution, External URL support, cleanup, doc prep, analysis, compilation
278
+ │ ├── git.js 330 ln ★ v7.2.3 — Git CLI wrapper: log, diff, status, changed files, auto-init
279
+ │ └── video.js 285 ln ★ v7.2.3 — ffmpeg compress, segment, probe (cross-platform, spawnSync)
280
+ └── utils/
281
+ ├── adaptive-budget.js 232 ln ★ v5 — Transcript complexity → dynamic budget
282
+ ├── change-detector.js 417 ln ★ v6.1 — Git-based change correlation engine
283
+ ├── cli.js 391 ln ★ v8.0.0 — Interactive prompts, model selector, folder picker, config flags, taskex help
284
+ ├── context-manager.js 424 ln 4-tier priority, VTT slicing, progressive context, boundary detection
285
+ ├── cost-tracker.js 140 ln Token counting, USD cost estimation (+ focused pass tracking)
286
+ ├── deep-dive.js 473 ln ★ v6.2 — Topic discovery, parallel doc generation, index builder
287
+ ├── diff-engine.js 280 ln ★ v6 — Cross-run delta: new/removed/changed items, Markdown rendering
288
+ ├── dynamic-mode.js 494 ln ★ v7.0 — Context-only doc generation, topic planning, parallel writing
289
+ ├── focused-reanalysis.js 268 ln ★ v6 — Weakness detection, targeted second pass, intelligent merge
290
+ ├── format.js 27 ln Duration, bytes formatting
291
+ ├── fs.js 40 ln Recursive doc finder (skips runs/)
292
+ ├── health-dashboard.js 191 ln ★ v5 — Quality report, density bars, efficiency metrics
293
+ ├── json-parser.js 216 ln 5-strategy JSON extraction + repair
294
+ ├── learning-loop.js 270 ln ★ v6 — History I/O, trend analysis, budget auto-tuning, recommendations
295
+ ├── progress.js 145 ln Checkpoint/resume persistence
296
+ ├── progress-updater.js 402 ln ★ v6.1 — AI-powered progress assessment, status report generation
297
+ ├── prompt.js 28 ln Interactive user prompts
298
+ ├── quality-gate.js 372 ln ★ v6 — 4+1 dimension scoring (+ confidence coverage), retry hints
299
+ └── retry.js 112 ln Exponential backoff, parallel map
300
+
301
+ prompt.json 265 ln ★ v6 — Confidence scoring instructions, evidence-based schema
302
+ process_and_upload.js 115 ln Backward-compatible entry point with config flag injection (v8.0.0)
303
+ setup.js 505 ln Automated first-time setup & environment validation (v8.0.0)
304
+ ```
305
+
306
+ ---
307
+
308
+ ## Part 2: Where We Can Go
309
+
310
+ ### Already Implemented (v6)
311
+
312
+ The following features from the original exploration have been **fully implemented**:
313
+
314
+ | Feature | Status | Implemented In |
315
+ |---------|--------|----------------|
316
+ | 📊 Confidence Scoring Per Extracted Item | ✅ Done | `prompt.json`, `quality-gate.js`, `markdown.js` |
317
+ | 🔄 Multi-Pass Analysis (Focused Re-extraction) | ✅ Done | `focused-reanalysis.js` (268 ln), pipeline integration |
318
+ | 🧠 Learning & Improvement Loop | ✅ Done | `learning-loop.js` (270 ln), pipeline init + save |
319
+ | 📝 Diff-Aware Compilation | ✅ Done | `diff-engine.js` (280 ln), pipeline output + MD |
320
+ | 🔍 Structured Logging & Observability | ✅ Done | `logger.js` rewritten (303 ln), JSONL + spans + metrics |
321
+ | Parallel segment analysis (via CLI) | ✅ Done | `--parallel-analysis` flag, pipeline batching |
322
+ | 🔎 Smart Change Detection & Progress Tracking | ✅ Done | `git.js` (258 ln), `change-detector.js` (417 ln), `progress-updater.js` (402 ln), pipeline `--update-progress` mode |
323
+ | 🗓️ Deep Dive Document Generation | ✅ Done | `deep-dive.js` (473 ln), pipeline phase 9 |
324
+ | 📝 Dynamic Mode (doc-only generation) | ✅ Done | `dynamic-mode.js` (494 ln), pipeline `--dynamic` route |
325
+ | 🤖 Runtime Model Selection | ✅ Done | `config.js` model registry, `cli.js` selector, `--model` flag |
326
+
327
+ ---
328
+
329
+ ### Tier 1: High-Impact, Medium Effort
330
+
331
+ #### 🔊 Speaker Diarization & Attribution
332
+ **What**: Automatically identify who is speaking at each moment in the video.
333
+ **How**: Use Gemini's audio understanding or integrate a dedicated diarization API (e.g., AssemblyAI, Deepgram) as a preprocessing step. Map speaker segments to VTT timestamps.
334
+ **Impact**: Dramatically improves action item attribution ("Mohamed said X" vs. "someone said X"). Currently relies on Gemini inferring speakers from VTT voice tags or contextual clues.
335
+ **Modules affected**: New `services/diarization.js`, updates to `gemini.js` content building, `context-manager.js` for speaker-aware slicing.
336
+
337
+ #### 🌐 Web Dashboard / Viewer
338
+ **What**: A browser-based UI to view analysis results interactively — filter by ticket, search, click timestamps to jump in video.
339
+ **How**: Generate a self-contained HTML file alongside the MD output (embed results.json). Or build a lightweight React/Next.js viewer that reads from Firebase.
340
+ **Impact**: Transforms the tool from CLI-output to a proper product. Stakeholders who don't use VS Code can access results.
341
+ **Modules affected**: New `renderers/html.js` or separate `viewer/` project. Firebase integration for hosted version.
342
+
343
+ ---
344
+
345
+ ### Tier 2: Differentiation Features
346
+
347
+ #### 🎯 Task Board Integration (Azure DevOps / Jira / Linear)
348
+ **What**: Push extracted action items and tickets directly to your project management tool.
349
+ **How**: After compilation, map extracted items to work item templates. Use Azure DevOps REST API / Jira API / Linear API to create/update items. Cross-reference extracted CR numbers with existing work items.
350
+ **Impact**: Closes the loop — call discussions automatically become tracked work items. No manual "meeting notes → task creation" step.
351
+ **Modules affected**: New `services/task-board.js`, integration config in `config.js`, new CLI flags (`--push-to-jira`, `--sync-devops`).
352
+
353
+ #### 🎙️ Real-Time / Live Analysis Mode
354
+ **What**: Analyze calls as they happen, producing running analysis instead of post-call batch processing.
355
+ **How**: Stream audio/video chunks to Gemini in real-time using Live API. Maintain a rolling context window. Produce incremental analysis updates.
356
+ **Impact**: During the call, participants see extracted items appearing in real-time. Post-call report is instant.
357
+ **Modules affected**: New `services/live-stream.js`, new `pipeline-live.js`, WebSocket output to a dashboard.
358
+
359
+ ---
360
+
361
+ ### Tier 3: Platform Evolution
362
+
363
+ #### 🏗️ Plugin Architecture
364
+ **What**: Allow custom plugins for different output formats, analysis types, and integrations.
365
+ **How**: Define hook points: `onSegmentAnalyzed`, `onCompiled`, `onOutput`. Plugins register handlers. Ship with built-in plugins (markdown, json, firebase). Community can add: Slack notifications, email summaries, PDF reports, custom prompts per team.
366
+ **Impact**: Transforms from a single-purpose tool to a platform. Different teams customize for their workflow.
367
+
368
+ #### 🤖 Multi-Model Support
369
+ **What**: Support different AI models beyond Gemini — OpenAI GPT-4o, Claude, Llama local models.
370
+ **Status**: *Partially implemented in v7.2* — runtime model selection across 5 Gemini models with `--model` flag and interactive selector. Full multi-provider abstraction (OpenAI, Claude, local) remains a future enhancement.
371
+ **Next step**: Abstract the AI service behind a provider interface. Each provider implements: `upload()`, `analyze()`, `compile()`. Config selects the active provider.
372
+ **Impact**: Users choose the best model for their budget/accuracy needs. Can run local models for sensitive content. Enables A/B testing between models.
373
+
374
+ #### 📱 Mobile App / Bot
375
+ **What**: Telegram/Teams/Slack bot that accepts video links and returns analysis.
376
+ **How**: Bot receives a shared video/meeting link → triggers pipeline → sends back the compiled Markdown or a link to the web dashboard.
377
+ **Impact**: Zero-friction usage — share a link, get a task summary. No CLI needed.
378
+
379
+ #### 🔐 Multi-Tenant SaaS
380
+ **What**: Hosted version where teams sign up, configure their projects, and get analysis as a service.
381
+ **How**: Next.js frontend, Node.js API (reusing current pipeline), per-team Firebase/S3 storage, Stripe billing, queue-based processing.
382
+ **Impact**: Commercial product. Teams pay per call analyzed. Revenue model.
383
+
384
+ ---
385
+
386
+ ### Tier 4: Polish & Reliability
387
+
388
+ #### 🧪 Test Suite
389
+ **What**: Unit tests for all utility modules, integration tests for the pipeline.
390
+ **How**: Jest or Vitest. Mock Gemini API responses. Test quality gate scoring with fixtures. Test JSON parser with known-bad inputs. Test adaptive budget calculations. Test focused-reanalysis merge logic. Test diff-engine comparisons. Test learning-loop trend analysis.
391
+ **Impact**: Confidence in changes. CI/CD pipeline with automated testing. Prevents regressions.
392
+ **Priority modules to test**: `quality-gate.js`, `adaptive-budget.js`, `json-parser.js`, `context-manager.js`, `cost-tracker.js`, `focused-reanalysis.js`, `diff-engine.js`, `learning-loop.js`.
393
+
394
+ #### 📦 ~~Packaging & Distribution~~ ✅ Done (v8.0.0)
395
+ **Status**: Published as `task-summary-extractor` on npm. Global CLI: `taskex`. Install: `npm i -g task-summary-extractor`.
396
+ **What was done**: `bin/taskex.js` entry point, `--gemini-key`/`--firebase-*` CLI config flags, CWD-based `.env` resolution, `PKG_ROOT`/`PROJECT_ROOT` path split for global compatibility.
397
+
398
+ #### 🔍 Advanced Observability (OpenTelemetry)
399
+ **What**: Extend the existing structured JSONL logging with OpenTelemetry trace export for external monitoring.
400
+ **How**: Wrap existing `phaseStart`/`phaseEnd` spans with OTel SDK. Export traces to Jaeger/Grafana. Add alert rules on quality metric degradation.
401
+ **Impact**: Production monitoring. Performance profiling across runs. Alert on quality regression trends.
402
+ **Note**: Basic structured logging is already done in v6. This extends it to distributed tracing systems.
403
+
404
+ #### 🌍 i18n Prompt Library
405
+ **What**: Support different language pairs beyond Arabic+English. Ship prompt templates per domain.
406
+ **How**: Move prompt.json to a `prompts/` directory with variants: `arabic-english-dotnet.json`, `spanish-english-react.json`, `french-english-java.json`. CLI flag: `--prompt-template react-english`.
407
+ **Impact**: Anyone can use this tool regardless of their team's language or tech stack.
408
+
409
+ ---
410
+
411
+ ### Quick Wins (< 1 day each)
412
+
413
+ | Feature | Effort | Impact |
414
+ |---------|--------|--------|
415
+ | **Email summary** — send compiled MD via SMTP after processing | ~2 hrs | Users get results in inbox |
416
+ | **Slack webhook** — post summary to a channel | ~1 hr | Team-wide visibility |
417
+ | **Segment preview** — show first 3 VTT lines per segment before analyzing | ~30 min | Better UX during processing |
418
+ | **Custom output templates** — Handlebars/Mustache for MD output | ~4 hrs | Teams customize report format |
419
+ | **Audio-only mode** — support .mp3/.wav without video | ~2 hrs | Works for phone calls, podcasts |
420
+ | **Watch mode** — monitor a folder and auto-process new recordings | ~3 hrs | Hands-free automation |
421
+ | **Git integration** — auto-commit results to repo | ~1 hr | Version-controlled meeting history |
422
+ | **Confidence threshold filter** — CLI flag to exclude LOW confidence items from output | ~1 hr | Cleaner reports on demand |
423
+ | **History viewer** — CLI command to print learning loop trends without running pipeline | ~2 hrs | Introspect past performance |
424
+
425
+ ---
426
+
427
+ ### Recommended Next Sprint
428
+
429
+ Based on impact vs. effort, here's a suggested 5-item sprint building on v7.2:
430
+
431
+ 1. **Test suite foundation** — Jest setup + tests for quality-gate, adaptive-budget, json-parser, focused-reanalysis, diff-engine, learning-loop (1.5 days)
432
+ 2. **Web dashboard / viewer** — Self-contained HTML report with filtering and video timestamp links (2 days)
433
+ 3. **Speaker diarization** — Gemini audio understanding for speaker attribution (1.5 days)
434
+ 4. **Task board integration** — Push tickets/CRs to Azure DevOps or Jira (1.5 days)
435
+ 5. **Slack/email notification** — Post compiled results automatically (half day)
436
+
437
+ These five deliver: reliability (tests), accessibility (dashboard), accuracy (speakers), workflow integration (task board), and team visibility (notifications).
438
+
439
+ ---
440
+
441
+ *Generated from the v8.0.0 codebase — 31 files, ~10,300 lines of self-improving pipeline intelligence. npm: `task-summary-extractor` · CLI: `taskex`*
442
+
443
+ ---
444
+
445
+ ## See Also
446
+
447
+ | Doc | What's In It |
448
+ |-----|-------------|
449
+ | 📖 [README.md](README.md) | Setup, CLI flags, configuration, features |
450
+ | 📖 [QUICK_START.md](QUICK_START.md) | Step-by-step first-time walkthrough |
451
+ | 🏗️ [ARCHITECTURE.md](ARCHITECTURE.md) | Pipeline phases, processing flows, Mermaid diagrams |