Architecture contract container for stack, dependency policy, repo/process, secrets, toolchain, validation, and deploy posture rules.
Sections
- Stack: runtime topology, host, language/runtime boundaries
- Dependencies: dependency policy, machine allowlist
- Repo and process: repo rules, process rules, tooling
Rules
- [locked] Secrets go through SOPS only. No plaintext
.envfiles anywhere, under any name. A.gitignoreis NOT protection. Docs reference SOPS pointers + commands, never raw values. - [locked]
uvis the only Python package manager/toolchain for Python services (services/api). Python dependencies are declared inpyproject.tomland allowlisted ingovernance/allowed-deps.json(gated bygovernance/scripts/check-python-deps.py, which scans pyproject.toml; npmpackage.jsonis gated bygovernance/scripts/check-deps.mjs).ruffis the only Python linter/formatter;pydantic-settingsis the only config/env loader.uvitself is the toolchain, not an allowlisted dependency. - [locked] Governance contract JSON and API payload schemas are validated against JSON Schema (the standard) using
ajv(the npm validator). Schemas live ingovernance/schemas/;governance/scripts/check-contracts.mjsvalidates everygovernance/contracts/*.jsonagainst its schema.
Enforced by
scripted scan + JSON Schema validation + dependency-cruiser + dependency allowlist gates — derived from these rules
- Secrets scan — flags any plaintext secret /
.envfile committed to the repo. - Contract validation — validates governance contract JSON with
governance/scripts/check-contracts.mjs. - Imports rule (dependency-cruiser, pending) — enforces path-alias and import-order conventions.
- Dependency allowlist enforcement stays in
governance/allowed-deps.json, checked bygovernance/scripts/check-deps.mjsandgovernance/scripts/check-python-deps.py.
Open items
- Imports & path aliases: alias map + import order (e.g. simple-import-sort) — define and lock.
- File & directory naming: PascalCase components, camelCase hooks/utils, colocated tests — confirm and lock.
- Commit conventions: commitlint config — confirm and lock.
- Stack, dependency, repo, and process rules must be ratified one at a time before encoding.
Dependency allowlist
The live allowlist remains governance/allowed-deps.json because dependency gates read its structure.
Allowed today
tooling
ajvdependency-cruisermadge
apps/web
@neondatabase/serverlessbetter-authdrizzle-ormwrangler
services/api
fastapiuvicornsqlalchemyalembicsqladminpydantic-settingspsycopg2-binaryruff
apps/devdocs
@tailwindcss/postcss@types/mdxcross-envfumadocs-corefumadocs-mdxfumadocs-uimermaidnextnext-themesreactreact-domremark-directiveshiki@types/node@types/react@types/react-domtypescriptwrangler