[{"data":1,"prerenderedAt":344},["ShallowReactive",2],{"navigation_docs":3,"-guide-architecture-state-machine":168,"-guide-architecture-state-machine-surround":340},[4,146],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":36},"Guide","i-lucide-book-open","\u002Fguide","1.guide",[10,14,37,55,59,63,67,71,75,79,83,87,109,134,138,142],{"title":11,"path":12,"stem":13},"What is Agent Zero?","\u002Fguide\u002Fintroduction","1.guide\u002F1.introduction",{"title":15,"icon":16,"path":17,"stem":18,"children":19,"page":36},"API","i-lucide-plug","\u002Fguide\u002Fapi","1.guide\u002F10.api",[20,24,28,32],{"title":21,"path":22,"stem":23},"API overview","\u002Fguide\u002Fapi\u002Foverview","1.guide\u002F10.api\u002F1.overview",{"title":25,"path":26,"stem":27},"Define endpoints","\u002Fguide\u002Fapi\u002Fdefine-endpoints","1.guide\u002F10.api\u002F2.define-endpoints",{"title":29,"path":30,"stem":31},"Use the API from a client","\u002Fguide\u002Fapi\u002Fuse-from-client","1.guide\u002F10.api\u002F3.use-from-client",{"title":33,"path":34,"stem":35},"Protect endpoints","\u002Fguide\u002Fapi\u002Fprotect-endpoints","1.guide\u002F10.api\u002F4.protect-endpoints",false,{"title":38,"icon":39,"path":40,"stem":41,"children":42,"page":36},"Authentication","i-lucide-lock","\u002Fguide\u002Fauthentication","1.guide\u002F11.authentication",[43,47,51],{"title":44,"path":45,"stem":46},"Authentication overview","\u002Fguide\u002Fauthentication\u002Foverview","1.guide\u002F11.authentication\u002F1.overview",{"title":48,"path":49,"stem":50},"GitHub OAuth","\u002Fguide\u002Fauthentication\u002Foauth","1.guide\u002F11.authentication\u002F2.oauth",{"title":52,"path":53,"stem":54},"Permissions","\u002Fguide\u002Fauthentication\u002Fpermissions","1.guide\u002F11.authentication\u002F3.permissions",{"title":56,"path":57,"stem":58},"Organizations","\u002Fguide\u002Forganizations","1.guide\u002F12.organizations",{"title":60,"path":61,"stem":62},"Frontend","\u002Fguide\u002Ffrontend","1.guide\u002F13.frontend",{"title":64,"path":65,"stem":66},"Mails","\u002Fguide\u002Fmails","1.guide\u002F14.mails",{"title":68,"path":69,"stem":70},"Internationalization","\u002Fguide\u002Finternationalization","1.guide\u002F15.internationalization",{"title":72,"path":73,"stem":74},"Deployment","\u002Fguide\u002Fdeployment","1.guide\u002F16.deployment",{"title":76,"path":77,"stem":78},"Tech stack","\u002Fguide\u002Ftech-stack","1.guide\u002F2.tech-stack",{"title":80,"path":81,"stem":82},"Installation","\u002Fguide\u002Finstallation","1.guide\u002F3.installation",{"title":84,"path":85,"stem":86},"Environment variables","\u002Fguide\u002Fenvironment-variables","1.guide\u002F4.environment-variables",{"title":88,"icon":89,"path":90,"stem":91,"children":92,"page":36},"Codebase","i-lucide-folder-tree","\u002Fguide\u002Fcodebase","1.guide\u002F5.codebase",[93,97,101,105],{"title":94,"path":95,"stem":96},"Codebase structure","\u002Fguide\u002Fcodebase\u002Fstructure","1.guide\u002F5.codebase\u002F1.structure",{"title":98,"path":99,"stem":100},"Dependencies","\u002Fguide\u002Fcodebase\u002Fdependencies","1.guide\u002F5.codebase\u002F2.dependencies",{"title":102,"path":103,"stem":104},"Formatting and linting","\u002Fguide\u002Fcodebase\u002Fformatting-linting","1.guide\u002F5.codebase\u002F3.formatting-linting",{"title":106,"path":107,"stem":108},"Agent Skills","\u002Fguide\u002Fcodebase\u002Fagent-skills","1.guide\u002F5.codebase\u002F4.agent-skills",{"title":110,"icon":111,"path":112,"stem":113,"children":114,"page":36},"Architecture","i-lucide-layers","\u002Fguide\u002Farchitecture","1.guide\u002F6.architecture",[115,118,122,126,130],{"title":110,"path":116,"stem":117},"\u002Fguide\u002Farchitecture\u002Foverview","1.guide\u002F6.architecture\u002F1.overview",{"title":119,"path":120,"stem":121},"State machine","\u002Fguide\u002Farchitecture\u002Fstate-machine","1.guide\u002F6.architecture\u002F2.state-machine",{"title":123,"path":124,"stem":125},"Execution boundary","\u002Fguide\u002Farchitecture\u002Fexecution-boundary","1.guide\u002F6.architecture\u002F3.execution-boundary",{"title":127,"path":128,"stem":129},"Issue-to-PR workflow","\u002Fguide\u002Farchitecture\u002Fissue-to-pr","1.guide\u002F6.architecture\u002F4.issue-to-pr",{"title":131,"path":132,"stem":133},"Adding a capability","\u002Fguide\u002Farchitecture\u002Fadding-a-capability","1.guide\u002F6.architecture\u002F5.adding-a-capability",{"title":135,"path":136,"stem":137},"Repository policy","\u002Fguide\u002Fconfiguration","1.guide\u002F7.configuration",{"title":139,"path":140,"stem":141},"Safety model","\u002Fguide\u002Fsafety","1.guide\u002F8.safety",{"title":143,"path":144,"stem":145},"Database","\u002Fguide\u002Fdatabase","1.guide\u002F9.database",{"title":147,"icon":148,"path":149,"stem":150,"children":151,"page":36},"Reference","i-lucide-book-marked","\u002Freference","2.reference",[152,156,160,164],{"title":153,"path":154,"stem":155},"CLI","\u002Freference\u002Fcli","2.reference\u002F1.cli",{"title":157,"path":158,"stem":159},"Model providers","\u002Freference\u002Fmodel-providers","2.reference\u002F2.model-providers",{"title":161,"path":162,"stem":163},"Source-control providers","\u002Freference\u002Fsource-control-providers","2.reference\u002F3.source-control-providers",{"title":165,"path":166,"stem":167},"Sandbox providers","\u002Freference\u002Fsandbox-providers","2.reference\u002F4.sandbox-providers",{"id":169,"title":119,"body":170,"description":189,"extension":334,"links":335,"meta":336,"navigation":337,"path":120,"seo":338,"stem":121,"__hash__":339},"docs\u002F1.guide\u002F6.architecture\u002F2.state-machine.md",{"type":171,"value":172,"toc":329},"minimark",[173,178,182,193,227,230,277,287,294,298,305,311],[174,175,177],"h2",{"id":176},"state-transitions","State transitions",[179,180,181],"p",{},"The lifecycle is:",[183,184,190],"pre",{"className":185,"code":187,"language":188,"meta":189},[186],"language-text","discover -> understand -> validate -> plan -> execute -> verify -> review\n                                      ^                    |\n                                      └────── repair ──────┘\n","text","",[191,192,187],"code",{"__ignoreMap":189},[179,194,195,198,199,202,203,206,207,210,211,214,215,218,219,222,223,226],{},[191,196,197],{},"LifecycleMachine"," in ",[191,200,201],{},"packages\u002Fagent"," holds the transition table and refuses any move it does not define, so an implementation mistake becomes a thrown error rather than an unverified result that looks finished. Notably, ",[191,204,205],{},"executing"," cannot reach ",[191,208,209],{},"completed"," without passing through ",[191,212,213],{},"verifying",", and ",[191,216,217],{},"planning"," cannot skip to ",[191,220,221],{},"reviewing",". Every non-terminal state can reach ",[191,224,225],{},"failed",".",[179,228,229],{},"Each stage owns one decision:",[231,232,233,241,247,253,259,265,271],"ul",{},[234,235,236,240],"li",{},[237,238,239],"strong",{},"discover"," collects the checkout, its working-tree or pull-request base-to-head diff, and its native check commands through the runner.",[234,242,243,246],{},[237,244,245],{},"understand"," asks the model to interpret untrusted feedback, proactively inspect the complete diff, or interpret an issue task in repository context.",[234,248,249,252],{},[237,250,251],{},"validate"," decides the verdict from repository evidence, never from the reviewer's or the model's assertion.",[234,254,255,258],{},[237,256,257],{},"plan"," records the plan and resolves authorization. Each refusal is a distinct reportable outcome rather than a silent downgrade.",[234,260,261,264],{},[237,262,263],{},"execute"," applies changes restricted to the validated scope, through the runner.",[234,266,267,270],{},[237,268,269],{},"verify"," runs the repository's own checks and captures their output.",[234,272,273,276],{},[237,274,275],{},"review"," inspects the resulting diff before a run may call itself complete.",[179,278,279,280,282,283,286],{},"Repair re-enters ",[191,281,257],{}," with the failing output as context, until ",[191,284,285],{},"agent.maxAttempts"," is spent.",[179,288,289,290,293],{},"Proactive review is repository opt-in. Its model decision carries severity, confidence, cited evidence, affected files, and a change-risk classification. The runtime validates the evidence independently, then requires confidence and repository policy to allow the risk class. High-impact changes always stop at ",[191,291,292],{},"needs-human","; proactive or autonomous writes use an isolated runner when policy requires it.",[174,295,297],{"id":296},"verdicts-and-evidence","Verdicts and evidence",[179,299,300,301,304],{},"Validation lives in ",[191,302,303],{},"packages\u002Fagent\u002Fsrc\u002Fvalidation.ts"," and is independent of any provider. It rejects a claim that cites no evidence, names no existing file, or quotes repository content that is not there; it reports a supported but low-confidence claim as inconclusive. Rejection reasons are collected in full rather than short-circuiting on the first, because the report is the product.",[179,306,307,310],{},[191,308,309],{},"TaskResult.verified"," is derived in exactly one place, at the point a run produces its terminal result: it requires a completed state, an applied change, and every executed check passing. No branch can assert verification it did not earn, which is what makes \"a failed verification is never presented as success\" a property of the code rather than a convention.",[179,312,313,316,317,320,321,324,325,328],{},[191,314,315],{},"EvidenceBundle"," and its Markdown renderer live in ",[191,318,319],{},"packages\u002Fshared"," because both the source-control adapters and the CLI consume them, and because rendering is a pure function over contracts with no I\u002FO. Terminal states map deterministically onto a provider-neutral run outcome in ",[191,322,323],{},"packages\u002Fsource-control",", which each provider adapter translates into its own status vocabulary — explicitly noting any conclusion the platform cannot express (see ",[191,326,327],{},"docs\u002Fsource-control-providers.md",").",{"title":189,"searchDepth":330,"depth":330,"links":331},2,[332,333],{"id":176,"depth":330,"text":177},{"id":296,"depth":330,"text":297},"md",null,{},true,{"title":119,"description":189},"LOBNFnsSE67c-oJhv8G_RnLQUu2cu0BnWbpzKhIH1OE",[341,343],{"title":110,"path":116,"stem":117,"description":342,"children":-1},"Agent Zero is organized as a dependency-directed monorepo. The core decides what should happen; adapters decide how external systems communicate with it; the runner controls what is allowed to happen to a checkout.",{"title":123,"path":124,"stem":125,"description":189,"children":-1},1787482154279]