
Guard
io.github.codapult由 GitHub 账号 codapult 发布v0.14.1更新于 Nov 11, 2026
Local-first architecture guardrails and project context for JS/TS AI coding agents.
概览
面向 JS/TS 项目的本地优先架构护栏:梳理代码库、校验已批准的边界,并向 AI 代理提供项目上下文与校验结果。
- 可以做什么
- 梳理 JavaScript 或 TypeScript 仓库的结构、依赖与边界
- 审阅并批准生成的项目模型、规则、契约与基线
- 按已批准的规则校验改动文件,并指出触发了哪条规则
- 展示改动影响,并准备有范围、已脱敏的上下文供 AI 审阅
- 输出确定性的 CLI、JSON 与 SARIF 结果,供本地和 CI 使用
- 适用场景
- 适合希望 AI 编码代理遵守类型检查器无法表达的项目专属架构规则,并与开发者使用同一套本地或 CI 校验的团队。它补充而非替代 TypeScript、Lint、测试与依赖扫描工具。
- 运行要求
- 以本地 stdio 进程运行,通过 npm 包 @codapult/guard 安装;需要 Node.js 20.19 或更高版本以及一个 JavaScript 或 TypeScript 项目。初始化会生成项目模型、规则与基线,需人工审阅。无网络监听、无应用层认证,也未声明环境变量。
安装
在 SourceWeft 中
- 打开 控制台中的 Guard,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
@codapult/guard
[CI] [Fixtures] [npm] [License: MIT] [Node.js >=20.19] [TypeScript] [MCP Registry] [MCPSafe] [codapult-guard MCP server – quality and maintenance score on Glama]
Architecture guardrails for AI-assisted development
Codapult Guard helps teams preserve the architecture that makes their project work as it changes. It maps a JavaScript or TypeScript codebase, lets the team approve project-specific boundaries, and checks future changes locally and in CI. AI agents can use the same project context and verification results as developers.
Catch project-specific regressions
A type checker can confirm that code is valid TypeScript. It cannot know that this project requires client components to stay away from persistence modules. Once the team approves that boundary, Guard can detect a violating import in changed files and show which rule was triggered.
Guard discovers the architecture in the repository; it does not prescribe one universal structure or activate proposed rules without approval.
Get started
Requirements: Node.js >=20.19 and a JavaScript or TypeScript project.
Review the generated project model, proposed rules, contracts, and baseline under
.codapult/guard/ before relying on the results. Then run Guard's architecture checks:
verify can run your configured project checks and detected adapters. The flags above limit this
run to Guard's built-in checks. With npm, run npx codapult-guard verify --no-project-checks --tools off.
See the complete guide for initialization and daily workflows.
Use Guard with an AI agent
Install a managed instruction block for your agent so it knows when to load Guard context and run verification:
Supported hosts and MCP setup are in the AI-agent integration guide and host integration guides.
The MCP server uses host-managed local stdio, with no network listener or application-level authentication. The host and operating system control process access and workspace permissions; see the security model.
Choose a GitHub setup
Choose a preset from the existing workflow templates and follow only the hosting steps for that level of protection. Most projects can start with standard PR checks.
If you are unsure, use PR checks first. It is useful CI feedback, but its workflow lives in the project being checked and can be changed by a pull request. Choose trusted verification when the check itself must be protected from that change.
What Guard does
- Learns project-specific structure, dependencies, boundaries, and existing findings.
- Checks approved architecture rules and contracts without imposing a universal architecture.
- Shows change impact and prepares bounded, redacted context for AI review.
- Runs configured project checks and adapters when enabled; it does not replace them.
- Produces deterministic CLI, JSON, and SARIF results for local use and CI.
Guard is local-first and does not call an LLM. The AI host owns model access, edits, and its repair loop. Guard complements TypeScript, ESLint or Biome, tests, SAST, and dependency scanners; it does not replace them.
Documentation
- GitHub setup presets — choose and configure the CI level you need.
- Complete Guard guide — commands, policy, results, security, and advanced workflows.
- AI-agent integration — managed instructions and MCP workflow.
- Host integrations — Codex, Cursor, Claude Code, Copilot, Gemini CLI, and generic MCP clients.
- Policy mutation controls — approval and protected policy behavior.
- Extensions — adapters, output formats, and integration boundaries.
For contributors
Maintainer checks and project fixture coverage are documented in the fixture guide and release guide.
More from Codapult
Starting a SaaS from scratch? Codapult is a production-ready Next.js SaaS foundation built for AI-assisted development, with modular architecture, built-in AI, MCP context, and source code under your control.
License
MIT. See LICENSE.
来源:README.md,提交 9495f87
工具
0版本历史
11- v0.14.1最新Nov 11, 2026
- v0.13.3Nov 3, 2026
- v0.13.2Nov 1, 2026
- v0.13.0Nov 1, 2026
- v0.11.0Oct 31, 2026
- v0.10.0Oct 19, 2026
- v0.9.0Oct 15, 2026
- v0.8.1Oct 12, 2026
- v0.8.0Oct 2, 2026
- v0.7.0Sep 29, 2026
- v0.6.2Sep 28, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分