Busfactor

io.github.CloudCorpRecords由 GitHub 账号 CloudCorpRecords 发布v0.1.0更新于 Nov 3, 2026

根据作者和评审数据,映射出由单一作者编写且从未经过评审的文件:一份事实性风险清单。

AI 翻译由 AI 模型根据下方的原文描述翻译,可能有误。

原文描述

Map single-author, never-reviewed files from authorship and review data: a factual risk list.

已验证STDIO仅桌面

概览

Busfactor 的本地 MCP 服务;无需登录;STDIO。

暂无 AI 概览:以下信息来自注册中心条目和服务本身。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Busfactor,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

busfactor

Every codebase has files that only one person really knows. If that person is away — on holiday, off sick, gone from the team — those files are the ones nobody can safely change. busfactor works out where that risk sits. You give it, for each file, who wrote it and how many commits each author made, plus who reviewed changes to it, and it gives back a factual map:

  • Per-file entries — for every file, its total_commits, how many distinct authors it has, its top_author and that author's top_share of the file's commits, and external_reviewers: how many of its reviewers are not authors of the file. A review by one of the file's own authors does not count as external review, so a file checked only by the people who wrote it reads as never reviewed.
  • Two flags, one list — a file is dominated when its top author's share reaches the threshold (0.8 by default), and never_reviewed when it has no external reviewers. A file that is both is at_risk, and at_risk_files collects exactly those paths. The list is a statement of fact about concentration and coverage; it carries no judgement about the people involved.
  • Summary counts — how many files were analysed, how many are at risk, how many have a single author, and how many were never externally reviewed.

Duplicate author names inside one file are merged by summing their commits before anything is computed, and reviewer names are de-duplicated. The top-author share is rounded to four decimal places, and the domination check compares that rounded share — the number the report itself shows — against the threshold, so a file reported at exactly the threshold is always flagged dominated. Every list in the result is sorted ascending, so the same data always yields exactly the same map. Malformed input — a missing or empty file list, a duplicate path, an author with no commits — is a validation error naming the offending path (for example files[1].authors[0].commits must be an integer >= 1), and no partial map is produced. The computation is pure and local: no network, no configuration, no files read beyond the input you pass in.

CLI

bash
npx @reneturcios/busfactor analyze --input args.jsonnpx @reneturcios/busfactor --version

args.json contains the full arguments object:

json
{  "files": [    { "path": "src/solo.ts", "authors": [{ "name": "amy", "commits": 10 }] },    {      "path": "src/shared.ts",      "authors": [        { "name": "amy", "commits": 5 },        { "name": "bob", "commits": 5 }      ],      "reviewers": ["amy", "cleo"]    }  ]}

reviewers defaults to [] per file, and threshold defaults to 0.8. Here src/solo.ts is single-author and unreviewed, while src/shared.ts is split evenly and was externally reviewed by cleo. The map is printed as JSON:

json
{  "files": [    {      "path": "src/shared.ts",      "total_commits": 10,      "distinct_authors": 2,      "top_author": "amy",      "top_share": 0.5,      "external_reviewers": 1,      "never_reviewed": false,      "dominated": false,      "at_risk": false    },    {      "path": "src/solo.ts",      "total_commits": 10,      "distinct_authors": 1,      "top_author": "amy",      "top_share": 1,      "external_reviewers": 0,      "never_reviewed": true,      "dominated": true,      "at_risk": true    }  ],  "at_risk_files": ["src/solo.ts"],  "summary": {    "total_files": 2,    "at_risk_count": 1,    "single_author_count": 1,    "never_reviewed_count": 1  }}

Exit codes: 0 on success, 1 on a runtime error (including an unreadable or invalid input file, or invalid input), 2 on a usage error.

MCP server

bash
npx -y @reneturcios/busfactor mcp

MCP client config:

json
{  "mcpServers": {    "busfactor": {      "command": "npx",      "args": ["-y", "@reneturcios/busfactor", "mcp"]    }  }}

Tools

  • analyze_bus_factor — Map single-author, never-reviewed files from authorship and review data.

    • files (array, required, at least one) — files as {path, authors, reviewers?} objects; path is unique across the set, each authors entry is a {name, commits} pair with at least 1 commit, and reviewers lists names that reviewed changes to the file
    • threshold (number, optional, default 0.8) — the top-author share at or above which a file counts as dominated by one author; must be > 0 and <= 1

    Returns {files, at_risk_files, summary}.

Docker

bash
docker run -i ghcr.io/cloudcorprecords/busfactordocker run --rm -v "$PWD:/w" ghcr.io/cloudcorprecords/busfactor analyze --input /w/args.json

Development

bash
npm installnpm run build   # tsc -> dist/npm test        # tsx --test test/*.test.ts (pure local, no network)npm run dev     # run the CLI from source

License

MIT — Copyright (c) 2026 Rene Turcios

来源:README.md,提交 154faf7

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.0最新Nov 3, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分