[{"data":1,"prerenderedAt":866},["ShallowReactive",2],{"i-mdi:magnify":3,"i-simple-icons:visualstudiocode":8,"i-mdi:github":11,"i-mdi:discord":13,"i-mdi:youtube":15,"i-mdi:flask-outline":17,"i-vscode-icons:default-folder-opened":19,"i-vscode-icons:default-folder":22,"i-vscode-icons:folder-type-plugin":24,"i-vscode-icons:folder-type-src":26,"i-vscode-icons:file-type-typescript":28,"i-vscode-icons:file-type-json":30,"docs-\u002Fdocs\u002Fv2\u002Fcognets\u002Fapi\u002Fphase":32},{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":7},0,24,false,"\u003Cpath fill=\"currentColor\" d=\"M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5l-1.5 1.5l-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16A6.5 6.5 0 0 1 3 9.5A6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14S14 12 14 9.5S12 5 9.5 5\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":9,"hidden":10},"\u003Cpath fill=\"currentColor\" d=\"M23.15 2.587L18.21.21a1.49 1.49 0 0 0-1.705.29l-9.46 8.63l-4.12-3.128a1 1 0 0 0-1.276.057L.327 7.261A1 1 0 0 0 .326 8.74L3.899 12L.326 15.26a1 1 0 0 0 .001 1.479L1.65 17.94a1 1 0 0 0 1.276.057l4.12-3.128l9.46 8.63a1.49 1.49 0 0 0 1.704.29l4.942-2.377A1.5 1.5 0 0 0 24 20.06V3.939a1.5 1.5 0 0 0-.85-1.352m-5.146 14.861L10.826 12l7.178-5.448z\"\u002F>",true,{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":12},"\u003Cpath fill=\"currentColor\" d=\"M12 2A10 10 0 0 0 2 12c0 4.42 2.87 8.17 6.84 9.5c.5.08.66-.23.66-.5v-1.69c-2.77.6-3.36-1.34-3.36-1.34c-.46-1.16-1.11-1.47-1.11-1.47c-.91-.62.07-.6.07-.6c1 .07 1.53 1.03 1.53 1.03c.87 1.52 2.34 1.07 2.91.83c.09-.65.35-1.09.63-1.34c-2.22-.25-4.55-1.11-4.55-4.92c0-1.11.38-2 1.03-2.71c-.1-.25-.45-1.29.1-2.64c0 0 .84-.27 2.75 1.02c.79-.22 1.65-.33 2.5-.33s1.71.11 2.5.33c1.91-1.29 2.75-1.02 2.75-1.02c.55 1.35.2 2.39.1 2.64c.65.71 1.03 1.6 1.03 2.71c0 3.82-2.34 4.66-4.57 4.91c.36.31.69.92.69 1.85V21c0 .27.16.59.67.5C19.14 20.16 22 16.42 22 12A10 10 0 0 0 12 2\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":14,"hidden":10},"\u003Cpath fill=\"currentColor\" d=\"m22 24l-5.25-5l.63 2H4.5A2.5 2.5 0 0 1 2 18.5v-15A2.5 2.5 0 0 1 4.5 1h15A2.5 2.5 0 0 1 22 3.5V24M12 6.8c-2.68 0-4.56 1.15-4.56 1.15c1.03-.92 2.83-1.45 2.83-1.45l-.17-.17c-1.69.03-3.22 1.2-3.22 1.2c-1.72 3.59-1.61 6.69-1.61 6.69c1.4 1.81 3.48 1.68 3.48 1.68l.71-.9c-1.25-.27-2.04-1.38-2.04-1.38S9.3 14.9 12 14.9s4.58-1.28 4.58-1.28s-.79 1.11-2.04 1.38l.71.9s2.08.13 3.48-1.68c0 0 .11-3.1-1.61-6.69c0 0-1.53-1.17-3.22-1.2l-.17.17s1.8.53 2.83 1.45c0 0-1.88-1.15-4.56-1.15m-2.07 3.79c.65 0 1.18.57 1.17 1.27c0 .69-.52 1.27-1.17 1.27c-.64 0-1.16-.58-1.16-1.27c0-.7.51-1.27 1.16-1.27m4.17 0c.65 0 1.17.57 1.17 1.27c0 .69-.52 1.27-1.17 1.27c-.64 0-1.16-.58-1.16-1.27c0-.7.51-1.27 1.16-1.27Z\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":16},"\u003Cpath fill=\"currentColor\" d=\"m10 15l5.19-3L10 9zm11.56-7.83c.13.47.22 1.1.28 1.9c.07.8.1 1.49.1 2.09L22 12c0 2.19-.16 3.8-.44 4.83c-.25.9-.83 1.48-1.73 1.73c-.47.13-1.33.22-2.65.28c-1.3.07-2.49.1-3.59.1L12 19c-4.19 0-6.8-.16-7.83-.44c-.9-.25-1.48-.83-1.73-1.73c-.13-.47-.22-1.1-.28-1.9c-.07-.8-.1-1.49-.1-2.09L2 12c0-2.19.16-3.8.44-4.83c.25-.9.83-1.48 1.73-1.73c.47-.13 1.33-.22 2.65-.28c1.3-.07 2.49-.1 3.59-.1L12 5c4.19 0 6.8.16 7.83.44c.9.25 1.48.83 1.73 1.73\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":18},"\u003Cpath fill=\"currentColor\" d=\"M5 19a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1c0-.21-.07-.41-.18-.57L13 8.35V4h-2v4.35L5.18 18.43c-.11.16-.18.36-.18.57m1 3a3 3 0 0 1-3-3c0-.6.18-1.16.5-1.63L9 7.81V6a1 1 0 0 1-1-1V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1v1.81l5.5 9.56c.32.47.5 1.03.5 1.63a3 3 0 0 1-3 3zm7-6l1.34-1.34L16.27 18H7.73l2.66-4.61zm-.5-4a.5.5 0 0 1 .5.5a.5.5 0 0 1-.5.5a.5.5 0 0 1-.5-.5a.5.5 0 0 1 .5-.5\"\u002F>",{"left":4,"top":4,"width":20,"height":20,"rotate":4,"vFlip":6,"hFlip":6,"body":21},32,"\u003Cpath fill=\"#dcb67a\" d=\"M27.4 5.5h-9.2l-2.1 4.2H4.3v16.8h25.2v-21Zm0 18.7H6.6V11.8h20.8Zm0-14.5h-8.2l1-2.1h7.1v2.1Z\"\u002F>\u003Cpath fill=\"#dcb67a\" d=\"M25.7 13.7H.5l3.8 12.8h25.2z\"\u002F>",{"left":4,"top":4,"width":20,"height":20,"rotate":4,"vFlip":6,"hFlip":6,"body":23},"\u003Cpath fill=\"#c09553\" d=\"M27.5 5.5h-9.3l-2.1 4.2H4.4v16.8h25.2v-21Zm0 4.2h-8.2l1.1-2.1h7.1Z\"\u002F>",{"left":4,"top":4,"width":20,"height":20,"rotate":4,"vFlip":6,"hFlip":6,"body":25},"\u003Cpath fill=\"#ffba58\" d=\"M27.5 5.5h-9.3l-2.1 4.2H4.4v16.8h25.2v-21Zm0 4.2h-8.2l1.1-2.1h7.1Z\"\u002F>\u003Cpath fill=\"#e76a00\" d=\"M20 12.5V14h-4a2.006 2.006 0 0 0-2 2v4h-1.5a2.5 2.5 0 0 0 0 5H14v4a2.006 2.006 0 0 0 2 2h3.8v-1.5a2.7 2.7 0 0 1 5.4 0V31H29a2.006 2.006 0 0 0 2-2v-3.8h-1.5a2.7 2.7 0 0 1 0-5.4H31V16a2.006 2.006 0 0 0-2-2h-4v-1.5a2.5 2.5 0 0 0-5 0\"\u002F>",{"left":4,"top":4,"width":20,"height":20,"rotate":4,"vFlip":6,"hFlip":6,"body":27},"\u003Cpath fill=\"#14622a\" d=\"M27.5 5.5h-9.3l-2.1 4.2H4.4v16.8h25.2v-21Zm0 4.2h-8.2l1.1-2.1h7.1Z\"\u002F>\u003Cpath fill=\"#06cc14\" d=\"M19.146 30.989a1 1 0 0 1-.207-.025a1.04 1.04 0 0 1-.726-1.213l2.709-14.431a1.04 1.04 0 0 1 .444-.683a.9.9 0 0 1 .7-.122a1.043 1.043 0 0 1 .727 1.213L20.077 30.16a1.03 1.03 0 0 1-.442.681a.9.9 0 0 1-.489.148m5.432-2.045h-.068a.93.93 0 0 1-.668-.377a1.1 1.1 0 0 1 .1-1.419l4.658-4.553l-4.638-4.239a1.1 1.1 0 0 1-.141-1.416a.94.94 0 0 1 .661-.4a.9.9 0 0 1 .709.237l5.47 5a1.1 1.1 0 0 1 .144 1.416a1 1 0 0 1-.142.163l-5.447 5.324a.92.92 0 0 1-.638.264m-8.155.003a.9.9 0 0 1-.639-.267l-5.452-5.327a1 1 0 0 1-.132-.153a1.094 1.094 0 0 1 .141-1.414l5.471-5a.88.88 0 0 1 .7-.238a.94.94 0 0 1 .665.4a1.1 1.1 0 0 1-.14 1.417L12.4 22.6l4.659 4.551a1.09 1.09 0 0 1 .1 1.419a.93.93 0 0 1-.669.377Z\"\u002F>",{"left":4,"top":4,"width":20,"height":20,"rotate":4,"vFlip":6,"hFlip":6,"body":29},"\u003Cpath fill=\"#007acc\" d=\"M23.827 8.243a4.4 4.4 0 0 1 2.223 1.281a6 6 0 0 1 .852 1.143c.011.045-1.534 1.083-2.471 1.662c-.034.023-.169-.124-.322-.35a2.01 2.01 0 0 0-1.67-1c-1.077-.074-1.771.49-1.766 1.433a1.3 1.3 0 0 0 .153.666c.237.49.677.784 2.059 1.383c2.544 1.095 3.636 1.817 4.31 2.843a5.16 5.16 0 0 1 .416 4.333a4.76 4.76 0 0 1-3.932 2.815a11 11 0 0 1-2.708-.028a6.53 6.53 0 0 1-3.616-1.884a6.3 6.3 0 0 1-.926-1.371a3 3 0 0 1 .327-.208c.158-.09.756-.434 1.32-.761l1.024-.6l.214.312a4.8 4.8 0 0 0 1.35 1.292a3.3 3.3 0 0 0 3.458-.175a1.545 1.545 0 0 0 .2-1.974c-.276-.395-.84-.727-2.443-1.422a8.8 8.8 0 0 1-3.349-2.055a4.7 4.7 0 0 1-.976-1.777a7.1 7.1 0 0 1-.062-2.268a4.33 4.33 0 0 1 3.644-3.374a9 9 0 0 1 2.691.084m-8.343 1.483l.011 1.454h-4.63v13.148H7.6V11.183H2.97V9.755a14 14 0 0 1 .04-1.466c.017-.023 2.832-.034 6.245-.028l6.211.017Z\"\u002F>",{"left":4,"top":4,"width":20,"height":20,"rotate":4,"vFlip":6,"hFlip":6,"body":31},"\u003Cpath fill=\"#f5de19\" d=\"M4.014 14.976a2.5 2.5 0 0 0 1.567-.518a2.38 2.38 0 0 0 .805-1.358a15.3 15.3 0 0 0 .214-2.944q.012-2.085.075-2.747a5.2 5.2 0 0 1 .418-1.686a3 3 0 0 1 .755-1.018A3.05 3.05 0 0 1 9 4.125A6.8 6.8 0 0 1 10.544 4h.7v1.96h-.387a2.34 2.34 0 0 0-1.723.468a3.4 3.4 0 0 0-.425 2.092a36 36 0 0 1-.137 4.133a4.7 4.7 0 0 1-.768 2.06A4.6 4.6 0 0 1 6.1 16a3.8 3.8 0 0 1 1.992 1.754a8.9 8.9 0 0 1 .618 3.865q0 2.435.05 2.9a1.76 1.76 0 0 0 .504 1.181a2.64 2.64 0 0 0 1.592.337h.387V28h-.7a5.7 5.7 0 0 1-1.773-.2a2.97 2.97 0 0 1-1.324-.93a3.35 3.35 0 0 1-.681-1.63a24 24 0 0 1-.165-3.234a16.5 16.5 0 0 0-.214-3.106a2.4 2.4 0 0 0-.805-1.361a2.5 2.5 0 0 0-1.567-.524Zm23.972 2.035a2.5 2.5 0 0 0-1.567.524a2.4 2.4 0 0 0-.805 1.361a16.5 16.5 0 0 0-.212 3.109a24 24 0 0 1-.169 3.234a3.35 3.35 0 0 1-.681 1.63a2.97 2.97 0 0 1-1.324.93a5.7 5.7 0 0 1-1.773.2h-.7V26.04h.387a2.64 2.64 0 0 0 1.592-.337a1.76 1.76 0 0 0 .506-1.186q.05-.462.05-2.9a8.9 8.9 0 0 1 .618-3.865A3.8 3.8 0 0 1 25.9 16a4.6 4.6 0 0 1-1.7-1.286a4.7 4.7 0 0 1-.768-2.06a36 36 0 0 1-.137-4.133a3.4 3.4 0 0 0-.425-2.092a2.34 2.34 0 0 0-1.723-.468h-.387V4h.7a6.8 6.8 0 0 1 1.54.125a3.05 3.05 0 0 1 1.149.581a3 3 0 0 1 .755 1.018a5.2 5.2 0 0 1 .418 1.686q.062.662.075 2.747a15.3 15.3 0 0 0 .212 2.947a2.38 2.38 0 0 0 .805 1.355a2.5 2.5 0 0 0 1.567.518Z\"\u002F>",{"id":33,"title":34,"body":35,"description":859,"extension":860,"meta":861,"navigation":10,"path":862,"seo":863,"stem":864,"__hash__":865},"docs\u002Fdocs\u002Fv2\u002Fcognets\u002Fapi\u002Fphase.md","phase",{"type":36,"value":37,"toc":850},"minimark",[38,41,58,177,180,185,193,420,433,437,443,449,471,482,486,493,654,661,671,675,714,733,747,750,754,757,773,776,780,787,798,813,817,832,846],[39,40,34],"h1",{"id":34},[42,43,44,48,49,52,53,57],"p",{},[45,46,47],"code",{},"phase()"," and ",[45,50,51],{},"system()"," are the two execution wrappers. They are the same function at\ndifferent nesting depths: each brackets its callback with telemetry so the shape of a\nthought is ",[54,55,56],"strong",{},"recorded as it happens"," rather than reconstructed afterward.",[59,60,65],"pre",{"className":61,"code":62,"language":63,"meta":64,"style":64},"language-ts shiki shiki-themes dark-plus","function phase\u003CT>(name: string, fn: () => Promise\u003CT>): Promise\u003CT>\nfunction system\u003CT>(name: string, fn: () => Promise\u003CT>): Promise\u003CT>\n","ts","",[45,66,67,133],{"__ignoreMap":64},[68,69,72,76,80,84,88,91,95,98,101,104,107,110,113,116,118,120,123,126,128,130],"span",{"class":70,"line":71},"line",1,[68,73,75],{"class":74},"scz_3","function",[68,77,79],{"class":78},"sCudf"," phase",[68,81,83],{"class":82},"sTNBD","\u003C",[68,85,87],{"class":86},"sNl3T","T",[68,89,90],{"class":82},">(",[68,92,94],{"class":93},"s3F5K","name",[68,96,97],{"class":82},": ",[68,99,100],{"class":86},"string",[68,102,103],{"class":82},", ",[68,105,106],{"class":78},"fn",[68,108,109],{"class":82},": () ",[68,111,112],{"class":74},"=>",[68,114,115],{"class":86}," Promise",[68,117,83],{"class":82},[68,119,87],{"class":86},[68,121,122],{"class":82},">): ",[68,124,125],{"class":86},"Promise",[68,127,83],{"class":82},[68,129,87],{"class":86},[68,131,132],{"class":82},">\n",[68,134,136,138,141,143,145,147,149,151,153,155,157,159,161,163,165,167,169,171,173,175],{"class":70,"line":135},2,[68,137,75],{"class":74},[68,139,140],{"class":78}," system",[68,142,83],{"class":82},[68,144,87],{"class":86},[68,146,90],{"class":82},[68,148,94],{"class":93},[68,150,97],{"class":82},[68,152,100],{"class":86},[68,154,103],{"class":82},[68,156,106],{"class":78},[68,158,109],{"class":82},[68,160,112],{"class":74},[68,162,115],{"class":86},[68,164,83],{"class":82},[68,166,87],{"class":86},[68,168,122],{"class":82},[68,170,125],{"class":86},[68,172,83],{"class":82},[68,174,87],{"class":86},[68,176,132],{"class":82},[42,178,179],{},"Both are ambient globals, both return whatever the callback returns, both rethrow. Neither\nswallows.",[181,182,184],"h2",{"id":183},"the-three-levels","The three levels",[59,186,191],{"className":187,"code":189,"language":190},[188],"language-text","tick        driven for you — the host wraps every loop iteration\n └─ phase   a named stage you declare\n     └─ system   a unit of work inside it\n","text",[45,192,189],{"__ignoreMap":64},[59,194,196],{"className":61,"code":195,"language":63,"meta":64,"style":64},"loop(async ({ stop }) => {\n    const messages = await phase(\"render\", async () => {\n        const knowledge = await system(\"catalogue\", () => kernel.knowledge.list())\n        return air.render({ base: await kernel.base(), state: knowledge })\n    })\n\n    const done = await phase(\"invoke\", async () => { \u002F* ... *\u002F })\n\n    if (done) stop()\n})\n",[45,197,198,223,258,300,341,347,353,389,394,414],{"__ignoreMap":64},[68,199,200,203,206,209,212,215,218,220],{"class":70,"line":71},[68,201,202],{"class":78},"loop",[68,204,205],{"class":82},"(",[68,207,208],{"class":74},"async",[68,210,211],{"class":82}," ({ ",[68,213,214],{"class":93},"stop",[68,216,217],{"class":82}," }) ",[68,219,112],{"class":74},[68,221,222],{"class":82}," {\n",[68,224,225,228,232,235,239,241,243,247,249,251,254,256],{"class":70,"line":135},[68,226,227],{"class":74},"    const",[68,229,231],{"class":230},"s9McN"," messages",[68,233,234],{"class":82}," = ",[68,236,238],{"class":237},"sYbnZ","await",[68,240,79],{"class":78},[68,242,205],{"class":82},[68,244,246],{"class":245},"sKc5r","\"render\"",[68,248,103],{"class":82},[68,250,208],{"class":74},[68,252,253],{"class":82}," () ",[68,255,112],{"class":74},[68,257,222],{"class":82},[68,259,261,264,267,269,271,273,275,278,281,283,286,289,292,294,297],{"class":70,"line":260},3,[68,262,263],{"class":74},"        const",[68,265,266],{"class":230}," knowledge",[68,268,234],{"class":82},[68,270,238],{"class":237},[68,272,140],{"class":78},[68,274,205],{"class":82},[68,276,277],{"class":245},"\"catalogue\"",[68,279,280],{"class":82},", () ",[68,282,112],{"class":74},[68,284,285],{"class":93}," kernel",[68,287,288],{"class":82},".",[68,290,291],{"class":93},"knowledge",[68,293,288],{"class":82},[68,295,296],{"class":78},"list",[68,298,299],{"class":82},"())\n",[68,301,303,306,309,311,314,317,320,323,325,327,330,333,336,338],{"class":70,"line":302},4,[68,304,305],{"class":237},"        return",[68,307,308],{"class":93}," air",[68,310,288],{"class":82},[68,312,313],{"class":78},"render",[68,315,316],{"class":82},"({ ",[68,318,319],{"class":93},"base:",[68,321,322],{"class":237}," await",[68,324,285],{"class":93},[68,326,288],{"class":82},[68,328,329],{"class":78},"base",[68,331,332],{"class":82},"(), ",[68,334,335],{"class":93},"state:",[68,337,266],{"class":93},[68,339,340],{"class":82}," })\n",[68,342,344],{"class":70,"line":343},5,[68,345,346],{"class":82},"    })\n",[68,348,350],{"class":70,"line":349},6,[68,351,352],{"emptyLinePlaceholder":10},"\n",[68,354,356,358,361,363,365,367,369,372,374,376,378,380,383,387],{"class":70,"line":355},7,[68,357,227],{"class":74},[68,359,360],{"class":230}," done",[68,362,234],{"class":82},[68,364,238],{"class":237},[68,366,79],{"class":78},[68,368,205],{"class":82},[68,370,371],{"class":245},"\"invoke\"",[68,373,103],{"class":82},[68,375,208],{"class":74},[68,377,253],{"class":82},[68,379,112],{"class":74},[68,381,382],{"class":82}," { ",[68,384,386],{"class":385},"sOLPB","\u002F* ... *\u002F",[68,388,340],{"class":82},[68,390,392],{"class":70,"line":391},8,[68,393,352],{"emptyLinePlaceholder":10},[68,395,397,400,403,406,409,411],{"class":70,"line":396},9,[68,398,399],{"class":237},"    if",[68,401,402],{"class":82}," (",[68,404,405],{"class":93},"done",[68,407,408],{"class":82},") ",[68,410,214],{"class":78},[68,412,413],{"class":82},"()\n",[68,415,417],{"class":70,"line":416},10,[68,418,419],{"class":82},"})\n",[42,421,422,425,426,428,429,432],{},[45,423,424],{},"tick"," you never call — the host wraps every loop iteration in one and advances the\ncounter. ",[45,427,34],{}," sets the current phase for its duration; ",[45,430,431],{},"system"," reads it and stamps\nagainst it.",[181,434,436],{"id":435},"which-one-to-reach-for","Which one to reach for",[42,438,439,442],{},[54,440,441],{},"A phase is a stage of thinking."," Sense, render, invoke, act. There are a handful per\ntick and their names are the vertebrae of the loop — a reader who knows only your phase\nnames knows the shape of your cognition.",[42,444,445,448],{},[54,446,447],{},"A system is a unit of work."," An embed, a catalogue read, a fan-out. There may be many\nper phase, and their names are what you read when a phase is slow and you need to know\nwhich part.",[42,450,451,452,454,455,458,459,461,462,464,465,467,468,288],{},"The mechanical difference is small: ",[45,453,34],{}," sets ",[45,456,457],{},"clock.phase"," for its duration and clears\nit after; ",[45,460,431],{}," does not, and instead carries the enclosing phase in its payload.\n",[45,463,431],{}," outside a phase is legal — ",[45,466,34],{}," is then ",[45,469,470],{},"null",[42,472,473,474,477,478,481],{},"Both are ",[54,475,476],{},"wake-scoped",". Calling either outside a loop body throws\n",[45,479,480],{},"COGNET_ACCESSED_BEFORE_LOAD"," — they resolve the current wake's clock, and load, boot and\nshutdown carry none.",[181,483,485],{"id":484},"what-they-emit","What they emit",[42,487,488,489,492],{},"Each level is a four-state span on ",[45,490,491],{},"CognetEventMap",":",[494,495,496,509],"table",{},[497,498,499],"thead",{},[500,501,502,506],"tr",{},[503,504,505],"th",{},"Event",[503,507,508],{},"Payload",[510,511,512,525,537,549,560,572,584,596,607,619,631,643],"tbody",{},[500,513,514,520],{},[515,516,517],"td",{},[45,518,519],{},"cognet:tick:start",[515,521,522],{},[45,523,524],{},"{ tick }",[500,526,527,532],{},[515,528,529],{},[45,530,531],{},"cognet:tick:complete",[515,533,534],{},[45,535,536],{},"{ tick, durationMs }",[500,538,539,544],{},[515,540,541],{},[45,542,543],{},"cognet:tick:failed",[515,545,546],{},[45,547,548],{},"{ tick, error, durationMs }",[500,550,551,556],{},[515,552,553],{},[45,554,555],{},"cognet:tick:interrupted",[515,557,558],{},[45,559,524],{},[500,561,562,567],{},[515,563,564],{},[45,565,566],{},"cognet:phase:start",[515,568,569],{},[45,570,571],{},"{ tick, phase }",[500,573,574,579],{},[515,575,576],{},[45,577,578],{},"cognet:phase:complete",[515,580,581],{},[45,582,583],{},"{ tick, phase, durationMs }",[500,585,586,591],{},[515,587,588],{},[45,589,590],{},"cognet:phase:failed",[515,592,593],{},[45,594,595],{},"{ tick, phase, error, durationMs }",[500,597,598,603],{},[515,599,600],{},[45,601,602],{},"cognet:phase:interrupted",[515,604,605],{},[45,606,571],{},[500,608,609,614],{},[515,610,611],{},[45,612,613],{},"cognet:system:start",[515,615,616],{},[45,617,618],{},"{ tick, phase, system }",[500,620,621,626],{},[515,622,623],{},[45,624,625],{},"cognet:system:complete",[515,627,628],{},[45,629,630],{},"{ tick, phase, system, durationMs }",[500,632,633,638],{},[515,634,635],{},[45,636,637],{},"cognet:system:failed",[515,639,640],{},[45,641,642],{},"{ tick, phase, system, error, durationMs }",[500,644,645,650],{},[515,646,647],{},[45,648,649],{},"cognet:system:interrupted",[515,651,652],{},[45,653,618],{},[42,655,656,657,660],{},"The bracket identity is ",[54,658,659],{},"in the payload"," — tick number, phase name, system name. That is\nwhat lets a reader pair a start with its own end when siblings of the same stem appear in\none run.",[42,662,663,666,667,670],{},[45,664,665],{},"system.phase"," is ",[45,668,669],{},"string | null",". The three levels nest but do not require each other.",[181,672,674],{"id":673},"interrupted-is-a-third-outcome","Interrupted is a third outcome",[59,676,678],{"className":61,"code":677,"language":63,"meta":64,"style":64},"await phase(\"invoke\", async () => {\n    \u002F\u002F user hits Escape mid-stream\n})\n\u002F\u002F → cognet:phase:interrupted, and the cause rethrows unchanged\n",[45,679,680,700,705,709],{"__ignoreMap":64},[68,681,682,684,686,688,690,692,694,696,698],{"class":70,"line":71},[68,683,238],{"class":237},[68,685,79],{"class":78},[68,687,205],{"class":82},[68,689,371],{"class":245},[68,691,103],{"class":82},[68,693,208],{"class":74},[68,695,253],{"class":82},[68,697,112],{"class":74},[68,699,222],{"class":82},[68,701,702],{"class":70,"line":135},[68,703,704],{"class":385},"    \u002F\u002F user hits Escape mid-stream\n",[68,706,707],{"class":70,"line":260},[68,708,419],{"class":82},[68,710,711],{"class":70,"line":302},[68,712,713],{"class":385},"\u002F\u002F → cognet:phase:interrupted, and the cause rethrows unchanged\n",[42,715,716,717,720,721,724,725,728,729,732],{},"When the wake's ",[45,718,719],{},"signal"," is aborted, whatever ",[45,722,723],{},"fn()"," threw is ",[54,726,727],{},"cancellation surfacing\nthrough the call stack",", not a bug in the phase's own work. Emitting ",[45,730,731],{},":failed"," for that\nwould conflate a cancelled thought with a broken one, and telemetry full of meaningless red\nis telemetry nobody reads.",[42,734,735,736,738,739,742,743,746],{},"Real failures still emit ",[45,737,731],{}," and rethrow, wrapped as a structured ",[45,740,741],{},"AxonError",".\n",[54,744,745],{},"Telemetry never swallows"," — the wrapper is a bracket, not a catch.",[42,748,749],{},"The distinction is checked against the signal at the moment of the throw, so it is the\nwake's actual state that decides, not a guess from the error's shape.",[181,751,753],{"id":752},"naming-is-instrumentation","Naming is instrumentation",[42,755,756],{},"Phase and system names are the axis of every flame graph, every timing breakdown, every\n\"where did this tick go\". They are the one place a cognet author writes something the\ndevtools read directly.",[42,758,759,760,763,764,48,766,768,769,772],{},"Name the ",[54,761,762],{},"stage",", not the code. ",[45,765,246],{},[45,767,371],{}," survive a refactor;\n",[45,770,771],{},"\"buildMessagesFromEntries\""," does not. Keep them stable across ticks — a name that varies\nper call fragments the aggregate and makes the graph unreadable.",[42,774,775],{},"Do not interpolate identifiers into names. The identity goes in the payload; the name is\nthe category.",[181,777,779],{"id":778},"fire-and-forget-durably","Fire-and-forget, durably",[42,781,782,783,786],{},"The emit calls are never awaited. ",[45,784,785],{},"void emit(...)"," — a phase does not pay latency to be\nobserved.",[42,788,789,790,797],{},"Durable in the machine regardless: ",[791,792,794],"a",{"href":793},"\u002Fdocs\u002Fv2\u002Fcognets\u002Fapi\u002Fkernel",[45,795,796],{},"kernel.emit"," commits\neach to the session's log and forwards it to the runtime bus. Flame-graph and devtools\nmaterial, never rendered to the user.",[42,799,800,801,804,805,808,809,812],{},"The world clock lives in ",[45,802,803],{},"cognet:*",", not ",[45,806,807],{},"kernel:*",". Since cognition moved into the cognet\nlayer, ticks and phases are the ",[54,810,811],{},"brain's own"," clock — the kernel neither knows nor cares\nthat a brain ticks.",[181,814,816],{"id":815},"what-is-not-yours","What is not yours",[42,818,819,820,823,824,827,828,831],{},"The durable record around a wake stays the kernel's: ",[45,821,822],{},"kernel:run:*",", engine calls,\n",[45,825,826],{},"cognet:load"," \u002F ",[45,829,830],{},"cognet:unload",", and the knowledge mutation events.",[42,833,834,48,836,838,839,841,842,845],{},[45,835,826],{},[45,837,830],{}," are the one family in ",[45,840,491],{}," the brain does not\nproduce. Exec'ing an untrusted artifact is the most failure-prone step in boot, and a\ncognet that dies inside ",[45,843,844],{},"load()"," cannot narrate its own failure — whatever bracket it\nopened would never close. The kernel is the only loader, so it is the only thing positioned\nto record both halves honestly.",[847,848,849],"style",{},"html pre.shiki code .scz_3, html code.shiki .scz_3{--shiki-default:#569CD6}html pre.shiki code .sCudf, html code.shiki .sCudf{--shiki-default:#DCDCAA}html pre.shiki code .sTNBD, html code.shiki .sTNBD{--shiki-default:#D4D4D4}html pre.shiki code .sNl3T, html code.shiki .sNl3T{--shiki-default:#4EC9B0}html pre.shiki code .s3F5K, html code.shiki .s3F5K{--shiki-default:#9CDCFE}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 pre.shiki code .s9McN, html code.shiki .s9McN{--shiki-default:#4FC1FF}html pre.shiki code .sYbnZ, html code.shiki .sYbnZ{--shiki-default:#C586C0}html pre.shiki code .sKc5r, html code.shiki .sKc5r{--shiki-default:#CE9178}html pre.shiki code .sOLPB, html code.shiki .sOLPB{--shiki-default:#6A9955}",{"title":64,"searchDepth":135,"depth":135,"links":851},[852,853,854,855,856,857,858],{"id":183,"depth":135,"text":184},{"id":435,"depth":135,"text":436},{"id":484,"depth":135,"text":485},{"id":673,"depth":135,"text":674},{"id":752,"depth":135,"text":753},{"id":778,"depth":135,"text":779},{"id":815,"depth":135,"text":816},"phase() and system() bracket a callback with telemetry, so the shape of a thought is recorded as it happens rather than reconstructed after.","md",{},"\u002Fdocs\u002Fv2\u002Fcognets\u002Fapi\u002Fphase",{"title":34,"description":859},"docs\u002Fv2\u002Fcognets\u002Fapi\u002Fphase","qFAczYcR89ILIV3Ty5mble-iWSqgid0rncJT4lZtORU",1788121883870]