AIToday
AI Coding AssistantsZenn AI/MLPublished: Sep 28, 2026, 13:00 JST

Shoma Endo leans on Claude Code hooks, not rules, for a beginner-built app

Shoma Endo leans on Claude Code hooks, not rules, for a beginner-built app

3 Key Points

  1. What happened

    Developer Shoma Endo built the platform for a client whose two developers are nearly new to coding, relying on Claude Code hooks that block test deletions, dangerous commands, and unsupported "I'm done" claims, plus 21 hook tests.

  2. Why it matters

    Written instructions are read but not always followed, so Endo shifted the must-happen checks into hooks that block the action outright, making the platform safer for the two nearly-new developers.

  3. What to watch

    The test is whether hooks that stopped 3 holes — committed edits, evidence markers lost when the folder moves, and pnpm test not registering — hold up as features are added. Endo reviews hook stops and CI warnings every two weeks.

WHO IT HITSThis lands on non-technical teams being asked to build internal tools with AI coding assistants. It shows that hooks and CI gates, not written rules alone, are what keep less experienced developers from shipping broken or unsafe code.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, in your inbox every morning.

Context & Analysis

Endo's original plan placed personal conduct rules in a project instruction file, but over time he cut those items down to three. He found that written rules are read but not reliably followed, and the gitleaks episode proved his own rule to verify packages still let a wrong package through. That experience pushed the must-happen checks into hooks that block an action outright rather than asking.

When the hooks themselves turned out to have gaps, Endo fixed each one and wrote tests for them. Today there are 21 hook tests that run on every CI pass. The gaps were all cases of not firing when they should, or firing when they should not, which he says is harder to notice than a hook that over-blocks.

For the two developers who are nearly new to coding, the outcome now hinges on whether features can be added without triggering the hooks too often. Endo plans to check hook stop counts, how the AI fixed blocked work, and which CI warnings should be promoted to blocking checks at two-week meetings. The setup is a deliberate bet that mechanical enforcement beats written policy when the people writing the code rely on AI.

FAQ
Why did Shoma Endo choose Supabase over Cloudflare D1?
He expected multiple sessions writing in real time as features grew. He also cited Postgres features like JSONB, View, functions and triggers, plus built-in auth and pg_cron so no extra vendor was needed.
What went wrong with the gitleaks package?
Claude Code confirmed a version number but installed a different repository's package with the same name. The rule to verify packages by version alone was not enough; the intended tool was a Go-based gitleaks. Endo later switched to secretlint after checking the repository and GitHub contents.
How many commands do the two developers need to learn?
Five: pnpm install, pnpm dev, pnpm new:feature, git commit, and git push.

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleShirt built to fool AI cameras hides wearer