-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path.coderabbit.yaml
More file actions
319 lines (282 loc) · 15.2 KB
/
Copy path.coderabbit.yaml
File metadata and controls
319 lines (282 loc) · 15.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
reviews:
profile: chill
high_level_summary: true
auto_review:
base_branches:
- "main"
- "release/.*"
pre_merge_checks:
docstrings:
threshold: 65
path_instructions:
# ─────────────────────────────────────────────────────────
# ROOT-LEVEL CONTRIBUTOR DOCS
# ─────────────────────────────────────────────────────────
- path: "CLAUDE.md"
instructions: >
Project-wide guidance for Claude Code (this repo's CLAUDE.md is loaded
into every session). When public APIs change, conventions evolve, or
new lint/test patterns are introduced, ensure this file is updated so
the rules stay in sync with the codebase. Conversely, flag any rule
in CLAUDE.md that contradicts the diff (e.g. an import boundary
described here that the PR violates) and ask the author to either
update the rule or revert.
- path: "AGENTS.md"
instructions: >
High-level orientation for AI agents working in this repo. Treat
edits the same way as CLAUDE.md — keep it accurate as the project
evolves; don't let drift accumulate.
- path: "README.md"
instructions: >
Top-level project README. Should reflect the latest install / usage
commands and the canonical package names (@frontmcp/sdk,
@frontmcp/cli published as `frontmcp`, etc.). If commands or
package names change in the diff, ensure README is updated to match.
- path: "ROADMAP.md"
instructions: >
Forward-looking roadmap. Don't gate PRs on roadmap edits, but flag
substantive feature work that lands without a corresponding roadmap
update.
- path: "BREAKING_CHANGES.v1.md"
instructions: >
Manually curated breaking changes for the v1.x line. Any PR that
introduces a breaking change MUST update this file (or its JSON
sibling `breaking-changes.v1.json`); ask for the entry if missing.
# ─────────────────────────────────────────────────────────
# MINTLIFY DOCS — FLAT, HUMAN-EDITED
# ─────────────────────────────────────────────────────────
# Layout reality (no live/draft split, no v/<minor>/ archives):
# docs/
# ├── docs.json Mintlify navigation
# ├── assets/ images / static
# └── frontmcp/ section content (mdx)
# ├── adapters/
# ├── authentication/
# ├── deployment/
# ├── extensibility/
# ├── features/
# ├── fundamentals/
# ├── getting-started/
# ├── guides/
# ├── nx-plugin/
# ├── plugins/
# ├── react/
# ├── sdk-reference/
# ├── servers/
# ├── testing/
# └── updates.mdx
- path: "docs/frontmcp/**"
instructions: >
Mintlify documentation (MDX). Authors edit these files directly —
there is no `draft/` staging area. When reviewing:
- When public APIs in libs/** or plugins/** change, ensure the matching
docs page under docs/frontmcp/** is updated in the same PR (sdk-reference,
adapters, plugins, features, etc.). Flag missing doc updates.
- Look for stale `import { ... } from '@frontmcp/...'` snippets,
renamed exports, or removed options that no longer exist.
- Look for stale URI examples — skills are exposed under the
singular SEP-2640 `skill://` scheme (e.g. `skill://index.json`,
`skill://{+skillPath}/SKILL.md`). The legacy plural `skills://`
scheme has been removed; flag any reintroduced references.
- Code examples should match the public surface of the corresponding
library (no internal symbols, no removed APIs).
- Updates to `docs/frontmcp/updates.mdx` follow the format described
in `.github/UPDATES_FORMAT.md`.
- path: "docs/frontmcp/sdk-reference/**"
instructions: >
SDK reference pages (organised under `core/`, `decorators/`,
`registries/`, `contexts/`, `errors/`, `types/`, `utilities/`,
plus standalone pages like `guard.mdx` and `telemetry.mdx`).
These should reflect the actual public exports of `@frontmcp/sdk`
(see `libs/sdk/src/index.ts`). When new symbols are exported from
the SDK barrel, suggest a matching reference page in the right
subfolder; when symbols are removed, flag stale entries.
- path: "docs/docs.json"
instructions: >
Mintlify navigation. When new docs pages are added under
docs/frontmcp/**, the navigation MUST list them or they won't be
reachable. Conversely, removed pages MUST be removed from navigation
— orphaned entries cause build failures.
- path: "docs/assets/**"
instructions: >
Static assets used by the docs (images, diagrams). Flag oversized or
non-optimised images (>500KB) and any binary checked in by mistake.
- path: "docs/**"
instructions: >
Mintlify documentation root. See more specific rules above.
- There is NO docs/live/** or docs/draft/** split in this repo —
authors edit `docs/frontmcp/**` and `docs/docs.json` directly.
- There is NO docs/v/{minor}/** archive — versioning is handled by
the external docs deployment described in
`.github/DOCS_VERSION_STRATEGY.md`.
- The `frontmcp build` and `frontmcp` CLI is published as `frontmcp`
on npm even though the workspace package is named `@frontmcp/cli`.
Examples should reflect this (`npx frontmcp ...`, not
`npx @frontmcp/cli`).
# ─────────────────────────────────────────────────────────
# SDK & SUPPORTING LIBRARIES
# ─────────────────────────────────────────────────────────
- path: "libs/sdk/**"
instructions: >
Core SDK. Strict rules per CLAUDE.md:
- MUST import all MCP protocol types/schemas/`McpError` from
`@frontmcp/protocol`, never from `@modelcontextprotocol/sdk`
directly. Flag any direct upstream import.
- MUST use `@frontmcp/utils` for filesystem (`readFile`, `stat`,
`readJSON`, etc.) and crypto (`sha256`, `randomUUID`,
`generateCodeVerifier`, etc.) — never `node:crypto` or
`fs/promises` directly.
- Test files MUST end in `.spec.ts` (NOT `.test.ts`).
- 95%+ coverage target across statements/branches/functions/lines.
- Use specific MCP error classes with JSON-RPC codes; avoid
non-null assertions (`!`).
- When public exports in `libs/sdk/src/index.ts` change, ensure
`docs/frontmcp/sdk-reference/**` has matching updates.
- path: "libs/protocol/**"
instructions: >
ONLY library allowed to import from `@modelcontextprotocol/sdk`.
This is the boundary that lets us swap or upgrade the upstream
package in one place. If a needed type isn't reachable, re-export
it here rather than reaching around the boundary in callers.
- path: "libs/auth/**"
instructions: >
Standalone auth library (sessions, credential vault, CIMD, OAuth).
All authentication-related code belongs here, NOT in libs/sdk/src/auth.
Flag PRs that introduce auth logic in libs/sdk/**.
- path: "libs/skills/**"
instructions: >
Curated SKILL.md catalog. The catalog manifest
(`catalog/skills-manifest.json`) is the single source of truth for
scaffolding/install tooling. New skills should add a directory under
`catalog/<category>/<name>/`, a SKILL.md, and a manifest entry.
- path: "libs/cli/**"
instructions: >
Command-line interface — published as `frontmcp` on npm even though
the workspace package is `@frontmcp/cli`. Docs and examples should
use `frontmcp` / `npx frontmcp`, not `@frontmcp/cli`.
- path: "libs/adapters/**"
instructions: >
Framework adapters (Express, Fastify, Lambda, Vercel, OpenAPI, etc.).
Module format must remain CommonJS for Lambda/Vercel adapters per
prior fix (#388) — flag any move back to ESM here.
- path: "libs/**"
instructions: >
Publishable SDK libraries.
- Review for API correctness, breaking changes, and consistency with
docs.
- When public APIs change, ensure there is a matching update under
`docs/frontmcp/**` (this repo edits docs directly — there is no
`docs/draft/**`).
- Internal `@frontmcp/*` dependency versions must stay normalised
to the exact release line (per #361/#363); flag drift.
- Resource URI scheme for skills is the singular `skill://`
(SEP-2640). The legacy `skills://` scheme has been removed and
MUST NOT be reintroduced.
# ─────────────────────────────────────────────────────────
# PLUGINS
# ─────────────────────────────────────────────────────────
- path: "plugins/**"
instructions: >
Publishable SDK plugins (each its own package).
- Review for API correctness, breaking changes, and consistency with
`docs/frontmcp/plugins/**`.
- Plugins extending `ExecutionContextBase` must follow the
module-augmentation + prototype-extension pattern (see
`plugin-remember/src/remember.context-extension.ts`).
- Use `Plugin({ ... })` decorator metadata, not legacy patterns.
# ─────────────────────────────────────────────────────────
# APPS / DEMOS / E2E
# ─────────────────────────────────────────────────────────
- path: "apps/demo/**"
instructions: >
Demo application — playground for SDK usage examples and the docs
site source for inline snippets. Keep examples idiomatic; they are
copied into docs and reviewed by users learning the SDK.
- path: "apps/e2e/**"
instructions: >
End-to-end test suites (one project per feature: skills, agents,
cache, distributed, channels, etc.). Each E2E project boots a real
FrontMCP server via `apps/e2e/<name>/src/main.ts` and exercises it
via the `@frontmcp/testing` MCP client harness.
- Tests live under `e2e/*.e2e.spec.ts` (NOT `.spec.ts`, NOT `.test.ts`).
- Don't suggest mocking the MCP transport here — these tests exist
precisely to catch regressions across the wire.
- When adding tests, mirror the URI shape used in production code
(e.g. `skill://{+skillPath}/SKILL.md`, not the removed `skills://`).
- path: "apps/**"
instructions: >
Demo applications and end-to-end test suites. Reference for SDK
usage; not published. Breaking changes to library APIs MUST be
reflected here so the demos and E2Es continue to compile.
# ─────────────────────────────────────────────────────────
# SCRIPTS / WORKFLOWS / CONFIG
# ─────────────────────────────────────────────────────────
- path: "scripts/**"
instructions: >
Build / release / coverage scripts. When adding a `.ts`/`.mjs`
script that imports `@frontmcp/*` workspace packages, the script
runner needs `TSX_TSCONFIG_PATH=tsconfig.base.json` (see
`libs/guard/project.json`'s `generate-types` target) — flag scripts
that import workspace paths without that env var.
- path: ".github/workflows/**"
instructions: >
CI/CD workflows. When adding workflows that run tests, prefer
`nx run-many -t test --exclude='demo-e2e-*'` for unit tests and
`nx run-many -t test --projects='demo-e2e-*'` for E2E. Don't skip
hooks (`--no-verify`) or signing flags unless absolutely necessary.
- path: ".github/ISSUE_TEMPLATE/**"
instructions: >
Issue templates. Keep terse and self-explanatory; avoid duplicate
templates.
- path: "**/project.json"
instructions: >
Nx project configuration. When adding a new build target, follow
the existing pattern: `build-cjs` + `build-esm` + `build` (the
composite target runs `strip-dist-from-pkg.js`). Flag custom
target structures unless the package genuinely needs them.
- path: "**/package.json"
instructions: >
Workspace package config.
- Internal `@frontmcp/*` dependencies must be pinned to the exact
release-line version (per #357/#361/#363). Flag `^` or `~` ranges
on `@frontmcp/*` deps.
- `engines.node` should match the root package.json (`>=24.0.0`).
- path: "**/eslint.config.mjs"
instructions: >
Per-project ESLint config. Keep aligned with the root
`eslint.config.mjs` and `eslint.imports.mjs`. New rules should be
added at the root, not duplicated per-project, unless a project
genuinely needs an exception.
- path: "**/jest.config.ts"
instructions: >
Per-project Jest config. Test files MUST match `.spec.ts` (or
`.spec.tsx` / `.e2e.spec.ts` / `.perf.spec.ts` / `.pw.spec.ts`).
Flag any `.test.ts` patterns.
path_filters:
# Standard build/cache outputs
- "!**/dist/**"
- "!**/build/**"
- "!**/coverage/**"
- "!**/.next/**"
- "!**/.nuxt/**"
- "!**/.svelte-kit/**"
- "!**/.turbo/**"
- "!**/.swc/**"
- "!**/.parcel-cache/**"
- "!**/.nx/**"
- "!**/node_modules/**"
- "!**/.yarn/**"
- "!**/.pnpm-store/**"
- "!**/*.min.{js,css}"
- "!**/*.map"
- "!**/public/**"
- "!**/*.svg"
- "!**/*lock*.{json,yaml,yml}"
# Generated files committed to git so IDE works without a build.
# `*.generated.ts` files (e.g. libs/guard/src/schemas/schemas.generated.ts)
# are produced by `scripts/generate-schema-types.mjs` from Zod schemas;
# human review of the generated output adds noise without value.
- "!**/*.generated.ts"
# Per-project local Nx cache
- "!**/tsconfig.tsbuildinfo"