Type to search pages and rules.

Browse pages

Configuration

Repository configuration should make builds repeatable and fail before a deployment starts with missing or invalid values.

Markdown10 provisions

Intent#

Repository configuration should make builds repeatable and fail before a deployment starts with missing or invalid values. Version pins, compiler rules, environment access, and secret handling have one defined owner.

Standards#

Validate backend configuration at startup#

ruleguidance

Requirement A backend configuration section MUST bind to a named settings type validated for required fields, ranges, and formats at startup.

Rationale Reading a required setting through a raw configuration lookup defers the failure to the first request that needs it.

litespec/workspace/config#validate-backend-configuration-at-startup

Validate frontend environment access#

ruleguidance

Requirement A frontend MUST read environment variables through one validated module separating server-only from browser-visible values, at src/lib/env.ts through the framework alias.

Rationale Browser-visible names use the framework prefix, so an unprefixed value cannot reach the bundle by accident.

litespec/workspace/config#validate-frontend-environment-access

Keep secrets outside source control#

ruleguidance

Requirement A tracked configuration file MUST contain only safe defaults and placeholders.

Rationale Local development uses user secrets and hosted environments use the deployment platform, so no real value needs to be tracked.

litespec/workspace/config#keep-secrets-outside-source-control

Use one frontend dependency graph#

ruleguidance

Requirement A TypeScript workspace MUST use one root package.json, pnpm-workspace.yaml, and pnpm-lock.yaml.

Rationale A nested lockfile lets one application resolve a different version than the workspace CI installs.

litespec/workspace/config#use-one-frontend-dependency-graph

Pin the JavaScript toolchain#

ruleguidance

Requirement Root package.json MUST declare the manifest pnpm stack release in packageManager and a Node.js engine matching the manifest node stack release.

Rationale CI provisions that Node.js release and invokes the declared pnpm release, so local and CI resolve identically.

litespec/workspace/config#pin-the-javascript-toolchain

Pin the React version in the ESLint flat config#

ruleguidance

Requirement When the workspace holds a React frontend, its ESLint flat config MUST set a concrete settings.react.version rather than leave it at detect.

Rationale Version detection calls context APIs that the pinned ESLint release removed, and a concrete version skips detection entirely.

litespec/workspace/config#pin-the-react-version-in-the-eslint-flat-config

Conventions#

Keep environment examples beside applications#

conventionguidance

Default Keep a .env.example beside each frontend and deployable host listing required names and safe values.

Replacement A consumer departs from this default only through an Exception record naming this provision, with a reason and a review date.

Rationale The example sits next to the options module that reads those names, so both change together.

litespec/workspace/config#keep-environment-examples-beside-applications

Keep local overrides untracked#

conventionguidance

Default Keep developer overrides in ignored local files or a platform secret store.

Replacement A consumer departs from this default only through an Exception record naming this provision, with a reason and a review date.

Rationale A second committed environment-specific source competes with the deployment platform for the same value.

litespec/workspace/config#keep-local-overrides-untracked

Keep logging configuration provider-neutral#

conventionguidance

Default Emit structured logs through standard logging abstractions and keep exporter configuration in hosts.

Replacement A consumer departs from this default only through an Exception record naming this provision, with a reason and a review date.

Rationale Application code then carries no provider choice, so an exporter change stays inside deployment settings.

litespec/workspace/config#keep-logging-configuration-provider-neutral

Keep documentation directories out of build-artifact ignore rules#

conventionguidance

Default Exclude a documentation directory from a build-artifact ignore rule that matches it by accident.

Replacement A consumer departs from this default only through an Exception record naming this provision, with a reason and a review date.

Rationale A platform .gitignore commonly matches a documentation name and silently untracks its records.

Example

Text
[Oo]utput/
!docs/<directory>/
!docs/<directory>/*.md

Confirm with git check-ignore docs/<directory>/<file>.md that no record is ignored.

litespec/workspace/config#keep-documentation-directories-out-of-build-artifact-ignore-rules

Reference example#

This informative example demonstrates litespec/workspace/config#validate-backend-configuration-at-startup and litespec/workspace/config#keep-secrets-outside-source-control.

EmailSettings binds the Email section, validates its endpoint and sender during startup, and is injected as a settings type. The consumer workspace secret store supplies the credential.

Verification#

IDMarkEvidence
litespec/workspace/config#validate-backend-configuration-at-startupguidanceDoes each backend section bind a validated settings type that fails startup on bad values?
litespec/workspace/config#validate-frontend-environment-accessguidanceDoes each frontend read environment values only through its validated module with server values separated?
litespec/workspace/config#keep-secrets-outside-source-controlguidanceDoes each tracked configuration file carry only safe defaults and placeholders?
litespec/workspace/config#use-one-frontend-dependency-graphguidanceDoes the workspace use one root manifest and lockfile with no nested lockfile tracked?
litespec/workspace/config#pin-the-javascript-toolchainguidanceDoes root package.json declare the manifest pnpm release and a matching Node engine?
litespec/workspace/config#pin-the-react-version-in-the-eslint-flat-configguidanceDoes each React flat config set a concrete settings.react.version?
litespec/workspace/config#keep-environment-examples-beside-applicationsguidanceDoes each frontend and host directory hold an environment example with safe values?
litespec/workspace/config#keep-local-overrides-untrackedguidanceAre local overrides ignored with no second tracked environment-specific source?
litespec/workspace/config#keep-logging-configuration-provider-neutralguidanceDoes application source use only logging abstractions with exporters in hosts?
litespec/workspace/config#keep-documentation-directories-out-of-build-artifact-ignore-rulesguidanceDoes git check-ignore report no match for each documentation directory?