Skip to content

Releases

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 15 Nov 20:18
c9e5350

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 in wwwroot/tokens.css, every colour once as a light-dark() pair in two themes, with the type
    scale, the spacing, the radii and the focus ring as tokens; app.css holds the components and writes
    no colour; DesignSystemTests proves 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: --fg is --ink and --border is --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 carries data-th with 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: .notice is
    .callout success and .error-panel is .callout danger (docs/upgrading.md, step 7).
    docs/design-system.md names the new components (.label, .secondary, .pill and its variants,
    .callout and 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, key theme)
    and written as data-theme on <html>, which holds that theme over the operating system's; System
    lets it go. UI.Common/wwwroot/theme.js sets 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.razor reads and writes it through
    IJSRuntime, never during a render. A select now looks like an input. docs/design-system.md
    names the component (.theme, .theme-select) and says how to remove it; a browser flow in the
    optional UiTests project 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).
    DesignSystemProofTests in the optional UiTests project 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 default TestResults/screenshots under the test run's working directory),
    and the ui-tests job in ci.yml uploads them as the ui-screenshots artifact, 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 in tokens.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 only sh and awk, and
    DesignSystemTests runs it and holds every name, value and usage to the token file and the doc. A
    project generated with --include-ui false gets the script too; it says there is nothing to export.
  • A ui-reviewer subagent (.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.md asks for it before a UI
    change is finished and its accessibility rule now names the page title, the single h1 and colour as
    never the only signal; the add-feature and remove-feature skills name the design system's
    components and tests in their UI steps.
  • Two more reviewers, and every reviewer says what it owns. test-reviewer reads 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), and security-reviewer reads a change to authentication, identity, hardening, the
    Auth feature or who may call an endpoint against docs/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, and AGENTS.md says 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 optional dotnet/skills plugins, none enabled);
    scripts/check-adr-links.sh fails when a reviewer, a hook or a feature doc is missing from it, or
    when .claude/settings.json runs a hook that does not exist. architecture-guard's dependency
    flow now matches AGENTS.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.sh asks 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.sh asks when a git commit -m
    subject is not type(scope): subject and, when gitleaks is installed, refuses a commit whose staged
    changes hold a secret; stop-tests.sh stops the agent once when it changed code under src/ 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.md gains a Commits line (a generated project had no commit convention before) and names
    the hook behind each boundary it backs; docs/development.md gains Agent hooks (what each decides,
    how to add one, how to turn them off); scripts/check-hooks.sh tests 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.md only
    when asked (/finish-change commit, /finish-change pr). /upgrade-template <version> walks through
    docs/upgrading.md and 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.md loads 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-feature points at Protecting an endpoint for who may call an endpoint.
    docs/upgrading.md installs 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.sh prints one line per prerequisite, ok, missing with the fix, or skip: a
    .NET SDK on PATH that global.json accepts (or that ./scripts/dotnet.sh builds 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...
Read more

v0.1.1

Choose a tag to compare

@github-actions github-actions released this 25 Oct 23:50
9d1ee86

A patch: the documentation corrections and the two fixes that followed the first release.

  • CI installs exactly the SDK global.json names. The workflows call .github/actions/setup-dotnet,
    which reads the version and installs that one from the release feed. Before, setup-dotnet honoured
    rollForward by 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.json still 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 through LogSafeRequestLine, 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.yml a generated project ships with no longer opens six cs/log-forging alerts 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

Choose a tag to compare

@github-actions github-actions released this 25 Oct 15:28
c449b27

The first release.

  • The shipped InitialCreate was regenerated. InvoiceLines.Amount is numeric(18,3) (was
    numeric(18,2)), and the outbox's NextAttemptAtUtc is 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.Error is nullable and IsSuccess/IsFailure carry [MemberNotNullWhen]: code that
    reads result.Error.Code without checking IsFailure no 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.AlreadyIssued split off Invoice.AlreadyFinalized; Money.AmountTooLarge,
    EmailAddress.TooLong, Invoice.CustomerNameTooLong and Invoice.LineDescriptionTooLong (all 400).
    A registration race now answers 409 Auth.EmailAlreadyInUse instead of 500.
  • Dashboards: the use-case span attributes are trellis.usecase.outcome,
    trellis.usecase.error_code and trellis.usecase.error_type, and the outcome log line changed
    shape (see Changed).
  • POST /invoices requires an Idempotency-Key (400 Idempotency.KeyRequired without one); the
    writes to an existing invoice still accept it optionally. A repeated header or a comma-separated list
    is 400 Idempotency.InvalidKey instead of being joined into one key the caller never sent.
  • Two new ErrorTypes change statuses. ExchangeRate.Unavailable is a 503 (was 500) and a
    refusal by the provider is the new 500 ExchangeRate.Rejected; a stale If-Match on an invoice
    write is 412 Invoice.VersionMismatch. A client that branched on 500 for the outage should
    branch on 503, and a decorator or classifier of your own that switches over ErrorType has two more
    values, Unavailable and PreconditionFailed. On the outcome line a 412 is Information like the other
    expected failures and Unavailable is 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.Analyzers that Directory.Build.props loads into every project, the tests included): a
    dropped invoice.Issue(…) or Result.Combine(…), an awaited handler.Handle(…), a forgotten return
    before InvoiceErrors.X, an unchecked IdentityResult or UI ApiResult<T> (in .razor files too), an
    await Task.WhenAll(…) over handlers, and a Task<Result> returned as a plain Task
    (public Task Handle(…) => port.PushAsync(…) in an event handler) are errors. Handle it or write
    _ = … with a reason; in a test, end the step in ShouldBeSuccess() (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", was W/"42"); If-None-Match still compares
    weakly, so a stored tag keeps answering 304.
  • The audit columns hold the user id. CreatedBy and ModifiedBy are stamped with the acting
    user's id instead of their e-mail; the migration job still writes system. 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 of Trellis.SharedKernel.Decorators.LoggingDecorators.CommandHandler/.QueryHandler. A
    Logging:LogLevel or Serilog:MinimumLevel:Override entry, 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 BCL SmtpClient, configured by an Email:Smtp section (Host, Port 587, UseStartTls on,
    FromAddress, and UserName/Password together 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 1205 EmailSent (masked recipient) and
    1206 EmailSmtpInClear (a Warning when UseStartTls is off outside Development).
    docs/development.md has 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.http walks the invoice lifecycle in twelve requests
    (sign in, create with an Idempotency-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), with http-client.env.json
    one folder above the project so no build or image copies it. docs/features/invoices.md has 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.Combine merges into a ValidationError only 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 deconstructing Bind/Map; MapOnFailure replaces a
    failure's error; Result.AtField(member) attributes a value-object or aggregate-rule error to a
    request field, so "a@b" lands under customerEmail on the wire and on the form; reading Value
    on a failure throws naming the error's code (never its description).
  • Telemetry: a trellis.validation.failures counter on the Trellis.UseCases meter, 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 the Telemetry section) puts the error
    description back on the line.
  • Persistence: IScalarValueObject<TSelf, TValue> with ScalarValueObjectConverter, the mapping
    for a single-value value object that needs an index — a converted column instead of a complex type
    (ADR-0006 amendment; EmailAddress and Currency stay complex types); AggregateConcurrencyInterceptor
    marks the root modified when only its children changed, so the root's xmin is checked and bumped
    (idea from xavierjohn/Trellis); UniqueConstraintErrors maps 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.AmountPrecision and Money.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 FailedSignInNotCounted and 1106 FailedSignInCountNotReset (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-smoke job 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.sh also resolves every relative Markdown link;
    .gitattributes gives C# diffs hunk headers that name the member.
  • Aspire dashboard: a "Scalar" link on the api resource; with --use-redis, a RedisInsight tile
    beside the cache resource, as pgAdmin sits beside PostgreSQL.
  • AppHost launch profiles: tools/Trellis.AppHost/Properties/launchSettings.json with an https
    profile (dashboard at https://localhost:17171) and an http one (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 run and aspire run pick the https profile too instead of a dynamic
    dashboard URL. An appsettings.json beside it keeps the dashboard's own request logs out of the
    AppHost console (Microsoft.AspNetCore and Aspire.Hosting.Dcp at Warning), as the Aspire
    starter template does. Each generated solution gets its own six ports, picked free at dotnet new
    time (port generator 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 by eng/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...
Read more