📱

Get Our Mobile App

Take your business learning on the go!

Download on the App StoreGet it on Google Play

AI workflow для разработчика: как перестать получать мусор от нейросети и писать нормальный код

Просто о сложном. CutCode16:39

Transcription

Colleagues, I welcome you to the Catcode channel. Today we will again talk about AI Factory. The project already has 300 stars, and today we will talk about release 2.0. Yes, it would seem, how so? The first version of AI Factory has just been released, and here is 2.0 immediately. Yes, friends, artificial intelligence, rapid development, and also with major releases in AI Factory. But in reality, there is an interesting story here why this happened. Besides AI Factory, I want to address you again today, to communicate with you again, some small revelations about feedback, about the feedback from developers who have started interacting with AI Factory. Accordingly, in the process, I see questions: "Alya, what was the result?" Did AI Factory take into account all linters, did it add static analysis, how did it deal with N+1 problems, and so on. That is, what did AI Factory produce in terms of code quality. But, friends, here I want to address you. Before the advent of artificial intelligence, I was the creator of the Laravel developer community. And there was a situation with a huge number of, let's say, dummies. That is, 90% dummies who do not want to develop fundamentally, do not want to read documentation, only want to quickly pull methods and get funny pictures as a result. As soon as something doesn't work out, they are at a dead end, they stop, they don't know what to do next. And years passed, one, two, three, four, they still remained the same dummies. And because they ignored fundamental things, they stood still, did not develop. Such people, rich in time, ready to sacrifice an hour a day for their development, instead they are ready to spend their whole lives and not develop as specialists. The same thing we are now observing here with AI. A developer tries to find a silver bullet, install AI Factory, pull commands and get a debugged workflow and, accordingly, an ideal result. Without thinking too much, that everything will be done for them. This is the same dummy from the previous era before artificial intelligence, and he will have the same development.

Friends, the focus has changed. Now writing code is this 20% part. It is delegated to LLMs, it is automatic. We are in the role of architects, we deal with context. This is 70-80%. And for everything to be good, we need to provide quality context to the LLM and explain to the LLM what the success criterion is, what the correct output is, and only then do we get a quality result. In such a paradigm, even more effort is required from us. I am now actively immersing myself in the world of interaction with LLMs. And I can tell you one thing: before LLMs, I actively wrote code. I was a factory person. An incredible number of projects, incredible productivity. Yes, I was tired at the end of the day, but now, interacting with LLMs, I get tired 10 times more. And in general, I want to say that working with LLMs is not about speed, it's about opportunity. It's about the opportunity to devote more time to architecture, to get higher quality documentation, higher quality context, when everything is thought out, and, accordingly, you get a plus or minus deterministic result, despite the fact that you are working with an LLM, but even more effort, even more work to develop patterns, to change thinking, to change focus. And this is what I am actively doing now. It is very difficult, if you think that at some point you can sit in a chair and, say, tomorrow, the day after tomorrow, they will tell you in hiring: "That's it, now LLMs, now only LLMs, my friends." And you're like: "Well, okay, LLMs, LLMs." I'll download this agent, connect a subscription and be with everyone. You, friends, are mistaken. You will fall out of the process. Patterns are now being developed. The same thing happened in development. And we are moving along them, we are getting used to them. Our own workflow is being formed. In general, for developers, it seems to me, it is very difficult to get used to this new workflow. Why? Because to some extent, if we look from the outside, we as developers are practically the same LLM. We have a task at the input, we study it, possibly ask clarifying questions, ask some questions, and, accordingly, that's it. We immediately put our hands on the keyboard, let's type, let's generate the next token. We often, with experience, generate these tokens automatically, that we don't even know the next one. That is, just as linearly as an LLM. I think you will understand me, experienced developers. How we often read documentation and technical specifications, we quickly look at some key tokens that we need, so to speak, just like in Transformer's Self-Attention. That is, our attention quickly focuses on something that we consider important, and then we go to generate code. And often we miss the initial details, do something wrong, and then return to re-read more carefully. Does it remind you of anything? And, accordingly, when we immediately study the task and generate the implementation, it is very difficult for us to change our thinking, to understand that this part no longer belongs to us, it is delegated to the LLM, and we have a completely different world - context development. And at first, it all seems scary. You can say to a developer: "I never liked code reviews, it's not my thing at all." But I will tell you from my own experience, the brain starts to work differently. You see the whole project differently. You generally even look at the whole world a little differently. Your focus is already on details, the result turns out to be cool.

So, friends, regarding thinking and workflow. Yes, AI Factory, I believe, is not the first step into development with LLMs. You need to first understand how they are structured. But the second or third step will inevitably be a workflow and approach based on specifications, as implemented here. We are now observing the AI Factory landing page. I made it with MCP in literally 2 minutes in CodeX. The layout and design itself took me a total of 10 minutes, but I spent several days thinking about the context, what exactly would be here, what blocks. Pay attention to this. What do we get on the landing page? I really like how it explains what kind of tool is in front of us, how to interact with it, what it generates, what we get from it. Accordingly, each step is described here: planning, execution, improvement, quality check. What is especially important, pay attention, the planning section is critically important, and this part falls on you, and the result you expect depends on it. Accordingly, the workflow only helps you to go step by step correctly, not to forget any step. And if you already have a certain technical specification, you can decompose it with some skills. For example, AI Roadmap will help you decompose a huge technical specification into small tasks, small features. As a result, behind AI Factory, there is a layer of research, architectural design, and necessary context, which will then be decomposed, then go into the plan, into improving the plan, into implementation, into checking the implementation, and then into fixes, into commits. Accordingly, somewhere here there will be a loop, somewhere ideally, several LLMs should be used. For example, I work like this now. LLM with Opus is responsible for implementation. CodeX checks my work, looks for problems, and accordingly improves the plan. And you can also try to work in this approach. And you will see that after the LLM reports that everything is okay, an additional review will find a number of problems. And it will be several iterations. It will find a problem, then find another problem, fix it, then something new will come up, again it needs to be fixed. How many iterations are unknown until the Reviewer no longer finds any problems. Okay, there were revelations, we looked at the landing page. There are comparisons, work without a workflow, and, accordingly, through a workflow with AI Factory, answers to questions, what features, what agents are supported, and so on. Be sure to check it out. On this landing page, you will find answers to many questions, the link will be in the description.

Now let's quickly go through the AI Factory releases. We will not delve into interesting innovations today, but perhaps, if you ask me in the comments, we will consider something from this in more detail. Why, in fact, release 2.0, and not 1.10? The fact is that initially I made AI Factory for myself, exclusively for myself. For the most part, I continue to make it for myself, and I only made it for Claude. Claude, unlike other agents, Claude-Code, I mean, is quite smart. It doesn't matter to him in which directories the skills are located, what their naming is. He scans everything in the Skills directory, collects the metadata of each skill, and interacts with it by name. Accordingly, it was beautiful. In the first stage, I made AI deface Factory, dot, then Fix Plan, and so on. But it was not according to the specification. The specification dictates that the skill name must match the directory name and no dots. Accordingly, I was forced, in order to add support for more agents, to make a major release. A major release means that all skills are implemented according to the specification. They have a short prefix AI, no dot. And since I came to release 2.0, I decided to rethink many approaches. I made internal validation tests. These validation tests can, in principle, be applied outside of AI Factory. I even thought of making a separate package out of it. Their essence is that they check skills not only for the specification, but also for how much meta and, accordingly, content is under the token. Thus, after passing all validations, I optimized each skill. Each skill does not exceed 500 tokens. There is an optimization of three to four times. And, accordingly, for those who already use the first version, there is an upgrade script right out of the box, which will perfectly update the first version to the second. Just one command, and you will get the new structure. Well, and, accordingly, in the process, I improved the installation and documentation. Plus, accordingly, a new skill AI Roadmap appeared, to create your roadmap, or to decompose a large task, to add rules and restrictions that will go to the LLM, so that it does not repeat the same problems. And we saw AI Loop when we did a battle between Opus, GPT, and Quen. AF loop was used there so that the result would be as cool as possible, everything runs in a loop. There is plan creation, there is a sub-agent that criticizes the plan, the next one performs the implementation, it is checked. And so in a circle until the goal is achieved, that is, the success criterion also necessarily comes into this loop. What exactly should we get in terms of quality? according to unit, integration, end-to-end tests, accordingly static analysis and everything else. This was an interesting release.

Further in 2.1, something was improved, something was added in the process. I will not talk about it now, but support for some agents is constantly being added. And in 2.1, a new skill Grounded also appeared. A grounded skill. A very cool skill, what it is. Those who have been working with LLMs for a long time know that the LLM itself, when generating tokens, works linearly, it generates tokens sequentially. And most importantly, it doesn't know itself if its result is correct or not. That is, if you tell the LLM, write a prompt: "Don't fantasize," offer only verified, correct results, all this is bullshit, guys. The LLM doesn't know about this in the process. You won't achieve this in one iteration. Accordingly, Grounded works differently. Everything that the LLM does, it re-checks each step subsequently and creates an evaluation system. And only those decisions that score 100 points pass. Accordingly, the rest will be skipped, and in the end, you will see what was skipped, based on what sources, and what was accepted, and also based on what sources. An excellent skill if you are concerned about such a result. It's not just about code implementation. You can use this skill to test a theory, discuss an idea. In general, you can use it. I think you will like it.

The next release is 2.2. We see it's a big release. And mainly it introduced an extension system. A very cool extension system. Now, thanks to the extension system, you can write your own plugins that can add your own MCP configurations, add your own skills, supplement the boxed skills, or rewrite them. In general, many possibilities. And a section on community extensions has been added to the documentation. There are already two extensions, in fact, there are more, but not all are added to the documentation yet. And you, if you create an extension, you can also offer a pull request, and I will add interesting extensions here. A cool feature.

Further, in 2.2, the deploy skill was removed. It was a trash skill that was generated by an LLM, and it had not yet acquired knowledge of the context and, accordingly, developer experience. And such skills have no value. The LLM generated it anyway. It is trained on this knowledge, and it will generate the same thing in the process without this skill.

Next, Playwright MCP was added to the box. I use it too often. For web development, I see no way to do without this MCP, so it's in the box. Well, and as always, small updates. I constantly interact with AI Factory and find something for myself, for example, to split commits by logic, and not shove everything into one, I improve the implementation flow, and so on. And at the time of filming this video, our latest release is 2.3. The extension system is still being developed, and a new skill AI Explore has been added. A cool skill, I have already tested it. Using this skill, you can go through the full path from idea. You will be asked a series of questions, and in the end, you will get a complete plan, which you will simply send and start implementation. That is, when I showed you the workflow from the landing page, this planning part was entirely on your side, gradually it is being added, and AI Factory already has Grounded, we already have Explore. Accordingly, to some extent, this part can also be outsourced, friends.

Also, an important point. AI Factory is like a skeleton. It's like a framework for your workflow, for basic needs. But this does not mean that it will be suitable for every project. In some large projects, where you are already interacting, you will most likely have your own AI Factory, but you will also work according to the SPC Driven approach. It will most likely not be as lightweight. At the design level, you will have a huge amount of additional context, diagrams, C4, and so on. All within your rules. But the main idea of SPC Driven will most likely be preserved. And now, as we are all just getting into it, adapting, it is very important to focus and develop these patterns in ourselves, to come to the correct behavior. And this tool will be ideal for you.

Friends, here is such a video. I've wanted to record it for a long time with an update. version 2.0. And at the same time, a few revelations for you, as usual. That's all. Thank you for watching. I hope for your like. I thank you for this. And, accordingly, it would be cool if you write a comment about what you would like to see in more detail from the skills that are being added to AI Factory. I will try to answer such questions, as I see that it is still very difficult for you to adapt to such approaches. That's all. Friends, thank you for watching. See you in the next video on the Catcode channel.