You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: Enhance analytics with TF-IDF calculation and CSV report generation
- Added TF-IDF analysis to diagnostic analytics for keyword extraction.
- Implemented CSV report generation in the delivery module.
- Improved file ingestion with caching and fingerprinting for efficiency.
- Enhanced predictive analytics with weighted moving average forecasting.
- Updated prescriptive analytics to handle missing metadata more gracefully.
- Introduced GitHub Actions CI pipeline for automated testing across multiple Node.js versions.
* feat: complete v1.2.0 pipeline (concurrency, memoization, tf-idf, and cross-linking)
* docs: update readme usage flags and architectural pipeline notes
- Added advanced CLI flags (--workers, --clear-cache, --format=csv) to the root README.md usage scope.
- Updated docs/architecture.md to detail v1.2.0 pipeline enhancements, including multithreaded worker pool mechanics and semantic vector cross-linking via TF-IDF / Cosine Similarity.
- Verified all documentation structures and ran local test runner pipelines cleanly.
* addition of usage section and formatting readme
* readme formatting
* chore: remove analytics cache file
* chore: add .analytics_cache.json to .gitignore
* fix: validate workers argument and handle symlinks in file ingestion
Co-authored-by: Copilot <copilot@github.com>
* fix: address PR review security and concurrency feedback
* chore: add explicit workflow token permissions
* fix(analytics): base forecast on doc dates and optimize worker IPC memory
- Fixes domain logic in predictive analytics by switching the timeline basis from the OS file modification time to actual parsed document dates. This prevents modern download timestamps from invalidating historical UAP forecasting.
- Resolves worker IPC performance bottlenecks by calculating word frequencies directly inside the worker thread pool rather than passing massive raw string arrays across the boundary.
- Mitigates main-thread blocking in diagnostic analytics by capping the O(N²) TF-IDF cosine similarity matrix calculations to a maximum of 500 files.
- Adds backwards-compatibility layers in descriptive and diagnostic modules to gracefully handle legacy cache formats without crashing.
- Refines watch mode path exclusions in the index file to use a strictly scoped regex for the data exports directory.
* fix review feedback gaps
* fix workflow token permissions
* fix pipeline/watch/cache regressions and modernize test workflow
* Address latest PR review thread regressions
---------
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This project installs as a standard Node.js CLI package, so there are no extra native build steps required for the current worker-thread ingestion flow. Simply run:
150
+
```bash
151
+
npm install
152
+
153
+
```
154
+
155
+
156
+
3.**Verify the installation:**
157
+
Run the local test suite to ensure the multithreaded worker pool and caching engine are functioning correctly on your machine:
158
+
```bash
159
+
npm test
160
+
161
+
```
162
+
163
+
164
+
*(If all tests pass green, you are ready to start analyzing documents!)*
165
+
166
+
167
+
---
168
+
169
+
<br>
170
+
171
+
172
+
173
+
174
+
## Usage
175
+
176
+
177
+
To run the AnalyticsBot, simply pass the target directory containing your text files as the first argument:
178
+
179
+
```bash
180
+
node src/index.js ./my_folder/
181
+
182
+
```
183
+
184
+
By default, this will parse the documents and output a formatted JSON report directly to your console.
185
+
186
+
### 👀 Watch Mode
187
+
188
+
Keep the pipeline running in the background. It will automatically re-analyze the documents and recalculate the math whenever you add, edit, or delete a file in the target directory:
189
+
190
+
```bash
191
+
node src/index.js ./my_folder/ --watch
192
+
193
+
```
194
+
195
+
### 🖨️ Report Generation
196
+
197
+
Instead of dumping JSON directly to the console, you can generate formatted report files that are automatically saved to the `/data_exports/` directory:
198
+
199
+
```bash
200
+
node src/index.js ./my_folder/ --format=md
201
+
202
+
```
203
+
204
+
*(Supports `md` for Markdown or `csv` for spreadsheet datasets).*
205
+
206
+
207
+
---
208
+
<br>
209
+
210
+
### 🚀 Advanced Usage
211
+
212
+
The v1.2.0 AnalyticsBot engine supports multithreading and memoization caching. You can control these via CLI arguments:
213
+
214
+
*`node src/index.js ./my_folder --workers=4` : Manually set the number of Node.js worker threads (defaults to max CPU cores).
215
+
*`node src/index.js ./my_folder --clear-cache` : Bypasses the `.analytics_cache.json` file and forces a fresh read of all documents.
216
+
*`node src/index.js ./my_folder --format=csv` : Exports the final report as a spreadsheet-compatible `.csv` file.
Copy file name to clipboardExpand all lines: docs/architecture.md
+11-6Lines changed: 11 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,26 +4,31 @@
4
4
5
5
The repository currently ships a Node.js CLI-centered analytics flow:
6
6
7
-
1.**CLI Orchestrator (`src/index.js`)** resolves the source directory and writes the final report to stdout.
8
-
2.**Read-Only Ingestion (`src/ingestion/file-ingestion.js`)** recursively scans supported text files, streams file content, and extracts words, dates, locations, and filesystem metadata.
7
+
1.**CLI Orchestrator (`src/index.js`)** resolves the source directory, supports watch mode, and routes report output to stdout or export files.
8
+
2.**Read-Only Ingestion (`src/ingestion/file-ingestion.js`)** recursively scans supported text files, dispatches parsing work to Node.js worker threads, memoizes compatible results in `.analytics_cache.json`, and extracts words, dates, locations, and filesystem metadata.
9
9
3.**Analytics Pipeline (`src/pipeline.js`)** builds the descriptive, diagnostic, predictive, and prescriptive tiers from the ingested file set.
10
-
4.**Output Layer** returns a single structured JSON report for the requested directory.
10
+
4.**Output Layer** returns structured JSON or saves Markdown / CSV exports for the requested directory.
11
+
12
+
### v1.2.0 Pipeline Architecture
13
+
***Ingestion (Multithreaded):** Utilizes Node.js `worker_threads` and file-stat fingerprinting (`.analytics_cache.json`) to bypass redundant processing and drastically speed up execution.
14
+
***Semantic Analytics:** Employs a TF-IDF weighting engine to filter generic stop-words and a Cosine Similarity math engine to automatically cluster related UAP documents based on vector distance.
11
15
12
16
## Current Runtime Boundaries
13
17
14
18
Implemented today:
15
19
16
20
- recursive read-only ingestion for `.txt`, `.md`, `.json`, `.csv`, and `.log`
21
+
- multithreaded parsing with fingerprint-based cache reuse for compatible ingestions
17
22
- tokenization plus lightweight date/location extraction
18
23
- descriptive, diagnostic, predictive, and prescriptive analytics modules
19
-
- JSON report delivery through the Node CLI
24
+
- JSON, Markdown, and CSV report delivery through the Node CLI
25
+
- directory watch mode that re-runs the pipeline after file changes
0 commit comments