Latest / AI Fire Daily / #11 Alex: [Claude AI Mastery Playbook] Lesson 9: The 5-File System for Better Claude Code Workflows
Transcript
- 0:00Imagine you are managing a software development
- 0:03team, and you've just brought on the most brilliant
- 0:07lightning -fast coder on the planet. OK, sounds
- 0:12pretty good so far. Right. I mean, I am talking
- 0:14about someone who can write hundreds of lines
- 0:16of perfectly formatted code in seconds. They
- 0:19understand every framework, every language. Oh,
- 0:22wow. Yeah, but there is one ridiculous massive
- 0:26catch. I have a feeling this coder isn't going
- 0:28to be, you know, winning employee of the month.
- 0:30Definitely not because every single time this
- 0:33developer goes to sleep, they suffer from total
- 0:36complete amnesia. Oh man. You walk into the office
- 0:39the next morning and you literally have to re
- 0:41-explain the entire project from scratch. You
- 0:43have to explain like who the target audience
- 0:45is, what language you're coding in and what they
- 0:48just finished building yesterday. That sounds
- 0:49exhausting. It is. You would essentially be living
- 0:52in some weird corporate coding version of the
- 0:55movie 50 First Dates. Right. Which means you
- 0:57would spend significantly more time managing
- 0:59the developer's memory than you would actually
- 1:02building the software. Exactly. And welcome to
- 1:05this deep dive, where that is exactly the frustration
- 1:08we are tackling for you today. It's a big one.
- 1:10It really is. Our mission today revolves around
- 1:13extracting some incredibly practical insights
- 1:16from a chapter called Lesson 9, the five -file
- 1:19system for better Claude code workflows. Right,
- 1:22from the Claude AI Mastery Playbook. Yeah, that's
- 1:25the one. It is a fascinating piece of source
- 1:27material because it addresses a wall that, frankly,
- 1:30almost everyone hits. Yep. We are all trying
- 1:33to integrate these advanced AI coding assistants
- 1:36into our workflows. But as soon as a project
- 1:39scales beyond a quick one -hour sandbox session.
- 1:43The AI just seems to completely lose the plot.
- 1:45Exactly. It just falls apart. So our goal for
- 1:48you listening today is to uncover how to give
- 1:50an AI coding assistant a permanent project memory.
- 1:54We want to look at the blueprint for turning
- 1:55that chaotic, forgetful assistant into a reliable
- 1:5824 -7 teammate. So you can actually build larger
- 2:01apps without starting from absolute zero every
- 2:04time you open your laptop. Yes. But, okay, let's
- 2:07unpack this. Before we try to fix the AI's workflow,
- 2:10we really have to understand the mechanics of
- 2:13this amnesia. Like, what is actually breaking
- 2:15down when a project lasts more than a single
- 2:18session? Well, what's fascinating here is that
- 2:20the breakdown usually isn't a massive spectacular
- 2:23crash where the AI just, like, refuses to work.
- 2:27Right, it's not throwing big red error codes.
- 2:29No, not at all. It is much more insidious. It
- 2:32shows up in these... small compounding errors.
- 2:36OK, like what? For example, you might ask Claude
- 2:39to move on to the next feature and suddenly it
- 2:41starts rewriting a navigation bar that you both
- 2:43spent three hours perfecting yesterday. Oh, because
- 2:46it just completely lost the context that the
- 2:48navigation bar was already finished. Exactly.
- 2:50And the downstream effect is even worse. Instead
- 2:53of updating an existing file, the AI might hallucinate
- 2:56a completely new file with like a slightly different
- 2:58name. Oh, I hate that. Right. And it just starts
- 3:01writing duplicate code in there. or, perhaps
- 3:04the most dangerous symptom, it starts ignoring
- 3:06your architectural boundaries. Wait, what do
- 3:08you mean by that? Well, if you agreed on a simple,
- 3:11lightweight design on Tuesday, by Wednesday,
- 3:14the AI might completely forget those constraints.
- 3:17It might start trying to build a massive, complex,
- 3:20back -end infrastructure that you never asked
- 3:22for and definitely don't need. I know my default
- 3:24human instinct here, and I am totally guilty
- 3:26of this, by the way, is to just write a much
- 3:29longer chat prompt. Oh, yeah. We all do that.
- 3:31Right. I find myself typing things like, hey,
- 3:34remember, we are building this specific app.
- 3:37Here are all the rules. Here's the folder structure.
- 3:39Please do not change the navigation bar. I just
- 3:42try to shove all that context into the chat box
- 3:44before asking for the next piece of code. Which,
- 3:46I mean, it feels logical. It feels like it should
- 3:49work. But the source text explicitly warns that
- 3:53relying on the chat prompt is a losing battle.
- 3:55Because it just forgets. Yeah. The chat window
- 3:58is transient. As you talk to the AI, you are
- 4:01constantly eating up its context window. That's
- 4:04the amount of text it can keep in its active
- 4:06memory. Oh, I see. So older instructions literally
- 4:09get pushed out to make room for the new conversation.
- 4:11So eventually, the AI just drops the thread entirely.
- 4:15Precisely. The project needs its own memory.
- 4:17And that memory needs to be stored physically
- 4:20inside the project folder itself. Totally independent
- 4:24of your chat history. So we have to take the
- 4:26burden of memory out of the chat box and put
- 4:28it into the code base itself? Yeah, you basically
- 4:30have to treat your project folder like an operating
- 4:32manual. An operating manual, okay. Think of it
- 4:35as a physical clipboard that you leave on the
- 4:37desk for our Amnesiac developer. Before they
- 4:40are allowed to write a single line of code, they
- 4:43are required to pick up that clipboard, read
- 4:46the manual, and orient themselves. That makes
- 4:48a lot of sense. Because the AI can physically
- 4:51inspect files in your folder at any time? If
- 4:54it gets confused, the solution isn't to yell
- 4:56at it in a longer prompt. The solution is to
- 4:59improve the files on that clipboard. Which brings
- 5:02us to what this operating manual actually looks
- 5:04like. The source outlines a highly specific five
- 5:07-file Markdown system. And the fact that there
- 5:11are Markdown files is actually crucial to how
- 5:13large language models process information. Because
- 5:15of the formatting. Exactly. Markdown provides
- 5:18structural hierarchy. When an LLM reads a markdown
- 5:22file, it assigns different token weights to headers,
- 5:26bullet points, and bold text. Oh, interesting.
- 5:28Yeah, it understands the architecture of your
- 5:30thoughts much better than if you just dumped
- 5:32a massive wall of plain text into a prompt. Okay,
- 5:35that makes a ton of sense. So let's look at the
- 5:37structure of these files for you listening. The
- 5:39source breaks this down into a very deliberate
- 5:42architecture. Very deliberate. First... There
- 5:45is the prd .md, the project requirements document,
- 5:49which acts as the long -term compass. It tells
- 5:52the AI what the app is, who the target users
- 5:55are, and what the core features are. Big picture
- 5:58stuff. Exactly. Second, you have planning .md.
- 6:01These are the technical guardrails. Like the
- 6:04languages being used? Yep. Languages, folder
- 6:06structure, the tools allowed, all of that. Right.
- 6:09Third is TasksS .md, which is essentially the
- 6:12AI's short -term working memory. It's a literal
- 6:15checklist. Right. A checklist of small, specific
- 6:18next steps showing what is done and what is pending.
- 6:22And fourth is the session underscore log .mtld.
- 6:26which is like the ship's captain log. I like
- 6:29that analogy. It's a record of the date, the
- 6:31goal of the current session, the files changed,
- 6:34and the next steps for whoever picks up the project
- 6:36next. Those four files essentially create a complete
- 6:39enclosed ecosystem of context. But wait, hold
- 6:42on. PRDs? task lists, session logs. I mean, software
- 6:47engineers have been using variations of these
- 6:49files since the 1990s. Oh, easily. This is literally
- 6:52just standard Agile project management. So I
- 6:54have to challenge this a bit. These just sound
- 6:56like standard developer tracking files. Why is
- 6:59this being touted as an AI mastery secret? It
- 7:01feels a bit overblown. That is a completely fair
- 7:04pushback. This raises an important question,
- 7:06though. Those four files... in isolation are
- 7:09just standard project management. They're completely
- 7:11inert. They do nothing unless someone actually
- 7:13reads them. And an AI, by default, is not going
- 7:16to go poking around your folder reading documentation
- 7:19unless you force it to. OK, so how do we force
- 7:21it? Well, the magic of this entire system hinges
- 7:23entirely on the fifth file. The fifth file? ClaudeE
- 7:27.md. OK, so how does this one single file change
- 7:30the game? The source issues a massive warning
- 7:33here, which is, do not treat all five files as
- 7:37equal. Claude .md is the master control switch.
- 7:40Why that specific name? Because the Claude code
- 7:43tool is literally programmed to automatically
- 7:45look for and read a file named Claude .md the
- 7:50moment it starts working inside your project
- 7:52folder. So it has this inherent hard -coded gravity
- 7:55to it. It's the one file the AI actively seeks
- 7:58out on its own startup sequence. Yes. So your
- 8:00Claude .md file must contain the explicit Non
- 8:04-negotiable rule commanding Claude to read the
- 8:06other four files. The PRD, the planning, the
- 8:09tasks, the session log. Exactly. It has to read
- 8:12them before it is allowed to start any implementation
- 8:14work. So Claude .md is basically the air traffic
- 8:17controller. I love that. The AI tries to land
- 8:19a new piece of code, but the controller forces
- 8:22it into a holding pattern and says, nope, you
- 8:24have to read the flight manual first. That is
- 8:26a perfect way to visualize it. Without Claude
- 8:29.md acting as the controller, the AI will just
- 8:32ignore all those beautiful planning files you
- 8:34made. And the Amnesiac developer just starts
- 8:36typing randomly again based on whatever you put
- 8:38in the chat prompt. Exactly. Claude .md is what
- 8:42transforms passive documentation into an active,
- 8:46enforced project memory. It essentially forces
- 8:48the AI into a specific behavior loop. Which is
- 8:52what? Inspect the folder, read the logs, show
- 8:55me a plan, and only then... Do your job. I love
- 8:58that. The architecture makes total sense now.
- 9:00But when we transition from theory to practice...
- 9:04How is this actually applied? Right, the actual
- 9:06execution. Because the source walks us through
- 9:08building a specific test project inside VS Code
- 9:11to demonstrate the system. And this is where
- 9:13I have another major question. OK, let's hear
- 9:15it. The app they choose to build is a health
- 9:17care appointment and wellness demo. A very specific
- 9:20use case. And a wildly basic one in terms of
- 9:22scope. It has just three sections, appointment
- 9:25booking, some health notes, and a consultation
- 9:27message form. Very lightweight. Right. But here's
- 9:29where it gets really interesting. What caught
- 9:32my eye is the absolute insistence on the tech
- 9:35stack. The source explicitly mandates using only
- 9:38HTML, CSS, JavaScript, and local storage to save
- 9:41the data directly in the browser. Right. Very
- 9:44constrained. Extremely. No backend server, no
- 9:46real medical advice, no login authentication,
- 9:49and Absolutely no database. None at all. If our
- 9:52goal for the listener today is to master AI coding
- 9:55and turn this tool into a powerhouse teammate,
- 9:59shouldn't we take the training wheels off? Like,
- 10:01shouldn't we let the AI build a complex backend
- 10:04and a database to really test the limits of this
- 10:07memory system? You would think so, right? Yeah.
- 10:09But if we connect this to the bigger picture,
- 10:11understanding why those constraints are vital
- 10:14requires looking at how AI models actually behave
- 10:17when they're given too much freedom. OK, how
- 10:18do they behave? You are touching on the very
- 10:20real danger of AI over -enthusiasm. Over -enthusiasm.
- 10:24Yeah. AI coding assistants are designed to be
- 10:26immensely helpful. If you don't strictly define
- 10:29your planning .md to limit the scope, Claude
- 10:33might take your simple request for a health app
- 10:35demo and decide it needs to be an enterprise
- 10:37-grade platform. Oh, wow. So it will just assume
- 10:39you want a massive infrastructure for a three
- 10:41-page app. Exactly. Suddenly, it is writing authentication
- 10:45flows, setting up cloud databases, building complex
- 10:49routing logic. Things nobody asked for. Things
- 10:51nobody asked for, things that eat up massive
- 10:54amounts of its context window, and most importantly,
- 10:57things that you are now responsible for managing.
- 10:59That sounds like a nightmare. The source has
- 11:02a fantastic quote that perfectly captures this
- 11:04risk, actually. It says, big tasks are where
- 11:07chaos starts wearing a nice jacket. Chaos wearing
- 11:09a nice jacket. Oh, that is so good because it
- 11:12looks incredibly professional, right? It looks
- 11:14like a lot of hard work is being done, but it
- 11:16is actually completely unmanageable for you the
- 11:19user and it becomes unmanageable specifically
- 11:22because of the review process when the AI generates
- 11:25a massive amount of complex back -end code all
- 11:28at once you the human user lose the ability to
- 11:33easily verify it. Right. You can't just glance
- 11:35at it. Exactly. The reason the source forces
- 11:38you to keep tasks incredibly small and strictly
- 11:40front -end, just HTML, CSS, and JS, is so the
- 11:43AI's output is actually human reviewable. Ah,
- 11:46and that's why they emphasize local storage.
- 11:49Because it saves data right in the browser, you
- 11:51don't have to spin up a server or migrate a database
- 11:53just to see if the AI's code actually worked.
- 11:57Spot on. You can read a small chunk of JavaScript,
- 11:59understand the logic, open the file in your browser,
- 12:02and immediately see the visual feedback. Right.
- 12:04But if you ask it to build a sprawling backend
- 12:06in one go, you can't just look at a screen to
- 12:08see if the database routing is secure. At that
- 12:11point, you're no longer managing the AI. You're
- 12:13just a passenger hoping the AI knows how to drive.
- 12:16Wow. OK. So you are basically building the muscle
- 12:19of managing the AI's memory and workflow on a
- 12:22small contained problem before you ask it to
- 12:25lift heavy weights. OK, so I've written my air
- 12:27traffic controller file. The boundaries are set.
- 12:29The scope is tight. When I actually open VS code
- 12:32and ask it to build a feature, how do I know
- 12:34it's not just ignoring the controller? How is
- 12:37this workflow actually enforced in real time?
- 12:40So this is where the source details a highly
- 12:42structured master pumped workflow. You don't
- 12:46just say, hey, build the booking feature. OK,
- 12:47what do you say? Inside the Claude code extension,
- 12:50before writing any implementation code, Claude
- 12:52is instructed to do a sequence of specific checks.
- 12:55Like a pre -flight checklist. Exactly. Yeah.
- 12:57It has to briefly explain the app to prove, actually
- 13:00read the PRD .md. It has to pick one unchecked
- 13:04task from taskassess .md. Okay, proving it read
- 13:07the files. Right. then it must list the exact
- 13:10files it plans to create or modify. It has to
- 13:12flag any technical risks. And then, this is the
- 13:14critical part, it must wait for your approval.
- 13:17So, it forces a pause. It is not allowed to just
- 13:20run off and start generating files. You are actively
- 13:23acting as the gatekeeper. You have to approve
- 13:25the plan before a single line of code is written.
- 13:29If Claude suggests adding a React framework or
- 13:32a database during that planning phase because
- 13:34it got over -enthusiastic... You catch it. You
- 13:36catch it in the planning phase and correct the
- 13:38scope before it pollutes your code base. So what
- 13:41does this all mean for the actual coding phase?
- 13:45Let's say you hit approve and the AI writes the
- 13:47code. How do you verify it didn't sneak in some
- 13:51of that chaos in a nice jacket? That's the next
- 13:53big hurdle. The source points out this brilliant
- 13:56visual safety net for this inside VS code, the
- 14:00source control panel. The source control panel
- 14:02is your absolute best friend when working with
- 14:04AI. Usually people think of source control, the
- 14:07git diff view, just as a place to commit changes
- 14:10to a repository. It's a basic version control.
- 14:13Right, but the source frames it as your, what
- 14:15just happened, safety net. Can you explain how
- 14:17that visual check actually saves you here? Well,
- 14:20when AI finishes generating code, it will often
- 14:23tell you it only did exactly what you asked.
- 14:25I updated the button color, boss. Right. But
- 14:27LLMs can hallucinate edits. You might have asked
- 14:30it to update the color of a button in your index
- 14:33.html file. But when you look at the source control
- 14:35panel, you see a list of every single file that
- 14:38has been modified since your last commit. Oh,
- 14:41so it's a paper trail. Exactly. If you see that
- 14:44it also magically modified your CSS file and
- 14:48completely rewrote a JavaScript function you
- 14:50didn't ask it to touch, you catch it immediately.
- 14:53You literally see the red lines where it deleted
- 14:55your good code and the green lines where it added
- 14:58un -compted code. Which prevents you from discovering
- 15:00weird cascading bugs three steps later because
- 15:04the AI just went rogue in the background. You
- 15:06catch the hallucination the second it happens,
- 15:08revert the file, and correct the AI. That visual
- 15:10check is such a practical tip, but even if the
- 15:13code is perfect and the source control panel
- 15:15looks entirely clean, the workflow isn't over.
- 15:18Not at all. A massive common mistake the source
- 15:20highlights is letting Claude finish a task, saying,
- 15:23looks great, and just moving on to the next feature.
- 15:26Because if you do that, the amnesia creeps right
- 15:28back in. The code base has changed, but the operating
- 15:32manual hasn't. Right, you have to enforce a strict
- 15:35post -task routine. You absolutely must force
- 15:37the AI, or do it yourself, to go into tasks .md
- 15:41and check off the item it just completed. Mark
- 15:43it as done. Yes. And then it must open session.
- 15:49and record exactly what changed, what bugs were
- 15:52encountered, and what the immediate next steps
- 15:54are. Because if you don't... If you don't make
- 15:56it update its own memory files, your documentation
- 15:59becomes outdated immediately, and the entire
- 16:02file system collapses. It's like our brilliant
- 16:06Amnesiac developer doing a great job all day,
- 16:08but completely forgetting to write down what
- 16:11they accomplished in the manual before they go
- 16:12to sleep. The next morning, the manual is wrong,
- 16:16and they are completely... lost again. And this
- 16:18leads to the ultimate test of the whole system.
- 16:20The source suggests doing a very specific test
- 16:23to prove your project memory is actually working.
- 16:25Okay, what's the test? Once a task is done and
- 16:28the logs are updated, you type slash clear into
- 16:30the cloud code extension. Wait, which wipes the
- 16:32active chat history completely? You are intentionally
- 16:35giving the AI amnesia to test the system. Yes.
- 16:39Alternatively, you can completely close VS code
- 16:42and reopen the project to simulate starting a
- 16:45new workday. Okay, so the chat is totally blank.
- 16:48The contest window is completely empty. And then
- 16:51you simply ask the AI. What should we do next
- 16:54in this project? That is a tense moment. That
- 16:58is the moment of truth right there It really
- 17:00is because if the system failed the AI will essentially
- 17:03ask what project who are you? What are we building
- 17:06right the 50 first dates problem exactly? But
- 17:08if your system is a success Claude will automatically
- 17:11read the Claude MD controller file that file
- 17:15will force it to read the PRD the planning rules,
- 17:19the task checklist, and the session log. It re
- 17:21-reads the clipboard? Yes. It will process all
- 17:23that local folder memory, piece together the
- 17:26current state of the app, and it will give you
- 17:28the exact right answer about the next task without
- 17:30you needing to re -explain a single thing. It
- 17:33is incredible. It really is like building an
- 17:35artificial long -term memory for your project
- 17:37separate from the model's inherent limitations.
- 17:40It's a game changer. So let's recap this journey
- 17:42we have been on today for you listening. We started
- 17:45with an amnesiac AI that was chaotic, forgetful,
- 17:49and frankly frustrating to manage on any project
- 17:52that lasted more than a day. We've all been there.
- 17:54And we have looked at how to transform it into
- 17:56a reliable partner by deploying a five -file
- 17:59project memory system right inside the local
- 18:02folder. We saw how clawd .md acts as the master
- 18:07air traffic controller. routing the AI's attention
- 18:10and forcing it to read its own instructions before
- 18:13it writes any code. And we also explored the
- 18:15mechanics of keeping the project scope incredibly
- 18:17tight and front -end focused early on. We really
- 18:20want to avoid chaos wearing a nice jacket by
- 18:23ensuring every piece of AI -generated code is
- 18:25visually human -reviewable. Right, in the browser
- 18:28and in the source control panel. Exactly. The
- 18:29real value for you listening is how this fundamentally
- 18:32shifts your workflow. You stop treating AI like
- 18:34a slot machine. Oh, where you just keep pulling
- 18:36the prompt lever. Yeah, tweaking your words,
- 18:39hoping for good code to pop out. Instead, you
- 18:41start treating it like a junior developer, a
- 18:43teammate who actually reads the project brief,
- 18:46checks the to -do list, and meticulously updates
- 18:49the logs before logging off for the day. It is
- 18:52about building rigid structure around the raw
- 18:54intelligence of the model. And that actually
- 18:57brings me to a final slightly provocative thought
- 19:00I want to leave you with, building on everything
- 19:02we've pulled from this source today. OK, let's
- 19:04hear it. Think about the mechanics of what we
- 19:07just discussed. We are training an AI to successfully
- 19:10read its own project requirements, track its
- 19:12own checklists, and write its own session history
- 19:15simply by parsing and updating markdown files.
- 19:18It is essentially managing its own state. Exactly.
- 19:21So if an AI can effectively manage its own memory
- 19:24and task lists using the simple five -file framework,
- 19:27How long until we see AI agents independently
- 19:30creating and managing these five file memory
- 19:33systems for other AI agents? Oh, wow. That is
- 19:35a wild thought. Because right now, we are the
- 19:37ones writing the PRD and setting up the folders.
- 19:40Right now, we are the project managers. But imagine
- 19:43an architect AI whose only job is to interview
- 19:46you, write the prd .md, define the technical
- 19:49stack in planning .md, and write the cluddy .md
- 19:54controller file. And then it just hands it off.
- 19:56Exactly. It just hands that entire folder over
- 19:59to a builder AI who executes it. We are using
- 20:02markdown files to bridge the memory gap right
- 20:05now, but eventually this framework might completely
- 20:08remove the human project manager from the loop
- 20:10entirely. Just AI. managing AI. It makes you
- 20:13wonder, if your AI teammates no longer suffer
- 20:16from amnesia and they start writing their own
- 20:18operating manuals for each other, who is really
- 20:21managing who? The transition from AI as a tool
- 20:24to AI as an autonomous project management ecosystem,
- 20:27I think honestly we will be seeing experiments
- 20:29with that much sooner than people realize. I
- 20:31think you are right, but for now at least you
- 20:33have the tools to stop playing 51st dates with
- 20:36your own code base. Give the five -file system
- 20:38a try and just make sure you leave the clipboard
- 20:40on the desk before you clock out.