{
  "source_file": "0930",
  "source_platform": "Dev.to",
  "author": "Debashish Ghosal",
  "title_listed": "10 SDLC Checks AI Will Skip Unless You Make Them a Gate",
  "keywords": "",
  "domain": "大模型算法",
  "content_type": "深度技术解析",
  "is_paid_flag": "否",
  "url": "https://dev.to/debashish_ghosal/10-sdlc-checks-ai-will-skip-unless-you-make-them-a-gate-581k",
  "publish_date": "2026-09-15",
  "corpus_stage": "",
  "notes": "",
  "id": "1d5fdb3f1a08",
  "collected_at": "2026-10-02T14:06:04",
  "title": "10 SDLC Checks AI Will Skip Unless You Make Them a Gate - DEV Community",
  "body_markdown": "Do you trust AI code? Of course you don't. Not fully.\nAnd here is the part that's easy to miss: it usually isn't\nwrong\n. It's incomplete. The code compiles, the happy path works, the demo is clean. What's missing is the boring 20%: the dependency nobody verified, the step that runs before its prerequisite, the rollback that exists on paper and doesn't actually undo anything.\nI learned this building agent systems, not by reading about them. I ran 170 agent goals and watched a planner repeat the same three planning defects predictably. I ran 83 real agents through a tool-call gate. I spent a week fixing a matcher when the bug was six lines in the evaluator.\nIf add/commit/push and \"review the diff\" are second nature, this list is for you. If you're new, bookmark it. These are the checks that don't show up in a green CI run.\nEach item is one thing I now make a\ngate\ninstead of a guideline. A guideline is a hope. A gate is a test that fails the build.\n1. Verify every dependency before the step that needs it\nThe most common defect I measured: a plan declares a precondition that no earlier task establishes. The planner knows what should be true. It doesn't arrange the steps to make it true.\n[BLOCKER] unverified_dependencies, task=cutover_traffic_100\n  \"Cutover to 100% is dependent on prior stages being established\n   but lacks confirmation of stability before proceeding.\"\nEnter fullscreen mode\nExit fullscreen mode\nAcross 63 failing plans I collected\n57 blockers in this one family\n. The fix is a deterministic precondition closer that runs after the model produces a draft and refuses to pass until every precondition maps to an earlier task.\nIf AI says \"after verification,\" ask which task does the verifying. If the answer is \"it goes without saying,\" that's the bug.\n2. Order tasks after their hard prerequisites\n46 blockers\nwere pure sequencing errors. The cutover ran before the check. The backfill ran before the index was validated. The database was dropped before the backup finished.\nModels are good at listing the right steps and bad at ordering them. That's a graph problem, not a language problem. Enforce it with a topological check, not a prompt.\n[BLOCKER] unsafe_sequencing, task=backfill_vectors\n  \"Cannot proceed until the index is verified for quality;\n   it is ordered incorrectly in the sequence.\"\nEnter fullscreen mode\nExit fullscreen mode\nFull breakdown:\nThe Planner Made the Same 3 Mistakes Every Time\n.\n3. Require a\ncredible\nrollback on high-blast-radius steps\nNot just a rollback. A\ncredible\none. The planner put rollback on routine steps and skipped it on cutover, teardown, and failback, for 18 blockers.\n[BLOCKER] weak_rollback, task=dual_write_setup\n  \"Rollback only switches to single-write mode without addressing\n   the inconsistencies dual-write may have introduced.\"\nEnter fullscreen mode\nExit fullscreen mode\nA rollback that doesn't restore the prior state is decoration. Gate it by asking one question:\nif this step fails, does the declared rollback return the system to the known-good state?\nRollback coverage is not the metric. Rollback\nreachability\nis.\n4. Gate tool calls, not prompts\nEvery agent safety talk ends at the prompt. Prompt injection defense via prompt is a suggestion. The agent's tool call is the last place you can be deterministic, so make it a gate.\nI built\nAgent ToolTrust\naround four decisions, not two:\nallow\n,\naudit\n,\nescalate\n,\ndeny\n. Binary allow/deny forces a choice between over-privileged agents and approval fatigue. Four states give you a middle ground. And because the engine sits outside the model, no amount of prompt engineering can override a deny.\n@adapter.guard\n(\ntool_name\n=\n\"\ndeploy_service\n\"\n,\naction\n=\n\"\ndeploy\n\"\n,\nenvironment\n=\n\"\nproduction\n\"\n,\ndata_class\n=\n\"\nrestricted\n\"\n)\ndef\ndeploy_service\n(\nservice\n:\nstr\n)\n->\nstr\n:\n...\n# -> escalate: write action in prod on restricted data requires approval\nEnter fullscreen mode\nExit fullscreen mode\nTested against\n83 real agents across 10 frameworks, zero mocks\n. Write-up:\nI Stopped Trusting AI Agents With Tools\n.\n5. Fail closed on unknown input\nThe cheapest safety property to get wrong. Unknown tool, deny. Malformed input, deny. Engine crash, deny. The alternative is fail-open: an attacker who can crash the gate gets unrestricted access.\ndef\ndecide\n(\nrequest\n):\ntry\n:\nreturn\npolicy\n.\nevaluate\n(\nrequest\n)\nexcept\nException\n:\nreturn\nDENY\n# fail closed, never fail open\nEnter fullscreen mode\nExit fullscreen mode\nI wrote this as design decision DD-14 before the first line of code, because a near-miss teaches it more expensively than a spec does.\nIf your gate's failure mode is \"allow,\" it isn't a gate. It's a suggestion with logging.\n6. Count refusals and escalations as output, not failure\nA system that approves everything isn't safe. A system that refuses 96 of 97 strict goals and hands them to a human is doing exactly what it should.\nThe number that matters isn't approval rate. It's\nwhether the escalate path actually reaches a human with enough context to decide\n.\nif\ngoal\n.\nposture\n==\nSTRICT\nand\ngoal\n.\ncritical_blockers\n>\n0\n:\nresult\n=\nESCALATE\n# a correct output, not an error\nEnter fullscreen mode\nExit fullscreen mode\nI wired that as a first-class output:\nMy Agent Refused 96 Times. That Was the Right Output\n.\n7. Canary your safety gate\nThe failure mode I didn't see coming: a deterministic gate quietly stops firing. No crash, no error. The blocker count drops from 226 to 40 and it reads like plans got safer.\nA reader pointed out the shape: a Kubernetes incident where four releases never ran because an old ReplicaSet kept one pod green, and every health check passed.\nThe fix is a canary. A known-bad plan per gate, asserting the gate still fires, run before every sweep.\nplancritic gates canary\n--check\n# 10 fixture pairs, all must fire\n# 10/10 in dev and Docker\nEnter fullscreen mode\nExit fullscreen mode\nFull story:\nThe Gate That Stayed Silent\n.\nWhat component of your system, if it stopped working, would make your metrics look\nbetter\n?\n8. Don't let the model grade itself\nMy local 3B model produced a trigger that was literally\n\"step_1\"\n. It matched every trajectory, scored precision 1.00 / recall 0.02, and my benchmark said\npass\n. The model wasn't misbehaving. It was optimizing the reward I defined.\n_DEGENERATE_RE\n=\nre\n.\ncompile\n(\nr\n\"\n^step[_\\s]*\\d+$\n\"\n,\nre\n.\nIGNORECASE\n)\n# reject \"step_1\" before it ever reaches the matcher\nEnter fullscreen mode\nExit fullscreen mode\nIf your matcher rewards surface similarity, your model will produce surface similarity. That's a benchmark design bug, not a model bug.\nMy 3B Model Found a Shortcut\n.\n9. Field test with real agents, not mocks\nMock agents always call the tool. Real 4B models sometimes answer textually instead. On an earlier project I added field testing late and discovered the pass rate was\n9%\n. Not because the tool was bad, but because mocks had hidden every integration problem.\npytest tests/\n-q\n# unit tests: green, and they prove nothing about integration\npython field_test.py\n# real agents: the run that actually counts\nEnter fullscreen mode\nExit fullscreen mode\nThis time the rule was in the spec: no ship until real agents prove the policy works. The integration cost is visible from the first run. The cost of mocks is invisible until production.\n10. Re-run the eval after every fix\nI spent a week fixing a matcher. Four fixes, 359 green tests, golden pass rate moved 10% to 20%. Then a six-line classification fix moved it 20% to 50%. The report had named the matcher as the top target, and it was right,\nfor the previous release\n. I was optimizing a stale diagnosis.\nfix -> rerun field\ntest\n-> re-diagnose\n# do not trust the old report\nEnter fullscreen mode\nExit fullscreen mode\nA decisive verdict is not the same as a correct verdict. Re-run the eval before you trust the direction.\nFull post-mortem:\nThe 6-Line Fix That Outperformed My Entire Matcher Week\n.\nThe point\nNone of these are exotic. They're the checks a careful human does without thinking: verify the dependency, order the steps, know how to get back, refuse when unsure. The problem is that AI generates volume, and unmanaged volume amplifies every skipped check at the exact moment review attention is thinnest.\nThe move that worked for me wasn't a better model. It was turning each check into a deterministic gate that fails the build.\nSo what is your #11?\nWhat check did AI skip on you that you now enforce automatically?\nRepo:\nplanner-critic-engine\n(deterministic gates over LLM plans) ·\nagent-tooltrust\n(four-state permission engine) ·\nCauterRule\n(agent failures into standing rules)",
  "metadata": {
    "title": "10 SDLC Checks AI Will Skip Unless You Make Them a Gate - DEV Community",
    "description": "Do you trust AI code? Of course you don't. Not fully.   And here is the part that's easy to miss: it... Tagged with ai, programming, llm, sdlc.",
    "keywords": "ai, programming, llm, sdlc, software, coding, development, engineering, inclusive, community",
    "author": null,
    "og:type": "article",
    "og:url": "https://dev.to/debashish_ghosal/10-sdlc-checks-ai-will-skip-unless-you-make-them-a-gate-581k",
    "og:title": "10 SDLC Checks AI Will Skip Unless You Make Them a Gate",
    "og:description": "Do you trust AI code? Of course you don't. Not fully.   And here is the part that's easy to miss: it...",
    "og:site_name": "DEV Community",
    "og:image": "https://media2.dev.to/dynamic/image/width=1200,height=627,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F68d4hlhc9z3nog200wdx.png",
    "twitter:site": "@thepracticaldev",
    "twitter:creator": "@",
    "twitter:title": "10 SDLC Checks AI Will Skip Unless You Make Them a Gate",
    "twitter:description": "Do you trust AI code? Of course you don't. Not fully.   And here is the part that's easy to miss: it...",
    "twitter:card": "summary_large_image",
    "twitter:widgets:new-embed-design": "on",
    "twitter:image:src": "https://media2.dev.to/dynamic/image/width=1200,height=627,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F68d4hlhc9z3nog200wdx.png"
  },
  "paywall": {
    "listed_paid": false,
    "detected": false,
    "marker": "",
    "public_only": false,
    "policy": "付费/会员内容只保留页面公开可见部分，不绕过付费墙"
  },
  "crawl": {
    "success": true,
    "status_code": 200,
    "error": ""
  },
  "code_blocks": [
    {
      "file": "attachments/1d5fdb3f1a08/code/body-000.txt",
      "chars": 185,
      "language": "text"
    },
    {
      "file": "attachments/1d5fdb3f1a08/code/body-001.txt",
      "chars": 157,
      "language": "text"
    },
    {
      "file": "attachments/1d5fdb3f1a08/code/body-002.txt",
      "chars": 169,
      "language": "text"
    },
    {
      "file": "attachments/1d5fdb3f1a08/code/body-003.txt",
      "chars": 244,
      "language": "text"
    },
    {
      "file": "attachments/1d5fdb3f1a08/code/body-004.txt",
      "chars": 145,
      "language": "text"
    },
    {
      "file": "attachments/1d5fdb3f1a08/code/body-005.txt",
      "chars": 115,
      "language": "text"
    },
    {
      "file": "attachments/1d5fdb3f1a08/code/body-006.txt",
      "chars": 94,
      "language": "text"
    },
    {
      "file": "attachments/1d5fdb3f1a08/code/body-007.txt",
      "chars": 116,
      "language": "text"
    },
    {
      "file": "attachments/1d5fdb3f1a08/code/body-008.txt",
      "chars": 154,
      "language": "text"
    },
    {
      "file": "attachments/1d5fdb3f1a08/code/body-009.txt",
      "chars": 71,
      "language": "text"
    }
  ],
  "images": [],
  "audio": [],
  "videos": [],
  "links": [
    {
      "href": "https://dev.to/debashish_ghosal/the-planner-made-the-same-3-mistakes-every-time-a-bigger-model-didnt-fix-it-3170",
      "label": "The Planner Made the Same 3 Mistakes Every Time",
      "type": "a"
    },
    {
      "href": "https://github.com/deghosal-2026/agent-tooltrust",
      "label": "Agent ToolTrust",
      "type": "a"
    },
    {
      "href": "https://dev.to/debashish_ghosal/i-stopped-trusting-ai-agents-with-tools-so-i-built-a-gatekeeper-26fb",
      "label": "I Stopped Trusting AI Agents With Tools",
      "type": "a"
    },
    {
      "href": "https://dev.to/debashish_ghosal/my-agent-refused-96-times-that-was-the-right-output-1mg",
      "label": "My Agent Refused 96 Times. That Was the Right Output",
      "type": "a"
    },
    {
      "href": "https://dev.to/debashish_ghosal/the-gate-that-stayed-silent-when-a-blocker-count-that-drops-reads-as-improvement-3je9",
      "label": "The Gate That Stayed Silent",
      "type": "a"
    },
    {
      "href": "https://dev.to/debashish_ghosal/my-3b-model-found-a-shortcut-it-took-me-three-fixes-to-close-it-3bec",
      "label": "My 3B Model Found a Shortcut",
      "type": "a"
    },
    {
      "href": "https://dev.to/debashish_ghosal/the-6-line-fix-that-outperformed-my-entire-matcher-week-1810",
      "label": "The 6-Line Fix That Outperformed My Entire Matcher Week",
      "type": "a"
    },
    {
      "href": "https://github.com/deghosal-2026/planner-critic-engine",
      "label": "planner-critic-engine",
      "type": "a"
    },
    {
      "href": "https://github.com/deghosal-2026/CauterRule",
      "label": "CauterRule",
      "type": "a"
    }
  ],
  "repair_version": 2,
  "repaired_at": "2026-10-14T10:50:15Z",
  "source_url": "https://dev.to/debashish_ghosal/10-sdlc-checks-ai-will-skip-unless-you-make-them-a-gate-581k",
  "papers": [],
  "actual_video_files": [],
  "body_chars": 8590,
  "expected_body_images": 0,
  "discovery_status": "ok",
  "delivery_status": "ok",
  "missing_reason": "",
  "raw_html": "attachments/1d5fdb3f1a08/pages/source.html",
  "local_html": "attachments/1d5fdb3f1a08/pages/article.html",
  "body_base_path": "attachments/1d5fdb3f1a08/pages/",
  "body_markdown_path": "attachments/1d5fdb3f1a08/pages/article.md"
}