
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 分