· 6 min read

Every AI fix was right. Together, they made a mess.

I rebuilt the AI process behind TogClub, my app for clubs and associations. What I found applies to every business that grows its own tools on the fly.

Every AI fix was right. Then: a mess. Terminal: global rules 290+ to 21, contradictions 30+ to 0

I fixed my own app one sentence at a time. Each fix worked. Then the same errors kept coming back, and I found dozens of contradictions inside my own AI process.

My first IT job was in a Paris startup, in 2000. It pushed me to learn everything: Unix and Oracle administration, telecoms and Cisco, building and maintaining servers, and coding the scripts that watched over them. Millions of customers counted on my team to get online or make a phone call.

In Paris I also worked with Tiscali, Alice and Free. In 2010 I opened my own web agency in Bangkok. Today AI writes most of my code. I design the apps, the agents, and the rules they follow.

It still happened to me. Here is how, why, and how I fixed it.

Some words here are for developers. Short definitions are at the bottom.

TogClub runs a whole club, and I run a club on it

TogClub runs clubs and associations: members, memberships, sessions, events, payments, and every message that goes with them. Its built-in AI reads payment slips, takes attendance and flags the messages that need an answer.

I run a sports academy on it. A demanding one.

Every month 
MembersAbout 600
Active20 to 30%
OperationsHundreds: memberships, sessions, events
MessagesThousands, with hundreds of families and players
Team10 staff

One quick fix at a time

After decades of writing every line by hand, fixing an app with one sentence feels close to magic. You describe the problem. The code changes.

So I did it every day, while running the academy:

  • A payment that did not fit: a new rule.
  • A list in an odd format: a new rule.
  • A case to remember: a new memory note.

Each fix took a minute. Each one was right on the day.

The same errors kept coming back

  • Repeated mistakes. Fixed, then back in another form.
  • Forced data. Numbers bent until they added up.
  • Double work. Jobs the app already did, done again.
  • Things nobody asked for. Made anyway.
  • Too much information. More than anyone needed to read.
  • Missed opportunities. The better way, never suggested.
  • Burnt tokens. Every chat and every routine read the whole pile first: rules, copies, contradictions. Paid for on every single run.

Every rule I added to stop an error became a home for the next one. I was patching faster than I was thinking.

What I found: dozens of contradictions, hundreds of repeated errors

So I stopped, and looked at the whole thing for the first time.

Sources
ChannelsWhatsApp, LINE, email
MoneySlips & cash, coach pay
ListsPlayers, new contacts
App bugsSentry
AI promptsCowork, Codex, Claude Code
ConnectorsCustom MCP servers
MeMy own requests
No order: any source → any rule place
290+Global rulesthe money rules inside
81Application rulesincluding the slip payment process
16Skillsmoney rules duplicated in 10 of them
190+Memory notes110+ were extra rules
Custom rules
Routine promptseach with its own rules
Two rules disagree
Rule A
?Claude (AI)guesses
Rule B
✓ picks one
✗ drops the other
Money recorded in 5 places, each its own way
VPS
Local server
Claude Cloud
Local routines
Cloud routines
The application(TogClub)
Before Every source went to every rule place, in no order. When two rules disagreed, the AI picked one.

I wrote or approved every one of those lines. The AI did not sneak in.

I let it in, one shortcut at a time.

Why it happens: two reasons

1. Running the business eats the time to plan

When you operate, you fix what is in front of you. When you plan, you look at what is not there yet. Operations always win: a family is waiting, a payment must be recorded today.

Planning waits. Cleaning up waits even longer.

2. AI takes the shortest road

An AI model answers the question you asked, not the one you should have asked. It will not say "this rule already exists in three places". When the data does not fit, it cuts the data to fit, and moves on.

From my own files:

  • Double work. A routine read the payment slips itself, while the app already read them. Two readers, two answers, two token bills.
  • Forced numbers. A payment that did not match was spread over open items, oldest first, the rest put in credit. Tidy on screen. Not what the payer wrote.
  • Copies everywhere. The money rule pasted into 10 skills. Change it once, and 9 copies are wrong.

AI makes you faster every day.
It will never tell you when to stop.

The fix: one rule, one place

I stopped the operations, and put the architect's hat back on.

  1. Freeze. A snapshot of every file that drives the AI: rules, skills, routines, memory.
  2. Read everything. Line by line. Red for what goes, green for what replaces it.
  3. Settle every contradiction. Every single one, decided by me. None left for the AI to pick.
  4. One rule, one place. The club's rules now live inside TogClub, on one AI rules page that every AI reads: on the phone, in the routines, on my Mac.
  5. Cut. Everything that repeated, contradicted or was out of date.

Before

NEVER GUESS. Every number you write comes from the slip image or from TogClub. If you can't prove where every baht goes, leave the slip.

Download each slip image (file_url) with curl and a browser user agent, or TogClub refuses it.

Read the image yourself: amount, date, receiving account, bank reference, MEMO. If TogClub's reader shows another amount, trust the image.

After

NEVER GUESS. Every number comes from TogClub. TogClub already read every slip; you never read the image yourself. If TogClub has no amount, the slip waits for the owner.

Three rules became one. The app already does the job, so the AI stops doing it twice.

After: every rule has one home

Sources
ChannelsWhatsApp, LINE, email
MoneySlips & cash, coach pay
ListsPlayers, new contacts
App bugsSentry
AI promptsCowork, Codex, Claude Code
ConnectorsCustom MCP servers
MeMy own requests
Routines (run on their own)
Cloud routine: slipssteps in the app
Cloud routine: attendancesteps in the app
VPS: Inboxslips · email · families
Local routineLINE sync
Local serversteps in the app
One process for every source
1
Rules pageWhat Claude may do alone, what needs my go
15 + 3rules + routines
2
SkillThe steps for this job
21skills
3
The applicationFacts: members, prices, payments
liveapp data
4
Dated noteOnly if the application does not have it yet
< 40memory notes
Sure?
YesDone alone
  • Slip fits one price → recorded
  • Coach list → ticks
  • Fact I state → fixed in the application
  • Sentry bug → fixed and deployed
NoAsks me
  • One question
  • Money: "What does it pay?" a / b / c
  • Routine: skips it, reports, goes on
The application(TogClub)
Now Every source takes the same road. Sure: done alone. Not sure: one question.
BeforeNow
Global rules290+rules21rules
Application rules81lines17rules
Skills with the money rules duplicated10of 16 skills0one job per skill
Memory notes190+110+ of them were rules< 40facts only
Contradictions30+open0open: each one decided
Doors for money5each with its own rules1the application's Inbox
Routine prompts140lines23lines

Fewer lines is not the point. Every rule now has one home, and the facts live in the app itself.

The lines still count, though. The AI reads them before it does anything, so every line cut is a token saved, on every run, every day.

Next: a guard, so the mess never grows back

Cleaning once is not enough. The next step is a weekly check that reads every rule file and fails when the same rule lives in two places, or when two rules disagree. Every alert comes to me, before the AI ever has to pick.

Building your own tools with AI?

If you build your tools while you run your company, you are probably where I was. Not for lack of skill. For lack of distance.

Distance is what I bring. I look at the whole, find where each rule should live, and rebuild the process so the AI works for your business, not around it.

What is TogClub?

TogClub Not on sale yet

One app to run a whole sports club.

I built TogClub for the needs of my own sports academy, around what a club deals with every day.

  • Members & eventsMemberships, sessions and events, in one place
  • PaymentsPayments, invoicing and more
  • AttendanceFace recognition, or automatic from your channels
  • One inboxEvery channel together, the urgent messages flagged
  • Built-in AIJust ask: it handles the data for you

For now, it runs my academy every day. Soon, it should be useful to thousands of sports clubs.

The words, in short

PromptThe instruction you give an AI
Global rulesInstructions the AI reads before every task
Application rulesRules for one app only
SkillA saved how-to the AI follows for one job
Memory noteA fact the AI keeps from one chat to the next
RoutineAn AI task that runs on its own, on a schedule
Connector (MCP)A plug that lets the AI use another app
TokenA small piece of text. AI reads and bills by tokens
The author running, in a Runista top

about the author

Farid Beng

Senior developer. Youth Coach & Personal Trainer. Educator.

French, based in Hua Hin Beach, Thailand.

25 years of code on one side, my own football academy on the other. My days move between consulting on tech, building apps and coaching young football players and athletes.

What I enjoy most is passing on what I know.

Not chasing new projects. Always happy to hear about a good one.

contact

Available in Hua Hin Beach, Thailand.