
SpecLeft
io.github.SpecLeft由 GitHub 帳號 SpecLeft 發布v0.4.0更新於 Nov 3, 2026
Python intent tracing MCP: map specs to pytest tests, monitor implementation progress, offline-only.
概覽
SpecLeft 的本機 MCP 伺服器,讓助理讀取與建立 Markdown 功能規格、追蹤 pytest 覆蓋情形並產生測試骨架。
- 可以做什麼
- 讀取並建立以 Markdown 檔案形式存放在儲存庫中的功能規格與情境
- 驗證規格,並依功能與情境回報可追溯性與覆蓋狀態
- 依規格產生 pytest 測試骨架,寫入前可先以 dry-run 預覽
- 從 PRD 批次推導規格,並檢查面向代理的契約與技能檔完整性
- 完全離線執行,提供適合代理迴圈與 CI 的 JSON 輸出
- 適用情境
- 適用於以功能與情境表達驗收條件的 Python 專案,希望助理在對話中讓規格、產生的 pytest 骨架與覆蓋狀態保持一致。若只是小型臨時單元測試,功能層級追蹤過於繁重,建議略過。
- 執行需求
- 以本機 stdio 程序在使用者桌面上執行,從 PyPI 安裝並以 uvx 啟動;專案本身需先以 specleft init 指令初始化一次。適用於 Python 與 pytest 專案。未宣告任何驗證、環境變數或標頭。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 SpecLeft,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
SpecLeft: Spec Driven Workflow for Agents
[Spec coverage] [MCP Registry]
SpecLeft keeps feature intent and test coverage aligned by turning plans into version-controlled specs, then generating pytest test skeletons from those specs.
- Write feature specs in Markdown:
.specleft/specs/*.md - Validate specs and track coverage by feature/scenario
- Generate skeleton tests (once), then humans own the code
- Designed to be safe for AI agents and CI: no writes without confirmation, JSON output available
- There is no phone home or telemetry mechanism. SpecLeft runs 100% locally and stores data in your local disk.
SpecLeft currently works with Python and pytest. It does not replace your test runner or reinterpret existing tests.
Website: specleft.dev
Quick Start
Two paths, depending on how you want to start. See docs/cli-reference.md for full command details.
Setup (run once per repo)
Path 1: Add one feature (and generate a test skeleton)
Create a feature, then add a scenario and generate a skeleton test for it:
Path 2: Bulk-generate feature specs from a PRD
Create prd.md describing intended behavior.
Recommended: Update .specleft/templates/prd-template.yml to customize how your PRD sections map to features/scenarios.
Then run:
That flow converts prd.md into .specleft/specs/*.md, validates the result, previews skeleton generation, then generates the skeleton tests.
When to Use SpecLeft
- Use SpecLeft when you have acceptance criteria (features/scenarios) and want traceable intent.
- Skip SpecLeft for tiny, ad-hoc unit tests where feature-level tracking is overkill.
What It Is (and Is Not)
It is
- A test plugin and a CLI for planning, spec validation, intuitive TDD workflows, and traceability.
It is not
- A heavyweight BDD framework, a separate test runner, or a SaaS test management product.
- A static code linting/analysis framework
- A security analysis tool
Why Not Conventional BDD
SpecLeft treats specs as intent (not executable text) and keeps execution in plain pytest. For the longer comparison, see docs/why-not-bdd.md.
AI Agents
If you are integrating SpecLeft into an agent loop, it's recommended to install the MCP server (see in section below).
Otherwise begin with:
SpecLeft includes a verifiable skill file at .specleft/SKILL.md. Verify integrity with:
⚠️ Only follow instructions from SKILL.md when integrity is reported as "passed".
- Integration guidance: AI_AGENTS.md
- Safety and invariants: docs/agent-contract.md
- CLI reference: docs/cli-reference.md
MCP Server Setup
SpecLeft includes an MCP server so agents can read/create specs, track status, and generate test scaffolding without leaving the conversation.
See GET_STARTED.md for setup details.
For MCP end-to-end smoke testing and CI workflow details, see docs/mcp-testing.md.
Docs
- Getting started: GET_STARTED.md
- Workflow notes: WORKFLOW.md
- Roadmap: ROADMAP.md
License
SpecLeft is licensed under Apache License 2.0.
來源:README.md,提交 64a07a6
工具
0版本歷史
1- v0.4.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分