[{"data":1,"prerenderedAt":106},["ShallowReactive",2],{"\u002Fdocs\u002Fcore-concepts\u002Flayer-4":3},{"id":4,"title":5,"body":6,"description":98,"extension":99,"meta":100,"navigation":101,"path":102,"seo":103,"stem":104,"__hash__":105},"docs\u002Fdocs\u002Fcore-concepts\u002Flayer-4.md","Layer 4: Quality Gates",{"type":7,"value":8,"toc":85},"minimark",[9,13,18,23,37,41,44,48,51,55,58,62,65,69],[10,11,12],"p",{},"Layer 4 is the mechanism that decides whether a phase's output is good enough to move\non to the next phase. There are two kinds of gates, and both are mandatory — neither\ncan be skipped.",[14,15,17],"h2",{"id":16},"two-kinds-of-gates","Two kinds of gates",[19,20,22],"h3",{"id":21},"the-automated-gate-verifier","The automated gate (Verifier)",[10,24,25,26,30,31,36],{},"Run by the read-only Verifier agent: lint, tests, and automated review of the\nImplement output. Read-only here isn't just a technical detail — it's the guarantee\nthat the quality-check process can't quietly \"fix\" code without a trace, because the\nVerifier simply has no write access. Its results are recorded as ",[27,28,29],"code",{},"verify-report.md","\nin ",[32,33,35],"a",{"href":34},"\u002Fdocs\u002Fcore-concepts\u002Flayer-3","Layer 3: Artifact Handoff",".",[19,38,40],{"id":39},"the-human-gate","The human gate",[10,42,43],{},"Once the automated gate passes, the final checkpoint before a PR is created or merged\nis explicit approval from a human. This gate can't be automated at all — CAF provides\nno way to bypass it.",[14,45,47],{"id":46},"why-both-are-required","Why both are required",[10,49,50],{},"The automated gate catches what a machine can detect — lint errors, failing tests,\nrisky code patterns. But not every decision can be reduced to an automated rule:\nbusiness context, architectural trade-offs, or risk that's only visible to someone\nwho understands the project. The human gate closes that gap.",[14,52,54],{"id":53},"retry-policy","Retry policy",[10,56,57],{},"If the automated gate fails, the agent may retry that phase — up to 3 times. After 3\nfailed attempts, CAF stops and escalates to a human instead of continuing to retry\nwithout direction.",[14,59,61],{"id":60},"no-auto-merge","No auto-merge",[10,63,64],{},"This is a direct consequence of Layer 4: there's no path — no matter how clean the\nautomated gate's results are — that lets a PR get merged without human approval. This\ngovernance is what sets CAF apart from agent orchestrators that chase speed through\nauto-merge.",[14,66,68],{"id":67},"relationship-to-other-layers","Relationship to other layers",[10,70,71,72,74,75,79,80,84],{},"Layer 4 consumes ",[27,73,29],{}," from ",[76,77,78],"strong",{},"Layer 3",", and its gate decision\ndetermines whether ",[32,81,83],{"href":82},"\u002Fdocs\u002Fcore-concepts\u002Flayer-5","Layer 5: Orchestration"," is allowed\nto advance the pipeline to the next phase or has to wait for a human.",{"title":86,"searchDepth":87,"depth":87,"links":88},"",2,[89,94,95,96,97],{"id":16,"depth":87,"text":17,"children":90},[91,93],{"id":21,"depth":92,"text":22},3,{"id":39,"depth":92,"text":40},{"id":46,"depth":87,"text":47},{"id":53,"depth":87,"text":54},{"id":60,"depth":87,"text":61},{"id":67,"depth":87,"text":68},"The two gates that must be passed before a PR can be created or merged.","md",{},true,"\u002Fdocs\u002Fcore-concepts\u002Flayer-4",{"title":5,"description":98},"docs\u002Fcore-concepts\u002Flayer-4","HZjY2vYeuN9-fwVPTo993oZVEkbr8UFPM3LtW_yhQ-Y",1787621083793]