CoStrict puts a four-stage gate in front of AI-generated code
Costrict - strict AI coder for enterprises, quality first, including AI Agent, AI CodeReview, AI Completion.
At a glance
- What is it?
- CoStrict is an Apache-2.0 coding assistant from Sangfor aimed at teams that cannot let a model write straight into a repository, built around a staged Strict Mode, RAG-based code review and self-hosted deployment. The staging is the product; the completion is incidental.
- Who is it for?
- Adopt CoStrict if your review board has to be able to trace how a change was produced and your model traffic cannot leave the network. Skip it if a single developer wants fast autocomplete on a small codebase, or if you have no private deployment to run.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 46 days ago.
- What is it written in?
- Mainly TypeScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.
Star history
- zgsm-ai/costrict4,463 ★ · +52
| Repository | 2026-09-12 | 2026-11-15 |
|---|---|---|
| zgsm-ai/costrict | 4.4k | 4.5k |
52 Stars in the last 64 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
Strict Mode breaks one prompt into requirements, architecture, plan and tests
Strict Mode routes a request through requirements analysis, architecture design, task planning and test generation as distinct stages. The README says this standardizes AI-generated code workflows for enterprise scenarios to keep outputs high-quality and controllable.
The audience follows from that decision. CoStrict targets organisations with a private deployment requirement, a security review, or a code review process that has to justify each change. The extension ships with default modes named Code and Orchestrator, and custom modes are supported, so a team can encode its own house rules on top of the standard path rather than starting from nothing.
The repository is TypeScript and organised as a pnpm workspace with `apps/`, `packages/`, `webview-ui/` and `schemas/` at the top, driven by turbo. Node 20.19.2 is pinned in `engines` and pnpm 10.8.1 as the package manager, which tells you the build expects a specific toolchain rather than anything on PATH.
Repository-wide RAG review, checked by more than one model
The second half of the product is review. CoStrict indexes the repository and analyses it with retrieval rather than a single file's worth of context, then applies multi-expert model verification strategies, meaning more than one model judges the same change. The point of the second opinion is disagreement: a reviewer model that is wrong in the same direction as the writer is worthless, so the design assumes heterogeneity rather than one strong judge.
Context handling is the other half. Files and folders enter the conversation by mention, with @ file or folder references, and Lite Mode exists to cut context size and token consumption when a large repository would otherwise dominate the window. Vibe Code sits on the other end of that dial, driving development through natural language dialogue without the staged path. History is cleaned up automatically to reduce disk usage, and it can be exported and imported, which matters when you move a machine from a pilot to a department.
Large context is the part that will decide your adoption. The README gives no size ceiling, no index rebuild command and no guidance on what happens when the index is stale.
Four distribution paths, and the bundle step only a self-builder sees
Installation splits by where the code runs. The VS Code extension comes from the marketplace under two identifiers, `zgsm-ai.zgsm` and a nightly `zgsm-ai.zgsm-nightly`, so you choose a stable track or a fast one. The CLI is documented separately at docs.costrict.ai and downloaded from costrict.ai/download. The JetBrains plugin is not in this repository at all: it lives at github.com/zgsm-sangfor/costrict-for-jetbrains, so its update schedule is not the one you see here.
There is no install command in the README. If you are building from source instead of taking a published artefact, the packaging path in `package.json` is the one to read, and every bundle target runs the same generator first.
node scripts/generate-review-builtin.mjs && turbo bundle --log-order grouped --output-logs new-onlyExpect `generate-review-builtin.mjs` to run before the build reaches turbo, and expect the extension package targets (`vsix`, `bundle:nightly`) to make you repeat that step. Repository setup runs `node scripts/bootstrap.mjs` on preinstall and install, and husky installs on `prepare`, so a clone with hooks disabled will behave differently from one without. Nothing else in the README describes a first run, so the Cloud option at docs.costrict.ai/cli/product-characteristics/cloud is the path the project points new users toward.
MCP, skills and OpenSpec extend the surface the model can reach
Connectivity is where an assistant stops being an editor feature. CoStrict speaks MCP, the standardized way to reach APIs, databases and custom tools, which means the same request can query an internal service before it writes code. Skills support adds task-specific workflows, and image input gives the model visual context for a screenshot of a stack trace or a UI mock.
The OpenSpec integration is the most opinionated piece. It comes from the external Fission-AI project and gives a standardised change proposal workflow driven by a `/openspec-init` command, so a written proposal exists before code moves.
Model choice is deliberately not locked, and nothing is pinned to one vendor. Built-in free models sit alongside support for Anthropic, OpenAI, any OpenAI-compatible endpoint and local models, so a private deployment can keep inference on hardware you own. The README does not document per-model behaviour differences inside Strict Mode, and you should assume a weaker local model produces a weaker plan without being told otherwise.
The upstream sync underneath the enterprise branding
A skim of the README misses the project's upstream lineage. The acknowledgements name RooCodeInc/Roo-Code and anomalyco/opencode as open-source partners, and the repository agrees: there is a `sync-upstream.md` at the root, a `.roo/` directory, a `.roomodes` file, `.git-blame-ignore-revs`, and `.env.sample` carrying `CLERK_BASE_URL` plus `ROO_CODE_API_URL` and `ROO_CODE_PROVIDER_URL` pointing at localhost. Those are the seams of an upstream-tracked fork, not the leftovers of an in-house editor.
This has a practical consequence. Upstream fixes arrive by sync, and the distribution track you picked, the stable `zgsm-ai.zgsm` item or the nightly one, decides how fast a fork-specific patch reaches you. Second, the README's own disclaimer is blunt for a product marketed as enterprise-grade: Sangfor makes no warranties about the code, models or outputs, and lists intellectual property infringement among the risks you assume. Read that posture literally before you attach a legal review to this tool.
On maintenance, the repository is not archived and the last push was on 2026-09-30 and v3.0.23 shipped that day.
What CoStrict cannot do for you
Staged generation has a failure mode of its own: a plan can be approved and still be the wrong plan, and four stages of prose give reviewers a document to argue with rather than code to run. Code Review shares the blind spot. It retrieves from an index of the same repository that produced the change, so a wrong assumption baked into the index is invisible to the reviewer that reads it, and no staleness handling is documented.
Two more boundaries. Private deployment is described as physical isolation with end-to-end encryption, but the README gives no hardware sizing, no reference topology and no upgrade path, so a self-hosted roll-out is a project, not an install. And private deployment says nothing about model quality: a local model small enough for an air-gapped network will not produce a Strict Mode plan to the standard a frontier API model does.
What this means in practice is that CoStrict governs process, not correctness. If your real risk is that generated code is subtly insecure rather than undocumented, the staged workflow is buying you a reviewable trail, which is a different thing.
Against a plain API model and a bare coding agent
The obvious alternative is a general coding agent such as opencode, which the README itself acknowledges as a partner, driven straight at a repository with no mandatory staging. The difference in approach is not model quality. It is that CoStrict stages generation through requirements analysis, architecture design, task planning and test generation, indexes the repository for review, and can keep inference on models you host; a bare agent optimises for the loop of read, edit, test, repeat and expects a human to catch the design mistakes afterwards.
The other alternative is no tool at all: a chat window with an Anthropic or OpenAI endpoint and a human who pastes diffs into review. CoStrict costs more to stand up than that and pays for itself only if the audit trail or the private inference path is the binding constraint.
Between the two, pick the agent if your constraint is developer speed and the repository is small. Pick CoStrict if someone will eventually ask why a given change exists.
Editorial conclusion
Adopt CoStrict if your review board has to be able to trace how a change was produced and your model traffic cannot leave the network. Skip it if a single developer wants fast autocomplete on a small codebase, or if you have no private deployment to run. Before anything else, check whether your own model endpoint can serve the Anthropic or OpenAI-compatible calls the extension makes, because the README lists provider support but documents no fallback when the endpoint is unreachable. Check the DISCLAIMER wording against your own code review policy before you attach a sign-off to it.
Frequently asked questions
How do I install the CoStrict VS Code extension?
The README does not give an install command. It points to the Visual Studio Marketplace, where the extension is published as zgsm-ai.zgsm with a separate nightly build at zgsm-ai.zgsm-nightly, and it links an installation guide at docs.costrict.ai/en/guide/installation.
What is Strict Mode in CoStrict?
Strict Mode standardises generation into requirements analysis, architecture design, task planning and test generation, to keep AI-generated output high-quality and controllable in enterprise scenarios.
Can CoStrict be deployed on our own infrastructure?
Yes. The README describes professional private deployment with physical isolation and end-to-end encryption, and it supports Anthropic, OpenAI, OpenAI-compatible and local models. It does not document hardware sizing or a reference topology.
Does the CoStrict JetBrains plugin live in the same repository?
No. The README links the JetBrains plugin to a separate repository, zgsm-sangfor/costrict-for-jetbrains, so its update schedule is not the one tracked in zgsm-ai/costrict.
What does CoStrict Code Review use to read a large repository?
It indexes the repository and runs retrieval-based analysis over that index, then applies multi-expert model verification strategies. Context enters through @ file or folder mentions, and Lite Mode reduces token consumption.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/zgsm-ai-costrict)Star history chart for your README
[](https://hysenlabs.com/projects/zgsm-ai-costrict)Was this useful?