Zphil.LoadBearing.Cli 0.2.0

There is a newer version of this package available.
See the version list below for details.
{
  "servers": {
    "Zphil.LoadBearing.Cli": {
      "type": "stdio",
      "command": "dnx",
      "args": ["Zphil.LoadBearing.Cli@0.2.0", "--yes", "--", "mcp"]
    }
  }
}
                    
This package contains an MCP Server. The server can be used in VS Code by copying the generated JSON to your VS Code workspace's .vscode/mcp.json settings file.
dotnet tool install --global Zphil.LoadBearing.Cli --version 0.2.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local Zphil.LoadBearing.Cli --version 0.2.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Zphil.LoadBearing.Cli&version=0.2.0
                    
nuke :add-package Zphil.LoadBearing.Cli --version 0.2.0
                    

LoadBearing

CI OpenSSF Scorecard NuGet NuGet downloads

LoadBearing is a .NET tool where a fluent C# architecture spec is a single source of truth that both:

  1. Enforces architecture rules deterministically: in CI, at the command line, and inside AI coding-agent feedback loops; and
  2. 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 generated AGENTS.md block 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 generated AGENTS.md card, and one module is frozen behind its facade.
  • Meridian.Interchange: an outbound integration worker that transmits to trading partners over HTTP, with every rule's Because citing 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 runs check after 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

MIT

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
0.7.0 152 8/26/2026
0.6.1 139 8/22/2026
0.6.0 99 8/22/2026
0.5.0 182 8/17/2026
0.4.0 139 8/9/2026
0.3.1 108 8/5/2026
0.2.0 129 7/23/2026
0.1.0 123 7/14/2026