[{"data":1,"prerenderedAt":479},["ShallowReactive",2],{"blog-slat-18-it":3},{"number":4,"title":5,"summary":6,"parts":7,"toc":11,"minutes":478},18,"Lavorare con gli agenti di coding","SLAT è nato in un team in cui gran parte del codice è scritta da agenti di coding. Gli agenti seguono una struttura in modo affidabile quando è scritta…",[8],{"kind":9,"html":10},"html","\u003Cp>SLAT è nato in un team in cui gran parte del codice è scritta da agenti di coding. Gli agenti seguono una struttura in modo affidabile quando è scritta, breve e verificata da macchine. Tre cose fanno la differenza.\u003C\u002Fp>\n\u003Col>\n\u003Cli>\u003Cstrong>Una struttura fissa è una mappa gratuita.\u003C\u002Fstrong> Un agente a cui si chiede di &quot;aggiungere un filtro alle trascrizioni&quot; apre \u003Ccode>core\u002Ftranscript\u002F\u003C\u002Fcode> e \u003Ccode>app\u002Ftranscript\u002F\u003C\u002Fcode> senza cercare. Il tempo che un agente passa a cercare è tempo in cui sbaglia.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Un check batte una frase nel prompt.\u003C\u002Fstrong> &quot;Non emettere eventi da core&quot; scritto in un prompt viene rispettato quasi sempre. Un check rosso viene rispettato sempre. La regola si scrive prima come check, e come riga di prompt solo quando non si può verificare.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Le ricette sono prompt.\u003C\u002Fstrong> La sezione 17 è scritta di proposito come passi numerati: si incolla la ricetta nel task, e l'agente produce i file nei posti attesi e nell'ordine atteso.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>Gli agenti cambiano anche il modo in cui si compila un workspace. Più agenti in più copie di lavoro sono più build a freddo delle stesse dipendenze nello stesso momento, cioè il portatile bloccato della sezione 19.2. La sezione 22.5 mostra come ogni copia di lavoro parte calda senza condividere una cartella \u003Ccode>target\u002F\u003C\u002Fcode> con un'altra, e la sezione 22.4 come ognuno esegue solo i test che la propria modifica può toccare.\u003C\u002Fp>\n\u003Cp>Una sezione da copiare nella guida per chi contribuisce al repository (\u003Ccode>AGENTS.md\u003C\u002Fcode>, \u003Ccode>CLAUDE.md\u003C\u002Fcode> o equivalente):\u003C\u002Fp>\n\u003Cpre class=\"shiki shiki-themes github-light github-dark\" style=\"--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#005CC5;--shiki-light-font-weight:bold;--shiki-dark:#79B8FF;--shiki-dark-font-weight:bold\">## Backend layout: SLAT 1.3\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">The backend follows SLAT (Slice · Layer · Actor · Tier), version 1.3.\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">Reference: https:\u002F\u002Fmonoone.dev\u002Fblog\u002Fslat\u002F\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#E36209;--shiki-dark:#FFAB70\">-\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> Tiers: app → core → store\u002Fdrivers → kit. Only \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">`app`\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> depends on tauri.\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#E36209;--shiki-dark:#FFAB70\">-\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> A feature is one slice: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">`crates\u002F&#x3C;product>-core\u002Fsrc\u002F&#x3C;slice>\u002F`\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> and \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">`src-tauri\u002Fsrc\u002F&#x3C;slice>\u002F`\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">.\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#E36209;--shiki-dark:#FFAB70\">-\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> Files in a slice: mod.rs, model.rs, logic.rs, store.rs, service.rs, actor\u002F (only if needed).\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#E36209;--shiki-dark:#FFAB70\">-\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> A Tauri command has at most 10 lines and calls one function of its slice.\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#E36209;--shiki-dark:#FFAB70\">-\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> Background state belongs to an actor: Msg → update (pure) → Effect.\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#E36209;--shiki-dark:#FFAB70\">-\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> Operating-system code only in \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">`drivers\u002Fsrc\u002Fplatform\u002F`\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">.\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#E36209;--shiki-dark:#FFAB70\">-\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> If the product has plugins: a base slice never imports a plugin slice\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">  (SLAT section 23).\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#E36209;--shiki-dark:#FFAB70\">-\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> Before adding code, find its place with the decision tree (SLAT section 17.8,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">  https:\u002F\u002Fmonoone.dev\u002Fblog\u002Fslat\u002Frecipes\u002F).\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#E36209;--shiki-dark:#FFAB70\">-\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> Checks in \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">`checks\u002Fslat-*.sh`\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> enforce this. Do not edit a check to make it pass;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">  report it instead.\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#E36209;--shiki-dark:#FFAB70\">-\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> Before pushing, run the tests the change affects (SLAT section 22.4), then the checks.\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#E36209;--shiki-dark:#FFAB70\">-\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> Every working copy has its own \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">`target\u002F`\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">. Never point two copies at one\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">  folder (SLAT section 22.5).\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\n\n",[12,30,34,38,42,62,86,102,122,146,150,158,190,194,218,222,246,282,286,306,326,342,378,426,474],{"id":13,"text":14,"depth":15,"children":16},"s1","1. Perché esiste SLAT",2,[17,22,26],{"id":18,"text":19,"depth":20,"children":21},"s1-1","1.1. Obiettivi",3,[],{"id":23,"text":24,"depth":20,"children":25},"s1-2","1.2. Non-obiettivi",[],{"id":27,"text":28,"depth":20,"children":29},"s1-3","1.3. A chi è rivolto",[],{"id":31,"text":32,"depth":15,"children":33},"s2","2. SLAT in una pagina",[],{"id":35,"text":36,"depth":15,"children":37},"s3","3. Vocabolario",[],{"id":39,"text":40,"depth":15,"children":41},"s4","4. Da dove viene SLAT",[],{"id":43,"text":44,"depth":15,"children":45},"s5","5. Tier",[46,50,54,58],{"id":47,"text":48,"depth":20,"children":49},"s5-1","5.1. Il compilatore fa da guardia",[],{"id":51,"text":52,"depth":20,"children":53},"s5-2","5.2. Con quanti crate iniziare",[],{"id":55,"text":56,"depth":20,"children":57},"s5-3","5.3. Quando dividere un tier",[],{"id":59,"text":60,"depth":20,"children":61},"s5-4","5.4. Eccezione di compatibilità",[],{"id":63,"text":64,"depth":15,"children":65},"s6","6. Slice",[66,70,74,78,82],{"id":67,"text":68,"depth":20,"children":69},"s6-1","6.1. Una slice in core",[],{"id":71,"text":72,"depth":20,"children":73},"s6-2","6.2. Una slice in app",[],{"id":75,"text":76,"depth":20,"children":77},"s6-3","6.3. Un comando, la forma di riferimento",[],{"id":79,"text":80,"depth":20,"children":81},"s6-4","6.4. Registrare i comandi",[],{"id":83,"text":84,"depth":20,"children":85},"s6-5","6.5. Dare un nome alle slice",[],{"id":87,"text":88,"depth":15,"children":89},"s7","7. Chi può importare chi",[90,94,98],{"id":91,"text":92,"depth":20,"children":93},"s7-1","7.1. Dentro una slice",[],{"id":95,"text":96,"depth":20,"children":97},"s7-2","7.2. Tra slice",[],{"id":99,"text":100,"depth":20,"children":101},"s7-3","7.3. Perché proprio questi confini",[],{"id":103,"text":104,"depth":15,"children":105},"s8","8. Flussi di dati",[106,110,114,118],{"id":107,"text":108,"depth":20,"children":109},"s8-1","8.1. Query (una lettura)",[],{"id":111,"text":112,"depth":20,"children":113},"s8-2","8.2. Command (una modifica)",[],{"id":115,"text":116,"depth":20,"children":117},"s8-3","8.3. Evento (backend → finestra)",[],{"id":119,"text":120,"depth":20,"children":121},"s8-4","8.4. Flussi ad alto volume",[],{"id":123,"text":124,"depth":15,"children":125},"s9","9. Attori: slice con stato",[126,130,134,138,142],{"id":127,"text":128,"depth":20,"children":129},"s9-1","9.1. Quando usare un attore",[],{"id":131,"text":132,"depth":20,"children":133},"s9-2","9.2. File",[],{"id":135,"text":136,"depth":20,"children":137},"s9-3","9.3. Il contratto",[],{"id":139,"text":140,"depth":20,"children":141},"s9-4","9.4. Un piccolo attore completo",[],{"id":143,"text":144,"depth":20,"children":145},"s9-5","9.5. Testare un attore",[],{"id":147,"text":148,"depth":15,"children":149},"s10","10. L'esplosione delle varianti",[],{"id":151,"text":152,"depth":15,"children":153},"s11","11. AppState, la composition root",[154],{"id":155,"text":156,"depth":20,"children":157},"s11-1","11.1. kit::Jobs: lavoro in background una tantum",[],{"id":159,"text":160,"depth":15,"children":161},"s12","12. Piattaforme",[162,166,170,174,178,182,186],{"id":163,"text":164,"depth":20,"children":165},"s12-1","12.1. Struttura",[],{"id":167,"text":168,"depth":20,"children":169},"s12-2","12.2. Contratti",[],{"id":171,"text":172,"depth":20,"children":173},"s12-3","12.3. Cosa è vietato fuori da platform\u002F",[],{"id":175,"text":176,"depth":20,"children":177},"s12-4","12.4. Percorsi, file e testo",[],{"id":179,"text":180,"depth":20,"children":181},"s12-5","12.5. Test di piattaforma",[],{"id":183,"text":184,"depth":20,"children":185},"s12-6","12.6. Applicazione delle regole",[],{"id":187,"text":188,"depth":20,"children":189},"s12-7","12.7. Port su un nuovo sistema operativo",[],{"id":191,"text":192,"depth":15,"children":193},"s13","13. Errori",[],{"id":195,"text":196,"depth":15,"children":197},"s14","14. Test per layer",[198,202,206,210,214],{"id":199,"text":200,"depth":20,"children":201},"s14-1","14.1. Un solo binario di integrazione",[],{"id":203,"text":204,"depth":20,"children":205},"s14-2","14.2. Un driver finto senza trait",[],{"id":207,"text":208,"depth":20,"children":209},"s14-3","14.3. Mutanti nel diff",[],{"id":211,"text":212,"depth":20,"children":213},"s14-4","14.4. Test di proprietà per update",[],{"id":215,"text":216,"depth":20,"children":217},"s14-5","14.5. Un test attraverso il punto di ingresso",[],{"id":219,"text":220,"depth":15,"children":221},"s15","15. Limiti di dimensione",[],{"id":223,"text":224,"depth":15,"children":225},"s16","16. Applicazione delle regole",[226,230,234,238,242],{"id":227,"text":228,"depth":20,"children":229},"s16-1","16.1. Un check con una baseline",[],{"id":231,"text":232,"depth":20,"children":233},"s16-2","16.2. Un check deve poter fallire",[],{"id":235,"text":236,"depth":20,"children":237},"s16-3","16.3. Il job di piattaforma in CI",[],{"id":239,"text":240,"depth":20,"children":241},"s16-4","16.4. I check del set completo",[],{"id":243,"text":244,"depth":20,"children":245},"s16-5","16.5. Lint e divieti prima degli script",[],{"id":247,"text":248,"depth":15,"children":249},"s17","17. Ricette",[250,254,258,262,266,270,274,278],{"id":251,"text":252,"depth":20,"children":253},"s17-1","17.1. Una nuova lettura (Query)",[],{"id":255,"text":256,"depth":20,"children":257},"s17-2","17.2. Una nuova modifica senza stato in background (Command)",[],{"id":259,"text":260,"depth":20,"children":261},"s17-3","17.3. Una nuova slice",[],{"id":263,"text":264,"depth":20,"children":265},"s17-4","17.4. Un nuovo flusso con stato (attore)",[],{"id":267,"text":268,"depth":20,"children":269},"s17-5","17.5. Un nuovo driver (il mondo esterno)",[],{"id":271,"text":272,"depth":20,"children":273},"s17-6","17.6. Un nuovo evento per la finestra",[],{"id":275,"text":276,"depth":20,"children":277},"s17-7","17.7. Una nuova piattaforma",[],{"id":279,"text":280,"depth":20,"children":281},"s17-8","17.8. Dove va questo? (albero decisionale)",[],{"id":283,"text":284,"depth":15,"children":285},"s18","18. Lavorare con gli agenti di coding",[],{"id":287,"text":288,"depth":15,"children":289},"s19","19. Migrare una codebase esistente",[290,294,298,302],{"id":291,"text":292,"depth":20,"children":293},"s19-1","19.1. L'ordine",[],{"id":295,"text":296,"depth":20,"children":297},"s19-2","19.2. Regole della migrazione",[],{"id":299,"text":300,"depth":20,"children":301},"s19-3","19.3. Prima la struttura, per partire più in fretta",[],{"id":303,"text":304,"depth":20,"children":305},"s19-4","19.4. Cosa va storto di solito",[],{"id":307,"text":308,"depth":15,"children":309},"s20","20. Caso di studio: Quayside",[310,314,318,322],{"id":311,"text":312,"depth":20,"children":313},"s20-1","20.1. Prima",[],{"id":315,"text":316,"depth":20,"children":317},"s20-2","20.2. Sintomi nel codice",[],{"id":319,"text":320,"depth":20,"children":321},"s20-3","20.3. La migrazione, passo dopo passo",[],{"id":323,"text":324,"depth":20,"children":325},"s20-4","20.4. Dopo",[],{"id":327,"text":328,"depth":15,"children":329},"s21","21. Checklist di adozione e FAQ",[330,334,338],{"id":331,"text":332,"depth":20,"children":333},"s21-1","21.1. Checklist per un nuovo progetto",[],{"id":335,"text":336,"depth":20,"children":337},"s21-2","21.2. Checklist per un progetto esistente",[],{"id":339,"text":340,"depth":20,"children":341},"s21-3","21.3. Domande",[],{"id":343,"text":344,"depth":15,"children":345},"s22","22. Tempi di build e di test",[346,350,354,358,362,366,370,374],{"id":347,"text":348,"depth":20,"children":349},"s22-1","22.1. Dove va il tempo",[],{"id":351,"text":352,"depth":20,"children":353},"s22-2","22.2. Impostazioni di build",[],{"id":355,"text":356,"depth":20,"children":357},"s22-3","22.3. Un solo insieme di feature",[],{"id":359,"text":360,"depth":20,"children":361},"s22-4","22.4. Eseguire ciò che una modifica può toccare",[],{"id":363,"text":364,"depth":20,"children":365},"s22-5","22.5. Molte copie di lavoro",[],{"id":367,"text":368,"depth":20,"children":369},"s22-6","22.6. CI",[],{"id":371,"text":372,"depth":20,"children":373},"s22-7","22.7. Cosa fa ripartire una build da capo",[],{"id":375,"text":376,"depth":20,"children":377},"s22-8","22.8. Ripulire target\u002F",[],{"id":379,"text":380,"depth":15,"children":381},"s23","23. Plugin",[382,386,390,394,398,402,406,410,414,418,422],{"id":383,"text":384,"depth":20,"children":385},"s23-1","23.1. Quando una funzionalità è un plugin",[],{"id":387,"text":388,"depth":20,"children":389},"s23-2","23.2. Struttura",[],{"id":391,"text":392,"depth":20,"children":393},"s23-3","23.3. Direzione",[],{"id":395,"text":396,"depth":20,"children":397},"s23-4","23.4. Punti di estensione",[],{"id":399,"text":400,"depth":20,"children":401},"s23-5","23.5. Attivo e disattivato",[],{"id":403,"text":404,"depth":20,"children":405},"s23-6","23.6. Front-end",[],{"id":407,"text":408,"depth":20,"children":409},"s23-7","23.7. Un plugin nel proprio crate",[],{"id":411,"text":412,"depth":20,"children":413},"s23-8","23.8. Test",[],{"id":415,"text":416,"depth":20,"children":417},"s23-9","23.9. Trasformare una slice esistente in un plugin",[],{"id":419,"text":420,"depth":20,"children":421},"s23-10","23.10. Applicazione delle regole",[],{"id":423,"text":424,"depth":20,"children":425},"s23-11","23.11. Plugin dall'esterno",[],{"id":427,"text":428,"depth":15,"children":429},"s24","24. Pacchetti di plugin",[430,434,438,442,446,450,454,458,462,466,470],{"id":431,"text":432,"depth":20,"children":433},"s24-1","24.1. Plugin integrato o pacchetto",[],{"id":435,"text":436,"depth":20,"children":437},"s24-2","24.2. La regola del processo",[],{"id":439,"text":440,"depth":20,"children":441},"s24-3","24.3. Struttura",[],{"id":443,"text":444,"depth":20,"children":445},"s24-4","24.4. Il manifest",[],{"id":447,"text":448,"depth":20,"children":449},"s24-5","24.5. Il protocollo",[],{"id":451,"text":452,"depth":20,"children":453},"s24-6","24.6. Punti di estensione per i pacchetti",[],{"id":455,"text":456,"depth":20,"children":457},"s24-7","24.7. Firma e store",[],{"id":459,"text":460,"depth":20,"children":461},"s24-8","24.8. Ciclo di vita",[],{"id":463,"text":464,"depth":20,"children":465},"s24-9","24.9. Permessi",[],{"id":467,"text":468,"depth":20,"children":469},"s24-10","24.10. Test",[],{"id":471,"text":472,"depth":20,"children":473},"s24-11","24.11. Applicazione delle regole",[],{"id":475,"text":476,"depth":15,"children":477},"s25","25. Cronologia delle versioni",[],81,1795449740819]