Spec Driven Development
MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.
作者提供的说明(英文原文)
A .NET architecture checker that enforces one C# spec and renders the same rules for coding agents.
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
选择你使用的 AI 应用,然后复制设置。
SLIDERULE_SOLUTION_PATH你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json
{
"mcpServers": {
"sliderule": {
"command": "dnx",
"args": [
"SlideRule.Cli",
"--yes",
"mcp"
],
"env": {
"SLIDERULE_SOLUTION_PATH": "your-value"
}
}
}
}在终端中运行这条命令
claude mcp add sliderule --env SLIDERULE_SOLUTION_PATH=your-value -- dnx SlideRule.Cli --yes mcp运行前请先填写空着的值。
粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"sliderule": {
"command": "dnx",
"args": [
"SlideRule.Cli",
"--yes",
"mcp"
],
"env": {
"SLIDERULE_SOLUTION_PATH": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"sliderule": {
"type": "stdio",
"command": "dnx",
"args": [
"SlideRule.Cli",
"--yes",
"mcp"
],
"env": {
"SLIDERULE_SOLUTION_PATH": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。
你的选择通过 Cookie 保存在这台设备上,无需账户。
SLIDERULE_SOLUTION_PATH env这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月7日
注册名称已通过 GitHub 账户 andypgray 验证,该账户拥有此仓库
我们还没有从 GitHub 读取这个仓库
我们还没有从 GitHub 读取这个仓库
它在你的电脑上运行,没有互联网端点
在你的电脑上运行,改用本地设置
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
GitHub 仓库最后更新于–,最新版本(0.3.0)于前天进入注册中心。
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 .NET。
同一分类中有:Spec Driven Development, Remote Desktop Commander, AvaHR
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.
Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.
Read hiring data and create inactive assessment and questionnaire drafts for human review.
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
SlideRule is a .NET architecture checker that enforces one C# spec and renders the same rules for coding agents.
A long-lived codebase has layers, boundaries and rules. They live in a few heads, no build step checks them, and the diagrams drift. A change can cross a boundary and the build still passes. A coding agent makes that change quickly and plausibly, and it cannot see which walls are structural. SlideRule's answer is architecture-as-code. The rules become one C# spec, and the spec produces every surface this page names.
AGENTS.md block and per-directory rule cards, and MCP query tools serve the same rules to coding agents.SlideRule is pre-alpha. Minor versions can still change the spec API before 1.0. Status describes what exists today and the versioning rules.
Install the tool, build your solution, and check it:
dotnet tool install -g SlideRule.Cli
dotnet build MyApp.sln sliderule check MyApp.sln
check reads the rules from a spec project, a C# class library in your solution. On a solution with no spec project yet, check stops and reports that it found none. The Getting started page makes one with the SlideRule package, and sliderule graph surveys a solution before it has any rules.
A rule is one statement:
arch.Rule("layering/domain-independent")
.Enforce(domain.MustNotReference(application, infrastructure, api)) .Because("The Domain holds the quote and rate model the rest of the subsystem is built on; it stays free of the layers that depend on it so it can be reasoned about and tested on its own.") .Fix("Move the dependency out of Domain: define an interface here and implement it in the outer layer that needs it.");
That is the whole rule. It has an ID, a posture, a constraint, a reason and a fix. Here the posture is Enforce, and domain and the three layers it must not reference are declared earlier in the spec by namespace pattern. The rule is committed in the clean-architecture example, and CI keeps check green against the codebase it governs. A rule can also cite the page its reason rests on and name a type to copy, as Writing specs shows.
Rules like the one above govern this repository too. One of them keeps the CLI off stdout, because the MCP server speaks JSON-RPC over that channel. Suppose an agent adds a progress printer to the CLI and reaches for Console.WriteLine. When it tries to end its turn, the Claude Code Stop hook in hooks/ runs check over the working tree. The rule goes red, and the hook blocks the stop with this report on the agent's stderr:
FAIL cli/no-stdout — The Host layer must not use `Console.Out`, `Console.Write()` or `Console.WriteLine()`.
because: Stdout is a protocol channel here — the MCP server speaks JSON-RPC over it and CLI output flows through System.CommandLine's console — so a direct Console write corrupts the wire and is invisible to the in-process tests. citation: https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#stdio fix: Write CLI output through the command's InvocationConfiguration console; route server diagnostics to the logger or Console.Error. subject: 225 types, 1 generated src/SlideRule.Cli/Rendering/ProgressPrinter.cs:10 — SlideRule.Cli.Rendering.ProgressPrinter uses System.Console.WriteLine() src/SlideRule.Cli/Rendering/ProgressPrinter.cs:15 — SlideRule.Cli.Rendering.ProgressPrinter uses System.Console.WriteLine()
The report gives the rule, its reason, its citation, the fix and each offending line. The subject: line appears only when a rule's subject includes generated code, here 1 of its 225 types. The agent routes the output through the command's console instead, and the next stop is clean.
The SlideRule on itself page shows this repository's own spec on the other surfaces too, from the prose it renders to code scanning and the graph. It also explains how every excerpt on both pages is held to its source.
Every rule has one of the first two, and every scope one of the last two.
| Posture | What it is | What fails |
|---|---|---|
Enforce | the law | every violation, even ones predating the rule |
Migrate | a ratchet over a counted baseline | new violations; baselined sites stay quiet |
Quarantine | containment for a scope | a new reference into the scope |
Caution | dragons for code new callers may use | never fails; a change touching it warns |
Migrate is for a rule the code does not keep yet. sliderule baseline init records the rule's current violations, and any new violation fails from then on. As sites are fixed, sliderule baseline accept-reductions shrinks the baseline, and once it is empty, status suggests promoting the rule to Enforce.
A scope marks code that needs care. Its dragons are notes on why the code is fragile and how to call into it. render puts them on a card in the scope's directory. Quarantine also records the references into the scope on a baseline, and fails any new one except through the surface BoundaryOnlyVia names. Both kinds of scope warn when a change touches them, given check --diff-base . The Writing specs page shows each posture in code, and Operating SlideRule follows a ratchet from capture to promotion.
The three postures after Enforce each answer a way a coding agent goes wrong on an established codebase. Enforce is the law the code already keeps, and a change that crosses it fails wherever the check runs. The Meridian example walks three of those ways on real output.
SqlConnection, so inline SQL reads as house style and an agent writes its next controller the same way. Migrate answers it. The rendered context calls that pattern debt, in words the agent reads before it writes.Quarantine scope makes the gateway the only sanctioned way in.Quarantine or Caution scope answer it. The card on that scope's directory explains what the code does, which part is structural, and how to call in.Each target below reads the same model. Every violation report gives the rule ID, the generated rule sentence, the reason and the exact file:line. A rule's fix, citation and exemplar appear there too when it has them.
| Target | What it is |
|---|---|
sliderule check | one pass-or-fail verdict for the command line and CI |
check --sarif | that verdict as SARIF 2.1.0, for code scanning |
| xUnit adapter | every rule an individually named test |
| build analyzer | a broken rule as a squiggle in the editor and a compiler warning in the build |
sliderule render | the managed AGENTS.md block, per-directory rule cards, and the model as a JSON file |
render --diagram | two Mermaid diagrams: the projects and their references, and the spec's law |
sliderule mcp | arch_check, arch_status, arch_explain, arch_context, and arch_graph, plus a derive_spec prompt |
sliderule hook | check when a Claude Code agent's turn ends; a red rule blocks the stop |
The adapter's failure text is byte-identical to the CLI's. The two share one renderer, and a product test pins them equal. The managed block plus sliderule explain are also the generated architecture documentation, written for agents first and readable by people. The SlideRule on itself page shows the gate that keeps it current.
The Coding agents page explains which agents read the AGENTS.md files and use each surface. It also gives the line a repository with its own CLAUDE.md adds for Claude Code.
NetArchTest and ArchUnitNET run architecture rules inside your unit tests, and they are good at it. SlideRule moves the rules out of test code into one spec and renders every surface above from it.
| Tool | What you write | Where it runs |
|---|---|---|
| NetArchTest | fluent assertions in test methods | your test runner |
| ArchUnitNET | ArchUnit-style rules in test classes | your test runner |
| SlideRule | one spec in its own project | every target above |
The grammar comes from surveying that prior art, and GRAMMAR.md records each divergence. Constraints negate in the verb (MustNotReference), following ArchUnitNET. ArchUnit's FreezingArchRule accepts a rule's current violations as a baseline, and here that is Migrate with its counted baseline. Quarantine applies the same ratchet to a region of code, counting the references into it today and failing any new one that bypasses its sanctioned surface.
Because is mandatory. A rule without one is an invalid spec, and check stops before it evaluates anything, reporting every spec error in one pass. Even the predicate escape hatch, Must(condition, description:), does not compile without its description. Every reason ships to your agents in the rendered context. In the Interchange example, each of the 12 rules has a Citation naming the learn.microsoft.com page its reason rests on. Of those 12, 9 come from a shared rule pack, an ordinary class library of static methods. The pack owns the citation, and the spec picks the
只显示了开头部分;其余内容请在仓库中阅读