{
 "schema_version": 1,
 "generated": "2026-10-26",
 "id": "supermax92-qgraphflow--keep-diagrams-synced-in-ci",
 "repo": "supermax92/qgraphflow",
 "repo_url": "https://github.com/supermax92/qgraphflow",
 "repo_slug": "supermax92-qgraphflow",
 "title": "Fail CI when a committed diagram drifts from the code",
 "page_title": "How to fail CI when a committed diagram drifts from the code with Qgraphflow",
 "summary": "Validate committed diagrams against the repo in CI so stale architecture views get flagged.",
 "who": "A team lead or DevOps engineer who keeps diagrams in the repo and wants them checked on every push and pull request.",
 "problem": "Diagrams in docs go stale silently after refactors, so they describe code that no longer exists.",
 "outcome": "A CI job that fails when a recorded file is gone, a line range no longer fits, or a recorded symbol has moved, and names the lines where the symbol now sits.",
 "steps": [
  "Commit your generated diagrams under docs/qgraphflow/ so each has a graph.json.",
  "Add a workflow file that runs on push and pull_request, using actions/checkout, actions/setup-node with node-version 22, and the validation loop from the README.",
  "Run `npx -y qgraphflow validate \"$graph\" --input-only --repo-root .` for each graph.json, as the README's CI example does.",
  "When the job fails, open a session and enter `/q-flow CI says docs/qgraphflow/<diagram-folder> is out of date. Refresh it.` (inferred, check the README)",
  "Commit the refreshed diagram and confirm the job passes."
 ],
 "agent_prompt": "In the repo <repo-path>, add a GitHub Actions workflow that validates every docs/qgraphflow/*/graph.json with `npx -y qgraphflow validate` using --input-only and --repo-root, as shown in the QGraphFlow README. Run the validation locally and report any diagram whose recorded files, lines or symbols no longer match the source.",
 "agents": [
  "claude-code",
  "codex",
  "cursor"
 ],
 "difficulty": "Advanced",
 "time": "45 minutes",
 "basis": "readme",
 "caveat": "Validation checks recorded files, line ranges and symbols against the repo, so it does not detect relationships that were never recorded in the diagram.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "javascript",
 "requirements": [
  "Node.js 22 or later",
  "A plugin-capable client such as Claude Code, Codex, Cursor or Qoder, with model access configured",
  "A local checkout of the application project you want to diagram"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/supermax92-qgraphflow/keep-diagrams-synced-in-ci/",
 "md": "https://dedupedai.com/use-cases/supermax92-qgraphflow/keep-diagrams-synced-in-ci/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/supermax92-qgraphflow--keep-diagrams-synced-in-ci.json",
 "api_version": "v1"
}
