Repository navigation
Releases
v0.2.0
A minor release. The Blazor UI gets a design system with a light and a dark theme and a switch between
them. The repository an agent works in gains three reviewers, hooks that ask before the edits your
conventions reserve, and skills for finishing a change and for upgrading. The --use-redis cache is
Valkey, and e-mail goes out through MailKit. Before this release a cold agent was given a freshly
generated project and one feature to build; every place the template misled it or let a defect through
is fixed here.
Installing this version changes no project you generated earlier: docs/upgrading.md in your project
says how to take what you want from it. Read Security first: one entry changes the unique indexes of
a project with --use-multitenancy, one how a NUL character in a request is answered, and one moves
Aspire past an advisory that fails every build.
Added
- The UI has a design system (
docs/design-system.md, ADR-0032; with--include-ui). The values
live inwwwroot/tokens.css, every colour once as alight-dark()pair in two themes, with the type
scale, the spacing, the radii and the focus ring as tokens;app.cssholds the components and writes
no colour;DesignSystemTestsproves the contrast of every text on its ground in both schemes, that
only the token file writes a colour, and that the doc and the files name the same tokens and classes.
The starting palette is a green ink and accent on near-white, a lime accent on near-black. Two tokens
were renamed for anyone who customised 0.1.x:--fgis--inkand--borderis--line
(docs/upgrading.md, step 7). - The pages are built from the design system's components (with
--include-ui). The invoice
list's status is a pill (Paid a success, Voided a danger, Draft and Issued neutral, the word always
shown), as is the status on the invoice page; the pager's buttons are secondary buttons; one label
strip styles the filter row's label and the table headers. On a phone the tables read as blocks,
each cell led by its header: a table cell carriesdata-thwith its header's text. A link without a
class of its own (a table row's link, the sign-in pages' links) is accent text like the shell's,
where it took the browser's default colour before. Two classes were renamed:.noticeis
.callout successand.error-panelis.callout danger(docs/upgrading.md, step 7).
docs/design-system.mdnames the new components (.label,.secondary,.pilland its variants,
.calloutand its variants). - A theme switch the user keeps (with
--include-ui). The top bar ends with a System, Light and
Dark select, there signed out too: Light or Dark is kept in the browser (localStorage, keytheme)
and written asdata-themeon<html>, which holds that theme over the operating system's; System
lets it go.UI.Common/wwwroot/theme.jssets the attribute from the web host's<head>before the
first paint, so a kept Dark never flashes light, and is a file because the host's
Content-Security-Policy runs no inline script;Layout/ThemeToggle.razorreads and writes it through
IJSRuntime, never during a render. Aselectnow looks like aninput.docs/design-system.md
names the component (.theme,.theme-select) and says how to remove it; a browser flow in the
optionalUiTestsproject proves the choice survives a reload and a link out of the error page and
wins over a light system, and that a host without the script keeps working. - Screenshots at 400 and 1280 px in both themes, kept by CI (with
--include-ui-tests).
DesignSystemProofTestsin the optionalUiTestsproject opens every page (sign-in, create account,
the invoice list and its Overdue filter, a new invoice, an invoice) at both widths in light and dark,
saves a full-page screenshot of each and fails a page that scrolls sideways; one more screenshot has
Dark chosen in the switch over a light system, and one test tabs from the top of the page to the first
top-bar link and checks it shows the system's focus ring, not the browser's own. The screenshots go to
UI_TESTS_SCREENSHOTS(by defaultTestResults/screenshotsunder the test run's working directory),
and theui-testsjob inci.ymluploads them as theui-screenshotsartifact, kept 14 days, passed
or failed. Nothing compares them with a baseline: fonts render differently per machine, so a reviewer
looks (docs/design-system.md, Proof). The browser tests sign in through one helper,
Session.SignInAsAdminAsync, and the proof's protected pages share one signed-in page: the API allows
ten sign-ins a minute from the web host. - The design tokens export as JSON for a design tool or a published design-system page:
./scripts/export-design-tokens.sh [-o tokens.json]writes one object per token intokens.css, in
its order, with its value (a colour as its light and dark pair) and its usage, the token's Role in
docs/design-system.md(Mocks and the export). It needs onlyshandawk, and
DesignSystemTestsruns it and holds every name, value and usage to the token file and the doc. A
project generated with--include-ui falsegets the script too; it says there is nothing to export. - A
ui-reviewersubagent (.claude/agents/, with--include-ui) reads a change to a page, a
layout or a stylesheet against the design system, the UI rules and accessibility, in a browser through
the Playwright MCP when one is running, and reports;.claude/rules/ui.mdasks for it before a UI
change is finished and its accessibility rule now names the page title, the singleh1and colour as
never the only signal; theadd-featureandremove-featureskills name the design system's
components and tests in their UI steps. - Two more reviewers, and every reviewer says what it owns.
test-reviewerreads a change's tests
against.claude/rules/tests.md(the tier, a bug fix's test shown to fail without the fix for the
expected reason,ShouldBeSuccess(), the factories and drivers, time without sleeping, the fixtures,
the narrowed run), andsecurity-reviewerreads a change to authentication, identity, hardening, the
Auth feature or who may call an endpoint againstdocs/threat-model.md. Every reviewer in
.claude/agents/now opens with Owns, Out of scope and Overlap lines, so a change read by
several gets each point once, andAGENTS.mdsays which reviewer a change needs.docs/INDEX.md
gains sections for the reviewers, the hooks and the MCP servers (when to reach for Microsoft Learn,
Context7 and Playwright, and the optionaldotnet/skillsplugins, none enabled);
scripts/check-adr-links.shfails when a reviewer, a hook or a feature doc is missing from it, or
when.claude/settings.jsonruns a hook that does not exist.architecture-guard's dependency
flow now matchesAGENTS.md, and ADR-0014 records all of this in an amendment. - Claude Code asks before the edits your conventions reserve, and commits in style. Three new hooks
in.claude/hooks/:guard-edits.shasks you before an agent hand-edits a migration or
docs/api/openapi.v1.json(the prompt names the command that regenerates it), creates a project or
adds a package, and stays silent for a version bump;guard-commit.shasks when agit commit -m
subject is nottype(scope): subjectand, when gitleaks is installed, refuses a commit whose staged
changes hold a secret;stop-tests.shstops the agent once when it changed code undersrc/or
tools/and ran no test (a subagent's edits and test runs count). The hooks work in the checkout
Claude is in, a worktree included, and from a project path with a space, and a failed hook never
blocks an edit or a command. The docs-drift reminder now speaks once per session for a given report.
AGENTS.mdgains a Commits line (a generated project had no commit convention before) and names
the hook behind each boundary it backs;docs/development.mdgains Agent hooks (what each decides,
how to add one, how to turn them off);scripts/check-hooks.shtests every decision, and CI runs it. - Finishing a change, upgrading the template, and a red build from a package. The
finish-change
skill runs the gates CI runs, in its order (format, the Release build, the tests narrowed then whole,
the OpenAPI snapshot, the docs-drift and link checks), asks for the CHANGELOG line and the reviewers
the change needs, and commits or opens the pull request from.github/PULL_REQUEST_TEMPLATE.mdonly
when asked (/finish-change commit,/finish-change pr)./upgrade-template <version>walks through
docs/upgrading.mdand never starts on its own: the marker, the changelog between the versions, the
target regenerated with the same name and options, take, merge or keep, the schema, the marker last.
.claude/rules/dependencies.mdloads with the package and SDK files: asking before a package, the
license ceilings, central versions and Dependabot groups, the order to answer a NuGetAudit advisory,
and an SDK bump.add-featurepoints at Protecting an endpoint for who may call an endpoint.
docs/upgrading.mdinstalls the template as<package>@<version>, the separator current SDKs expect,
and tells the files you never touched by regenerating the version you started from and diffing it
against your tree: a diff against the target alone cannot tell your edit from the template's. - A check of your machine before the first run, and the running app for an agent to read.
./scripts/doctor.shprints one line per prerequisite,ok,missingwith the fix, orskip: a
.NET SDK onPATHthatglobal.jsonaccepts (or that./scripts/dotnet.shbuilds and tests without
one), Docker and the SDK image, the Aspire CLI, the development certificate, the AppHost's ports, the
engine endpoint the Testcontainers tests get, git, an...
v0.1.1
A patch: the documentation corrections and the two fixes that followed the first release.
- CI installs exactly the SDK
global.jsonnames. The workflows call.github/actions/setup-dotnet,
which reads the version and installs that one from the release feed. Before,setup-dotnethonoured
rollForwardby installing the channel's newest release through aka.ms links, and a release Microsoft
is still publishing answers 409 there: every job failed for hours on the day SDK 10.0.403 appeared.
global.jsonstill decides what a build accepts (latestFeature). - The request line is logged line-safe. The malformed-request (400/413/415), unhandled-exception (500)
and idempotency-residue log lines take the method and the path throughLogSafeRequestLine, which
replaces a line break with a space. On Kestrel nothing changes (a method is token characters only, the
path is logged escaped); the point is CodeQL, which recognises the replacement as a sanitiser: the
codeql.ymla generated project ships with no longer opens sixcs/log-forgingalerts on day one. - The docs read right on the website and on GitHub. The Architecture page's dependency diagram says
"Infrastructure and Persistence" in words (the ∥ sign has no monospace glyph) and its Persistence corner
meets the line it was drawn to; the Invoices state diagram is laid out top to bottom, so it fits a
1280 px screen without scrolling; the Invoices file tree keeps every comment within 80 columns. The
website also gained a light theme built to the dark one's construction, wide reference tables that read
as blocks, joined lines in box-drawing diagrams, and short headings with the folder path beneath them. - Dependencies: .NET SDK 10.0.402 in
global.json(the CI image carries 10.0.403);Meziantou.Analyzer
3.0.311.
v0.1.0
The first release.
- The shipped
InitialCreatewas regenerated.InvoiceLines.Amountisnumeric(18,3)(was
numeric(18,2)), and the outbox'sNextAttemptAtUtcis now a concurrency token (a snapshot-only
change, no DDL). A deployed database needs a new migration on top for the column, never the
regenerated one. Result.Erroris nullable andIsSuccess/IsFailurecarry[MemberNotNullWhen]: code that
readsresult.Error.Codewithout checkingIsFailureno longer compiles (it used to answer a 500
with an empty code). Guard the read.- The decorator pipeline order changed to Tracing → Logging → Validation → UnitOfWork → handler.
A decorator of your own registered by position should be re-checked. - New error codes clients may branch on: 400
Auth.RegistrationRejected; 409
Invoice.AlreadyIssuedsplit offInvoice.AlreadyFinalized;Money.AmountTooLarge,
EmailAddress.TooLong,Invoice.CustomerNameTooLongandInvoice.LineDescriptionTooLong(all 400).
A registration race now answers 409Auth.EmailAlreadyInUseinstead of 500. - Dashboards: the use-case span attributes are
trellis.usecase.outcome,
trellis.usecase.error_codeandtrellis.usecase.error_type, and the outcome log line changed
shape (see Changed). POST /invoicesrequires anIdempotency-Key(400Idempotency.KeyRequiredwithout one); the
writes to an existing invoice still accept it optionally. A repeated header or a comma-separated list
is 400Idempotency.InvalidKeyinstead of being joined into one key the caller never sent.- Two new
ErrorTypes change statuses.ExchangeRate.Unavailableis a 503 (was 500) and a
refusal by the provider is the new 500ExchangeRate.Rejected; a staleIf-Matchon an invoice
write is 412Invoice.VersionMismatch. A client that branched on 500 for the outage should
branch on 503, and a decorator or classifier of your own that switches overErrorTypehas two more
values,UnavailableandPreconditionFailed. On the outcome line a 412 is Information like the other
expected failures andUnavailableis a Warning, so an alert on Warning still means a dependency is down. - A Release build fails on a discarded
Result(RSLT001, from the new analyzer project
tools/Trellis.AnalyzersthatDirectory.Build.propsloads into every project, the tests included): a
droppedinvoice.Issue(…)orResult.Combine(…), an awaitedhandler.Handle(…), a forgottenreturn
beforeInvoiceErrors.X, an uncheckedIdentityResultor UIApiResult<T>(in.razorfiles too), an
await Task.WhenAll(…)over handlers, and aTask<Result>returned as a plainTask
(public Task Handle(…) => port.PushAsync(…)in an event handler) are errors. Handle it or write
_ = …with a reason; in a test, end the step inShouldBeSuccess()(see Added). Adopting this
version adds that project to your solution and two pinned build-only packages. GET /invoices/{id}emits a strong ETag ("42", wasW/"42");If-None-Matchstill compares
weakly, so a stored tag keeps answering 304.- The audit columns hold the user id.
CreatedByandModifiedByare stamped with the acting
user's id instead of their e-mail; the migration job still writessystem. There is no migration:
rows written before keep the e-mail they were stamped with, so a report that matched the columns
against an address has to handle both, and an erasure request still finds the old rows by e-mail. - Log filters on the outcome line's category change. Each use case now logs under its own
command or query type (Trellis.Application.Features.Invoices.ListInvoices.ListInvoicesQuery)
instead ofTrellis.SharedKernel.Decorators.LoggingDecorators.CommandHandler/.QueryHandler. A
Logging:LogLevelorSerilog:MinimumLevel:Overrideentry, or a log query, that named the decorator
category no longer matches: key it on a feature's namespace, or match the event ids 1001–1099.
Added
- SMTP e-mail (
Email:Provider=Smtp; idea from
amantinband/clean-architecture): a sender on
the BCLSmtpClient, configured by anEmail:Smtpsection (Host,Port587,UseStartTlson,
FromAddress, andUserName/Passwordtogether or not at all) that is validated at boot only
while selected (port 465 and credentials without STARTTLS are refused). A failed send is thrown so
the outbox retries it (delivery is at least once). Events 1205EmailSent(masked recipient) and
1206EmailSmtpInClear(a Warning whenUseStartTlsis off outside Development).
docs/development.mdhas the user-secrets commands and a Mailpit recipe; implicit TLS on 465 and
OAuth2 are not supported. - A "Try it" walkthrough (idea from amantinband/clean-architecture):
src/Presentation/Api/Trellis.Api/Trellis.Api.httpwalks the invoice lifecycle in twelve requests
(sign in, create with anIdempotency-Key, add a line, issue, conditional GET and 304, pay, a second
issue with the ETag from before the payment answered 412, the idempotent replay, register and sign in
a member, the member's 403), withhttp-client.env.json
one folder above the project so no build or image copies it.docs/features/invoices.mdhas the
matching step table and now opens with the domain in plain words, a state diagram and an annotated
tree of the slice. - Results kernel (ideas from xavierjohn/Trellis):
Result.Combinemerges into aValidationErroronly when every failure is one and otherwise
returns the first failure unmerged (two 404s no longer answer 400);Combine<T1,T2>and
<T1,T2,T3>keep their values for a deconstructingBind/Map;MapOnFailurereplaces a
failure's error;Result.AtField(member)attributes a value-object or aggregate-rule error to a
request field, so"a@b"lands undercustomerEmailon the wire and on the form; readingValue
on a failure throws naming the error's code (never its description). - Telemetry: a
trellis.validation.failurescounter on theTrellis.UseCasesmeter, by use case
and code; the outcome lines are[LoggerMessage]events 1001–1006 (succeeded, failed, failed
validation, failed with detail, cancelled, threw);UseCaseLoggingOptions.IncludeErrorDetail(off
by default; a host that wants it in Development binds theTelemetrysection) puts the error
description back on the line. - Persistence:
IScalarValueObject<TSelf, TValue>withScalarValueObjectConverter, the mapping
for a single-value value object that needs an index — a converted column instead of a complex type
(ADR-0006 amendment;EmailAddressandCurrencystay complex types);AggregateConcurrencyInterceptor
marks the root modified when only its children changed, so the root'sxminis checked and bumped
(idea from xavierjohn/Trellis);UniqueConstraintErrorsmaps constraint names pinned in
configuration to errors. - Domain:
Currency.MinorUnits(ISO 4217: 0 for JPY, 3 for KWD and the other dinars) and
Currency.CodeLength;Money.MaxAmount,Money.AmountPrecisionandMoney.AmountScale;
Invoice.CustomerNameMaxLength(200),InvoiceLine.DescriptionMaxLength(500) and
EmailAddress.MaxLength(254) as the one place each limit lives — the validators, the EF
configurations and the UI forms use them. - Security events 1105
FailedSignInNotCountedand 1106FailedSignInCountNotReset(Warning,
user id and Identity error codes): the lockout counter's writes report failure instead of being
discarded. - Generated CI: a line-rate floor per ring (Core 90 %, Infrastructure 85 %, Presentation 75 %,
Shared 80 %) with a per-ring table; a TRX summary in the job summary, failures first; a
container-smokejob that publishes the API and migration images, runs the migration against
PostgreSQL and boots the API in Production with only the documented settings, probing/health,
an anonymous 401 problem document and a seeded sign-in (the web image too with--include-ui,
Redis with--use-redis);scripts/check-adr-links.shalso resolves every relative Markdown link;
.gitattributesgives C# diffs hunk headers that name the member. - Aspire dashboard: a "Scalar" link on the
apiresource; with--use-redis, a RedisInsight tile
beside thecacheresource, as pgAdmin sits beside PostgreSQL. - AppHost launch profiles:
tools/Trellis.AppHost/Properties/launchSettings.jsonwith anhttps
profile (dashboard athttps://localhost:17171) and anhttpone (http://localhost:15171), so
the AppHost runs from Rider's and Visual Studio's Aspire run configuration, which refuses to start
without a profile.dotnet runandaspire runpick thehttpsprofile too instead of a dynamic
dashboard URL. Anappsettings.jsonbeside it keeps the dashboard's own request logs out of the
AppHost console (Microsoft.AspNetCoreandAspire.Hosting.Dcpat Warning), as the Aspire
starter template does. Each generated solution gets its own six ports, picked free atdotnet new
time (portgenerator symbols, as the Aspire starter does), so two solutions run side by side. - Template repository (not in generated projects): a Credits section in the README and the rule
that keeps it current, a package icon and wider tags, a Discussions link for questions, and a
Windows leg in Template CI. The README is now a walkthrough in the style of
amantinband/clean-architecture (credited there): the domain before the architecture, a request's
path, the toggles, and pictures of the rings, the tree, that path and the test suites, drawn from
the repository byeng/readme/render-diagrams.py(light and dark; CI fails when they go stale). - README pictures restyled (not in generated projects): a dark banner with the install commands,
the soluti...