Monorepo: the main Meteor app lives in apps/meteor/, shared libraries in packages/, other services in apps/ and ee/.
Comments state the intent of a function, never the mechanism, and never explain
code that lives in another file — that belongs in docs/features/. Full rules:
docs/code-comments.md.
Every database operation goes through a named model method in packages/models; code
outside a model never passes a filter or update document to find, findOne, updateOne
and the like. Models hold no business logic: they don't call other models or validate their
arguments. Full rules: docs/database-access.md.
Work starts from a clear definition in the draft pull request body (what, why, out of scope), plus the decisions a person made and the open gaps; an agent's own choices are gaps until a person confirms them. While in draft, fixes and enabling refactors are their own commits, ordered below the feature. Before leaving draft, plan which of them become their own pull requests, and merge those first; small enabling ones stay as commits. Agent loops are fine during a POC or once the definition settles the expected behavior, but opening a pull request and taking it out of draft are a person's decisions: never do either without confirmation. Full rules: docs/change-organization.md.
Changes never introduce lint warnings. When a warning can't be avoided, disable the rule on
that line with // oxlint-disable-next-line <rule> -- <reason>, where the reason says why the
code can't comply.
Read the doc that matches the task instead of scanning docs/ wholesale.
- docs/code-comments.md — what a comment may say, and where reasoning goes when it is not a comment
- docs/change-organization.md — clear definition and human decisions in the draft body, fixes → refactors → feature commits, planning which become their own pull requests before leaving draft, rebasing after squash merges
- docs/i18n.md — translation keys: where they live, naming, namespaces, interpolation, plurals, server-side
lng, what the i18n linter enforces
- docs/frontend/ — frontend guidelines, split by topic:
- typescript-conventions.md — ES modules,
import type,typevsinterface,anyvsunknown - migrating-from-javascript.md — gradual JS → TS migration
- react.md — component structure, naming, exports, explicit and generic props types
- layout.md — screens compose named layout containers, never raw
Boxor styling props on Fuselage components; where a new container lives and when it gets promoted - building-components.md — application vs Fuselage components, the props a component accepts, layout containers, adding a variation, Storybook-first
- fuselage-tamagui-components.md — migrating a Fuselage component to Tamagui: workflow and decision gate, rules, Definition of Done G0–G8, policies (z-index tokens, allowed CSS, hacks, text frames), semver, deviations and precedents
- list-keyboard-navigation.md — the three keyboard models for lists (combobox, menu, composite list), the implementation of each, and how to test them
- dom-hooks.md — hooks that attach listeners or observers return a callback ref instead of taking a
RefObject - view-isolation.md — keeping screens free of Meteor and direct browser APIs: view-model hook vs view,
ui-contextsonly, browser APIs behind hooks, web-only widgets behind app components,.native.tsxtwins, the CI ratchet - i18n.md — client side only:
useTranslation,Trans, runtime keys, escaping (shared rules in docs/i18n.md) - adding-icons.md — adding an icon to
@rocket.chat/icons: SVG cleanup, shape-based naming, directional icons, glyph mapping, changeset
- typescript-conventions.md — ES modules,
- docs/form-validation.md — standardized form validation patterns
- docs/anchor-navigation.md — deep-linking to a field via URL hash fragments
- docs/bundle-optimization-react-aria.md — barrel-import patches; Meteor's bundler does not tree-shake
- docs/backend-folder-structure.md — how
apps/meteor/server code is organized and where new code goes - docs/features/http-server.md — the server's own HTTP server: base middlewares, routes on the root app, the Meteor fallback, where to add a route
- docs/features/ddp-sessions.md — DDP over the WebSocket with
@rocket.chat/ddp-server: endpoints, what runs through Meteor, login, who follows a session - docs/database-access.md — every query and write is a named model method; what callers may still pass, how to add a method, why models never call other models or validate input
- docs/api-endpoint-migration.md — migrating
API.v1.addRoute()to the validatedAPI.v1.get()/.post()/… pattern - docs/ajv-instances.md — when to use
ajvvsajvQueryin@rocket.chat/rest-typings - docs/apps-engine-migration.md — phased extraction of apps execution into a microservice
- docs/service-brokers.md — how services reach each other: the local and Moleculer brokers, how events and stream relays reach other instances in each deployment, and the calls that only work because both ends share a process
- docs/getting-started.md — run from source: prerequisites (
scripts/check-deps.sh), install, run modes, tests - docs/local-dev/troubleshooting.md — common local build/run failures and their fixes
- docs/meteor-modern-stack.md — Meteor modern build stack, file-watching caveats
- docs/coverage.md — coverage instrumentation in build and CI
- docs/npm-publishing.md — how the public packages reach npm:
release.yml, changesets, OIDC trusted publishing, provenance - docs/typescript-7-migration.md — TS7 (native compiler) migration: remaining work — packages pinned to TS5.9, deferred UI packages, constraints, follow-ups
- Unit tests — where a spec goes, which runner, model mocks with
mockModelin adescribehook - Playwright E2E testing guide — setup, locators, page objects, cleanup, performance patterns, and testing conventions
- docs/adr/ — architecture decision records
- ee/packages/xmpp-server/docs/ — the XMPP server is developed spec-first; its specs, ADRs, plans and compliance matrix live in the package, not here;
/xmpp-intent,/xmpp-specand/xmpp-plandrive its authoring stages from any directory - docs/features/ — per-feature notes
- uikit/ — UiKit blocks, surfaces, rendering, interactions; field reference and per-surface support matrix
- client-boot.md — the path to the first screen, and why components on it must not suspend
- web-client-hosting.md — how the server serves the Vite-built client (manifest, entry injection, CDN, cache) and how to serve the client from another host
- fuselage-tokens.md — how the design tokens are layered (base colors, specialized colors per theme, scales), a token's path against its
distshape, who reads each output, the names Fuselage writes, Fuselage's Tamagui config, adding a token and its dark and high-contrast values
- docs/proposals/ — design proposals, not yet implemented
- serve-client-without-meteor-webapp.md — serving the client without Meteor's
web.browserprogram - finish-moving-http-and-ddp-off-meteor.md — what still reaches Meteor's HTTP and DDP servers, and the order to move it
- view-isolation-migration.md — what still ties the views to Meteor and the browser, and the phases to apply the view isolation rules
- serve-client-without-meteor-webapp.md — serving the client without Meteor's