@chappibunny/repolens 1.3.0 → 1.4.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/README.md CHANGED
@@ -8,19 +8,26 @@
8
8
  Repository Intelligence CLI
9
9
  ```
10
10
 
11
- [![Tests](https://img.shields.io/badge/tests-163%20passing-brightgreen)](https://github.com/CHAPIBUNNY/repolens/actions)
12
- [![Security](https://img.shields.io/badge/security-hardened-blue)](SECURITY.md)
13
- [![Vulnerabilities](https://img.shields.io/badge/vulnerabilities-0-brightgreen)](SECURITY.md)
11
+ [![npm version](https://img.shields.io/npm/v/@chappibunny/repolens)](https://www.npmjs.com/package/@chappibunny/repolens)
12
+ [![VS Code Extension](https://img.shields.io/visual-studio-marketplace/v/CHAPIBUNNY.repolens-architecture?label=VS%20Code)](https://marketplace.visualstudio.com/items?itemName=CHAPIBUNNY.repolens-architecture)
13
+ [![Tests](https://img.shields.io/badge/tests-185%20passing-brightgreen)](https://github.com/CHAPIBUNNY/repolens/actions)
14
14
  [![License](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
15
- [![Security Audit](https://img.shields.io/badge/security%20audit-passed-brightgreen)](SECURITY.md)
16
15
 
17
- AI-assisted documentation intelligence system that generates architecture docs for engineers AND readable system docs for stakeholders
16
+ **Your architecture docs are already outdated.** RepoLens fixes that.
18
17
 
19
- **Current Status**: v1.3.0 Stable Release
18
+ RepoLens scans your repository, generates living architecture documentation, and publishes it to Notion, Confluence, GitHub Wiki, or Markdown — automatically on every push. Engineers get technical docs. Stakeholders get readable system overviews. Nobody writes a word.
20
19
 
21
- 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.
20
+ > Stable as of v1.0 [API guarantees](STABILITY.md) · [Security hardened](SECURITY.md) · v1.4.0
22
21
 
23
- The CLI, configuration schema, and plugin interface are **stable** as of v1.0. See [STABILITY.md](STABILITY.md) for the full API contract and semver guarantees.
22
+ ---
23
+
24
+ ## 🎬 Demo
25
+
26
+ > **Try it now** — no installation required. Run `npx @chappibunny/repolens demo` on any repo for an instant local preview.
27
+
28
+ [![RepoLens Demo](https://img.youtube.com/vi/hNd7xim_rTE/maxresdefault.jpg)](https://youtu.be/hNd7xim_rTE)
29
+
30
+ ▶️ *Click to watch on YouTube*
24
31
 
25
32
  ---
26
33
 
@@ -66,613 +73,89 @@ Run `npx @chappibunny/repolens migrate` to automatically update your workflow fi
66
73
 
67
74
  ---
68
75
 
69
- ---
76
+ ## 📋 What It Generates
70
77
 
71
- ## 🎯 What RepoLens Does
72
-
73
- RepoLens transforms repositories into documented, understandable systems with **AI-assisted documentation intelligence**:
74
-
75
- ### 🤖 Two Output Modes
76
-
77
- **Deterministic Mode (Default)**
78
- - Fast, free, always reliable
79
- - Generates technical documentation from repository structure
80
- - Perfect for code inventories and reference docs
81
-
82
- **AI-Enhanced Mode (Optional)**
83
- - Adds natural language explanations and insights
84
- - Creates audience-specific documentation (technical + non-technical)
85
- - Understands business context and data flows
86
- - Provider-agnostic (OpenAI, Anthropic, Azure, local models)
87
-
88
- ### 📋 Documentation Types
89
-
90
- **Non-Technical Documents** (readable by founders, PMs, ops):
91
- - **Executive Summary** — Project overview, capabilities, tech summary
92
- - **Business Domains** — What the system does by functional area
93
- - **Data Flows** — How information moves through the system
94
-
95
- **Mixed-Audience Documents** (useful for everyone):
96
- - **System Overview** — Tech stack, scale, module inventory
97
- - **Developer Onboarding** — How to get started contributing
98
- - **Change Impact** — Architecture diff with context
99
-
100
- **Technical Documents** (engineers only):
101
- - **Architecture Overview** — Layered technical analysis
102
- - **Module Catalog** — Complete code inventory with patterns
103
- - **API Surface** — REST endpoints, methods, routes
104
- - **Route Map** — Frontend routes and pages
105
- - **System Map** — Visual architecture diagrams
106
-
107
- ### 🔍 Smart Detection
108
-
109
- RepoLens automatically detects:
110
- - **Frameworks**: Next.js, React, Vue, Express, NestJS, and more
111
- - **Languages**: TypeScript, JavaScript
112
- - **Build Tools**: Vite, Webpack, Turbo, esbuild
113
- - **Testing**: Vitest, Jest, Playwright, Cypress
114
- - **Business Domains**: Authentication, Market Data, Payments, Content, etc.
115
- - **Data Flows**: How information moves through your system
116
- - **Architectural Patterns**: Module relationships and dependencies
117
-
118
- ### ✨ Key Features
119
-
120
- ✅ **AI-Assisted Documentation** - Optional AI layer for natural language explanations
121
- ✅ **Multi-Audience Output** - Technical docs for engineers + readable docs for stakeholders
122
- ✅ **Zero Hallucination Policy** - AI receives only structured context, never raw code
123
- ✅ **Provider Agnostic** - Works with any OpenAI-compatible API
124
- ✅ **Deterministic Fallback** - Always generates docs even if AI unavailable
125
- ✅ **Business Domain Inference** - Automatically maps code to business functions
126
- ✅ **Data Flow Analysis** - Understands how information moves through your system
127
- ✅ **Multiple Publishers** - Output to Notion, Confluence, GitHub Wiki, Markdown, or all four
128
- ✅ **Branch-Aware** - Prevent doc conflicts across branches
129
- ✅ **GitHub Actions** - Autonomous operation on every push
130
- ✅ **Team Notifications** - Discord integration with rich embeds (NEW in v0.6.0)
131
- ✅ **Health Score Tracking** - Monitor documentation quality over time
132
- ✅ **Watch Mode** - Auto-regenerate docs on file changes (NEW in v0.7.0)
133
- ✅ **Interactive Setup** - Step-by-step configuration wizard (NEW in v0.7.0)
134
- ✅ **Performance Metrics** - Timing breakdown for scan/render/publish (NEW in v0.7.0)
135
- ✅ **Actionable Errors** - Enhanced error messages with fix guidance (NEW in v0.7.0)
136
- ✅ **GraphQL Schema Detection** - Discover types, queries, mutations, and resolvers (NEW in v0.8.0)
137
- ✅ **TypeScript Type Graph** - Map interfaces, classes, and type relationships (NEW in v0.8.0)
138
- ✅ **Dependency Graph** - Import analysis with circular dependency detection (NEW in v0.8.0)
139
- ✅ **Architecture Drift** - Track structural changes against a baseline (NEW in v0.8.0)
140
- ✅ **Plugin System** - Extend with custom renderers, publishers, and hooks (NEW in v0.9.0)
141
- ✅ **Stable API** - CLI, config, and plugin interface frozen with semver guarantees (v1.0.0)
78
+ **11 document types** for three audiences — no manual writing required:
142
79
 
143
- ---
80
+ | Audience | Documents |
81
+ |---|---|
82
+ | **Stakeholders** (founders, PMs, ops) | Executive Summary · Business Domains · Data Flows |
83
+ | **Everyone** | System Overview · Developer Onboarding · Change Impact |
84
+ | **Engineers** | Architecture Overview · Module Catalog · API Surface · Route Map · System Map |
144
85
 
145
- ## 👥 Team Features (New in v0.6.0)
86
+ **Two modes:** Deterministic (free, fast, always works) or AI-Enhanced (optional OpenAI, Anthropic, Azure, Ollama).
146
87
 
147
- ### 💬 Discord Notifications
88
+ ---
148
89
 
149
- Get notified when documentation changes significantly:
90
+ ## Why RepoLens
150
91
 
151
- **Features:**
152
- - Rich embeds with coverage, health score, and change percentage
153
- - Threshold-based notifications (only for significant changes)
154
- - Branch filtering with glob pattern support
155
- - Secure webhook configuration via environment variable
156
-
157
- **Setup Discord Notifications:**
158
-
159
- 1. **Create a webhook** in your Discord server:
160
- - Server Settings Integrations Webhooks New Webhook
161
- - Copy the webhook URL
162
-
163
- 2. **Add to environment**:
164
- ```bash
165
- # .env (never commit!)
166
- DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/xxx/xxx
167
- ```
168
-
169
- 3. **Configure in `.repolens.yml`** (optional):
170
- ```yaml
171
- discord:
172
- enabled: true # Default: true (if webhook configured)
173
- notifyOn: significant # Options: always, significant, never
174
- significantThreshold: 10 # Notify if change >10% (default)
175
- branches: # Which branches to notify (default: all)
176
- - main
177
- - develop
178
- ```
179
-
180
- 4. **Add GitHub Actions secret** (for CI/CD):
181
- - Repo Settings → Secrets and variables → Actions
182
- - New repository secret: `DISCORD_WEBHOOK_URL`
183
-
184
- **Notification includes:**
185
- - Branch and commit information
186
- - Files scanned and modules analyzed
187
- - Coverage percentage and health score
188
- - Change percentage from previous run
189
- - Direct links to Notion and GitHub documentation
92
+ | | |
93
+ |---|---|
94
+ | 🤖 **Autonomous** | Runs on every push via GitHub Actions — docs stay evergreen |
95
+ | 👥 **Multi-Audience** | Technical docs + stakeholder-readable overviews from one scan |
96
+ | 📤 **Multi-Publisher** | Notion, Confluence, GitHub Wiki, Markdown — or all four at once |
97
+ | 🧠 **AI-Assisted** | Optional AI with zero-hallucination policy (structured context only) |
98
+ | 🔍 **Smart Detection** | Frameworks, domains, data flows, dependencies, drift — all automatic |
99
+ | 🔌 **Extensible** | Plugin system for custom renderers, publishers, and hooks |
100
+ | 🛡️ **Secure** | Secret detection, injection prevention, rate limiting, supply chain hardening |
101
+ | **Fast** | Handles repos up to 50k files with performance guardrails |
190
102
 
191
103
  ---
192
104
 
193
105
  ## 📦 Installation
194
106
 
195
- ### Recommended: npm Registry
196
-
197
107
  ```bash
198
108
  npm install @chappibunny/repolens
199
109
  ```
200
110
 
201
- Installs from npm registry.
202
-
203
- ### Alternative Methods
204
-
205
- <details>
206
- <summary><b>Option B: GitHub Direct Install</b></summary>
207
-
208
- Install from the latest GitHub commit:
209
-
210
- ```bash
211
- npm install github:CHAPIBUNNY/repolens
212
- ```
213
- </details>
214
-
215
- <details>
216
- <summary><b>Option C: Local Development</b></summary>
217
-
218
- Clone and link for development:
219
-
220
- ```bash
221
- git clone https://github.com/CHAPIBUNNY/repolens.git
222
- cd repolens
223
- npm link
224
- ```
225
- </details>
226
-
227
- <details>
228
- <summary><b>Option D: GitHub Release Tarball</b></summary>
229
-
230
- Install from a specific version:
231
-
232
- ```bash
233
- npm install https://github.com/CHAPIBUNNY/repolens/releases/download/v1.3.0/chappibunny-repolens-1.3.0.tgz
234
- ```
235
- </details>
111
+ Or try instantly without installing: `npx @chappibunny/repolens demo`
236
112
 
237
- > **Having install problems?** See [TROUBLESHOOTING.md](TROUBLESHOOTING.md) for solutions to common issues like `ENOTEMPTY`, `npm ci` failures, and stale versions.
113
+ For alternative methods, see [INSTALLATION.md](INSTALLATION.md).
238
114
 
239
115
  ---
240
116
 
241
- ## 🎓 Complete Onboarding Guide
117
+ ## 🎨 VS Code Extension
242
118
 
243
- ### Step 1: Initialize RepoLens
119
+ **View your architecture directly in VS Code** — browse modules, visualize dependencies, and explore your codebase structure without leaving the editor.
244
120
 
245
- Run this in your project root:
246
-
247
- ```bash
248
- npx @chappibunny/repolens init
121
+ **Install from Marketplace:**
249
122
  ```
250
-
251
- **What it creates:**
252
- - `.repolens.yml` — Configuration file
253
- - `.github/workflows/repolens.yml` — Auto-publishing workflow
254
- - `.env.example` — Environment variable template
255
- - `README.repolens.md` — Quick reference guide
256
-
257
- **Default configuration works for:**
258
- - Next.js projects
259
- - React applications
260
- - Node.js backends
261
- - Monorepos with common structure
262
-
263
- ### Step 2: Configure Publishers
264
-
265
- Open `.repolens.yml` and verify the `publishers` section:
266
-
267
- ```yaml
268
- publishers:
269
- - markdown # Always works, no setup needed
270
- - notion # Requires NOTION_TOKEN and NOTION_PARENT_PAGE_ID
271
- - confluence # Requires CONFLUENCE_URL, CONFLUENCE_EMAIL, CONFLUENCE_API_TOKEN, CONFLUENCE_SPACE_KEY
272
- ```
273
-
274
- **Markdown Only** (simplest):
275
- ```yaml
276
- publishers:
277
- - markdown
278
- ```
279
-
280
- **Notion Only**:
281
- ```yaml
282
- publishers:
283
- - notion
284
- ```
285
-
286
- **Confluence Only**:
287
- ```yaml
288
- publishers:
289
- - confluence
123
+ ext install CHAPIBUNNY.repolens-architecture
290
124
  ```
291
- Documentation lands in `.repolens/` directory. Commit these files or ignore them.
292
-
293
- **Notion + Markdown** (recommended):
294
- ```yaml
295
- publishers:
296
- - notion
297
- - markdown
298
- ```
299
- Docs published to Notion for team visibility, plus local Markdown backups.
300
-
301
- **Confluence + Markdown**:
302
- ```yaml
303
- publishers:
304
- - confluence
305
- - markdown
306
- ```
307
- Docs published to Confluence for enterprise teams, plus local Markdown backups.
308
-
309
- **All Three**:
310
- ```yaml
311
- publishers:
312
- - notion
313
- - confluence
314
- - markdown
315
- ```
316
- Maximum visibility: Notion for async collaboration, Confluence for enterprise docs, Markdown for local backups.
317
-
318
- **GitHub Wiki** (ideal for open source):
319
- ```yaml
320
- publishers:
321
- - github_wiki
322
- - markdown
323
- ```
324
- Docs live alongside your code — accessible from the repo's Wiki tab. Requires `GITHUB_TOKEN`.
325
-
326
- ### Step 3: Enable AI Features (Optional)
327
-
328
- **AI-enhanced documentation adds natural language explanations for non-technical audiences.**
329
-
330
- **3.1: Choose an AI Provider**
331
-
332
- RepoLens works with any OpenAI-compatible API:
333
- - **OpenAI** (gpt-5-mini, gpt-5.4, gpt-5-nano)
334
- - **Anthropic Claude** (via API gateway)
335
- - **Azure OpenAI** (enterprise deployments)
336
- - **Local Models** (Ollama, LM Studio, etc.)
337
-
338
- **3.2: Add Environment Variables**
339
-
340
- Create `.env` in your project root:
341
- ```bash
342
- # Enable AI features
343
- REPOLENS_AI_ENABLED=true
344
- REPOLENS_AI_API_KEY=sk-xxxxxxxxxxxxx
345
-
346
- # Optional: Customize provider
347
- REPOLENS_AI_BASE_URL=https://api.openai.com/v1
348
- REPOLENS_AI_MODEL=gpt-5-mini
349
- REPOLENS_AI_MAX_TOKENS=2000
350
- ```
351
-
352
- **3.3: Configure AI in .repolens.yml**
353
-
354
- ```yaml
355
- ai:
356
- enabled: true # Enable AI features
357
- mode: hybrid # hybrid, full, or off
358
- max_tokens: 2000 # Token limit per request
359
-
360
- features:
361
- executive_summary: true # Non-technical overview
362
- business_domains: true # Functional area descriptions
363
- architecture_overview: true # Layered technical analysis
364
- data_flows: true # System data flow explanations
365
- developer_onboarding: true # Getting started guide
366
- change_impact: true # Architecture diff with context
367
- ```
368
-
369
- **Cost Estimates** (with gpt-5-mini):
370
- - Small repo (<50 files): $0.10-$0.30 per run
371
- - Medium repo (50-200 files): $0.30-$0.80 per run
372
- - Large repo (200+ files): $0.80-$2.00 per run
373
-
374
- **For GitHub Actions**, add as repository secret:
375
- - Name: `AI_KEY`, Value: `sk-xxxxx` (your OpenAI API key)
376
-
377
- See [AI.md](AI.md) for complete AI documentation and provider setup.
378
-
379
- ### Step 4: Set Up Notion Integration (Optional)
380
-
381
- If using the Notion publisher:
382
-
383
- **4.1: Create Notion Integration**
384
- 1. Go to [notion.so/my-integrations](https://www.notion.so/my-integrations)
385
- 2. Click **"+ New Integration"**
386
- 3. Name it **"RepoLens"**
387
- 4. Select your workspace
388
- 5. Copy the **Internal Integration Token** (starts with `secret_`)
389
125
 
390
- **4.2: Create Parent Page**
391
- 1. Create a new page in Notion (e.g., "📚 Architecture Docs")
392
- 2. Click **"..."** menu → **"Add connections"** → Select **"RepoLens"**
393
- 3. Copy the page URL: `https://notion.so/workspace/PAGE_ID?xxx`
394
- 4. Extract the `PAGE_ID` (32-character hex string)
126
+ [**→ Get it on Visual Studio Marketplace**](https://marketplace.visualstudio.com/items?itemName=CHAPIBUNNY.repolens-architecture)
395
127
 
396
- **4.3: Add Environment Variables**
397
-
398
- **For Local Development:**
399
- Create `.env` in your project root:
400
- ```bash
401
- NOTION_TOKEN=secret_xxxxxxxxxxxxx
402
- NOTION_PARENT_PAGE_ID=xxxxxxxxxxxxx
403
- NOTION_VERSION=2022-06-28
404
- ```
405
-
406
- **For GitHub Actions:**
407
- Add as repository secrets:
408
- 1. Go to your repo → **Settings** → **Secrets and variables** → **Actions**
409
- 2. Click **"New repository secret"**
410
- 3. Add:
411
- - Name: `NOTION_TOKEN`, Value: `secret_xxxxx`
412
- - Name: `NOTION_PARENT_PAGE_ID`, Value: `xxxxxx`
413
-
414
- ### Step 4a: Set Up Confluence Integration (Optional)
415
-
416
- If using the Confluence publisher:
417
-
418
- **4a.1: Generate Confluence API Token**
419
- 1. Go to [id.atlassian.com/manage-profile/security/api-tokens](https://id.atlassian.com/manage-profile/security/api-tokens)
420
- 2. Click **"Create API token"**
421
- 3. Name it **"RepoLens"**
422
- 4. Copy the generated token (save it securely - you won't see it again!)
423
-
424
- **4a.2: Find Your Space Key**
425
- 1. Navigate to your Confluence space
426
- 2. Go to **Space Settings** → **Space details**
427
- 3. Note the **Space Key** (e.g., `DOCS`, `ENG`, `TECH`)
428
-
429
- **4a.3: Get Parent Page ID (Optional)**
430
- 1. Navigate to the page where you want RepoLens docs nested
431
- 2. Click **"..."** menu → **"Page information"**
432
- 3. Copy the page ID from the URL: `pageId=123456789`
433
- 4. If skipped, docs will be created at space root level
434
-
435
- **4a.4: Add Environment Variables**
436
-
437
- **For Local Development:**
438
- Create `.env` in your project root:
439
- ```bash
440
- CONFLUENCE_URL=https://your-company.atlassian.net/wiki
441
- CONFLUENCE_EMAIL=your-email@example.com
442
- CONFLUENCE_API_TOKEN=your-api-token-here
443
- CONFLUENCE_SPACE_KEY=DOCS
444
- CONFLUENCE_PARENT_PAGE_ID=123456789 # Optional
445
- ```
446
-
447
- **For Confluence Server/Data Center** (self-hosted):
448
- ```bash
449
- CONFLUENCE_URL=https://confluence.yourcompany.com
450
- CONFLUENCE_EMAIL=your-username # Use username instead of email
451
- CONFLUENCE_API_TOKEN=your-personal-access-token
452
- CONFLUENCE_SPACE_KEY=DOCS
453
- CONFLUENCE_PARENT_PAGE_ID=123456789 # Optional
454
- ```
455
-
456
- **For GitHub Actions:**
457
- Add as repository secrets:
458
- 1. Go to your repo → **Settings** → **Secrets and variables** → **Actions**
459
- 2. Click **"New repository secret"**
460
- 3. Add:
461
- - Name: `CONFLUENCE_URL`, Value: `https://your-company.atlassian.net/wiki`
462
- - Name: `CONFLUENCE_EMAIL`, Value: `your-email@example.com`
463
- - Name: `CONFLUENCE_API_TOKEN`, Value: `your-token`
464
- - Name: `CONFLUENCE_SPACE_KEY`, Value: `DOCS`
465
- - Name: `CONFLUENCE_PARENT_PAGE_ID`, Value: `123456789` (optional)
466
-
467
- **Confluence + Notion + Markdown** (all three!):
468
- ```yaml
469
- publishers:
470
- - markdown
471
- - notion
472
- - confluence
473
- ```
474
-
475
- Docs published to both Notion and Confluence for maximum visibility!
476
-
477
- ### Step 5: Configure Branch Publishing (Recommended)
478
-
479
- Prevent documentation conflicts by limiting which branches publish to Notion/Confluence:
480
-
481
- ```yaml
482
- notion:
483
- branches:
484
- - main # Only main branch publishes
485
- includeBranchInTitle: false # Clean titles (no [branch-name] suffix)
486
-
487
- confluence:
488
- branches:
489
- - main # Only main branch publishes to Confluence
490
- ```
491
-
492
- **Options:**
493
- - `branches: [main]` — Only main publishes (recommended)
494
- - `branches: [main, staging, release/*]` — Multiple branches with glob support
495
- - Omit `branches` entirely — All branches publish (may cause conflicts)
496
-
497
- **Markdown publisher always runs on all branches** (local files don't conflict).
498
-
499
- ### Step 6: Customize Scan Patterns (Optional)
500
-
501
- Adjust what files RepoLens scans:
502
-
503
- ```yaml
504
- scan:
505
- include:
506
- - "src/**/*.{ts,tsx,js,jsx}"
507
- - "app/**/*.{ts,tsx,js,jsx}"
508
- - "lib/**/*.{ts,tsx,js,jsx}"
509
- ignore:
510
- - "node_modules/**"
511
- - ".next/**"
512
- - "dist/**"
513
- - "build/**"
514
-
515
- module_roots:
516
- - "src"
517
- - "app"
518
- - "lib"
519
- ```
520
-
521
- **Performance Note:** RepoLens warns at 10k files and limits at 50k files.
522
-
523
- ### Step 7: Generate Documentation
524
-
525
- Run locally to test:
526
-
527
- ```bash
528
- npx @chappibunny/repolens publish
529
- ```
530
-
531
- **Expected output:**
532
- ```
533
- RepoLens 🔍
534
- ────────────────────────────────────────────────────
535
- [RepoLens] Using config: /path/to/.repolens.yml
536
- [RepoLens] Loading configuration...
537
- [RepoLens] Scanning repository...
538
- [RepoLens] Detected 42 modules
539
- [RepoLens] Publishing documentation...
540
- [RepoLens] Publishing to Notion from branch: main
541
- [RepoLens] ✓ System Overview published
542
- [RepoLens] ✓ Module Catalog published
543
- [RepoLens] ✓ API Surface published
544
- [RepoLens] ✓ Route Map published
545
- [RepoLens] ✓ System Map published
546
- ```
547
-
548
- ### Step 8: Verify Output
549
-
550
- **Markdown Output:****
551
- ```bash
552
- ls .repolens/
553
- # system_overview.md
554
- # module_catalog.md
555
- # api_surface.md
556
- # route_map.md
557
- # system_map.md
558
- # system_map.md
559
- ```
560
-
561
- **Notion Output:**
562
- Open your Notion parent page and verify child pages were created:
563
- - 📊 RepoLens — Executive Summary (if AI enabled)
564
- - 📈 RepoLens — Business Domains (if AI enabled)
565
- - 📊 RepoLens — System Overview
566
- - 📚 RepoLens — Developer Onboarding (if AI enabled)
567
- - 📊 RepoLens — Architecture Overview (if AI enabled)
568
- - 📊 RepoLens — Data Flows (if AI enabled)
569
- - 📌 RepoLens — Module Catalog
570
- - 🔌 RepoLens — API Surface
571
- - 🗺️ RepoLens — Route Map
572
- - 🏛️ RepoLens — System Map
573
-
574
- ### Step 9: Enable GitHub Actions (Automatic Updates)
575
-
576
- **Commit the workflow:**
577
- ```bash
578
- git add .github/workflows/repolens.yml .repolens.yml
579
- git commit -m "Add RepoLens documentation automation"
580
- git push
581
- ```
582
-
583
- **What happens next:**
584
- - ✅ Every push to `main` regenerates docs
585
- - ✅ Pull requests get architecture diff comments
586
- - ✅ Documentation stays evergreen automatically
128
+ **Features:**
129
+ - 🏗️ **Architecture Explorer** — Tree view of your system structure
130
+ - 📊 **Dependency Visualizer** — Interactive dependency graphs
131
+ - 📁 **Module Browser** Navigate modules by domain and function
132
+ - 🔍 **Command Palette** — Quick access to architecture insights
133
+ - 📈 **System Metrics** — Real-time architecture health indicators
587
134
 
588
- **Pro Tip:** Add `.repolens/` to `.gitignore` if you don't want to commit local Markdown files (Notion publisher is your source of truth).
135
+ The extension reads your `.repolens.yml` configuration and provides an interactive UI for exploring the documentation that RepoLens generates.
589
136
 
590
137
  ---
591
138
 
592
- ## 🎮 Usage Commands
139
+ ## 🎓 Onboarding Guide
593
140
 
594
- ### Publish Documentation
595
-
596
- Auto-discovers `.repolens.yml`:
597
- ```bash
598
- npx @chappibunny/repolens publish
599
- ```
141
+ Step-by-step setup for publishers, AI features, Notion, Confluence, GitHub Wiki, Discord, and CI/CD automation.
600
142
 
601
- Specify config path explicitly:
602
- ```bash
603
- npx @chappibunny/repolens publish --config /path/to/.repolens.yml
604
- ```
605
-
606
- Via npm script (add to package.json):
607
- ```json
608
- {
609
- "scripts": {
610
- "docs": "repolens publish"
611
- }
612
- }
613
- ```
614
-
615
- ### Validate Setup
616
-
617
- Check if your RepoLens setup is valid:
618
-
619
- ```bash
620
- npx @chappibunny/repolens doctor
621
- ```
143
+ **[→ Full Onboarding Guide](ONBOARDING.md)**
622
144
 
623
- Validates:
624
- - ✅ `.repolens.yml` exists and is valid YAML
625
- - ✅ Required config fields present
626
- - ✅ Publishers configured correctly
627
- - ✅ Scan patterns defined
628
- - ✅ Publisher configuration valid
629
-
630
- ### Migrate Workflows
631
-
632
- **🚨 Upgrading from v0.3.0 or earlier?** Automatically update your GitHub Actions workflows:
633
-
634
- ```bash
635
- npx @chappibunny/repolens migrate
636
- ```
637
-
638
- Preview changes without applying:
639
- ```bash
640
- npx @chappibunny/repolens migrate --dry-run
641
- ```
642
-
643
- What it fixes:
644
- - ❌ Removes outdated `cd tools/repolens` commands
645
- - ✅ Updates to `npx @chappibunny/repolens@latest publish`
646
- - ✅ Adds Node.js setup step if missing
647
- - ✅ Adds environment variables (NOTION_TOKEN, REPOLENS_AI_API_KEY)
648
- - 💾 Creates backup files for safety
649
-
650
- **Common error it fixes:**
651
- ```
652
- Run cd tools/repolens
653
- cd: tools/repolens: No such file or directory
654
- Error: Process completed with exit code 1.
655
- ```
656
-
657
- See [MIGRATION.md](MIGRATION.md) for detailed upgrade guide.
658
-
659
- ### Quick Preview (No API Keys)
660
-
661
- Generate local documentation instantly — no Notion, Confluence, or GitHub tokens needed:
662
- ```bash
663
- npx @chappibunny/repolens demo
664
- ```
665
-
666
- Works on any repo, even without a `.repolens.yml`. Output is written to `.repolens/`.
667
-
668
- ### Get Help
145
+ ---
669
146
 
670
- ```bash
671
- npx @chappibunny/repolens --help
672
- npx @chappibunny/repolens --version
673
- ```
147
+ ## 🎮 Commands
674
148
 
675
- ---
149
+ | Command | Description |
150
+ |---|---|
151
+ | `repolens init` | Scaffold config + GitHub Actions workflow |
152
+ | `repolens init --interactive` | Step-by-step configuration wizard |
153
+ | `repolens publish` | Scan, generate, and publish documentation |
154
+ | `repolens demo` | Quick local preview — no API keys needed |
155
+ | `repolens doctor` | Validate your setup |
156
+ | `repolens watch` | Auto-regenerate docs on file changes |
157
+ | `repolens migrate` | Upgrade from v0.3.0 workflows ([details](MIGRATION.md)) |
158
+ | `repolens feedback` | Send feedback to the team |
676
159
 
677
160
  ---
678
161
 
@@ -682,13 +165,13 @@ npx @chappibunny/repolens --version
682
165
 
683
166
  ```mermaid
684
167
  graph LR
685
- CLI[bin/repolens<br/>1 file] --> Core[src/core<br/>3 files]
686
- Publishers[src/publishers<br/>4 files] --> Core
687
- Publishers --> Renderers[src/renderers<br/>3 files]
688
- Publishers --> Utils[src/utils<br/>3 files]
168
+ CLI[bin/repolens<br/>1 file] --> Core[src/core<br/>4 files]
169
+ Publishers[src/publishers<br/>6 files] --> Core
170
+ Publishers --> Renderers[src/renderers<br/>4 files]
171
+ Publishers --> Utils[src/utils<br/>10 files]
689
172
  Renderers --> Core
690
173
  Delivery[src/delivery<br/>1 file] --> Publishers
691
- Tests[tests<br/>8 files] -. tests .-> CLI
174
+ Tests[tests<br/>15 files] -. tests .-> CLI
692
175
  Tests -. tests .-> Core
693
176
  Tests -. tests .-> Publishers
694
177
 
@@ -738,491 +221,28 @@ When you open a pull request, RepoLens posts:
738
221
 
739
222
  ---
740
223
 
741
- ## 🔒 Privacy & Telemetry
742
-
743
- RepoLens includes **opt-in** error tracking and usage telemetry to help improve reliability, understand adoption patterns, and prioritize features.
744
-
745
- **Privacy First:**
746
- - ✅ **Disabled by default** - telemetry is opt-in
747
- - ✅ **No code collection** - your source code never leaves your machine
748
- - ✅ **No secrets** - API keys and tokens are never sent
749
- - ✅ **Anonymous** - no personal information or repository names
750
- - ✅ **Transparent** - see exactly what data is collected
751
-
752
- **To enable telemetry**, add to `.env`:
753
- ```bash
754
- REPOLENS_TELEMETRY_ENABLED=true
755
- ```
756
-
757
- **What's collected (when enabled):**
758
-
759
- *Error Tracking (Phase 1):*
760
- - Error messages and stack traces (for debugging)
761
- - Command that failed (e.g., `publish`, `migrate`)
762
- - Basic system info (Node version, platform)
763
-
764
- *Usage Metrics (Phase 2):*
765
- - Command execution times (scan, render, publish)
766
- - Repository size (file count, module count)
767
- - Feature usage (AI enabled, publishers used)
768
- - Success/failure rates
769
-
770
- **Why enable it?**
771
- - 🐛 **Faster bug fixes** - issues you encounter are fixed proactively
772
- - 📊 **Better features** - development focused on real-world usage
773
- - ⚡ **Performance** - optimizations based on actual bottlenecks
774
- - 🎯 **Prioritization** - roadmap guided by community needs
775
-
776
- For full details and example data, see [TELEMETRY.md](TELEMETRY.md).
777
-
778
- ---
779
-
780
- ## 🛡️ Security
781
-
782
- RepoLens implements **defense-in-depth** security to protect your credentials, code, and infrastructure.
783
-
784
- ### Security Architecture (Phase 3)
785
-
786
- **Layer 1: Input Validation** (`src/utils/validate.js`)
787
- - ✅ Schema validation with required field enforcement
788
- - ✅ Injection attack detection (shell, command substitution)
789
- - ✅ Directory traversal prevention (`..`, absolute paths, null bytes)
790
- - ✅ Secret scanning in configuration files
791
- - ✅ Circular reference protection (depth limit: 20 levels)
792
-
793
- **Layer 2: Secret Detection** (`src/utils/secrets.js`)
794
- - ✅ **15+ credential patterns**: OpenAI, GitHub, AWS, Notion, Generic API keys
795
- - ✅ **Entropy-based detection**: High-entropy strings (Shannon entropy > 4.5)
796
- - ✅ **Automatic sanitization**: All logger output, telemetry, error messages
797
- - ✅ **Format**: `sk-abc123xyz` → `sk-ab***yz` (first 2 + last 2 chars visible)
798
-
799
- **Layer 3: Rate Limiting** (`src/utils/rate-limit.js`)
800
- - ✅ **Token bucket algorithm**: 3 requests/second for Notion & AI APIs
801
- - ✅ **Exponential backoff**: Automatic retry with jitter (500ms → 1s → 2s)
802
- - ✅ **Cost protection**: Prevents runaway API usage
803
- - ✅ **Retryable errors**: 429, 500, 502, 503, 504, network timeouts
804
-
805
- **Layer 4: Supply Chain Security**
806
- - ✅ **Action pinning**: GitHub Actions pinned to commit SHAs (not tags)
807
- - ✅ **Minimal permissions**: `contents: read` or `contents: write` only
808
- - ✅ **Dependency audits**: CI/CD fails on critical/high vulnerabilities
809
- - ✅ **npm audit**: 0 vulnerabilities in 519 dependencies
810
-
811
- **Layer 5: Comprehensive Testing**
812
- - ✅ **43 security tests**: Fuzzing, injection, boundary conditions
813
- - ✅ **Attack vectors tested**: SQL, command, path, YAML, NoSQL, LDAP, XML
814
- - ✅ **90 total tests**: 47 functional + 43 security (100% passing)
815
-
816
- ### Security Validation (Automatic)
817
-
818
- ```bash
819
- # Every configuration load:
820
- ✅ No injection patterns detected (;|&`$())
821
- ✅ No secrets in configuration files
822
- ✅ Safe path patterns only (no .. or absolute paths)
823
- ✅ Valid schema (configVersion: 1)
824
-
825
- # Every runtime operation:
826
- ✅ All logs sanitized (secrets redacted)
827
- ✅ Telemetry sanitized (no credentials sent)
828
- ✅ Rate limiting active (3 req/sec)
829
- ✅ Type validation active (prevents type confusion)
830
-
831
- # Every CI/CD run:
832
- ✅ npm audit passing (0 vulnerabilities)
833
- ✅ Security tests passing (43/43)
834
- ✅ Secrets scanner passing (no hardcoded credentials)
835
- ```
836
-
837
- ### Vulnerability Reporting
838
-
839
- - 📧 **Email**: trades@rabitaitrades.com
840
- - 🚨 **DO NOT** open public issues for security bugs
841
- - ⏱️ **Response**: Within 48 hours
842
- - 🔒 **Fix Timeline**: Critical issues within 7 days, others within 30 days
843
- - 📢 **Disclosure**: Coordinated disclosure after fix is released
844
-
845
- ### Security Best Practices
846
-
847
- **✅ DO:**
848
- - Store secrets in GitHub Secrets (not `.repolens.yml`)
849
- - Use environment variables for sensitive data
850
- - Review generated documentation before publishing
851
- - Enable telemetry to catch security issues early
852
- - Run `npm audit` regularly
853
- - Pin workflows to specific versions
854
-
855
- **❌ DON'T:**
856
- - Commit API keys to version control
857
- - Share `.env` files publicly
858
- - Disable security validation
859
- - Use overly broad scan patterns (`**/*`)
860
- - Ignore security warnings
861
-
862
- For complete security documentation and threat model, see [SECURITY.md](SECURITY.md).
863
-
864
- ---
865
-
866
- ## ⚙️ Configuration Reference
867
-
868
- ### Complete Example
869
-
870
- ```yaml
871
- configVersion: 1 # Schema version for future migrations
872
-
873
- project:
874
- name: "my-awesome-app"
875
- docs_title_prefix: "MyApp"
876
-
877
- # Configure output destinations
878
- publishers:
879
- - notion
880
- - confluence
881
- - markdown
882
-
883
- # Notion-specific settings (optional)
884
- notion:
885
- branches:
886
- - main # Only main branch publishes
887
- - staging # Also staging
888
- - release/* # Glob patterns supported
889
- includeBranchInTitle: false # Clean titles without [branch-name]
890
-
891
- # Confluence-specific settings (optional)
892
- confluence:
893
- branches:
894
- - main # Only main branch publishes to Confluence
895
-
896
- # Discord notifications (optional, new in v0.6.0)
897
- discord:
898
- enabled: true # Default: true (if DISCORD_WEBHOOK_URL set)
899
- notifyOn: significant # Options: always, significant, never
900
- significantThreshold: 10 # Notify if change >10% (default)
901
- branches: # Which branches to notify (default: all)
902
- - main
903
- - develop
904
-
905
- # GitHub integration (optional)
906
- github:
907
- owner: "your-username"
908
- repo: "your-repo-name"
909
-
910
- # File scanning configuration
911
- scan:
912
- include:
913
- - "src/**/*.{ts,tsx,js,jsx}"
914
- - "app/**/*.{ts,tsx,js,jsx}"
915
- - "pages/**/*.{ts,tsx,js,jsx}"
916
- - "lib/**/*.{ts,tsx,js,jsx}"
917
- ignore:
918
- - "node_modules/**"
919
- - ".next/**"
920
- - "dist/**"
921
- - "build/**"
922
- - "coverage/**"
923
-
924
- # Module organization
925
- module_roots:
926
- - "src"
927
- - "app"
928
- - "lib"
929
- - "pages"
930
-
931
- # Documentation pages to generate
932
- outputs:
933
- pages:
934
- - key: "system_overview"
935
- title: "System Overview"
936
- description: "High-level snapshot and tech stack"
937
- - key: "module_catalog"
938
- title: "Module Catalog"
939
- description: "Complete module inventory"
940
- - key: "api_surface"
941
- title: "API Surface"
942
- description: "REST endpoints and methods"
943
- - key: "route_map"
944
- title: "Route Map"
945
- description: "Frontend routes and pages"
946
- - key: "system_map"
947
- title: "System Map"
948
- description: "Visual dependency graph"
949
-
950
- # Feature flags (optional, experimental)
951
- features:
952
- architecture_diff: true
953
- route_map: true
954
- visual_diagrams: true
955
- ```
956
-
957
- ### Configuration Fields
958
-
959
- | Field | Type | Required | Description |
960
- |-------|------|----------|-------------|
961
- | `configVersion` | number | **Yes** | Schema version (must be `1`) |
962
- | `project.name` | string | Yes | Project name |
963
- | `project.docs_title_prefix` | string | No | Prefix for documentation titles (default: project name) |
964
- | `publishers` | array | Yes | Output targets: `notion`, `confluence`, `github_wiki`, `markdown` (+ plugin publishers) |
965
- | `plugins` | array | No | Plugin paths or npm package names |
966
- | `notion.branches` | array | No | Branch whitelist for Notion publishing. Supports globs. |
967
- | `notion.includeBranchInTitle` | boolean | No | Add `[branch-name]` to titles (default: `true`) |
968
- | `confluence.branches` | array | No | Branch whitelist for Confluence publishing. Supports globs. |
969
- | `github_wiki.branches` | array | No | Branch whitelist for GitHub Wiki publishing. Supports globs. |
970
- | `github_wiki.sidebar` | boolean | No | Generate `_Sidebar.md` navigation (default: `true`) |
971
- | `github_wiki.footer` | boolean | No | Generate `_Footer.md` (default: `true`) |
972
- | `discord.enabled` | boolean | No | Enable Discord notifications (default: `true` if webhook set) |
973
- | `discord.notifyOn` | string | No | Notification policy: `always`, `significant`, `never` (default: `significant`) |
974
- | `discord.significantThreshold` | number | No | Change % threshold for notifications (default: `10`) |
975
- | `discord.branches` | array | No | Branch filter for notifications. Supports globs. (default: all) |
976
- | `github.owner` | string | No | GitHub org/username |
977
- | `github.repo` | string | No | Repository name |
978
- | `scan.include` | array | Yes | Glob patterns for files to scan |
979
- | `scan.ignore` | array | Yes | Glob patterns to exclude |
980
- | `module_roots` | array | No | Root directories for module detection |
981
- | `outputs.pages` | array | Yes | Documentation pages to generate |
982
- | `features` | object | No | Feature flags (boolean values) |
983
- | `ai.enabled` | boolean | No | Enable AI-powered documentation |
984
- | `ai.mode` | string | No | AI mode: `hybrid`, `full`, or `off` |
985
- | `ai.temperature` | number | No | Generation temperature (0–2). Not supported by all models (e.g. gpt-5-mini ignores it) |
986
- | `ai.max_tokens` | number | No | Max completion tokens per request (>0) |
987
-
988
- ---
989
-
990
- ## 🔐 Environment Variables
991
-
992
- Required for Notion publisher:
993
-
994
- | Variable | Required | Description |
995
- |----------|----------|-------------|
996
- | `NOTION_TOKEN` | Yes | Integration token from notion.so/my-integrations |
997
- | `NOTION_PARENT_PAGE_ID` | Yes | Page ID where docs will be created |
998
- | `NOTION_VERSION` | No | API version (default: `2022-06-28`) |
999
-
1000
- Required for Confluence publisher:
1001
-
1002
- | Variable | Required | Description |
1003
- |----------|----------|-------------|
1004
- | `CONFLUENCE_URL` | Yes | Base URL (e.g., `https://your-company.atlassian.net/wiki`) |
1005
- | `CONFLUENCE_EMAIL` | Yes | Atlassian account email |
1006
- | `CONFLUENCE_API_TOKEN` | Yes | API token from [Atlassian](https://id.atlassian.com/manage-profile/security/api-tokens) |
1007
- | `CONFLUENCE_SPACE_KEY` | Yes | Target space key (e.g., `DOCS`, `ENG`) |
1008
- | `CONFLUENCE_PARENT_PAGE_ID` | No | Parent page ID (docs created at space root if omitted) |
1009
-
1010
- Optional for Discord notifications:
1011
-
1012
- | Variable | Required | Description |
1013
- |----------|----------|-------------|
1014
- | `DISCORD_WEBHOOK_URL` | No | Discord webhook URL for team notifications |
1015
-
1016
- Required for GitHub Wiki publisher:
1017
-
1018
- | Variable | Required | Description |
1019
- |----------|----------|-------------|
1020
- | `GITHUB_TOKEN` | Yes | Personal access token or Actions `${{ secrets.GITHUB_TOKEN }}` |
1021
- | `GITHUB_REPOSITORY` | No | `owner/repo` (auto-detected from git remote in Actions) |
1022
-
1023
- **Local Development:** Create `.env` file in project root
1024
- **GitHub Actions:** Add as repository secrets in Settings → Secrets and variables → Actions
1025
-
1026
- ---
1027
-
1028
- ## 🏗️ Architecture & Design
1029
-
1030
- ### How RepoLens Works
1031
-
1032
- ```
1033
- 1. SCAN 2. ANALYZE 3. RENDER 4. PUBLISH
1034
- ──────────────────────────────────────────────────────────────────
1035
- Read files → Detect tech → Generate docs → Notion pages
1036
- from patterns stack patterns with insights + Confluence pages
1037
- + Markdown files
1038
- ```
1039
-
1040
- **Scan Phase:**
1041
- - Uses `fast-glob` to match your `scan.include` patterns
1042
- - Filters out `scan.ignore` patterns
1043
- - Reads package.json for framework/tool detection
1044
- - Analyzes file paths for Next.js routes, API endpoints
1045
-
1046
- **Analyze Phase:**
1047
- - Extracts frameworks (Next.js, React, Vue, Express, etc.)
1048
- - Detects build tools (Vite, Webpack, Turbo, esbuild)
1049
- - Identifies test frameworks (Vitest, Jest, Playwright)
1050
- - Infers module relationships and dependencies
1051
-
1052
- **Render Phase:**
1053
- - Groups files into modules based on `module_roots`
1054
- - Generates Mermaid diagrams showing module dependencies
1055
- - Creates technical profiles with actual stack insights
1056
- - Renders Markdown documentation
1057
-
1058
- **Publish Phase:**
1059
- - Markdown: Writes files to `.repolens/` directory
1060
- - Notion: Creates/updates pages via API with retry logic
1061
- - Confluence: Creates/updates pages via REST API v1 (storage format)
1062
-
1063
- ### Module Dependency Detection
1064
-
1065
- RepoLens infers relationships by analyzing import patterns:
1066
-
1067
- ```typescript
1068
- // In src/publishers/notion.js
1069
- import { renderSystemOverview } from "../renderers/render.js";
1070
- // → Publishers depend on Renderers
1071
-
1072
- // In src/renderers/render.js
1073
- import { scanRepo } from "../core/scan.js";
1074
- // → Renderers depend on Core
1075
-
1076
- // Result: Dependency graph shows Publishers → Renderers → Core
1077
- ```
1078
-
1079
- ---
1080
-
1081
- ---
1082
-
1083
- ## 🧪 Development
1084
-
1085
- ### Setup
224
+ ## 🔒 Privacy & Security
1086
225
 
1087
- ```bash
1088
- git clone https://github.com/CHAPIBUNNY/repolens.git
1089
- cd repolens
1090
- npm install
1091
- npm link # Makes 'repolens' command available globally
1092
- ```
1093
-
1094
- ### Run Tests
1095
-
1096
- ```bash
1097
- npm test
1098
- ```
1099
-
1100
- **Test Suite:**
1101
- - Config discovery and validation
1102
- - Branch detection (GitHub/GitLab/CircleCI)
1103
- - Markdown publisher
1104
- - Integration workflows
1105
- - Doctor command validation
1106
-
1107
- **Coverage:** 180 tests passing across 15 test files
1108
-
1109
- ### Test Package Installation Locally
1110
-
1111
- Simulates the full user installation experience:
1112
-
1113
- ```bash
1114
- # Pack the tarball
1115
- npm pack
1116
-
1117
- # Install globally from tarball
1118
- npm install -g chappibunny-repolens-1.3.0.tgz
1119
-
1120
- # Verify
1121
- repolens --version
1122
- ```
1123
-
1124
- ### Project Structure
1125
-
1126
- ```
1127
- repolens/
1128
- ├── bin/
1129
- │ └── repolens.js # CLI executable wrapper
1130
- ├── src/
1131
- │ ├── cli.js # Command orchestration + banner
1132
- │ ├── init.js # Scaffolding command (+ interactive wizard)
1133
- │ ├── doctor.js # Validation command
1134
- │ ├── migrate.js # Workflow migration (legacy → current)
1135
- │ ├── watch.js # Watch mode for local development
1136
- │ ├── core/
1137
- │ │ ├── config.js # Config loading + validation
1138
- │ │ ├── config-schema.js # Schema version tracking
1139
- │ │ ├── diff.js # Git diff operations
1140
- │ │ └── scan.js # Repository scanning + metadata extraction
1141
- │ ├── analyzers/
1142
- │ │ ├── domain-inference.js # Business domain mapping
1143
- │ │ ├── context-builder.js # Structured AI context assembly
1144
- │ │ ├── flow-inference.js # Data flow detection
1145
- │ │ ├── graphql-analyzer.js # GraphQL schema detection
1146
- │ │ ├── typescript-analyzer.js # TypeScript type graph analysis
1147
- │ │ ├── dependency-graph.js # Import graph with cycle detection
1148
- │ │ └── drift-detector.js # Architecture drift detection
1149
- │ ├── ai/
1150
- │ │ ├── provider.js # Provider-agnostic AI generation
1151
- │ │ ├── prompts.js # Strict prompt templates
1152
- │ │ ├── document-plan.js # Document structure definition
1153
- │ │ └── generate-sections.js # AI section generation + fallbacks
1154
- │ ├── docs/
1155
- │ │ ├── generate-doc-set.js # Document generation orchestration
1156
- │ │ └── write-doc-set.js # Write docs to disk
1157
- │ ├── renderers/
1158
- │ │ ├── render.js # System overview, catalog, API, routes
1159
- │ │ ├── renderDiff.js # Architecture diff rendering
1160
- │ │ ├── renderMap.js # Unicode dependency diagrams
1161
- │ │ └── renderAnalysis.js # Extended analysis renderers
1162
- │ ├── publishers/
1163
- │ │ ├── index.js # Publisher orchestration + branch filtering
1164
- │ │ ├── publish.js # Publishing pipeline
1165
- │ │ ├── notion.js # Notion API integration
1166
- │ │ ├── confluence.js # Confluence REST API integration
1167
- │ │ ├── github-wiki.js # GitHub Wiki publisher (git-based)
1168
- │ │ └── markdown.js # Local Markdown generation
1169
- │ ├── integrations/
1170
- │ │ └── discord.js # Discord webhook notifications
1171
- │ ├── delivery/
1172
- │ │ └── comment.js # PR comment delivery
1173
- │ ├── plugins/
1174
- │ │ ├── loader.js # Plugin resolution and dynamic import
1175
- │ │ └── manager.js # Plugin registry and lifecycle orchestration
1176
- │ └── utils/
1177
- │ ├── logger.js # Logging utilities
1178
- │ ├── retry.js # API retry logic (exponential backoff)
1179
- │ ├── branch.js # Branch detection (multi-platform)
1180
- │ ├── validate.js # Configuration validation & security
1181
- │ ├── metrics.js # Documentation coverage & health scoring
1182
- │ ├── rate-limit.js # Token bucket rate limiter for APIs
1183
- │ ├── secrets.js # Secret detection & sanitization
1184
- │ ├── telemetry.js # Opt-in error tracking + performance timers
1185
- │ ├── errors.js # Enhanced error messages with guidance
1186
- │ └── update-check.js # Version update notifications
1187
- ├── tests/ # Vitest test suite (180 tests across 15 files)
1188
- ├── .repolens.yml # Dogfooding config
1189
- ├── package.json
1190
- ├── CHANGELOG.md
1191
- ├── STABILITY.md
1192
- ├── RELEASE.md
1193
- └── ROADMAP.md
1194
- ```
226
+ - **Telemetry is opt-in and disabled by default** — no code, secrets, or personal data leaves your machine. See [TELEMETRY.md](TELEMETRY.md).
227
+ - **Defense-in-depth security** — input validation, secret detection (15+ patterns), rate limiting, injection prevention, supply chain hardening. See [SECURITY.md](SECURITY.md).
228
+ - **Report vulnerabilities** to trades@rabitaitrades.com (not public issues). Response within 48 hours.
1195
229
 
1196
230
  ---
1197
231
 
1198
- ## 🚀 Release Process
1199
-
1200
- RepoLens uses automated GitHub Actions releases.
1201
-
1202
- ### Creating a Release
1203
-
1204
- ```bash
1205
- # Patch version (1.0.0 1.0.1) - Bug fixes
1206
- npm run release:patch
1207
-
1208
- # Minor version (1.0.0 1.1.0) - New features
1209
- npm run release:minor
1210
-
1211
- # Major version (1.0.0 2.0.0) - Breaking changes
1212
- npm run release:major
1213
-
1214
- # Push the tag to trigger workflow
1215
- git push --follow-tags
1216
- ```
1217
-
1218
- **What happens:**
1219
- 1. ✅ Security audit runs (dependency audit + secret scanning)
1220
- 2. ✅ All tests run
1221
- 3. ✅ Package tarball created
1222
- 4. ✅ GitHub Release published with tarball attached
1223
- 5. ✅ npm package published to `@chappibunny/repolens`
1224
-
1225
- See [RELEASE.md](./RELEASE.md) for detailed workflow.
232
+ ## 📚 Documentation
233
+
234
+ | Guide | Description |
235
+ |---|---|
236
+ | [Onboarding Guide](ONBOARDING.md) | Step-by-step setup: publishers, AI, Notion, Confluence, Discord |
237
+ | [Configuration](CONFIGURATION.md) | Complete `.repolens.yml` schema and examples |
238
+ | [Environment Variables](ENVIRONMENT.md) | All env vars by publisher and feature |
239
+ | [Architecture](ARCHITECTURE.md) | Pipeline diagram, project structure |
240
+ | [Development](DEVELOPMENT.md) | Setup, tests (185 across 15 files), release process |
241
+ | [Security](SECURITY.md) | Threat model, secret detection, validation layers |
242
+ | [Telemetry](TELEMETRY.md) | Opt-in privacy-first usage analytics |
243
+ | [Troubleshooting](TROUBLESHOOTING.md) | Common issues and fixes |
244
+ | [Migration](MIGRATION.md) | Upgrading from v0.3.0 or earlier |
245
+ | [Stability](STABILITY.md) | API contract and semver guarantees |
1226
246
 
1227
247
  ---
1228
248
 
@@ -1239,50 +259,16 @@ See [RELEASE.md](./RELEASE.md) for detailed workflow.
1239
259
 
1240
260
  ## 🗺️ Roadmap
1241
261
 
1242
- **Current Status:** v1.3.0 — Stable Release
1243
-
1244
- ### v1.0 — Complete ✅
1245
-
1246
- - [x] CLI commands: `init`, `doctor`, `publish`, `demo`, `migrate`, `watch`, `feedback`, `version`, `help`
1247
- - [x] Config schema v1 with validation (frozen)
1248
- - [x] Auto-discovery of `.repolens.yml`
1249
- - [x] Publishers: Notion + Confluence + GitHub Wiki + Markdown
1250
- - [x] Branch-aware publishing with filtering
1251
- - [x] Smart tech stack detection from package.json
1252
- - [x] Unicode dependency diagrams (no external deps)
1253
- - [x] AI-assisted documentation intelligence (provider-agnostic)
1254
- - [x] Business domain inference & data flow analysis
1255
- - [x] GitHub Actions automation (publish + release)
1256
- - [x] PR architecture diff comments
1257
- - [x] Performance guardrails (10k warning, 50k limit)
1258
- - [x] Comprehensive test suite (180 tests across 15 files)
1259
- - [x] Security hardening (secret detection, injection prevention, fuzzing)
1260
- - [x] Discord notifications with rich embeds
1261
- - [x] Documentation coverage & health scoring
1262
- - [x] Opt-in telemetry (Sentry)
1263
- - [x] npm registry publication (`@chappibunny/repolens`)
1264
- - [x] Automated npm releases via GitHub Actions
1265
- - [x] Workflow migration command (`repolens migrate`)
1266
- - [x] Interactive configuration wizard (`repolens init --interactive`)
1267
- - [x] Watch mode for local development (`repolens watch`)
1268
- - [x] Enhanced error messages with actionable guidance
1269
- - [x] Performance monitoring (scan/render/publish timing)
1270
- - [x] Improved documentation coverage scoring
1271
- - [x] GraphQL schema detection (queries, mutations, types, resolvers)
1272
- - [x] TypeScript type graph analysis (interfaces, classes, relationships)
1273
- - [x] Dependency graph with circular dependency detection
1274
- - [x] Architecture drift detection (baseline comparison)
1275
- - [x] Plugin system for custom renderers and publishers
1276
- - [x] Stability audit: CLI, config schema, and plugin interface frozen
1277
- - [x] [STABILITY.md](STABILITY.md): Public API contract with semver guarantees
1278
-
1279
- ### Future
1280
-
1281
- - [ ] Additional publishers (Obsidian)
1282
- - [ ] VS Code extension
262
+ v1.0+ features complete CLI, config schema, and plugin interface are frozen.
263
+
264
+ **Completed:**
265
+ - [x] VS Code extension ([available on Marketplace](https://marketplace.visualstudio.com/items?itemName=CHAPIBUNNY.repolens-architecture))
266
+
267
+ **Next:**
268
+ - [ ] Obsidian publisher
1283
269
  - [ ] GitHub App
1284
270
 
1285
- See [ROADMAP.md](./ROADMAP.md) for detailed planning.
271
+ See [ROADMAP.md](ROADMAP.md) for detailed planning.
1286
272
 
1287
273
  ---
1288
274