Skip to content

Rule index

Every rule Coral publishes, in one place: 178 rules across 9 documents — 28 [auto], 121 [review], 29 [guide]. Each ID links to its definition, where the reasoning lives; the statement here is only the one-line form.

This page is generated from the documents (npm run rules:index), and the build fails if it drifts, so it cannot disagree with them. A hand-maintained index would be a second copy of every rule — the failure the [DUP-*] rules exist to prevent, committed by the rule set itself.

Statements come from each document's Agent Execution Contract, which is why they read as instructions. [guide] rules are rationale rather than instruction and appear in no contract, so theirs is the opening sentence of the definition instead.

Ownership layers

Every rule belongs to exactly one ownership layer: the narrowest surface that justifies it. This is a separate axis from the enforcement class — a rule is both app profile · cli and [auto]. Ownership answers who has to load this rule; the class answers how it is checked.

They answer to three audiences rather than stacking into one number. 97 form the conformance surface — kernel plus production baseline — what a Coral codebase is built and audited against before any profile is added, 69 of them [review]. 9 govern Coral itself and sit outside that surface entirely: no application source code satisfies or violates them. Coral-aware humans, agents and tooling read them when interpreting a rule, consulting the adherence record, or changing how a project relates to Coral. The other 72 are opt-in — 50 [review] — and load only where their profile is selected, so a CLI with no runtime model never reads an [AGENTIC-*] rule and a library never reads an HTTP status code.

Scale narrows the conformance surface further. 18 of those 97 are stated at system scale in SYSTEM.md — channel contracts, topology, cross-app contract testing — and a repository that ships one app has no channel to version and no topology to wire. They are the baseline when several apps compose, not a reason for a single-app project to load them.

LayerRules[auto][review][guide]Loaded by
kernel9180every Coral codebase
framework governance9225Coral-aware humans, agents and tooling — never audited against application source
production baseline88126115every Coral codebase, at the scale the rule is stated for
app profile · backend8170projects with an app of that shape
app profile · cli11542projects with an app of that shape
app profile · gh-action12291projects with an app of that shape
app profile · library132101projects with an app of that shape
app profile · web12372projects with an app of that shape
language binding0000projects in that language ecosystem
runtime-agent profile160133applications that call a model at runtime

kernel membership is read from the one table that records it, in CONVENTIONS.md, where each member is mapped to the property it defends. Every other rule carries its layer as a {tag} on its own definition line, and the profiles those tags may name are registered in CONVENTIONS.md. Kernel membership answers why Coral imposes a rule, and at what strength; it does not mean the rule matters more, and no layer below it is optional once its profile is loaded.

Rules by scope

The same rules, grouped by the ownership layer that owns them rather than by the document that states them. Each heading is the layer's key, the stable identifier the tooling resolves every rule to; the human name is in the table above. Statements are in the per-document tables below, and the reasoning is in the document itself.

Ownership is one applicability axis, not the whole load decision. A group here says which layer or profile a rule belongs to, and nothing more. Production-baseline rules are narrowed further by scale, as described above: the ones in ARCHITECTURE.md are app-scale and the ones in SYSTEM.md are the baseline when several apps compose, so a repository that ships one app loads part of that group and not the rest.

kernel

9 rules — kernel.

RuleClassDefined in
[AGENT-2][review]CONVENTIONS.md
[AGENT-4][review]CONVENTIONS.md
[BOUND-2][review]ARCHITECTURE.md
[COMPOSE-1][review]ARCHITECTURE.md
[MODEL-1][review]ARCHITECTURE.md
[TEST-1][review]ARCHITECTURE.md
[VER-3][review]CONVENTIONS.md
[VER-5][auto]CONVENTIONS.md
[XCUT-1][review]ARCHITECTURE.md

framework-governance

9 rules — framework governance.

RuleClassDefined in
[AGENT-1][guide]CONVENTIONS.md
[AGENT-3][guide]CONVENTIONS.md
[AGENT-5][review]CONVENTIONS.md
[SCOPE-1][guide]ARCHITECTURE.md
[SCOPE-2][guide]ARCHITECTURE.md
[SCOPE-4][guide]ARCHITECTURE.md
[VER-1][auto]CONVENTIONS.md
[VER-2][review]CONVENTIONS.md
[VER-4][auto]CONVENTIONS.md

production-baseline

88 rules — production baseline.

RuleClassDefined in
[BOUND-1][guide]ARCHITECTURE.md
[BOUND-3][review]ARCHITECTURE.md
[BOUND-4][guide]ARCHITECTURE.md
[BOUND-5][review]ARCHITECTURE.md
[BUCKET-1][auto]ARCHITECTURE.md
[BUCKET-2][guide]ARCHITECTURE.md
[CHAN-1][review]SYSTEM.md
[CHAN-10][review]SYSTEM.md
[CHAN-2][guide]SYSTEM.md
[CHAN-3][auto]SYSTEM.md
[CHAN-4][review]SYSTEM.md
[CHAN-5][review]SYSTEM.md
[CHAN-6][review]SYSTEM.md
[CHAN-7][review]SYSTEM.md
[CHAN-8][review]SYSTEM.md
[CHAN-9][review]SYSTEM.md
[COMPOSE-2][review]ARCHITECTURE.md
[COMPOSE-3][review]ARCHITECTURE.md
[COMPOSE-4][review]ARCHITECTURE.md
[CONC-1][auto]ARCHITECTURE.md
[CONC-2][review]ARCHITECTURE.md
[CONC-3][review]ARCHITECTURE.md
[CONC-4][review]ARCHITECTURE.md
[CONC-5][guide]ARCHITECTURE.md
[CONFIG-1][review]ARCHITECTURE.md
[CONFIG-2][auto]ARCHITECTURE.md
[CONFIG-3][review]ARCHITECTURE.md
[CONFIG-4][auto]ARCHITECTURE.md
[CONTRACT-1][review]ARCHITECTURE.md
[CONTRACT-2][review]ARCHITECTURE.md
[DUP-1][guide]ARCHITECTURE.md
[DUP-2][review]ARCHITECTURE.md
[DUP-3][review]ARCHITECTURE.md
[DUP-4][review]ARCHITECTURE.md
[EFFECT-1][review]ARCHITECTURE.md
[EFFECT-2][review]ARCHITECTURE.md
[EFFECT-3][guide]ARCHITECTURE.md
[EFFECT-4][review]ARCHITECTURE.md
[ERR-1][review]ARCHITECTURE.md
[ERR-2][auto]ARCHITECTURE.md
[ERR-3][review]ARCHITECTURE.md
[ERR-4][review]ARCHITECTURE.md
[GROW-1][guide]ARCHITECTURE.md
[GROW-2][review]ARCHITECTURE.md
[GROW-3][review]ARCHITECTURE.md
[IDEM-1][review]ARCHITECTURE.md
[IDEM-2][auto]ARCHITECTURE.md
[IDEM-3][review]ARCHITECTURE.md
[IDEM-4][review]ARCHITECTURE.md
[IDEM-5][review]ARCHITECTURE.md
[IDEM-6][review]ARCHITECTURE.md
[MODEL-2][review]ARCHITECTURE.md
[MODEL-3][guide]ARCHITECTURE.md
[MODEL-4][review]ARCHITECTURE.md
[OBS-1][guide]ARCHITECTURE.md
[OBS-2][review]ARCHITECTURE.md
[OBS-3][review]ARCHITECTURE.md
[ORCH-1][review]SYSTEM.md
[ORCH-2][review]SYSTEM.md
[ORCH-3][guide]SYSTEM.md
[ROOT-1][review]ARCHITECTURE.md
[ROOT-2][auto]ARCHITECTURE.md
[ROOT-3][guide]ARCHITECTURE.md
[SCOPE-3][review]ARCHITECTURE.md
[STATE-1][review]ARCHITECTURE.md
[STATE-2][auto]ARCHITECTURE.md
[STATE-3][guide]ARCHITECTURE.md
[STATE-4][review]ARCHITECTURE.md
[STATE-5][review]ARCHITECTURE.md
[STATE-6][review]ARCHITECTURE.md
[STATE-7][review]ARCHITECTURE.md
[STRUCT-1][auto]ARCHITECTURE.md
[STRUCT-2][review]ARCHITECTURE.md
[STRUCT-3][auto]ARCHITECTURE.md
[SYS-TEST-1][review]SYSTEM.md
[SYS-TEST-2][review]SYSTEM.md
[SYS-TEST-3][review]SYSTEM.md
[SYS-TEST-4][guide]SYSTEM.md
[SYS-TEST-5][review]SYSTEM.md
[TEST-2][review]ARCHITECTURE.md
[TEST-3][review]ARCHITECTURE.md
[TEST-4][review]ARCHITECTURE.md
[TRUST-1][review]ARCHITECTURE.md
[TRUST-2][review]ARCHITECTURE.md
[XCUT-2][auto]ARCHITECTURE.md
[XCUT-3][review]ARCHITECTURE.md
[XCUT-4][guide]ARCHITECTURE.md
[XCUT-5][review]ARCHITECTURE.md

app-profile

56 rules — app profile, by profile.

backend

8 rules — {app:backend}.

RuleClassDefined in
[BE-1][review]appendix/backend.md
[BE-2][review]appendix/backend.md
[BE-3][review]appendix/backend.md
[BE-4][review]appendix/backend.md
[BE-5][auto]appendix/backend.md
[BE-6][review]appendix/backend.md
[BE-7][review]appendix/backend.md
[BE-8][review]appendix/backend.md

cli

11 rules — {app:cli}.

RuleClassDefined in
[CLI-1][review]appendix/cli.md
[CLI-10][auto]appendix/cli.md
[CLI-11][auto]appendix/cli.md
[CLI-2][review]appendix/cli.md
[CLI-3][auto]appendix/cli.md
[CLI-4][review]appendix/cli.md
[CLI-5][guide]appendix/cli.md
[CLI-6][auto]appendix/cli.md
[CLI-7][guide]appendix/cli.md
[CLI-8][auto]appendix/cli.md
[CLI-9][review]appendix/cli.md

gh-action

12 rules — {app:gh-action}.

RuleClassDefined in
[GHA-1][review]appendix/gh-action.md
[GHA-10][auto]appendix/gh-action.md
[GHA-11][review]appendix/gh-action.md
[GHA-12][review]appendix/gh-action.md
[GHA-2][review]appendix/gh-action.md
[GHA-3][auto]appendix/gh-action.md
[GHA-4][review]appendix/gh-action.md
[GHA-5][review]appendix/gh-action.md
[GHA-6][review]appendix/gh-action.md
[GHA-7][review]appendix/gh-action.md
[GHA-8][guide]appendix/gh-action.md
[GHA-9][review]appendix/gh-action.md

library

13 rules — {app:library}.

RuleClassDefined in
[LIB-1][review]appendix/library.md
[LIB-10][review]appendix/library.md
[LIB-11][review]appendix/library.md
[LIB-12][guide]appendix/library.md
[LIB-13][review]appendix/library.md
[LIB-2][review]appendix/library.md
[LIB-3][auto]appendix/library.md
[LIB-4][review]appendix/library.md
[LIB-5][auto]appendix/library.md
[LIB-6][review]appendix/library.md
[LIB-7][review]appendix/library.md
[LIB-8][review]appendix/library.md
[LIB-9][review]appendix/library.md

web

12 rules — {app:web}.

RuleClassDefined in
[WEB-1][review]appendix/web.md
[WEB-10][review]appendix/web.md
[WEB-11][review]appendix/web.md
[WEB-12][review]appendix/web.md
[WEB-2][guide]appendix/web.md
[WEB-3][review]appendix/web.md
[WEB-4][auto]appendix/web.md
[WEB-5][review]appendix/web.md
[WEB-6][guide]appendix/web.md
[WEB-7][review]appendix/web.md
[WEB-8][auto]appendix/web.md
[WEB-9][auto]appendix/web.md

language-binding

0 rules — language binding.

runtime-agent-profile

16 rules — runtime-agent profile.

RuleClassDefined in
[AGENTIC-1][guide]appendix/agentic-app.md
[AGENTIC-10][review]appendix/agentic-app.md
[AGENTIC-11][review]appendix/agentic-app.md
[AGENTIC-12][review]appendix/agentic-app.md
[AGENTIC-13][review]appendix/agentic-app.md
[AGENTIC-2][guide]appendix/agentic-app.md
[AGENTIC-3][review]appendix/agentic-app.md
[AGENTIC-4][review]appendix/agentic-app.md
[AGENTIC-5][review]appendix/agentic-app.md
[AGENTIC-6][guide]appendix/agentic-app.md
[AGENTIC-7][review]appendix/agentic-app.md
[AGENTIC-8][review]appendix/agentic-app.md
[AGENTIC-9][review]appendix/agentic-app.md
[ORCH-4][review]SYSTEM.md
[ORCH-5][review]SYSTEM.md
[ORCH-6][review]SYSTEM.md

Coral Architecture — Conventions

10 rules — CONVENTIONS.md

RuleClassLayerStatement
[AGENT-1][guide]framework governancePrefer the structure that minimizes an agent's placement and cross-file-reasoning decisions, even at the cost of some duplication.
[AGENT-2][review]kernelFlag, don't guess: take the reversible option, mark it, surface it for human review.
[AGENT-3][guide]framework governanceDo not over-comply literally.
[AGENT-4][review]kernelNever author an exception or an extension; a human decides and records.
[AGENT-5][review]framework governanceRead the project's CORAL.md before escalating; a documented decision is settled.
[VER-1][auto]framework governanceRule IDs are append-only: never renumbered, recycled, or removed.
[VER-2][review]framework governanceAdding, tightening, or retiring a rule is a major version; loosening or clarifying is minor.
[VER-3][review]kernelState the Coral version a project targets; audit against that version.
[VER-4][auto]framework governanceNamespace a project's own rule IDs by project prefix; never reuse a Coral family name.
[VER-5][auto]kernelRecord exceptions and extensions in CORAL.md as machine-readable entries naming a rule ID and a scoped path.

Coral Architecture — the App

78 rules — ARCHITECTURE.md

RuleClassLayerStatement
[SCOPE-1][guide]framework governanceThis architecture covers command/request-shaped apps with loosely-coupled features, where each feature is largely its own world.
[SCOPE-2][guide]framework governanceIt is weak for dense, deeply-coupled domains where every feature reaches into one large central concept.
[SCOPE-3][review]production baselineWhen features converge on one dense concept, give it its own app behind a published contract.
[SCOPE-4][guide]framework governanceWhat happens after the split is not in this document.
[MODEL-1][review]kernelEvery unit of code is a slice, a crosscut, an adapter, the composition root, or a published contract.
[MODEL-2][review]production baselineName every package for the capability or concern it owns, never for its technical role.
[MODEL-3][guide]production baselineA crosscut's decisive property is defined once, injected many.
[MODEL-4][review]production baselineAn adapter implements a slice-declared port: infrastructure only, arrow inward, wired by the root, no behavior.
[BOUND-1][guide]production baselineA slice handles one inbound request or trigger, end to end.
[BOUND-2][review]kernelOne request/trigger — or a very tight pair — per slice, owned end to end.
[BOUND-3][review]production baselineUse the boundary form the appendix fixes; do not invent a new one.
[BOUND-4][guide]production baseline"Continuous" or "real-time" work is not a new boundary kind.
[BOUND-5][review]production baselineA scheduled/background trigger is a slice: observable outcome, overlap-safe, tested.
[ROOT-1][review]production baselineKeep the root thin: register, construct, inject, bootstrap. No business logic.
[ROOT-2][auto]production baselineThe root imports no persistence or domain-internal module.
[ROOT-3][guide]production baselineEach appendix names its root form — including the app types that have no root of their own: for a library the consumer is the composition root, so the package exposes capabilities and lets the consumer wire them.
[STRUCT-1][auto]production baselineColocate tests, or mirror the package structure where colocation is impossible.
[STRUCT-2][review]production baselinePut slices in concrete, domain-oriented feature packages; the package owns its capability's state.
[STRUCT-3][auto]production baselineKeep root-level crosscuts rare and precisely named.
[BUCKET-1][auto]production baselineDo not create or expand shared/common/utils/helpers/services/repository/generic models.
[BUCKET-2][guide]production baselineGeneric catch-all names destroy locality and predictability.
[XCUT-1][review]kernelPromote to a crosscut only when it is genuinely cross-cutting AND enforces a must-not-diverge invariant.
[XCUT-2][auto]production baselineGive every crosscut a precise domain or infrastructure name.
[XCUT-3][review]production baselineInject crosscuts; consume their published surface, never their internals.
[XCUT-4][guide]production baselineA crosscut is the first line of drift control.
[XCUT-5][review]production baselineA domain entity may be a crosscut only as type + invariants — never its queries or storage.
[DUP-1][guide]production baselineSmall duplication across slices is acceptable and often preferred; do not extract merely to save lines.
[DUP-2][review]production baselineDo not extract on similarity alone; similarity is not a shared concept.
[DUP-3][review]production baselineExtract only to enforce an invariant or convention, provide named infrastructure, or clarify a real calculation.
[DUP-4][review]production baselineApply the Extraction Test before extracting.
[COMPOSE-1][review]kernelDo not reach into another slice's internals; depend on its published capability.
[COMPOSE-2][review]production baselinePrefer injecting a capability through the root over a slice-to-slice import.
[COMPOSE-3][review]production baselineA shared multi-step workflow is a candidate crosscut, not a services bucket.
[COMPOSE-4][review]production baselineRead fan-in is a legitimate slice, provided it uses published capabilities only.
[EFFECT-1][review]production baselineKeep parsing, validation, normalization, calculation, and output shaping pure.
[EFFECT-2][review]production baselineKeep side effects at the edges.
[EFFECT-3][guide]production baselineThe preferred slice flow is parse → validate → compute → persist/effect → render; do not intermingle calculation and side effects unnecessarily.
[EFFECT-4][review]production baselineDo not extract a function only to make it pure or testable.
[STATE-1][review]production baselineKeep state-access logic local to the slice that owns it.
[STATE-2][auto]production baselineDo not create a shared repository or data-access layer.
[STATE-3][guide]production baselineA shared persistence layer accumulates special cases and forces cross-slice reasoning on every change; local ownership keeps each slice independently changeable.
[STATE-4][review]production baselineThe slice that computes derived state owns it; write it from a set-/event-named handler.
[STATE-5][review]production baselineOne owning feature package per table/file/bucket, schema defined once inside it; siblings reach it directly, outsiders via a published capability.
[STATE-6][review]production baselineA cache is never a source of truth; every read path must be correct with it empty.
[STATE-7][review]production baselineName the cache's invalidation strategy — TTL, write-through, or event-driven.
[CONC-1][auto]production baselineA slice holds no mutable state between triggers.
[CONC-2][review]production baselineEvery crosscut is explicitly shared-and-concurrency-safe or constructed per trigger.
[CONC-3][review]production baselineName the strategy where two triggers can write the same state: serialize, compare-and-set, or commute.
[CONC-4][review]production baselineScope a transaction to one trigger; never hold it across an external call.
[CONC-5][guide]production baselineThe architecture's concurrency default is one trigger, one thread of control, no shared mutable state.
[CONFIG-1][review]production baselineResolve, validate, and inject configuration at the root as a crosscut.
[CONFIG-2][auto]production baselineNo slice reads the environment, a config file, or a global settings object directly.
[CONFIG-3][review]production baselineValidate every required setting at construction; fail startup, not first use.
[CONFIG-4][auto]production baselineRead secrets only through the config crosscut; never inline, log, or publish them.
[IDEM-1][review]production baselineThe name signals the effect; the implementation matches it.
[IDEM-2][auto]production baselineA read-named slice contains no write or mutation call, including a cache write.
[IDEM-3][review]production baselineDo not make a non-idempotent operation idempotent without renaming it.
[IDEM-4][review]production baselineNever auto-retry a non-idempotent mutation.
[IDEM-5][review]production baselineOn an at-least-once platform, a mutating handler must be idempotent.
[IDEM-6][review]production baselineClassify an unlisted verb by its effect and name it truthfully; flag an unclear effect.
[ERR-1][review]production baselineUse the six-category taxonomy, defined once as a crosscut.
[ERR-2][auto]production baselineRaise {category, code, message} using the enum; slices own their code strings.
[ERR-3][review]production baselineSlices raise; the root renders; nothing else renders.
[ERR-4][review]production baselineBatch operations are all-or-nothing unless partial outcomes are reported explicitly.
[OBS-1][guide]production baselineDiagnostics are opt-in, off the data path, and never part of the machine contract.
[OBS-2][review]production baselineConfigure observability at the root; emit through the injected crosscut.
[OBS-3][review]production baselineKeep diagnostics off the machine-readable contract channel.
[CONTRACT-1][review]production baselineKeep the public contract stable, explicit, fully typed, and undecorated.
[CONTRACT-2][review]production baselineVersion public-contract changes per the app type's discipline.
[TRUST-1][review]production baselineValidate and authorize untrusted input at the boundary.
[TRUST-2][review]production baselineState the app's trust boundary explicitly, however minimal.
[TEST-1][review]kernelBehavior-first: exercise the entry point, assert the observable contract, real infra, minimal mocking.
[TEST-2][review]production baselinePrefer integration and end-to-end tests over isolated unit tests.
[TEST-3][review]production baselineUnit tests are a scalpel; never duplicate integration coverage; never extract just to test.
[TEST-4][review]production baselineAssert contract, errors, idempotency, transactions, authorization, and diagnostics where relevant.
[GROW-1][guide]production baselineStart small: prefer one file per slice initially.
[GROW-2][review]production baselineAnswer file growth by splitting inside the slice, never with a global abstraction.
[GROW-3][review]production baselineTreat domain densification as a split signal, not a refactor-into-a-shared-core signal.

Coral Architecture — the System

21 rules — SYSTEM.md

RuleClassLayerStatement
[CHAN-1][review]production baselineCross an app boundary only through a published channel contract.
[CHAN-2][guide]production baselineA channel is one of three forms, chosen per relationship: a synchronous API contract, an event, or a message bus.
[CHAN-3][auto]production baselineNever share a datastore between apps.
[CHAN-4][review]production baselineVersion the channel contract; add freely, never repurpose, deprecate before removing.
[CHAN-5][review]production baselineMake event/message consumers idempotent; never auto-retry a non-idempotent sync call.
[CHAN-6][review]production baselineNever let errors cross the channel as exceptions; dead-letter the un-processable.
[CHAN-7][review]production baselinePropagate the correlation/trace id across the channel, in metadata not payload.
[CHAN-8][review]production baselineAuthenticate the caller/message and validate every inbound channel payload.
[CHAN-9][review]production baselineMake consumers that mutate shared state safe under concurrent and out-of-order delivery.
[CHAN-10][review]production baselineNever assume a transactional view spanning two apps; state how a cross-app computation handles the skew.
[ORCH-1][review]production baselinePut topology in the orchestration layer; keep business logic out of the wiring.
[ORCH-2][review]production baselineKeep apps peer-agnostic: publish and consume capabilities, never hard-code peers.
[ORCH-3][guide]production baselineEach app is independently deployable and independently observable.
[ORCH-4][review]runtime-agent profileLet an agent orchestrate only from inside a harness, never as a bare model.
[ORCH-5][review]runtime-agent profileGive the harness only published channel capabilities as tools; authorize every call and gate irreversible ones absent bounded pre-authorization.
[ORCH-6][review]runtime-agent profileTreat the orchestrating harness as an app: its own contract, observability, and tests.
[SYS-TEST-1][review]production baselineVerify each side independently against the shared contract, not by booting both apps.
[SYS-TEST-2][review]production baselineGive every consumed channel relationship executable compatibility verification; consumer-driven contracts are one technique.
[SYS-TEST-3][review]production baselineGate producer releases on provider verification against consumer contracts.
[SYS-TEST-4][guide]production baselineContract testing is tool-agnostic in principle; pick concrete tooling per stack.
[SYS-TEST-5][review]production baselineKeep integrated end-to-end suites tiny; they backstop contract tests, never replace them.

Appendix: Agentic App (ADDENDUM)

13 rules — appendix/agentic-app.md

RuleClassLayerStatement
[AGENTIC-1][guide]runtime-agent profileThe boundary is one turn, task, or agent-invocation — a user message, or a goal handed to the agent.
[AGENTIC-2][guide]runtime-agent profileDistinguish two intensities.
[AGENTIC-3][review]runtime-agent profileTreat the model as an injected effect; keep prompt-building and output-parsing pure.
[AGENTIC-4][review]runtime-agent profileForce a schema on model output; the contract is schema conformance plus observed tool calls, never the text.
[AGENTIC-5][review]runtime-agent profileRun an autonomous or looping agent only inside a harness: typed tools, authorization, risk-based gating against explicit policy, observation, bounds.
[AGENTIC-6][guide]runtime-agent profileThe agent is the non-deterministic core; the harness is the deterministic shell.
[AGENTIC-7][review]runtime-agent profileTreat history, memory, and retrieval as state: slice-owned, or a precisely-named retrieval crosscut.
[AGENTIC-8][review]runtime-agent profileDedupe a mutating agent by storing the first result keyed to the request; never re-run to recover.
[AGENTIC-13][review]runtime-agent profileGive every side-effecting tool its own replay protection — key, natural key, or ledger; the stored result is not one.
[AGENTIC-9][review]runtime-agent profileMap model failures to the taxonomy, bound schema repair then fail, and never accept malformed output.
[AGENTIC-10][review]runtime-agent profileTreat prompt input and model output as untrusted, default-deny dangerous tools, keep secrets out of prompts entirely, and minimize/redact/retain personal data.
[AGENTIC-12][review]runtime-agent profilePin the model identifier and version the prompt; record both with each result and re-run evals before either changes.
[AGENTIC-11][review]runtime-agent profileTest the deterministic parts normally, agent behavior by conformance and evals, and harness safety; never exact-match model text.

Appendix: Backend / Service

8 rules — appendix/backend.md

RuleClassLayerStatement
[BE-1][review]app profile · backendOne slice per business operation, named for the singular capability plus its effect verb; the route is its trigger.
[BE-2][review]app profile · backendThe contract is status code + response body + observable side effects: 201 create, 200 read, 204 no body.
[BE-3][review]app profile · backendWire router, middleware, and injection at the root; crosscuts are singletons, only request-bound state is per-request.
[BE-4][review]app profile · backendA synchronous POST may offer an idempotency key; any platform-redelivered handler must be idempotent.
[BE-5][auto]app profile · backendSlices raise the taxonomy; one root middleware renders the body and maps category → HTTP status.
[BE-6][review]app profile · backendAuthenticate and coarsely authorize at the boundary; scope every query by owner/tenant id, default to deny.
[BE-8][review]app profile · backendRender authn/authz failures at the boundary, not through the taxonomy: 401 unauthenticated, 403 no capability, 404 scoped miss.
[BE-7][review]app profile · backendPick one API versioning strategy and apply it system-wide — URL prefix by default; advance it only for a breaking change.

Appendix: CLI

11 rules — appendix/cli.md

RuleClassLayerStatement
[CLI-1][review]app profile · cliNormal output goes to stdout; errors and diagnostics go to stderr.
[CLI-2][review]app profile · cliFailures return non-zero exit codes.
[CLI-3][auto]app profile · cliRead commands must support --json on stdout; mutations may, and if they do they follow [CLI-4].
[CLI-4][review]app profile · cliKeep --json stable across patch releases, fully typed, and free of color, progress, or decoration.
[CLI-5][guide]app profile · cliCommands are narrow, explicit, composable, and script-friendly.
[CLI-6][auto]app profile · cliNo interactive prompts by default.
[CLI-7][guide]app profile · cliCommand names are stable and predictable.
[CLI-8][auto]app profile · cliExit 0 on success, 2 on usage error, 1 on every other failure.
[CLI-9][review]app profile · cliUse stable string codes on stderr for finer scripting precision, not a wider exit-code matrix.
[CLI-10][auto]app profile · cliConfigure debug mode as one global flag at the root; slices never configure tracing themselves.
[CLI-11][auto]app profile · cliSend trace output to stderr, stay quiet by default, and never pollute --json on stdout.

Appendix: GitHub Action / Tool

12 rules — appendix/gh-action.md

RuleClassLayerStatement
[GHA-1][review]app profile · gh-actionOne action run is one slice: one trigger, handled end to end.
[GHA-2][review]app profile · gh-actionThe contract is declared outputs + exit status + annotations; log text is not a contract.
[GHA-3][auto]app profile · gh-actionDeclare every output the action writes in action.yml, and rely on no undeclared output.
[GHA-4][review]app profile · gh-actionThe entry point is the root: validate inputs and environment there, inject, dispatch, render. No business logic.
[GHA-5][review]app profile · gh-actionMake every mutating run safe under redelivery, via an idempotency key, a natural key, or check-before-write.
[GHA-6][review]app profile · gh-actionTreat the event payload as attacker-controlled; pass untrusted values through env:, never into a run: body.
[GHA-7][review]app profile · gh-actionDeclare permissions: explicitly and scope them to the run, default to read-only, and never write a secret to an output.
[GHA-8][guide]app profile · gh-actionPin third-party actions you call by commit SHA, not by a moving tag.
[GHA-9][review]app profile · gh-actionMap category → exit status and annotation at the entry point, distinguish recoverable from not, never exit 0 on failure.
[GHA-10][auto]app profile · gh-actionKeep diagnostics in log groups and annotations, never on the outputs surface; report no-ops explicitly.
[GHA-11][review]app profile · gh-actionTreat input and output names as the versioned contract: add freely, never repurpose, deprecate before removing.
[GHA-12][review]app profile · gh-actionExercise the entry point with simulated inputs and hostile payload fixtures, and assert a repeated run is a no-op.

Appendix: Library / Package

13 rules — appendix/library.md

RuleClassLayerStatement
[LIB-1][review]app profile · libraryOne public capability is one slice, owned end to end with its validation, behavior, and tests.
[LIB-2][review]app profile · libraryThe contract is the public API surface: exported signatures, return values, raised error types, exported types.
[LIB-3][auto]app profile · libraryNo ambient state: no hidden singletons, no package-level mutables, no side effects on import.
[LIB-4][review]app profile · libraryAccept dependencies; never reach for them. A library never reads the environment or a config file.
[LIB-5][auto]app profile · libraryNever write to stdout/stderr and never install global handlers; the default diagnostic is silence.
[LIB-6][review]app profile · libraryPrefer pure functions and push every effect to a consumer-provided interface.
[LIB-7][review]app profile · libraryEncode effect semantics in the name, and document idempotency and retry stance for anything doing I/O.
[LIB-8][review]app profile · libraryRaise typed taxonomy errors and never render; the consumer is the root and decides presentation.
[LIB-9][review]app profile · libraryAccept an injected logger or hook, define its no-op default, and keep the interface minimal.
[LIB-10][review]app profile · libraryValidate inputs at the public API boundary, and state the trust assumption explicitly.
[LIB-11][review]app profile · libraryFollow semver; add freely, never repurpose, deprecate before removing.
[LIB-12][guide]app profile · libraryMinimize dependencies: every dependency you take, your consumers take transitively, along with its vulnerabilities, its version constraints, and its own transitive set.
[LIB-13][review]app profile · libraryTest as a consumer would: public API only, plus one test constructing the library twice with different configuration.

Appendix: Web App

12 rules — appendix/web.md

RuleClassLayerStatement
[WEB-1][review]app profile · webA slice is one route/page-action/endpoint, with its UI and its handler in the same slice.
[WEB-2][guide]app profile · webMicrofrontends are an escalation pattern, not the default.
[WEB-3][review]app profile · webKeep the composition shell to layout and routing; it mounts slices and holds no business logic.
[WEB-4][auto]app profile · webDepend only on another slice's published surface: a typed import when integrated, a channel with no import edge when runtime-isolated.
[WEB-5][review]app profile · webDefine design tokens, primitives, and interaction patterns once as an injected crosscut.
[WEB-6][guide]app profile · webThe default web architecture is a single integrated frontend organized internally by capability slice, consuming the design-system crosscut.
[WEB-7][review]app profile · webTreat the client as hostile: authorize at the server boundary, validate every payload, keep secrets server-side.
[WEB-8][auto]app profile · webFollow HTTP method semantics: GET/HEAD safe and read-only, POST non-idempotent, PUT/DELETE idempotent.
[WEB-9][auto]app profile · webSlices raise the taxonomy; a root middleware renders to the right surface — error view or structured body.
[WEB-10][review]app profile · webTreat the route/URL structure as the stable contract: never break a route, never silently repurpose one.
[WEB-11][review]app profile · webServer state is the source of truth; client state is a slice-owned cache, and the mutating slice invalidates it.
[WEB-12][review]app profile · webDrive a web slice's behavior test through the real surface: no internals, no snapshots, no mocking its capability call.