Every time you open up a new conversation with an agent you have to like fill its mind with all the product decisions that you've made over the last however many months you've been working on this particular product and this is a real pain and I have a solution for you but it might not be what you're thinking. You don't want to just have to repeat yourself every single time and you also don't want to load up the agent's contacts by filling up your agent's MD or whatever. There's a much better and actually traditional software way to make all of this work. This is better with Kent where you and I learn durable skills together to get better and today we're going to make your agent more autonomous and make the right product decisions because you're going to help it and guide it in a progressively disclosed way. So here's the problem. You have this conversation with an agent and it's a product decision. You're saying okay like we have these different directions that we could go. Maybe you're being told by your manager what that product decision actually should be and now you're just thinking about okay how do I turn that into an implementation that is going to be a good system with good primitives and everything. So you're making these decisions about like how you use the infrastructure that you have and living within the constraints you have all of that and you finally implement it and you're good and you're happy with that. The customer is happy. Everybody's good and then you move on and eventually you come back to that area of the product and there were a lot of decisions that were made about this part of the system and that all lives in this old chat and if you're like me you have a lot of chats and you can definitely ask the agent to try and find it for you but most of the time you're not going to and so you open up a fresh agent and now it has no idea why certain decisions were necessarily made and maybe the previous agent put some comments in different places but I don't know that I want to necessarily rely on that as like a durable thing or a durable pattern that every agent is going to do and so what happens is now you are the memory like you have to remember all those product decisions and you have to remind the agent with every single one of them and that's a huge pain. You don't want to have to do that and so the solution to this is really a very old one and it comes with these decision records or architectural decision records or decision documents you might have heard them called that as well but it's ADR is the the common term for this and you put it in the repo and you point the agent to it and that is going to help you guide the agent where it should go for the decisions that you've made on certain architectural things and these aren't like set in stone or anything these are things that can change and evolve over time but it at least gives your agent a good starting place so that is an ADR architectural decision record so the the things that should be inside of an ADR are like the context kind of why now what we're choosing the decision and then the consequences of that decision and what we're going to what would make us revisit this decision in the future and I've been doing this for a really long time I actually did this with the epic stack with decision documents and I stole this idea from the remix team and they got it from somewhere else but this decision record idea is tail as old as time and it works very effectively with steering your agents to kind of help them know the decisions you've already made so that they're not trying to re-decide those or ask you this question again or or just heaven forbid plow forward in that direction when you absolutely do not want to go a certain direction so I have a template for you actually so this is what a basic decision record looks like it's going to have a number there will be a short decision title what we're saying no to most of the time that's what your decision should be is like we were going to do this and we're definitely not going to do that now the current status and the date you have the context the decision what was actually decided and the consequences along with a revisit if so if this circumstance changes then we need to revisit this decision and then you put this in your agents md so we've got this part right here decision records they're steering veto list open before proposing a new primitive or surface and it points to this and that describes exactly how this decision record thing works and so that it can make sure that it doesn't step over the toes of past decisions that you've made so what are the types of things that you have decision records about well it's not really about we use typescript like it's going to see that obviously you're using typescript you you might if you really just can't use python for some reason i don't know why but you could have a document that says we never use python um maybe i i can't even imagine a reason why but uh but it's not about that level of thing it's really about the um the sorts of things that you would expect an agent to actually do that would potentially be harmful for your product so you know i'm actually going to give you some very specific examples for what i have done in cody but it's like we explored using this feature of our infra provider and that's not going to fit for this reason so don't bother going down that path so it helps you save a lot of tokens and time and rehashing decisions that you already have so why don't i give you a couple of examples i had a conversation with a friend of mine named cameron who is a heavy user of cody we had a long zoom conversation and i provided all the details from the zoom conversation and i said okay like turn this into a list of recommendations and things that we should do as a result of this conversation we had together and it came up with a bunch of recommendations we went through some things and i had it save some adrs for that so one of them uh actually the first adr when i just started this with cody uh was no user facing package versioning or import pins so you don't need to know the specifics about this but this was a discussion that cameron and i had on the call and so we've got the the context right here the decision that was made no where history and different rollback are served by the packages get repo like different things like that and then here the consequences what is going to happen as a result of this and we're okay with these consequences and then we also have the another decision came out of this conversation as well so no we're not going to have a repo or package ci primitive for now so that was another thing we talked about is like maybe we have some sort of continuous integration um quadflare has this quadflare ci thing that can handle that and there's also like maybe we could integrate with depot or something like that was we talked about a lot of these things and i talked with this with the agent as well and ultimately decided we're not going to do this now maybe we could do this sometime in the future but for right now the coding agent is just going to run it themselves and they'll deploy it on cody and because it's personal software it doesn't necessarily need to have like a full-on ci process but we kind of leave room for that in the future and then i had another conversation with my friend darren and yet another long conversation i recorded the conversation and and so gave it to the agent and said okay let's discuss some of the things that were that darren is running into and and maybe there's some opportunities here and definitely actually did make a number of improvements to cody but also out of that came some adrs so we have one wait on skills over mcp serve skill content via packages so we talked about skills in cody and skills over mcp is a an evolving spec right now that will eventually probably make it into mcp and when that happens then maybe i will allow people inside of cody to be able to like publish skills in cody but not not currently we're not quite there yet and so here providing again the context the decision and why this decision was made and the consequences of that decision and then here's another one this was just kind of a late night thought that i had i want one off blocks of code that subscribe to events that aren't packages i think don't do it let's talk about it first so you don't always want the agent to just go off and do and here i was using grok 4.6 and it's very proactive which is really nice sometimes but kind of irritating other times and so i said don't do it don't do it let's just talk about it we had a conversation and ultimately i decided that we're going to push back on this we're not going to do this just yet everything is going to be in packages instead we're not going to have one-off kind of ephemeral code that subscribes to an event it just doesn't really match with the way that cody is and so instead we're going to just stick with the way that things are and so we again provide the context the decision that was actually made here and consequences to explain what is going to happen as a result of us making this particular decision and then here's another example and this one is kind of interesting so here i i was thinking about okay let's prune some primitives there are there primitives that we could just eliminate and simplify things drastically in cody because i'm getting ready for launch and i want to make sure that once we launch those primitives they're going to be very difficult to remove and so i just want to make sure we have the right primitives and you're always pruning those primitives you should be thinking about this all the time but here was one we have this where we had this concept of persistent services running inside of a durable object inside of codflare and so you can have a service that may be connected to discord for example and could handle that web socket and i tested it out a whole lot and it ended up like not being super reliable and so i just kept on going back to the agent and saying hey listen i'm pretty sure we should just get rid of this primitive i don't think that this primitive should exist because it's covered like it overlaps with other primitives that we have and the slice that is useful is not super reliable anyway and it kept on pushing back to me and saying no i actually think it is useful i had to keep going back and forth within and that's fine you actually should be going back and forth with it but if you don't have an adr for the reason that you decided in the first place to have this primitive or to not have this primitive then you're going to have to like battle it out all over again and so that's why i had it first of all remove the package service primitive that is gone and there are other ways to do what what you could do with that i for my discord integration i actually spin up a long-running server on fly that's just a proxy and it works great and cody can communicate through that fly proxy and i have no problems with that but yeah so we remove the primitive but along with that we have this adr no package service primitive we're getting rid of that and it could be in the future that like we get rid of some of these things these decision documents because like this is kind of like a regression test that verifies that a thing no longer exists in the document well like i wouldn't have thought that if you hadn't mentioned it but neither you mentioned it why not and so like this is why not you have the context and decision the consequences of it and so these are the sorts of things that you're going to write adrs for you have your agents write adrs for and you follow the template but it's easy to fall into this idea of like writing a diary like here's the things that i did this week or whatever so you don't want them to be about that they're not like essays that nobody opens or whatever you can put that somewhere like that could be a useful reference but the adr really should also not even be on every pr it's just when you're making a system level decision about like what direction we're going to go yes we're going to go in this direction we're not going to go in this direction because of these reasons and revisit this decision if these things change in the environment or whatever and that is your homework to start your decision document so just in your repo make a folder under docs decisions and make make a file there that has that template you can find that in the cody repo and then start with like the first three decisions like you've probably already made a bunch of decisions get a couple decisions in there to get some practice with the context and the decision and the consequences and the revisit if and once you have that in place then the agent will actually more naturally start doing that and of course you want to link this in the agents of d so they can find it and once you do then agents will proactively ask you if you want them to write an adr for whatever decision you just discussed and that's going to do it for today so this has been better with kent where you and i get better together by learning durable school skills that will make us better and i hope that you really enjoyed this one and if you did please like comment subscribe and share this with your friends so that more people can learn about adrs and how to make their agents more like autopilots thank you so much for watching this video and thank you for getting better with me