Skip to content

About

Software Fabric Template

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Software Fabric

A generator for larger industrial and SaaS applications — .NET backend, React or Vue frontend — built so that 10–20 coding agents can work on the generated project in parallel, coordinated through GitHub.

Two halves, one repo:

  • The generator. You pick options from catalog/catalog.yaml (database, event sourcing, message bus, CQRS, DDD depth, test strategy, micro-frontends, state management, UI library, …) or start from a profile. The generator produces a concrete project with those decisions fixed — code, ADRs, agent rules and the gates that enforce them. See ADR-0001.
  • The fabric. Every generated project ships with the agent setup: AGENTS.md, Claude Code agents and skills, a GitHub board protocol in which agents claim their own issues and escalate to developers, and cross-model review. See ADR-0004.

Status

M0 (generator core) is done. M1 (profile saas-standard-react end to end) is done; its gate passed on 2026-10-31: the base pack, the backend packs, the Aspire integration tests and the frontend are real (M1-01 to M1-07): a generated app signs a user in through Keycloak and lists a module's data, checked end to end with Playwright. Every generated project carries the board protocol (M1-08): agents claim issues, escalate to developers and get reviewed by another model family through GitHub alone. CI generates the profile with the CLI and puts it through its own CI, end-to-end tests included (M1-09). In the pilot (M1-10) an agent delivered an issue in a generated project through the board protocol, reviewed by another model family and merged on green CI. tests/Fabric.Packs.Tests generates the profile from the real packs — empty stand-ins for the rest — builds it, runs its tests, installs, builds, lints and tests its web app, and starts it against real PostgreSQL and RabbitMQ containers.

Artifact Purpose
catalog/catalog.yaml Every option, its scope and its rules
docs/catalog-rules.md The rule grammar the catalog uses
docs/catalog.md Every dimension and option, generated from the catalog by fabric reference
docs/packs.md How to write a pack: layout, targets, template model, slots
schema/pack.schema.json What an option pack must declare
docs/adr/ Decisions 0001–0016
docs/roadmap.md M0–M4 and the M0 task list

Using it

dotnet build Fabric.slnx -c Release
fabric() { dotnet src/Fabric.Cli/bin/Release/net11.0/fabric.dll "$@"; }
fabric profiles
fabric validate --profile saas-standard-vue --set backend.database=sqlserver
fabric new ../shop --profile everything --catalog tests/fixtures/minimal/catalog.yaml --packs tests/fixtures/minimal/packs
fabric add-module billing --project ../shop --catalog tests/fixtures/minimal/catalog.yaml --packs tests/fixtures/minimal/packs
fabric matrix --catalog catalog/catalog.yaml --packs packs --extra build/matrix-extra.yaml --output build/matrix.json
fabric reference --catalog catalog/catalog.yaml --output docs/catalog.md

fabric new --namespace SmartSolutionsLab.Shop writes the project's C# in that root namespace instead of the name in PascalCase (Shop), and records it in fabric.yaml; add-module, upgrade and change use the recorded one. It must be dotted C# names (ASCII letters, digits and underscores, each starting with a letter, none a keyword), not under System or Microsoft. Without it, nothing is recorded.

fabric upgrade brings a generated project up to the running fabric (ADR-0016). In the project, the top of a git repository with a clean working tree, it writes the project again from fabric.yaml twice: with the running fabric, and with the version fabric.yaml records, installed from the feed below (or --from <path to that fabric>, a tool or its fabric.dll, for one that cannot be installed). It then merges the first into the project three-way, with the second as the merge base: a file only the generator changed is taken, one both changed is merged, and where the edits overlap it is left as a git conflict. Nothing is committed; the summary it prints lists each file and what the upgrade does not guarantee. A fabric.yaml without a generator version, with a -dev version, or with a catalog hash the recorded version does not write is refused, because the tree that generated it cannot be reproduced.

fabric change --set frontend.color-scheme=orange changes a choice the catalog marks changeable (ADR-0016 C1 to C3) in a project this fabric and catalog wrote, in the same kind of merge: the project written from its recorded choices is the merge base, the project written with the changed choice is merged in, and fabric.yaml ends up recording it. A dimension the catalog does not mark is refused, by name, before anything is touched; a project another fabric wrote is upgraded first.

fabric matrix writes the pairwise matrix (ADR-0003): full choice sets without a profile, each one's choices ready for fabric new --choices, that together contain every pair of options with a pack that some valid choice set contains, and the pairs none does. build/matrix.json is checked in, and a test fails when it is stale; build/matrix-extra.yaml adds combinations a defect needs.

fabric reference writes docs/catalog.md: every dimension and option with its tier, rules, note and the profiles that use it. It is checked in too, and a test fails when it is stale.

build/profiles.sh is what CI runs after the tests: every fixture profile generated twice and compared, a module added, every real profile validated. build/profile-ci.sh saas-standard-react generates that profile from the real packs and runs the generated project's CI steps against it (Docker, Node 22 with pnpm and the Aspire CLI bundle needed). build/profile-ci.sh saas-standard-react --set frontend.design-system=tokens-and-components does the same with overrides, so a pack can go through profile CI before the profile that needs it is complete. build/profile-ci.sh --combination <name> --steps generate,build,test,web runs one combination of the pairwise matrix (build/matrix.json, ADR-0003) instead of a profile, without the end-to-end tests: its choices go to fabric new --choices, a JSON file of dimension to option.

As a .NET tool

A v* tag publishes the CLI, with the catalog and the packs inside it, to the organisation's GitHub Packages feed (.github/workflows/release.yml). Its version is VersionPrefix in Directory.Build.props, and the tag must be v and that version; bump the prefix after each release. Install it with a GitHub token that may read packages:

dotnet nuget add source https://nuget.pkg.github.com/smartsolutionslab/index.json --name smartsolutionslab \
  --username <github user> --password <token> --store-password-in-clear-text
dotnet tool install --global fabric --version <version>

build/tool-check.sh lean-crud <folder> packs the tool into a folder, installs it from there into an empty directory, checks fabric --version against the package, and generates and builds the profile with it. With --release <tag> it packs the version without its suffix, as a release does; the release workflow runs it before it publishes.

Stack of the generator itself

C# / .NET 11 CLI, distributed as a dotnet tool. Templates rendered with Scriban. Tests in xUnit.

About

Software Fabric Template

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages