B U I L D I N G M Y A G E N T I C T E A M · E P I S O D E 0 1 F R E E T E M P L A T E The 6-Layer Agent Spec. T he s hee t w e us e to b u ild e v e ry on e o f our 29 a ge nts F ill i t i n a n d you h a v e a n a ge nt S ki p a l a y e r a n d you h a v e a prompt كل وكيل في الفريق الشيت اللي بنبني بيه املاه، يبقى عندك AI Agent. سيب طبقة فاضية، يبقى عندك برومبت. @ m ichae l gha ly c o 01 / 05 T H E A N A T O M Y Six layers. In this order. M ost " AI a ge nts " a r e l a y e r on e a n d not hi n g el s e — a n a m e a n d a v ibe T he ot he r fi v e a r e w h a t m a ke output r e p e a t a ble 01 Role O n e s e nt e n ce W h a t t hi s a ge nt i s , a n d t he s i n gle t hi n g i t i s a cc ount a ble f or I f you n eed " a n d " tw ice , i t ' s two a ge nts W e a k : " H el ps w i t h m a r ke t i n g ." S tron g : " W r i t e s a n d m a i nt a i ns t he pro d u c t sp ec f or on e fe a tur e a t a t i m e ." 02 Responsibilities T h r ee to s i x b u lle ts i t owns — a n d , j ust a s i mport a nt , a s h ort li st o f w h a t i t d o e s not tou ch T he b oun d a ry i s t he us ef u l p a rt W i t h out e x cl us i ons , e v e ry a ge nt s l ow l y bec om e s a ge n e r a li st a g a i n 03 Context W h a t i t must k now bef or e i t c a n be us ef u l : t he pro d u c t , t he st a ck , t he a u die n ce , t he c onstr a i nts , t he file s or syst e ms i t r e a d s f rom T hi s i s t he l a y e r p e op le s ki p , t he n bl a m e t he mo del f or ge n e r ic output 04 Rules H a r d li m i ts a n d h ous e st a n d a r d s W h a t i t must a l w a ys d o , n e v e r d o , a n d w he n i t must stop a n d a s k i nst e a d o f g u e ss i n g I n cl u de a t le a st on e e s c a l a t i on ru le A n a ge nt t h a t n e v e r s a ys " I d on ' t k now " w ill i nv e nt 05 Tools E x a c t l y w hich too l s , file s , r e pos , or i nt eg r a t i ons i t c a n r e a ch — a n d w hich i t c a nnot A cce ss i s a de s ig n deci s i on , not a def a u l t F e w e r too l s , be tt e r r e su l ts G i v e a n a ge nt t e n a n d i t w ill p ick t he wron g on e 06 Output Format T he e x a c t s h a p e o f w h a t c om e s b a ck — s ec t i ons , field s , file typ e , le n g t h T hi s i s w h a t m a ke s on e a ge nt ' s output us a ble a s a not he r a ge nt ' s i nput N o fi x ed f orm a t m e a ns no h a n d o ff s N o h a n d o ff s m e a ns you d on ' t h a v e a t e a m The 6- La y e r Age nt S p ec 02 / 05 T H E T E M P L A T E Fill this in. One page, one agent. P r i nt i t , or c opy i t i nto N ot i on Na m e t he a ge nt bef or e you fill a nyt hi n g el s e — n a m i n g f or ce s defi n i t i on A G E N T N A M E · F U N C T I O N 0 1 — R O L E O n e s e nt e n ce T he s i n gle t hi n g i t i s a cc ount a ble f or 0 2 — R E S P O N S I B I L I T I E S / N O T I T S J O B 36 own ed 23 e xp lici t l y e x cl u ded 0 3 — C O N T E X T W h a t i t must k now bef or e i t c a n be us ef u l 0 4 — R U L E S / W H E N T O E S C A L A T E A l w a ys , n e v e r , a n d t he po i nt w he r e i t stops a n d a s k s 0 5 — T O O L S Na m ed a cce ss on l y L i st w h a t i t c a nnot r e a ch too 0 6 — O U T P U T F O R M A T E x a c t s ec t i ons a n d file typ e W h o c onsum e s t hi s output n e xt ? The 6- La y e r Age nt S p ec 03 / 05 W O R K E D E X A M P L E Salma — QA A r e a l a ge nt f rom our t e a m , filled i n a g a i nst a ll s i x l a y e rs N ot e h ow n a rrow i t i s T h a t n a rrown e ss i s t he fe a tur e 0 1 — R O L E F i n d s w h a t b r e a k s bef or e a us e r d o e s A cc ount a ble f or t he st a t e o f t he b u ild a t t he mom e nt i t r e a che s st a gi n g 0 2 — R E S P O N S I B I L I T I E S / N O T I T S J O B W r i t e s t e st c a s e s f rom t he sp ec , not f rom t he c o de R e pro d u ce s r e port ed b u g s a n d file s t he m w i t h st e ps R e - t e sts a f t e r a fi x a n d cl os e s or r e op e ns N ot i ts j o b : fi x i n g b u g s , r e v ie w i n g c o de sty le , decidi n g pr i or i ty 0 3 — C O N T E X T T he c urr e nt pro d u c t sp ec , t he t a r ge t de v ice s , t he k nown - i ssu e s li st , a n d w h a t " d on e " m e a ns f or t hi s r ele a s e 0 4 — R U L E S / E S C A L A T E N e v e r m a r k a b u g fi x ed w i t h out r e pro d u ci n g t he fi x N e v e r r e wr i t e t he sp ec to m a t ch t he b u ild I f t he sp ec i s a m big uous , stop a n d a s k t he pro d u c t a ge nt — d o not decide 0 5 — T O O L S I ssu e tr a cke r ( r e a d / wr i t e ), t he st a gi n g b u ild , t he sp ec d o c um e nt ( r e a d on l y ). N o r e po wr i t e a cce ss 0 6 — O U T P U T F O R M A T O n e i ssu e p e r b u g : t i t le , s e v e r i ty , st e ps to r e pro d u ce , e xp ec t ed , a c tu a l , e nv i ronm e nt N ot hi n g el s e T h a t s h a p e i s w h a t t he c o de r e v ie w a ge nt r e a d s n e xt @ m ichae l gha ly c o 04 / 05 B E F O R E Y O U B U I L D Seven rules that hold up. Name it fi rst. Y ou c a n ' t n a m e som e t hi n g v a g u e T he n a m e w ill e xpos e a ro le you h a v e n ' t defi n ed y e t One accountability each. I f a n a ge nt owns two out c om e s , i t w ill d o b ot h a t h a lf qu a li ty Write the exclusions. W h a t a n a ge nt d o e sn ' t tou ch m a tt e rs mor e t h a n w h a t i t d o e s Fix the output shape early. H a n d o ff s be tw ee n a ge nts on l y wor k w he n t he f orm a t i s pr edic t a ble Give the fewest tools that work. A cce ss i s a de s ig n deci s i on , not a c onv e n ie n ce Build an escalation path. E v e ry a ge nt n eed s a defi n ed mom e nt w he r e i t stops a n d a s k s a h um a n Leave one corner open. E v e ry sp ec ge ts r e v i s ed a f t e r r e a l us e W r i t e i t e xp ec t i n g t h a t اللي مش شغله سمّ يه الأول. حدّ د مسؤولية واحدة. واكتب وسيب زاوية واحدة مفتوحة — كل سبيك بيتعدّ ل بعد أول استخدام حقيقي. The rest of the team is on the way. E v e ry de p a rtm e nt , e v e ry i nstru c t i on , e v e ry f a il ur e — on e e p i so de a t a t i m e I N S T A G R A M → @ M I C H A E L G H A L Y C O B u i l di n g M y Age nt ic Tea m · EP 01 05 / 05