task-summary-extractor 8.3.0 → 9.0.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/.env.example +38 -0
- package/ARCHITECTURE.md +99 -3
- package/EXPLORATION.md +148 -89
- package/QUICK_START.md +5 -2
- package/README.md +51 -7
- package/bin/taskex.js +11 -4
- package/package.json +38 -5
- package/src/config.js +52 -3
- package/src/modes/focused-reanalysis.js +2 -1
- package/src/modes/progress-updater.js +1 -1
- package/src/phases/_shared.js +43 -0
- package/src/phases/compile.js +101 -0
- package/src/phases/deep-dive.js +118 -0
- package/src/phases/discover.js +178 -0
- package/src/phases/init.js +192 -0
- package/src/phases/output.js +238 -0
- package/src/phases/process-media.js +633 -0
- package/src/phases/services.js +104 -0
- package/src/phases/summary.js +86 -0
- package/src/pipeline.js +431 -1463
- package/src/renderers/docx.js +531 -0
- package/src/renderers/html.js +672 -0
- package/src/renderers/markdown.js +15 -183
- package/src/renderers/pdf.js +90 -0
- package/src/renderers/shared.js +211 -0
- package/src/schemas/analysis-compiled.schema.json +381 -0
- package/src/schemas/analysis-segment.schema.json +380 -0
- package/src/services/doc-parser.js +346 -0
- package/src/services/gemini.js +101 -44
- package/src/services/video.js +123 -8
- package/src/utils/adaptive-budget.js +6 -4
- package/src/utils/checkpoint.js +2 -1
- package/src/utils/cli.js +131 -110
- package/src/utils/colors.js +83 -0
- package/src/utils/confidence-filter.js +138 -0
- package/src/utils/diff-engine.js +2 -1
- package/src/utils/global-config.js +6 -5
- package/src/utils/health-dashboard.js +11 -9
- package/src/utils/json-parser.js +4 -2
- package/src/utils/learning-loop.js +3 -2
- package/src/utils/progress-bar.js +286 -0
- package/src/utils/quality-gate.js +4 -2
- package/src/utils/retry.js +3 -1
- package/src/utils/schema-validator.js +314 -0
package/EXPLORATION.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Task Summary Extractor — Where We Are & Where We Can Go
|
|
2
2
|
|
|
3
|
-
> **Version
|
|
3
|
+
> **Version 9.0.0** — March 2026
|
|
4
4
|
> Module map, codebase stats, and future roadmap.
|
|
5
5
|
> For setup and CLI reference, see [README.md](README.md) · [Quick Start](QUICK_START.md)
|
|
6
6
|
> For architecture diagrams and algorithms, see [ARCHITECTURE.md](ARCHITECTURE.md)
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
|
|
12
12
|
### Architecture Overview
|
|
13
13
|
|
|
14
|
-
```
|
|
14
|
+
```text
|
|
15
15
|
┌─────────────────────────────────────────────────────────────────────┐
|
|
16
16
|
│ taskex (bin/taskex.js) or process_and_upload.js │
|
|
17
17
|
│ (Entry Points) │
|
|
18
18
|
└─────────────────────────┬───────────────────────────────────────────┘
|
|
19
19
|
│
|
|
20
20
|
┌─────────────────────────▼───────────────────────────────────────────┐
|
|
21
|
-
│ pipeline.js (
|
|
22
|
-
│
|
|
21
|
+
│ pipeline.js (~920 lines) │
|
|
22
|
+
│ 9-Phase Orchestrator + src/phases/ │
|
|
23
23
|
│ │
|
|
24
24
|
│ Init ──────► Discover ──► Services ──► ProcessVideo ──► Compile │
|
|
25
25
|
│ │ learning │ │ │ │
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
│ │ loaded │ For each │ Engine │
|
|
28
28
|
│ │ │ segment: │ │ │
|
|
29
29
|
│ │ │ ┌─────────┐ │ Output │
|
|
30
|
-
│ │ │ │Compress │ │
|
|
31
|
-
│ │ │ │Upload │ │
|
|
30
|
+
│ │ │ │Compress │ │ (MD+HTML) │
|
|
31
|
+
│ │ │ │Upload │ │ │ │
|
|
32
32
|
│ │ │ │Analyze ◄──┼── Quality Gate │
|
|
33
33
|
│ │ │ │ ↻Retry │ │ + Confidence│
|
|
34
34
|
│ │ │ │ 🔍Focus │ │ Scoring │
|
|
@@ -36,43 +36,47 @@
|
|
|
36
36
|
│ │ └─────────────┘ Summary │
|
|
37
37
|
│ │ │ │
|
|
38
38
|
│ └──────────────────── learning history saved ◄──────────┘ │
|
|
39
|
-
|
|
40
|
-
│ │ │ │
|
|
41
|
-
┌────▼───┐ ┌───▼──────┐ ┌▼────────┐ ┌▼─────┐
|
|
42
|
-
│Services│ │ Utils │ │Renderers│ │Logger│ │ Config
|
|
43
|
-
│ │ │ │ │ │ │ │ │
|
|
44
|
-
│gemini │ │quality │ │markdown │ │JSONL │ │dotenv
|
|
45
|
-
│firebase│ │-gate │ │(
|
|
46
|
-
│video │ │
|
|
47
|
-
│git │
|
|
48
|
-
│
|
|
49
|
-
│
|
|
50
|
-
│ │ │
|
|
51
|
-
│ │
|
|
52
|
-
│ │ │
|
|
53
|
-
│ │ │
|
|
54
|
-
│ │ │+
|
|
55
|
-
└────────┘ └──────────┘ └─────────┘ └──────┘
|
|
39
|
+
└────┬──────────┬──────────┬──────────┬──────┬─────────┬─────────────┘
|
|
40
|
+
│ │ │ │ │ │
|
|
41
|
+
┌────▼───┐ ┌───▼──────┐ ┌▼────────┐ ┌▼─────┐ ┌▼─────┐┌▼─────────┐
|
|
42
|
+
│Services│ │ Utils │ │Renderers│ │Logger│ │Schema││ Config │
|
|
43
|
+
│ │ │ │ │ │ │ │ │ ││ │
|
|
44
|
+
│gemini │ │quality │ │markdown │ │JSONL │ │seg ││dotenv │
|
|
45
|
+
│firebase│ │-gate │ │(801 ln) │ │struct│ │comp ││validation│
|
|
46
|
+
│video │ │colors │ │html.js │ │spans │ │ ││env helper│
|
|
47
|
+
│git │ │progress │ │(673 ln) │ │phases│ │ ││model reg │
|
|
48
|
+
│doc- │ │-bar │ │pdf.js │ │metric│ │ ││ │
|
|
49
|
+
│parser │ │confidence│ │docx.js │ │ │ │ ││ │
|
|
50
|
+
│ │ │-filter │ │shared │ │ │ │ ││ │
|
|
51
|
+
│ │ │ │ │(212 ln) │ │ │ │ ││ │
|
|
52
|
+
│ │ │schema- │ │ │ │ │ │ ││ │
|
|
53
|
+
│ │ │validator │ │ │ │ │ │ ││ │
|
|
54
|
+
│ │ │+15 more │ │ │ │ │ │ ││ │
|
|
55
|
+
└────────┘ └──────────┘ └─────────┘ └──────┘ └──────┘└──────────┘
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
### Codebase Stats
|
|
59
59
|
|
|
60
60
|
| Category | Files | Lines |
|
|
61
|
-
|
|
62
|
-
| Pipeline orchestrator | 1 |
|
|
63
|
-
|
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
|
|
|
68
|
-
|
|
|
69
|
-
|
|
|
70
|
-
|
|
|
61
|
+
| ---------- | ------- | ------- |
|
|
62
|
+
| Pipeline orchestrator | 1 | ~920 |
|
|
63
|
+
| Pipeline phases (`src/phases/`) | 9 | ~1,800 |
|
|
64
|
+
| Services (Gemini, Firebase, Video, Git, Doc-Parser) | 5 | ~1,650 |
|
|
65
|
+
| Modes (AI pipeline phases) | 5 | 2,054 |
|
|
66
|
+
| Utilities (19 modules) | 19 | ~4,100 |
|
|
67
|
+
| Renderers (markdown, html, pdf, docx, shared) | 5 | ~2,100 |
|
|
68
|
+
| Config + Logger | 2 | 597 |
|
|
69
|
+
| Schemas (JSON) | 2 | ~400 |
|
|
70
|
+
| Entry points (taskex + legacy) | 2 | 79 |
|
|
71
|
+
| Setup script | 1 | 418 |
|
|
72
|
+
| Prompt (JSON) | 1 | 333 |
|
|
73
|
+
| Tests (vitest) | 13 | ~3,200 |
|
|
74
|
+
| **Total** | **~63 files** | **~13,000+ lines** |
|
|
71
75
|
|
|
72
76
|
### Version History
|
|
73
77
|
|
|
74
78
|
| Version | Theme | Key Additions |
|
|
75
|
-
|
|
79
|
+
| --------- | ------- | --------------- |
|
|
76
80
|
| **v3** | Core Improvements | dotenv, logger, retry logic, CLI args, graceful shutdown, config validation, progress persistence, error handling, video fixes, parallel uploads |
|
|
77
81
|
| **v4** | Architecture & Orchestration | Phase decomposition (7 phases), CostTracker, configurable thinking budget, poll timeouts, dead code cleanup, no `process.exit()`, CLI enhancements |
|
|
78
82
|
| **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 |
|
|
@@ -84,49 +88,55 @@
|
|
|
84
88
|
| **v7.2** | Model Selection | Interactive model selector, `--model` flag, 5-model registry with pricing, runtime model switching |
|
|
85
89
|
| **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
90
|
| **v7.2.2** | Upload Control | `--force-upload` to re-upload existing files, `--no-storage-url` to force Gemini File API, production-ready docs |
|
|
91
|
+
| **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 |
|
|
92
|
+
| **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` |
|
|
87
93
|
| **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
94
|
| **v8.2.0** | Architecture Cleanup | `src/modes/` for AI pipeline phases, `retry.js` self-contained defaults, dead code removal, export trimming, `process_and_upload.js` slim shim, `progress.js` → `checkpoint.js`, merged `prompt.js` into `cli.js` |
|
|
89
95
|
| **v8.3.0** | Universal Content Analysis | prompt.json v4.0.0 — input type auto-detection (video/audio/document/mixed), timestamps conditional, domain-adaptive extraction for any content source, gemini.js bridge text generalized |
|
|
90
|
-
| **
|
|
91
|
-
| **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 |
|
|
96
|
+
| **v9.0.0** | CLI UX + Pipeline Decomposition | Colors & progress bar, HTML reports (`results.html`), PDF & DOCX output (`results.pdf`, `results.docx`), JSON Schema validation (`src/schemas/`), confidence filter (`--min-confidence`), pipeline decomposed into `src/phases/` (9 modules), test suite (285 tests via vitest), multi-format output (`--format`: md/html/json/pdf/docx/all), doc-parser service, shared renderer utilities |
|
|
92
97
|
|
|
93
98
|
### What v6 Delivers
|
|
94
99
|
|
|
95
100
|
#### 1. Confidence Scoring Per Extracted Item
|
|
101
|
+
|
|
96
102
|
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.
|
|
97
103
|
|
|
98
104
|
| Confidence | Meaning | Example |
|
|
99
|
-
|
|
105
|
+
| ------------ | --------- | --------- |
|
|
100
106
|
| **HIGH** | Explicitly stated + corroborated by docs/context | "Mentioned by name with ticket ID in VTT and Azure DevOps" |
|
|
101
107
|
| **MEDIUM** | Partially stated or single-source | "Discussed verbally but no written reference" |
|
|
102
108
|
| **LOW** | Inferred from context, not directly stated | "Implied from related discussion, not explicitly assigned" |
|
|
103
109
|
|
|
104
110
|
**Where it shows up:**
|
|
105
|
-
- **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.
|
|
106
|
-
- **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.
|
|
107
|
-
- **Prompt** (`prompt.json` — 265 lines): Explicit confidence scoring instructions injected into extraction prompt. Self-verification checklist updated.
|
|
108
111
|
|
|
109
|
-
|
|
112
|
+
- **Quality Gate** (`quality-gate.js` — 366 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.
|
|
113
|
+
- **Markdown Renderer** (`markdown.js` — 879 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.
|
|
114
|
+
- **Prompt** (`prompt.json` — 333 lines): Explicit confidence scoring instructions injected into extraction prompt. Self-verification checklist updated.
|
|
115
|
+
|
|
116
|
+
#### 2. Focused Re-Analysis (`focused-reanalysis.js` — 268 lines)
|
|
117
|
+
|
|
110
118
|
When the quality gate identifies specific weak dimensions (score <60, ≥2 weak areas), a **targeted second pass** runs instead of a full re-analysis.
|
|
111
119
|
|
|
112
120
|
| Component | What It Does |
|
|
113
|
-
|
|
121
|
+
| ----------- | -------------- |
|
|
114
122
|
| `identifyWeaknesses()` | Analyzes quality dimensions + confidence coverage to find gaps (missing tickets, sparse assignees, low confidence items, broken cross-refs) |
|
|
115
123
|
| `runFocusedPass()` | Sends a focused Gemini prompt targeting ONLY the weak areas, with reduced thinking budget (12K tokens) |
|
|
116
124
|
| `mergeFocusedResults()` | Intelligent merge: updates existing items by ID, appends new items, marks `_enhanced_by_focused_pass` / `_from_focused_pass` |
|
|
117
125
|
|
|
118
126
|
**Pipeline integration**: Runs after the quality gate + retry cycle for each segment. Controlled by `--no-focused-pass` flag. Costs tracked separately in cost tracker.
|
|
119
127
|
|
|
120
|
-
#### 3. Learning & Improvement Loop (`learning-loop.js` —
|
|
128
|
+
#### 3. Learning & Improvement Loop (`learning-loop.js` — 269 lines)
|
|
129
|
+
|
|
121
130
|
The pipeline remembers its past performance and auto-tunes for the future.
|
|
122
131
|
|
|
123
132
|
**How it works:**
|
|
133
|
+
|
|
124
134
|
1. **Before processing**: `loadHistory()` reads `history.json` (up to 50 past runs), `analyzeHistory()` computes trends and budget adjustments
|
|
125
135
|
2. **Budget auto-tuning**: If avg quality <45 across recent runs → boost thinking budget +4096 tokens. If >80 → reduce by 2048 to save cost.
|
|
126
136
|
3. **Retry effectiveness**: Tracks whether retries actually improve quality. If retry success rate <30%, recommends increasing base budget instead.
|
|
127
137
|
4. **After processing**: `saveHistory()` persists compact metrics (quality scores, extraction counts, costs, budgets, retry stats) for the next run.
|
|
128
138
|
|
|
129
|
-
```
|
|
139
|
+
```text
|
|
130
140
|
📈 Learning Insights:
|
|
131
141
|
Historical runs : 12
|
|
132
142
|
Quality trend : improving (avg: 74/100)
|
|
@@ -136,11 +146,12 @@ The pipeline remembers its past performance and auto-tunes for the future.
|
|
|
136
146
|
• Focused re-analysis was used in 3/10 runs — system is self-correcting effectively
|
|
137
147
|
```
|
|
138
148
|
|
|
139
|
-
#### 4. Diff-Aware Compilation (`diff-engine.js` —
|
|
149
|
+
#### 4. Diff-Aware Compilation (`diff-engine.js` — 277 lines)
|
|
150
|
+
|
|
140
151
|
Compares the current run's compiled analysis against the previous run to produce a delta report.
|
|
141
152
|
|
|
142
153
|
| Diff Category | What's Detected |
|
|
143
|
-
|
|
154
|
+
| --------------- | ----------------- |
|
|
144
155
|
| **New items** | Tickets, CRs, action items, blockers, scope changes that didn't exist before |
|
|
145
156
|
| **Removed items** | Items from the previous run that no longer appear |
|
|
146
157
|
| **Changed items** | Status, priority, assignee, or confidence changes on existing items |
|
|
@@ -148,23 +159,27 @@ Compares the current run's compiled analysis against the previous run to produce
|
|
|
148
159
|
|
|
149
160
|
**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.
|
|
150
161
|
|
|
151
|
-
#### 5. Structured Logging & Observability (`logger.js` —
|
|
162
|
+
#### 5. Structured Logging & Observability (`logger.js` — 306 lines)
|
|
163
|
+
|
|
152
164
|
The logger now writes **three parallel outputs**:
|
|
153
165
|
|
|
154
166
|
| Output | Format | Purpose |
|
|
155
|
-
|
|
167
|
+
| -------- | -------- | --------- |
|
|
156
168
|
| `*_detailed.log` | Human-readable | Full debug/info/warn/error messages |
|
|
157
169
|
| `*_minimal.log` | Compact steps | Steps + timestamps only |
|
|
158
170
|
| `*_structured.jsonl` | Machine-readable JSONL | Every event as a JSON object with level, timestamp, context, phase |
|
|
159
171
|
|
|
160
172
|
**New capabilities:**
|
|
173
|
+
|
|
161
174
|
- **Phase spans**: `phaseStart(name)` / `phaseEnd(meta)` track timing per pipeline phase with structured records
|
|
162
175
|
- **Operation context**: `setContext()` / `clearContext()` stack for enriching log entries with segment/operation metadata
|
|
163
176
|
- **Structured metrics**: `metric(name, value)` for recording quantitative data (confidence coverage, token counts, etc.)
|
|
164
177
|
- All phase timers auto-emit structured span events
|
|
165
178
|
|
|
166
|
-
#### 6. Enhanced Quality Gate (`quality-gate.js` —
|
|
179
|
+
#### 6. Enhanced Quality Gate (`quality-gate.js` — 366 lines)
|
|
180
|
+
|
|
167
181
|
**New in v6:** Confidence coverage is now a scoring dimension within density (15 points):
|
|
182
|
+
|
|
168
183
|
- Checks percentage of items with valid confidence fields
|
|
169
184
|
- Detects suspicious uniformity (all same confidence = likely not calibrated)
|
|
170
185
|
- New `getConfidenceStats(analysis)` export returns `{total, high, medium, low, missing, coverage}`
|
|
@@ -173,7 +188,7 @@ The logger now writes **three parallel outputs**:
|
|
|
173
188
|
### All v5 Features Retained
|
|
174
189
|
|
|
175
190
|
| Feature | Module | Description |
|
|
176
|
-
|
|
191
|
+
| --------- | -------- | ------------- |
|
|
177
192
|
| Quality Gate | `quality-gate.js` | 4-dimension scoring (structure, density, integrity, cross-refs), auto-retry on FAIL |
|
|
178
193
|
| Adaptive Thinking Budget | `adaptive-budget.js` | Segment position, complexity, context docs → dynamic 8K–32K range |
|
|
179
194
|
| Smart Boundary Detection | `context-manager.js` | Mid-conversation detection, open ticket carry-forward, continuity hints |
|
|
@@ -183,7 +198,7 @@ The logger now writes **three parallel outputs**:
|
|
|
183
198
|
### Current Capabilities
|
|
184
199
|
|
|
185
200
|
| Capability | Status | Description |
|
|
186
|
-
|
|
201
|
+
| ------------ | -------- | ------------- |
|
|
187
202
|
| Video compression | ✅ Mature | ffmpeg-based, CRF, configurable speed/preset |
|
|
188
203
|
| Video segmentation | ✅ Mature | Time-based splitting, segment pre-validation |
|
|
189
204
|
| Firebase upload | ✅ Mature | Parallel, retry, skip-existing, anonymous auth, async I/O, `--force-upload` re-upload |
|
|
@@ -207,7 +222,7 @@ The logger now writes **three parallel outputs**:
|
|
|
207
222
|
|
|
208
223
|
### CLI Reference
|
|
209
224
|
|
|
210
|
-
```
|
|
225
|
+
```text
|
|
211
226
|
Usage: taskex [options] [folder]
|
|
212
227
|
|
|
213
228
|
Install: npm i -g task-summary-extractor
|
|
@@ -257,6 +272,11 @@ Tuning:
|
|
|
257
272
|
--no-learning Disable learning loop
|
|
258
273
|
--no-diff Disable diff comparison
|
|
259
274
|
|
|
275
|
+
Output:
|
|
276
|
+
--format <type> Output format: md, html, json, pdf, docx, all (default: md)
|
|
277
|
+
--min-confidence <level> Filter by confidence: high, medium, low
|
|
278
|
+
--no-html Suppress HTML report generation
|
|
279
|
+
|
|
260
280
|
Info:
|
|
261
281
|
--help, -h Show help
|
|
262
282
|
--version, -v Show version
|
|
@@ -264,14 +284,24 @@ Info:
|
|
|
264
284
|
|
|
265
285
|
### Full Module Map
|
|
266
286
|
|
|
267
|
-
```
|
|
287
|
+
```text
|
|
268
288
|
bin/
|
|
269
|
-
└── taskex.js
|
|
289
|
+
└── taskex.js 65 ln ★ v8.0.0 — Global CLI entry point, config flag injection
|
|
270
290
|
|
|
271
291
|
src/
|
|
272
|
-
├── config.js
|
|
292
|
+
├── config.js 291 ln Central config, env vars, model registry, validation
|
|
273
293
|
├── logger.js 306 ln ★ v6 — Triple output: detailed + minimal + structured JSONL, phase spans, metrics
|
|
274
|
-
├── pipeline.js
|
|
294
|
+
├── pipeline.js ~920 ln Multi-mode orchestrator with lazy phase imports, Storage URL optimization, upload control flags, learning loop, diff engine
|
|
295
|
+
├── phases/ ★ v9.0.0 — Decomposed pipeline phase modules
|
|
296
|
+
│ ├── _shared.js Shared phase utilities (logging, error helpers)
|
|
297
|
+
│ ├── init.js Phase 1: CLI parsing, config validation, logger setup
|
|
298
|
+
│ ├── discover.js Phase 2: Find videos/audio, discover docs, resolve name
|
|
299
|
+
│ ├── services.js Phase 3: Firebase auth, Gemini init, doc prep
|
|
300
|
+
│ ├── process-media.js Phase 4: Compress, upload, analyze, quality gate
|
|
301
|
+
│ ├── compile.js Phase 5: Cross-segment compilation, diff engine
|
|
302
|
+
│ ├── output.js Phase 6: Write JSON, render MD + HTML
|
|
303
|
+
│ ├── summary.js Phase 8: Save learning history, print summary
|
|
304
|
+
│ └── deep-dive.js Phase 9: Optional deep-dive generation
|
|
275
305
|
├── modes/ ★ v8.2.0 — AI-heavy pipeline phase modules
|
|
276
306
|
│ ├── change-detector.js 417 ln Git-based change correlation engine
|
|
277
307
|
│ ├── deep-dive.js 473 ln ★ v6.2 — Topic discovery, parallel doc generation, index builder
|
|
@@ -279,32 +309,45 @@ src/
|
|
|
279
309
|
│ ├── focused-reanalysis.js 268 ln ★ v6 — Weakness detection, targeted second pass, intelligent merge
|
|
280
310
|
│ └── progress-updater.js 402 ln ★ v6.1 — AI-powered progress assessment, status report generation
|
|
281
311
|
├── renderers/
|
|
282
|
-
│
|
|
312
|
+
│ ├── markdown.js 801 ln ★ v6 — Confidence badges (🟢🟡🔴), confidence distribution table, diff section
|
|
313
|
+
│ ├── html.js 673 ln ★ v9.0.0 — Self-contained HTML report: collapsible sections, confidence badges, filtering, dark mode
|
|
314
|
+
│ ├── pdf.js ★ v9.0.0 — PDF report renderer: HTML → PDF conversion via puppeteer
|
|
315
|
+
│ ├── docx.js ★ v9.0.0 — DOCX report renderer: programmatic Word document via docx npm package
|
|
316
|
+
│ └── shared.js 212 ln ★ v9.0.0 — Shared renderer utilities (name clustering, dedup, formatting)
|
|
283
317
|
├── services/
|
|
284
318
|
│ ├── firebase.js 92 ln Init, upload, exists check (with retry, async I/O)
|
|
285
319
|
│ ├── gemini.js 677 ln ★ v7.2.1 — 3-strategy file resolution, External URL support, cleanup, doc prep, analysis, compilation
|
|
286
|
-
│ ├── git.js
|
|
287
|
-
│
|
|
320
|
+
│ ├── git.js 264 ln ★ v7.2.3 — Git CLI wrapper: log, diff, status, changed files, auto-init
|
|
321
|
+
│ ├── video.js 273 ln ★ v7.2.3 — ffmpeg compress, segment, probe (cross-platform, spawnSync)
|
|
322
|
+
│ └── doc-parser.js 346 ln ★ v9.0.0 — Document text extraction (DOCX, XLSX, PPTX, HTML, ODT, RTF, EPUB)
|
|
288
323
|
└── utils/ Pure utilities — parsing, retry, budget, config
|
|
289
|
-
├── adaptive-budget.js
|
|
324
|
+
├── adaptive-budget.js 230 ln ★ v5 — Transcript complexity → dynamic budget
|
|
290
325
|
├── checkpoint.js 145 ln Checkpoint/resume persistence (renamed from progress.js in v8.2.0)
|
|
291
|
-
├── cli.js
|
|
292
|
-
├── context-manager.js
|
|
326
|
+
├── cli.js 391 ln ★ v8.0.0 — Interactive prompts, model selector, folder picker, config flags, taskex help
|
|
327
|
+
├── context-manager.js 420 ln 4-tier priority, VTT slicing, progressive context, boundary detection
|
|
293
328
|
├── cost-tracker.js 140 ln Token counting, USD cost estimation (+ focused pass tracking)
|
|
294
|
-
├── diff-engine.js
|
|
329
|
+
├── diff-engine.js 277 ln ★ v6 — Cross-run delta: new/removed/changed items, Markdown rendering
|
|
295
330
|
├── format.js 27 ln Duration, bytes formatting
|
|
296
|
-
├── fs.js
|
|
297
|
-
├── global-config.js
|
|
331
|
+
├── fs.js 34 ln Recursive doc finder (skips runs/)
|
|
332
|
+
├── global-config.js 274 ln ★ v8.1.0 — ~/.taskexrc persistent config, interactive setup
|
|
298
333
|
├── health-dashboard.js 191 ln ★ v5 — Quality report, density bars, efficiency metrics
|
|
299
|
-
├── inject-cli-flags.js
|
|
334
|
+
├── inject-cli-flags.js 49 ln ★ v8.1.0 — CLI flag → env var injection
|
|
300
335
|
├── json-parser.js 216 ln 5-strategy JSON extraction + repair
|
|
301
|
-
├── learning-loop.js
|
|
302
|
-
├── quality-gate.js
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
336
|
+
├── learning-loop.js 269 ln ★ v6 — History I/O, trend analysis, budget auto-tuning, recommendations
|
|
337
|
+
├── quality-gate.js 366 ln ★ v6 — 4+1 dimension scoring (+ confidence coverage), retry hints
|
|
338
|
+
├── retry.js 118 ln Exponential backoff, parallel map (self-contained defaults)
|
|
339
|
+
├── colors.js 84 ln ★ v9.0.0 — Zero-dep ANSI color utility (bold, red, green, yellow, cyan, dim, reset)
|
|
340
|
+
├── progress-bar.js 287 ln ★ v9.0.0 — Visual progress bar with phase tracking, ETA, cost display, TTY-aware
|
|
341
|
+
├── confidence-filter.js 130 ln ★ v9.0.0 — Filter extracted items by confidence level (--min-confidence flag)
|
|
342
|
+
└── schema-validator.js 260 ln ★ v9.0.0 — JSON Schema validation using ajv (segment + compiled schemas)
|
|
343
|
+
|
|
344
|
+
schemas/
|
|
345
|
+
├── analysis-segment.schema.json ★ v9.0.0 — JSON Schema for segment analysis output
|
|
346
|
+
└── analysis-compiled.schema.json ★ v9.0.0 — JSON Schema for compiled analysis output
|
|
347
|
+
|
|
348
|
+
prompt.json 333 ln ★ v4.0.0 — Universal content analysis: video, audio, documents, mixed input; auto-detects input type + domain
|
|
306
349
|
process_and_upload.js 14 ln Backward-compatible shim — delegates to bin/taskex.js
|
|
307
|
-
setup.js
|
|
350
|
+
setup.js 418 ln Automated first-time setup & environment validation (v8.0.0)
|
|
308
351
|
```
|
|
309
352
|
|
|
310
353
|
---
|
|
@@ -316,7 +359,7 @@ setup.js 505 ln Automated first-time setup & environment va
|
|
|
316
359
|
The following features from the original exploration have been **fully implemented**:
|
|
317
360
|
|
|
318
361
|
| Feature | Status | Implemented In |
|
|
319
|
-
|
|
362
|
+
| --------- | -------- | ---------------- |
|
|
320
363
|
| 📊 Confidence Scoring Per Extracted Item | ✅ Done | `prompt.json`, `quality-gate.js`, `markdown.js` |
|
|
321
364
|
| 🔄 Multi-Pass Analysis (Focused Re-extraction) | ✅ Done | `modes/focused-reanalysis.js` (268 ln), pipeline integration |
|
|
322
365
|
| 🧠 Learning & Improvement Loop | ✅ Done | `learning-loop.js` (270 ln), pipeline init + save |
|
|
@@ -327,34 +370,44 @@ The following features from the original exploration have been **fully implement
|
|
|
327
370
|
| 🗓️ Deep Dive Document Generation | ✅ Done | `modes/deep-dive.js` (473 ln), pipeline phase 9 |
|
|
328
371
|
| 📝 Dynamic Mode (doc-only generation) | ✅ Done | `modes/dynamic-mode.js` (494 ln), pipeline `--dynamic` route |
|
|
329
372
|
| 🤖 Runtime Model Selection | ✅ Done | `config.js` model registry, `cli.js` selector, `--model` flag |
|
|
373
|
+
| 📊 Progress Bar | ✅ Done | `progress-bar.js` (287 ln), pipeline integration, TTY-aware |
|
|
374
|
+
| 🌐 HTML Report Viewer | ✅ Done | `renderers/html.js` (673 ln), self-contained HTML with filtering, dark mode |
|
|
375
|
+
| 🔧 JSON Schema Validation | ✅ Done | `schema-validator.js` (260 ln), `schemas/` (2 files), ajv-based |
|
|
376
|
+
| 🎯 Confidence Filter | ✅ Done | `confidence-filter.js` (130 ln), `--min-confidence` flag |
|
|
377
|
+
| 🏗️ Pipeline Decomposition | ✅ Done | `src/phases/` (9 modules), `pipeline.js` reduced to ~920 lines |
|
|
378
|
+
| 🧪 Test Suite | ✅ Done | 285 tests across 13 files using vitest |
|
|
379
|
+
| 🎨 ANSI Colors | ✅ Done | `colors.js` (84 ln), zero-dep ANSI color utility wired throughout CLI |
|
|
380
|
+
| 📄 Doc Parser Service | ✅ Done | `doc-parser.js` (346 ln), DOCX/XLSX/PPTX/HTML/ODT/RTF/EPUB extraction |
|
|
330
381
|
|
|
331
382
|
---
|
|
332
383
|
|
|
333
384
|
### Tier 1: High-Impact, Medium Effort
|
|
334
385
|
|
|
335
386
|
#### 🔊 Speaker Diarization & Attribution
|
|
387
|
+
|
|
336
388
|
**What**: Automatically identify who is speaking at each moment in the video.
|
|
337
389
|
**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.
|
|
338
390
|
**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.
|
|
339
391
|
**Modules affected**: New `services/diarization.js`, updates to `gemini.js` content building, `context-manager.js` for speaker-aware slicing.
|
|
340
392
|
|
|
341
|
-
#### 🌐 Web Dashboard / Viewer
|
|
342
|
-
|
|
343
|
-
**
|
|
344
|
-
**
|
|
345
|
-
**Modules affected**: New `renderers/html.js` or separate `viewer/` project. Firebase integration for hosted version.
|
|
393
|
+
#### 🌐 ~~Web Dashboard / Viewer~~ ✅ Done (v9.0.0)
|
|
394
|
+
|
|
395
|
+
**Status**: Implemented as `src/renderers/html.js` — self-contained HTML report with collapsible sections, confidence badges, filtering, dark mode, and print-friendly styling. Generated as `results.html` alongside `results.md`.
|
|
396
|
+
**Next step**: Build a hosted React/Next.js viewer that reads from Firebase for team-wide access.
|
|
346
397
|
|
|
347
398
|
---
|
|
348
399
|
|
|
349
400
|
### Tier 2: Differentiation Features
|
|
350
401
|
|
|
351
402
|
#### 🎯 Task Board Integration (Azure DevOps / Jira / Linear)
|
|
403
|
+
|
|
352
404
|
**What**: Push extracted action items and tickets directly to your project management tool.
|
|
353
405
|
**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.
|
|
354
406
|
**Impact**: Closes the loop — call discussions automatically become tracked work items. No manual "meeting notes → task creation" step.
|
|
355
407
|
**Modules affected**: New `services/task-board.js`, integration config in `config.js`, new CLI flags (`--push-to-jira`, `--sync-devops`).
|
|
356
408
|
|
|
357
409
|
#### 🎙️ Real-Time / Live Analysis Mode
|
|
410
|
+
|
|
358
411
|
**What**: Analyze calls as they happen, producing running analysis instead of post-call batch processing.
|
|
359
412
|
**How**: Stream audio/video chunks to Gemini in real-time using Live API. Maintain a rolling context window. Produce incremental analysis updates.
|
|
360
413
|
**Impact**: During the call, participants see extracted items appearing in real-time. Post-call report is instant.
|
|
@@ -365,22 +418,26 @@ The following features from the original exploration have been **fully implement
|
|
|
365
418
|
### Tier 3: Platform Evolution
|
|
366
419
|
|
|
367
420
|
#### 🏗️ Plugin Architecture
|
|
421
|
+
|
|
368
422
|
**What**: Allow custom plugins for different output formats, analysis types, and integrations.
|
|
369
423
|
**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.
|
|
370
424
|
**Impact**: Transforms from a single-purpose tool to a platform. Different teams customize for their workflow.
|
|
371
425
|
|
|
372
426
|
#### 🤖 Multi-Model Support
|
|
427
|
+
|
|
373
428
|
**What**: Support different AI models beyond Gemini — OpenAI GPT-4o, Claude, Llama local models.
|
|
374
429
|
**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.
|
|
375
430
|
**Next step**: Abstract the AI service behind a provider interface. Each provider implements: `upload()`, `analyze()`, `compile()`. Config selects the active provider.
|
|
376
431
|
**Impact**: Users choose the best model for their budget/accuracy needs. Can run local models for sensitive content. Enables A/B testing between models.
|
|
377
432
|
|
|
378
433
|
#### 📱 Mobile App / Bot
|
|
434
|
+
|
|
379
435
|
**What**: Telegram/Teams/Slack bot that accepts video links and returns analysis.
|
|
380
436
|
**How**: Bot receives a shared video/meeting link → triggers pipeline → sends back the compiled Markdown or a link to the web dashboard.
|
|
381
437
|
**Impact**: Zero-friction usage — share a link, get a task summary. No CLI needed.
|
|
382
438
|
|
|
383
439
|
#### 🔐 Multi-Tenant SaaS
|
|
440
|
+
|
|
384
441
|
**What**: Hosted version where teams sign up, configure their projects, and get analysis as a service.
|
|
385
442
|
**How**: Next.js frontend, Node.js API (reusing current pipeline), per-team Firebase/S3 storage, Stripe billing, queue-based processing.
|
|
386
443
|
**Impact**: Commercial product. Teams pay per call analyzed. Revenue model.
|
|
@@ -389,23 +446,25 @@ The following features from the original exploration have been **fully implement
|
|
|
389
446
|
|
|
390
447
|
### Tier 4: Polish & Reliability
|
|
391
448
|
|
|
392
|
-
#### 🧪 Test Suite
|
|
393
|
-
|
|
394
|
-
**
|
|
395
|
-
**
|
|
396
|
-
**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`.
|
|
449
|
+
#### 🧪 ~~Test Suite~~ ✅ Done (v9.0.0)
|
|
450
|
+
|
|
451
|
+
**Status**: 285 tests across 13 files using vitest. Covers: quality-gate, adaptive-budget, json-parser, confidence-filter, context-manager, diff-engine, format, progress-bar, retry, schema-validator, cli, and renderers (html, markdown).
|
|
452
|
+
**Commands**: `npm test`, `npm run test:watch`, `npm run test:coverage`.
|
|
397
453
|
|
|
398
454
|
#### 📦 ~~Packaging & Distribution~~ ✅ Done (v8.0.0)
|
|
455
|
+
|
|
399
456
|
**Status**: Published as `task-summary-extractor` on npm. Global CLI: `taskex`. Install: `npm i -g task-summary-extractor`.
|
|
400
457
|
**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.
|
|
401
458
|
|
|
402
459
|
#### 🔍 Advanced Observability (OpenTelemetry)
|
|
460
|
+
|
|
403
461
|
**What**: Extend the existing structured JSONL logging with OpenTelemetry trace export for external monitoring.
|
|
404
462
|
**How**: Wrap existing `phaseStart`/`phaseEnd` spans with OTel SDK. Export traces to Jaeger/Grafana. Add alert rules on quality metric degradation.
|
|
405
463
|
**Impact**: Production monitoring. Performance profiling across runs. Alert on quality regression trends.
|
|
406
464
|
**Note**: Basic structured logging is already done in v6. This extends it to distributed tracing systems.
|
|
407
465
|
|
|
408
466
|
#### 🌍 i18n Prompt Library
|
|
467
|
+
|
|
409
468
|
**What**: Support different language pairs beyond Arabic+English. Ship prompt templates per domain.
|
|
410
469
|
**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`.
|
|
411
470
|
**Impact**: Anyone can use this tool regardless of their team's language or tech stack.
|
|
@@ -415,7 +474,7 @@ The following features from the original exploration have been **fully implement
|
|
|
415
474
|
### Quick Wins (< 1 day each)
|
|
416
475
|
|
|
417
476
|
| Feature | Effort | Impact |
|
|
418
|
-
|
|
477
|
+
| --------- | -------- | -------- |
|
|
419
478
|
| **Email summary** — send compiled MD via SMTP after processing | ~2 hrs | Users get results in inbox |
|
|
420
479
|
| **Slack webhook** — post summary to a channel | ~1 hr | Team-wide visibility |
|
|
421
480
|
| **Segment preview** — show first 3 VTT lines per segment before analyzing | ~30 min | Better UX during processing |
|
|
@@ -423,7 +482,7 @@ The following features from the original exploration have been **fully implement
|
|
|
423
482
|
| **~~Audio-only mode~~** | ~~Done~~ | prompt.json v4.0.0 supports audio/doc/mixed — pipeline video requirement is next |
|
|
424
483
|
| **Watch mode** — monitor a folder and auto-process new recordings | ~3 hrs | Hands-free automation |
|
|
425
484
|
| **Git integration** — auto-commit results to repo | ~1 hr | Version-controlled meeting history |
|
|
426
|
-
| **Confidence threshold filter**
|
|
485
|
+
| **Confidence threshold filter** | ~~Done~~ | ★ v9.0.0 `--min-confidence` flag implemented in `confidence-filter.js` |
|
|
427
486
|
| **History viewer** — CLI command to print learning loop trends without running pipeline | ~2 hrs | Introspect past performance |
|
|
428
487
|
|
|
429
488
|
---
|
|
@@ -432,8 +491,8 @@ The following features from the original exploration have been **fully implement
|
|
|
432
491
|
|
|
433
492
|
Based on impact vs. effort, here's a suggested 5-item sprint building on v7.2:
|
|
434
493
|
|
|
435
|
-
1.
|
|
436
|
-
2.
|
|
494
|
+
1. **~~Test suite foundation~~** — ✅ Done (v9.0.0) — 285 tests across 13 files using vitest
|
|
495
|
+
2. **~~Web dashboard / viewer~~** — ✅ Done (v9.0.0) — Self-contained HTML report with filtering and collapsible sections
|
|
437
496
|
3. **Speaker diarization** — Gemini audio understanding for speaker attribution (1.5 days)
|
|
438
497
|
4. **Task board integration** — Push tickets/CRs to Azure DevOps or Jira (1.5 days)
|
|
439
498
|
5. **Slack/email notification** — Post compiled results automatically (half day)
|
|
@@ -442,14 +501,14 @@ These five deliver: reliability (tests), accessibility (dashboard), accuracy (sp
|
|
|
442
501
|
|
|
443
502
|
---
|
|
444
503
|
|
|
445
|
-
*Generated from the
|
|
504
|
+
*Generated from the v9.0.0 codebase — ~63 files, ~13,000+ lines of self-improving pipeline intelligence. npm: `task-summary-extractor` · CLI: `taskex`*
|
|
446
505
|
|
|
447
506
|
---
|
|
448
507
|
|
|
449
508
|
## See Also
|
|
450
509
|
|
|
451
510
|
| Doc | What's In It |
|
|
452
|
-
|
|
511
|
+
| ----- | ------------- |
|
|
453
512
|
| 📖 [README.md](README.md) | Setup, CLI flags, configuration, features |
|
|
454
513
|
| 📖 [QUICK_START.md](QUICK_START.md) | Step-by-step first-time walkthrough |
|
|
455
514
|
| 🏗️ [ARCHITECTURE.md](ARCHITECTURE.md) | Pipeline phases, processing flows, Mermaid diagrams |
|
package/QUICK_START.md
CHANGED
|
@@ -156,7 +156,9 @@ The pipeline will:
|
|
|
156
156
|
4. **Analyze** each segment with Gemini AI — uses Firebase Storage URL directly when available (skips separate Gemini upload)
|
|
157
157
|
5. **Quality check** — retry weak segments automatically (reuses file reference — no re-upload)
|
|
158
158
|
6. **Compile** results across all segments
|
|
159
|
-
7. **Output** `results.md` + `results.json`
|
|
159
|
+
7. **Output** `results.md` + `results.html` + `results.json` (+ `results.pdf` / `results.docx` if requested via `--format`)
|
|
160
|
+
|
|
161
|
+
> **Tip:** Use `--format html` to get only HTML output, `--format pdf` for PDF, `--format docx` for Word, or `--format all` for Markdown + HTML + JSON + PDF + DOCX. Use `--min-confidence high` to filter out low-confidence items.
|
|
160
162
|
|
|
161
163
|
> **Tip:** Use `--force-upload` to re-upload files that already exist in Storage. Use `--no-storage-url` to bypass Storage URL optimization and force Gemini File API uploads.
|
|
162
164
|
|
|
@@ -169,6 +171,7 @@ This takes **~2-5 minutes** depending on video length.
|
|
|
169
171
|
```
|
|
170
172
|
my-meeting/runs/{timestamp}/
|
|
171
173
|
├── results.md ← Open this! Your task document
|
|
174
|
+
├── results.html ← Interactive HTML report (open in any browser)
|
|
172
175
|
├── results.json ← Full pipeline data (JSON)
|
|
173
176
|
└── compilation.json ← All extracted items (JSON)
|
|
174
177
|
```
|
|
@@ -222,9 +225,9 @@ my-project/runs/{timestamp}/
|
|
|
222
225
|
| **Deep dive docs** | `taskex --deep-dive "my-meeting"` |
|
|
223
226
|
| **Generate docs (no video)** | `taskex --dynamic "my-project"` |
|
|
224
227
|
| **Track progress via git** | `taskex --update-progress --repo "C:\project" "my-meeting"` |
|
|
228
|
+
| **Debug mode** | `taskex --log-level debug "my-meeting"` |
|
|
225
229
|
|
|
226
230
|
> **Tip:** If the call folder isn't already a git repo, `--update-progress` auto-initializes one for baseline tracking.
|
|
227
|
-
| **Debug mode** | `taskex --log-level debug "my-meeting"` |
|
|
228
231
|
|
|
229
232
|
> Full CLI reference with all flags → [README.md — CLI Flags](README.md#cli-flags)
|
|
230
233
|
|