
SpecForge
io.github.leaderiop由 GitHub 账号 leaderiop 发布v0.1.0-rc1更新于 Oct 26, 2026
Turn your team's rules into checks your AI agent can't skip. Deterministic, no AI inside.
概览
确定性的规格编译器,让 AI 代理通过 MCP 读取、查询并编辑受规则校验的项目实体图。
- 可以做什么
- 读取并查询由项目内 .spec 文件编译而成的实体与链接图
- 通过类型化操作新建和修改实体与链接,违反规则的改动会被拒绝
- 校验规格,把失效引用、缺失内容和未被证明的承诺报告为错误与警告
- 基于模型回答问题,例如某个角色使用哪些渠道、哪些内容尚未排期
- 在你批准测试命令后,记录哪些测试证明了哪些实体
- 适用场景
- 适合希望代理依据结构化、可机器校验的知识工作,而不是依据散文式规格、PRD 或制度文档的场景;也适合要求违规改动被拒绝而非被悄悄跳过的团队。可用于软件规格、产品计划,以及任何有值得校验规则的领域,前提是有对应的扩展。
- 运行要求
- 作为本地 MCP 服务器运行,通过 specforge mcp 命令并指定项目的绝对路径启动;项目需先用 specforge init 初始化并启用所需扩展。以单一二进制分发,无依赖;形式化证明还需在 PATH 中提供 z3 求解器。未声明认证、环境变量或请求头。
安装
在 SourceWeft 中
- 打开 控制台中的 SpecForge,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
See it in 60 seconds · How it works · What you can build · Docs
SpecForge turns what your organisation knows into rules your AI can't skip.
You write down your things, how they link, and the rules they must obey. SpecForge compiles that into one typed, checked graph. People and AI agents read it and change it through standard protocols (CLI, MCP, LSP), and a change that breaks a rule is refused, whoever made it.
It works for software specs, product plans, quality procedures, or any field with rules worth checking. SpecForge doesn't know your field until you install an extension that teaches it.
The problem
AI can now do real work: write code, draft a launch plan, prepare a batch record. What it works from is the weak part.
The knowledge that should guide it sits in places nothing enforces:
- Documents and specs in prose (PRDs, Markdown specs, policies, brand guides). An agent can misread a rule or skip it, silently. Nothing checks that the document is complete or that its parts agree.
- Wikis and decks drift away from reality, and nothing breaks when they do.
- Traceability (which requirement has a test, which procedure has an approval, which campaign has a source for its claim) is a spreadsheet someone updates by hand, until they stop.
- Every session starts from zero. The agent re-reads dozens of files to rediscover what you meant, and still guesses.
The more work you give to AI, the worse this gets. It produces faster than anyone can review.
This isn't a problem with the model. It's a problem with where your rules live.
The idea: hard skills, not soft skills
There are two ways to teach an AI how your organisation works.
A soft skill is advice placed in the AI's context: a prompt, a Markdown spec, a policy PDF, a skill file. It helps, but it's prose. The AI may follow it, or not.
A hard skill is a rule a program enforces. The AI can't skip it, because the check fails and says why.
SpecForge is an engine for hard skills. Think of it as a type checker for what your organisation means.
The five parts
The core grammar knows five structural words: spec, ref, use, define, defaults. Every other word in a
spec (behavior, persona, invariant, campaign, procedure) and every rule ("an invariant must be enforced
by a behavior", "a journey's persona must exist") exists only because an extension declares it.
These extensions ship inside the binary, as a starter set:
Turn one on with specforge add @specforge/product. The full list is in the
extension inventory. To teach SpecForge your own field, see
Extending SpecForge and the extension SDK.
What you can build with it
- Software spec frameworks. The builtin software extensions already give agents a checked spec to build
against, with tests that name the promise they prove. Methods like GSD, BMAD, OpenSpec and SpecKit are a
vocabulary plus rules, so each can become an extension, with its state in checked entities instead of
Markdown files. A GSD family (
@gsd/*) is being designed; the others are not started. - Product and marketing. Personas, channels, journeys, features and releases in one checked map that an agent can report from ("which channels does this persona use?", "what is unscheduled?"). Campaigns, audiences and claims can be added with your own extension.
- Regulated industries. Pharma (GxP), medical devices, safety cases: procedures, deviations and approvals with the rules an auditor expects, in version control and checked in CI. The AI drafts, the rules check, a qualified person signs. You write this extension yourself today; none ships yet.
- Your own domain. Any business with entities and rules worth checking. SpecForge can be the product you use, or the harness the business runs on: extensions as its domain, the graph as its memory, AI models as its workers.
The use cases say what works today and what is roadmap for each, and examples has projects you can run.
See it in 60 seconds
No agent needed. Install, create a product plan, then try to break it:
The edit is refused and nothing is written. Declare the channel first, and the same edit goes through:
An agent makes the same edits over MCP, and gets the same refusals. Hand-written files get the same check:
A reviewer reads. A check resolves. Errors always fail the check; warnings fail it too with
specforge check --strict, which is what you run in CI.
Use it with your agent
1. Install. SpecForge is a single binary with no dependencies.
Other ways to install
Prebuilt archives for macOS, Linux and Windows are on the Releases page. Formal proofs (@specforge/formal) also need the z3 solver on your PATH; everything else works without it.
2. Create a project with the extensions your work needs:
This writes a specforge.json and a first file in spec/. In a Cargo or vitest project, it also turns on the
matching test runner.
3. Connect your agent. SpecForge speaks MCP, so any MCP client can read, query and edit the graph. Use an absolute path:
In Cursor, one click adds it for the open project (${workspaceFolder}):
Other MCP clients
4. Ask your agent. For example:
Write a spec in
spec/for the feature I described: the behavior, the rules it must never break, the events it emits, and what proves each one. Validate it with the SpecForge tools and fix every error before you show it to me.
5. Read the result yourself.
6. Link your proof. For software, each test names the entity and obligation it proves. Follow the
Rust or vitest guide, then run
specforge collect. It asks once before running your test command, and records what each test proves.
Do I have to learn a new language?
You'll want to read it, because the graph is what you approve. You rarely need to write it: your agent
writes and fixes the files, or edits them through specforge new, set and link, and the check tells it when
it's wrong.
It's built to be easy to read. Each block is one thing, with a kind, a name, a title, and fields, like a filled-in form:
To write specs by hand, start with the authoring tutorial, the worked example and product getting started.
Surfaces
Not built yet, so not claimed: connections to outside systems (a CRM, an issue tracker, a quality system), and proof beyond test results. Extensions are pure WASM today: no files, no network.
How is this different from…
What SpecForge is not
- Not an AI. It makes no model calls. It's a deterministic compiler, written in Rust. The AI is yours.
- Not a generator. It checks knowledge. Your agent produces the work.
- Not a test framework. Your tests stay in
cargo testor vitest. SpecForge runs them only after you approve the command, and records what they prove. - Not only for software. Software is one of its biggest uses, not its definition.
Learn more
- Vision: why SpecForge exists, its principles, the north star and the use cases.
- Authoring tutorial: writing
.specfiles from zero, with a cookbook, best practices and troubleshooting. - Extending SpecForge: teach it your field, with the extension SDK.
- Test tracing for Rust and for vitest: link tests to the entities they prove.
- Formal verification: specs an SMT solver checks, with counterexamples at exact locations.
- Quick reference: every command, entity kind and diagnostic code on one page.
- Architecture, the crate map and Contributing: how SpecForge is built, what each crate owns, and how to work on it.
- Documentation hub: everything else.
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
来源:README.md,提交 656ed2d
工具
0版本历史
1- v0.1.0-rc1最新Oct 22, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分