Skip to content

Follow Project Standards

Caracal style favors small, explicit boundaries and source-aligned documentation.

LanguageRequired styleEnforcement
TypeScript and JavaScriptExisting repository patterns plus the pinned Prettier workspace dependency.pnpm run style checks changed TS/JS source files with Prettier.
GoEffective Go with canonical gofmt formatting.pnpm run style checks changed Go source files with gofmt -l.
PythonPEP 8 layout as formatted by the pinned Ruff version.pnpm run style checks changed Python source files with ruff format --check.

The pre-commit hook activated by pnpm install formats staged files automatically on every commit, and pnpm run style:fix formats changed files on demand. The gate always runs the Ruff version pinned in scripts/pythonStyleRequirements.in, so local formatting matches CI exactly. Pull requests run the same changed-file style gate automatically for primary-language source files.

ConventionApply it
Keep changes focusedAvoid unrelated refactors in feature or docs PRs.
Prefer explicit validationFail closed on auth, policy, config, stream, and key errors.
Preserve product boundariesDo not couple open-source code to enterprise-only code.
Respect command ownershipRuntime CLI is lifecycle and setup; the web console is the human surface, the Admin API is broad automation, and the Control API is Zone-scoped dispatch.
Use existing shared layersReuse core config, errors, crypto, logging, engine dispatch, and SDK helpers.
Preserve language paritySDK capability and wire changes in shared packages must land idiomatically in TypeScript, Python, and Go with equivalent tests.
Preserve file headersSource files keep the repository copyright/product header in the language’s comment syntax.
Page typePattern
LandingPurpose, audience, map, recommended reading path.
WorkflowPrerequisites, steps, validation, troubleshooting, related links.
ReferenceExact names, defaults, tables, examples, source-of-truth links.
ArchitectureDiagram, component responsibilities, flow, boundaries, related pages.

Recurring sections use fixed names and casing: ## Prerequisites, ## Expected Outcome, ## Common Mistakes, ## Troubleshooting, ## Related Pages, and ## Next Step. Cross-reference link text matches the target page’s title or sidebar label. Web console locations are written as breadcrumbs (Services → Launcher). Clause separators are spaced hyphens (-), not em dashes; quotes are straight. Example data uses the PiperNet/Hooli sample universe with reserved .example hosts and UUID-style zone IDs; scopes in a snippet must match the resource the snippet targets. Rego policy-data blocks are fenced as rego.

Do not use docs to preserve stale command names, screenshots, package names, or workflows. Update the whole affected page coherently.

  • Top-level caracal commands are limited to runtime lifecycle, upgrade, purge, console admission, caracal run, and the optional web development launcher.
  • Product-management workflows for Zones, Policy, Grants, audit, Sessions, Delegation, and Control belong in the web console, Admin SDK, or Control API docs.
  • Open-source code must not import, reference, or depend on enterprise-only code.

Use canonical terms from Glossary. Keep raw names such as agent_session_id, delegation_edge_id, and /agents at explicit protocol boundaries only, and link the Product-to-Wire Mapping wherever a raw name must appear. Capitalize Caracal object nouns (Session, Zone, Delegation, Mandate, Approval) when naming the product object; keep fully generic uses lowercase, and never mix both styles in one page.

Use Make a Change to plan and submit a focused pull request.