---
title: "Store bookkeeping rules as files so AI codes transactions the same way every month"
description: "Keep your chart of accounts, vendor map, client conventions, and if-then rules in files. AI then codes transactions consistently and flags what it cannot place."
canonical: "https://scalewithsearch.com/articles/ai-memory-for-bookkeeping"
date: "2026-01-28"
modified: "2026-09-25"
---
## Site navigation

- [Scale With Search](https://scalewithsearch.com/)
- Real estate
  - Real estate
    - [Real estate](https://scalewithsearch.com/for/real-estate)
- Work
  - Start here
    - [Send your brief](https://scalewithsearch.com/work#send-your-brief)
    - [Prepare your six-question brief](https://scalewithsearch.com/work#prepare-your-six-question-brief)
  - Build
    - [Site build, content library with SEO, signal desk](https://scalewithsearch.com/work)
- For your business
  - Trades and home services
    - [Auto body and collision shops](https://scalewithsearch.com/for/auto-body-and-collision-shops)
    - [Foundation and home repair contractors](https://scalewithsearch.com/for/foundation-and-home-repair)
    - [Garage door and fencing contractors](https://scalewithsearch.com/for/garage-door-and-fencing-contractors)
    - [HVAC contractors](https://scalewithsearch.com/for/hvac-contractors)
    - [Janitorial and commercial cleaning companies](https://scalewithsearch.com/for/janitorial-and-commercial-cleaning)
    - [Locksmiths](https://scalewithsearch.com/for/locksmiths)
    - [Moving companies](https://scalewithsearch.com/for/moving-companies)
    - [Pest control companies](https://scalewithsearch.com/for/pest-control-companies)
    - [Plumbing and electrical contractors](https://scalewithsearch.com/for/plumbing-and-electrical-contractors)
    - [Restoration and water or fire damage companies](https://scalewithsearch.com/for/restoration-and-water-fire-damage)
    - [Roofing companies](https://scalewithsearch.com/for/roofing-companies)
    - [Towing companies](https://scalewithsearch.com/for/towing-companies)
    - [Tree services and landscaping companies](https://scalewithsearch.com/for/tree-services-and-landscaping)
    - [Solar installers](https://scalewithsearch.com/for/solar-installation)
    - [General contractors](https://scalewithsearch.com/for/general-contractors-and-construction)
    - [Paving, concrete, and flooring contractors](https://scalewithsearch.com/for/paving)
  - Practices and professional services
    - [Bookkeeping and tax practices](https://scalewithsearch.com/for/bookkeeping-and-tax-practices)
    - [Dental practices](https://scalewithsearch.com/for/dental-practices)
    - [Family and criminal defense law firms](https://scalewithsearch.com/for/family-and-criminal-defense-law-firms)
    - [Med spas and aesthetics practices](https://scalewithsearch.com/for/med-spas-and-aesthetics)
    - [Personal injury law firms](https://scalewithsearch.com/for/personal-injury-law-firms)
    - [Veterinary clinics](https://scalewithsearch.com/for/veterinary-clinics)
    - [Gyms and fitness studios](https://scalewithsearch.com/for/fitness)
    - [Therapy and outpatient health practices](https://scalewithsearch.com/for/therapy-and-outpatient-health)
    - [Medical billing companies](https://scalewithsearch.com/for/medical-billing)
    - [Insurance agencies](https://scalewithsearch.com/for/insurance-agencies)
    - [Financial advisors](https://scalewithsearch.com/for/financial-advisors)
    - [Property management companies](https://scalewithsearch.com/for/property-management)
    - [Recruiting and staffing agencies](https://scalewithsearch.com/for/recruiting-and-staffing)
    - [Architects and interior designers](https://scalewithsearch.com/for/architects-and-interior-designers)
    - [Logistics and supply chain companies](https://scalewithsearch.com/for/logistics-and-supply-chain)
  - Agencies, MSPs, and manufacturing
    - [IT and managed service providers](https://scalewithsearch.com/for/it-and-managed-service-providers)
    - [Machine shops and precision manufacturers](https://scalewithsearch.com/for/machine-shops-and-precision-manufacturing)
    - [Marketing agencies and freelancers](https://scalewithsearch.com/for/marketing-agencies-and-freelancers)
    - [SEO agencies and consultants](https://scalewithsearch.com/for/seo-agencies-and-consultants)
    - [Small manufacturers and fabricators](https://scalewithsearch.com/for/small-manufacturers-and-fabricators)
  - Restaurants, shops, studios, and nonprofits
    - [Restaurants and hospitality businesses](https://scalewithsearch.com/for/restaurants-and-hospitality)
    - [Retail stores and ecommerce sellers](https://scalewithsearch.com/for/retail-and-ecommerce)
    - [Photographers, event planners, and travel agents](https://scalewithsearch.com/for/photographers)
    - [Churches and nonprofits](https://scalewithsearch.com/for/churches-and-nonprofits)
  - [All industries](https://scalewithsearch.com/for/)
- Learn
  - For your office
    - [Office job guides](https://scalewithsearch.com/guides/)
    - [Browser calculators](https://scalewithsearch.com/tools/)
  - Start here
    - [How it works](https://scalewithsearch.com/how-it-works)
    - [Free Starter Kit](https://scalewithsearch.com/kit/business-memory-starter-kit.zip)
    - [Synthetic specimen](https://scalewithsearch.com/specimen/working-session-specimen.zip)
  - Guides
    - [The Complete Guide to Business Memory for AI Agents](https://scalewithsearch.com/articles/business-memory-for-ai-agents-guide)
    - [The Complete Small-Business Guide to AI Agent Governance](https://scalewithsearch.com/articles/ai-agent-governance-guide-small-business)
    - [The Complete Guide to Leaving Vendor AI Memory](https://scalewithsearch.com/articles/leaving-vendor-ai-memory-guide)
  - Articles by cluster
    - [Business memory](https://scalewithsearch.com/articles/business-memory-for-ai-agents-guide)
    - [Agent governance](https://scalewithsearch.com/articles/ai-agent-governance-guide-small-business)
    - [Migration and ownership](https://scalewithsearch.com/articles/leaving-vendor-ai-memory-guide)
  - For machines
    - [llms.txt](https://scalewithsearch.com/llms.txt)
    - [llms-full.txt](https://scalewithsearch.com/llms-full.txt)
    - [Machine view](https://scalewithsearch.com/?view=machine)
- Company
  - Evidence
    - [Proof](https://scalewithsearch.com/proof)
  - Company
    - [About](https://scalewithsearch.com/about)

# Store bookkeeping rules as files so AI codes transactions the same way every month.

Bookkeeping depends on consistent categorization. Same vendor, same account, every time. Same kind of expense, same class, every month. If an AI helps with transaction coding, it needs your rules. Without them, you spend each session on corrections.

Bookkeeping memory stores your chart of accounts, vendor rules, client conventions, and recurring transactions in files. The AI reads them before each batch and codes transactions the way you would, without a new explanation each session.

## The consistency problem

You categorize transactions and tell the AI: "Code Amazon charges to Office Supplies under the small-purchase limit, to Equipment above the equipment floor, and ask me about anything between."

The AI codes the current batch correctly. Tomorrow you open a new session for the same task, and it asks how to handle Amazon charges. You explain again.

Vendor names cause the same loop. You have told the AI three times that "SQ *COFFEE SHOP" is a client meeting expense. The next session, it asks again.

Client rules make it worse. Client A tracks mileage separately. Client B combines it with meals. Client C does not track it at all. Seven clients mean seven rule sets, and the AI forgets all of them between sessions.

## What to store

Six kinds of information carry most bookkeeping work.

The chart of accounts: every account number, name, and description, with a note on when to use it. If you follow a framework, such as the QuickBooks default or an industry structure, say so.

Vendor rules: which vendors map to which accounts, with every name variant. "Amazon.com," "AMZN Mktp," and "Amazon Prime" can all be one vendor with different bank descriptors.

Client preferences: each client's category rules and level of detail. Add the expenses they reimburse, their fiscal year, and the reports they need monthly or quarterly.

Recurring transactions: monthly subscriptions, annual renewals, and quarterly tax payments. When the AI knows a transaction repeats, it can code it and flag a change.

Conditional logic: receipt and approval rules by amount. "Below the receipt threshold, no receipt. Between the receipt threshold and the approval threshold, a receipt. Above the approval threshold, a receipt and an approval." The thresholds differ by client and expense type.

Tax treatment: what is deductible, what is not, what is partly deductible, and what needs special records. This depends on entity type and jurisdiction, so record it per client, as the client's accountant sets it.

## Build the chart of accounts file

Export the chart of accounts from your accounting software and format it as a Markdown table: number, name, type, and when to use it. The thresholds are named values that each client file sets.

| Account | Name | Type | Use when |
|----|----|----|----|
| 6100 | Office Supplies | Expense | Paper, pens, small office items below the small-purchase limit |
| 6200 | Equipment | Expense | Computers and furniture above the equipment floor; check the capitalization threshold |
| 6300 | Software Subscriptions | Expense | Monthly or annual SaaS and cloud services |

## Build the vendor map

List every vendor you see often, its name variants, and its default account:

```text
Amazon.com | AMZN Mktp | Amazon Prime -> Office Supplies (default),
  Equipment (above the equipment floor)
Square Coffee Shop | SQ *COFFEE | Coffee Shop Downtown -> Meals & Entertainment
Comcast | COMCAST CABLE | Comcast Business -> Internet & Phone
```

If you keep books for several clients, give each client a profile file with its chart of accounts, preferences, reports, and fiscal year.

## List the recurring transactions

For each recurring transaction, record what it is, when it posts, its account, and its normal amount:

```text
QuickBooks Online   | 15th of each month          | Software Subscriptions | expected: last 3 months' amount
Office lease        | 1st of each month           | Rent                   | expected: lease schedule
Vehicle insurance   | quarterly (Mar/Jun/Sep/Dec) | Insurance              | expected: policy premium
```

An amount that differs from the expected value is a flag, not an automatic post.

## Write the rules as if-then statements

If-then statements work better for AI than narrative descriptions:

```text
IF vendor contains "Amazon" AND amount < SMALL_PURCHASE_LIMIT
  THEN Office Supplies
IF vendor contains "Amazon" AND amount between SMALL_PURCHASE_LIMIT and EQUIPMENT_FLOOR
  THEN ask for a description
IF vendor contains "Amazon" AND amount > EQUIPMENT_FLOOR
  THEN Equipment (verify it is not personal)

IF vendor contains "SQ *" AND time 06:00-11:00 THEN Meals - Breakfast
IF vendor contains "SQ *" AND time 11:00-14:00 THEN Meals - Lunch
IF vendor contains "SQ *" AND time 17:00-22:00 THEN Meals - Dinner

IF description contains "ATM"      THEN Cash Withdrawal; log in ATM tracking
IF description contains "Transfer" THEN skip (internal transfer)
IF description contains "Refund"   THEN reverse the original transaction's category
```

Set each named limit in the client file. The rules stay the same across clients, and only the values change.

## Record each client's conventions

Each client has habits. Document them once. The clients below are fictional.

```markdown
## Client A: ABC Consulting LLC
- Fiscal year: July 1 to June 30
- Mileage: track separately; reimburse at the IRS rate
- Meals: client policy is to record only meals with clients, with notes
- Software: capitalize above the client's capitalization threshold
- Monthly close: 5th of the following month
- Reports: P&L, balance sheet, cash flow

## Client B: XYZ Retail Inc
- Fiscal year: January 1 to December 31
- Mileage: combined with auto expense; no separate tracking
- Meals: 50% deductible per the client's accountant; no detail tracking
- Inventory: perpetual system; monthly reconciliation
- Monthly close: 10th of the following month
- Reports: P&L by location, inventory summary
```

When you say "work on the Client A books," the AI loads Client A's file and applies these conventions. Keep each client in its own folder, and load only the client the task names. The guide to [separating client context before an agent touches the work](/articles/separate-client-context-before-agent-work) explains why.

## Decide the ambiguous cases in advance

Not every transaction is obvious. Write down how to handle the edge cases:

| Case | Rule |
|---|---|
| Home office | If the client has a home office, allocate the client's set share of internet and utilities to Home Office Expense, for example 20 percent. The rest is owner's personal. With no home office, all of it is personal. |
| Mixed purchase | If a receipt mixes business and personal items, such as a warehouse club run, ask for the split. Below the client's minor-purchase limit, the client may choose to code it all to business. |
| Unclear vendor | If the name is cryptic, such as "TST*12345", check prior months. If it is still unclear, flag it for the client. |
| Possible duplicate | Same vendor, same amount, same day: flag it. Do not delete it, because the bank may show two real authorizations. |

## Run a review checklist on each batch

Give the AI a checklist to run after each batch:

1. Is every transaction categorized?
2. Is each amount reasonable for its category? Flag an office-supplies charge far above its normal range.
3. Are the expected recurring transactions present and correct?
4. Are there duplicate transactions?
5. Are there uncategorized bank fees?
6. Are credit card payments coded to the liability, not to expense?
7. Does any transaction still need a receipt?

## Support the month-end close

Document the month-end steps so the AI can help run them or verify them. An example sequence:

1. Reconcile every bank account.
2. Reconcile every credit card account.
3. Record depreciation, if it applies.
4. Accrue unpaid bills dated in the current month.
5. Defer prepaid expenses, if they apply.
6. Review undeposited funds.
7. Generate the P&L and balance sheet.
8. Review for anomalies, such as negative expenses or unusual balances.
9. Export the reports to the client folder.
10. Send them to the client by the agreed date.

Add each client's variations. Client A needs a cash flow statement. Client B needs a location breakdown. Client C needs a job costing report.

## Make the AI flag what it cannot place

The AI should flag low-confidence items instead of guessing. Put a confidence rule in the root file:

| Confidence | Condition | Action |
|---|---|---|
| High | Known vendor, typical amount, clear category | Code it |
| Medium | Known vendor, unusual amount or unclear description | Code it and flag for review |
| Low | Unknown vendor or ambiguous description | Do not code; ask |

Over time, medium items become high as you document more rules. A low-confidence stop is a feature. The list of [stopping rules for business AI agents](/articles/ai-agent-stopping-rules-examples) shows how to write stops that the agent can check.

## Keep the files current

Add a vendor the first time you meet it. When you categorize a transaction by hand, update the vendor map at once. A two-minute edit prevents the same question next month.

Review the rules each quarter. Client needs change, tax law changes, and your practice changes.

Date the files. A name such as `client-a-preferences-2026-01-28.md`, or a `last_verified` line inside the file, tells you when the facts were checked.

Archive old rules; do not delete them. Move a superseded rule to an archive folder. When you review historical books, you need the rules that applied then. The [AI memory retention and deletion policy guide](/articles/ai-memory-retention-and-deletion-policy) gives a structure for what to keep and for how long. Client bank data is sensitive, so keep only what the task needs in these files. The article on [what client data belongs in AI agent memory](/articles/client-data-in-ai-agent-memory) sets the limits.


## Related: AI memory

- [Give AI your chart of accounts and client rules so accounting drafts follow them](/articles/ai-memory-for-accounting)
- [Stop AI from inventing client details with a verified client file and a stop rule](/articles/ai-keeps-hallucinating-my-details)
- [Find where Claude Code /init stops and plan the memory it leaves out](/articles/claude-code-init-limitations)

----

```text
                  .|########||.                                       .|########||.                                       .|########||.
               |##||.      .||##|.                                 |##||.      .||##|.                                 |##||.      .||##|.
             |#|.              .|#|.                             |#|.              .|#|.                             |#|.              .|#|.
           |#|                    |#|                          |#|                    |#|                          |#|                    |#|
         .#|                        |#.                      .#|                        |#.                      .#|                        |#.
        .#.                          .#|                    .#.                          .#|                    .#.                          .#|
       |#.                            .#|                  |#.                            .#|                  |#.                            .#|
      |#             ......             #|                |#             ......             #|                |#             ......             #|
     .#           ||#########|           #|              .#           ||#########|           #|              .#           ||#########|           #|
    .#.         |######||######|.        .#.            .#.         |######||######|.        .#.            .#.         |######||######|.        .#.
    #.        .##|###|##|#|######|        .#            #.        .##|###|##|#|######|        .#            #.        .##|###|##|#|######|        .#
   ||        |##|#||||||||||||#||#|        ||          ||        |##|#||||||||||||#||#|        ||          ||        |##|#||||||||||||#||#|        ||
   #        |#||||||||||||||||||||#|        #.         #        |#||||||||||||||||||||#|        #.         #        |#||||||||||||||||||||#|        #.
  ||       |#||||||||||||||||||||||#|       ||        ||       |#||||||||||||||||||||||#|       ||        ||       |#||||||||||||||||||||||#|       ||
  #       .#||||||||||||||||||||||||#|       #        #       .#||||||||||||||||||||||||#|       #        #       .#||||||||||||||||||||||||#|       #
 ||   ....|||#||||||##|#|||#|#||##||||....|. ||      ||   ....|||#||||||##|#|||#|#||##||||....|. ||      ||   ....|||#||||||##|#|||#|#||##||||....|. ||
 #.  .  ....|#  ....#|||   ||| .#|||  ....#. .#      #.  .  ....|#  ....#|||   ||| .#|||  ....#. .#      #.  .  ....|#  ....#|||   ||| .#|||  ....#. .#
 #   .  ||||#| .#####||  . .#| .#|||  ||||#   #.     #   .  ||||#| .#####||  . .#| .#|||  ||||#   #.     #   .  ||||#| .#####||  . .#| .#|||  ||||#   #.
.|   |||||  #. |#|||||. ||  #. |#||. .|||||   ||    .|   |||||  #. |#|||||. ||  #. |#||. .|||||   ||    .|   |||||  #. |#|||||. ||  #. |#||. .|||||   ||
||   |....  #. ....|#.      |. ...|. ....||   ||    ||   |....  #. ....|#.      |. ...|. ....||   ||    ||   |....  #. ....|#.      |. ...|. ....||   ||
#.  .||||||##||||||##||####|||||||#||||||#|   .#    #.  .||||||##||||||##||####|||||||#||||||#|   .#    #.  .||||||##||||||##||####|||||||#||||||#|   .#
#    .||####|###########################|.     #    #    .||####|###########################|.     #    #    .||####|###########################|.     #
#      .#||||||.#.|| # |. ..# #| #|||||#|      #    #      .#||||||.#.|| # |. ..# #| #|||||#|      #    #      .#||||||.#.|| # |. ..# #| #|||||#|      #
#      .#|||||| ..  |# ## |#| ...#|#|||#|      #    #      .#|||||| ..  |# ## |#| ...#|#|||#|      #    #      .#|||||| ..  |# ## |#| ...#|#|||#|      #
#      .#|||#|# .# .#| #| ##|.#..#|||||#|      #    #      .#|||#|# .# .#| #| ##|.#..#|||||#|      #    #      .#|||#|# .# .#| #| ##|.#..#|||||#|      #
#      .#||||||############|######|||||#|      #    #      .#||||||############|######|||||#|      #    #      .#||||||############|######|||||#|      #
#   |...||#||||||#||||#|#||||||#|||||#||| |.|  #    #   |...||#||||||#||||#|#||||||#|||||#||| |.|  #    #   |...||#||||||#||||#|#||||||#|||||#||| |.|  #
#. .. ||||# .|||##|.  |#| .|| || .|||#. #|  # .#    #. .. ||||# .|||##|.  |#| .|| || .|||#. #|  # .#    #. .. ||||# .|||##|.  |#| .|| || .|||#. #|  # .#
|| |  ...||  ...##| |  #| .|. |. #####  .. .| ||    || |  ...||  ...##| |  #| .|. |. #####  .. .| ||    || |  ...||  ...##| |  #| .|. |. #####  .. .| ||
|| ||||| || ||||#|  .  |. |. |#. ||||| |#| || ||    || ||||| || ||||#|  .  |. |. |#. ||||| |#| || ||    || ||||| || ||||#|  .  |. |. |#. ||||| |#| || ||
.# |.....#|....|#.||||.|||##.|#|....||.#||.#. #.    .# |.....#|....|#.||||.|||##.|#|....||.#||.#. #.    .# |.....#|....|#.||||.|||##.|#|....||.#||.#. #.
 #.|||||||#############################| ||| .#      #.|||||||#############################| ||| .#      #.|||||||#############################| ||| .#
 ||       ##||#||#||||||#||#||#||#||##.      ||      ||       ##||#||#||||||#||#||#||#||##.      ||      ||       ##||#||#||||||#||#||#||#||##.      ||
  #       .#|||||||||#||#|||||||||||#|       #        #       .#|||||||||#||#|||||||||||#|       #        #       .#|||||||||#||#|||||||||||#|       #
  ||       |#||||||||||||||||||||||#|       ||        ||       |#||||||||||||||||||||||#|       ||        ||       |#||||||||||||||||||||||#|       ||
  .#        |#||||||||||||||||||||#|        #.        .#        |#||||||||||||||||||||#|        #.        .#        |#||||||||||||||||||||#|        #.
   ||        |#||||||||||||||||||#|        ||          ||        |#||||||||||||||||||#|        ||          ||        |#||||||||||||||||||#|        ||
    #.        .######|#|#########|        .#            #.        .######|#|#########|        .#            #.        .######|#|#########|        .#
    .#.         |#####||||#####|         .#.            .#.         |#####||||#####|         .#.            .#.         |#####||||#####|         .#.
     |#           ||########||           #.              |#           ||########||           #.              |#           ||########||           #.
      |#             ......             #|                |#             ......             #|                |#             ......             #|
       |#.                            .#|                  |#.                            .#|                  |#.                            .#|
        |#.                          .#.                    |#.                          .#.                    |#.                          .#.
         .#|                        |#.                      .#|                        |#.                      .#|                        |#.
           |#|                    |#|                          |#|                    |#|                          |#|                    |#|
            .|#|.              .|#|.                            .|#|.              .|#|.                            .|#|.              .|#|.
               |##||.      .||##|                                  |##||.      .||##|                                  |##||.      .||##|
                 .||########||.                                      .||########||.                                      .||########||.

Scale With Search  2026  [scalewithsearch.com](https://scalewithsearch.com)
```
