Zphil.LoadBearing.Cli
0.2.0
See the version list below for details.
{ "servers": { "Zphil.LoadBearing.Cli": { "type": "stdio", "command": "dnx", "args": ["Zphil.LoadBearing.Cli@0.2.0", "--yes", "--", "mcp"] } } }
.vscode/mcp.json settings file.
dotnet tool install --global Zphil.LoadBearing.Cli --version 0.2.0
dotnet new tool-manifest
dotnet tool install --local Zphil.LoadBearing.Cli --version 0.2.0
#tool dotnet:?package=Zphil.LoadBearing.Cli&version=0.2.0
nuke :add-package Zphil.LoadBearing.Cli --version 0.2.0
LoadBearing
LoadBearing is a .NET tool where a fluent C# architecture spec is a single source of truth that both:
- Enforces architecture rules deterministically: in CI, at the command line, and inside AI coding-agent feedback loops; and
- Generates agent context (a managed block in
AGENTS.md, scoped per-directory rules, and MCP query tools), so the rules AI agents read are provably the rules the build enforces.
Every rule carries a posture: Enforce for the law, Migrate for ratcheted tech debt with a grandfathered baseline, Freeze for "here be dragons" code that must be contained rather than touched. The spec describes the code as it actually is, and the enforcement half keeps that description current.
Status
Pre-alpha, under construction. The reified model, the fluent builder, Roslyn extraction, and the CLI verbs listed below are in place. All three postures evaluate: Enforce law, ratcheted Migrate baselines, and Freeze containment with a diff-aware --diff-base tripwire. check --sarif additionally writes the verdict as a SARIF 2.1.0 report for GitHub/Azure DevOps code scanning: red violations as error alerts, grandfathered ratchet debt as suppressed note-level alerts whose burndown shows in the Security tab. This repo's CI uploads its own self-check. The agent-facing shells over that CLI core exist too. loadbearing mcp serves arch_check, arch_status, arch_explain, arch_context, and arch_graph with output identical to the CLI by construction, plus a derive_spec prompt that walks an agent through proposing a spec for an existing codebase. The xUnit adapter runs the same rules as tests. This repo's own AGENTS.md block is generated by loadbearing render and kept current by a self-spec test: the thesis, dogfooded.
Installing
The CLI ships as a .NET global tool (requires the .NET 10 runtime or later):
dotnet tool install -g Zphil.LoadBearing.Cli
loadbearing check MyApp.sln
Starting on an existing codebase? The Meridian adoption walkthrough derives a spec from real code, one command at a time.
The command is loadbearing. Four lockstep-versioned packages make up a release:
| Package | What it is |
|---|---|
Zphil.LoadBearing.Cli |
The loadbearing global tool: check, render, explain, status, graph, baseline, and the MCP server (loadbearing mcp). |
Zphil.LoadBearing |
The spec contract (netstandard2.0, zero dependencies); the one package a spec project references. |
Zphil.LoadBearing.Xunit |
The xUnit adapter: every rule as an individually named test. |
Zphil.LoadBearing.Roslyn |
Extraction/workspace infrastructure; a dependency of the above, not for direct reference. |
MCP clients can also launch the server straight from nuget.org without a global install:
dnx Zphil.LoadBearing.Cli -- mcp <solution> (how MCP-registry clients run it; note the
mcp subcommand).
Building
dotnet build Zphil.LoadBearing.slnx
dotnet test Zphil.LoadBearing.slnx
Examples
Worked examples live in examples/. CI builds each one, runs check against its committed baselines, and re-runs render to prove the committed agent context matches the code.
Meridian: a freight-forwarding monolith mid-migration, carrying all three postures on one codebase. The law, a ratcheted migration with its burndown, and a frozen scope with dragons.Meridian.Quoting: a greenfield clean-architecture quoting subsystem, Enforce-only. The generatedAGENTS.mdblock beside the spec that produced it, and every rule as an individually named xUnit test.Meridian.Operations: a modular monolith with module isolation as enforceable law. Each module directory carries its own generatedAGENTS.mdcard, and one module is frozen behind its facade.Meridian.Interchange: an outbound integration worker that transmits to trading partners over HTTP, with every rule'sBecauseciting the Microsoft guidance it enforces. The cookbook example: canon sentence, spec excerpt, real violation.Meridian/ADOPTING.md: the day-one adoption walkthrough. The full derive flow against an existing codebase, every step a real command with real output.Meridian/hooks: the agent-loop showcase. A Claude Code hook runscheckafter each edit, so new code in a retired pattern goes red at the moment of creation; the storyboard walks one task from the old pattern to self-correction, every block real captured output.
License
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.