ArkGate
ArkGate 4.7.5 on npm latest

Write. Check. Ship.

When the agent writes a bad import, the write doesn’t land. The same check fails the pull request.

Not an API Gateway. Not a folder linter. If the check is not required on the PR, the config is just documentation.

npm install -D arkgate
Four glass architecture layers — Presentation, Application, Domain, Infrastructure — with the rules file active
  1. 04 Presentation
  2. 03 Application
  3. 02 Domain
  4. 01 Infrastructure — rules file active

01.5 / The Problem

AI writes spaghetti code at light speed.

Agents take the shortest path. If they need data in a Domain layer, they might directly import a database adapter.

Traditional linters catch these architectural violations in CI after the agent has finished its work, breaking the flow and requiring manual intervention.

ArkGate solves this by shifting the check to the exact moment of writing. By intercepting file writes through IDE hooks or MCP, it ensures that if the agent writes a bad import, the write doesn't land. The agent gets immediate feedback and can self-correct before saving to disk.

02 / One minute

Install. Apply. Run doctor.

Four lines. That is the product. Stuck? Run arkgate-check --doctor. Do #1.

npm install -D arkgate typescript
npx arkgate start
npx arkgate start --apply
npx arkgate-check --doctor

03 / Rules file

Domain does not import Infrastructure. As data.

The rules file is ark.config.json. Agents read it. CI enforces it.

ark.config.json
{
  "include": ["src"],
  "layers": [
    {
      "name": "Domain",
      "patterns": ["src/domain/**"],
      "forbiddenGlobals": ["fetch", "Date.now"]
    },
    { "name": "Infrastructure", "patterns": ["src/infrastructure/**"] }
  ],
  "rules": [
    { "from": "Domain", "to": "Infrastructure", "allowed": false }
  ]
}
Denied

src/domain/order.ts

Domain cannot import Infrastructure.

04 / Doctor

One light. One next move.

Suggest

Thin or new tree

Finish start. Run doctor again.

Adapt

Not fully protected

Do action #1 until the light moves.

Enforce

Honest edges

Boundaries hold. Keep required CI.

Enforce · leftover design work

Imports clean. Design not finished.

One small refactor at a time.

One minute

Write. Check. Ship.

When the agent writes a bad import, the write doesn’t land.

npx arkgate start