Keep AI-written TypeScript inside an architecture you can trust.
One architecture config. One check. One coach.
When your agent writes TypeScript, ArkGate stops it from breaking the layers — and CI rejects the merge if it still does.
- 04 Presentation
- 03 Application
- 02 Domain
- 01 Infrastructure — contract active
02 / One minute
Install. Apply. Ask the doctor.
Four lines. That is the product. Stuck? Run doctor. Do #1.
03 / Contract
Domain does not import Infrastructure. As data.
The architecture is ark.config.json.
Agents read it. CI enforces it.
{
"include": ["src"],
"layers": [
{
"name": "Domain",
"patterns": ["src/domain/**"],
"forbiddenGlobals": ["fetch", "Date.now"]
},
{ "name": "Infrastructure", "patterns": ["src/infrastructure/**"] }
],
"rules": [
{ "from": "Domain", "to": "Infrastructure", "allowed": false }
]
}
src/domain/order.ts
Domain cannot import Infrastructure.
04 / Doctor
One light. One next move.
Thin or new tree
Finish start. Run doctor again.
Not fully protected
Do action #1 until the light moves.
Honest edges
Boundaries hold. Keep required CI.
Imports clean. Design not finished.
One small refactor at a time.
One minute
One architecture config. One check. One coach.
When your agent writes TypeScript, ArkGate stops it from breaking the layers.