Skip to content

Linting & Review

AI-assisted architecture review. Five POST endpoints, all taking the same body: {"source": "<diagram source>"}. An optional diagram_type is accepted but auto-detected when omitted.

Base URL: https://archlint.dev · 30 req/min per IP.

The clear set

Endpoint What it does Returns
POST /api/lint Structural lint — find missing boundaries, unlabelled edges, dangling refs violations[], summary
POST /api/advice C4 completeness score + level detection score, detected_level, confidence
POST /api/review Peer-style review, findings ranked by severity critical_count, warning_count, findings[]
POST /api/optimize Auto-fix the source + list changes optimized_source, changes[]
POST /api/split Decompose a system into components components[]

Typical order: lint → review → optimize → split → advice.

1. Lint — structural problems

curl -s https://archlint.dev/api/lint -H 'Content-Type: application/json' \
  -d '{"source":"@startuml\nAlice -> Bob\n@enduml"}'
{
  "violations": [
    { "severity": "warning", "message": "Unlabelled edge", "line_number": 2 }
  ],
  "summary": { "errors": 0, "warnings": 1 }
}

severity ∈ error | warning | info.

2. Advice — C4 completeness score

curl -s https://archlint.dev/api/advice -H 'Content-Type: application/json' \
  -d '{"source":"@startuml\n!include <C4/C4_Context>\nPerson(u, \"User\")\nSystem(s, \"Sys\")\nRel(u, s, \"Uses\")\n@enduml"}'
{ "score": 82, "detected_level": "C4_Context", "confidence": 0.94, "summary": "…" }

score is 0–100; detected_level is one of C4_Context, C4_Container, C4_Component, C4_Deployment.

3. Review — severity-ranked findings

curl -s https://archlint.dev/api/review -H 'Content-Type: application/json' \
  -d '{"source":"@startuml\nAlice -> Bob\n@enduml"}'
{
  "critical_count": 0,
  "warning_count": 2,
  "findings": [
    { "severity": "warning", "message": "Unlabelled relationship" },
    { "severity": "info", "message": "Consider adding a system boundary" }
  ]
}

severity ∈ critical | warning | info.

4. Optimize — auto-fix the source

curl -s https://archlint.dev/api/optimize -H 'Content-Type: application/json' \
  -d '{"source":"@startuml\nAlice -> Bob\n@enduml"}'
{
  "optimized_source": "@startuml\nAlice -> Bob : request\n@enduml",
  "original_source": "@startuml\nAlice -> Bob\n@enduml",
  "auto_fixes": [ { "description": "Labelled unlabelled edge" } ],
  "changes": [ { "description": "Added label 'request'" } ]
}

5. Split — decompose into components

curl -s https://archlint.dev/api/split -H 'Content-Type: application/json' \
  -d '{"source":"@startuml\n[Web] -> [API] -> [DB]\n@enduml"}'
{ "components": [ { "name": "Web" }, { "name": "API" }, { "name": "DB" } ] }

Errors

  • 502 / 504 — the Python comprehension backend is down or timed out (30s). Retry with backoff.
  • 429 — rate limit, with Retry-After.
  • Non-2xx responses carry {"error": "…"}.