[{"data":1,"prerenderedAt":1392},["ShallowReactive",2],{"navigation_docs":3,"-guides-customize-add-review-agents":504,"-guides-customize-add-review-agents-surround":1387},[4,28,51,187,214,469],{"title":5,"path":6,"stem":7,"children":8,"page":-1},"Get started","\u002Fget-started","1.get-started",[9,12,16,20,24],{"title":10,"path":6,"stem":11},"Overview","1.get-started\u002Findex",{"title":13,"path":14,"stem":15},"Why Kraft","\u002Fget-started\u002Fwhy-kraft","1.get-started\u002F0.why-kraft",{"title":17,"path":18,"stem":19},"Install","\u002Fget-started\u002Finstall","1.get-started\u002F1.install",{"title":21,"path":22,"stem":23},"Your first work item","\u002Fget-started\u002Ffirst-work-item","1.get-started\u002F2.first-work-item",{"title":25,"path":26,"stem":27},"FAQ","\u002Fget-started\u002Ffaq","1.get-started\u002F3.faq",{"title":29,"path":30,"stem":31,"children":32,"page":-1},"Concepts","\u002Fconcepts","2.concepts",[33,35,39,43,47],{"title":10,"path":30,"stem":34},"2.concepts\u002Findex",{"title":36,"path":37,"stem":38},"How a work item runs","\u002Fconcepts\u002Fhow-a-work-item-runs","2.concepts\u002F1.how-a-work-item-runs",{"title":40,"path":41,"stem":42},"Caps and budgets","\u002Fconcepts\u002Fcaps-and-budgets","2.concepts\u002F2.caps-and-budgets",{"title":44,"path":45,"stem":46},"Why a permission gate","\u002Fconcepts\u002Fpermission-gate","2.concepts\u002F3.permission-gate",{"title":48,"path":49,"stem":50},"Vocabulary","\u002Fconcepts\u002Fvocabulary","2.concepts\u002F4.vocabulary",{"title":52,"path":53,"stem":54,"children":55,"page":-1},"Guides","\u002Fguides","3.guides",[56,58,96,113,134,183],{"title":10,"path":53,"stem":57},"3.guides\u002Findex",{"title":59,"path":60,"stem":61,"children":62,"page":95},"Day to day","\u002Fguides\u002Fday-to-day","3.guides\u002F1.day-to-day",[63,67,71,75,79,83,87,91],{"title":64,"path":65,"stem":66},"The setup wizard on first start","\u002Fguides\u002Fday-to-day\u002Ffirst-run","3.guides\u002F1.day-to-day\u002F2.first-run",{"title":68,"path":69,"stem":70},"File a work item","\u002Fguides\u002Fday-to-day\u002Ffile-a-work-item","3.guides\u002F1.day-to-day\u002F3.file-a-work-item",{"title":72,"path":73,"stem":74},"Use Kraft from your agent","\u002Fguides\u002Fday-to-day\u002Fagent-integration","3.guides\u002F1.day-to-day\u002F4.agent-integration",{"title":76,"path":77,"stem":78},"Reviewing a change","\u002Fguides\u002Fday-to-day\u002Freview-a-change","3.guides\u002F1.day-to-day\u002F5.review-a-change",{"title":80,"path":81,"stem":82},"Raise a cap on a stopped item","\u002Fguides\u002Fday-to-day\u002Fraise-a-cap","3.guides\u002F1.day-to-day\u002F6.raise-a-cap",{"title":84,"path":85,"stem":86},"Kraft for VS Code","\u002Fguides\u002Fday-to-day\u002Fvscode","3.guides\u002F1.day-to-day\u002F7.vscode",{"title":88,"path":89,"stem":90},"Kraft on a phone","\u002Fguides\u002Fday-to-day\u002Fkraft-on-a-phone","3.guides\u002F1.day-to-day\u002F8.kraft-on-a-phone",{"title":92,"path":93,"stem":94},"Get notified when an item needs you","\u002Fguides\u002Fday-to-day\u002Fnotifications","3.guides\u002F1.day-to-day\u002F9.notifications",false,{"title":97,"path":98,"stem":99,"children":100,"page":95},"Customize and automate","\u002Fguides\u002Fcustomize","3.guides\u002F2.customize",[101,105,109],{"title":102,"path":103,"stem":104},"Write your own chain","\u002Fguides\u002Fcustomize\u002Fwrite-your-own-chain","3.guides\u002F2.customize\u002F1.write-your-own-chain",{"title":106,"path":107,"stem":108},"Add a security review or a gate reviewer","\u002Fguides\u002Fcustomize\u002Fadd-review-agents","3.guides\u002F2.customize\u002F2.add-review-agents",{"title":110,"path":111,"stem":112},"Schedule or webhook work","\u002Fguides\u002Fcustomize\u002Fschedule-and-webhook-work","3.guides\u002F2.customize\u002F3.schedule-and-webhook-work",{"title":114,"path":115,"stem":116,"children":117,"page":95},"Agents and harnesses","\u002Fguides\u002Fharnesses","3.guides\u002F3.harnesses",[118,122,126,130],{"title":119,"path":120,"stem":121},"Switch a task to another harness","\u002Fguides\u002Fharnesses\u002Fswitch-harness","3.guides\u002F3.harnesses\u002F1.switch-harness",{"title":123,"path":124,"stem":125},"Add or override a harness","\u002Fguides\u002Fharnesses\u002Fadding-a-harness","3.guides\u002F3.harnesses\u002F2.adding-a-harness",{"title":127,"path":128,"stem":129},"Build a worker Kit","\u002Fguides\u002Fharnesses\u002Fworker-kit","3.guides\u002F3.harnesses\u002F3.worker-kit",{"title":131,"path":132,"stem":133},"Give a worker its login","\u002Fguides\u002Fharnesses\u002Fgive-a-worker-its-login","3.guides\u002F3.harnesses\u002F4.give-a-worker-its-login",{"title":135,"path":136,"stem":137,"children":138,"page":95},"Run the server","\u002Fguides\u002Frun","3.guides\u002F4.run",[139,143,147,151,155,159,163,167,171,175,179],{"title":140,"path":141,"stem":142},"Remote access","\u002Fguides\u002Frun\u002Fremote-access","3.guides\u002F4.run\u002F01.remote-access",{"title":144,"path":145,"stem":146},"Put a proxy in front of Kraft","\u002Fguides\u002Frun\u002Fput-a-proxy-in-front-of-kraft","3.guides\u002F4.run\u002F02.put-a-proxy-in-front-of-kraft",{"title":148,"path":149,"stem":150},"Restart Kraft without ending running agents","\u002Fguides\u002Frun\u002Frestart-kraft","3.guides\u002F4.run\u002F03.restart-kraft",{"title":152,"path":153,"stem":154},"Back up and restore the database","\u002Fguides\u002Frun\u002Fback-up-and-restore","3.guides\u002F4.run\u002F04.back-up-and-restore",{"title":156,"path":157,"stem":158},"Logs and disk space","\u002Fguides\u002Frun\u002Flogs-and-disk-space","3.guides\u002F4.run\u002F05.logs-and-disk-space",{"title":160,"path":161,"stem":162},"Run Kraft as a service","\u002Fguides\u002Frun\u002Frun-as-a-service","3.guides\u002F4.run\u002F06.run-as-a-service",{"title":164,"path":165,"stem":166},"Upgrade Kraft","\u002Fguides\u002Frun\u002Fupgrade-kraft","3.guides\u002F4.run\u002F07.upgrade-kraft",{"title":168,"path":169,"stem":170},"Upgrade your configuration","\u002Fguides\u002Frun\u002Fupgrade-your-configuration","3.guides\u002F4.run\u002F08.upgrade-your-configuration",{"title":172,"path":173,"stem":174},"Upgrade from 1.4","\u002Fguides\u002Frun\u002Fupgrade-from-1-4","3.guides\u002F4.run\u002F09.upgrade-from-1-4",{"title":176,"path":177,"stem":178},"Upgrade from 0.x or a release candidate","\u002Fguides\u002Frun\u002Fupgrade-from-0-x-or-a-release-candidate","3.guides\u002F4.run\u002F10.upgrade-from-0-x-or-a-release-candidate",{"title":180,"path":181,"stem":182},"Roll back to 1.4","\u002Fguides\u002Frun\u002Froll-back","3.guides\u002F4.run\u002F11.roll-back",{"title":184,"path":185,"stem":186},"Kraft Lite","\u002Fguides\u002Fkraft-lite","3.guides\u002F5.kraft-lite",{"title":188,"path":189,"stem":190,"children":191,"page":-1},"Troubleshooting","\u002Ftroubleshooting","4.troubleshooting",[192,194,198,202,206,210],{"title":10,"path":189,"stem":193},"4.troubleshooting\u002Findex",{"title":195,"path":196,"stem":197},"Why did my item stop?","\u002Ftroubleshooting\u002Fwhy-did-my-item-stop","4.troubleshooting\u002F1.why-did-my-item-stop",{"title":199,"path":200,"stem":201},"Stop reasons in detail","\u002Ftroubleshooting\u002Fstop-reasons-in-detail","4.troubleshooting\u002F2.stop-reasons-in-detail",{"title":203,"path":204,"stem":205},"Starting and reaching Kraft","\u002Ftroubleshooting\u002Fstarting-and-reaching-kraft","4.troubleshooting\u002F3.starting-and-reaching-kraft",{"title":207,"path":208,"stem":209},"Doctor failures","\u002Ftroubleshooting\u002Fdoctor-failures","4.troubleshooting\u002F4.doctor-failures",{"title":211,"path":212,"stem":213},"Sandbox and Kit stops","\u002Ftroubleshooting\u002Fsandbox-and-kit-stops","4.troubleshooting\u002F5.sandbox-and-kit-stops",{"title":215,"path":216,"stem":217,"children":218,"page":-1},"Reference","\u002Freference","5.reference",[219,221,259,281,285,375,393,419,423,427,461,465],{"title":10,"path":216,"stem":220},"5.reference\u002Findex",{"title":222,"path":223,"stem":224,"children":225,"page":-1},"Web UI","\u002Freference\u002Fweb-ui","5.reference\u002F00.web-ui\u002Findex",[226,227,231,235,239,243,247,251,255],{"title":10,"path":223,"stem":224},{"title":228,"path":229,"stem":230},"Sidebar, search, and keyboard","\u002Freference\u002Fweb-ui\u002Fsidebar-search-and-keyboard","5.reference\u002F00.web-ui\u002F0.sidebar-search-and-keyboard",{"title":232,"path":233,"stem":234},"The board","\u002Freference\u002Fweb-ui\u002Fboard","5.reference\u002F00.web-ui\u002F1.board",{"title":236,"path":237,"stem":238},"An item's page","\u002Freference\u002Fweb-ui\u002Fitem-page","5.reference\u002F00.web-ui\u002F2.item-page",{"title":240,"path":241,"stem":242},"Fix loops and test scopes","\u002Freference\u002Fweb-ui\u002Ffix-loops-and-test-scopes","5.reference\u002F00.web-ui\u002F3.fix-loops-and-test-scopes",{"title":244,"path":245,"stem":246},"Config before an item starts","\u002Freference\u002Fweb-ui\u002Fconfig-before-start","5.reference\u002F00.web-ui\u002F4.config-before-start",{"title":248,"path":249,"stem":250},"The review page","\u002Freference\u002Fweb-ui\u002Freview-page","5.reference\u002F00.web-ui\u002F5.review-page",{"title":252,"path":253,"stem":254},"Templates and Settings","\u002Freference\u002Fweb-ui\u002Ftemplates-and-settings","5.reference\u002F00.web-ui\u002F6.templates-and-settings",{"title":256,"path":257,"stem":258},"Analytics","\u002Freference\u002Fweb-ui\u002Fanalytics","5.reference\u002F00.web-ui\u002F7.analytics",{"title":260,"path":261,"stem":262,"children":263,"page":-1},"CLI","\u002Freference\u002Fcli","5.reference\u002F01.cli\u002Findex",[264,265,269,273,277],{"title":10,"path":261,"stem":262},{"title":266,"path":267,"stem":268},"Item verbs","\u002Freference\u002Fcli\u002Fitem","5.reference\u002F01.cli\u002F2.item",{"title":270,"path":271,"stem":272},"View verbs","\u002Freference\u002Fcli\u002Fview","5.reference\u002F01.cli\u002F3.view",{"title":274,"path":275,"stem":276},"Repo verbs","\u002Freference\u002Fcli\u002Frepo","5.reference\u002F01.cli\u002F4.repo",{"title":278,"path":279,"stem":280},"Admin verbs","\u002Freference\u002Fcli\u002Fadmin","5.reference\u002F01.cli\u002F5.admin",{"title":282,"path":283,"stem":284},"Work item statuses","\u002Freference\u002Fstatuses","5.reference\u002F02.statuses",{"title":286,"path":287,"stem":288,"children":289,"page":-1},"Configuration","\u002Freference\u002Fconfiguration","5.reference\u002F03.configuration\u002Findex",[290,291,309,313,317,321,325,329,333,337,371],{"title":10,"path":287,"stem":288},{"title":292,"path":293,"stem":294,"children":295,"page":-1},"repos.yaml","\u002Freference\u002Fconfiguration\u002Frepos","5.reference\u002F03.configuration\u002F02.repos\u002Findex",[296,297,301,305],{"title":10,"path":293,"stem":294},{"title":298,"path":299,"stem":300},"How connect proposes commands","\u002Freference\u002Fconfiguration\u002Frepos\u002Fconnect-proposals","5.reference\u002F03.configuration\u002F02.repos\u002F1.connect-proposals",{"title":302,"path":303,"stem":304},"detectors.yaml","\u002Freference\u002Fconfiguration\u002Frepos\u002Fdetectors","5.reference\u002F03.configuration\u002F02.repos\u002F2.detectors",{"title":306,"path":307,"stem":308},"Workspaces","\u002Freference\u002Fconfiguration\u002Frepos\u002Fworkspaces","5.reference\u002F03.configuration\u002F02.repos\u002F3.workspaces",{"title":310,"path":311,"stem":312},"policy.yaml","\u002Freference\u002Fconfiguration\u002Fpolicy","5.reference\u002F03.configuration\u002F03.policy",{"title":314,"path":315,"stem":316},"Library and chains","\u002Freference\u002Fconfiguration\u002Flibrary-and-chains","5.reference\u002F03.configuration\u002F04.library-and-chains",{"title":318,"path":319,"stem":320},"harnesses.yaml","\u002Freference\u002Fconfiguration\u002Fharnesses-file","5.reference\u002F03.configuration\u002F05.harnesses-file",{"title":322,"path":323,"stem":324},"access.yaml","\u002Freference\u002Fconfiguration\u002Faccess","5.reference\u002F03.configuration\u002F06.access",{"title":326,"path":327,"stem":328},"intake.yaml","\u002Freference\u002Fconfiguration\u002Fintake","5.reference\u002F03.configuration\u002F07.intake",{"title":330,"path":331,"stem":332},"notify.yaml","\u002Freference\u002Fconfiguration\u002Fnotify","5.reference\u002F03.configuration\u002F08.notify",{"title":334,"path":335,"stem":336},"theme.yaml","\u002Freference\u002Fconfiguration\u002Ftheme","5.reference\u002F03.configuration\u002F09.theme",{"title":338,"path":339,"stem":340,"children":341,"page":-1},"Sandboxed workers","\u002Freference\u002Fconfiguration\u002Fsandbox","5.reference\u002F03.configuration\u002F10.sandbox\u002Findex",[342,343,347,351,355,359,363,367],{"title":10,"path":339,"stem":340},{"title":344,"path":345,"stem":346},"Resource limits","\u002Freference\u002Fconfiguration\u002Fsandbox\u002Fresource-limits","5.reference\u002F03.configuration\u002F10.sandbox\u002F1.resource-limits",{"title":348,"path":349,"stem":350},"Callbacks from a sandbox","\u002Freference\u002Fconfiguration\u002Fsandbox\u002Fcallbacks","5.reference\u002F03.configuration\u002F10.sandbox\u002F2.callbacks",{"title":352,"path":353,"stem":354},"Network policy","\u002Freference\u002Fconfiguration\u002Fsandbox\u002Fnetwork-policy","5.reference\u002F03.configuration\u002F10.sandbox\u002F3.network-policy",{"title":356,"path":357,"stem":358},"Credentials","\u002Freference\u002Fconfiguration\u002Fsandbox\u002Fcredentials","5.reference\u002F03.configuration\u002F10.sandbox\u002F4.credentials",{"title":360,"path":361,"stem":362},"Kits","\u002Freference\u002Fconfiguration\u002Fsandbox\u002Fkits","5.reference\u002F03.configuration\u002F10.sandbox\u002F5.kits",{"title":364,"path":365,"stem":366},"sandbox.yaml","\u002Freference\u002Fconfiguration\u002Fsandbox\u002Fsandbox-yaml","5.reference\u002F03.configuration\u002F10.sandbox\u002F6.sandbox-yaml",{"title":368,"path":369,"stem":370},"Git in a sandbox","\u002Freference\u002Fconfiguration\u002Fsandbox\u002Fgit-in-a-sandbox","5.reference\u002F03.configuration\u002F10.sandbox\u002F7.git-in-a-sandbox",{"title":372,"path":373,"stem":374},"Environment variables","\u002Freference\u002Fconfiguration\u002Fenvironment-variables","5.reference\u002F03.configuration\u002F11.environment-variables",{"title":376,"path":377,"stem":378,"children":379,"page":-1},"Chain file keys","\u002Freference\u002Fchain-nodes","5.reference\u002F04.chain-nodes\u002Findex",[380,381,385,389],{"title":10,"path":377,"stem":378},{"title":382,"path":383,"stem":384},"Subprocess tasks","\u002Freference\u002Fchain-nodes\u002Fsubprocess-tasks","5.reference\u002F04.chain-nodes\u002F2.subprocess-tasks",{"title":386,"path":387,"stem":388},"Fix loop and judge","\u002Freference\u002Fchain-nodes\u002Ffix-loop","5.reference\u002F04.chain-nodes\u002F3.fix-loop",{"title":390,"path":391,"stem":392},"Result file","\u002Freference\u002Fchain-nodes\u002Fresult-file","5.reference\u002F04.chain-nodes\u002F4.result-file",{"title":394,"path":395,"stem":396,"children":397,"page":-1},"Agent harnesses","\u002Freference\u002Fharnesses","5.reference\u002F05.harnesses\u002Findex",[398,399,403,407,411,415],{"title":10,"path":395,"stem":396},{"title":400,"path":401,"stem":402},"Unattended runs","\u002Freference\u002Fharnesses\u002Funattended-runs","5.reference\u002F05.harnesses\u002F2.unattended-runs",{"title":404,"path":405,"stem":406},"Agent profiles","\u002Freference\u002Fharnesses\u002Fagent-profiles","5.reference\u002F05.harnesses\u002F3.agent-profiles",{"title":408,"path":409,"stem":410},"Harness definition files","\u002Freference\u002Fharnesses\u002Fharness-files","5.reference\u002F05.harnesses\u002F4.harness-files",{"title":412,"path":413,"stem":414},"Fallback and escalation","\u002Freference\u002Fharnesses\u002Ffallback-and-escalation","5.reference\u002F05.harnesses\u002F5.fallback-and-escalation",{"title":416,"path":417,"stem":418},"Cost reporting","\u002Freference\u002Fharnesses\u002Fcost-reporting","5.reference\u002F05.harnesses\u002F6.cost-reporting",{"title":420,"path":421,"stem":422},"Permission gate","\u002Freference\u002Fpermissions","5.reference\u002F06.permissions",{"title":424,"path":425,"stem":426},"Inbound triggers","\u002Freference\u002Ftriggers","5.reference\u002F07.triggers",{"title":428,"path":429,"stem":430,"children":431,"page":-1},"HTTP API","\u002Freference\u002Fhttp-api","5.reference\u002F08.http-api\u002Findex",[432,433,437,441,445,449,453,457],{"title":10,"path":429,"stem":430},{"title":434,"path":435,"stem":436},"Filing, reading and changing work items","\u002Freference\u002Fhttp-api\u002Fwork-items","5.reference\u002F08.http-api\u002F2.work-items",{"title":438,"path":439,"stem":440},"Gates, run control, ending and retry","\u002Freference\u002Fhttp-api\u002Fgates-run-control-and-ending","5.reference\u002F08.http-api\u002F3.gates-run-control-and-ending",{"title":442,"path":443,"stem":444},"The work item object","\u002Freference\u002Fhttp-api\u002Fwork-item-object","5.reference\u002F08.http-api\u002F4.work-item-object",{"title":446,"path":447,"stem":448},"Budget, events, diff and documents","\u002Freference\u002Fhttp-api\u002Fbudget-and-events","5.reference\u002F08.http-api\u002F5.budget-and-events",{"title":450,"path":451,"stem":452},"Repos, chains, harnesses and the server","\u002Freference\u002Fhttp-api\u002Frepos-chains-harnesses-and-server","5.reference\u002F08.http-api\u002F6.repos-chains-harnesses-and-server",{"title":454,"path":455,"stem":456},"Drafts","\u002Freference\u002Fhttp-api\u002Fdrafts","5.reference\u002F08.http-api\u002F7.drafts",{"title":458,"path":459,"stem":460},"Ops for each draft area","\u002Freference\u002Fhttp-api\u002Fdraft-ops","5.reference\u002F08.http-api\u002F8.draft-ops",{"title":462,"path":463,"stem":464},"MCP tools","\u002Freference\u002Fmcp-tools","5.reference\u002F09.mcp-tools",{"title":466,"path":467,"stem":468},"Events","\u002Freference\u002Fevents","5.reference\u002F10.events",{"title":470,"path":471,"stem":472,"children":473,"page":-1},"Security and project","\u002Fproject","6.project",[474,476,480,484,488,492,496,500],{"title":10,"path":471,"stem":475},"6.project\u002Findex",{"title":477,"path":478,"stem":479},"Security","\u002Fproject\u002Fsecurity","6.project\u002F1.security",{"title":481,"path":482,"stem":483},"Data and privacy","\u002Fproject\u002Fdata-and-privacy","6.project\u002F2.data-and-privacy",{"title":485,"path":486,"stem":487},"What's new in 2.0","\u002Fproject\u002Fwhats-new","6.project\u002F3.whats-new",{"title":489,"path":490,"stem":491},"Status and support","\u002Fproject\u002Fstatus-and-support","6.project\u002F4.status-and-support",{"title":493,"path":494,"stem":495},"Architecture","\u002Fproject\u002Farchitecture","6.project\u002F5.architecture",{"title":497,"path":498,"stem":499},"Source map","\u002Fproject\u002Fsource-map","6.project\u002F6.source-map",{"title":501,"path":502,"stem":503},"Contributing","\u002Fproject\u002Fcontributing","6.project\u002F7.contributing",{"id":505,"title":106,"body":506,"description":1380,"extension":1381,"links":1382,"meta":1383,"navigation":1384,"path":107,"seo":1385,"stem":108,"__hash__":1386},"docs\u002F3.guides\u002F2.customize\u002F2.add-review-agents.md",{"type":507,"value":508,"toc":1371},"minimark",[509,522,548,551,556,582,586,927,931,1080,1104,1109,1134,1153,1157,1336,1340,1367],[510,511,512,513,517,518,521],"p",{},"Add the two review skills that no shipped chain runs to a copy of the ",[514,515,516],"code",{},"default","\nchain: a security review inside ",[514,519,520],{},"verification",", and an agent that reviews a gate\nbefore a person is asked.",[523,524,525,542],"ul",{},[526,527,528,531,532,535,536,541],"li",{},[514,529,530],{},"kraft:security-review"," reviews a change that touches authentication,\nsessions, tokens, secrets, or permission checks. It reports findings the way\n",[514,533,534],{},"kraft:code-review"," does, so they enter the same ",[537,538,540],"a",{"href":539},"\u002Fconcepts\u002Fvocabulary#fix-loop","fix loop",".",[526,543,544,547],{},[514,545,546],{},"kraft:gate-review"," reads the document a gate is about and reports a verdict,\nso a gate that needs no person's decision no longer waits for one. It never\nclears the gate itself.",[510,549,550],{},"Both are opt-in because both cost money. A security pass costs an extra agent\nsession per review round on every item. A gate reviewer is a paid agent session\non every item that reaches the gate with auto-gate on, and it decides whether a\nperson sees that gate at all. Neither runs unless you add it to your chain.",[552,553,555],"h2",{"id":554},"before-you-start","Before you start",[523,557,558,561,568],{},[526,559,560],{},"A running Kraft server.",[526,562,563,564,567],{},"A chain of your own to edit. Step 2 makes ",[514,565,566],{},"chains\u002Freviewed.yaml","; if you\nalready have a chain, edit that one.",[526,569,570,571,574,575,578,579,541],{},"Your config directory: ",[514,572,573],{},"~\u002F.kraft\u002Fconfig\u002F",", or ",[514,576,577],{},"$KRAFT_HOME\u002Fconfig\u002F"," if you set\n",[514,580,581],{},"KRAFT_HOME",[552,583,585],{"id":584},"add-a-security-review-to-verification","Add a security review to verification",[587,588,589,695,756,769],"ol",{},[526,590,591,592,595,596,599,600],{},"Add the task to ",[514,593,594],{},"library.yaml",", under ",[514,597,598],{},"tasks:",":",[601,602,608],"pre",{"className":603,"code":604,"filename":605,"language":606,"meta":607,"style":607},"language-yaml shiki shiki-themes github-light-high-contrast github-light-high-contrast github-dark-high-contrast","security_review:\n  kind: agent\n  harness: claude\n  prompt: Review this work item's change for security defects.\n  skill: kraft:security-review\n  inputs: [review_package, carried_findings, previous_review]\n","config\u002Flibrary.yaml","yaml","",[514,609,610,623,636,647,658,669],{"__ignoreMap":607},[611,612,615,619],"span",{"class":613,"line":614},"line",1,[611,616,618],{"class":617},"sb7M8","security_review",[611,620,622],{"class":621},"s7iLA",":\n",[611,624,626,629,632],{"class":613,"line":625},2,[611,627,628],{"class":617},"  kind",[611,630,631],{"class":621},": ",[611,633,635],{"class":634},"semJd","agent\n",[611,637,639,642,644],{"class":613,"line":638},3,[611,640,641],{"class":617},"  harness",[611,643,631],{"class":621},[611,645,646],{"class":634},"claude\n",[611,648,650,653,655],{"class":613,"line":649},4,[611,651,652],{"class":617},"  prompt",[611,654,631],{"class":621},[611,656,657],{"class":634},"Review this work item's change for security defects.\n",[611,659,661,664,666],{"class":613,"line":660},5,[611,662,663],{"class":617},"  skill",[611,665,631],{"class":621},[611,667,668],{"class":634},"kraft:security-review\n",[611,670,672,675,678,681,684,687,689,692],{"class":613,"line":671},6,[611,673,674],{"class":617},"  inputs",[611,676,677],{"class":621},": [",[611,679,680],{"class":634},"review_package",[611,682,683],{"class":621},", ",[611,685,686],{"class":634},"carried_findings",[611,688,683],{"class":621},[611,690,691],{"class":634},"previous_review",[611,693,694],{"class":621},"]\n",[526,696,697,698,701,702,704,705],{},"Copy the default chain to a chain of your own. ",[514,699,700],{},"cp -n"," never overwrites a file, so if ",[514,703,566],{}," exists, skip this step and keep editing it:",[601,706,710],{"className":707,"code":708,"language":709,"meta":607,"style":607},"language-bash shiki shiki-themes github-light-high-contrast github-light-high-contrast github-dark-high-contrast","cd \"${KRAFT_HOME:-$HOME\u002F.kraft}\u002Fconfig\"\ncp -n chains\u002Fdefault.yaml chains\u002Freviewed.yaml\n","bash",[514,711,712,741],{"__ignoreMap":607},[611,713,714,718,721,723,727,730,733,735,738],{"class":613,"line":614},[611,715,717],{"class":716},"ssYy9","cd",[611,719,720],{"class":634}," \"${",[611,722,581],{"class":621},[611,724,726],{"class":725},"sklAV",":-",[611,728,729],{"class":621},"$HOME",[611,731,732],{"class":725},"\u002F",[611,734,541],{"class":634},[611,736,737],{"class":621},"kraft",[611,739,740],{"class":634},"}\u002Fconfig\"\n",[611,742,743,747,750,753],{"class":613,"line":625},[611,744,746],{"class":745},"szw1H","cp",[611,748,749],{"class":716}," -n",[611,751,752],{"class":634}," chains\u002Fdefault.yaml",[611,754,755],{"class":634}," chains\u002Freviewed.yaml\n",[526,757,758,759,761,762,765,766,541],{},"In ",[514,760,566],{},", change ",[514,763,764],{},"id: default"," to ",[514,767,768],{},"id: reviewed",[526,770,771,772,775,776,784,785,923,926],{},"Replace the existing ",[514,773,774],{},"- id: verification"," entry with one that runs the\nsecurity review beside the code review. A list replaces the parent's when a\nnode extends (",[537,777,779,780,783],{"href":778},"\u002Freference\u002Fchain-nodes#the-library-and-extends","how ",[514,781,782],{},"extends"," merges","),\nso write both steps out:",[601,786,789],{"className":603,"code":787,"filename":788,"language":606,"meta":607,"style":607},"- id: verification\n  extends: verification\n  steps:\n    - id: tests\n      tasks:\n        - id: test_changed_scopes\n          extends: verify_changed_scopes\n    - id: review\n      tasks:\n        - id: code_review\n          extends: code_review\n        - id: security_review\n          extends: security_review\n","config\u002Fchains\u002Freviewed.yaml",[514,790,791,804,813,820,832,839,851,862,874,881,893,902,914],{"__ignoreMap":607},[611,792,793,796,799,801],{"class":613,"line":614},[611,794,795],{"class":621},"- ",[611,797,798],{"class":617},"id",[611,800,631],{"class":621},[611,802,803],{"class":634},"verification\n",[611,805,806,809,811],{"class":613,"line":625},[611,807,808],{"class":617},"  extends",[611,810,631],{"class":621},[611,812,803],{"class":634},[611,814,815,818],{"class":613,"line":638},[611,816,817],{"class":617},"  steps",[611,819,622],{"class":621},[611,821,822,825,827,829],{"class":613,"line":649},[611,823,824],{"class":621},"    - ",[611,826,798],{"class":617},[611,828,631],{"class":621},[611,830,831],{"class":634},"tests\n",[611,833,834,837],{"class":613,"line":660},[611,835,836],{"class":617},"      tasks",[611,838,622],{"class":621},[611,840,841,844,846,848],{"class":613,"line":671},[611,842,843],{"class":621},"        - ",[611,845,798],{"class":617},[611,847,631],{"class":621},[611,849,850],{"class":634},"test_changed_scopes\n",[611,852,854,857,859],{"class":613,"line":853},7,[611,855,856],{"class":617},"          extends",[611,858,631],{"class":621},[611,860,861],{"class":634},"verify_changed_scopes\n",[611,863,865,867,869,871],{"class":613,"line":864},8,[611,866,824],{"class":621},[611,868,798],{"class":617},[611,870,631],{"class":621},[611,872,873],{"class":634},"review\n",[611,875,877,879],{"class":613,"line":876},9,[611,878,836],{"class":617},[611,880,622],{"class":621},[611,882,884,886,888,890],{"class":613,"line":883},10,[611,885,843],{"class":621},[611,887,798],{"class":617},[611,889,631],{"class":621},[611,891,892],{"class":634},"code_review\n",[611,894,896,898,900],{"class":613,"line":895},11,[611,897,856],{"class":617},[611,899,631],{"class":621},[611,901,892],{"class":634},[611,903,905,907,909,911],{"class":613,"line":904},12,[611,906,843],{"class":621},[611,908,798],{"class":617},[611,910,631],{"class":621},[611,912,913],{"class":634},"security_review\n",[611,915,917,919,921],{"class":613,"line":916},13,[611,918,856],{"class":617},[611,920,631],{"class":621},[611,922,913],{"class":634},[924,925],"br",{},"Tasks in one step run in parallel, so both reviews read the same tests-green\nchange. Their findings share the node's fix loop.",[552,928,930],{"id":929},"add-a-gate-reviewer-to-a-gate","Add a gate reviewer to a gate",[587,932,933,942,1061],{},[526,934,935,936,938,939,541],{},"Open ",[514,937,566],{},", or your own chain, and find the gate node to\nreview. This guide uses ",[514,940,941],{},"spec_approval",[526,943,944,945,948,949,951,952],{},"Add ",[514,946,947],{},"auto_review"," to it. It takes an agent task, which you write out as below\nor ",[514,950,782],{}," from the library:",[601,953,955],{"className":603,"code":954,"filename":788,"language":606,"meta":607,"style":607},"- id: spec_approval\n  kind: gate\n  message: Review and approve the specification.\n  artifact: spec\n  reject_to: spec\n  auto_review:\n    id: reviewer\n    kind: agent\n    harness: claude\n    prompt: Decide whether this gate needs a person.\n    skill: kraft:gate-review\n",[514,956,957,968,977,987,997,1006,1013,1023,1032,1041,1051],{"__ignoreMap":607},[611,958,959,961,963,965],{"class":613,"line":614},[611,960,795],{"class":621},[611,962,798],{"class":617},[611,964,631],{"class":621},[611,966,967],{"class":634},"spec_approval\n",[611,969,970,972,974],{"class":613,"line":625},[611,971,628],{"class":617},[611,973,631],{"class":621},[611,975,976],{"class":634},"gate\n",[611,978,979,982,984],{"class":613,"line":638},[611,980,981],{"class":617},"  message",[611,983,631],{"class":621},[611,985,986],{"class":634},"Review and approve the specification.\n",[611,988,989,992,994],{"class":613,"line":649},[611,990,991],{"class":617},"  artifact",[611,993,631],{"class":621},[611,995,996],{"class":634},"spec\n",[611,998,999,1002,1004],{"class":613,"line":660},[611,1000,1001],{"class":617},"  reject_to",[611,1003,631],{"class":621},[611,1005,996],{"class":634},[611,1007,1008,1011],{"class":613,"line":671},[611,1009,1010],{"class":617},"  auto_review",[611,1012,622],{"class":621},[611,1014,1015,1018,1020],{"class":613,"line":853},[611,1016,1017],{"class":617},"    id",[611,1019,631],{"class":621},[611,1021,1022],{"class":634},"reviewer\n",[611,1024,1025,1028,1030],{"class":613,"line":864},[611,1026,1027],{"class":617},"    kind",[611,1029,631],{"class":621},[611,1031,635],{"class":634},[611,1033,1034,1037,1039],{"class":613,"line":876},[611,1035,1036],{"class":617},"    harness",[611,1038,631],{"class":621},[611,1040,646],{"class":634},[611,1042,1043,1046,1048],{"class":613,"line":883},[611,1044,1045],{"class":617},"    prompt",[611,1047,631],{"class":621},[611,1049,1050],{"class":634},"Decide whether this gate needs a person.\n",[611,1052,1053,1056,1058],{"class":613,"line":895},[611,1054,1055],{"class":617},"    skill",[611,1057,631],{"class":621},[611,1059,1060],{"class":634},"kraft:gate-review\n",[526,1062,1063,1064,1067,1068,1072,1073,1076,1077,1079],{},"Leave out ",[514,1065,1066],{},"fallback:",". A gate review launches its reviewer once, so Kraft\nrefuses the task at launch if it selects an\n",[537,1069,1071],{"href":1070},"\u002Fconcepts\u002Fvocabulary#agent-profile","agent profile"," (",[514,1074,1075],{},"profile:",") whose tier has\na ",[514,1078,1066],{}," list.",[510,1081,1082,1083,1085,1086,1089,1090,1094,1095,1098,1099,1103],{},"Auto-gate is on by default for an item you file, so adding ",[514,1084,947],{}," starts a\npaid reviewer agent on every such item that reaches the gate. An item filed by a\nschedule, ",[514,1087,1088],{},"POST \u002Fapi\u002Ftriggers"," or ",[537,1091,1093],{"href":1092},"\u002Fconcepts\u002Fvocabulary#auto-intake","auto-intake"," has it off, and ",[514,1096,1097],{},"--no-auto-gate","\nopts one more item out. ",[537,1100,1102],{"href":1101},"\u002Freference\u002Fcli\u002Fitem#filing-a-work-item","Filing a work item","\nhas the rule.",[1105,1106,1108],"h3",{"id":1107},"what-the-reviewer-can-decide","What the reviewer can decide",[510,1110,1111,1112,1116,1117,683,1120,683,1123,574,1126,1129,1130,1133],{},"The reviewer runs as a ",[537,1113,1115],{"href":1114},"\u002Fconcepts\u002Fvocabulary#worker","worker",", so Kraft refuses it if it tries to approve or\nreject. It reports one of ",[514,1118,1119],{},"approve",[514,1121,1122],{},"reject",[514,1124,1125],{},"fixed",[514,1127,1128],{},"undecided",", and Kraft\napplies the verdict. ",[537,1131,390],{"href":1132},"\u002Freference\u002Fchain-nodes\u002Fresult-file#verdict","\nsays what each one does.",[510,1135,1136,1137,1139,1140,1143,1144,1148,1149,1152],{},"If the reviewer reports nothing or an unknown value, Kraft records ",[514,1138,1128],{},":\nthe gate waits for a person, who sees the reviewer's concerns first.\n",[514,1141,1142],{},"auto_review_attempts"," in ",[537,1145,1146],{"href":311},[514,1147,310],{},"\n(default ",[514,1150,1151],{},"1",") bounds how many attempts one pending gate gets.",[552,1154,1156],{"id":1155},"check-it-worked","Check it worked",[587,1158,1159,1249,1276],{},[526,1160,1161,1162,1206,1208,1209,1225,1227,1228,1231,1232,1235,1236,1239,1240,1242,1243,1245,1246,1248],{},"Lint the files, make the server read them, and print the chain with the\nlibrary expanded:",[601,1163,1165],{"className":707,"code":1164,"language":709,"meta":607,"style":607},"kraft admin templates lint\nkraft admin reload\nkraft admin templates show reviewed --resolved\n",[514,1166,1167,1180,1189],{"__ignoreMap":607},[611,1168,1169,1171,1174,1177],{"class":613,"line":614},[611,1170,737],{"class":745},[611,1172,1173],{"class":634}," admin",[611,1175,1176],{"class":634}," templates",[611,1178,1179],{"class":634}," lint\n",[611,1181,1182,1184,1186],{"class":613,"line":625},[611,1183,737],{"class":745},[611,1185,1173],{"class":634},[611,1187,1188],{"class":634}," reload\n",[611,1190,1191,1193,1195,1197,1200,1203],{"class":613,"line":638},[611,1192,737],{"class":745},[611,1194,1173],{"class":634},[611,1196,1176],{"class":634},[611,1198,1199],{"class":634}," show",[611,1201,1202],{"class":634}," reviewed",[611,1204,1205],{"class":716}," --resolved\n",[924,1207],{},"A pass prints these lines (the counts are your own):",[601,1210,1215],{"className":1211,"code":1213,"language":1214,"meta":607},[1212],"language-text","3 chain(s), no errors\nreloaded 3 template(s) and policy.yaml and intake.yaml\n","text",[514,1216,1217,1221],{"__ignoreMap":607},[611,1218,1220],{"className":1219},[613],"3 chain(s), no errors\n",[611,1222,1224],{"className":1223},[613],"reloaded 3 template(s) and policy.yaml and intake.yaml\n",[924,1226],{},"The first line is ",[514,1229,1230],{},"lint","'s, the second ",[514,1233,1234],{},"reload","'s. In the ",[514,1237,1238],{},"show"," output, look for ",[514,1241,618],{}," under ",[514,1244,520],{},", and ",[514,1247,947],{}," on the\ngate.",[526,1250,1251,1252],{},"File an item on the chain:",[601,1253,1255],{"className":707,"code":1254,"language":709,"meta":607,"style":607},"kraft item create \"title\" --chain reviewed\n",[514,1256,1257],{"__ignoreMap":607},[611,1258,1259,1261,1264,1267,1270,1273],{"class":613,"line":614},[611,1260,737],{"class":745},[611,1262,1263],{"class":634}," item",[611,1265,1266],{"class":634}," create",[611,1268,1269],{"class":634}," \"title\"",[611,1271,1272],{"class":716}," --chain",[611,1274,1275],{"class":634}," reviewed\n",[526,1277,1278,1279,1281,1282,1321,1323,1324,1327,1328,1331,1332,1335],{},"When the item has passed the tests in ",[514,1280,520],{},", list the findings, and\nwhen it reaches the reviewed gate, list the reviewer's start:",[601,1283,1285],{"className":707,"code":1284,"language":709,"meta":607,"style":607},"kraft view events ID --type findings_measured\nkraft view events ID --type gate_auto_review_started\n",[514,1286,1287,1306],{"__ignoreMap":607},[611,1288,1289,1291,1294,1297,1300,1303],{"class":613,"line":614},[611,1290,737],{"class":745},[611,1292,1293],{"class":634}," view",[611,1295,1296],{"class":634}," events",[611,1298,1299],{"class":634}," ID",[611,1301,1302],{"class":716}," --type",[611,1304,1305],{"class":634}," findings_measured\n",[611,1307,1308,1310,1312,1314,1316,1318],{"class":613,"line":625},[611,1309,737],{"class":745},[611,1311,1293],{"class":634},[611,1313,1296],{"class":634},[611,1315,1299],{"class":634},[611,1317,1302],{"class":716},[611,1319,1320],{"class":634}," gate_auto_review_started\n",[924,1322],{},"A security finding shows in ",[514,1325,1326],{},"findings_measured"," like any review finding. A\ngate review that ran shows one ",[514,1329,1330],{},"gate_auto_review_started"," row. A\n",[514,1333,1334],{},"gate_auto_review_skipped"," row means the reviewer left the gate to a person.",[552,1337,1339],{"id":1338},"next-steps","Next steps",[523,1341,1342,1351,1356,1362],{},[526,1343,1344,1347,1348,1350],{},[537,1345,376],{"href":1346},"\u002Freference\u002Fchain-nodes#gate-node-keys",": every key a gate takes, ",[514,1349,947],{}," included.",[526,1352,1353,1355],{},[537,1354,1102],{"href":1101},": which items have auto-gate on, and how to turn it off.",[526,1357,1358,1361],{},[537,1359,466],{"href":1360},"\u002Freference\u002Fevents#gates-and-review",": the events a gate review records.",[526,1363,1364,1366],{},[537,1365,102],{"href":103},": add a node of your own to the same chain.",[1368,1369,1370],"style",{},"html pre.shiki code .sb7M8, html code.shiki .sb7M8{--shiki-light:#024C1A;--shiki-default:#024C1A;--shiki-dark:#72F088}html pre.shiki code .s7iLA, html code.shiki .s7iLA{--shiki-light:#0E1116;--shiki-default:#0E1116;--shiki-dark:#F0F3F6}html pre.shiki code .semJd, html code.shiki .semJd{--shiki-light:#032563;--shiki-default:#032563;--shiki-dark:#ADDCFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .ssYy9, html code.shiki .ssYy9{--shiki-light:#023B95;--shiki-default:#023B95;--shiki-dark:#91CBFF}html pre.shiki code .sklAV, html code.shiki .sklAV{--shiki-light:#A0111F;--shiki-default:#A0111F;--shiki-dark:#FF9492}html pre.shiki code .szw1H, html code.shiki .szw1H{--shiki-light:#702C00;--shiki-default:#702C00;--shiki-dark:#FFB757}",{"title":607,"searchDepth":625,"depth":625,"links":1372},[1373,1374,1375,1378,1379],{"id":554,"depth":625,"text":555},{"id":584,"depth":625,"text":585},{"id":929,"depth":625,"text":930,"children":1376},[1377],{"id":1107,"depth":638,"text":1108},{"id":1155,"depth":625,"text":1156},{"id":1338,"depth":625,"text":1339},"Add the shipped security-review and gate-review skills to a chain of your own, since no shipped chain uses them.","md",null,{},true,{"title":106,"description":1380},"Jc6gUc5tXug2R4juIv3Wa8VQ9OsrCLob0VTjlIMgVUw",[1388,1390],{"title":102,"path":103,"stem":104,"description":1389,"children":-1},"Add a lint node to a copy of the default chain, with an agent that fixes what lint reports, a time cap, and no way to skip it.",{"title":110,"path":111,"stem":112,"description":1391,"children":-1},"File a paused work item on a cron schedule or from a webhook, then check that it arrived.",1791801239364]