TL;DR
Every business owner using AI is making the same mistake. You open ChatGPT, type a prompt, get a response, and start over from scratch next time. No memory. No rules. No consistency. There is a better way.
Every business owner using AI is making the same mistake. You open ChatGPT, type a prompt, get a response, and start over from scratch next time.
No memory. No rules. No consistency. Every conversation is a blank slate, which means every conversation requires you to re-explain your business, your preferences, your constraints, and your standards.
This is like hiring a new employee every morning and firing them every night. Imagine doing that for 38 straight days while trying to build production software. You would never get past day three.
I call it the AI Operating System, and it starts with a single file: CLAUDE.md.
What CLAUDE.md Actually Is
CLAUDE.md is a plain text file that sits in the root of your project directory. When you start an AI coding session (I use Claude Code, Anthropic's CLI tool), the AI reads this file first, before you say a single word.
It contains everything the AI needs to know about you, your project, your standards, and your rules. It is not a prompt. It is an operating manual.
A prompt is a one-time instruction. An operating manual governs every interaction. Prompts are what people use with ChatGPT. Operating manuals are what gets products shipped.
Here is what mine contains, broken into sections with real examples from my actual file.
Section 1: Owner and Context
The first thing in my CLAUDE.md identifies who I am and sets the communication tone.
OWNER: Peter Xia, CPA. Fractional CFO, Meicho Consulting Inc. Content creator @CanadianCFO. Direct, no-BS. Call out scope creep. Practical over perfect.
Three lines. That is all it takes to calibrate the AI's communication style. Without these lines, the AI defaults to a generic, overly helpful tone that wastes time with pleasantries and options. With these lines, it is direct. It gives me one recommendation, not five. It flags scope creep instead of building extra features I did not ask for.
This is the first lesson of CLAUDE.md: the AI mirrors the personality you define. If your file says "be thorough and consider all options," you will get long, exploratory responses. If your file says "direct, no-BS," you will get concise, decisive responses. Define the tone you need, not the tone that sounds most professional.
Section 2: Tech Stack (Non-Negotiable)
My file specifies the exact framework, language, styling system, database, and hosting platform. Under each entry, a clear "DO NOT" list prevents the AI from suggesting alternatives, adding new frameworks, or building outside the defined scope.
Without this section, every new session is a negotiation. "Should we use React or Next.js?" "What about MongoDB for this feature?" "Have you considered Firebase for authentication?" The AI will happily explore every option with you. That exploration costs time and introduces inconsistency.
I learned this on day three. I asked the AI to add a database feature, and it suggested setting up a completely new database because "MongoDB might be a better fit for this use case." Four hours later, I had half a feature built on the wrong database. I scrapped everything and added the "DO NOT" list.
Lock your stack. Put it in the file. Never discuss it again. The AI should spend zero time on technology decisions and 100% of its time on building the thing you asked for.
Section 3: Code Standards
My file enforces specific coding patterns: file size limits, function length limits, API response formats, and icon rules.
These rules exist because I hit every failure mode early on, and writing rules was cheaper than repeating the same mistakes.
Without a file size limit, the AI keeps adding to a single file until you have 500 lines of tangled logic that nobody, including the AI, can reason about. I added a 150-line rule. Now it splits code automatically.
Inconsistent API responses are a silent killer. Some endpoints return one shape, others return something different. The ServiceResult pattern in my rules enforces a single format across every endpoint. Every API response works the same way, so debugging is predictable.
Dependency bloat is sneakier. "Let me install heroicons for this button." "Let me add react-icons." Each package adds weight and attack surface. My rule: inline SVGs only, zero icon packages. It sounds pedantic until you are not getting security advisories every week.
Section 4: Git Workflow
My file defines the branch structure, commit message format, and branching rules clearly. The core rule: never push directly to the production branch.
This section prevented at least five production incidents during my 38-day build. Without it, the AI would occasionally try to push directly to the production branch because it seems faster. With the rule in place, that cannot happen. The AI checks which branch it is on before making any change, every time.
The commit format rule is equally important for a different reason. When something breaks in production and I need to figure out what changed, I can scan the git history and immediately see which product area each commit touches and what changed. Without the format rule, I would have commits like "updated stuff" and "fixed bug," which are useless for debugging.
Section 5: Professional Scope Rules
This is the section that matters most for a CPA working with client financial data.
The rules are direct: never diagnose. The AI extracts and describes financial data. I interpret. No tax, legal, compliance, or classification opinions unless explicitly asked. And critically: never fabricate data. No made-up names, numbers, dates, or any facts. Every data point must trace to a source file or be flagged as missing.
I work with real client financial data. Real revenue numbers. Real payroll figures. Real tax positions. The AI can calculate ratios, build charts, format reports, and identify patterns. It cannot and should not make professional judgments about tax treatment, compliance risk, or strategic recommendations. That is my job. I am the CPA. I sign off.
This boundary is written into the operating system, not enforced by my memory in the moment. That distinction matters. When you are building at 2 AM and the AI suggests something that crosses a professional line, you do not want to rely on remembering to check. The rule catches it automatically.
The "never fabricate data" rule is equally critical. AI models can generate plausible-looking financial data when real data is missing. In client deliverables, a plausible fake is more dangerous than an obvious gap because it slips through review. My rule says: if the data does not exist in a source file, use [TBD] or ask me. Never fill the gap with something that looks real.
Section 6: Self-Learning Protocol
This is where CLAUDE.md becomes truly powerful, and where it diverges from everything else in the AI productivity space.
The protocol: when I correct the AI, it does not just fix the current task. It writes a new permanent rule so the same mistake never happens again. The correction gets logged in a changelog for audit. The pattern gets added to a learning log that tracks what the system has learned over time.
Let me give you three real examples.
Example one: Early in the build, the AI used em dashes in content it wrote for me. I corrected it once: "Never use em dashes." It wrote the rule. It has not used an em dash since. Across hundreds of files and thousands of lines of content. One correction, permanent fix.
Example two: The AI suggested pushing a fix directly to production because "it is a small change." I corrected it: "Never push directly to main. No exceptions, not even emergencies." The rule was written. Every deployment since has gone through staging first.
Example three: The AI created a migration file that would modify the production database without asking me. I corrected it: "Migrations, dropping tables, RLS, production deploys: confirm with Peter first." Now the AI asks before any database-touching operation.
Each correction took 30 seconds to deliver. Each rule prevents the mistake from recurring across every future session, forever. The system gets smarter over time, not because the AI model improves, but because the rules accumulate.
By day 38, my system had dozens of learned rules. The error rate dropped dramatically over five weeks, from nearly half of all commits being fixes in week one down to a fraction of that by week five. Same AI model. Better operating system.
The Three-Layer Memory System
CLAUDE.md is one layer. My full system has three.
Layer 1: Rules (CLAUDE.md and rules files). Permanent instructions that apply to every session. Tech stack, code standards, professional boundaries, learned corrections. These change only when I add a new rule or modify an existing one. Think of this as the company policy manual.
Layer 2: Memory (MEMORY.md). Active state about ongoing projects, client decisions, and product status. This is what the AI reads to know what happened in previous sessions and what the current priorities are. It knows which clients are active, which features are in progress, which bugs are known, and which decisions have been made. Think of this as the daily briefing.
Layer 3: Session logs. What happened in each work session. Commits made, decisions taken, problems solved. These auto-prune to keep only the last 10 sessions. Think of this as the meeting minutes.
Together, these three layers give the AI institutional knowledge. The AI does not just know what I am building. It knows why I am building it, what decisions I have already made, what mistakes to avoid, and where I left off yesterday.
Why This Matters for Non-Technical People
You do not need to be building software for this approach to change how you work.
If you run a marketing agency, your CLAUDE.md equivalent would define your brand voice, your content pillars, your client communication standards, your formatting rules, and your approval workflow. Every piece of content the AI generates would follow the same standards automatically.
If you run a consulting firm, it would define your deliverable templates, your analysis frameworks, your professional scope, your quality standards, and your client confidentiality rules. Every report, presentation, and email would be consistent.
If you run an e-commerce business, it would define your product description format, your customer communication tone, your pricing rules, your inventory naming conventions, and your return policy language. Every customer touchpoint would be on-brand.
The principle is the same across all of these: write down the rules once, and the AI follows them every time. Stop re-explaining yourself. Start building a system.
How to Build Your Own
You do not need my exact setup. You need the pattern.
Step 1: Open a text file. Write three sections: Who You Are (tone and communication style), What You Are Building (project scope and goals), What the Rules Are (constraints and standards). This takes 20 minutes.
Step 2: Add a "DO NOT" section. Write every mistake the AI has made that you had to correct. This section will grow over time, and that is the point. Every correction is a rule. Every rule is prevention.
Step 3: Add a memory section. After each session, write 2 to 3 lines about what happened and what decisions were made. The AI reads this at the start of the next session.
Step 4: Enforce self-learning. Tell the AI that every correction must produce a written rule. If you correct the same thing twice, the system is broken.
Four steps. One file. Every AI interaction from this point forward starts with context instead of a blank slate.
The Results
Before CLAUDE.md: my AI sessions were inconsistent. Some were productive. Some were disasters. The quality depended entirely on how well I prompted in the moment, which meant it depended on how focused I was, how tired I was, and how clearly I could articulate what I needed.
After CLAUDE.md: every session starts at the same baseline. The AI knows my tech stack, my standards, my preferences, and my boundaries. It knows what happened last session and what needs to happen this session. The quality depends on the system, not on my mental state at 11 PM.
The productivity difference is not 10% or 20%. It is 5x to 10x. Because I am not spending the first 15 minutes of every session getting the AI up to speed. I am starting where I left off. And the AI is following rules that have been refined across 98 commits of real-world usage.
98 commits in 38 days. Client dashboards running on real data. 46 financial templates. And the system keeps getting better because every session adds to the knowledge base.
Get the Template
If you want to build your own AI operating system with hands-on guidance over 4 weeks, the AI Operator Intensive walks you through it. You will leave with a working system tailored to your business, not a template you have to figure out yourself.
Book a call if you want to discuss which option makes sense for you.
Next step: run your numbers through the free CFO scorecard.
Frequently Asked Questions
- What is CLAUDE.md and how is it different from a prompt?
- A prompt is a one-time instruction. CLAUDE.md is a persistent operating manual that the AI reads automatically at the start of every session. It contains your tech stack, code standards, professional scope rules, and accumulated corrections. Prompts are what people use with ChatGPT. Operating manuals are what people who ship real products use.
- Do I need to be a developer to use CLAUDE.md?
- No. The approach works for any professional using AI for recurring work. A marketing agency would define brand voice, content pillars, and approval workflow. A consulting firm would define deliverable templates and professional scope. The pattern is the same: write the rules once, and the AI follows them every time.
- How does the self-learning protocol work?
- When you correct the AI, it does not just fix the current task. It writes a permanent rule in the appropriate rules file so the same mistake never happens again. The correction gets logged in a changelog. One correction, permanent fix. The system gets smarter over time because the rules accumulate.
Get weekly CFO insights
No fluff. Real finance strategy for Canadian business owners. Unsubscribe any time.
Related Articles
Corporate Tax Installments: When CRA Expects You to Pay Throughout the Year
If your corporation owes more than $3,000 in tax in a given year, CRA may require monthly installment payments throughout the following year. Missing them triggers interest even if you pay the full balance on time at year-end.
6 min readHow to Tell What Counts as Profit When Payroll and Bills Hit on Staggered Dates
A healthy bank balance mid-month doesn't mean you made money. When expenses hit on staggered dates, the balance swings constantly. Here's how to separate actual profit from temporary cash on hand.
5 min readHow to Forecast Payroll So Pay Day Never Surprises Your Cash Flow
Most owners only forecast net payroll and miss the employer burden and remittance outflows that add 15-25% on top. Payroll should be fully predictable in your cash flow. Here's how to build it in properly.
5 min readNeed financial strategy for your business? Explore our CFO services or book a call.
