تماشای این درس نیاز به اشتراک حرفه‌ای دارد.

Building the Autonomous Loop0:00

I did a fun experiment and turned a Ralph CLI into a perpetual loop. The complete hook is where the magic happens. This is a hook that gets called when a Ralph loop finishes. In here we spawn a clot and since that will check if there is an open PR, emerge it and then we will spawn a second clot and since that will plan the next feature for us. The next feature is a skill that will plan and create the next feature fully autonomous. It will take a look at linear and see what has been done, then it will read our

autonomous. It will take a look at linear and see what has been done, then it will read our vision which is the north star we want to have a multi-tenant food ordering platform and we add a few guidelines. We need multi-tenancy, we decided our tech stack which is going to be Laravel, it is going to be a nourishment react, we will use SQLite and auth, we will use Laravel built in auth.

Guardrails and Environment Setup0:48

to be a nourishment react, we will use SQLite and auth, we will use Laravel built in auth. And then we have a few feature areas we will have our foundation, the management interface, the webshop and then our advanced features like payment integrations, reviews etc. In addition to our vision document I did a few other things to keep the model from completely going off the rails. I ran Laravel new myself in the empty repository and this is something I am

going off the rails. I ran Laravel new myself in the empty repository and this is something I am just not ready to give up yet, the feeling of starting a fresh project just brings me to much joy. I also added the Asian browser skill which gives the model instructions on how to check its own work in the browser and to make this work inside YoloBox I also had to set up this custom Docker fragment.

set up this custom Docker fragment. Finally, taking a look at the cloth settings I also added a stop hook, cloth is known to be lazy when it comes to failing tests and by adding this stop hook cloth simply cannot ignore test failures. I let the model run overnight and it created 30 pull requests and a whopping 31 ,881 additions over 300 files.

Reviewing the Generated App1:46

,881 additions over 300 files. And to my surprise the project actually ran and had zero test failures. Now, initially it was riddled with small YoloBox so I allowed myself one iteration in interactive session to clean up the sloppiness and now let's briefly take a look at the result. We start out with a pretty basic landing page and if you go on to discover restaurants we can see our demo restaurant that got seeded in here.

restaurants we can see our demo restaurant that got seeded in here. We can go to the menu and if we start to browse the menu we can see this is actually a decent interface, we can add things to the cart, we can add notes, add this to the cart, we can see our notes appear, we can say more less, we can remove things from the cart, this is actually working pretty fine. Let's add a few more things to the cart, you can see the chicken wings have

actually working pretty fine. Let's add a few more things to the cart, you can see the chicken wings have modifiers so let's add them with honey garlic sauce, there we go and let's proceed to checkout. Let's say fake street, gents 10001, let's add a phone number, order notes and let's place the order, we have an order confirmation, now let's jump to the management section and in here we'll see our order number 11, we can see our order items, we'll

section and in here we'll see our order number 11, we can see our order items, we'll confirm the order, now if we go back to the webshop we'll see a notification appear and we can see that the order has been confirmed by demo restaurant and when we click through it we can track the order, we can see it got placed, now it's confirmed. Back in the management section we can go to the kitchen display, we'll see the order here,

Back in the management section we can go to the kitchen display, we'll see the order here, we can say start preparing, back on the webshop we'll see it moved to preparing and if you take a look at the network inspector it's doing like some polling for the notification so it's not real time, it's not using web sockets which I would definitely use in this situation. If you mark the order as ready, we can see there's a visual glitch, we need to

situation. If you mark the order as ready, we can see there's a visual glitch, we need to refresh and then it's gone. And now we can see the order is marked ready and going back to the orders we can mark it as delivered as well and we'll see the order status updates. This entire flow was actually not half bad, it was actually pretty decent. We can see there are a few settings, we can change, we can change the branding, we have

Testing Admin Settings3:53

We can see there are a few settings, we can change, we can change the branding, we have this kitchen display, we have delivery zones, we have operating hours, we can add a time slot for example from 9am to 11am, let's try to add an overlapping one, let's say from 10 to 11, would that work? This works, so this is actually kind of weird, this is something that I probably wouldn't have allowed, because we have like overlapping hours which is kind of weird,

probably wouldn't have allowed, because we have like overlapping hours which is kind of weird, then under general we can manage a few general things, we have a cuisine type, we can set a stripe key, SK tests 1 to 3, 1 to 3, it got saved, now I'm actually very curious to see in the database if it encrypted these values or if it just stored a plaintext version of my secret, let's take a look at our tenants and in here, I'm actually pleasantly surprised

secret, let's take a look at our tenants and in here, I'm actually pleasantly surprised because a stripe secret and a webhook secret got encrypted and the plaintext values didn't get stored in the database which I kind of expected the model to do, so color me surprised here, if you go manage the menu you can see we can add items, let's add an item, test 1 to 3, 1 to 3, create that works, we can delete them, delete that works, let's add

1 to 3, 1 to 3, create that works, we can delete them, delete that works, let's add some modifiers, size, let's say small, large, that also seems to work, let's see if it propag ates to the webshop, all right it does, we didn't add a price I think, so let's edit and add a price, let's say $2 for the large one, refresh, okay we can add it to the cart, say large, very nice, this is actually all working pretty well, now let's briefly glance over

Surveying Pull Requests5:38

large, very nice, this is actually all working pretty well, now let's briefly glance over the pull requests, we have our database setup, authentication, menu management, order management, we have our webshop, we have cart management, checkout flow, order tracking, business settings, staff management, which is an interesting one, analytics and reporting, let's take a look at analytics and reporting for a bit, we have analytics here, all right we

take a look at analytics and reporting for a bit, we have analytics here, all right we can see some revenue, we have some stats, this is looking pretty cool, we have the payment integrations, we have reviews and ratings, promotions and discount codes, customer accounts, kitchen display system, push notification, we have tenant branding, customization, m olly which is a European payment provider like Stripe, we have a restaurant discovery

Final Assessment and Wrap-Up6:19

olly which is a European payment provider like Stripe, we have a restaurant discovery which we saw in the beginning and then delivery zone postal code validation checkout which we saw an email notifications, now while the small demo looked impressive, would I ship this to production, I highly doubt it, just because there's no way for me to actually review 30,000 lines of code, but I've actually been pleasantly surprised with how well the project

lines of code, but I've actually been pleasantly surprised with how well the project held up even after 30 pull requests autonomously merged, I open sourced the entire project so you can browse through the PRs and see for yourself what the model produced, if you're interested in these kinds of experiments and Tropic just published a great blog post on harness engineering which I'll reference in the description,

post on harness engineering which I'll reference in the description, join me in the next and final lesson where we'll look beyond Ralph and do some agent orchestration, I'll see you there.

دوست دارید گاهی خبرهای Laracasts را ایمیل کنیم؟