An Explanation Based on JGA’s “AI Agent Accounting” Service
Introduction
Hello. This is Yohei Katase, certified tax accountant at JGA Tax Corporation.
Today, I would like to discuss the environment setup behind our service, AI Agent Accounting.
This is a very important topic that forms the foundation for using agent-based generative AI — in other words, “AI agents” such as Claude — effectively within a company. I hope you will find it useful.
When using AI in the operations of an accounting firm, the most dangerous assumption is thinking that “as long as we instruct AI properly, everything will be fine.”
Writing rules in CLAUDE.md or Skills is important. However, that alone does not physically prevent risky operations.
In JGA’s AI Agent Accounting model, we do not simply teach AI how to perform tasks. We also create an environment where dangerous operations are structurally blocked through Settings and Hooks.
Generative AI is like an untamed horse. Without a proper harness, it may run out of control and do unpredictable things. That is why it is necessary to set up the “harness” — the five elements explained in this article.
1. The Real Challenge of Using AI Is Environment Setup
The first thing to understand when introducing AI Agent Accounting is that the key issue is not how intelligent the AI is.
What matters is creating an environment where AI can work safely.
In our view, environment setup is both the most important and the most difficult part.
Accounting firm operations involve many actions that can lead to serious problems, including handling client information, supporting documents, journal entry data, tax categories, director-related transactions, external transmissions, and registration into MF Cloud Accounting.
Simply writing instructions such as “do not delete” or “do not register” is the same as giving a warning to a person. It does not function as a physical brake.
Therefore, when JGA introduces AI, we first separate two areas:
- areas where AI is instructed what to do; and
- areas where the system makes certain actions impossible.

CLAUDE.md, Skills, and MEMORY are used to teach AI how to perform work.
On the other hand, settings.json and Hooks are used to stop dangerous operations.
Not confusing these two roles is the starting point for safe AI Agent Accounting.
2. Why the Five Elements May Look Similar
At first glance, CLAUDE.md, Skills, MEMORY.md, settings.json, and Hooks may look similar.
The reason is simple.
You can write the same types of prohibited actions in all of them, such as:
- do not delete;
- do not register;
- do not send externally.
However, being able to write the same words and being able to actually stop the action are completely different matters.
If you write a prohibition in CLAUDE.md or Skills, it is still only a request to AI.
Real enforceability is created only when the action is set to Deny in settings.json or stopped immediately before execution through Hooks.

3. The Correct Role of Each of the Five Elements
In setting up the environment for AI Agent Accounting, we organize the five elements into three categories:
- Teach
- Connect
- Restrict
CLAUDE.md
CLAUDE.md is the firm’s basic policy and index.
It tells AI JGA’s basic approach, the tasks AI may handle, the tasks AI must not handle, and where AI should refer when performing work.
Skills
Skills are business manuals.
They standardize repeated workflows such as journal entry checks, creating draft journal entries from invoice PDFs, and preparing monthly reports.
MEMORY.md
MEMORY.md functions as a client chart.
It records client-specific information such as the fiscal year-end, special treatments, past decisions, and recurring monthly confirmation items.
settings.json / Hooks
settings.json and Hooks function as authority settings and guardrails.
They control what AI can do, what AI cannot do, confirmations before or after execution, and log preservation.

The important point here is not to put everything into CLAUDE.md.
Overall policy belongs in CLAUDE.md.
Business procedures belong in Skills.
Client-specific circumstances, similar to handover notes, belong in MEMORY.
Authority settings and blocking mechanisms belong in settings.json and Hooks.

4. Settings and Hooks Are What Create Enforceability
When using AI safely, the most important point is the difference in enforceability.
CLAUDE.md, Skills, and MEMORY are all important.
However, no matter how carefully they are written, they are still “requests” to AI.
By contrast, settings.json is the key you hand to AI.
By using Allow, Ask, and Deny, you decide:
- how much freedom AI has;
- where human confirmation is required; and
- what AI is prohibited from doing.

Hooks are mechanisms that automatically intervene immediately before or after execution.
For example, Hooks can:
- stop deletion commands before execution;
- display the client name, fiscal year, number of journal entries, and total amount before writing to MF Cloud Accounting;
- save logs after execution.

It is necessary to write “do not register.”
But that alone is not enough.
Accidents can be prevented only when the environment is designed so that an approval screen always appears before registration, and the process stops if the approver is not recorded.
5. Protecting Against the Same Risk Through Layered Defense
In AI Agent Accounting, we do not try to prevent one risk with only one rule.
For example, consider the risk that AI may register journal entries into MF Cloud Accounting without human approval.
This risk should be guarded against by all five elements.
- CLAUDE.md states the policy.
- Skills define the procedure up to the creation of draft journal entries.
- MEMORY records client-specific high-risk transactions.
- settings.json sets writing to MF Cloud Accounting as Ask.
- Hooks enforce approval before registration.
This environment setup is what we call “harness design.”

At first glance, this may look redundant.
But it is not wasteful.
Even if the first three layers fail, the final two layers stop the action.
This is the type of layered defense accounting firms need in the AI era.

6. Do Not Store Client Information in GitHub
When setting up the environment for AI Agent Accounting, how GitHub and other repositories are used is also important.
GitHub is not a place to store client data.
What should be stored in GitHub are business frameworks used across the firm, such as:
- common firm rules;
- Skills;
- templates;
- Hooks;
- settings.example.json.
On the other hand, the following should not be stored in GitHub:
- client supporting documents;
- actual journal entry data;
- MF Cloud Accounting exports;
- API keys;
- authentication information;
- client-specific MEMORY files;
- operation logs;
- personal information.
These should be managed in access-controlled storage locations such as Google Drive, following the firm’s existing data management practices.
The image is that the existing “warehouse” remains in place.
AI brings the necessary materials to the workspace, processes them, and then returns the processed materials to the warehouse.

GitHub is a place to manage the work environment, rules, and templates.
It is not a place to manage client information.
Separating rules from client data is a basic premise of AI Agent Accounting.
7. Building the Environment Step by Step from Phase 0
JGA Tax Corporation’s AI Agent Accounting does not begin by writing directly into MF Cloud Accounting.
The process starts by building the foundation in Phase 0, then proceeds step by step:
- Phase 0: Build the foundation
- Phase 1: Read only
- Phase 2: Drafting
- Phase 3: Writing with approval
- Phase 4: Standardization
We believe the value lies not in uniformly handling clients’ highly confidential accounting data through a packaged AI application, but in supporting the design and setup of an environment tailored to each client’s circumstances.

The key point of this phase design is that the level of development for the five elements increases one step at a time as each phase progresses.
- In Phase 0, we create policies and templates.
- In Phase 1, we verify read-only operations.
- In Phase 2, we begin building Skills and MEMORY in earnest.
- In Phase 3, we fully implement settings.json and Hooks.

From Phase 0 through Phase 2, writing to MF Cloud Accounting is set to Deny.
If we force the process to move all the way to registration at this stage, we would be allowing dangerous operations while the design is still incomplete.

Only in Phase 3 do we begin testing writing to MF Cloud Accounting, and only for low-risk transactions with approval.
At this stage, we develop mechanisms such as:
- pre-registration approval Hooks;
- approver records;
- display of the number of entries and total amount;
- post-registration logs.


8. Checklist Before Production Use
Before moving into production use, the following conditions should be met at a minimum:
- CLAUDE.md is concise and organized, with clear references.
- Skills are separated by workflow.
- Client-specific MEMORY files are separated.
- Writing to MF Cloud Accounting is set to Ask.
- Deletion-related operations are set to Deny.
- Hooks require confirmation before registration.
- The log storage location has been decided.
- Client data is not stored in GitHub.

In summary, safe AI Agent Accounting cannot be created with prompts alone.
CLAUDE.md, Skills, and MEMORY teach AI how to work.
settings.json and Hooks structurally stop dangerous operations.
Only when this environment is in place can AI become a safe member of an accounting firm’s staff.
We believe generative AI — or AI agents — can be used in practice precisely because they can be controlled through proper environment setup.
It is also possible to build systems such as ERP-like management functions for back-office departments by using AI agents.
JGA Tax Corporation provides proposals tailored to each client’s needs. Please feel free to contact us if you have any concerns or questions.

This article is an English translation of an article originally published in Japanese. If any part of the English translation is unclear or differs in interpretation, please refer to the original Japanese version as the authoritative text.
Original Japanese article:
https://jga-tax.jp/?p=1448
