yolont 0.5.0 β†’ 0.7.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/docs/GUIDE.md CHANGED
@@ -130,7 +130,7 @@ What Yolont is **not**:
130
130
  | Thing | Why | Check |
131
131
  |---|---|---|
132
132
  | Node **22.13+** | uses the built-in `node:sqlite` | `node -v` |
133
- | [gitleaks](https://github.com/gitleaks/gitleaks#installing) on `PATH` | scans every diff before any LLM sees it | `gitleaks version` |
133
+ | [gitleaks](https://github.com/gitleaks/gitleaks#installing) v8+ | scans every diff before any LLM sees it | `gitleaks version` (or let the wizard install it) |
134
134
  | git | local diffs, memory repos | `git --version` |
135
135
  | A token for your git host | reads MRs, posts comments | see [Tokens](#tokens) |
136
136
  | An LLM | does the reading | see [LLM providers](#15-llm-providers) |
@@ -138,6 +138,12 @@ What Yolont is **not**:
138
138
  No gitleaks means no LLM call. That's on purpose: *fail closed* (see
139
139
  [chapter 17](#17-security-model-the-paranoid-chapter)).
140
140
 
141
+ gitleaks is a Go program, so `npm install` can't bring it along. If it's missing, the wizard
142
+ offers to download one pinned official release from GitHub, checks its SHA-256 against the sum
143
+ built into Yolont, and keeps it in Yolont's data dir (`~/.local/share/yolont/bin/`). Yolont uses
144
+ that copy first; a gitleaks on `PATH` works too. `YOLONT_GITLEAKS=/path/to/gitleaks` picks
145
+ another one.
146
+
141
147
  ### Quick install: npx, once
142
148
 
143
149
  ```bash
@@ -355,6 +361,43 @@ Last 5 score(s): 71, 78, 80, 84, 86. Recurring weak category: **maintainability*
355
361
 
356
362
  🟒 at or above the threshold, 🟑 within 15 points of it, πŸ”΄ below that. Yolont edits its own comment on later runs instead of piling up new ones.
357
363
 
364
+ ### Before the PR: in your coding agent (MCP)
365
+
366
+ The review is the referee. `yolont mcp` is the coach: an MCP server that gives your coding
367
+ agent (Claude Code, Cursor, VS Code, Codex…) what this team expects *while* you write, so the
368
+ PR arrives with less to find. It makes no LLM call and needs no Yolont LLM key: your agent's own
369
+ model does the thinking. It doesn't score, store or post anything.
370
+
371
+ Easiest: `yolont` β†’ **Connect your coding agent**. It runs the agent's own setup command
372
+ (asking first) or shows what to paste. By hand:
373
+
374
+ ```bash
375
+ claude mcp add --scope user --transport stdio yolont -- yolont mcp # Claude Code
376
+ code --add-mcp '{"name":"yolont","type":"stdio","command":"yolont","args":["mcp"]}' # VS Code
377
+ ```
378
+
379
+ Cursor, Codex and others: add a stdio MCP server with command `yolont` and args `["mcp"]` in
380
+ the agent's MCP settings.
381
+
382
+ Which project it checks: the one your agent has open (Claude Code says so with
383
+ `CLAUDE_PROJECT_DIR`, other agents through MCP "roots"), else the directory it was started in.
384
+ A tool's `repo` argument overrides both. It gives your agent:
385
+
386
+ | | What it gives |
387
+ |---|---|
388
+ | `yolont_guidelines` | the team's conventions, the zones of the files you're about to touch (why they're risky, what to watch for), and lessons from past reviews of **your** PRs |
389
+ | `yolont_check_my_changes` | a checklist for your branch: committed, staged and unstaged changes against the base. A local gitleaks scan, size, the change type's checks (a bug fix wants a regression test), zones touched, conventions, your lessons |
390
+ | `/yolont-check` (a prompt) | "check my changes, fix what fails, check again" in one command |
391
+
392
+ Why no score? Nobody needs to audit their own score, and an agent can loop until it reports
393
+ 100. The real score still comes from the PR review.
394
+
395
+ What leaves your machine: Yolont sends nothing. Your agent sends the checklist (conventions,
396
+ zones, your lessons) to *its* LLM, like any other context it reads. Only your own lessons are
397
+ included, never a colleague's. "You" means the username behind your saved token for the repo's
398
+ host. If that can't be checked (VPN off, keychain unavailable to the agent), the lessons are left
399
+ out and the checklist says why.
400
+
358
401
  ---
359
402
 
360
403
  ## 5. How the score is made
@@ -465,6 +508,11 @@ zones:
465
508
  `nextjs`, `node-api`, plus `generic`, which applies to every stack). It keeps only globs that
466
509
  match real files and shows each zone with its file count. Then you save, edit (validated
467
510
  before saving), or skip. **Nothing is sent anywhere**: no LLM is involved.
511
+ - **Generate with the LLM** (optional, when an LLM is set up): sends the folder tree (folder
512
+ names only, no file contents) and the project's conventions, scanned by gitleaks first, plus a
513
+ format example (`templates/zones-example.yaml`). The LLM covers topics like bootstrap,
514
+ providers, shell, tracking/config, routing, store, shared helpers, primitives, lazy pages and
515
+ tests. Globs that match no real file are dropped before you save, edit or generate again.
468
516
  - **See them:** `yolont zones web/shop` prints the zone map as Mermaid.
469
517
  - **Import graph:** `yolont zones graph web/shop --repo .` writes `zones.graph.json`. A file
470
518
  that *imports into* a red zone gets flagged too. Commit it as `.yolont/zones.graph.json` for
@@ -897,6 +945,7 @@ yolont sync-replies <MR/PR URL>
897
945
  yolont distill [--author <user>] [--project <id>] [--host h]
898
946
  yolont backfill <project-id | group/project> [--host h] [--max-mrs 1000] [--with-llm] [--zones]
899
947
  yolont panel [--port 4173] (alias: dashboard)
948
+ yolont mcp MCP server for coding agents (guidelines + pre-PR checklist)
900
949
 
901
950
  yolont conventions generate|edit [<address>] [--repo <checkout>]
902
951
  yolont zones generate|edit [<address>] [--repo <checkout>]
@@ -931,6 +980,7 @@ alias (`git@work:team/memory.git`), but it can't change a real https host.
931
980
  | `YOLONT_DATA_DIR` | CLI | data dir (default `~/.local/share/yolont`) |
932
981
  | `YOLONT_NO_KEYCHAIN` | CLI | `1` = use the credentials file, never the OS keychain |
933
982
  | `YOLONT_NO_UPDATE_CHECK` | CLI | `1` = don't ask npm for a newer version |
983
+ | `YOLONT_GITLEAKS` | CLI, CI | path to the gitleaks binary (default: Yolont's downloaded copy, then `PATH`) |
934
984
  | `YOLONT_PASSPHRASE` | CLI | encrypts `credentials.json` |
935
985
  | `YOLONT_CHANGE_TYPE` | CI | `label` (default), `steer` or `off` |
936
986
  | `YOLONT_IMAGE` | GitLab CI | image to run (pin a tag) |
@@ -965,8 +1015,8 @@ It isn't installed globally. Use `npx yolont`, or `npm install -g yolont`. See [
965
1015
  (npx reuses its cache otherwise).
966
1016
 
967
1017
  **"secret scan could not run"**
968
- gitleaks isn't on `PATH`. Install it. Yolont won't send a diff it couldn't scan, and that's by
969
- design.
1018
+ gitleaks isn't installed (or is older than v8). Run `yolont`: the wizard offers to download it.
1019
+ Or install it yourself. Yolont won't send a diff it couldn't scan, and that's by design.
970
1020
 
971
1021
  **The menu shows `β–‘` instead of icons.**
972
1022
  Your font has no Nerd Font glyphs. Set `icons: plain` in `config.yaml`, or install a Nerd Font.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yolont",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "description": "Yolont: LLM pull request reviewer for GitHub and GitLab. Guided setup, team conventions, sensitive zones, a 0-100 score and a local panel.",
5
5
  "license": "FSL-1.1-ALv2",
6
6
  "repository": {
@@ -30,6 +30,7 @@
30
30
  "@clack/prompts": "^1.8.0",
31
31
  "@fastify/static": "^10.1.3",
32
32
  "@gitbeaker/rest": "^43.8.0",
33
+ "@modelcontextprotocol/sdk": "^1.32.2",
33
34
  "@napi-rs/keyring": "^2.1.2",
34
35
  "fastify": "^5.12.3",
35
36
  "js-yaml": "^4.1.0",
@@ -0,0 +1,62 @@
1
+ # Format example for LLM-generated zones (a React SPA with SSR, Redux and separate device bundles).
2
+ # Not a template: the wizard shows it to the LLM as the shape and depth to aim for.
3
+ zones:
4
+ - id: app-bootstrap
5
+ level: red
6
+ paths: ["app/index.ts*", "app/client.ts*", "app/App.tsx", "app/*.ssr.ts*", "server/**"]
7
+ why: "Entry, hydration and SSR: runs before first paint on every page load"
8
+ watch_for: ["new top-level import", "await before render/hydrate", "new global side effect at module scope"]
9
+ budget: "initial JS +0 KB; no new blocking work before hydrate"
10
+
11
+ - id: root-providers
12
+ level: red
13
+ paths: ["app/**/*Provider.tsx", "app/**/providers/**", "app/core/configureStore.ts"]
14
+ why: "Wraps every route: a change re-renders or delays the whole tree"
15
+ watch_for: ["new context value not memoized", "fetch/await at mount", "heavy import", "new store middleware"]
16
+
17
+ - id: app-shell
18
+ level: red
19
+ paths: ["app/**/Layout/**", "app/**/Header/**", "app/**/Navbar/**"]
20
+ why: "Shell and first viewport: on screen for every route, drives LCP/CLS"
21
+ watch_for: ["layout shift (missing size/skeleton)", "new image without dimensions", "data fetch blocking shell render"]
22
+
23
+ - id: tracking-and-config
24
+ level: red
25
+ paths: ["app/helpers/config/**", "app/**/tracker*/**", "app/**/serviceWorker*"]
26
+ why: "Device config, trackers, feature flags and service worker load with the shell"
27
+ watch_for: ["sync third-party script", "new tracker on load instead of idle", "config read that blocks render"]
28
+
29
+ - id: routing
30
+ level: amber
31
+ paths: ["app/**/router/**", "app/**/Loadable.ts"]
32
+ why: "Route table decides what is lazy: an eager import here moves a page into the initial chunk"
33
+ watch_for: ["route imported directly instead of via Loadable", "new eager route"]
34
+
35
+ - id: store
36
+ level: amber
37
+ paths: ["app/core/**"]
38
+ why: "Slices, selectors and thunks: selector churn re-renders every subscriber"
39
+ watch_for: ["selector returning new object/array", "thunk fired on every mount"]
40
+
41
+ - id: shared-hooks-utils
42
+ level: amber
43
+ paths: ["app/helpers/**"]
44
+ why: "Shared by many routes: a cost here is paid everywhere it is used"
45
+ watch_for: ["effect without cleanup", "missing deps causing loops", "heavy work in render path"]
46
+
47
+ - id: ui-primitives
48
+ level: amber
49
+ paths: ["app/components/ui/**"]
50
+ why: "Atoms render many times per page and inside lists"
51
+ watch_for: ["inline object/function props breaking memo", "list item doing per-item fetch or selector"]
52
+
53
+ - id: lazy-pages
54
+ level: green
55
+ paths: ["app/pages/**"]
56
+ why: "Lazy route chunks: cost only paid when the route is visited"
57
+ watch_for: ["import that leaks back into the shared/initial chunk"]
58
+
59
+ - id: tests-docs-tooling
60
+ level: green
61
+ paths: ["**/*.test.ts*", "**/__tests__/**", "**/*.md", "**/*.stories.tsx"]
62
+ why: "Does not ship to users"