{
  "$schema": "../../../skill/references/schemap.schema.json",
  "kind": "workflow",
  "title": "CI/CD pipeline",
  "subtitle": "From push to production",
  "lanes": [
    { "id": "dev", "label": "Developer" },
    { "id": "ci", "label": "GitHub Actions" },
    { "id": "cd", "label": "Argo CD" },
    { "id": "fail", "label": "Failure", "tone": "exception" }
  ],
  "phases": [
    { "id": "ci-p", "label": "Integrate", "nodes": ["push", "lint", "test", "build"] },
    { "id": "cd-p", "label": "Deliver", "nodes": ["staging", "smoke", "prod"] }
  ],
  "nodes": [
    { "id": "push", "type": "client", "lane": "dev", "card": { "title": "Push branch" } },
    { "id": "lint", "type": "service", "lane": "ci", "card": { "title": "Lint + typecheck" } },
    { "id": "test", "type": "service", "lane": "ci", "card": { "title": "Tests", "subtitle": "4 shards" } },
    { "id": "build", "type": "storage", "lane": "ci", "card": { "title": "Build image", "subtitle": "push to GHCR" } },
    { "id": "staging", "type": "service", "lane": "cd", "card": { "title": "Sync staging" } },
    { "id": "smoke", "type": "service", "lane": "cd", "card": { "title": "Smoke tests" } },
    { "id": "prod", "type": "service", "lane": "cd", "card": { "title": "Promote to prod", "tag": "on merge" } },
    {
      "id": "notify",
      "type": "external",
      "lane": "fail",
      "card": { "title": "Notify author", "subtitle": "Slack + PR check" }
    }
  ],
  "edges": [
    { "id": "a", "from": "push", "to": "lint", "tone": "main" },
    { "id": "b", "from": "lint", "to": "test", "tone": "main" },
    { "id": "c", "from": "test", "to": "build", "tone": "main" },
    { "id": "d", "from": "build", "to": "staging", "tone": "main" },
    { "id": "e", "from": "staging", "to": "smoke", "tone": "main" },
    { "id": "f", "from": "smoke", "to": "prod", "tone": "main" },
    { "id": "x1", "from": "test", "to": "notify", "label": "red", "tone": "error" },
    { "id": "x2", "from": "smoke", "to": "notify", "label": "red", "tone": "error" }
  ]
}
