This file defines rules and ownership for all contributors and AI agents working in the RusToK repository.
- Always start by reading
docs/index.md— the canonical documentation map. - Review domain module documentation before making changes.
- Use module owners (or the platform team) for approvals when cross-cutting concerns are involved.
- For architecture changes, capture decisions in
DECISIONS/using an ADR.
- Platform foundation:
crates/rustok-core,apps/server, shared infra. - Domain modules:
crates/rustok-*(content, commerce, pages, blog, forum, index, etc.). - Frontends:
apps/admin,apps/storefront,apps/next-admin,apps/next-frontend. - MCP server:
crates/rustok-mcp. - Operational tooling:
scripts/,docker-compose*.yml,grafana/,prometheus/.
Detailed module ownership and responsibilities are captured in docs/modules/registry.md.
- Central platform documentation (
docs/) is written in Russian (the team's primary language). - Public-facing contracts,
AGENTS.md,CONTRIBUTING.md, and crateREADME.mdfiles are in English. - Mixed language within a single document is not allowed — choose one language per file.
- Platform-wide documentation lives in
docs/. - Per-module/per-app documentation lives inside the component:
apps/<name>/docs/orcrates/<name>/docs/. - Every app and crate must have a root
README.mdwith: purpose, responsibilities, interactions, entry points, and a link todocs/. docs/modules/_index.mdlinks to all per-module documentation folders.
When changing architecture, API, events, modules, tenancy, routing, UI contracts, or observability:
- Update the relevant local docs in the changed component (
apps/*orcrates/*). - Update the related central docs in
docs/. - Update
docs/index.mdso the map remains accurate. - If a module or application was added or renamed, update
docs/modules/registry.md. - Mark outdated documents as
deprecatedorarchivedand point to the replacement.
Do not create a new document if a suitable one already exists — extend the existing one.
Rules mandatory for all automated agents operating in this repository:
- Always start by reading
docs/index.md. - Do not create a new document when an existing one is suitable — extend it instead.
- Documentation must reflect the actual state of the code.
- Never bypass or disable pre-commit/pre-push hooks. Fix the root cause of failures.
- Do not edit CI/CD workflow files unless explicitly requested.
- Do not modify other branches — only work on the assigned task branch.
- For Leptos apps and module-owned Leptos UI packages, use native
#[server]functions as the default internal data layer and keep GraphQL in parallel. Do not remove or replace GraphQL when adding server functions. - Do not invent package-local i18n contracts. Server locale selection is canonical; module-owned UI packages must consume the host-provided effective locale (
UiRouteContext.localefor Leptos, host/runtime locale providers for Next) instead of introducing their own query/header/cookie fallback chains.