git404hub

what is seam-guard fr?

lennykean/seam-guard — explained in plain English

Analysis updated 2026-05-18

3C#Audience · developerComplexity · 3/5Setup · easy

tl;dr

A Roslyn analyzer and .NET tool that checks your C# code against JSON-defined rules about which parts of a project are allowed to depend on each other.

vibe map

mindmap
  root((SeamGuard))
    What it does
      Enforces architecture rules
      Checks builds automatically
    Tech stack
      Roslyn analyzer
      Dotnet tool
      MSBuild
    Use cases
      Block bad dependencies
      Restrict NuGet packages
      Layered rule enforcement
    Audience
      Dotnet developers
      Architecture teams

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Stop one part of a .NET codebase from referencing internals of another part it should not touch.

VIBE 2

Enforce which NuGet packages and project references a given project is allowed to use.

VIBE 3

Catch layering violations automatically during dotnet build instead of relying only on code review.

what's the stack?

C#Roslyn.NETMSBuildNuGet

how it stacks up fr

lennykean/seam-guarderikphilips/cs4aijakobsung/luthn
Stars333
LanguageC#C#C#
Setup difficultyeasymoderatehard
Complexity3/54/54/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · easy time til it works · 30min

in plain english

SeamGuard is a tool for C# and .NET projects that checks whether your code follows the architecture rules you set for it. Instead of relying on developers to remember which parts of a codebase should not talk to each other, SeamGuard reads a JSON configuration file and enforces those boundaries automatically every time the project builds. It works in two ways. You can install it as a Roslyn analyzer, which means it becomes a permanent part of a project and checks the code continuously as you write. Or you can run it as a separate command line tool that checks a build one time without adding anything to the project itself. The rules you write in the configuration file can cover several kinds of things: which types a project is allowed to expose, which other types or projects a piece of code is allowed to reference, which NuGet packages are permitted, and which internal friend assemblies are visible to other projects. It can also check how mocking is used in test code and apply layered rules based on namespace and project structure. To use it, you add the SeamGuard.Analyzer package to a project, then create a .seamguard/config.json file that lists the projects and rules you want enforced, such as denying certain project references or restricting which dependencies a class constructor can use. When you run dotnet build, any rule violations show up as build diagnostics labeled SGA, right alongside normal compiler warnings and errors. This is aimed at teams who want to keep a growing codebase from turning into a tangle of unintended dependencies, since it catches architectural violations automatically instead of relying only on code review. The project is small, with just a few stars, but includes documentation covering getting started, configuration, policy reference, the command line tool, and diagnostics.

prompts (copy fr)

prompt 1
Help me write a .seamguard/config.json that denies my Data project from depending on my Core project.
prompt 2
Show me how to install SeamGuard.Analyzer and set up architecture rules for my .NET solution.
prompt 3
Explain what an SGA diagnostic from SeamGuard means and how I would fix a rule violation.

Frequently asked questions

what is seam-guard fr?

A Roslyn analyzer and .NET tool that checks your C# code against JSON-defined rules about which parts of a project are allowed to depend on each other.

What language is seam-guard written in?

Mainly C#. The stack also includes C#, Roslyn, .NET.

How hard is seam-guard to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is seam-guard for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.