Same agent Smaller bill. The tools and infrastructure to get more work from your AI. Fewer tokens. Less compute. Lower cost.
TypeScript agent-harnessagent-harness-engineeringai-engineeringai-observabilityamd-gpuclaude-codeclickhousecodexcoding-agentcoding-agentscursorgenaigpu-monitoringllm-observabilityllmopsnvidia-smiobservabilityopen-sourceopenaiopentelemetry
OpenLIT Agent Rules
CE/OSS Boundary
- This repository is the open-source CE/OSS codebase.
- Do not add enterprise implementation here.
- CE may contain shared contracts, neutral extension hook types, empty feature lists, disabled feature placeholders, upgrade-required responses, and OSS-safe no-op extension fallbacks.
- CE must not contain enterprise permission names, RBAC policy maps, entitlement feature maps, paid-plan branching, enterprise imports, or private implementation details.
- Enterprise implementation belongs in
openlit-enterprise/src/client/src/ee/. - RBAC, audit log, billing, licensing, seats, entitlements, enterprise stores/selectors, enterprise route handlers, and enterprise UI must stay out of CE and live under
openlit-enterprise/src/client/src/ee/**. - Common/shared behavior must be implemented here in CE first, then synced into
openlit-enterprise; enterpriseapp/**route/page files should be thin wrappers only when they need Next.js filesystem routing.
Extension Points
- Shared code may import a stable extension hook only when CE provides a no-op fallback.
- Shared imports must use neutral paths such as
@/lib/access/route-access,@/components/rbac/feature-access, or@/store/enterprise. Enterprise implementations are selected by the enterprise repo's path aliases or thin wrappers. - Never import
@/ee/**from CE or from shared/common files.@/ee/**imports are allowed only insidesrc/client/src/ee/**and EE-only tests. - CE fallback APIs should expose feature-agnostic keys such as
dashboard.read, not permission literals such asdashboard:read. - Do not import private enterprise modules from CE.
- Keep CE messages in
src/client/src/constants/messages/en.ts; enterprise-only messages belong insrc/client/src/ee/constants/messages/en.tsin the private repo.
Project Hierarchy
- The hierarchy is
Organisation -> Project -> Database configuration. - Database config reads, writes, selection, and ping state must be scoped by current project.
- Billing, licensing, seats, and entitlements are organisation-scoped in enterprise.
UI and Security
- Do not hard-code user-facing strings. Add CE strings to
src/client/src/constants/messages/en.ts; enterprise-only strings belong in the private repository. - Keep organisation and project switchers in the header, with breadcrumbs below it. Cover loading, empty, disabled, and error states.
- Server routes must enforce authorization; UI feature checks are presentation only.
- Parse mutation JSON safely and return
400for malformed input. Validate identifiers before mutations. - Do not persist or log raw passwords, tokens, cookies, API keys, license keys, or authorization headers. Redact audit metadata before persistence.
- Use constant-time comparisons for internal API keys and verify payment-provider webhook signatures before processing payloads.
Scoped Guidance
Read the relevant canonical guide in agent-guides/ before changing these areas:
documentation.mdfor documentation and README work.frontend.mdandsecurity-testing.mdfor OpenLIT client work.coding-agents-hook.mdfor hook adapters andcoding-agents-convention.mdfor their telemetry schema.controller-design.mdfor controller and agent-discovery work.js-sdk-genai-instrumentation.mdorjs-sdk-genai-framework-instrumentation.mdfor TypeScript SDK instrumentation.pr-validation.mdfor the PR validation workflow. Run it only when someone explicitly asks to validate a PR or run the workflow. When you open or update a PR, or someone says their PR is ready, ask "Your PR looks ready. Should I run the validation workflow?" and start only after a yes. For a plain code review, do a normal review and mention that the workflow is available.
Validation
- Add tests for changed security boundaries.
- Run focused tests and
npm run lintfromsrc/clientbefore handoff. - Before handoff, scan CE for accidental enterprise leakage:
rg -n "@/ee/" src/client/src
rg -n '"[a-z_]+:[a-z_]+"' src/client/src
The second scan may find non-RBAC strings such as CSS variants, cache keys, or encrypted-value prefixes. Review every match and keep RBAC permission literals out of CE.