@chappibunny/repolens 1.15.4 → 1.16.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/CHANGELOG.md +64 -0
- package/README.md +18 -15
- package/app.yml +23 -0
- package/github-app-manifest.json +22 -0
- package/llms-full.txt +1 -0
- package/llms-install.md +2 -0
- package/llms.txt +1 -0
- package/package.json +8 -6
- package/src/ai/generate-sections.js +130 -52
- package/src/analyzers/context-builder.js +104 -57
- package/src/analyzers/dependency-graph.js +59 -1
- package/src/analyzers/domain-inference.js +35 -4
- package/src/analyzers/flow-inference.js +27 -23
- package/src/analyzers/security-patterns.js +29 -3
- package/src/cli-args.js +4 -0
- package/src/cli.js +11 -0
- package/src/core/scan.js +106 -18
- package/src/docs/generate-doc-set.js +21 -0
- package/src/docs/llms-text.js +2 -0
- package/src/github-app/auth.js +130 -0
- package/src/github-app/checkout.js +70 -0
- package/src/github-app/handler.js +170 -0
- package/src/github-app/manifest.js +36 -0
- package/src/github-app/run.js +67 -0
- package/src/github-app/server.js +120 -0
- package/src/github-app/signature.js +22 -0
- package/src/help.js +44 -0
- package/src/renderers/render.js +3 -3
- package/src/renderers/renderAnalysis.js +28 -9
- package/src/renderers/renderDiff.js +5 -3
- package/src/renderers/renderMap.js +7 -5
- package/src/utils/path-roles.js +58 -0
- package/src/utils/route-params.js +50 -0
- package/src/utils/yaml.js +11 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,70 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to RepoLens will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## 1.16.0
|
|
6
|
+
|
|
7
|
+
### GitHub App
|
|
8
|
+
|
|
9
|
+
- `repolens app` self-hosts a GitHub App webhook. It checks `X-Hub-Signature-256`, acknowledges `installation` and `installation_repositories`, and on `pull_request` `opened`, `synchronize`, `reopened`, and `ready_for_review` runs the existing architecture diff. It posts a Check Run named RepoLens (the same summary as the sticky comment) and updates that comment. A finished diff is a successful check. The check fails only when the analysis throws
|
|
10
|
+
- Manifest: `app.yml` and `github-app-manifest.json`, also `repolens app --manifest`. Permissions are checks write, pull requests write, contents read, and metadata read. The hook URL in the repo is a placeholder (`https://example.com/api/github/webhooks`). This release does not register an app and CI does not need new secrets
|
|
11
|
+
- The server answers 202 before the clone and scoring finish, because GitHub allows about 10 seconds for the HTTP response. Setup is in [docs/GITHUB_APP.md](docs/GITHUB_APP.md)
|
|
12
|
+
|
|
13
|
+
### Security
|
|
14
|
+
|
|
15
|
+
- Route parameters in `src/renderers/renderDiff.js` no longer use `/\[(.*?)\]/g`. That lazy pattern is polynomial on a long string of `[` with no `]` (CodeQL `js/polynomial-redos`, alert #6). The replacement is a linear scan, including the same pattern in `src/core/scan.js` and the route-group labels in `src/renderers/renderMap.js`. A regression test feeds 100,000 brackets and expects a fast result
|
|
16
|
+
|
|
17
|
+
### Output accuracy
|
|
18
|
+
|
|
19
|
+
Hands-on `repolens demo` on expressjs/express, pallets/flask, and spf13/cobra:
|
|
20
|
+
|
|
21
|
+
- Express 5 has no `main` field. A description that says library, SDK, parser, toolkit, or framework is a library. Express reads as a library, not an API service
|
|
22
|
+
- `app.get('query parser fn')` is a setting lookup, not a route. Comment lines are skipped. Routes in tests, examples, and docs are not the product API. The Express route map is skipped
|
|
23
|
+
- A flat package at the repository root is named after the directory (`cobra`, not `root`). The system map connects that package to `doc/` (one relationship). Files with no directory belong to that flat module
|
|
24
|
+
- External imports that appear only in tests or examples are development tooling even when there is no `package.json`. Flask no longer lists `site_app` and the other test fixtures as runtime packages. Cobra lists `pflag` and `mousetrap` as runtime, and `go-md2man` and `yaml` as doc tooling
|
|
25
|
+
- Flask hubs are `globals.py`, `helpers.py`, `typing.py`, and `signals.py`. The three cycles (`__init__` → `app` → `cli`, and the templating / sansio chains) are real import cycles
|
|
26
|
+
|
|
27
|
+
### Dependencies
|
|
28
|
+
|
|
29
|
+
- `js-yaml` 4.3.2 → 5.5.0. Call the named `load` export. The YAML 1.2 Core schema still treats `true`/`false` as booleans and `yes`/`no` as strings. The merge key (`<<`) is enabled. `maxAliases` caps alias expansion. An empty file still returns `undefined`
|
|
30
|
+
- `@sentry/node` 10.76.2 → 11.9.0 (`^11.8.0`). It is still optional. Its own engines exclude Node 18 (`>=20.19` or `>=22.12`). `npm ci` on Node 18 warns and continues, and a failed import still disables telemetry instead of crashing the CLI
|
|
31
|
+
- Vitest 4.1.12 → 5.0.5. Its declared engines are `^22.12 || ^24 || >=26`. The runner starts on Node 20 and does not start on Node 18 (`util.styleText`). CI still runs `npm test` on Node 20 and 22, and `scripts/node18-runtime.js` on Node 18. `engines` stays `>=18`
|
|
32
|
+
- `dotenv` 18.0.8 → 18.0.9 and `@modelcontextprotocol/sdk` 1.32.1 → 1.32.2
|
|
33
|
+
- GitHub Actions: `actions/checkout` pin is the v6.0.3 release commit `df4cb1c`, `actions/setup-node` v7.1.0 (`949feb2`), `softprops/action-gh-release` v3.0.3 (`efb3536`). `npm audit` reports no vulnerabilities
|
|
34
|
+
|
|
35
|
+
### Docs
|
|
36
|
+
|
|
37
|
+
- Roadmap item 1 (GitHub App) is shipped in 1.16.0. Java and C# language support is now What's Next item 1
|
|
38
|
+
- The note that a chat answer only covers what someone thought to ask, and that grounded AI Q&A sits on top of the full map, stays in the roadmap, README, known issues, and copilot instructions
|
|
39
|
+
|
|
40
|
+
## 1.15.5
|
|
41
|
+
|
|
42
|
+
Fixes twelve output problems found by running 1.15.4 on mattiasw/ExifReader (a plain-JavaScript library with a flat `src/` and a build-helper `bin/`), and the two leftovers from 1.15.4.
|
|
43
|
+
|
|
44
|
+
### Output accuracy
|
|
45
|
+
|
|
46
|
+
- A file directly under a module root belongs to that root. A flat `src/` is one module (`src`), not 65 one-file modules. Sub-directories are still their own modules. Go packages follow the same rule, so `middleware/` is one module and not `middleware/compress.go`
|
|
47
|
+
- Module fan-in and fan-out count distinct other modules, not file-to-file edges, so "Orchestrator (coordinates 212 modules)" becomes the real number
|
|
48
|
+
- A package with `main`, `module`, `exports`, or `types` is a **library**, not a command-line tool. A package with only a `bin` is a CLI. A package with both is a library unless its description does not say library, parser, SDK, toolkit, or framework and says CLI or command-line. Libraries get no "CLI tool architecture" pattern, no "Interface: CLI" row, and no "command-line interface" text. The route map note says library. Flows start at the package entry (`Library Flow`), not at `bin/` helpers or `webpack.config`
|
|
49
|
+
- Patterns are described by their name, not by the file names cited as evidence. "Acyclic dependency graph" no longer gets the CLI description. Every pattern has its own explanation and benefit line. The headline names the pattern, not its evidence
|
|
50
|
+
- `build-pages.js` is not a route module. Page, route, and view only count as directory names for files
|
|
51
|
+
- `.d.ts` files, type tests, and a `typescript` devDependency do not make a JavaScript library "TypeScript"
|
|
52
|
+
- `filter`, `parse`, and `constant` no longer pick the Search & Discovery, Analysis & Detection, and Configuration domains
|
|
53
|
+
- Hubs, coupling advice, and the dependency graph ignore tests, examples, docs, and build scripts, and are measured against source files. Hub threshold is 7% of source files (minimum 5)
|
|
54
|
+
- External packages are split into runtime and development and test tooling (`12 (1 runtime, 11 dev/test tooling)`), from the root `package.json`
|
|
55
|
+
- Security: `innerHTML = ''` and other fixed-string assignments are not reported. Findings in examples, docs, scripts, tools, benchmarks, and `build*.js` files are low severity and labeled "(build/example code)". Hardcoded credentials keep their severity
|
|
56
|
+
- Orphan files over 5% of code files are a warning and cost 5 health points (10 over 10%, 20 over 20%). Below 5% they read "within normal range". The old +5 bonus for a cycle-free graph is gone, so 100/100 no longer sits next to an orphan warning
|
|
57
|
+
- Route Map and GraphQL Schema are not written when no routes or GraphQL schema were found. Naming them in `documentation.sections` keeps them
|
|
58
|
+
- Tests, examples, and build helpers are no longer flows. Build configs such as `webpack.config` are not flow entry points
|
|
59
|
+
|
|
60
|
+
### 1.15.4 leftovers
|
|
61
|
+
|
|
62
|
+
- `lib/ogg` is typed and grouped by `ogg`, not by sitting under `lib/`. Folders with no keyword of their own join a **Core Source** domain and a "Source Modules" layer instead of "Shared Utilities" and "Shared Libraries". `lib/common` still reads as shared utilities
|
|
63
|
+
- Hub flows skip barrels (`lib/index`), leaf helpers such as error classes, tests, and examples, so there is no "lib Integration Flow"
|
|
64
|
+
|
|
65
|
+
### Docs
|
|
66
|
+
|
|
67
|
+
- README, AI.md, MIGRATION.md, KNOWN_ISSUES.md, ROADMAP.md, ARCHITECTURE.md, CONFIGURATION.md, and `.github/copilot-instructions.md` describe the new behavior
|
|
68
|
+
|
|
5
69
|
## 1.15.4
|
|
6
70
|
|
|
7
71
|
Fixes nine output problems found by running 1.15.3 on Borewit/music-metadata (a v12 TypeScript library).
|
package/README.md
CHANGED
|
@@ -100,7 +100,7 @@ Run `npx @chappibunny/repolens migrate` to automatically update your workflow fi
|
|
|
100
100
|
|
|
101
101
|
## 📋 What It Generates
|
|
102
102
|
|
|
103
|
-
**17 document types** for three audiences — no manual writing required:
|
|
103
|
+
**17 document types** for three audiences — no manual writing required. Route Map and GraphQL Schema are skipped when the repository has no routes or GraphQL schema:
|
|
104
104
|
|
|
105
105
|
| Audience | Documents |
|
|
106
106
|
|---|---|
|
|
@@ -119,6 +119,7 @@ Run `npx @chappibunny/repolens migrate` to automatically update your workflow fi
|
|
|
119
119
|
| 🤖 **Autonomous** | Runs on every push via GitHub Actions — docs stay evergreen |
|
|
120
120
|
| 👥 **Multi-Audience** | Technical docs + stakeholder-readable overviews from one scan |
|
|
121
121
|
| 📤 **Multi-Publisher** | Notion, Confluence, GitHub Wiki, Obsidian, Markdown — together or one at a time |
|
|
122
|
+
| 🗺️ **Shows what you didn't ask** | An LLM only answers the question it is given, and a newcomer doesn't know what to ask. RepoLens publishes the whole map (every module, cycle and hub) on every PR, the same way each time, with no tokens spent per question |
|
|
122
123
|
| 🧠 **AI-Assisted** | Optional AI with zero-hallucination policy (structured context only) |
|
|
123
124
|
| 🔍 **Smart Detection** | Frameworks, domains, data flows, dependencies, drift — all automatic |
|
|
124
125
|
| 🔌 **Extensible** | Plugin system for custom renderers, publishers, and hooks |
|
|
@@ -189,6 +190,7 @@ Step-by-step setup for publishers, AI features, Notion, Confluence, GitHub Wiki,
|
|
|
189
190
|
| `npx @chappibunny/repolens mcp` | Start the stdio MCP server (`repolens-mcp` is the same server) |
|
|
190
191
|
| `npx @chappibunny/repolens badge` | shields.io code-health JSON, SVG, or markdown. Exits 2 when nothing is scored |
|
|
191
192
|
| `npx @chappibunny/repolens comment --base <ref> --head <ref>` | Architecture diff (files, modules, dependencies, health delta, new hotspots) |
|
|
193
|
+
| `npx @chappibunny/repolens app` | Self-host the GitHub App webhook. `--manifest` prints the manifest |
|
|
192
194
|
|
|
193
195
|
> **Note:** If you installed globally with `npm install -g @chappibunny/repolens`, you can use the shorter `repolens <command>` form. Init's next-steps text uses that shorter form when the command on your PATH is the global install.
|
|
194
196
|
> **Warning:** Do not run bare `npx repolens` — there is an unrelated `repolens@0.0.1` placeholder package on npm. Always use the scoped name `@chappibunny/repolens`.
|
|
@@ -199,7 +201,7 @@ Step-by-step setup for publishers, AI features, Notion, Confluence, GitHub Wiki,
|
|
|
199
201
|
|---|---|
|
|
200
202
|
| `0` | Success, including a cancelled wizard or help with no other work |
|
|
201
203
|
| `1` | Runtime error, or an unknown command |
|
|
202
|
-
| `2` | Invalid flags, missing config, target directory not found, a failed `doctor` check (including 0 files matched), `demo` or `publish` scanned 0 files, `watch` has nothing to watch (missing `module_roots`, or `scan.include` matches no files), `badge` scored 0 source files, `comment` is missing a base or head ref, `publish --strict` is missing publisher credentials, or `feedback` has no terminal |
|
|
204
|
+
| `2` | Invalid flags, missing config, target directory not found, a failed `doctor` check (including 0 files matched), `demo` or `publish` scanned 0 files, `watch` has nothing to watch (missing `module_roots`, or `scan.include` matches no files), `badge` scored 0 source files, `comment` is missing a base or head ref, `publish --strict` is missing publisher credentials, `app` is missing its id, webhook secret, or private key, or `feedback` has no terminal |
|
|
203
205
|
|
|
204
206
|
`--target` must already exist. A missing path exits 2 with `Target directory not found: <path>` before any scan. `repolens <command> --help` prints that command's flags. The ASCII banner is omitted when stdout is not a terminal or `CI` is set.
|
|
205
207
|
|
|
@@ -241,9 +243,9 @@ If `npx` reports `Unknown command: mcp`, an `.npmrc` with `min-release-age` (or
|
|
|
241
243
|
|
|
242
244
|
## GitHub Action
|
|
243
245
|
|
|
244
|
-
`action.yml` is a composite action named **RepoLens Architecture Docs**. `publish`, `demo`, and `doctor` run the published npm package (`npx --yes @chappibunny/repolens@1.
|
|
246
|
+
`action.yml` is a composite action named **RepoLens Architecture Docs**. `publish`, `demo`, and `doctor` run the published npm package (`npx --yes @chappibunny/repolens@1.16.0`). `comment` and `badge` run from the action checkout. Inputs are `command` (`publish`, `demo`, `doctor`, `comment`, or `badge`), `config`, `node-version`, `pr-comment`, `version`, `badge-out`, `badge-url`, and `badge-link`.
|
|
245
247
|
|
|
246
|
-
Publishing docs (the npm package at tag `v1.
|
|
248
|
+
Publishing docs (the npm package at tag `v1.16.0`):
|
|
247
249
|
|
|
248
250
|
```yaml
|
|
249
251
|
name: Architecture docs
|
|
@@ -258,8 +260,8 @@ jobs:
|
|
|
258
260
|
docs:
|
|
259
261
|
runs-on: ubuntu-latest
|
|
260
262
|
steps:
|
|
261
|
-
- uses: actions/checkout@
|
|
262
|
-
- uses: CHAPIBUNNY/repolens@v1.
|
|
263
|
+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
264
|
+
- uses: CHAPIBUNNY/repolens@v1.16.0
|
|
263
265
|
with:
|
|
264
266
|
command: publish
|
|
265
267
|
config: .repolens.yml
|
|
@@ -267,7 +269,7 @@ jobs:
|
|
|
267
269
|
pr-comment: ${{ github.event_name == 'pull_request' && 'true' || 'false' }}
|
|
268
270
|
```
|
|
269
271
|
|
|
270
|
-
On `v1.15.2`, `pr-comment: true` runs the architecture diff from the action checkout and turns the published package's older short summary off. The diff lists modules, files, dependencies, the code-health delta, and new hotspots. It edits one sticky comment (`<!-- repolens:architecture-diff -->`) instead of adding a new comment each push. The footer is "Generated by RepoLens" and links to this repository and the [gallery](https://chapibunny.github.io/repolens/). Tag `v1.15.1` does not contain `command: comment`. Pin `v1.
|
|
272
|
+
On `v1.15.2`, `pr-comment: true` runs the architecture diff from the action checkout and turns the published package's older short summary off. The diff lists modules, files, dependencies, the code-health delta, and new hotspots. It edits one sticky comment (`<!-- repolens:architecture-diff -->`) instead of adding a new comment each push. The footer is "Generated by RepoLens" and links to this repository and the [gallery](https://chapibunny.github.io/repolens/). Tag `v1.15.1` does not contain `command: comment`. Pin `v1.16.0` or a commit SHA in production.
|
|
271
273
|
|
|
272
274
|
```yaml
|
|
273
275
|
name: RepoLens architecture comment
|
|
@@ -280,10 +282,10 @@ jobs:
|
|
|
280
282
|
architecture:
|
|
281
283
|
runs-on: ubuntu-latest
|
|
282
284
|
steps:
|
|
283
|
-
- uses: actions/checkout@
|
|
285
|
+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
284
286
|
with:
|
|
285
287
|
fetch-depth: 0
|
|
286
|
-
- uses: CHAPIBUNNY/repolens@v1.
|
|
288
|
+
- uses: CHAPIBUNNY/repolens@v1.16.0
|
|
287
289
|
with:
|
|
288
290
|
command: comment
|
|
289
291
|
```
|
|
@@ -292,7 +294,7 @@ jobs:
|
|
|
292
294
|
|
|
293
295
|
`pr-comment: true` on `publish`, `demo`, or `doctor` (when the action ref contains this change) runs the same comment after the package and turns the package's older comment off, so the pull request still gets one comment.
|
|
294
296
|
|
|
295
|
-
The action is listed on the GitHub Marketplace only after a release is published with **Publish this Action to the GitHub Marketplace** checked. Those steps are in [docs/RELEASE.md](docs/RELEASE.md). The tag `v1.
|
|
297
|
+
The action is listed on the GitHub Marketplace only after a release is published with **Publish this Action to the GitHub Marketplace** checked. Those steps are in [docs/RELEASE.md](docs/RELEASE.md). The tag `v1.16.0` has to exist before `uses: CHAPIBUNNY/repolens@v1.16.0` resolves, and `@chappibunny/repolens@1.16.0` has to be on npm before `publish` can install it. `command: comment` and `command: badge` do not install that package.
|
|
296
298
|
|
|
297
299
|
## Add the badge to your repo
|
|
298
300
|
|
|
@@ -327,8 +329,8 @@ jobs:
|
|
|
327
329
|
badge:
|
|
328
330
|
runs-on: ubuntu-latest
|
|
329
331
|
steps:
|
|
330
|
-
- uses: actions/checkout@
|
|
331
|
-
- uses: CHAPIBUNNY/repolens@v1.
|
|
332
|
+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
333
|
+
- uses: CHAPIBUNNY/repolens@v1.16.0
|
|
332
334
|
with:
|
|
333
335
|
command: badge
|
|
334
336
|
badge-url: https://USER.github.io/REPO/repolens-badge.json
|
|
@@ -357,7 +359,7 @@ Gallery repositories already publish this. Each one has a [score page](https://c
|
|
|
357
359
|
|
|
358
360
|
Published system maps are Unicode diagrams drawn from import edges. RepoLens does not emit Mermaid.
|
|
359
361
|
|
|
360
|
-
The publisher set is Notion, Confluence, GitHub Wiki, Obsidian, and Markdown (`src/publishers`, 7 files). 1.14.0 adds the MCP server, the Marketplace action, and the docs badge. 1.14.1 sets the registry name to `io.github.CHAPIBUNNY/repolens`. 1.14.2 adds the gallery link to the badge line, `glama.json`, and `CITATION.cff`. 1.14.3 adds Cline setup docs and `llms-install.md`. 1.15.0 detects repository languages in `init --quick`, refuses empty scans, and adds per-command help. 1.15.1 makes `watch` exit 2 when those globs match nothing, and scores code health for Python and Go as well as JavaScript and TypeScript. 1.15.2 reads Python and Go imports in the dependency graph, skips comment and type-only imports, adds `repolens badge` and `repolens comment`, and adds gallery explained pages plus `llms.txt`. 1.15.3 skips Python `TYPE_CHECKING` imports, omits Node.js built-ins from external packages, groups Go hubs by package, and ignores test files as architecture-pattern evidence. 1.15.4 names the project from `package.json`, scores maturity from version, history, tests, CI, and docs, reports circular dependencies as findings, drops self-imports and noise data flows, and stops classifying `index` and `core` files by name. Layout and counts are in [ARCHITECTURE.md](docs/ARCHITECTURE.md).
|
|
362
|
+
The publisher set is Notion, Confluence, GitHub Wiki, Obsidian, and Markdown (`src/publishers`, 7 files). 1.14.0 adds the MCP server, the Marketplace action, and the docs badge. 1.14.1 sets the registry name to `io.github.CHAPIBUNNY/repolens`. 1.14.2 adds the gallery link to the badge line, `glama.json`, and `CITATION.cff`. 1.14.3 adds Cline setup docs and `llms-install.md`. 1.15.0 detects repository languages in `init --quick`, refuses empty scans, and adds per-command help. 1.15.1 makes `watch` exit 2 when those globs match nothing, and scores code health for Python and Go as well as JavaScript and TypeScript. 1.15.2 reads Python and Go imports in the dependency graph, skips comment and type-only imports, adds `repolens badge` and `repolens comment`, and adds gallery explained pages plus `llms.txt`. 1.15.3 skips Python `TYPE_CHECKING` imports, omits Node.js built-ins from external packages, groups Go hubs by package, and ignores test files as architecture-pattern evidence. 1.15.4 names the project from `package.json`, scores maturity from version, history, tests, CI, and docs, reports circular dependencies as findings, drops self-imports and noise data flows, and stops classifying `index` and `core` files by name. 1.15.5 reads a flat `src/` as one module, tells a library from a CLI by its `package.json`, splits runtime from development packages, keeps tests, examples, and build scripts out of hubs and security severity, and skips empty Route Map and GraphQL pages. 1.16.0 adds `repolens app` (a self-hosted GitHub App webhook), names a flat package after its directory, treats a framework description as a library when `main` is absent, and keeps test and example routes out of the product API. Layout and counts are in [ARCHITECTURE.md](docs/ARCHITECTURE.md).
|
|
361
363
|
|
|
362
364
|
### System Overview (Technical Profile)
|
|
363
365
|
|
|
@@ -419,6 +421,7 @@ When you open a pull request, RepoLens posts:
|
|
|
419
421
|
| [Migration](docs/MIGRATION.md) | Upgrading from v0.3.0 or earlier |
|
|
420
422
|
| [Stability](docs/STABILITY.md) | API contract and semver guarantees |
|
|
421
423
|
| [MCP server](docs/MCP.md) | stdio server for Cursor, Claude, and VS Code |
|
|
424
|
+
| [GitHub App](docs/GITHUB_APP.md) | Self-host the webhook: manifest, env vars, check run |
|
|
422
425
|
|
|
423
426
|
---
|
|
424
427
|
|
|
@@ -445,11 +448,11 @@ v1.0+ features complete — CLI, config schema, and plugin interface are frozen.
|
|
|
445
448
|
- [x] MCP server (`repolens mcp`) for Cursor, Claude, and VS Code
|
|
446
449
|
- [x] GitHub Action `RepoLens Architecture Docs` (`action.yml`)
|
|
447
450
|
- [x] Docs by RepoLens badge on generated Markdown
|
|
451
|
+
- [x] GitHub App webhook (`repolens app`) for a check run and the architecture comment
|
|
448
452
|
|
|
449
453
|
**Next:**
|
|
450
|
-
- [ ] GitHub App for automated setup and status checks
|
|
451
454
|
- [ ] Java and C# language support
|
|
452
|
-
- [ ] Grounded AI explanations and Q&A (`repolens ask`, PR comment, MCP, VS Code hover)
|
|
455
|
+
- [ ] Grounded AI explanations and Q&A (`repolens ask`, PR comment, MCP, VS Code hover), layered on the always-published map and not a replacement for it
|
|
453
456
|
- [ ] Slack notifications
|
|
454
457
|
- [ ] Custom webhook support
|
|
455
458
|
- [ ] Cross-repository architecture analysis
|
package/app.yml
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# GitHub App manifest for RepoLens.
|
|
2
|
+
# Register from github-app-manifest.json (same fields) after you replace
|
|
3
|
+
# hook_attributes.url with the public URL of `repolens app`.
|
|
4
|
+
# Permissions stay minimal: checks write, pull requests write, contents read,
|
|
5
|
+
# metadata read. This file does not create the app.
|
|
6
|
+
|
|
7
|
+
name: RepoLens
|
|
8
|
+
description: Posts an architecture diff as a check run and one sticky pull request comment.
|
|
9
|
+
url: https://github.com/CHAPIBUNNY/repolens
|
|
10
|
+
hook_attributes:
|
|
11
|
+
url: https://example.com/api/github/webhooks
|
|
12
|
+
active: true
|
|
13
|
+
redirect_url: https://github.com/CHAPIBUNNY/repolens
|
|
14
|
+
public: false
|
|
15
|
+
default_permissions:
|
|
16
|
+
checks: write
|
|
17
|
+
pull_requests: write
|
|
18
|
+
contents: read
|
|
19
|
+
metadata: read
|
|
20
|
+
default_events:
|
|
21
|
+
- installation
|
|
22
|
+
- installation_repositories
|
|
23
|
+
- pull_request
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "RepoLens",
|
|
3
|
+
"description": "Posts an architecture diff as a check run and one sticky pull request comment.",
|
|
4
|
+
"url": "https://github.com/CHAPIBUNNY/repolens",
|
|
5
|
+
"hook_attributes": {
|
|
6
|
+
"url": "https://example.com/api/github/webhooks",
|
|
7
|
+
"active": true
|
|
8
|
+
},
|
|
9
|
+
"redirect_url": "https://github.com/CHAPIBUNNY/repolens",
|
|
10
|
+
"public": false,
|
|
11
|
+
"default_permissions": {
|
|
12
|
+
"checks": "write",
|
|
13
|
+
"pull_requests": "write",
|
|
14
|
+
"contents": "read",
|
|
15
|
+
"metadata": "read"
|
|
16
|
+
},
|
|
17
|
+
"default_events": [
|
|
18
|
+
"installation",
|
|
19
|
+
"installation_repositories",
|
|
20
|
+
"pull_request"
|
|
21
|
+
]
|
|
22
|
+
}
|
package/llms-full.txt
CHANGED
|
@@ -24,6 +24,7 @@ Agent-oriented install steps, including the Cline MCP snippet, are in llms-insta
|
|
|
24
24
|
- `repolens watch` regenerates docs on change and exits 2 when nothing matches.
|
|
25
25
|
- `repolens badge` prints a shields.io endpoint JSON document for the code-health score (0–100). `--format svg` prints a square SVG. `--format markdown --url https://host/repolens-badge.json` prints a README snippet. `--format all --out repolens-badge.json` writes JSON and SVG. Exit 2 when no JavaScript, TypeScript, Python, or Go files were scored. The score is not reported as 100 when zero files match.
|
|
26
26
|
- `repolens comment --base <ref> --head <ref>` compares those commits. It prints markdown locally. In GitHub Actions, with `GITHUB_TOKEN`, `GITHUB_REPOSITORY`, and a pull_request event, it creates or updates one comment.
|
|
27
|
+
- `repolens app` self-hosts a GitHub App webhook. It verifies `X-Hub-Signature-256`, posts a Check Run named RepoLens, and updates the sticky architecture comment. `repolens app --manifest` prints the manifest and needs no secrets. Listening needs `REPOLENS_APP_ID`, `REPOLENS_WEBHOOK_SECRET`, and a private key. See docs/GITHUB_APP.md.
|
|
27
28
|
- `repolens mcp` starts the stdio MCP server. `repolens-mcp` is the same entry.
|
|
28
29
|
|
|
29
30
|
Exit codes: 0 success, 1 runtime error or unknown command, 2 validation failure (bad flags, missing config, empty scan, and the other cases in the README).
|
package/llms-install.md
CHANGED
|
@@ -20,3 +20,5 @@
|
|
|
20
20
|
11. CLI (1.15.2): the dependency graph includes Python and Go imports. Comments, strings, and TypeScript type-only imports are not edges. Go `*_test.go` files are not separate modules. Pattern text cites the matching path or import. "Custom React hooks" requires a `react` import.
|
|
21
21
|
12. CLI (1.15.3): Python imports under `if TYPE_CHECKING:` (including `typing.TYPE_CHECKING` and `import typing as t`) are not cycle edges. Node.js built-ins are not external packages. Go hub rows are packages. Test files are not architecture-pattern evidence, and "API route pattern" requires a route directory.
|
|
22
22
|
13. CLI (1.15.4): the project name comes from `package.json` or the real directory (never `.`). Maturity uses version, history, tests, CI, and docs. Circular dependencies are findings, not architectural patterns. A package's own name is not an external dependency. `index` and `main` files are not classified by name. Noise data flows are dropped.
|
|
23
|
+
14. CLI (1.15.5): a flat `src/` is one module. A package with `main`, `module`, or `exports` is a library, not a CLI. Hubs and security severity ignore tests, examples, and build scripts. External packages are split into runtime and development tooling. Route Map and GraphQL Schema are skipped when empty.
|
|
24
|
+
15. CLI (1.16.0): `repolens app` self-hosts a GitHub App webhook (manifest in `app.yml`, check run plus the sticky architecture comment). A framework description is a library even without `main`. A flat package is named after its directory. Test and example routes are not the product API. Test-only imports are dev tooling on Python and Go.
|
package/llms.txt
CHANGED
|
@@ -17,6 +17,7 @@ RepoLens is the npm package `@chappibunny/repolens` (Node.js 18+). It is a CLI,
|
|
|
17
17
|
- [publish](https://github.com/CHAPIBUNNY/repolens/blob/main/docs/INSTALLATION.md): `npx @chappibunny/repolens publish` scans and publishes
|
|
18
18
|
- [badge](https://github.com/CHAPIBUNNY/repolens/blob/main/README.md): `npx @chappibunny/repolens badge` prints shields.io code-health JSON, SVG, or markdown
|
|
19
19
|
- [comment](https://github.com/CHAPIBUNNY/repolens/blob/main/README.md): `npx @chappibunny/repolens comment --base <ref> --head <ref>` prints an architecture diff
|
|
20
|
+
- [app](https://github.com/CHAPIBUNNY/repolens/blob/main/docs/GITHUB_APP.md): `npx @chappibunny/repolens app` self-hosts the GitHub App webhook. `--manifest` prints the manifest. No credentials are required to print it
|
|
20
21
|
- [doctor](https://github.com/CHAPIBUNNY/repolens/blob/main/docs/INSTALLATION.md): `npx @chappibunny/repolens doctor` validates setup
|
|
21
22
|
- [mcp](https://github.com/CHAPIBUNNY/repolens/blob/main/docs/MCP.md): `npx -y @chappibunny/repolens mcp` starts the stdio server
|
|
22
23
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chappibunny/repolens",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.0",
|
|
4
4
|
"mcpName": "io.github.CHAPIBUNNY/repolens",
|
|
5
5
|
"description": "AI-assisted documentation intelligence system for technical and non-technical audiences",
|
|
6
6
|
"license": "MIT",
|
|
@@ -18,7 +18,9 @@
|
|
|
18
18
|
"repolens-mcp": "bin/repolens-mcp.js"
|
|
19
19
|
},
|
|
20
20
|
"files": [
|
|
21
|
+
"app.yml",
|
|
21
22
|
"bin",
|
|
23
|
+
"github-app-manifest.json",
|
|
22
24
|
"src",
|
|
23
25
|
"package.json",
|
|
24
26
|
"README.md",
|
|
@@ -86,18 +88,18 @@
|
|
|
86
88
|
"release:major": "npm version major"
|
|
87
89
|
},
|
|
88
90
|
"dependencies": {
|
|
89
|
-
"@modelcontextprotocol/sdk": "^1.32.
|
|
90
|
-
"dotenv": "^18.0.
|
|
91
|
+
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
92
|
+
"dotenv": "^18.0.9",
|
|
91
93
|
"fast-glob": "^3.3.3",
|
|
92
|
-
"js-yaml": "^
|
|
94
|
+
"js-yaml": "^5.5.0",
|
|
93
95
|
"zod": "4.6.7"
|
|
94
96
|
},
|
|
95
97
|
"optionalDependencies": {
|
|
96
|
-
"@sentry/node": "^
|
|
98
|
+
"@sentry/node": "^11.8.0"
|
|
97
99
|
},
|
|
98
100
|
"devDependencies": {
|
|
99
101
|
"tinyexec": "^1.3.1",
|
|
100
|
-
"vitest": "^
|
|
102
|
+
"vitest": "^5.0.5"
|
|
101
103
|
},
|
|
102
104
|
"overrides": {
|
|
103
105
|
"yauzl": ">=3.2.1",
|