Spec Driven Development
MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.
作者提供的说明(英文原文)
ABC complexity gate for AI-written code with an MCP inspection tool.
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
选择你使用的 AI 应用,然后复制设置。
作者没有在注册中心列出安装信息。请查看下方作者的 README。
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月6日
注册名称已通过 GitHub 账户 adrianov 验证,该账户拥有此仓库
我们还没有从 GitHub 读取这个仓库
我们还没有从 GitHub 读取这个仓库
它在你的电脑上运行,没有互联网端点
在你的电脑上运行,改用本地设置
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
GitHub 仓库最后更新于–,最新版本(0.23.0)于14天前进入注册中心。
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Rust。
同一分类中有:Spec Driven Development, Remote Desktop Commander, Reelsaw
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:★ 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.
Drive a self-hosted Reelsaw: turn long videos into vertical clips, edit, re-render and export them.
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
A must-have gate for AI-written code. Agents ship faster than humans can re-read; abcop keeps that code *understandable* by gating function and module ABC complexity so every unit fits a human head and an LLM context window. Diagnostics are also a hook for automated refactoring — extract a method, split a module — so CI rejects bad growth *and* points agents at concrete maintainability fixes.
One self-contained binary across Ruby, Rust, Python, Go, PHP, Java, C#, Dart, JavaScript, TypeScript, C, C++, Objective-C, Swift, Solidity, Zig and Haskell — no runtimes, no plugins, no per-language installs. Written in Rust for speed: one parse per file, one walk per metric, grammars compiled in; whole trees in milliseconds.
brew install adrianov/abcop/abcop
cargo install abcop
macOS (.tar.gz from GitHub Releases; binary + man):
# Apple Silicon — use the *-x86_64-apple-darwin.tar.gz asset on Intel Macs
curl -LO https://github.com/adrianov/abcop/releases/download/v0.23.0/abcop-0.23.0-aarch64-apple-darwin.tar.gz tar -xzf abcop-0.23.0-aarch64-apple-darwin.tar.gz sudo cp abcop-0.23.0-aarch64-apple-darwin/abcop /usr/local/bin/ sudo mkdir -p /usr/local/share/man/man1 sudo cp abcop-0.23.0-aarch64-apple-darwin/abcop.1 /usr/local/share/man/man1/
Ubuntu / Debian (.deb from GitHub Releases; amd64, Ubuntu 22.04+ / Debian bookworm+):
# example for v0.23.0 — use the asset name from the release page
curl -LO https://github.com/adrianov/abcop/releases/download/v0.23.0/abcop_0.23.0-1_amd64.deb sudo dpkg -i abcop_0.23.0-1_amd64.deb man abcop
lib/sinatra/base.rb:1254:0: C: Metrics/AbcSize: Assignment Branch Condition size for `error_block!` is too high. [<7, 14, 9> 18.06/17]
src/main.rs: W: Metrics/ModuleAbcSize: Assignment Branch Condition size for module is too high. [<80, 200, 60> 228.04/120] -- extract a coherent subunit 132 files analysed in 0.09s, 7 abc offenses, 0 used-once offenses, 0 never-used warnings, 14 module-abc warnings
Line counts lie. The ABC metric (Jerry Fitzpatrick, *C++ Report*, June 1997) counts what does work — assignments (A), branches (B), conditions (C) — as sqrt(A² + B² + C²). Fitzpatrick defined both method and module scope; abcop gates both:
| Rule | Severity | Meaning |
|---|---|---|
Metrics/AbcSize | C | function ABC above --max-abc (default 17). A normal scan reports a rise vs HEAD; --full and --everything report every function over the ceiling |
Metrics/ModuleAbcSize | W | module ABC above --max-module-abc (default 120). A normal scan reports a rise vs HEAD; --full and --everything report every production module over the ceiling |
UsedOnce | W | local written once and read once, inside a function the edit changed. --full and --everything report every such local |
NeverUsed | W | local written and never read, inside a function the edit changed. Same whole-tree switch as UsedOnce |
A sparse wrapper and a dense god-object can share a line count; ABC separates them. Complexity is the gate — never a line budget. UsedOnce / NeverUsed are secondary.
1 plus stable JSON/JSONL diagnostics (rule, score, vector, message) feed agents and scripts: split oversized modules, extract hot methods. Each finding is an actionable maintainability step, not a style nit.--max-abc and --max-module-abc. --full and --everything report every hit, not only the current edit.abcop --mcp is the best way to use abcop from an agent: the model gets offenses as soon as it writes, so it can fix complexity and dead locals in the same turn and ship effective code right away — not after a later CLI/CI pass. Official Rust rmcp SDK; tool abcop_inspection. Listed on the MCP Registry as io.github.adrianov/abcop (crates.io package + each GitHub v* tag).Inspired by RuboCop (Ruby AbcSize parity and # rubocop:disable directives) and lizard (one tool, many languages). Ruby method counting matches RuboCop 1.89 byte-for-byte (scripts/compare_parity.py). A block outside a method (match do, before do, a class-level each) is its own unit; each / map / select still roll into the block that contains them.
rubocop --only Metrics/AbcSize (cache off), ~140× a full rubocop run.cache.redb) compiled in; works on clean CI images with no language toolchains.--sort-by-score buffers for worst-first emit.abcop [OPTIONS] PATH...
| Option | Default | Meaning | ||
|---|---|---|---|---|
[PATH]... | auto | targets; omitted → scope selection | ||
--max-abc N | 17 | function ABC ceiling | ||
--max-module-abc N | 120 | module ABC ceiling | ||
| `--only abc\ | used-once\ | never-used` | all | single check |
--full | off | whole production tree, and every function over the ceiling plus every local (default skips stay on) | ||
--everything | off | no gitignore / hidden / vendored pruning (ignore in the user config still applies); same full report as --full | ||
| `--format text\ | json\ | jsonl` | text | CI-friendly output |
--sort-by-score | off | highest ABC first | ||
--mr | off | MR scope (uncommitted + branch vs base) | ||
--uncommitted | off | working-tree + index + untracked vs HEAD only | ||
--no-cache | off | skip on-disk cache | ||
--mcp | off | MCP server on stdio (for AI clients) | ||
--dump-tree FILE | — | debug syntax tree |
Exit codes: 0 clean, 1 findings, 2 usage error.
abcop app lib # two trees; rises and edited functions only
abcop --format jsonl lib > abcop.jsonl # streaming CI / agent input abcop --only used-once src # inline candidates in edited functions abcop --max-abc 12 --only abc lib # stricter function budget abcop --full lib # every function over the ceiling, every local abcop --everything lib # same report, with no default pruning abcop --max-module-abc 80 lib # stricter module budget abcop --sort-by-score --only abc lib # worst first abcop --uncommitted # pre-commit; rises and edited functions only abcop --mr --only abc # branch files; still only ABC rises vs HEAD abcop --mcp # MCP server on stdio (for AI clients)
JSON diagnostics include file, line, column, severity, rule, message, plus score / vector for ABC rules:
{"rule":"Metrics/AbcSize","score":10.0,"vector":"<6, 8, 0>"}
{"rule":"Metrics/ModuleAbcSize","score":120.5,"vector":"<40, 100, 40>"}
Named paths — those targets only. Findings still follow the edit filter below.
Omitted — narrowest useful scope, announced on stderr:
HEAD if the tree is dirty--mr forces this)Default walks prune test/fixture trees, vendored/build output (vendor/, node_modules/, target/, …), db/migrate/, route tables (config/routes.rb, config/routes/*.rb), and generated names (*.min.js, *_pb.go, …). Name a path explicitly to scan it anyway. Rails schema dumps (db/schema.rb, db/*_schema.rb, db/schema_*.rb) are never scanned, even when named. Third-party, route-table, and fixture paths are never scoped review surface — a diff through vendor/ or tests/fixtures/ does not make that material owned code.
On a dirty tree the bare default is uncommitted-only; --mr takes the full branch union. Commits straight to main use a 36-hour window when no branch base applies. --uncommitted fails outside a repository instead of silently widening.
Every scan except --full and --everything compares the working tree to HEAD:
--max-abc only when its score is strictly higher than the same method in HEAD (same name, source order). A score that stayed the same or fell stays quiet, including a legacy method that was already over the ceiling. A method that exists only in the working tree counts as an increase. The message asks to return to the previous score when that score was already over the ceiling (rose from 20 to 21 -- back to 20 or below). When HEAD was under the ceiling, the target is the ceiling (rose from 16.28 to 21.28 -- back to 17 or below).HEAD. A local in a function the edit did not touch stays quiet. Locals outside any function still report.--max-module-abc only when its whole-file score is strictly higher than that file in HEAD. A score that stayed the same or fell stays quiet, including a legacy module already over the ceiling. A file that does not exist in HEAD is held to the ceiling. The message asks to return to the previous score when that score was already over the ceiling (rose from 200 to 210 -- back to 200 or below). When HEAD was under the ceiling, the target is the ceiling.--uncommitted and --mr also drop function and local findings on lines the diff did not touch.
--full and --everything report every method over --max-abc, every local, and every production module over --max-module-abc. ModuleAbcSize still exempts test trees on those runs. --full keeps the default skips. --everything lifts gitignore, hidden directories, and vendored/generated/test pruning. ignore in the user config still applies to both.
One file holds user options. It is $XDG_CONFIG_HOME/abcop when that variable is set, otherwise ~/.config/abcop. $ABCOP_CONFIG replaces the path. Nothing is written into the project.
ignore is a gitignore pattern, one option per line, applied in every project relative to that project's root. A directory pattern covers everything inside it. Naming the path, --full, and --everything do not bring a match back. An MCP inspection of a matched path is empty.
ignore = app/services/legacy/
ignore = lib/old.rb
Everywhere except Rust, RuboCop-style # / // suppressions work (trailing and block; bare Metrics allowed). rubocop:disable-next is ignored, matching rubocop.
def legacy_path # rubocop:disable Metrics/AbcSize
... end
Preferred for LLM / agent workflows. Wire abcop as an MCP server so the model can call abcop_inspection while it edits: feedback arrives in the
只显示了开头部分;其余内容请在仓库中阅读