
Guard
io.github.codapultPublished by GitHub account codapultv0.14.1Updated Nov 11, 2026
Local-first architecture guardrails and project context for JS/TS AI coding agents.
Overview
Local-first architecture guardrails for JS/TS projects: maps the codebase, checks approved boundaries, and shares context and verification results with AI…
- What you can do
- Map a JavaScript or TypeScript repository's structure, dependencies and boundaries
- Review and approve proposed architecture rules, contracts and baseline under a project folder
- Verify changed files against approved rules and show which rule a violating import triggered
- Report change impact and prepare bounded, redacted context for AI review
- Produce deterministic CLI, JSON and SARIF results for local use and CI
- When to use it
- Useful when a team wants an AI coding agent to respect project-specific architecture rules that a type checker cannot express, and to run the same local or CI verification as developers. It complements, rather than replaces, TypeScript, linters, tests and dependency scanners.
- Requirements
- Runs as a local stdio process installed from the npm package @codapult/guard; needs Node.js 20.19 or newer and a JavaScript or TypeScript project. Initialization generates a project model, rules and baseline that should be reviewed. No network listener, no application-level authentication and no declared environment variables.
Installation
In SourceWeft
- Open Guard in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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.
Source: README.md at commit 9495f87
Tools
0Version history
11- v0.14.1LatestNov 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
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts