[{"data":1,"prerenderedAt":2878,"buildId":2879},["ShallowReactive",2],{"\u002Fguide\u002Fworkflow-execute":3,"\u002Fguide\u002Fworkflow-execute-surround":2634,"navigation":2646},{"id":4,"title":5,"body":6,"description":2620,"extension":2621,"links":2622,"meta":2623,"navigation":2624,"path":2626,"seo":2627,"stem":2632,"__hash__":2633},"docs\u002F2.guide\u002Fworkflow-execute.md","Phase 3 - Execute",{"type":7,"value":8,"toc":2586},"minimark",[9,14,18,21,25,36,47,49,53,61,446,448,452,529,531,535,688,694,696,700,705,708,723,727,883,908,912,923,940,948,999,1004,1030,1037,1040,1074,1077,1081,1089,1095,1142,1152,1170,1174,1177,1198,1202,1216,1222,1224,1228,1232,1238,1242,1249,1560,1564,1581,1583,1587,1590,1787,1789,1793,1797,1803,1807,1840,1849,1851,1855,1862,1924,1926,1930,1977,1983,1987,1993,2050,2056,2062,2101,2106,2110,2117,2122,2177,2180,2191,2200,2206,2209,2211,2215,2220,2228,2282,2288,2294,2296,2300,2305,2391,2396,2427,2434,2436,2440,2445,2502,2511,2513,2517,2567,2569,2573,2582],[10,11,13],"h2",{"id":12},"purpose","Purpose",[15,16,17],"p",{},"Execute the wave plan through ordered waves with parallel task execution, scoped delegation, and verification gates.",[19,20],"hr",{},[10,22,24],{"id":23},"wave-loop-single-loop-for-all-planned-work","Wave Loop (Single Loop for All Planned Work)",[26,27,32],"pre",{"className":28,"code":30,"language":31},[29],"language-text","Load plan.yaml\n       │\n       ▼\n┌──────────────────┐\n│  Lowest Incomplete │──► Schedule eligible tasks\n│      Wave          │     (plan order, max_concurrent)\n└────────┬───────────┘\n         │\n         ▼\n┌──────────────────┐\n│  Delegate Each   │──► Specialist receives:\n│     Task         │     plan_id, config_snapshot,\n└────────┬───────────┘     cluster shared_context,\n         │                 task_id, task_definition,\n         ▼                 handoff (cache-lifetime order)\n┌────────────────__┐\n│  Persist State   │──► Update status.yaml\n│   & Evidence     │     Track task and gate state\n└────────┬──────────┘\n         │\n         ▼\n┌──────────────────┐\n│  Gate & Accept   │──► Persist eligible gate state\n│     Results      │     Delegate selected reviewer if eligible\n└────────┬──────────┘\n         │\n         ▼\n   Next wave or Done\n","text",[33,34,30],"code",{"__ignoreMap":35},"",[37,38,39,40],"tip",{},"WAVE BARRIERS",[15,41,42,43,46],{},"Each wave completes fully before the next starts. Within a wave, independent tasks run in parallel (up to ",[33,44,45],{},"max_concurrent_agents",").",[19,48],{},[10,50,52],{"id":51},"delegation-payload-cache-lifetime-order","Delegation Payload (Cache-Lifetime Order)",[15,54,55,56,60],{},"Every task receives fields in ",[57,58,59],"strong",{},"cache-lifetime order"," for maximum prefix reuse:",[26,62,66],{"className":63,"code":64,"language":65,"meta":35,"style":35},"language-yaml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# Plan-constant (same for all tasks in plan)\nplan_id: \"20261121-user-search-api\"\nconfig_snapshot: { ... }\n\n# Cluster-shared (same for tasks in cluster)\ncontext_cluster: \"api-search\"\nshared_context: \"REST patterns: ...; Pagination: src\u002Futils\u002Fpagination.ts\"\n\n# Per-task (differs per task)\ntask_id: \"implement-search\"\ntask_definition:\n  objective: \"Implement GET \u002Fapi\u002Fusers\u002Fsearch\"\n  acceptance_criteria: [...]\n  handoff:\n    constraints: [...]\n    relevant_context:\n      - \"research-api-patterns: patterns=REST, pagination=src\u002Futils\u002Fpagination.ts\"\n    plan_context:\n      architectural_boundaries: [\"api layer\", \"user module\"]\n      risk_decisions: [\"stateless search\", \"cursor pagination\"]\n    global_findings:\n      - finding: \"Prisma case-insensitive: contains + mode: insensitive\"\n        confidence: 0.98\n        source_task: \"research-api-patterns\"\n    memory_injection:\n      repo: [\"API conventions: Zod for query validation\"]\n      session: []\n\n# Per-attempt (only on retry)\nretries_used: 1\n","yaml",[33,67,68,77,98,116,123,129,144,159,164,170,185,194,209,226,234,248,256,269,277,307,335,343,360,371,386,394,413,424,429,435],{"__ignoreMap":35},[69,70,73],"span",{"class":71,"line":72},"line",1,[69,74,76],{"class":75},"sHwdD","# Plan-constant (same for all tasks in plan)\n",[69,78,80,84,88,91,95],{"class":71,"line":79},2,[69,81,83],{"class":82},"swJcz","plan_id",[69,85,87],{"class":86},"sMK4o",":",[69,89,90],{"class":86}," \"",[69,92,94],{"class":93},"sfazB","20261121-user-search-api",[69,96,97],{"class":86},"\"\n",[69,99,101,104,106,109,113],{"class":71,"line":100},3,[69,102,103],{"class":82},"config_snapshot",[69,105,87],{"class":86},[69,107,108],{"class":86}," {",[69,110,112],{"class":111},"sbssI"," ...",[69,114,115],{"class":86}," }\n",[69,117,119],{"class":71,"line":118},4,[69,120,122],{"emptyLinePlaceholder":121},true,"\n",[69,124,126],{"class":71,"line":125},5,[69,127,128],{"class":75},"# Cluster-shared (same for tasks in cluster)\n",[69,130,132,135,137,139,142],{"class":71,"line":131},6,[69,133,134],{"class":82},"context_cluster",[69,136,87],{"class":86},[69,138,90],{"class":86},[69,140,141],{"class":93},"api-search",[69,143,97],{"class":86},[69,145,147,150,152,154,157],{"class":71,"line":146},7,[69,148,149],{"class":82},"shared_context",[69,151,87],{"class":86},[69,153,90],{"class":86},[69,155,156],{"class":93},"REST patterns: ...; Pagination: src\u002Futils\u002Fpagination.ts",[69,158,97],{"class":86},[69,160,162],{"class":71,"line":161},8,[69,163,122],{"emptyLinePlaceholder":121},[69,165,167],{"class":71,"line":166},9,[69,168,169],{"class":75},"# Per-task (differs per task)\n",[69,171,173,176,178,180,183],{"class":71,"line":172},10,[69,174,175],{"class":82},"task_id",[69,177,87],{"class":86},[69,179,90],{"class":86},[69,181,182],{"class":93},"implement-search",[69,184,97],{"class":86},[69,186,188,191],{"class":71,"line":187},11,[69,189,190],{"class":82},"task_definition",[69,192,193],{"class":86},":\n",[69,195,197,200,202,204,207],{"class":71,"line":196},12,[69,198,199],{"class":82},"  objective",[69,201,87],{"class":86},[69,203,90],{"class":86},[69,205,206],{"class":93},"Implement GET \u002Fapi\u002Fusers\u002Fsearch",[69,208,97],{"class":86},[69,210,212,215,217,220,223],{"class":71,"line":211},13,[69,213,214],{"class":82},"  acceptance_criteria",[69,216,87],{"class":86},[69,218,219],{"class":86}," [",[69,221,222],{"class":111},"...",[69,224,225],{"class":86},"]\n",[69,227,229,232],{"class":71,"line":228},14,[69,230,231],{"class":82},"  handoff",[69,233,193],{"class":86},[69,235,237,240,242,244,246],{"class":71,"line":236},15,[69,238,239],{"class":82},"    constraints",[69,241,87],{"class":86},[69,243,219],{"class":86},[69,245,222],{"class":111},[69,247,225],{"class":86},[69,249,251,254],{"class":71,"line":250},16,[69,252,253],{"class":82},"    relevant_context",[69,255,193],{"class":86},[69,257,259,262,264,267],{"class":71,"line":258},17,[69,260,261],{"class":86},"      -",[69,263,90],{"class":86},[69,265,266],{"class":93},"research-api-patterns: patterns=REST, pagination=src\u002Futils\u002Fpagination.ts",[69,268,97],{"class":86},[69,270,272,275],{"class":71,"line":271},18,[69,273,274],{"class":82},"    plan_context",[69,276,193],{"class":86},[69,278,280,283,285,287,290,293,295,298,300,303,305],{"class":71,"line":279},19,[69,281,282],{"class":82},"      architectural_boundaries",[69,284,87],{"class":86},[69,286,219],{"class":86},[69,288,289],{"class":86},"\"",[69,291,292],{"class":93},"api layer",[69,294,289],{"class":86},[69,296,297],{"class":86},",",[69,299,90],{"class":86},[69,301,302],{"class":93},"user module",[69,304,289],{"class":86},[69,306,225],{"class":86},[69,308,310,313,315,317,319,322,324,326,328,331,333],{"class":71,"line":309},20,[69,311,312],{"class":82},"      risk_decisions",[69,314,87],{"class":86},[69,316,219],{"class":86},[69,318,289],{"class":86},[69,320,321],{"class":93},"stateless search",[69,323,289],{"class":86},[69,325,297],{"class":86},[69,327,90],{"class":86},[69,329,330],{"class":93},"cursor pagination",[69,332,289],{"class":86},[69,334,225],{"class":86},[69,336,338,341],{"class":71,"line":337},21,[69,339,340],{"class":82},"    global_findings",[69,342,193],{"class":86},[69,344,346,348,351,353,355,358],{"class":71,"line":345},22,[69,347,261],{"class":86},[69,349,350],{"class":82}," finding",[69,352,87],{"class":86},[69,354,90],{"class":86},[69,356,357],{"class":93},"Prisma case-insensitive: contains + mode: insensitive",[69,359,97],{"class":86},[69,361,363,366,368],{"class":71,"line":362},23,[69,364,365],{"class":82},"        confidence",[69,367,87],{"class":86},[69,369,370],{"class":111}," 0.98\n",[69,372,374,377,379,381,384],{"class":71,"line":373},24,[69,375,376],{"class":82},"        source_task",[69,378,87],{"class":86},[69,380,90],{"class":86},[69,382,383],{"class":93},"research-api-patterns",[69,385,97],{"class":86},[69,387,389,392],{"class":71,"line":388},25,[69,390,391],{"class":82},"    memory_injection",[69,393,193],{"class":86},[69,395,397,400,402,404,406,409,411],{"class":71,"line":396},26,[69,398,399],{"class":82},"      repo",[69,401,87],{"class":86},[69,403,219],{"class":86},[69,405,289],{"class":86},[69,407,408],{"class":93},"API conventions: Zod for query validation",[69,410,289],{"class":86},[69,412,225],{"class":86},[69,414,416,419,421],{"class":71,"line":415},27,[69,417,418],{"class":82},"      session",[69,420,87],{"class":86},[69,422,423],{"class":86}," []\n",[69,425,427],{"class":71,"line":426},28,[69,428,122],{"emptyLinePlaceholder":121},[69,430,432],{"class":71,"line":431},29,[69,433,434],{"class":75},"# Per-attempt (only on retry)\n",[69,436,438,441,443],{"class":71,"line":437},30,[69,439,440],{"class":82},"retries_used",[69,442,87],{"class":86},[69,444,445],{"class":111}," 1\n",[19,447],{},[10,449,451],{"id":450},"scheduling-rules","Scheduling Rules",[453,454,455,468],"table",{},[456,457,458],"thead",{},[459,460,461,465],"tr",{},[462,463,464],"th",{},"Rule",[462,466,467],{},"Description",[469,470,471,482,496,509,519],"tbody",{},[459,472,473,479],{},[474,475,476],"td",{},[57,477,478],{},"Plan order",[474,480,481],{},"Waves execute sequentially (1 → 2 → 3)",[459,483,484,489],{},[474,485,486],{},[57,487,488],{},"Parallel within wave",[474,490,491,492,495],{},"Up to ",[33,493,494],{},"orchestrator.max_concurrent_agents"," (default: 2)",[459,497,498,503],{},[474,499,500],{},[57,501,502],{},"Cluster contiguity",[474,504,505,506,508],{},"Tasks sharing ",[33,507,134],{}," run back-to-back",[459,510,511,516],{},[474,512,513],{},[57,514,515],{},"Ownership protection",[474,517,518],{},"Overlapping ownership → never parallel (serialized)",[459,520,521,526],{},[474,522,523],{},[57,524,525],{},"Retries count",[474,527,528],{},"Each retry consumes a concurrency slot",[19,530],{},[10,532,534],{"id":533},"specialist-delegation","Specialist Delegation",[453,536,537,550],{},[456,538,539],{},[459,540,541,544,547],{},[462,542,543],{},"Agent",[462,545,546],{},"When Delegated",[462,548,549],{},"Key Handoff Fields",[469,551,552,574,595,613,636,649,662,675],{},[459,553,554,559,562],{},[474,555,556],{},[33,557,558],{},"gem-implementer",[474,560,561],{},"Features, fixes, refactors (TDD)",[474,563,564,567,568,567,571],{},[33,565,566],{},"constraints",", ",[33,569,570],{},"relevant_context",[33,572,573],{},"plan_context",[459,575,576,581,584],{},[474,577,578],{},[33,579,580],{},"gem-debugger",[474,582,583],{},"Bug fixes (after diagnosis)",[474,585,586,567,589,567,592],{},[33,587,588],{},"failure",[33,590,591],{},"expected_behavior",[33,593,594],{},"evidence",[459,596,597,602,605],{},[474,598,599],{},[33,600,601],{},"gem-researcher",[474,603,604],{},"Exploration tasks",[474,606,607,567,610],{},[33,608,609],{},"exploration_mode",[33,611,612],{},"handoff",[459,614,615,620,623],{},[474,616,617],{},[33,618,619],{},"gem-reviewer",[474,621,622],{},"Review gates",[474,624,625,567,628,567,631,567,634],{},[33,626,627],{},"review_mode",[33,629,630],{},"review_target",[33,632,633],{},"review_scope",[33,635,594],{},[459,637,638,643,646],{},[474,639,640],{},[33,641,642],{},"gem-browser-tester",[474,644,645],{},"UI\u002FE2E testing",[474,647,648],{},"Test scope, visual regression config",[459,650,651,656,659],{},[474,652,653],{},[33,654,655],{},"gem-devops",[474,657,658],{},"Infrastructure, CI\u002FCD",[474,660,661],{},"Deployment target, approval gates",[459,663,664,669,672],{},[474,665,666],{},[33,667,668],{},"gem-documentation-writer",[474,670,671],{},"Docs, API docs, diagrams",[474,673,674],{},"Target audience, format, scope",[459,676,677,682,685],{},[474,678,679],{},[33,680,681],{},"gem-code-simplifier",[474,683,684],{},"Refactoring, dead code removal",[474,686,687],{},"Target files, preservation rules",[15,689,690,693],{},[57,691,692],{},"All delegation via Orchestrator"," - never direct agent-to-agent.",[19,695],{},[10,697,699],{"id":698},"verification-gates","Verification Gates",[701,702,704],"h3",{"id":703},"orchestrator-selected-review-mode","Orchestrator-Selected Review Mode",[15,706,707],{},"The Orchestrator selects the review mode, target, scope, and gate eligibility.\nReviewer invocation is not automatic for every task. A reviewer is delegated\nwhen the Orchestrator selects an eligible plan review, post-wave gate, or final\nreview and provides the matching mode, target, scope, criteria, and evidence.",[15,709,710,711,714,715,718,719,722],{},"Pre-execution plan review is eligible only when HIGH complexity, high-risk\nsignals, critic signals, or an explicit review request is present. The\nOrchestrator selects ",[33,712,713],{},"high"," mode for HIGH\u002Fhigh-risk work, ",[33,716,717],{},"critic"," mode for\narchitecture, breaking-change, or cross-domain signals, and ",[33,720,721],{},"standard"," mode for\nan explicit review request that has no risk-specific signal.",[701,724,726],{"id":725},"review-handoff","Review Handoff",[26,728,730],{"className":63,"code":729,"language":65,"meta":35,"style":35},"review_mode: \"standard\" # standard | high | critic\nreview_target: \"integration\" # plan | task | code | decision | docs | config | integration\nreview_scope: \"changed\" # changed | affected | full\nhandoff:\n  target_reference: \"src\u002Fapi\u002Fusers\u002Fsearch.ts\"\n  criteria:\n    - \"API conventions followed\"\n    - \"Contract integrity (request\u002Fresponse types)\"\n    - \"Security: input validation\"\n  risk_ref: \"api_change, contract_change\"\n  evidence:\n    - \"tests\u002Fapi\u002Fusers\u002Fsearch.test.ts\"\n    - \"src\u002Fapi\u002Fconventions.md\"\n",[33,731,732,747,763,779,785,799,806,818,829,840,854,861,872],{"__ignoreMap":35},[69,733,734,736,738,740,742,744],{"class":71,"line":72},[69,735,627],{"class":82},[69,737,87],{"class":86},[69,739,90],{"class":86},[69,741,721],{"class":93},[69,743,289],{"class":86},[69,745,746],{"class":75}," # standard | high | critic\n",[69,748,749,751,753,755,758,760],{"class":71,"line":79},[69,750,630],{"class":82},[69,752,87],{"class":86},[69,754,90],{"class":86},[69,756,757],{"class":93},"integration",[69,759,289],{"class":86},[69,761,762],{"class":75}," # plan | task | code | decision | docs | config | integration\n",[69,764,765,767,769,771,774,776],{"class":71,"line":100},[69,766,633],{"class":82},[69,768,87],{"class":86},[69,770,90],{"class":86},[69,772,773],{"class":93},"changed",[69,775,289],{"class":86},[69,777,778],{"class":75}," # changed | affected | full\n",[69,780,781,783],{"class":71,"line":118},[69,782,612],{"class":82},[69,784,193],{"class":86},[69,786,787,790,792,794,797],{"class":71,"line":125},[69,788,789],{"class":82},"  target_reference",[69,791,87],{"class":86},[69,793,90],{"class":86},[69,795,796],{"class":93},"src\u002Fapi\u002Fusers\u002Fsearch.ts",[69,798,97],{"class":86},[69,800,801,804],{"class":71,"line":131},[69,802,803],{"class":82},"  criteria",[69,805,193],{"class":86},[69,807,808,811,813,816],{"class":71,"line":146},[69,809,810],{"class":86},"    -",[69,812,90],{"class":86},[69,814,815],{"class":93},"API conventions followed",[69,817,97],{"class":86},[69,819,820,822,824,827],{"class":71,"line":161},[69,821,810],{"class":86},[69,823,90],{"class":86},[69,825,826],{"class":93},"Contract integrity (request\u002Fresponse types)",[69,828,97],{"class":86},[69,830,831,833,835,838],{"class":71,"line":166},[69,832,810],{"class":86},[69,834,90],{"class":86},[69,836,837],{"class":93},"Security: input validation",[69,839,97],{"class":86},[69,841,842,845,847,849,852],{"class":71,"line":172},[69,843,844],{"class":82},"  risk_ref",[69,846,87],{"class":86},[69,848,90],{"class":86},[69,850,851],{"class":93},"api_change, contract_change",[69,853,97],{"class":86},[69,855,856,859],{"class":71,"line":187},[69,857,858],{"class":82},"  evidence",[69,860,193],{"class":86},[69,862,863,865,867,870],{"class":71,"line":196},[69,864,810],{"class":86},[69,866,90],{"class":86},[69,868,869],{"class":93},"tests\u002Fapi\u002Fusers\u002Fsearch.test.ts",[69,871,97],{"class":86},[69,873,874,876,878,881],{"class":71,"line":211},[69,875,810],{"class":86},[69,877,90],{"class":86},[69,879,880],{"class":93},"src\u002Fapi\u002Fconventions.md",[69,882,97],{"class":86},[15,884,885,888,889,892,893,892,896,899,900,892,902,892,905,907],{},[57,886,887],{},"Reviewer evaluates what it's handed"," - ",[33,890,891],{},"plan","\u002F",[33,894,895],{},"task",[33,897,898],{},"decision"," reviews don't gather more; ",[33,901,33],{},[33,903,904],{},"config",[33,906,757],{}," reviews read the target as subject.",[701,909,911],{"id":910},"post-wave-quality-gate","Post-Wave Quality Gate",[15,913,914,915,918,919,922],{},"The post-wave gate runs after all tasks in a wave complete and before the next wave starts. It is required only when the wave changes code or other non-documentation artifacts and the wave or plan complexity is ",[33,916,917],{},"MEDIUM"," or ",[33,920,921],{},"HIGH",", or a high-risk signal applies.",[924,925,926,930,933],"ul",{},[927,928,929],"li",{},"Read-only-only waves (inspection and research with no file or state change) skip the gate.",[927,931,932],{},"Documentation-only waves (changes limited to documentation artifacts) skip the gate.",[927,934,935,892,937,939],{},[33,936,917],{},[33,938,921],{}," or high-risk work that is not read-only-only or documentation-only runs the gate.",[15,941,942,943,945,946,87],{},"For an eligible wave, run at most two parallel ",[33,944,619],{}," tasks, never exceeding ",[33,947,494],{},[453,949,950,965],{},[456,951,952],{},[459,953,954,957,960,963],{},[462,955,956],{},"Review",[462,958,959],{},"Target",[462,961,962],{},"Scope",[462,964,13],{},[469,966,967,983],{},[459,968,969,972,976,980],{},[474,970,971],{},"Integration",[474,973,974],{},[33,975,757],{},[474,977,978],{},[33,979,773],{},[474,981,982],{},"Full test suite across wave outputs",[459,984,985,988,992,996],{},[474,986,987],{},"Code review",[474,989,990],{},[33,991,33],{},[474,993,994],{},[33,995,773],{},[474,997,998],{},"Review all modified files in wave",[15,1000,1001,1003],{},[33,1002,627],{}," follows risk\u002Fcomplexity:",[924,1005,1006,1011,1016],{},[927,1007,1008,1010],{},[33,1009,721],{}," - MEDIUM, no high-risk signals",[927,1012,1013,1015],{},[33,1014,713],{}," - HIGH complexity or high-risk signals",[927,1017,1018,888,1020,567,1023,567,1026,1029],{},[33,1019,717],{},[33,1021,1022],{},"architecture",[33,1024,1025],{},"breaking_change",[33,1027,1028],{},"cross_domain_impact"," signals",[15,1031,1032,1033,1036],{},"The gate passes only when both required reviewers pass. A ",[33,1034,1035],{},"warning"," verdict passes only when the reviewer reports no completion-blocking finding or blocker. Reviewers collect every actionable finding in one pass rather than stopping at the first blocking finding.",[15,1038,1039],{},"Failure routing depends on the review target. The Orchestrator records both the\nrepair target and the owner in the durable gate state:",[924,1041,1042,1054,1063],{},[927,1043,1044,918,1046,1048,1049,1051,1052],{},[33,1045,33],{},[33,1047,757],{}," -> target matching the review target, owner ",[33,1050,580],{},", then ",[33,1053,558],{},[927,1055,1056,918,1059,1062],{},[33,1057,1058],{},"documentation",[33,1060,1061],{},"configuration"," -> target matching the review target, owner is the owning specialist",[927,1064,1065,1067,1068,1070,1071],{},[33,1066,891],{}," -> target ",[33,1069,891],{},", owner ",[33,1072,1073],{},"gem-planner",[15,1075,1076],{},"The next wave is blocked until the gate passes or the gate is blocked after its final attempt.",[701,1078,1080],{"id":1079},"final-review-gate","Final Review Gate",[15,1082,1083,1084,918,1086,1088],{},"The final review runs after all waves complete and before Phase 4 output. It is required when plan complexity is ",[33,1085,917],{},[33,1087,921],{},", or any high-risk signal is present.",[15,1090,1091,1092,87],{},"Run at most two parallel final reviewers with ",[33,1093,1094],{},"review_scope: full",[453,1096,1097,1109],{},[456,1098,1099],{},[459,1100,1101,1103,1105,1107],{},[462,1102,956],{},[462,1104,959],{},[462,1106,962],{},[462,1108,13],{},[469,1110,1111,1127],{},[459,1112,1113,1115,1119,1124],{},[474,1114,971],{},[474,1116,1117],{},[33,1118,757],{},[474,1120,1121],{},[33,1122,1123],{},"full",[474,1125,1126],{},"Full test suite across all plan outputs",[459,1128,1129,1131,1135,1139],{},[474,1130,987],{},[474,1132,1133],{},[33,1134,33],{},[474,1136,1137],{},[33,1138,1123],{},[474,1140,1141],{},"Review all plan-modified files",[15,1143,1144,1145,1148,1149,1151],{},"There is no routine post-execution plan review. Add a ",[33,1146,1147],{},"review_target: plan"," reviewer only for ",[33,1150,921],{}," or critic-risk work, after the code and integration reviewers finish, and limit its scope to acceptance-criteria coverage. The plan reviewer is not run in parallel with the code and integration reviewers.",[15,1153,1154,1155,918,1157,1159,1160,1159,1162,1164,1165,1159,1167,1169],{},"Failure routing uses the same target-based rules as the post-wave gate: ",[33,1156,33],{},[33,1158,757],{}," -> ",[33,1161,580],{},[33,1163,558],{},"; documentation or configuration -> the owning specialist; ",[33,1166,891],{},[33,1168,1073],{},". Phase 4 output is blocked until the gate passes or the gate is blocked after its final attempt.",[701,1171,1173],{"id":1172},"gate-attempts-ordering-and-persistence","Gate Attempts, Ordering, and Persistence",[15,1175,1176],{},"Each gate has its own durable attempt counter, separate from the gate's eligibility and status. One gate cycle is one attempt, regardless of how many reviewers run in that cycle.",[924,1178,1179,1186,1189,1192,1195],{},[927,1180,1181,1182,1185],{},"A gate has at most ",[57,1183,1184],{},"two total attempts"," across failures and interruptions.",[927,1187,1188],{},"Before invoking any reviewer, persist the completed task and wave state, gate eligibility and status, and the incremented gate attempt counter.",[927,1190,1191],{},"If attempt one fails, persist the routed repair work before attempt two.",[927,1193,1194],{},"If attempt two fails, persist the blocked state, failure reason, and findings. Do not invoke that gate a third time.",[927,1196,1197],{},"Persisting state before the gate preserves completed task and wave records if a gate fails or the run is interrupted.",[701,1199,1201],{"id":1200},"task-retries-are-independent","Task Retries Are Independent",[15,1203,1204,1205,1208,1209,1212,1213,1215],{},"A task result of ",[33,1206,1207],{},"needs_retry"," permits at most ",[57,1210,1211],{},"three total task attempts",". Increment ",[33,1214,440],{}," before retrying the same task with unchanged scope and evidence.",[15,1217,1218,1219,1221],{},"Task retry attempts are independent from quality-gate attempts: they do not consume, reset, or increment the gate counter, and gate attempts do not consume, reset, or increment ",[33,1220,440],{},".",[19,1223],{},[10,1225,1227],{"id":1226},"persistence-state-tracking","Persistence & State Tracking",[701,1229,1231],{"id":1230},"persistent-plans-mediumhigh","Persistent Plans (MEDIUM\u002FHIGH)",[26,1233,1236],{"className":1234,"code":1235,"language":31},[29],"docs\u002Fplan\u002F{plan_id}\u002F\n├── plan.yaml              # Authoritative (never modified after creation)\n├── status.yaml            # Mutable execution state\n├── wave-1\u002F\n│   ├── task-a\u002F\n│   │   ├── output.md      # Agent output\n│   │   ├── handoff.yaml   # Typed handoff for downstream\n│   │   └── artifacts\u002F     # Logs, traces, screenshots\n│   └── ...\n└── wave-2\u002F\n    └── ...\n",[33,1237,1235],{"__ignoreMap":35},[701,1239,1241],{"id":1240},"statusyaml-updated-each-wave","Status.yaml (Updated Each Wave)",[15,1243,1244,1245,1248],{},"The mutable execution state is persisted at ",[33,1246,1247],{},"docs\u002Fplan\u002F{plan_id}\u002Fstatus.yaml",".\nGate state is durable and survives interruption. Each gate record includes its\nidentifier, attempt count, eligibility, status, findings, reason, and repair\nstate.",[26,1250,1252],{"className":63,"code":1251,"language":65,"meta":35,"style":35},"plan_id: \"20261121-user-search-api\"\ncurrent_wave: 2\ncompleted_waves: [1]\ncompleted_tasks:\n  - task_id: \"research-api-patterns\"\n    status: \"completed\"\n    output_path: \"wave-1\u002Fresearch-api-patterns\u002Foutput.md\"\n    handoff_path: \"wave-1\u002Fresearch-api-patterns\u002Fhandoff.yaml\"\npending_tasks:\n  - task_id: \"implement-search\"\n    status: \"in_progress\"\n    retries_used: 0\nblocked_tasks: []\ngates:\n  - gate_id: \"wave-1-post-wave\"\n    attempt_count: 1\n    eligibility: \"eligible\"\n    status: \"failed\"\n    findings:\n      - \"Integration check failed: missing contract assertion\"\n    reason: \"Integration reviewer reported a completion-blocking finding\"\n    repair_state:\n      state: \"routed\"\n      target: \"integration\"\n      owner: \"gem-debugger\"\n      task_id: \"repair-wave-1-integration\"\n",[33,1253,1254,1266,1276,1290,1297,1313,1327,1341,1355,1362,1376,1389,1399,1408,1415,1431,1440,1454,1467,1474,1485,1499,1506,1520,1533,1546],{"__ignoreMap":35},[69,1255,1256,1258,1260,1262,1264],{"class":71,"line":72},[69,1257,83],{"class":82},[69,1259,87],{"class":86},[69,1261,90],{"class":86},[69,1263,94],{"class":93},[69,1265,97],{"class":86},[69,1267,1268,1271,1273],{"class":71,"line":79},[69,1269,1270],{"class":82},"current_wave",[69,1272,87],{"class":86},[69,1274,1275],{"class":111}," 2\n",[69,1277,1278,1281,1283,1285,1288],{"class":71,"line":100},[69,1279,1280],{"class":82},"completed_waves",[69,1282,87],{"class":86},[69,1284,219],{"class":86},[69,1286,1287],{"class":111},"1",[69,1289,225],{"class":86},[69,1291,1292,1295],{"class":71,"line":118},[69,1293,1294],{"class":82},"completed_tasks",[69,1296,193],{"class":86},[69,1298,1299,1302,1305,1307,1309,1311],{"class":71,"line":125},[69,1300,1301],{"class":86},"  -",[69,1303,1304],{"class":82}," task_id",[69,1306,87],{"class":86},[69,1308,90],{"class":86},[69,1310,383],{"class":93},[69,1312,97],{"class":86},[69,1314,1315,1318,1320,1322,1325],{"class":71,"line":131},[69,1316,1317],{"class":82},"    status",[69,1319,87],{"class":86},[69,1321,90],{"class":86},[69,1323,1324],{"class":93},"completed",[69,1326,97],{"class":86},[69,1328,1329,1332,1334,1336,1339],{"class":71,"line":146},[69,1330,1331],{"class":82},"    output_path",[69,1333,87],{"class":86},[69,1335,90],{"class":86},[69,1337,1338],{"class":93},"wave-1\u002Fresearch-api-patterns\u002Foutput.md",[69,1340,97],{"class":86},[69,1342,1343,1346,1348,1350,1353],{"class":71,"line":161},[69,1344,1345],{"class":82},"    handoff_path",[69,1347,87],{"class":86},[69,1349,90],{"class":86},[69,1351,1352],{"class":93},"wave-1\u002Fresearch-api-patterns\u002Fhandoff.yaml",[69,1354,97],{"class":86},[69,1356,1357,1360],{"class":71,"line":166},[69,1358,1359],{"class":82},"pending_tasks",[69,1361,193],{"class":86},[69,1363,1364,1366,1368,1370,1372,1374],{"class":71,"line":172},[69,1365,1301],{"class":86},[69,1367,1304],{"class":82},[69,1369,87],{"class":86},[69,1371,90],{"class":86},[69,1373,182],{"class":93},[69,1375,97],{"class":86},[69,1377,1378,1380,1382,1384,1387],{"class":71,"line":187},[69,1379,1317],{"class":82},[69,1381,87],{"class":86},[69,1383,90],{"class":86},[69,1385,1386],{"class":93},"in_progress",[69,1388,97],{"class":86},[69,1390,1391,1394,1396],{"class":71,"line":196},[69,1392,1393],{"class":82},"    retries_used",[69,1395,87],{"class":86},[69,1397,1398],{"class":111}," 0\n",[69,1400,1401,1404,1406],{"class":71,"line":211},[69,1402,1403],{"class":82},"blocked_tasks",[69,1405,87],{"class":86},[69,1407,423],{"class":86},[69,1409,1410,1413],{"class":71,"line":228},[69,1411,1412],{"class":82},"gates",[69,1414,193],{"class":86},[69,1416,1417,1419,1422,1424,1426,1429],{"class":71,"line":236},[69,1418,1301],{"class":86},[69,1420,1421],{"class":82}," gate_id",[69,1423,87],{"class":86},[69,1425,90],{"class":86},[69,1427,1428],{"class":93},"wave-1-post-wave",[69,1430,97],{"class":86},[69,1432,1433,1436,1438],{"class":71,"line":250},[69,1434,1435],{"class":82},"    attempt_count",[69,1437,87],{"class":86},[69,1439,445],{"class":111},[69,1441,1442,1445,1447,1449,1452],{"class":71,"line":258},[69,1443,1444],{"class":82},"    eligibility",[69,1446,87],{"class":86},[69,1448,90],{"class":86},[69,1450,1451],{"class":93},"eligible",[69,1453,97],{"class":86},[69,1455,1456,1458,1460,1462,1465],{"class":71,"line":271},[69,1457,1317],{"class":82},[69,1459,87],{"class":86},[69,1461,90],{"class":86},[69,1463,1464],{"class":93},"failed",[69,1466,97],{"class":86},[69,1468,1469,1472],{"class":71,"line":279},[69,1470,1471],{"class":82},"    findings",[69,1473,193],{"class":86},[69,1475,1476,1478,1480,1483],{"class":71,"line":309},[69,1477,261],{"class":86},[69,1479,90],{"class":86},[69,1481,1482],{"class":93},"Integration check failed: missing contract assertion",[69,1484,97],{"class":86},[69,1486,1487,1490,1492,1494,1497],{"class":71,"line":337},[69,1488,1489],{"class":82},"    reason",[69,1491,87],{"class":86},[69,1493,90],{"class":86},[69,1495,1496],{"class":93},"Integration reviewer reported a completion-blocking finding",[69,1498,97],{"class":86},[69,1500,1501,1504],{"class":71,"line":345},[69,1502,1503],{"class":82},"    repair_state",[69,1505,193],{"class":86},[69,1507,1508,1511,1513,1515,1518],{"class":71,"line":362},[69,1509,1510],{"class":82},"      state",[69,1512,87],{"class":86},[69,1514,90],{"class":86},[69,1516,1517],{"class":93},"routed",[69,1519,97],{"class":86},[69,1521,1522,1525,1527,1529,1531],{"class":71,"line":373},[69,1523,1524],{"class":82},"      target",[69,1526,87],{"class":86},[69,1528,90],{"class":86},[69,1530,757],{"class":93},[69,1532,97],{"class":86},[69,1534,1535,1538,1540,1542,1544],{"class":71,"line":388},[69,1536,1537],{"class":82},"      owner",[69,1539,87],{"class":86},[69,1541,90],{"class":86},[69,1543,580],{"class":93},[69,1545,97],{"class":86},[69,1547,1548,1551,1553,1555,1558],{"class":71,"line":396},[69,1549,1550],{"class":82},"      task_id",[69,1552,87],{"class":86},[69,1554,90],{"class":86},[69,1556,1557],{"class":93},"repair-wave-1-integration",[69,1559,97],{"class":86},[701,1561,1563],{"id":1562},"ephemeral-plans-triviallow","Ephemeral Plans (TRIVIAL\u002FLOW)",[924,1565,1566,1573,1576],{},[927,1567,1568,1569,1572],{},"No ",[33,1570,1571],{},"docs\u002Fplan\u002F"," artifacts",[927,1574,1575],{},"State tracked in memory only",[927,1577,1578,1580],{},[33,1579,83],{}," used for correlation",[19,1582],{},[10,1584,1586],{"id":1585},"result-classification-routing","Result Classification & Routing",[15,1588,1589],{},"After each task, Orchestrator classifies result:",[453,1591,1592,1605],{},[456,1593,1594],{},[459,1595,1596,1599,1602],{},[462,1597,1598],{},"Classification",[462,1600,1601],{},"Meaning",[462,1603,1604],{},"Handler",[469,1606,1607,1619,1634,1651,1667,1682,1702,1721,1733,1746,1759,1771],{},[459,1608,1609,1613,1616],{},[474,1610,1611],{},[33,1612,1324],{},[474,1614,1615],{},"Success, criteria met",[474,1617,1618],{},"Continue to next task",[459,1620,1621,1625,1628],{},[474,1622,1623],{},[33,1624,1207],{},[474,1626,1627],{},"Transient failure",[474,1629,1630,1631,1633],{},"Retry same task (max 3 total task attempts; increment ",[33,1632,440],{},")",[459,1635,1636,1645,1648],{},[474,1637,1638,1641,1642],{},[33,1639,1640],{},"needs_revision"," + ",[33,1643,1644],{},"clarification_needed",[474,1646,1647],{},"Scope ambiguous",[474,1649,1650],{},"Ask user, no retry",[459,1652,1653,1658,1661],{},[474,1654,1655,1657],{},[33,1656,1640],{}," (plan)",[474,1659,1660],{},"Plan issue",[474,1662,1663,1664],{},"Planner with ",[33,1665,1666],{},"revision_findings",[459,1668,1669,1674,1677],{},[474,1670,1671,1673],{},[33,1672,1640],{}," (code)",[474,1675,1676],{},"Code issue",[474,1678,1679,1680],{},"Owning specialist with ",[33,1681,1666],{},[459,1683,1684,1688,1691],{},[474,1685,1686],{},[33,1687,1464],{},[474,1689,1690],{},"Execution failure",[474,1692,1693,1694,1697,1698,1701],{},"Infer: ",[33,1695,1696],{},"fixable"," (code) or ",[33,1699,1700],{},"needs_replan"," (analysis)",[459,1703,1704,1715,1718],{},[474,1705,1706,1708,1709,1708,1712],{},[33,1707,1696],{}," \u002F ",[33,1710,1711],{},"regression",[33,1713,1714],{},"new_failure",[474,1716,1717],{},"Code bug",[474,1719,1720],{},"Debugger → Implementer",[459,1722,1723,1727,1730],{},[474,1724,1725],{},[33,1726,1700],{},[474,1728,1729],{},"Scope\u002Fdependencies wrong",[474,1731,1732],{},"Planner (bounded replan)",[459,1734,1735,1740,1743],{},[474,1736,1737],{},[33,1738,1739],{},"flaky",[474,1741,1742],{},"Intermittent",[474,1744,1745],{},"Specialist re-runs once",[459,1747,1748,1753,1756],{},[474,1749,1750],{},[33,1751,1752],{},"platform_specific",[474,1754,1755],{},"Platform issue",[474,1757,1758],{},"Specialist verifies criteria",[459,1760,1761,1766,1769],{},[474,1762,1763],{},[33,1764,1765],{},"test_bug",[474,1767,1768],{},"Test defect",[474,1770,1720],{},[459,1772,1773,1781,1784],{},[474,1774,1775,1708,1778],{},[33,1776,1777],{},"blocked",[33,1779,1780],{},"escalate",[474,1782,1783],{},"External dependency",[474,1785,1786],{},"Stop path, escalate to user",[19,1788],{},[10,1790,1792],{"id":1791},"evidence-handling","Evidence Handling",[701,1794,1796],{"id":1795},"task-scoped-artifacts-detailed-evidence","Task-Scoped Artifacts (Detailed Evidence)",[26,1798,1801],{"className":1799,"code":1800,"language":31},[29],"wave-3\u002Fimplement-search\u002F\n├── output.md              # Summary for Orchestrator\n├── handoff.yaml           # Typed handoff for next wave\n├── artifacts\u002F\n│   ├── test-results.xml   # Full test output\n│   ├── lint-report.json   # Lint results\n│   ├── typecheck.log      # TypeScript output\n│   └── coverage\u002F          # Coverage reports\n└── handoff-relevant\u002F      # Referenced by downstream tasks\n    └── api-contract.json  # OpenAPI spec for reviewer\n",[33,1802,1800],{"__ignoreMap":35},[701,1804,1806],{"id":1805},"handoff-references-not-inlined","Handoff References (Not Inlined)",[26,1808,1810],{"className":63,"code":1809,"language":65,"meta":35,"style":35},"# In next task's handoff.relevant_context\n- \"implement-search: handoff=wave-3\u002Fimplement-search\u002Fhandoff.yaml\"\n- \"implement-search: test_results=wave-3\u002Fimplement-search\u002Fartifacts\u002Ftest-results.xml\"\n",[33,1811,1812,1817,1829],{"__ignoreMap":35},[69,1813,1814],{"class":71,"line":72},[69,1815,1816],{"class":75},"# In next task's handoff.relevant_context\n",[69,1818,1819,1822,1824,1827],{"class":71,"line":79},[69,1820,1821],{"class":86},"-",[69,1823,90],{"class":86},[69,1825,1826],{"class":93},"implement-search: handoff=wave-3\u002Fimplement-search\u002Fhandoff.yaml",[69,1828,97],{"class":86},[69,1830,1831,1833,1835,1838],{"class":71,"line":100},[69,1832,1821],{"class":86},[69,1834,90],{"class":86},[69,1836,1837],{"class":93},"implement-search: test_results=wave-3\u002Fimplement-search\u002Fartifacts\u002Ftest-results.xml",[69,1839,97],{"class":86},[15,1841,1842,1845,1846,1848],{},[57,1843,1844],{},"Exception",": ",[33,1847,149],{}," findings (consumed by ≥2 tasks) inlined verbatim.",[19,1850],{},[10,1852,1854],{"id":1853},"learning-memory-promotion","Learning & Memory Promotion",[15,1856,1857,1858,1861],{},"After ",[57,1859,1860],{},"final success"," (all waves complete):",[1863,1864,1865,1888,1908],"ol",{},[927,1866,1867,1870,1871],{},[57,1868,1869],{},"Evaluate findings"," for:",[924,1872,1873,1879,1882,1885],{},[927,1874,1875,1876,1633],{},"Stability (",[33,1877,1878],{},"stable: true",[927,1880,1881],{},"Reusability (applies beyond this task)",[927,1883,1884],{},"Repetition (seen in multiple tasks)",[927,1886,1887],{},"Persistence (durable pattern)",[927,1889,1890,1893,1894],{},[57,1891,1892],{},"Promote if confidence ≥ 0.95"," to:",[924,1895,1896,1902],{},[927,1897,1898,1901],{},[57,1899,1900],{},"Repo memory"," (workspace-scoped, persists with repository)",[927,1903,1904,1907],{},[57,1905,1906],{},"Session memory"," (conversation-scoped, clears after)",[927,1909,1910,1913,1914],{},[57,1911,1912],{},"Package as skill"," if workflow pattern is reusable:",[924,1915,1916,1921],{},[927,1917,1918],{},[33,1919,1920],{},".apm\u002Fskills\u002Fnew-skill\u002FSKILL.md",[927,1922,1923],{},"Scripts, references, assets as needed",[19,1925],{},[10,1927,1929],{"id":1928},"scheduling-example-wave-2-with-two-implementer-tasks","Scheduling Example: Wave 2 with Two Implementer Tasks",[453,1931,1932,1947],{},[456,1933,1934],{},[459,1935,1936,1939,1941,1944],{},[462,1937,1938],{},"Task",[462,1940,543],{},[462,1942,1943],{},"Files",[462,1945,1946],{},"Can Run Parallel?",[469,1948,1949,1961],{},[459,1950,1951,1953,1955,1958],{},[474,1952,182],{},[474,1954,558],{},[474,1956,1957],{},"search.ts",[474,1959,1960],{},"Yes (with write-search-tests)",[459,1962,1963,1966,1968,1971],{},[474,1964,1965],{},"write-search-tests",[474,1967,558],{},[474,1969,1970],{},"search.test.ts",[474,1972,1973,1974],{},"Yes (same agent, overlapping files) → ",[57,1975,1976],{},"serialized",[15,1978,1979,1982],{},[57,1980,1981],{},"Result",": Both coalesced into one task, single invocation, one context copy.",[10,1984,1986],{"id":1985},"concurrency-math","Concurrency Math",[15,1988,1989,1990,87],{},"With ",[33,1991,1992],{},"max_concurrent_agents: 2",[453,1994,1995,2011],{},[456,1996,1997],{},[459,1998,1999,2002,2005,2008],{},[462,2000,2001],{},"Wave",[462,2003,2004],{},"Tasks",[462,2006,2007],{},"Parallel Slots Used",[462,2009,2010],{},"Wall-Clock",[469,2012,2013,2026,2038],{},[459,2014,2015,2018,2021,2023],{},[474,2016,2017],{},"Wave 1",[474,2019,2020],{},"1 researcher",[474,2022,1287],{},[474,2024,2025],{},"1 task duration",[459,2027,2028,2031,2034,2036],{},[474,2029,2030],{},"Wave 2",[474,2032,2033],{},"2 implementers (coalesced to 1)",[474,2035,1287],{},[474,2037,2025],{},[459,2039,2040,2043,2046,2048],{},[474,2041,2042],{},"Wave 3",[474,2044,2045],{},"1 reviewer",[474,2047,1287],{},[474,2049,2025],{},[15,2051,2052,2055],{},[57,2053,2054],{},"Total",": 3 sequential waves = 3 task durations (no parallelism possible due to wave barriers).",[15,2057,1989,2058,2061],{},[33,2059,2060],{},"max_concurrent_agents: 4"," and independent tasks in a wave:",[453,2063,2064,2076],{},[456,2065,2066],{},[459,2067,2068,2070,2072,2074],{},[462,2069,2001],{},[462,2071,2004],{},[462,2073,2007],{},[462,2075,2010],{},[469,2077,2078,2090],{},[459,2079,2080,2082,2085,2088],{},[474,2081,2017],{},[474,2083,2084],{},"2 researchers (independent)",[474,2086,2087],{},"2",[474,2089,2025],{},[459,2091,2092,2094,2097,2099],{},[474,2093,2030],{},[474,2095,2096],{},"2 implementers (different files)",[474,2098,2087],{},[474,2100,2025],{},[15,2102,2103,2105],{},[57,2104,2054],{},": 2 sequential waves = 2 task durations.",[10,2107,2109],{"id":2108},"post-wave-quality-gate-concrete-example","Post-Wave Quality Gate: Concrete Example",[15,2111,2112,2113,2116],{},"Wave 2 completes (implement-search + write-search-tests). Plan complexity is MEDIUM with risk signal ",[33,2114,2115],{},"api_change",", and the wave changes code, so the gate is eligible.",[15,2118,2119,87],{},[57,2120,2121],{},"Two reviewers run in parallel",[453,2123,2124,2139],{},[456,2125,2126],{},[459,2127,2128,2130,2132,2134,2137],{},[462,2129,956],{},[462,2131,959],{},[462,2133,962],{},[462,2135,2136],{},"Mode",[462,2138,13],{},[469,2140,2141,2159],{},[459,2142,2143,2145,2149,2153,2157],{},[474,2144,971],{},[474,2146,2147],{},[33,2148,757],{},[474,2150,2151],{},[33,2152,773],{},[474,2154,2155],{},[33,2156,721],{},[474,2158,982],{},[459,2160,2161,2163,2167,2171,2175],{},[474,2162,987],{},[474,2164,2165],{},[33,2166,33],{},[474,2168,2169],{},[33,2170,773],{},[474,2172,2173],{},[33,2174,721],{},[474,2176,998],{},[15,2178,2179],{},"Before either reviewer runs, the completed task and wave state plus gate attempt 1 are persisted.",[15,2181,2182,2185,2186,1159,2188,2190],{},[57,2183,2184],{},"If integration review fails",": route to ",[33,2187,580],{},[33,2189,558],{},", persist the repair work, then run gate attempt 2. Wave 3 remains blocked.",[15,2192,2193,2185,2196,1159,2198,2190],{},[57,2194,2195],{},"If code review fails",[33,2197,580],{},[33,2199,558],{},[15,2201,2202,2205],{},[57,2203,2204],{},"If attempt 2 fails",": persist the blocked state, reason, and findings. Do not run attempt 3.",[15,2207,2208],{},"A read-only research wave or a documentation-only wave would skip this gate, even when the overall plan is MEDIUM.",[19,2210],{},[10,2212,2214],{"id":2213},"final-review-gate-concrete-example","Final Review Gate: Concrete Example",[15,2216,2217,2218,1221],{},"All waves complete. Plan complexity is MEDIUM with risk signal ",[33,2219,2115],{},[15,2221,2222,2225,2226,87],{},[57,2223,2224],{},"Two final reviewers run in parallel"," with ",[33,2227,1094],{},[453,2229,2230,2244],{},[456,2231,2232],{},[459,2233,2234,2236,2238,2240,2242],{},[462,2235,956],{},[462,2237,959],{},[462,2239,962],{},[462,2241,2136],{},[462,2243,13],{},[469,2245,2246,2264],{},[459,2247,2248,2250,2254,2258,2262],{},[474,2249,971],{},[474,2251,2252],{},[33,2253,757],{},[474,2255,2256],{},[33,2257,1123],{},[474,2259,2260],{},[33,2261,721],{},[474,2263,1126],{},[459,2265,2266,2268,2272,2276,2280],{},[474,2267,987],{},[474,2269,2270],{},[33,2271,33],{},[474,2273,2274],{},[33,2275,1123],{},[474,2277,2278],{},[33,2279,721],{},[474,2281,1141],{},[15,2283,2284,2285,2287],{},"There is no routine plan review for MEDIUM work. If the work were HIGH or critic-risk, a ",[33,2286,1147],{}," reviewer would run after these reviewers and check only acceptance-criteria coverage.",[15,2289,2290,2293],{},[57,2291,2292],{},"If a review fails",": persist the routed repair work and run final gate attempt 2. Phase 4 output remains blocked. If attempt 2 fails, persist the blocked state, reason, and findings without a third attempt.",[19,2295],{},[10,2297,2299],{"id":2298},"evidence-handling-example","Evidence Handling Example",[15,2301,2302,87],{},[57,2303,2304],{},"Implementer output (minimal)",[26,2306,2308],{"className":63,"code":2307,"language":65,"meta":35,"style":35},"status: \"completed\"\nhandoff:\n  implemented_files:\n    - \"src\u002Fapi\u002Fusers\u002Fsearch.ts\"\n  test_files:\n    - \"tests\u002Fapi\u002Fusers\u002Fsearch.test.ts\"\n  api_contract_path: \"wave-3\u002Fimplement-search\u002Fartifacts\u002Fapi-contract.json\"\n  test_results_path: \"wave-3\u002Fimplement-search\u002Fartifacts\u002Ftest-results.xml\"\n",[33,2309,2310,2323,2329,2336,2346,2353,2363,2377],{"__ignoreMap":35},[69,2311,2312,2315,2317,2319,2321],{"class":71,"line":72},[69,2313,2314],{"class":82},"status",[69,2316,87],{"class":86},[69,2318,90],{"class":86},[69,2320,1324],{"class":93},[69,2322,97],{"class":86},[69,2324,2325,2327],{"class":71,"line":79},[69,2326,612],{"class":82},[69,2328,193],{"class":86},[69,2330,2331,2334],{"class":71,"line":100},[69,2332,2333],{"class":82},"  implemented_files",[69,2335,193],{"class":86},[69,2337,2338,2340,2342,2344],{"class":71,"line":118},[69,2339,810],{"class":86},[69,2341,90],{"class":86},[69,2343,796],{"class":93},[69,2345,97],{"class":86},[69,2347,2348,2351],{"class":71,"line":125},[69,2349,2350],{"class":82},"  test_files",[69,2352,193],{"class":86},[69,2354,2355,2357,2359,2361],{"class":71,"line":131},[69,2356,810],{"class":86},[69,2358,90],{"class":86},[69,2360,869],{"class":93},[69,2362,97],{"class":86},[69,2364,2365,2368,2370,2372,2375],{"class":71,"line":146},[69,2366,2367],{"class":82},"  api_contract_path",[69,2369,87],{"class":86},[69,2371,90],{"class":86},[69,2373,2374],{"class":93},"wave-3\u002Fimplement-search\u002Fartifacts\u002Fapi-contract.json",[69,2376,97],{"class":86},[69,2378,2379,2382,2384,2386,2389],{"class":71,"line":161},[69,2380,2381],{"class":82},"  test_results_path",[69,2383,87],{"class":86},[69,2385,90],{"class":86},[69,2387,2388],{"class":93},"wave-3\u002Fimplement-search\u002Fartifacts\u002Ftest-results.xml",[69,2390,97],{"class":86},[15,2392,2393,87],{},[57,2394,2395],{},"Next task's handoff.relevant_context",[26,2397,2399],{"className":63,"code":2398,"language":65,"meta":35,"style":35},"relevant_context:\n  - \"implement-search: handoff=wave-3\u002Fimplement-search\u002Fhandoff.yaml\"\n  - \"implement-search: test_results=wave-3\u002Fimplement-search\u002Fartifacts\u002Ftest-results.xml\"\n",[33,2400,2401,2407,2417],{"__ignoreMap":35},[69,2402,2403,2405],{"class":71,"line":72},[69,2404,570],{"class":82},[69,2406,193],{"class":86},[69,2408,2409,2411,2413,2415],{"class":71,"line":79},[69,2410,1301],{"class":86},[69,2412,90],{"class":86},[69,2414,1826],{"class":93},[69,2416,97],{"class":86},[69,2418,2419,2421,2423,2425],{"class":71,"line":100},[69,2420,1301],{"class":86},[69,2422,90],{"class":86},[69,2424,1837],{"class":93},[69,2426,97],{"class":86},[15,2428,2429,1845,2431,2433],{},[57,2430,1844],{},[33,2432,149],{}," findings (consumed by ≥2 tasks) inlined verbatim, not referenced by path.",[19,2435],{},[10,2437,2439],{"id":2438},"learning-memory-promotion-example","Learning & Memory Promotion Example",[15,2441,2442,2443,87],{},"After final success for plan ",[33,2444,94],{},[453,2446,2447,2463],{},[456,2448,2449],{},[459,2450,2451,2454,2457,2460],{},[462,2452,2453],{},"Finding",[462,2455,2456],{},"Confidence",[462,2458,2459],{},"Source Task",[462,2461,2462],{},"Memory Tier",[469,2464,2465,2478,2490],{},[459,2466,2467,2470,2473,2475],{},[474,2468,2469],{},"Pagination helper pattern reusable across endpoints",[474,2471,2472],{},"0.98",[474,2474,182],{},[474,2476,2477],{},"repo",[459,2479,2480,2483,2486,2488],{},[474,2481,2482],{},"Zod query validation convention for search params",[474,2484,2485],{},"0.96",[474,2487,182],{},[474,2489,2477],{},[459,2491,2492,2495,2498,2500],{},[474,2493,2494],{},"Prisma case-insensitive search: contains + mode: insensitive",[474,2496,2497],{},"0.99",[474,2499,383],{},[474,2501,2477],{},[15,2503,2504,2507,2508,1221],{},[57,2505,2506],{},"Skill extraction",": If pagination pattern used in ≥2 tasks → gem-skill-creator packages ",[33,2509,2510],{},".apm\u002Fskills\u002Fapi-pagination\u002FSKILL.md",[19,2512],{},[10,2514,2516],{"id":2515},"key-rules","Key Rules",[1863,2518,2519,2525,2531,2537,2543,2549,2555,2561],{},[927,2520,2521,2524],{},[57,2522,2523],{},"One wave loop"," - Ordered waves, parallel within, clustered contiguously",[927,2526,2527,2530],{},[57,2528,2529],{},"Cache-lifetime payload order"," - Plan-constant → cluster → per-task → per-attempt",[927,2532,2533,2536],{},[57,2534,2535],{},"Scoped delegation"," - Each agent gets only what it needs",[927,2538,2539,2542],{},[57,2540,2541],{},"Verification gates"," - Reviewer only when triggered. Read-only-only and documentation-only waves skip post-wave gates; other MEDIUM\u002FHIGH or high-risk work runs them. The final review runs at most two parallel code and integration reviewers, with a plan reviewer only for HIGH or critic-risk work.",[927,2544,2545,2548],{},[57,2546,2547],{},"Persist before gate"," - Task and wave state, evidence, gate status, and the incremented gate attempt are persisted before reviewers run.",[927,2550,2551,2554],{},[57,2552,2553],{},"Classify every result"," - No blind retries, route to correct handler",[927,2556,2557,2560],{},[57,2558,2559],{},"Evidence by reference"," - Artifacts in task paths, handoffs reference by path",[927,2562,2563,2566],{},[57,2564,2565],{},"Learn after success"," - Confidence-gated, stable findings only",[19,2568],{},[10,2570,2572],{"id":2571},"next-phase","Next Phase",[15,2574,2575,2576,2581],{},"→ ",[2577,2578,2580],"a",{"href":2579},"\u002Fguide\u002Fworkflow-output","Phase 4: Output"," - Status reports, learnings, memory promotion",[2583,2584,2585],"style",{},"html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}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);}",{"title":35,"searchDepth":72,"depth":79,"links":2587},[2588,2589,2590,2591,2592,2593,2601,2606,2607,2611,2612,2613,2614,2615,2616,2617,2618,2619],{"id":12,"depth":79,"text":13},{"id":23,"depth":79,"text":24},{"id":51,"depth":79,"text":52},{"id":450,"depth":79,"text":451},{"id":533,"depth":79,"text":534},{"id":698,"depth":79,"text":699,"children":2594},[2595,2596,2597,2598,2599,2600],{"id":703,"depth":100,"text":704},{"id":725,"depth":100,"text":726},{"id":910,"depth":100,"text":911},{"id":1079,"depth":100,"text":1080},{"id":1172,"depth":100,"text":1173},{"id":1200,"depth":100,"text":1201},{"id":1226,"depth":79,"text":1227,"children":2602},[2603,2604,2605],{"id":1230,"depth":100,"text":1231},{"id":1240,"depth":100,"text":1241},{"id":1562,"depth":100,"text":1563},{"id":1585,"depth":79,"text":1586},{"id":1791,"depth":79,"text":1792,"children":2608},[2609,2610],{"id":1795,"depth":100,"text":1796},{"id":1805,"depth":100,"text":1806},{"id":1853,"depth":79,"text":1854},{"id":1928,"depth":79,"text":1929},{"id":1985,"depth":79,"text":1986},{"id":2108,"depth":79,"text":2109},{"id":2213,"depth":79,"text":2214},{"id":2298,"depth":79,"text":2299},{"id":2438,"depth":79,"text":2439},{"id":2515,"depth":79,"text":2516},{"id":2571,"depth":79,"text":2572},"Run waves, delegate to specialists, verify results, and persist state.","md",null,{},{"icon":2625},"i-lucide-play-circle","\u002Fguide\u002Fworkflow-execute",{"title":2628,"description":2629,"ogTitle":2628,"ogDescription":2630},"Execute - Gem Team","Phase 3: run waves, delegate to specialists, verify results, and handle failures.",{"Phase 3":2631},"run waves and delegate to specialists.","2.guide\u002Fworkflow-execute","dVCx_m9Jr2YvMJTFVsiCIeou3Qrht3Gas6vSmZWnFqM",[2635,2641],{"title":2636,"path":2637,"stem":2638,"description":2639,"icon":2640,"children":-1},"Workflow","\u002Fguide\u002Fworkflow","2.guide\u002Fworkflow","How Gem Team turns AI coding into a structured, reliable engineering process.","i-lucide-workflow",{"title":2642,"path":2579,"stem":2643,"description":2644,"icon":2645,"children":-1},"Phase 4 - Output","2.guide\u002Fworkflow-output","Structured status reports, learnings promotion, and workflow completion.","i-lucide-check-circle",[2647,2673,2738,2816,2849],{"title":2648,"path":2649,"stem":2650,"children":2651,"icon":2653},"Getting Started","\u002Fgetting-started","1.getting-started\u002F1.index",[2652,2654,2659,2664,2669],{"title":2648,"path":2649,"stem":2650,"icon":2653},"i-lucide-rocket",{"title":2655,"path":2656,"stem":2657,"icon":2658},"Core Concepts","\u002Fgetting-started\u002Fconcepts","1.getting-started\u002Fconcepts","i-lucide-brain",{"title":2660,"path":2661,"stem":2662,"icon":2663},"First Steps Walkthrough","\u002Fgetting-started\u002Ffirst-steps","1.getting-started\u002Ffirst-steps","i-lucide-footprints",{"title":2665,"path":2666,"stem":2667,"icon":2668},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002Finstallation","i-lucide-download",{"title":2670,"path":2671,"stem":2672,"icon":2653},"Quick Start","\u002Fgetting-started\u002Fquick-start","1.getting-started\u002Fquick-start",{"title":2674,"path":2675,"stem":2676,"children":2677,"page":2737},"Guide","\u002Fguide","2.guide",[2678,2681,2686,2691,2696,2700,2705,2710,2715,2719,2724,2729,2734,2735,2736],{"title":2655,"path":2679,"stem":2680,"icon":2658},"\u002Fguide\u002Fcore-concepts","2.guide\u002F2.core-concepts",{"title":2682,"path":2683,"stem":2684,"icon":2685},"Comparison","\u002Fguide\u002Fcomparison","2.guide\u002F4.comparison","i-lucide-scale",{"title":2687,"path":2688,"stem":2689,"icon":2690},"Optimizations","\u002Fguide\u002Foptimizations","2.guide\u002F5.optimizations","i-lucide-zap",{"title":2692,"path":2693,"stem":2694,"icon":2695},"Works With Your Tools","\u002Fguide\u002Fcompatibility","2.guide\u002Fcompatibility","i-lucide-blocks",{"title":2697,"path":2698,"stem":2699,"icon":2690},"Smart & Efficient","\u002Fguide\u002Fefficiency","2.guide\u002Fefficiency",{"title":2701,"path":2702,"stem":2703,"icon":2704},"Failure Handling","\u002Fguide\u002Ffailure-handling","2.guide\u002Ffailure-handling","i-lucide-alert-triangle",{"title":2706,"path":2707,"stem":2708,"icon":2709},"Overview","\u002Fguide\u002Ffeatures","2.guide\u002Ffeatures","i-lucide-sparkles",{"title":2711,"path":2712,"stem":2713,"icon":2714},"Phase 0 - Init & Clarify","\u002Fguide\u002Finit-clarify","2.guide\u002Finit-clarify","i-lucide-search",{"title":2716,"path":2717,"stem":2718,"icon":2658},"Learns & Improves","\u002Fguide\u002Flearning","2.guide\u002Flearning",{"title":2720,"path":2721,"stem":2722,"icon":2723},"Phase 2 - Plan","\u002Fguide\u002Fplan","2.guide\u002Fplan","i-lucide-clipboard-list",{"title":2725,"path":2726,"stem":2727,"icon":2728},"Quality by Default","\u002Fguide\u002Fquality","2.guide\u002Fquality","i-lucide-shield-check",{"title":2730,"path":2731,"stem":2732,"icon":2733},"Phase 1 - Route","\u002Fguide\u002Froute","2.guide\u002Froute","i-lucide-git-branch",{"title":2636,"path":2637,"stem":2638,"icon":2640},{"title":5,"path":2626,"stem":2632,"icon":2625},{"title":2642,"path":2579,"stem":2643,"icon":2645},false,{"title":2739,"path":2740,"stem":2741,"children":2742,"icon":2745},"Agents","\u002Fagents","3.agents\u002F1.index",[2743,2746,2751,2756,2761,2766,2771,2776,2781,2786,2791,2795,2799,2803,2807,2812],{"title":2744,"path":2740,"stem":2741,"icon":2745},"Agent Team","i-lucide-bot",{"title":2747,"path":2748,"stem":2749,"icon":2750},"Browser Tester","\u002Fagents\u002Fbrowser-tester","3.agents\u002Fbrowser-tester","i-lucide-monitor",{"title":2752,"path":2753,"stem":2754,"icon":2755},"Code Simplifier","\u002Fagents\u002Fcode-simplifier","3.agents\u002Fcode-simplifier","i-lucide-scissors",{"title":2757,"path":2758,"stem":2759,"icon":2760},"Debugger","\u002Fagents\u002Fdebugger","3.agents\u002Fdebugger","i-lucide-bug",{"title":2762,"path":2763,"stem":2764,"icon":2765},"DevOps","\u002Fagents\u002Fdevops","3.agents\u002Fdevops","i-lucide-server",{"title":2767,"path":2768,"stem":2769,"icon":2770},"Documentation","\u002Fagents\u002Fdocumentation","3.agents\u002Fdocumentation","i-lucide-book-open",{"title":2772,"path":2773,"stem":2774,"icon":2775},"Implementer","\u002Fagents\u002Fimplementer","3.agents\u002Fimplementer","i-lucide-code",{"title":2777,"path":2778,"stem":2779,"icon":2780},"Mobile Tester","\u002Fagents\u002Fmobile-tester","3.agents\u002Fmobile-tester","i-lucide-smartphone",{"title":2782,"path":2783,"stem":2784,"icon":2785},"Model Routing","\u002Fagents\u002Fmodel-routing","3.agents\u002Fmodel-routing","i-lucide-cpu",{"title":2787,"path":2788,"stem":2789,"icon":2790},"Orchestrator","\u002Fagents\u002Forchestrator","3.agents\u002Forchestrator","i-lucide-command",{"title":2792,"path":2793,"stem":2794,"icon":2723},"Planner","\u002Fagents\u002Fplanner","3.agents\u002Fplanner",{"title":2796,"path":2797,"stem":2798,"icon":2714},"Researcher","\u002Fagents\u002Fresearcher","3.agents\u002Fresearcher",{"title":2800,"path":2801,"stem":2802,"icon":2728},"Reviewer","\u002Fagents\u002Freviewer","3.agents\u002Freviewer",{"title":2804,"path":2805,"stem":2806,"icon":2733},"Reviewer Routing","\u002Fagents\u002Freviewer-routing","3.agents\u002Freviewer-routing",{"title":2808,"path":2809,"stem":2810,"icon":2811},"Skill Creator","\u002Fagents\u002Fskill-creator","3.agents\u002Fskill-creator","i-lucide-package",{"title":2813,"path":2814,"stem":2815,"icon":2811},"Packaged Skills","\u002Fagents\u002Fskills","3.agents\u002Fskills",{"title":2817,"path":2818,"stem":2819,"children":2820,"icon":2822},"Configuration","\u002Fconfiguration","4.configuration\u002F1.index",[2821,2823,2827,2832,2836,2840,2844],{"title":2817,"path":2818,"stem":2819,"icon":2822},"i-lucide-settings",{"title":2824,"path":2825,"stem":2826,"icon":2765},"DevOps Configuration","\u002Fconfiguration\u002Fdevops","4.configuration\u002Fdevops",{"title":2828,"path":2829,"stem":2830,"icon":2831},"Configuration Examples","\u002Fconfiguration\u002Fexamples","4.configuration\u002Fexamples","i-lucide-file-code",{"title":2833,"path":2834,"stem":2835,"icon":2785},"Model Routing Configuration","\u002Fconfiguration\u002Fmodel-routing","4.configuration\u002Fmodel-routing",{"title":2837,"path":2838,"stem":2839,"icon":2790},"Orchestrator Configuration","\u002Fconfiguration\u002Forchestrator","4.configuration\u002Forchestrator",{"title":2841,"path":2842,"stem":2843,"icon":2728},"Quality Configuration","\u002Fconfiguration\u002Fquality","4.configuration\u002Fquality",{"title":2845,"path":2846,"stem":2847,"icon":2848},"Testing Configuration","\u002Fconfiguration\u002Ftesting","4.configuration\u002Ftesting","i-lucide-test-tube",{"title":2850,"path":2851,"stem":2852,"children":2853,"icon":2770},"Resources","\u002Fresources","5.resources\u002F1.index",[2854,2855,2860,2865,2869,2873],{"title":2850,"path":2851,"stem":2852,"icon":2770},{"title":2856,"path":2857,"stem":2858,"icon":2859},"Contributing","\u002Fresources\u002Fcontributing","5.resources\u002F2.contributing","i-lucide-git-pull-request",{"title":2861,"path":2862,"stem":2863,"icon":2864},"Production Best Practices","\u002Fresources\u002Foperational-notes","5.resources\u002F3.operational-notes","i-lucide-shield",{"title":2866,"path":2867,"stem":2868,"icon":2775},"Local Development","\u002Fresources\u002Flocal-development","5.resources\u002F4.local-development",{"title":2870,"path":2871,"stem":2872,"icon":2695},"Compatible Tools","\u002Fresources\u002Fcompatible-tools","5.resources\u002F5.compatible-tools",{"title":2874,"path":2875,"stem":2876,"icon":2877},"Research & Benchmarks","\u002Fresources\u002Fresearch","5.resources\u002Fresearch","i-lucide-file-text",1796221226716,"b8d4f334-6b7e-4495-b303-be3e7dacd83e"]