Skip to content

Development

Tool Needed for
Docker (Docker Desktop, OrbStack, Colima, Linux Docker Engine; Podman with caveats, see below) everything: PostgreSQL, Testcontainers, the SDK container
.NET 10 SDK on the host aspire run and the Aspire E2E test (ADR-0008). Build, tests and the dev-container flow work without it, through the SDK container
Aspire CLI 13.5 or later: dotnet tool install -g Aspire.Cli aspire run / aspire publish. A separate install from the SDK; the AppHost is on Aspire 13.6, and aspire --version shows what you have. Without it, dotnet run --project tools/Trellis.AppHost starts the same app
PowerShell (pwsh) installing the Playwright browsers for the optional UI tests

./scripts/doctor.sh checks this machine against the table, PowerShell aside, and changes nothing: the SDK on PATH against global.json (its version and rollForward band), Docker and the SDK image ./scripts/dotnet.sh runs, the Aspire CLI, the development certificate, the AppHost's ports in tools/Trellis.AppHost/Properties/launchSettings.json, the engine endpoint the tests get (DOCKER_HOST and the Testcontainers overrides, below), git, and jq where a script needs it. Each check is one line, ok, missing (with the fix, and optional when a first run does without it) or skip, and the script exits 1 only when something a first run needs is missing. ./scripts/doctor.sh --self-test runs every check against fakes, as CI does.

No .NET SDK on the host? Build the SDK image once (base SDK + docker CLI, needed by Testcontainers/Aspire) and run every command through ./scripts/dotnet.sh:

Terminal window
docker build -t trellis-sdk:10.0 scripts/sdk-image

IDE: open in the dev container (no host SDK)

Section titled “IDE: open in the dev container (no host SDK)”

Without a .NET SDK on the host an IDE cannot resolve types locally. .devcontainer/devcontainer.json fixes that by running the IDE backend inside the same SDK image the scripts use. With a host SDK you can skip this section and open the solution directly.

Rider: open the solution → Rider detects .devcontainer and offers "Reopen in Dev Container" (or use File → Remote Development → Dev Containers). VS Code: Dev Containers: Reopen in Container.

You then get full IntelliSense, build, debug, and test in the IDE, while nothing is installed on the host. The container mounts the Docker socket, so Testcontainers integration tests and the Aspire orchestrator work from inside it too, and it shares the trellis-nuget package volume with ./scripts/dotnet.sh (same /workspace path, so build output stays valid across both).

Without the dev container the IDE will show unresolved-type errors for the whole BCL. That is expected on a host with no SDK — it is not a problem with the code.

Terminal window
./scripts/dotnet.sh build Trellis.slnx # build
./scripts/dotnet.sh test Trellis.slnx # all tests (Aspire E2E skips unless RUN_ASPIRE_E2E=1)
./scripts/dotnet.sh format Trellis.slnx # apply formatting
./scripts/ef.sh migrations add <Name> --project src/Infrastructure/Trellis.Persistence

The SDK container starts the Testcontainers PostgreSQL as a sibling container through the engine's socket, then reaches its published port via host.docker.internal. Docker Desktop resolves that name by itself; everywhere else scripts/dotnet.sh, scripts/ef.sh and the dev container map it to the host gateway (--add-host=host.docker.internal:host-gateway). scripts/dotnet.sh picks the socket to mount like this:

Setup What to set
Docker Desktop, OrbStack, Linux Docker Engine nothing: /var/run/docker.sock
Colima (macOS) nothing, with or without DOCKER_HOST: on macOS the engine runs in a VM and resolves mount sources there, so the script always mounts the VM's /var/run/docker.sock
Rootless Docker (Linux) DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock, which the rootless setup tells you to set anyway; the script mounts that path
Podman 5+ (Linux) DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sock (after systemctl --user enable --now podman.socket); the docker CLI then drives Podman, or set DOCKER_BIN=podman. Rootless Podman also needs TESTCONTAINERS_RYUK_DISABLED=true, as Testcontainers recommends
Podman machine (macOS) a rootful machine (podman machine set --rootful), its API socket in DOCKER_HOST (or DOCKER_BIN=podman), and TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=/run/podman/podman.sock, the socket's path inside the VM
A TCP endpoint (DOCKER_HOST=tcp://…) nothing: the script passes DOCKER_HOST through and mounts no socket. The address must be reachable from inside a container, so not 127.0.0.1

TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE is the socket path as the engine sees it. When set it overrides all of the above: the script mounts it and hands it to Testcontainers for its resource reaper. Every other TESTCONTAINERS_* variable in your shell is forwarded into the container, so the Testcontainers recipes apply unchanged. The dev container mounts /var/run/docker.sock; for rootless Docker or Podman, change the source= of that mount in .devcontainer/devcontainer.json to your socket. This repository's own runs exercise two of these paths: Docker Desktop, and Linux Docker Engine in the sdk-container CI job (scripts/dotnet.sh on ubuntu-latest). The others follow the engines' and Testcontainers' documentation.

Authentication:SigningKey gates API startup — missing or under 32 characters and the API refuses to boot. appsettings.Development.json ships a dev-only key so F5 works out of the box; to use your own, set a user secret (the API csproj has a UserSecretsId):

Terminal window
dotnet user-secrets set "Authentication:SigningKey" "<random 32+ chars>" \
--project src/Presentation/Api/Trellis.Api

Under aspire run the API's e-mail goes to Mailpit, a local mail catcher the AppHost starts in run mode only (below). Run any other way, it is logged, not sent, until you point the API at an SMTP relay the same way (port 587 with STARTTLS is the default; leave out the last two lines for a relay without authentication):

Terminal window
api=src/Presentation/Api/Trellis.Api
dotnet user-secrets set "Email:Provider" "Smtp" --project $api
dotnet user-secrets set "Email:Smtp:Host" "smtp.example.com" --project $api
dotnet user-secrets set "Email:Smtp:FromAddress" "billing@example.com" --project $api
dotnet user-secrets set "Email:Smtp:UserName" "<relay user>" --project $api
dotnet user-secrets set "Email:Smtp:Password" "<relay password>" --project $api

To see the mail without a relay, start the app with aspire run: the AppHost starts Mailpit and points the API's Email section at it (Smtp, its SMTP endpoint, UseStartTls off, no credentials, billing@example.com as the sender), and every message, the receipt of a paid invoice among them, appears behind the mailpit resource's Inbox link in the dashboard. The AppHost's settings reach the API as environment variables, which outrank user secrets, so a relay configured as above is used only when the API runs from its own launch profile. Without the AppHost (the dev container flow), run the catcher yourself (docker run --rm -p 1025:1025 -p 8025:8025 axllent/mailpit) and set Email:Smtp:Host to localhost (host.docker.internal from the dev container), Email:Smtp:Port to 1025 and Email:Smtp:UseStartTls to false, with no credentials; messages appear at http://localhost:8025.

Run these where the app runs (dev container or local SDK) — user secrets live under that environment's home directory, so setting them through the ephemeral ./scripts/dotnet.sh container does not persist. Never commit a real key; production takes it from the environment/secret store (see deployment.md).

Seeded admin for every option below: admin@example.com / Admin123!.

From the IDE, in the dev container (no local SDK)

Section titled “From the IDE, in the dev container (no local SDK)”

aspire run cannot drive the app from inside a container — the orchestrator would run the projects in the container while starting PostgreSQL as a sibling on the host, and the two cannot reach each other (ADR-0008). Run the dependencies with Compose and the projects from the IDE:

Terminal window
docker compose up -d # PostgreSQL on host port 5433

Then in Rider/VS Code, using the http (dev container) launch profiles — they point at host.docker.internal:5433, because inside the dev container localhost is the container itself:

  1. Run Trellis.MigrationService (profile migrate (dev container)) once — applies migrations and seeds.
  2. Run Trellis.Api (profile http (dev container)) → http://localhost:5171, which opens Scalar (/scalar/v1).
  3. Run Trellis.UI.Web (profile http (dev container)) → http://localhost:5170.

Any run configuration works, because devcontainer.json sets ASPNETCORE_ENVIRONMENT and the connection string via containerEnv — every process in the container inherits them. That matters because Rider generates two configurations per project and they look almost identical:

Configuration Type Port
Trellis.Api: http (dev container) .NET Launch Settings Profile 5171 (5170 for the UI)
Trellis.Api .NET Project — ignores launchSettings.json entirely 8080 (the SDK image default)

The bare one runs the built binary with no arguments and none of the profile's environment, so before the containerEnv fix it died with Connection string 'trellis-db' is not configured. Prefer the profile configurations: only they give the API and the UI distinct ports.

Ports reach the host browser because Rider forwards them (the client binds 127.0.0.1:<port>) — it forwards what forwardPorts declares, which is why 8080 is listed too. Never add appPort: docker -p would bind the same host ports and collide with that forwarder.

Two gotchas worth knowing. The connection string is also passed as a command-line argument in the profiles, because the env form ConnectionStrings__trellis-db contains a dash — not a valid POSIX shell identifier — so sh-wrapped launchers silently drop it. And appsettings.Development.json points at host.docker.internal, with the host http/https profiles overriding back to localhost.

Port 5433, not 5432: a native PostgreSQL install commonly owns 5432, and the clash fails confusingly — it connects, then rejects the password. Override with POSTGRES_PORT and match it in the launch profile. The cache for --use-redis, Valkey, is behind a profile: docker compose --profile redis up -d.

Terminal window
aspire run # needs the Aspire CLI (Prerequisites)
dotnet run --project tools/Trellis.AppHost # the same app, no CLI needed

PostgreSQL, the migration worker, the API, the Blazor web app, and the Aspire dashboard, all wired together (with --use-redis, the Valkey cache too), plus pgAdmin as a dashboard tile that opens without a login and Mailpit, which catches the API's e-mail (its Inbox link opens it; see Secrets); open the dashboard URL either command prints. This is the best loop when a host SDK is available. The Aspire CLI reads the AppHost path from the committed aspire.config.json (appHost.path), the project settings file it would otherwise create on first use.

PostgreSQL runs in a persistent container that keeps running after the app stops, so the next start finds it ready; its data lives in a named volume. For a fresh database, stop the app and remove both: docker rm -f the postgres-… container and docker volume rm the …-postgres-data volume (docker ps -a and docker volume ls show their names).

From Rider or Visual Studio, run the Trellis.AppHost project. Visual Studio makes it the startup project when it first opens the solution (DefaultStartup="true" in Trellis.slnx; a startup project you choose later is remembered instead); in Rider, pick it in the run configurations yourself. Its Properties/launchSettings.json has an https profile (the dashboard at https://localhost:17171) and an http profile (http://localhost:15171, no certificate involved); the ports are picked free when the solution is created, so this document names yours. The IDE's Aspire run configuration needs one of them; without a launch profile it refuses to start, while dotnet run and aspire run fall back to a dynamic dashboard URL. The https profile wants a trusted development certificate: run dotnet dev-certs https --trust once (macOS and Windows prompt for confirmation), or use http. The AppHost's own profile is the only one Aspire reads: the API, web and migration projects run with ExcludeLaunchProfile = true and get their endpoints and connection string from Aspire (the comment in tools/Trellis.AppHost/Program.cs says why). The AppHost reads its appsettings.json from the project folder; it only sets log levels, so the dashboard's request logs stay out of the console.

On the first start against an empty database the migrations resource logs one red EF Core line, Failed executing DbCommand … SELECT "MigrationId", "ProductVersion" FROM "__EFMigrationsHistory", and PostgreSQL logs relation "__EFMigrationsHistory" does not exist. EF Core probes the history table by querying it, then creates it and applies the migrations; the resource still exits with code 0 and the API starts, because the API waits for exactly that. A real migration failure leaves the API waiting, with the exception in the migrations console log.

See the run-app skill — Postgres + migration worker + API (+ web) as sibling containers on one network.

Generate with --use-multitenancy to add the tenant seam: ITenantContext, resolved from the tenant claim only — minted at login from the user's persisted membership (AspNetUsers.TenantId); there is no tenant header, and a token without the claim is rejected. Every aggregate root automatically gets a TenantId shadow column stamped by TenantInterceptor and a named "Tenant" EF query filter (opt out with IgnoreQueryFilters(["Tenant"])), and each unique index it declares is unique per tenant: TenantId leads it, under the name it had. The seeded admin and the demo data are in tenant default (Seed__TenantId); a self-registered user gets a fresh tenant. See ADR-0019 and ADR-0022.

Because this adds a column, regenerate the initial migration in the generated project:

Terminal window
env -u TRELLIS_DESIGNTIME_DB ./scripts/ef.sh migrations remove --force --project src/Infrastructure/Trellis.Persistence
./scripts/ef.sh migrations add InitialCreate --project src/Infrastructure/Trellis.Persistence

--force because migrations remove otherwise asks a database whether the migration was applied and stops when none answers. With it, the command reverts the migration on the database the design-time connection reaches, when that database applied it (InitialCreate's Down drops every table), then removes the files; when no database answers, it warns that it could not check and removes the files. env -u TRELLIS_DESIGNTIME_DB makes sure none answers: scripts/ef.sh forwards that variable into the SDK container, where the design-time factory's localhost default is the container itself. Use it only on a migration no database you keep has applied.

Generate with --include-ui-tests to add tests/Trellis.UiTests (Playwright). The project always builds, but the browser tests are opt-in at run time — they need real browsers and a running app at a known address. UI_TESTS_BASE_URL names it (default https://localhost:7170, the web host's https launch profile). aspire run gives the web host a port of its own choosing, so either copy the web URL from the dashboard into UI_TESTS_BASE_URL, or run the projects from their launch profiles (migration job, then the API's and the web host's https profiles) so the default fits:

Terminal window
dotnet build tests/Trellis.UiTests # creates playwright.ps1
pwsh artifacts/bin/Trellis.UiTests/debug/playwright.ps1 install chromium # once
RUN_UI_TESTS=1 UI_TESTS_BASE_URL=http://localhost:5170 dotnet test tests/Trellis.UiTests # the http profile

Without RUN_UI_TESTS=1 they skip, so the normal suite stays fast and browser-free (the same opt-in pattern as the Aspire E2E test).

This section has a page of its own on the site: Testing. What each test project proves about which layer, what it needs to run, and when a test of yours belongs in it.

  • RSLT001: This Result is discarded (a warning in Debug, an error in Release and CI). A statement computed a Result, a Result<T> or an ASP.NET Core Identity IdentityResult and dropped it (ADR-0030): invoice.Issue(now); before return Result.Success(); commits a transition the aggregate refused, and await handler.Handle(command, ct); in a test never checks the outcome. In this order: use it (return it, Bind or Map it into the method's own result, or branch on IsFailure); in a test, assert it ((await handler.Handle(command, ct)).ShouldBeSuccess(), or result.Error.ShouldBe(...) for an expected failure; an Identity call in a fixture goes through IdentitySeed.EnsureSucceeded); drop it on purpose only when nothing can act on it, as _ = …; with a one-line comment saying why. Never a #pragma or a severity line in .editorconfig. The same applies to a dropped Error (a forgotten return), the UI's ApiResult<T> in a .razor @code block, and an array or tuple of results (await Task.WhenAll(...) over handlers).
  • RSLT001: This Task<Result> is converted to Task, which drops its result. A member, lambda, variable or argument typed Task was handed a Task<Result>: public Task Handle(…) => port.PushAsync(…); finishes "successfully" when the push failed. Keep the Task<Result> (change the return type), or make the method async, await the call and act on the Result (an outbox handler throws on a failure it wants retried).
  • CS9057 naming the analyzer ("references version … of the compiler, which is newer than the currently running version"): the compiler is older than the Roslyn tools/Trellis.Analyzers references. Build with the SDK global.json names (dotnet --version from the repository root shows which one runs); an IDE that hosts an older Roslyn only loses the squiggle, while the command-line build still enforces the rule. Bumping the SDK below says how far the pin may move.

Every problem response carries traceId and code. Start from the traceId, not the correlationId, which may be a value the caller chose: in the Aspire dashboard (or your OTLP backend) it finds the request's trace, the use-case span with trellis.usecase.outcome, trellis.usecase.error_code and trellis.usecase.error_type, and the outcome line logged inside it (events 1001–1006, docs/deployment.md has the telemetry reference). A report without a traceId ("it failed for me this morning") starts from the user's id instead: a signed-in caller's lines carry it in the CallerUserId scope and their request spans as enduser.id. Then let the code name the stage that refused the request (the stage table is in architecture.md):

code Refused by
Http.* the host, before any endpoint: an unknown route, a wrong method, the 30 s request timeout
Request.* binding: unreadable JSON, a value of the wrong type or a string holding U+0000 (errors[] names the field), a body too large or not JSON
Auth.Unauthenticated, Auth.Forbidden, RateLimit.Exceeded authentication, authorization, rate limiting; the other Auth.* codes are the Auth use cases' own
Idempotency.* the idempotency filter; Idempotency.Duplicate also comes from the commit, when two first requests raced
Validation.General a validator, or a value object the handler attributed with AtField: each errors[] entry's own code says which (Validation.NotEmpty against EmailAddress.Invalid)
Concurrency.Conflict the commit: someone else changed the aggregate since it was loaded
Invoice.*, Money.*, EmailAddress.*, any feature's area the handler and the aggregate: the feature doc's code list says what each means

Four failures do not explain themselves:

  • Server.Failure (500). The body is opaque on purpose (ADR-0024). Under the same traceId look for the Error line Use case … threw (event 1006) with the exception; without one, the fault happened outside a use case (binding, a filter, work after the commit) and the exception handler logged it.
  • The migration job exits 1. It logs why: a Seed value refused at boot, the default admin password outside Development, or a scoped service it cannot build, such as a new port with no system stand-in for a host without a request (deployment.md, and the MigrationService rules in .claude/rules/tools.md).
  • A retry keeps answering 409 Idempotency.InFlight. The first request committed and the process died before it stored the response; the command did apply. Read the resource, or see Idempotency keys for when the key frees itself.
  • A reaction has not happened (no receipt, no metric). The event waits in OutboxMessages: in back-off after a failure (Attempts, Error), leased by a processor, or dead-lettered; Outbox operations reads the row and re-drives it.

Restore audits the whole package graph, transitive packages included, against the GitHub Advisory Database (NuGetAudit, NuGetAuditMode all, NuGetAuditLevel low in Directory.Build.props). An advisory surfaces as warning NU1901–NU1904 (low to critical), which Release and CI builds treat as an error, so an advisory published overnight can turn a green main red with no code change. That is the point; respond in this order:

  1. Find the path. The warning names the package and links the advisory; dotnet nuget why Trellis.slnx <package> shows which reference pulls it in.
  2. Upgrade the direct reference in Directory.Packages.props when a newer version of it (or of the package that depends on the vulnerable one) brings the fix.
  3. Pin the transitive package otherwise: a <PackageVersion Include="<package>" Version="<patched>" /> in Directory.Packages.props with a comment naming the advisory (the Microsoft.OpenApi entry is the worked example). CentralPackageTransitivePinningEnabled applies the pin to the transitive reference; delete it once the parent package depends on a fixed version itself.
  4. Suppress only when no fixed version exists, or the vulnerable code provably cannot be reached: <NuGetAuditSuppress Include="https://github.com/advisories/GHSA-xxxx-xxxx-xxxx" /> in an ItemGroup of Directory.Build.props, with a comment saying why it does not apply here and when to look again. One advisory per entry, never a whole package.
  5. Raise the level (NuGetAuditLevel to moderate) only as a recorded decision (an ADR) for a project that reviews low-severity advisories on a schedule rather than on the build that finds them; keep NuGetAuditMode all. The template's own CI stays at low + all.

NU1900 is different: the advisory data could not be downloaded (offline, feed outage). It is not an advisory; retry once the feed is reachable.

global.json pins the SDK with rollForward: latestFeature, and Dependabot proposes its feature-band and patch updates (a new major version is a migration, not a bump). With a bump:

  • CI installs exactly the version in global.json (.github/actions/setup-dotnet reads it and installs that one from the release feed, so a release Microsoft is still publishing cannot fail a build); a contributor needs that version or a later feature band of the same major.
  • The SDK image (scripts/sdk-image/Dockerfile, pinned by digest and moved by Dependabot's docker updates) must carry an SDK that global.json accepts, or ./scripts/dotnet.sh cannot build.
  • Microsoft.CodeAnalysis.CSharp in Directory.Packages.props may be raised up to the new compiler's version, never above (ADR-0030): the analyzer project references it, and a compiler older than the referenced version cannot load the analyzer. dotnet <dotnet root>/sdk/<version>/Roslyn/bincore/csc.dll -version prints the compiler's version. Raising it is optional.

A new .NET major moves more than the SDK: the target framework, the SDK image's tag, and every package numbered after .NET (Microsoft.AspNetCore.*, Microsoft.EntityFrameworkCore*, Microsoft.Extensions.*, the Npgsql EF Core provider, dotnet-ef, Asp.Versioning.Http, Serilog.AspNetCore). Dependabot proposes none of those majors (.github/dependabot.yml ignores them, as it ignores the SDK's), so the move is one change you make on purpose; their patches and minors keep arriving before and after it.

Claude Code runs the scripts in .claude/hooks/ around an agent's tool calls: .claude/settings.json wires them, docs/INDEX.md lists them. Each backs a rule AGENTS.md already states, and none is the only guard. They are rungs of the ladder ADR-0014 describes: a soft reminder, an ask before an edit the conventions reserve to a generator or to someone's judgement, the AGENTS.md instruction, and the CI check, which is the only guarantee.

Hook Runs on Decides
guard-edits.sh PreToolUse, Edit and Write asks before an edit under src/Infrastructure/*.Persistence/Migrations/ or of docs/api/openapi.v1.json (the reason names the command that regenerates it), a new .csproj, an edit that adds a package to Directory.Packages.props or a .csproj, and an edit that adds a <Project> to the .slnx; a version bump, a moved project and every other file pass without a prompt
guard-commit.sh PreToolUse, Bash for a git commit: denies it when gitleaks is installed and finds a secret in the staged changes of the checkout the commit happens in; asks when the -m subject is not type(scope): subject (AGENTS.md, Commits); when gitleaks fails without a finding, the commit goes on and a message tells you the changes were not scanned
stop-tests.sh Stop blocks the agent's stop once when the session changed a .cs or .razor file under src/ or tools/ and ran no dotnet test, asking for the run or a line saying why none is needed
docs-drift.sh PostToolUse, Edit and Write reminds (context for the agent, never a block) when code changed without the doc that describes it, once per session for a given report

An ask puts the reason in front of you, and you allow or refuse the call. The hooks follow Claude into a worktree: the edit and commit hooks and the docs-drift reminder work in the git checkout that holds the session's current folder, not only in the folder the session started in. What the hooks do not see: guard-commit.sh reads the command before it runs, so git add … && git commit is scanned as staged before the add, a message from a file (-F), an editor or --amend without -m is not checked, and a git commit only quoted or echoed (grep "git commit -m") is not a commit; stop-tests.sh counts a test run anywhere in the session, the subagents' transcripts included, and only a Bash command that starts dotnet test or ./scripts/dotnet.sh test is a run (a quoted mention, as in grep -rn "dotnet test" docs/, is not). ./scripts/check-hooks.sh is their self-test: it feeds each hook the JSON Claude Code sends for every decision above, and for the silence next to each, checks that every command in .claude/settings.json starts from a project path with a space, and fails on any other answer. CI runs it on every push.

The hooks are Bash scripts. On Windows they need Git for Windows, whose Git Bash Claude Code runs them with; without it, the two PreToolUse hooks fail, and "onFailure": "continue" in .claude/settings.json lets the edit or the command go ahead rather than blocking it.

To add a hook, or a decision to one:

  1. A case in the hook that owns the event and the tool, or a new script beside them that sources common.sh (read_input, json_string, decide, json_escape) and exits 0 with no output whenever it is unsure. No jq, only POSIX awk, sed and grep, so it runs on macOS, Linux and Git Bash.
  2. A row in scripts/check-hooks.sh for the decision, and one for the nearby edit that must stay silent.
  3. A line in docs/INDEX.md (Hooks) with its event and decision and, for a new script, its entry in .claude/settings.json, the placeholder quoted ("\"${CLAUDE_PROJECT_DIR}\"/.claude/hooks/<name>.sh"). scripts/check-adr-links.sh fails when the INDEX line is missing or when settings.json names a script that does not exist; nothing checks that a new script is wired, so read settings.json back.

In the template's repository a new script also joins the +x list of the "make scripts executable" post-action in .template.config/template.json; without it a generated project gets the script without its executable bit, which Template CI's generated hook self-test reports.

To turn the hooks off for yourself, set "disableAllHooks": true in .claude/settings.local.json (git-ignored, so only your sessions change). A team that squash-merges commits each pull request's title, which no hook sees; a three-line step in a ci.yml job that runs on pull_request checks it:

- name: Pull request title
env: { TITLE: "${{ github.event.pull_request.title }}" }
run: printf '%s\n' "$TITLE" | grep -Eq '^(feat|fix|docs|test|refactor|perf|build|ci|chore|style|revert)(\([a-z0-9][a-z0-9./-]*\))?!?:[ ][^[:space:]]'

Layer rules live in .claude/rules/ (they also guide AI agents). The short version: dependencies point inward, failures are Results not exceptions, migrations are generated not hand-edited, and no commercially-licensed packages (see the ceilings in Directory.Packages.props).

The documentation of Trellis.Templates 0.2.0 · release notes