PNG IHDR ! (utEXtmxfile %3Cmxfile%20host%3D%22app.diagrams.net%22%20scale%3D%221%22%20border%3D%220%22%3E%0A%20%20%3Cdiagram%20name%3D%22Page-1%22%20id%3D%22LJMnBYVWAFnAyV3nTx4Y%22%3E%0A%20%20%20%20%3CmxGraphModel%20dx%3D%221371%22%20dy%3D%22994%22%20grid%3D%221%22%20gridSize%3D%2210%22%20guides%3D%221%22%20tooltips%3D%221%22%20connect%3D%221%22%20arrows%3D%221%22%20fold%3D%221%22%20page%3D%221%22%20pageScale%3D%221%22%20pageWidth%3D%22850%22%20pageHeight%3D%221100%22%20math%3D%220%22%20shadow%3D%220%22%3E%0A%20%20%20%20%20%20%3Croot%3E%0A%20%20%20%20%20%20%20%20%3CmxCell%20id%3D%220%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%3CmxCell%20id%3D%221%22%20parent%3D%220%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%3CmxCell%20id%3D%22CVwY2_WE1d3yY5E9IwBn-11%22%20parent%3D%221%22%20style%3D%22rounded%3D1%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3B%22%20value%3D%22%22%20vertex%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%20%20%3CmxGeometry%20height%3D%22610%22%20width%3D%22480%22%20x%3D%22360%22%20y%3D%2290%22%20as%3D%22geometry%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%3C%2FmxCell%3E%0A%20%20%20%20%20%20%20%20%3CmxCell%20id%3D%22CVwY2_WE1d3yY5E9IwBn-1%22%20parent%3D%221%22%20style%3D%22rounded%3D1%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3B%22%20value%3D%22%22%20vertex%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%20%20%3CmxGeometry%20height%3D%22610%22%20width%3D%22300%22%20x%3D%2240%22%20y%3D%2290%22%20as%3D%22geometry%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%3C%2FmxCell%3E%0A%20%20%20%20%20%20%20%20%3CmxCell%20id%3D%22CVwY2_WE1d3yY5E9IwBn-2%22%20parent%3D%221%22%20style%3D%22text%3Bhtml%3D1%3BwhiteSpace%3Dwrap%3BstrokeColor%3Dnone%3BfillColor%3Dnone%3Balign%3Dcenter%3BverticalAlign%3Dmiddle%3Brounded%3D0%3B%22%20value%3D%22%26quot%3BWrite%20a%20feature%20that%20tracks%20user%20quest%20progress%2C%20and%20considers%20ABC%2C%20and%20has%20tests%20for...%26quot%3B%22%20vertex%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%20%20%3CmxGeometry%20height%3D%2250%22%20width%3D%22230%22%20x%3D%22100%22%20y%3D%22110%22%20as%3D%22geometry%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%3C%2FmxCell%3E%0A%20%20%20%20%20%20%20%20%3CmxCell%20id%3D%22CVwY2_WE1d3yY5E9IwBn-3%22%20parent%3D%221%22%20style%3D%22text%3Bhtml%3D1%3BwhiteSpace%3Dwrap%3BstrokeColor%3Dnone%3BfillColor%3Dnone%3Balign%3Dcenter%3BverticalAlign%3Dmiddle%3Brounded%3D0%3B%22%20value%3D%22%26lt%3Bb%26gt%3BPrompt%3A%26lt%3B%2Fb%26gt%3B%22%20vertex%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%20%20%3CmxGeometry%20height%3D%2230%22%20width%3D%2260%22%20x%3D%2250%22%20y%3D%22120%22%20as%3D%22geometry%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%3C%2FmxCell%3E%0A%20%20%20%20%20%20%20%20%3CmxCell%20id%3D%22CVwY2_WE1d3yY5E9IwBn-5%22%20parent%3D%221%22%20style%3D%22text%3Bhtml%3D1%3BwhiteSpace%3Dwrap%3BstrokeColor%3Dnone%3BfillColor%3Dnone%3Balign%3Dcenter%3BverticalAlign%3Dmiddle%3Brounded%3D0%3B%22%20value%3D%22%26lt%3Bb%26gt%3B%26lt%3Bfont%20style%3D%26quot%3Bfont-size%3A%2024px%3B%26quot%3B%26gt%3BImpractical%26lt%3B%2Ffont%26gt%3B%26lt%3B%2Fb%26gt%3B%22%20vertex%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%20%20%3CmxGeometry%20height%3D%2230%22%20width%3D%22160%22%20x%3D%22110%22%20y%3D%2250%22%20as%3D%22geometry%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%3C%2FmxCell%3E%0A%20%20%20%20%20%20%20%20%3CmxCell%20id%3D%22CVwY2_WE1d3yY5E9IwBn-6%22%20parent%3D%221%22%20style%3D%22text%3Bhtml%3D1%3BwhiteSpace%3Dwrap%3BstrokeColor%3Dnone%3BfillColor%3Dnone%3Balign%3Dcenter%3BverticalAlign%3Dmiddle%3Brounded%3D0%3B%22%20value%3D%22%26lt%3Bb%26gt%3B%26lt%3Bfont%20style%3D%26quot%3Bfont-size%3A%2024px%3B%26quot%3B%26gt%3BPractical%26lt%3B%2Ffont%26gt%3B%26lt%3B%2Fb%26gt%3B%22%20vertex%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%20%20%3CmxGeometry%20height%3D%2230%22%20width%3D%22160%22%20x%3D%22430%22%20y%3D%2250%22%20as%3D%22geometry%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%3C%2FmxCell%3E%0A%20%20%20%20%20%20%20%20%3CmxCell%20id%3D%22CVwY2_WE1d3yY5E9IwBn-9%22%20parent%3D%221%22%20style%3D%22text%3Bhtml%3D1%3BwhiteSpace%3Dwrap%3BstrokeColor%3Dnone%3BfillColor%3Dnone%3Balign%3Dcenter%3BverticalAlign%3Dmiddle%3Brounded%3D0%3B%22%20value%3D%22%26quot%3BImplement%20the%20TODOs%20in%20this%20file%2C%20which%20i%20spent%205min%20writing%26quot%3B%22%20vertex%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%20%20%3CmxGeometry%20height%3D%2240%22%20width%3D%22230%22%20x%3D%22500%22%20y%3D%22110%22%20as%3D%22geometry%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%3C%2FmxCell%3E%0A%20%20%20%20%20%20%20%20%3CmxCell%20id%3D%22CVwY2_WE1d3yY5E9IwBn-10%22%20parent%3D%221%22%20style%3D%22text%3Bhtml%3D1%3BwhiteSpace%3Dwrap%3BstrokeColor%3Dnone%3BfillColor%3Dnone%3Balign%3Dcenter%3BverticalAlign%3Dmiddle%3Brounded%3D0%3B%22%20value%3D%22%26lt%3Bb%26gt%3BPrompt%3A%26lt%3B%2Fb%26gt%3B%22%20vertex%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%20%20%3CmxGeometry%20height%3D%2230%22%20width%3D%2260%22%20x%3D%22440%22%20y%3D%22110%22%20as%3D%22geometry%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%3C%2FmxCell%3E%0A%20%20%20%20%20%20%20%20%3CmxCell%20id%3D%22CVwY2_WE1d3yY5E9IwBn-13%22%20parent%3D%221%22%20style%3D%22text%3BstrokeColor%3Dnone%3BfillColor%3Dnone%3Balign%3Dleft%3BverticalAlign%3Dmiddle%3Brounded%3D0%3Bhtml%3D1%3BfontSize%3D8%3B%22%20value%3D%22import%20time%26lt%3Bbr%26gt%3Bimport%20domainLogger%26lt%3Bbr%26gt%3Bimport%20organizationAuth%26lt%3Bbr%26gt%3Bimport%20datastore%26lt%3Bbr%26gt%3B%26lt%3Bbr%26gt%3Btype%20UserProgress%20struct%20%7B%26lt%3Bbr%26gt%3B%26amp%3Bnbsp%3B%20%26amp%3Bnbsp%3B%20%2F%2F%20this%20shows%20that%20you%20have%20a%20library%20for%20auth%2FID%26lt%3Bbr%26gt%3B%26amp%3Bnbsp%3B%20%26amp%3Bnbsp%3B%20%2F%2F%20and%20you%20want%20json%20fields%20in%20camelCase%20not%20CamelCase%26lt%3Bbr%26gt%3B%26amp%3Bnbsp%3B%20%26amp%3Bnbsp%3B%20Id%20organizationAuth.AccountId%20%60json%3Aid%60%26lt%3Bbr%26gt%3B%26%23x9%3B%26lt%3Bbr%26gt%3B%26amp%3Bnbsp%3B%20%26amp%3Bnbsp%3B%20%2F%2F%20TODO%3A%20the%20rest%20of%20the%20struct%26lt%3Bbr%26gt%3B%7D%26lt%3Bbr%26gt%3B%26lt%3Bbr%26gt%3B%2F%2F%20this%20demonstrates%20that%20you%20want%20each%20quest%20to%20be%20structured%2C%20without%20needing%20to%20implement%20it%20yourself%26lt%3Bbr%26gt%3Btype%20QuestProgress%20struct%20%7B%26lt%3Bbr%26gt%3B%26amp%3Bnbsp%3B%20%26amp%3Bnbsp%3B%20%2F%2F%20unique%20across%20all%20Quests!%26lt%3Bbr%26gt%3B%26amp%3Bnbsp%3B%20%26amp%3Bnbsp%3B%20Id%20string%20%60json%3Aid%60%26lt%3Bbr%26gt%3B%26amp%3Bnbsp%3B%20%26amp%3Bnbsp%3B%20Steps%20%5B%5DQuestStep%26lt%3Bbr%26gt%3B%7D%26lt%3Bbr%26gt%3B%26lt%3Bbr%26gt%3B%26lt%3Bbr%26gt%3Btype%20QuestStep%20struct%20%7B%26lt%3Bbr%26gt%3B%26amp%3Bnbsp%3B%20%26amp%3Bnbsp%3B%20%2F%2F%20...%26lt%3Bbr%26gt%3B%7D%26lt%3Bbr%26gt%3B%26lt%3Bbr%26gt%3Bfunc%20(this%20*UserProgress)%20IncrementQuest(questName%20string)%20error%20%7B%26lt%3Bbr%26gt%3B%26lt%3Bbr%26gt%3B%26amp%3Bnbsp%3B%20%26amp%3Bnbsp%3B%20%2F%2F%20this%20demonstrates%20how%20you%20use%20debug%20logging%26lt%3Bbr%26gt%3B%26amp%3Bnbsp%3B%20%26amp%3Bnbsp%3B%20domainLogger.Debug(%26quot%3BIncrementing%20%25s%20quest%26quot%3B%2C%20questName)%26lt%3Bbr%26gt%3B%26lt%3Bbr%26gt%3B%26amp%3Bnbsp%3B%20%26amp%3Bnbsp%3B%20%2F%2F%20TODO%3A%20update%20QuestProgress%20in%20the%20UserProgress%26lt%3Bbr%26gt%3B%26amp%3Bnbsp%3B%20%26amp%3Bnbsp%3B%20%2F%2F%20TODO%3A%20errors%20if...%26lt%3Bbr%26gt%3B%7D%26lt%3Bbr%26gt%3B%26lt%3Bbr%26gt%3Bfunc%20(this%20*UserProgress)%20WriteProgress(datastore%20*questDatastore)%20error%20%7B%26lt%3Bbr%26gt%3B%26lt%3Bbr%26gt%3B%26amp%3Bnbsp%3B%20%26amp%3Bnbsp%3B%20%2F%2F%20this%20informs%20the%20agent%20that%20not%20only%20do%20we%20have%20a%20standardized%20datastore%20(probably%20with%20retries%2C%20connection%20pooling%2C%20etc)%26lt%3Bbr%26gt%3B%26amp%3Bnbsp%3B%20%26amp%3Bnbsp%3B%20%2F%2F%20we%20also%20have%20a%20standardized%20envelope%2C%20that%20is%20marshalled%20in%20a%20specific%20way%26lt%3Bbr%26gt%3B%26amp%3Bnbsp%3B%20%26amp%3Bnbsp%3B%20envelope%20%3A%3D%20datastore.NewEnvelope(this)%26lt%3Bbr%26gt%3B%26amp%3Bnbsp%3B%20%26amp%3Bnbsp%3B%20marshalled%20%3A%3D%20envelope.MarshalToJson()%26lt%3Bbr%26gt%3B%7D%26lt%3Bbr%26gt%3B%26lt%3Bbr%26gt%3Bfunc%20(this%20UserProgress)%20GetPartitionKey()%20datastore.PKey%20%7B%26lt%3Bbr%26gt%3B%26amp%3Bnbsp%3B%20%26amp%3Bnbsp%3B%20%2F%2F%20TODO%26lt%3Bbr%26gt%3B%7D%26lt%3Bbr%26gt%3B%26lt%3Bbr%26gt%3B%2F%2F%20this%20implies%20that%20you%20have%20a%20different%20datastore%20per-object%2C%20rather%20than%20trying%20to%20share%20it%20around%26lt%3Bbr%26gt%3Btype%20questDatastore%20struct%20%7B%26lt%3Bbr%26gt%3B%26amp%3Bnbsp%3B%20%26amp%3Bnbsp%3B%20connection%20orgDatastore.Connection%26%23x9%3B%26lt%3Bbr%26gt%3B%7D%22%20vertex%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%20%20%3CmxGeometry%20height%3D%22480%22%20width%3D%22440%22%20x%3D%22380%22%20y%3D%22170%22%20as%3D%22geometry%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%3C%2FmxCell%3E%0A%20%20%20%20%20%20%20%20%3CmxCell%20id%3D%22CVwY2_WE1d3yY5E9IwBn-14%22%20parent%3D%221%22%20style%3D%22text%3Bhtml%3D1%3BwhiteSpace%3Dwrap%3BstrokeColor%3Dnone%3BfillColor%3Dnone%3Balign%3Dcenter%3BverticalAlign%3Dmiddle%3Brounded%3D0%3B%22%20value%3D%22from%20scratch!%22%20vertex%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%20%20%3CmxGeometry%20height%3D%2230%22%20width%3D%2260%22%20x%3D%22160%22%20y%3D%22310%22%20as%3D%22geometry%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%3C%2FmxCell%3E%0A%20%20%20%20%20%20%20%20%3CmxCell%20id%3D%22CVwY2_WE1d3yY5E9IwBn-15%22%20parent%3D%221%22%20style%3D%22text%3Bhtml%3D1%3BwhiteSpace%3Dwrap%3BstrokeColor%3Dnone%3BfillColor%3Dnone%3Balign%3Dcenter%3BverticalAlign%3Dmiddle%3Brounded%3D0%3B%22%20value%3D%22%26quot%3Band%20use%20a%20bunch%20of%20skills%20and%20subagents%26quot%3B%22%20vertex%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%20%20%3CmxGeometry%20height%3D%2270%22%20width%3D%22120%22%20x%3D%22130%22%20y%3D%22440%22%20as%3D%22geometry%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%3C%2FmxCell%3E%0A%20%20%20%20%20%20%20%20%3CmxCell%20id%3D%22CVwY2_WE1d3yY5E9IwBn-16%22%20parent%3D%221%22%20style%3D%22text%3Bhtml%3D1%3BwhiteSpace%3Dwrap%3BstrokeColor%3Dnone%3BfillColor%3Dnone%3Balign%3Dcenter%3BverticalAlign%3Dmiddle%3Brounded%3D0%3B%22%20value%3D%22%26quot%3Bno%20errors%26quot%3B%22%20vertex%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%20%20%3CmxGeometry%20height%3D%2230%22%20width%3D%2260%22%20x%3D%22160%22%20y%3D%22620%22%20as%3D%22geometry%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%3C%2FmxCell%3E%0A%20%20%20%20%20%20%3C%2Froot%3E%0A%20%20%20%20%3C%2FmxGraphModel%3E%0A%20%20%3C%2Fdiagram%3E%0A%3C%2Fmxfile%3E%0Ar IDATx USǟLJ襛Egʜx d C9n{9קukxֳ׳l@ 43( e)" " " K@FHŦl(p%͢H@dd.G ]JUrEq䙀8!q")!9(" " " " " $rt袋9]uu/9ʩ<Ξ=۞}Y]|*s~zQ#\m\K.i[l=FQ /~RQՋ$ojySU" N@FH _~뮶['|R̪J7<6m=ںtb\rIQ"I|Hi߾tI1GTJ@cd4FH#pi