
Qualityforge
io.github.ninelegsdog由 GitHub 帳號 ninelegsdog 發布v0.2.3更新於 Nov 4, 2026
Evidence-first browser QA with read-only MCP server for AI agent debugging.
概覽
唯讀 MCP 伺服器,讓 AI 助理讀取 QualityForge 瀏覽器測試證據:失敗項目、缺陷產出物、不穩定測試、趨勢與無障礙稽核。
- 可以做什麼
- 檢視最近一次測試執行:計數、品質閘門結論、政策鏈與歷史結論
- 列出並讀取失敗項目與缺陷,包含主控台、網路與頁面錯誤訊號
- 分析跨執行的測試不穩定情況與通過率趨勢
- 檢視無障礙稽核紀錄及每條規則的節點計數
- 讀取最近執行摘要與單一缺陷的資源,並使用 triage_failure 提示
- 適用情境
- 適用於專案已在執行 QualityForge 或 Playwright 測試套件,並希望助理依據已保存的證據診斷失敗的瀏覽器測試,而非憑猜測,同時不賦予它修改程式碼或產出物的能力。
- 執行需求
- 以 npm 套件 qualityforge 形式透過 stdio 在本機執行,需要 Node.js 22 或更新版本;MCP 伺服器透過 qualityforge-mcp 指令或建置後的 dist 入口啟動。必須先有產出物:先執行測試套件與缺陷收集指令,或傳入絕對的 --root 目錄。Linux 是經驗證的平台,Windows 與 macOS 未經測試。未宣告任何驗證或環境變數。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Qualityforge,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
QualityForge
Evidence-first browser quality automation for modern web applications.
QualityForge is an open-source foundation on top of Playwright that turns a failing run into evidence a machine can read: normalized defect artifacts with trace, screenshot and video, a quality gate with explicit thresholds, capture of console, network and page-error signals — and a read-only MCP server that hands all of it to an AI assistant without granting it the ability to act.
[CI] [npm] [Node >= 22] [MCP protocol 2026-07-28] [License]
Status — stable, published.
[email protected]is on npm since 2026-10-21 (0.1.0on 2026-10-15 was the first stable release), and the defect contract isdefect.v1at 1.6.0. The0.xline still allows breaking changes in a minor, so pin the version you install.
Contents
- Why this exists
- What you get
- Quick start
- The demo app
- The evidence pipeline
- Defect artifacts
- The MCP server
- Configuration
- Commands
- Rules enforced in CI
- Documentation
- Contributing
Why this exists
Most teams end up with a pile of one-off UI tests per project: duplicated selectors, no shared failure evidence, no cross-project view of quality. QualityForge is a reusable core instead — one configuration, one evidence format, one set of quality gates, pointed at any web application.
The differentiator is not “AI writes tests”. Playwright already ships agents for that. It is the evidence layer between a failing run and any agent: defect artifacts normalized into one schema, readable without granting the reader the ability to act.
What you get
- An evidence pipeline. Trace on first retry, screenshot and video on failure, in Chromium, Firefox and WebKit. A run that fails still publishes its artifacts.
- One normalized defect format.
defect.v1, contract 1.4.0: a versioned, validated artifact per failure that extends Playwright'serror-context.mdrather than duplicating it. - A quality gate. The collector splits by spec × project, refuses duplicate ids, treats an aborted suite as one outage instead of a defect per test, and exits non-zero when thresholds are violated.
- Signal capture. Console errors, uncaught page errors, failed requests and
HTTP errors above 400 — redacted at the source, bounded per category, with a
signals.droppedcount so a truncated capture never looks complete. - A read-only MCP server. Protocol 2026-07-28, thirteen tools, resources and a
triage_failureprompt, verified against OpenCode v2.0.16 over real stdio. - Run history. One compact file per run, so “is this a regression or has it always been this way” has an answer.
- CI that checks itself. Six legs — lint and typecheck, unit tests on Node 22 and 24, the suite on three browsers — plus a job that installs the real OpenCode client and asserts the frames that cross the wire.
Quick start
Development requires Node.js 22 or newer — Node 20 reached end-of-life in
March 2026, and "engines": ">=22.0.0" says so instead of promising install
politeness. CI runs Node 22 and 24, and the floor is the lower of the two.
.nvmrc pins 22 for contributors: tsc dies with a segmentation fault under
one Node 24.21.0 build on this machine, reproducibly. If you use a version
manager, run nvm use before anything else.
Platforms. Linux is what CI runs and therefore what is verified. The core
is written to be platform-neutral — path.sep and path.relative throughout,
no POSIX-only calls — so Windows and macOS should work, and have not been
tested. Treat them as unverified rather than supported.
npm test starts the bundled demo app automatically, so a fresh clone runs
green with no configuration and no third-party network dependency. Open the
HTML report with npm run report. For a step-by-step path — seeing a real
failure with evidence, collecting defect artifacts, connecting an agent,
pointing the suite at your own application — follow
docs/quick-start.md, or
docs/quick-start.ru.md.
The demo app
fixtures/ is a small multi-page app that exists so the suite has something
real to test. It is not a mock: it renders, validates and fetches.
Every control is labelled, every message has a role, and every element the tests need has a stable handle — the suite asserts on what a user perceives, not on markup structure.
The evidence pipeline
The project's core promise is that a failure leaves enough evidence to diagnose it, and that claim is tested, not asserted:
This runs two deliberately failing tests and exits non-zero. Afterwards
test-results/ contains, per failure:
error-context.md is the most interesting one: it is written as an instruction
to an assistant — “explain why, be concise, respect best practices” — followed
by the test name, file location, error and the diff of expectations. It is the
raw material an agent needs, and it costs nothing extra.
On CI, prefer the trace viewer over screenshots and videos when debugging: it gives the DOM snapshot at each action plus the full network log.
Defect artifacts
A failing test is only useful if the failure can be read later without re-running anything. QualityForge turns each failure into one normalized, versioned artifact:
The artifact deliberately extends Playwright's error-context.md rather
than duplicating it: it records a path to that file and adds stable identity,
run correlation, VCS context, evidence pointers and a flakiness verdict. The
signals block — console errors, uncaught page errors, failed requests, HTTP
errors above 400 — is collected live by the bundled fixture, because “element
not found” is a symptom while “the page threw a TypeError” is the cause. See
docs/defect-schema.md for the full contract.
Accessibility is a second, separate measurement rather than a field on that
artifact: npm run a11y:audit runs axe-core against a page and writes
a11y-audit.v1 — capped at ten nodes per rule with the discarded count stated,
html reduced to structure because it carries page content, and target kept
because without it the nodes are indistinguishable. See
docs/a11y-schema.md.
npm run defects:collect doubles as a CI quality gate: it exits 0 when the
gate passes, 1 when thresholds are violated, and 2 when collection could
not run at all.
Installing the package
latest points at this release. Pin the version you want rather than trusting
a tag name anyway: npm forbids removing latest, so a tag can only ever move
forward, and a bare npm i qualityforge takes whatever it points at rather
than what you tested against.
A consuming project imports the fixture from the build — Playwright refuses to
transpile TypeScript under node_modules, so the fixture is shipped as a
subpath in exports:
That one import change is the whole integration: console, page-error and network capture become automatic. Everything captured is redacted at the source — URLs keep scheme, host and path with query strings and credentials removed, console text has tokens and JWTs replaced, sensitive header values are masked while their names are kept — and capture is bounded at 40 entries per category.
@playwright/test is a peer dependency: a consuming project brings its own,
and npm 7+ installs it automatically when it is missing, because the fixture
cannot run without it. The declared range is ^1.63.0; the number CI verifies
is 1.63.0, pinned exactly in devDependencies, and npm run package:check
fails if the package stops declaring the peer or npm stops installing it for
the consumer.
The bin entries publish the two commands a consuming project runs — always
through npx --no-install, which provably cannot reach the registry for
somebody else's code:
The MCP server
npm run mcp starts a read-only MCP server over stdio, speaking protocol
2026-07-28. It hands an agent the evidence layer: what failed, where, and what
the page was doing while it failed. Verified against OpenCode v2.0.16 on
Linux by connecting with the block below; Kilo and MiMo are out of scope by
decision — see the end of this section.
A project that installed the package needs no path at all:
["npx", "--no-install", "qualityforge-mcp"] runs the same server out of
node_modules/.bin. The command points into dist/, which npm ci builds
(prepare runs tsc) — or npm run build, if the install was done with
--ignore-scripts. opencode mcp list then reports the connection status;
run it more than once before you believe it — the status is a sample of a
connection still forming, not a verdict.
Plus resources for the latest run summary and any defect, and a
triage_failure prompt that asks for facts before hypotheses.
Before you connect
- Produce the artifacts first. The server exits 1 when it cannot find an
artifacts root, and the message saying so goes to stderr, which the client
discards — so all you see is
failed: Connection closed. Run the suite andnpm run defects:collectfirst, or pass--root <dir>. - Use absolute paths. A client spawns the server from your project directory, not from this checkout, so a relative root resolves somewhere that does not exist.
- Spell the runner out. The block points at
dist/, so nothing transpiles at connection time:initializewas answered in ~0.24 s here, against ~2.4 s for["npx", "tsx", …, "src/mcp/index.ts"], and OpenCode's documented default MCP timeout is 5000 ms. - Both config forms connect. The flat
mcp.<name>shown above and the V2-documentedmcp.servers.<name>were both connected on v2.0.16. The difference is which file wrote it, not whether it works.
Read-only by construction
There is no write path in the server: no tool mutates anything, and the store exposes no mutating method. Read-only is structural, not a promise.
Every client-supplied path is treated as hostile, because client-side path
allowlists are a convenience rather than a boundary. Absolute paths, ..
traversal before and after percent-decoding, NUL bytes and symlinks resolving
outside the root are all rejected — and the rejection message never echoes the
filesystem layout, since it can end up in a transcript.
Why the protocol is hand-written. The official @modelcontextprotocol/sdk
was checked rather than assumed: version 1.32.0 declares
LATEST_PROTOCOL_VERSION = "2025-11-25" and contains no server/discover, no
resultType, no ttlMs/cacheScope and no subscriptions/listen — it does
not implement 2026-07-28. The 2025-11-25 handshake is still accepted, because
a client that never sends initialize must still get tools/list.
Kilo and MiMo are not supported, by decision — not merely untested. The owner decided on 2026-10-03 not to pursue them: the server-side work a third client would require is better spent on the one client that is real. If you use them, nothing in this document says whether the block above is accepted.
Configuration
config/project.json declares the project name, the
origin under test, the evidence policy, gate thresholds, and where artifacts
are written. It is validated on load, and every problem is reported at once
with the exact path:
Run history
An optional history block keeps one compact file per run, so the question
“is this a regression, or has it always been this way” has an answer:
It is committed on purpose, unlike artifacts/: a history entry is a few
hundred bytes of counts and outcomes, and it is the only thing that makes a run
worth having had. Each entry records which specs did not pass, and two MCP
tools read it: quality_flaky_tests separates a spec that recovered from one
that never did, and quality_get_trend reports a direction over a window and
answers unknown below four runs. Left unset, history is off and nothing
extra is written.
Commands
The Python-based checks — mcp:check*, mcp:schema, mcp:live,
defects:check, docs:numbers, docs:support, docs:tools and ci:validate
— are separate scripts so that verify stays runnable with only Node installed.
mcp:live additionally needs the opencode binary; without it the check fails
rather than skips — a live-client check that quietly passes without a client
would be decoration.
Rules enforced in CI
page.waitForTimeout()is banned by a lint rule. It is the main cause of flaky tests; wait for a real condition instead.test.only()anddescribe.only()are banned. In CI they would silently skip the rest of the suite.@typescript-eslint/no-floating-promisesis an error. A forgottenawaiton a Playwright call makes a test quietly assert nothing.- Selector policy is a lint guard, not advice: CSS, XPath and the
text=shorthand in a literallocator()argument failnpm run lint. The hierarchy — role, then label, then text,data-testidlast — is indocs/selectors-and-testid.md. - Formatting and type checks must pass.
Everything in this repository follows the same rule: nothing is done until it has run in the real environment and been observed to fail for the right reason. Claims about reports, protocol frames and runner verdicts are checked against the real producers, never against a hand-written fixture.
Documentation
docs/quick-start.md— a step-by-step path from a fresh clone to an agent reading a real failuredocs/architecture.md— how the pieces fit togetherdocs/defect-schema.md— thedefect.v1contractdocs/a11y-schema.md— thea11y-audit.v1contractdocs/selectors-and-testid.md— locator policydocs/client-support.md— who was connected to the MCP server, and what was observeddocs/roadmap.md— where this is going, and where it is notdocs/parallel-work.md— how several agents work in this repository without collidingAGENTS.md— rules for coding agents working in this repoCHANGELOG.md— release history
To start a project from rather than to read: the template, https://github.com/ninelegsdog/qualityforge-template, installs this package from git, runs green from a fresh clone, and ships the MCP block already written.
Contributing
See CONTRIBUTING.md — set up, pull-request rules, test
expectations, and the expectations for AI-assisted contributions. Use the issue
templates for a bug report or a
feature request, and the
PULL_REQUEST_TEMPLATE.md when you open a
pull request.
Security issues: read SECURITY.md first — do not open a public
issue for them.
License
Apache-2.0 — see LICENSE. Be straightforward and assume good
faith: the community standards are in
CODE_OF_CONDUCT.md.
Why evidence-first?
Обычный тест-раннер говорит «failed». QualityForge говорит «почему упало» — собирает артефакты для быстрого разбора агентом или человеком.
Артефакты при падении
- Screenshot — скриншот состояния страницы в момент падения
- Trace/Video — трассировка Playwright для воспроизведения
- Logs — консольные логи и сетевые события
- HAR — сетевой трафик (опционально)
- Context — URL, viewport, шаги, ожидания
Интеграция с агентами
В комплекте read-only MCP-сервер. Агент может прочитать артефакты падения, понять контекст и предложить точечный фикс без догадок.
Used in production
QualityForge is used to verify the BotKit ecosystem of 9 production Telegram bots via botkit-farm. The MCP server enables AI agents to analyze test failures with full evidence (traces, screenshots, network logs) without direct access to modify code.
Agent Infrastructure Focus
Built as part of a broader agentic development infrastructure - harnesses, quality gates, and verification-first workflows for AI coding agents.
來源:README.md,提交 9ddcaf9
工具
0版本歷史
2- v0.2.3最新Nov 4, 2026
- v0.2.1Oct 31, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
