@chappibunny/repolens 0.6.0 → 0.6.3
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/CHANGELOG.md +50 -62
- package/README.md +93 -105
- package/RELEASE.md +32 -8
- package/package.json +4 -4
- package/src/cli.js +48 -2
- package/src/core/config-schema.js +0 -26
- package/src/init.js +1 -1
- package/src/integrations/discord.js +0 -4
- package/src/publishers/confluence.js +2 -0
- package/src/publishers/index.js +24 -53
- package/src/publishers/notion.js +0 -232
- package/src/utils/telemetry.js +58 -0
- package/src/renderers/renderDashboard.js +0 -844
package/CHANGELOG.md
CHANGED
|
@@ -2,84 +2,72 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to RepoLens will be documented in this file.
|
|
4
4
|
|
|
5
|
-
## 0.6.
|
|
5
|
+
## 0.6.3
|
|
6
6
|
|
|
7
7
|
### ✨ New Features
|
|
8
|
+
- **User Feedback**: Added `repolens feedback` CLI command for sending feedback directly to the RepoLens team via Sentry
|
|
9
|
+
- Interactive prompts for name, email, and message
|
|
10
|
+
- Works even when telemetry is disabled — feedback is always accepted
|
|
11
|
+
- Uses `Sentry.captureFeedback()` from `@sentry/node`
|
|
8
12
|
|
|
9
|
-
|
|
13
|
+
### 🔧 Maintenance
|
|
14
|
+
- Updated version references across all documentation
|
|
15
|
+
- Added `feedback` to CLI help and command listings
|
|
16
|
+
|
|
17
|
+
## 0.6.2
|
|
18
|
+
|
|
19
|
+
### 🐛 Bug Fixes
|
|
20
|
+
- **CI/CD**: Fixed release workflow failing with `Cannot find module @rollup/rollup-linux-x64-gnu`
|
|
21
|
+
- Root cause: macOS-generated `package-lock.json` doesn't resolve Linux platform-specific optional dependencies
|
|
22
|
+
- Fix: Changed all CI install steps to `rm -rf node_modules package-lock.json && npm install`
|
|
23
|
+
- Applied to both `publish-docs.yml` and `release.yml` workflows
|
|
24
|
+
|
|
25
|
+
### 🔧 Maintenance
|
|
26
|
+
- Updated version references across codebase
|
|
27
|
+
- Updated test assertions for version 0.6.2
|
|
28
|
+
|
|
29
|
+
## 0.6.1
|
|
30
|
+
|
|
31
|
+
### 🐛 Bug Fixes
|
|
32
|
+
- **Confluence Publisher**: Fixed `version` showing as `[object Object]1`
|
|
33
|
+
- Root cause: `existingPage.version` was the full version object, not just the number
|
|
34
|
+
- Fix: Normalize version to use cached structure with extracted version number
|
|
35
|
+
- **Confluence Publisher**: Fixed code block formatting in storage format
|
|
36
|
+
- Implemented 3-step extract→convert→restore pipeline
|
|
37
|
+
- Properly handles fenced code blocks in Markdown→Confluence conversion
|
|
38
|
+
|
|
39
|
+
### 📦 Package
|
|
40
|
+
- Renamed npm package from `@rabitai/repolens` to `@chappibunny/repolens`
|
|
41
|
+
- Updated all references across codebase, workflows, and documentation
|
|
42
|
+
- Published to npm registry under new scope
|
|
43
|
+
|
|
44
|
+
## 0.6.0 (Team Features & Observability)
|
|
45
|
+
|
|
46
|
+
### ✨ New Features
|
|
47
|
+
|
|
48
|
+
**Discord Integration** (`src/integrations/discord.js`):
|
|
10
49
|
- Rich embed notifications with coverage, health score, and change metrics
|
|
11
50
|
- Threshold-based notifications (default: >10% change)
|
|
12
51
|
- Branch filtering with glob pattern support
|
|
13
52
|
- Secure webhook configuration via `DISCORD_WEBHOOK_URL` environment variable
|
|
14
|
-
- Functions: `sendDiscordNotification()`, `buildDocUpdateNotification()`, `buildErrorNotification()`, `shouldNotify()`
|
|
15
53
|
- Color-coded embeds: success (green), warning (yellow), error (red), info (blue)
|
|
16
54
|
|
|
17
|
-
**Metrics Collection System** (`src/utils/metrics.js`
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
- Functions: `calculateCoverage()`, `calculateHealthScore()`, `detectStaleness()`, `analyzeQuality()`, `trackMetrics()`, `calculateTrends()`, `collectMetrics()`
|
|
25
|
-
|
|
26
|
-
**Interactive Dashboard** (`src/renderers/renderDashboard.js` - 1,020 lines):
|
|
27
|
-
- Beautiful HTML dashboard with inline CSS (zero dependencies)
|
|
28
|
-
- **Health Score Card**: Color-coded 0-100 score (excellent/good/fair/poor)
|
|
29
|
-
- **Coverage Breakdown**: Module/API/page coverage with progress bars
|
|
30
|
-
- **Freshness Tracking**: Stale file detection with last updated timestamps
|
|
31
|
-
- **Quality Issues List**: Severity badges (high/medium/low) with actionable items
|
|
32
|
-
- **Trend Charts**: SVG visualization of coverage and health score over time
|
|
33
|
-
- **Quick Links**: Direct links to Notion, GitHub, and Markdown documentation
|
|
34
|
-
- Responsive design with animations and smooth transitions
|
|
35
|
-
- Generated at `.repolens/dashboard/index.html`
|
|
36
|
-
|
|
37
|
-
**GitHub Pages Deployment** (`.github/workflows/deploy-dashboard.yml` - 73 lines):
|
|
38
|
-
- Automated deployment to `https://OWNER.github.io/REPO/`
|
|
39
|
-
- Deploys on every push to main branch
|
|
40
|
-
- Uses local code during development (`npm link`)
|
|
41
|
-
- Graceful fallback for missing dashboard files
|
|
42
|
-
- Security-conscious environment variable handling
|
|
55
|
+
**Metrics Collection System** (`src/utils/metrics.js`):
|
|
56
|
+
- Coverage calculation: weighted average (modules 50%, APIs 30%, pages 20%)
|
|
57
|
+
- Health score algorithm: 0-100 rating (40% coverage + 30% freshness + 30% quality)
|
|
58
|
+
- Staleness detection: flags documentation >90 days old
|
|
59
|
+
- Quality analysis: identifies undocumented modules/APIs/pages with severity levels
|
|
60
|
+
- Historical tracking: persists metrics to `.repolens/metrics-history.json`
|
|
61
|
+
- Trend indicators: up/down/stable trend detection (>1% threshold)
|
|
43
62
|
|
|
44
63
|
**Configuration Extensions** (`src/core/config-schema.js`):
|
|
45
|
-
-
|
|
46
|
-
* `discord.notifyOn`: "always", "significant", or "never"
|
|
47
|
-
* `discord.significantThreshold`: 0-100 (default: 10%)
|
|
48
|
-
* `discord.branches`: Array with glob pattern support
|
|
49
|
-
* `discord.enabled`: Boolean
|
|
50
|
-
- **Dashboard Configuration**:
|
|
51
|
-
* `dashboard.enabled`: Boolean (default: true)
|
|
52
|
-
* `dashboard.githubPages`: Boolean
|
|
53
|
-
* `dashboard.staleThreshold`: Number (default: 90 days)
|
|
64
|
+
- Discord configuration: `discord.notifyOn`, `discord.significantThreshold`, `discord.branches`, `discord.enabled`
|
|
54
65
|
|
|
55
66
|
**Publishing Integration** (`src/publishers/index.js`):
|
|
56
67
|
- Automatic metrics collection after publishing
|
|
57
|
-
- Dashboard generation integrated into publish flow
|
|
58
68
|
- Discord notifications sent after successful publish (if configured)
|
|
59
69
|
- Branch-aware notification filtering
|
|
60
|
-
- Graceful error handling (doesn't fail publish if
|
|
61
|
-
|
|
62
|
-
### 🔧 Configuration
|
|
63
|
-
|
|
64
|
-
**Environment Variables** (`.env.example`):
|
|
65
|
-
- Added `DISCORD_WEBHOOK_URL` for team notifications
|
|
66
|
-
- Security warnings and setup instructions
|
|
67
|
-
- GitHub Actions secret configuration guidance
|
|
68
|
-
|
|
69
|
-
**GitHub Actions** (`.github/workflows/publish-docs.yml`):
|
|
70
|
-
- Added `DISCORD_WEBHOOK_URL` to workflow environment
|
|
71
|
-
|
|
72
|
-
### 📊 Testing
|
|
73
|
-
- All 90 tests passing (47 main + 43 security)
|
|
74
|
-
- No regressions from Phase 4 integration
|
|
75
|
-
- Metrics algorithms validated
|
|
76
|
-
- Dashboard generation tested
|
|
77
|
-
|
|
78
|
-
### 🐛 Bug Fixes
|
|
79
|
-
- **GitHub Pages Workflow**: Fixed deployment to use local code during development
|
|
80
|
-
* Changed from `npx @chappibunny/repolens@latest` to `npm link && npx repolens`
|
|
81
|
-
* Added file existence checks before copying dashboard
|
|
82
|
-
* Created graceful fallback with "Coming Soon" placeholder for missing files
|
|
70
|
+
- Graceful error handling (doesn't fail publish if notifications fail)
|
|
83
71
|
|
|
84
72
|
## 0.5.0 (Phase 3: Security Audit)
|
|
85
73
|
|
package/README.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="Avatar.png" alt="RepoLens" width="120" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
1
5
|
```
|
|
2
6
|
██████╗ ███████╗██████╗ ██████╗ ██╗ ███████╗███╗ ██╗███████╗
|
|
3
7
|
██╔══██╗██╔════╝██╔══██╗██╔═══██╗██║ ██╔════╝████╗ ██║██╔════╝
|
|
@@ -16,7 +20,7 @@
|
|
|
16
20
|
|
|
17
21
|
AI-assisted documentation intelligence system that generates architecture docs for engineers AND readable system docs for stakeholders
|
|
18
22
|
|
|
19
|
-
**Current Status**: v0.6.
|
|
23
|
+
**Current Status**: v0.6.3 — Sentry User Feedback & Team Features
|
|
20
24
|
|
|
21
25
|
RepoLens automatically generates and maintains living architecture documentation by analyzing your repository structure, extracting meaningful insights from your package.json, and creating visual dependency graphs. Run it once, or let it auto-update on every push.
|
|
22
26
|
|
|
@@ -49,7 +53,7 @@ For Confluence:
|
|
|
49
53
|
```bash
|
|
50
54
|
# Edit .env and add:
|
|
51
55
|
CONFLUENCE_URL=https://your-company.atlassian.net/wiki
|
|
52
|
-
CONFLUENCE_EMAIL=
|
|
56
|
+
CONFLUENCE_EMAIL=trades@rabitaitrades.com
|
|
53
57
|
CONFLUENCE_API_TOKEN=your-token
|
|
54
58
|
CONFLUENCE_SPACE_KEY=DOCS
|
|
55
59
|
```
|
|
@@ -128,56 +132,11 @@ RepoLens automatically detects:
|
|
|
128
132
|
✅ **Branch-Aware** - Prevent doc conflicts across branches
|
|
129
133
|
✅ **GitHub Actions** - Autonomous operation on every push
|
|
130
134
|
✅ **Team Notifications** - Discord integration with rich embeds (NEW in v0.6.0)
|
|
131
|
-
✅ **Observability Dashboard** - Interactive HTML metrics dashboard (NEW in v0.6.0)
|
|
132
135
|
✅ **Health Score Tracking** - Monitor documentation quality over time (NEW in v0.6.0)
|
|
133
|
-
✅ **GitHub Pages Deployment** - Automated public dashboard hosting (NEW in v0.6.0)
|
|
134
136
|
|
|
135
137
|
---
|
|
136
138
|
|
|
137
|
-
## 👥 Team Features
|
|
138
|
-
|
|
139
|
-
### 📊 Interactive Dashboard
|
|
140
|
-
|
|
141
|
-
RepoLens now generates a beautiful HTML dashboard with real-time metrics and trends:
|
|
142
|
-
|
|
143
|
-
**Features:**
|
|
144
|
-
- **Health Score** — 0-100 rating based on coverage, freshness, and quality
|
|
145
|
-
- **Coverage Metrics** — Module, API, and page documentation coverage with progress bars
|
|
146
|
-
- **Freshness Tracking** — Identifies stale documentation (>90 days old)
|
|
147
|
-
- **Quality Issues** — Lists undocumented modules, APIs, and pages with severity badges
|
|
148
|
-
- **Trend Charts** — SVG visualization of coverage and health score over time
|
|
149
|
-
- **Quick Links** — Direct links to Notion, GitHub, and Markdown documentation
|
|
150
|
-
|
|
151
|
-
**Access your dashboard:**
|
|
152
|
-
- **Local**: `.repolens/dashboard/index.html` after running `repolens publish`
|
|
153
|
-
- **Public**: `https://OWNER.github.io/REPO/` (with GitHub Pages enabled)
|
|
154
|
-
|
|
155
|
-
**Setup GitHub Pages (Optional):**
|
|
156
|
-
|
|
157
|
-
1. **Add workflow** (created by `repolens init` in v0.6.0+):
|
|
158
|
-
- File: `.github/workflows/deploy-dashboard.yml`
|
|
159
|
-
- Triggers: Runs on every push to main
|
|
160
|
-
|
|
161
|
-
2. **Enable GitHub Pages**:
|
|
162
|
-
- Go to repo Settings → Pages
|
|
163
|
-
- Source: **GitHub Actions**
|
|
164
|
-
- Save
|
|
165
|
-
|
|
166
|
-
3. **Add secrets** (if using publishers or notifications):
|
|
167
|
-
```
|
|
168
|
-
NOTION_TOKEN
|
|
169
|
-
NOTION_PARENT_PAGE_ID
|
|
170
|
-
CONFLUENCE_URL
|
|
171
|
-
CONFLUENCE_EMAIL
|
|
172
|
-
CONFLUENCE_API_TOKEN
|
|
173
|
-
CONFLUENCE_SPACE_KEY
|
|
174
|
-
CONFLUENCE_PARENT_PAGE_ID # Optional
|
|
175
|
-
DISCORD_WEBHOOK_URL # Optional
|
|
176
|
-
```
|
|
177
|
-
DISCORD_WEBHOOK_URL
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
Your dashboard will be live at `https://OWNER.github.io/REPO/` within minutes!
|
|
139
|
+
## 👥 Team Features (New in v0.6.0)
|
|
181
140
|
|
|
182
141
|
### 💬 Discord Notifications
|
|
183
142
|
|
|
@@ -221,7 +180,7 @@ Get notified when documentation changes significantly:
|
|
|
221
180
|
- Files scanned and modules analyzed
|
|
222
181
|
- Coverage percentage and health score
|
|
223
182
|
- Change percentage from previous run
|
|
224
|
-
- Direct links to
|
|
183
|
+
- Direct links to Notion and GitHub documentation
|
|
225
184
|
|
|
226
185
|
---
|
|
227
186
|
|
|
@@ -233,7 +192,7 @@ Get notified when documentation changes significantly:
|
|
|
233
192
|
npm install @chappibunny/repolens
|
|
234
193
|
```
|
|
235
194
|
|
|
236
|
-
Installs from npm registry.
|
|
195
|
+
Installs from npm registry.
|
|
237
196
|
|
|
238
197
|
### Alternative Methods
|
|
239
198
|
|
|
@@ -265,7 +224,7 @@ npm link
|
|
|
265
224
|
Install from a specific version:
|
|
266
225
|
|
|
267
226
|
```bash
|
|
268
|
-
npm install https://github.com/CHAPIBUNNY/repolens/releases/download/v0.
|
|
227
|
+
npm install https://github.com/CHAPIBUNNY/repolens/releases/download/v0.6.3/chappibunny-repolens-0.6.3.tgz
|
|
269
228
|
```
|
|
270
229
|
</details>
|
|
271
230
|
|
|
@@ -465,7 +424,7 @@ If using the Confluence publisher:
|
|
|
465
424
|
Create `.env` in your project root:
|
|
466
425
|
```bash
|
|
467
426
|
CONFLUENCE_URL=https://your-company.atlassian.net/wiki
|
|
468
|
-
CONFLUENCE_EMAIL=
|
|
427
|
+
CONFLUENCE_EMAIL=trades@rabitaitrades.com
|
|
469
428
|
CONFLUENCE_API_TOKEN=your-api-token-here
|
|
470
429
|
CONFLUENCE_SPACE_KEY=DOCS
|
|
471
430
|
CONFLUENCE_PARENT_PAGE_ID=123456789 # Optional
|
|
@@ -486,7 +445,7 @@ Add as repository secrets:
|
|
|
486
445
|
2. Click **"New repository secret"**
|
|
487
446
|
3. Add:
|
|
488
447
|
- Name: `CONFLUENCE_URL`, Value: `https://your-company.atlassian.net/wiki`
|
|
489
|
-
- Name: `CONFLUENCE_EMAIL`, Value: `
|
|
448
|
+
- Name: `CONFLUENCE_EMAIL`, Value: `trades@rabitaitrades.com`
|
|
490
449
|
- Name: `CONFLUENCE_API_TOKEN`, Value: `your-token`
|
|
491
450
|
- Name: `CONFLUENCE_SPACE_KEY`, Value: `DOCS`
|
|
492
451
|
- Name: `CONFLUENCE_PARENT_PAGE_ID`, Value: `123456789` (optional)
|
|
@@ -557,7 +516,7 @@ npx @chappibunny/repolens publish
|
|
|
557
516
|
|
|
558
517
|
**Expected output:**
|
|
559
518
|
```
|
|
560
|
-
|
|
519
|
+
RepoLens 🔍
|
|
561
520
|
────────────────────────────────────────────────────
|
|
562
521
|
[RepoLens] Using config: /path/to/.repolens.yml
|
|
563
522
|
[RepoLens] Loading configuration...
|
|
@@ -582,7 +541,7 @@ ls .repolens/
|
|
|
582
541
|
# api_surface.md
|
|
583
542
|
# route_map.md
|
|
584
543
|
# system_map.md
|
|
585
|
-
#
|
|
544
|
+
# system_map.md
|
|
586
545
|
```
|
|
587
546
|
|
|
588
547
|
**Notion Output:**
|
|
@@ -652,7 +611,7 @@ Validates:
|
|
|
652
611
|
- ✅ Required config fields present
|
|
653
612
|
- ✅ Publishers configured correctly
|
|
654
613
|
- ✅ Scan patterns defined
|
|
655
|
-
- ✅
|
|
614
|
+
- ✅ Publisher configuration valid
|
|
656
615
|
|
|
657
616
|
### Migrate Workflows
|
|
658
617
|
|
|
@@ -854,7 +813,7 @@ RepoLens implements **defense-in-depth** security to protect your credentials, c
|
|
|
854
813
|
|
|
855
814
|
### Vulnerability Reporting
|
|
856
815
|
|
|
857
|
-
- 📧 **Email**:
|
|
816
|
+
- 📧 **Email**: trades@rabitaitrades.com
|
|
858
817
|
- 🚨 **DO NOT** open public issues for security bugs
|
|
859
818
|
- ⏱️ **Response**: Within 48 hours
|
|
860
819
|
- 🔒 **Fix Timeline**: Critical issues within 7 days, others within 30 days
|
|
@@ -895,6 +854,7 @@ project:
|
|
|
895
854
|
# Configure output destinations
|
|
896
855
|
publishers:
|
|
897
856
|
- notion
|
|
857
|
+
- confluence
|
|
898
858
|
- markdown
|
|
899
859
|
|
|
900
860
|
# Notion-specific settings (optional)
|
|
@@ -905,6 +865,11 @@ notion:
|
|
|
905
865
|
- release/* # Glob patterns supported
|
|
906
866
|
includeBranchInTitle: false # Clean titles without [branch-name]
|
|
907
867
|
|
|
868
|
+
# Confluence-specific settings (optional)
|
|
869
|
+
confluence:
|
|
870
|
+
branches:
|
|
871
|
+
- main # Only main branch publishes to Confluence
|
|
872
|
+
|
|
908
873
|
# Discord notifications (optional, new in v0.6.0)
|
|
909
874
|
discord:
|
|
910
875
|
enabled: true # Default: true (if DISCORD_WEBHOOK_URL set)
|
|
@@ -914,12 +879,6 @@ discord:
|
|
|
914
879
|
- main
|
|
915
880
|
- develop
|
|
916
881
|
|
|
917
|
-
# Observability dashboard (optional, new in v0.6.0)
|
|
918
|
-
dashboard:
|
|
919
|
-
enabled: true # Default: true
|
|
920
|
-
githubPages: true # Deploy to GitHub Pages
|
|
921
|
-
staleThreshold: 90 # Flag docs older than 90 days
|
|
922
|
-
|
|
923
882
|
# GitHub integration (optional)
|
|
924
883
|
github:
|
|
925
884
|
owner: "your-username"
|
|
@@ -979,18 +938,16 @@ features:
|
|
|
979
938
|
| `configVersion` | number | No | Schema version (current: 1) for future migrations |
|
|
980
939
|
| `project.name` | string | Yes | Project name |
|
|
981
940
|
| `project.docs_title_prefix` | string | No | Prefix for documentation titles (default: project name) |
|
|
982
|
-
| `publishers` | array | Yes | Output targets: `notion`, `markdown` |
|
|
941
|
+
| `publishers` | array | Yes | Output targets: `notion`, `confluence`, `markdown` |
|
|
983
942
|
| `notion.branches` | array | No | Branch whitelist for Notion publishing. Supports globs. |
|
|
984
943
|
| `notion.includeBranchInTitle` | boolean | No | Add `[branch-name]` to titles (default: `true`) |
|
|
944
|
+
| `confluence.branches` | array | No | Branch whitelist for Confluence publishing. Supports globs. |
|
|
985
945
|
| `discord.enabled` | boolean | No | Enable Discord notifications (default: `true` if webhook set) |
|
|
986
946
|
| `discord.notifyOn` | string | No | Notification policy: `always`, `significant`, `never` (default: `significant`) |
|
|
987
947
|
| `discord.significantThreshold` | number | No | Change % threshold for notifications (default: `10`) |
|
|
988
948
|
| `discord.branches` | array | No | Branch filter for notifications. Supports globs. (default: all) |
|
|
989
|
-
| `
|
|
990
|
-
| `
|
|
991
|
-
| `dashboard.staleThreshold` | number | No | Days before docs flagged as stale (default: `90`) |
|
|
992
|
-
| `github.owner` | string | No | GitHub org/username for SVG hosting |
|
|
993
|
-
| `github.repo` | string | No | Repository name for SVG hosting |
|
|
949
|
+
| `github.owner` | string | No | GitHub org/username |
|
|
950
|
+
| `github.repo` | string | No | Repository name |
|
|
994
951
|
| `scan.include` | array | Yes | Glob patterns for files to scan |
|
|
995
952
|
| `scan.ignore` | array | Yes | Glob patterns to exclude |
|
|
996
953
|
| `module_roots` | array | No | Root directories for module detection |
|
|
@@ -1009,7 +966,17 @@ Required for Notion publisher:
|
|
|
1009
966
|
| `NOTION_PARENT_PAGE_ID` | Yes | Page ID where docs will be created |
|
|
1010
967
|
| `NOTION_VERSION` | No | API version (default: `2022-06-28`) |
|
|
1011
968
|
|
|
1012
|
-
|
|
969
|
+
Required for Confluence publisher:
|
|
970
|
+
|
|
971
|
+
| Variable | Required | Description |
|
|
972
|
+
|----------|----------|-------------|
|
|
973
|
+
| `CONFLUENCE_URL` | Yes | Base URL (e.g., `https://your-company.atlassian.net/wiki`) |
|
|
974
|
+
| `CONFLUENCE_EMAIL` | Yes | Atlassian account email |
|
|
975
|
+
| `CONFLUENCE_API_TOKEN` | Yes | API token from [Atlassian](https://id.atlassian.com/manage-profile/security/api-tokens) |
|
|
976
|
+
| `CONFLUENCE_SPACE_KEY` | Yes | Target space key (e.g., `DOCS`, `ENG`) |
|
|
977
|
+
| `CONFLUENCE_PARENT_PAGE_ID` | No | Parent page ID (docs created at space root if omitted) |
|
|
978
|
+
|
|
979
|
+
Optional for Discord notifications:
|
|
1013
980
|
|
|
1014
981
|
| Variable | Required | Description |
|
|
1015
982
|
|----------|----------|-------------|
|
|
@@ -1028,8 +995,8 @@ Optional for Discord notifications (new in v0.6.0):
|
|
|
1028
995
|
1. SCAN 2. ANALYZE 3. RENDER 4. PUBLISH
|
|
1029
996
|
──────────────────────────────────────────────────────────────────
|
|
1030
997
|
Read files → Detect tech → Generate docs → Notion pages
|
|
1031
|
-
from patterns stack patterns with insights +
|
|
1032
|
-
+
|
|
998
|
+
from patterns stack patterns with insights + Confluence pages
|
|
999
|
+
+ Markdown files
|
|
1033
1000
|
```
|
|
1034
1001
|
|
|
1035
1002
|
**Scan Phase:**
|
|
@@ -1053,8 +1020,7 @@ from patterns stack patterns with insights + Markdown files
|
|
|
1053
1020
|
**Publish Phase:**
|
|
1054
1021
|
- Markdown: Writes files to `.repolens/` directory
|
|
1055
1022
|
- Notion: Creates/updates pages via API with retry logic
|
|
1056
|
-
-
|
|
1057
|
-
- Git: Commits diagrams back to repo for GitHub CDN hosting
|
|
1023
|
+
- Confluence: Creates/updates pages via REST API v1 (storage format)
|
|
1058
1024
|
|
|
1059
1025
|
### Module Dependency Detection
|
|
1060
1026
|
|
|
@@ -1100,7 +1066,7 @@ npm test
|
|
|
1100
1066
|
- Integration workflows
|
|
1101
1067
|
- Doctor command validation
|
|
1102
1068
|
|
|
1103
|
-
**Coverage:**
|
|
1069
|
+
**Coverage:** 90 tests passing across 11 test files
|
|
1104
1070
|
|
|
1105
1071
|
### Test Package Installation Locally
|
|
1106
1072
|
|
|
@@ -1111,7 +1077,7 @@ Simulates the full user installation experience:
|
|
|
1111
1077
|
npm pack
|
|
1112
1078
|
|
|
1113
1079
|
# Install globally from tarball
|
|
1114
|
-
npm install -g repolens-0.
|
|
1080
|
+
npm install -g chappibunny-repolens-0.6.3.tgz
|
|
1115
1081
|
|
|
1116
1082
|
# Verify
|
|
1117
1083
|
repolens --version
|
|
@@ -1127,28 +1093,49 @@ repolens/
|
|
|
1127
1093
|
│ ├── cli.js # Command orchestration + banner
|
|
1128
1094
|
│ ├── init.js # Scaffolding command
|
|
1129
1095
|
│ ├── doctor.js # Validation command
|
|
1096
|
+
│ ├── migrate.js # Workflow migration (legacy → current)
|
|
1130
1097
|
│ ├── core/
|
|
1131
1098
|
│ │ ├── config.js # Config loading + validation
|
|
1132
1099
|
│ │ ├── config-schema.js # Schema version tracking
|
|
1133
1100
|
│ │ ├── diff.js # Git diff operations
|
|
1134
1101
|
│ │ └── scan.js # Repository scanning + metadata extraction
|
|
1102
|
+
│ ├── analyzers/
|
|
1103
|
+
│ │ ├── domain-inference.js # Business domain mapping
|
|
1104
|
+
│ │ ├── context-builder.js # Structured AI context assembly
|
|
1105
|
+
│ │ └── flow-inference.js # Data flow detection
|
|
1106
|
+
│ ├── ai/
|
|
1107
|
+
│ │ ├── provider.js # Provider-agnostic AI generation
|
|
1108
|
+
│ │ ├── prompts.js # Strict prompt templates
|
|
1109
|
+
│ │ ├── document-plan.js # Document structure definition
|
|
1110
|
+
│ │ └── generate-sections.js # AI section generation + fallbacks
|
|
1111
|
+
│ ├── docs/
|
|
1112
|
+
│ │ ├── generate-doc-set.js # Document generation orchestration
|
|
1113
|
+
│ │ └── write-doc-set.js # Write docs to disk
|
|
1135
1114
|
│ ├── renderers/
|
|
1136
1115
|
│ │ ├── render.js # System overview, catalog, API, routes
|
|
1137
1116
|
│ │ ├── renderDiff.js # Architecture diff rendering
|
|
1138
|
-
│ │ └── renderMap.js #
|
|
1117
|
+
│ │ └── renderMap.js # Unicode dependency diagrams
|
|
1139
1118
|
│ ├── publishers/
|
|
1140
1119
|
│ │ ├── index.js # Publisher orchestration + branch filtering
|
|
1141
|
-
│ │ ├── publish.js #
|
|
1120
|
+
│ │ ├── publish.js # Publishing pipeline
|
|
1142
1121
|
│ │ ├── notion.js # Notion API integration
|
|
1122
|
+
│ │ ├── confluence.js # Confluence REST API integration
|
|
1143
1123
|
│ │ └── markdown.js # Local Markdown generation
|
|
1124
|
+
│ ├── integrations/
|
|
1125
|
+
│ │ └── discord.js # Discord webhook notifications
|
|
1144
1126
|
│ ├── delivery/
|
|
1145
1127
|
│ │ └── comment.js # PR comment delivery
|
|
1146
1128
|
│ └── utils/
|
|
1147
1129
|
│ ├── logger.js # Logging utilities
|
|
1148
|
-
│ ├── retry.js # API retry logic
|
|
1130
|
+
│ ├── retry.js # API retry logic (exponential backoff)
|
|
1149
1131
|
│ ├── branch.js # Branch detection (multi-platform)
|
|
1150
|
-
│
|
|
1151
|
-
├──
|
|
1132
|
+
│ ├── validate.js # Configuration validation & security
|
|
1133
|
+
│ ├── metrics.js # Documentation coverage & health scoring
|
|
1134
|
+
│ ├── rate-limit.js # Token bucket rate limiter for APIs
|
|
1135
|
+
│ ├── secrets.js # Secret detection & sanitization
|
|
1136
|
+
│ ├── telemetry.js # Opt-in error tracking (Sentry)
|
|
1137
|
+
│ └── update-check.js # Version update notifications
|
|
1138
|
+
├── tests/ # Vitest test suite (90 tests across 11 files)
|
|
1152
1139
|
├── .repolens.yml # Dogfooding config
|
|
1153
1140
|
├── package.json
|
|
1154
1141
|
├── CHANGELOG.md
|
|
@@ -1165,13 +1152,13 @@ RepoLens uses automated GitHub Actions releases.
|
|
|
1165
1152
|
### Creating a Release
|
|
1166
1153
|
|
|
1167
1154
|
```bash
|
|
1168
|
-
# Patch version (0.
|
|
1155
|
+
# Patch version (0.6.3 → 0.6.4) - Bug fixes
|
|
1169
1156
|
npm run release:patch
|
|
1170
1157
|
|
|
1171
|
-
# Minor version (0.
|
|
1158
|
+
# Minor version (0.6.3 → 0.7.0) - New features
|
|
1172
1159
|
npm run release:minor
|
|
1173
1160
|
|
|
1174
|
-
# Major version (0.
|
|
1161
|
+
# Major version (0.6.3 → 1.0.0) - Breaking changes
|
|
1175
1162
|
npm run release:major
|
|
1176
1163
|
|
|
1177
1164
|
# Push the tag to trigger workflow
|
|
@@ -1179,10 +1166,11 @@ git push --follow-tags
|
|
|
1179
1166
|
```
|
|
1180
1167
|
|
|
1181
1168
|
**What happens:**
|
|
1182
|
-
1. ✅
|
|
1183
|
-
2. ✅
|
|
1184
|
-
3. ✅
|
|
1185
|
-
4. ✅
|
|
1169
|
+
1. ✅ Security audit runs (dependency audit + secret scanning)
|
|
1170
|
+
2. ✅ All tests run
|
|
1171
|
+
3. ✅ Package tarball created
|
|
1172
|
+
4. ✅ GitHub Release published with tarball attached
|
|
1173
|
+
5. ✅ npm package published to `@chappibunny/repolens`
|
|
1186
1174
|
|
|
1187
1175
|
See [RELEASE.md](./RELEASE.md) for detailed workflow.
|
|
1188
1176
|
|
|
@@ -1202,30 +1190,30 @@ RepoLens is currently in early access. v1.0 will open for community contribution
|
|
|
1202
1190
|
|
|
1203
1191
|
## 🗺️ Roadmap to v1.0
|
|
1204
1192
|
|
|
1205
|
-
**Current Status:** v0.
|
|
1193
|
+
**Current Status:** v0.6.3 — Sentry User Feedback & Team Features
|
|
1206
1194
|
|
|
1207
1195
|
### Completed ✅
|
|
1208
1196
|
|
|
1209
|
-
- [x] CLI commands: `init`, `doctor`, `publish`, `version`, `help`
|
|
1197
|
+
- [x] CLI commands: `init`, `doctor`, `publish`, `migrate`, `feedback`, `version`, `help`
|
|
1210
1198
|
- [x] Config schema v1 with validation
|
|
1211
1199
|
- [x] Auto-discovery of `.repolens.yml`
|
|
1212
|
-
- [x] Publishers: Notion + Markdown
|
|
1200
|
+
- [x] Publishers: Notion + Confluence + Markdown
|
|
1213
1201
|
- [x] Branch-aware publishing with filtering
|
|
1214
1202
|
- [x] Smart tech stack detection from package.json
|
|
1215
|
-
- [x]
|
|
1216
|
-
- [x]
|
|
1217
|
-
- [x]
|
|
1203
|
+
- [x] Unicode dependency diagrams (no external deps)
|
|
1204
|
+
- [x] AI-assisted documentation intelligence (provider-agnostic)
|
|
1205
|
+
- [x] Business domain inference & data flow analysis
|
|
1206
|
+
- [x] GitHub Actions automation (publish + release)
|
|
1218
1207
|
- [x] PR architecture diff comments
|
|
1219
1208
|
- [x] Performance guardrails (10k warning, 50k limit)
|
|
1220
|
-
- [x] Comprehensive test suite (
|
|
1221
|
-
- [x]
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
- [
|
|
1226
|
-
- [
|
|
1227
|
-
- [
|
|
1228
|
-
- [ ] Additional framework detection (Remix, SvelteKit, Astro)
|
|
1209
|
+
- [x] Comprehensive test suite (90 tests across 11 files)
|
|
1210
|
+
- [x] Security hardening (secret detection, injection prevention, fuzzing)
|
|
1211
|
+
- [x] Discord notifications with rich embeds
|
|
1212
|
+
- [x] Documentation coverage & health scoring
|
|
1213
|
+
- [x] Opt-in telemetry (Sentry)
|
|
1214
|
+
- [x] npm registry publication (`@chappibunny/repolens`)
|
|
1215
|
+
- [x] Automated npm releases via GitHub Actions
|
|
1216
|
+
- [x] Workflow migration command (`repolens migrate`)
|
|
1229
1217
|
|
|
1230
1218
|
### Planned for v1.0 🎯
|
|
1231
1219
|
|
|
@@ -1234,7 +1222,7 @@ RepoLens is currently in early access. v1.0 will open for community contribution
|
|
|
1234
1222
|
- [ ] TypeScript type graph analysis
|
|
1235
1223
|
- [ ] Interactive configuration wizard
|
|
1236
1224
|
- [ ] Watch mode for local development
|
|
1237
|
-
- [ ]
|
|
1225
|
+
- [ ] Additional publishers (GitHub Wiki, Obsidian)
|
|
1238
1226
|
|
|
1239
1227
|
See [ROADMAP.md](./ROADMAP.md) for detailed planning.
|
|
1240
1228
|
|
|
@@ -1256,6 +1244,6 @@ MIT
|
|
|
1256
1244
|
|
|
1257
1245
|
<div align="center">
|
|
1258
1246
|
|
|
1259
|
-
**Made with
|
|
1247
|
+
**Made with ❤️ by RepoLens for developers who care about architecture**
|
|
1260
1248
|
|
|
1261
1249
|
</div>
|
package/RELEASE.md
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
RepoLens uses semantic versioning:
|
|
6
6
|
|
|
7
|
-
- Patch
|
|
8
|
-
- Minor
|
|
9
|
-
- Major
|
|
7
|
+
- **Patch**: bug fixes, internal cleanup, non-breaking improvements
|
|
8
|
+
- **Minor**: new features, new commands, new publishers
|
|
9
|
+
- **Major**: breaking CLI or config changes
|
|
10
10
|
|
|
11
11
|
## Release Checklist
|
|
12
12
|
|
|
@@ -18,14 +18,19 @@ RepoLens uses semantic versioning:
|
|
|
18
18
|
4. Update `CHANGELOG.md`
|
|
19
19
|
5. Bump version in `package.json`
|
|
20
20
|
6. Commit release changes
|
|
21
|
-
7. Tag the release
|
|
22
|
-
8. Push branch and tag
|
|
23
|
-
9.
|
|
21
|
+
7. Tag the release: `git tag v<version>`
|
|
22
|
+
8. Push branch and tag: `git push --follow-tags`
|
|
23
|
+
9. GitHub Actions `release.yml` runs automatically:
|
|
24
|
+
- Security audit (dependency + secrets scanning)
|
|
25
|
+
- Test suite (90 tests)
|
|
26
|
+
- Create GitHub Release with tarball
|
|
27
|
+
- Publish to npm (`npm publish --access public`)
|
|
28
|
+
10. Verify on npm: `npm view @chappibunny/repolens version`
|
|
24
29
|
|
|
25
30
|
## Example Patch Release
|
|
26
31
|
|
|
27
32
|
```bash
|
|
28
|
-
# 1.
|
|
33
|
+
# 1. Bump version + create tag
|
|
29
34
|
npm run release:patch # or :minor, :major
|
|
30
35
|
|
|
31
36
|
# 2. Run tests
|
|
@@ -34,13 +39,32 @@ npm test
|
|
|
34
39
|
# 3. Test installation
|
|
35
40
|
npm run test:install
|
|
36
41
|
|
|
37
|
-
# 4. Push release
|
|
42
|
+
# 4. Push release (triggers release.yml workflow)
|
|
38
43
|
git push --follow-tags
|
|
39
44
|
|
|
40
45
|
# 5. Verify GitHub Actions
|
|
41
46
|
# Check: https://github.com/CHAPIBUNNY/repolens/actions
|
|
47
|
+
|
|
48
|
+
# 6. Verify npm publish
|
|
49
|
+
npm view @chappibunny/repolens version
|
|
42
50
|
```
|
|
43
51
|
|
|
52
|
+
## CI/CD Notes
|
|
53
|
+
|
|
54
|
+
### Important: CI Install Strategy
|
|
55
|
+
|
|
56
|
+
GitHub Actions workflows use `rm -rf node_modules package-lock.json && npm install` instead of `npm ci`. This is because a macOS-generated `package-lock.json` doesn't properly resolve Linux platform-specific optional dependencies (e.g., `@rollup/rollup-linux-x64-gnu` required by Vitest).
|
|
57
|
+
|
|
58
|
+
- **Do NOT** use `npm ci` in CI workflows
|
|
59
|
+
- **Do NOT** commit `package-lock.json` changes made on CI runners back to the repo
|
|
60
|
+
- Always delete both `node_modules` and `package-lock.json` before install in CI
|
|
61
|
+
|
|
62
|
+
### npm Publishing
|
|
63
|
+
|
|
64
|
+
The `release.yml` workflow publishes to npm automatically when a `v*` tag is pushed. It requires:
|
|
65
|
+
- `NPM_TOKEN` secret set in GitHub repository settings
|
|
66
|
+
- Token must have publish access to `@chappibunny` scope
|
|
67
|
+
|
|
44
68
|
## Testing Upgrade Path
|
|
45
69
|
|
|
46
70
|
To test that users can upgrade successfully:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chappibunny/repolens",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"description": "AI-assisted documentation intelligence system for technical and non-technical audiences",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
"architecture",
|
|
23
23
|
"github",
|
|
24
24
|
"notion",
|
|
25
|
+
"confluence",
|
|
25
26
|
"markdown",
|
|
26
27
|
"developer-tools",
|
|
27
|
-
"rabitai",
|
|
28
28
|
"repolens",
|
|
29
29
|
"observability",
|
|
30
|
-
"dashboard",
|
|
31
30
|
"metrics",
|
|
32
31
|
"team-collaboration",
|
|
33
|
-
"discord"
|
|
32
|
+
"discord",
|
|
33
|
+
"ai-documentation"
|
|
34
34
|
],
|
|
35
35
|
"repository": {
|
|
36
36
|
"type": "git",
|