Coding

42 Tests Green, Still a Bug: Why This Developer Fixed It With a Pre-Commit Hook, Not Another CLAUDE.md Line

  • Level Advanced
  • Setup1–3 hrs (estimated)
  • Evidence Some evidence
  • CostNot stated in source
  • No-codeNo
Claude CodeSource-linked⚠ Cautionary

What they did

A developer's Claude Code session passed 42 tests but still burned an invoice credit-note number (it issued CN-0004 where CN-0002 was due). The session's /retro review called it smooth and found nothing until he pointed out the failure. His fixes went into enforcement instead of instructions: a pre-commit hook, a test, a line in the coding standards and a doc comment. That was 4 files and 30 lines, with 0 lines added to CLAUDE.md.

How it went

dev.to post by aidiveyt (Oct 29, 2026): 42 tests green but credit-note CN-0004 issued instead of CN-0002; /retro missed it until told; fix was a pre-commit hook, a test, a standards line and a doc comment (4 files, 30 lines, 0 CLAUDE.md lines)

Worth knowing

  • dev.to post by aidiveyt (Oct 29, 2026): 42 tests green but credit-note CN-0004 issued instead of CN-0002; /retro missed it until told; fix was a pre-commit hook, a test, a standards line and a doc comment (4 files, 30 lines, 0 CLAUDE.md lines).

Prompt

Cleaned version rewritten from the source — not a direct quote.

This bug got past [number] passing tests: [describe the bug]. Don't add a new rule to the agent instructions file. Instead, find where this mistake could be caught automatically and propose the smallest checks that would have failed: a test, a pre-commit hook, a lint rule or a code comment at the risky spot. Show me the diff for each and explain what each one catches.

Recommended

Try it in Grok Bot

  1. Copy the prompt (button below).
  2. Open Grok Bot chat and paste it. Replace any [bracketed] placeholders.
  3. Connect the listed tools (as needed) as connectors when Grok Bot asks.
  4. If the task repeats, ask: "Make this a daily routine."

Alternatives: the same prompt works in Claude Code, Claude, ChatGPT Agent, OpenClaw.

Set it up

Stack: Claude Code

  1. Read the original source for full context.
  2. Connect the tools your agent needs.
  3. Paste the prompt and replace [bracketed] placeholders.
  4. Run once manually and check the output before scheduling it.

Generic suggested steps, not from the source.

Evidence

dev.to post by aidiveyt (Oct 29, 2026): 42 tests green but credit-note CN-0004 issued instead of CN-0002; /retro missed it until told; fix was a pre-commit hook, a test, a standards line and a doc comment (4 files, 30 lines, 0 CLAUDE.md lines)

Source: Web · 2026-10-29 · Verified by us: not yet · Report broken or outdated

Related use cases

ContentX · 2026-01

Turn YouTube channels into a weekly EPUB magazine

Every week, pulls new videos from a list of YouTube channels, rewrites their transcripts as magazine articles, and emails them to you as a newsletter plus an EPUB file.

  • Level Intermediate
  • Setup1–3 hrs*
  • Evidence Strong evidence
Claude CodeSource-linked
CodingX · 2026-10

Hermes Agent Nearly Doubled Speech-to-Text Accuracy on Hard Words: 99 to 183 of 240

A user turned his 15K saved Wispr Flow dictations into a test set for the local Whisper model behind his Hermes Agent. The agent turned his Wispr dictionary into a hint list, diffed raw vs corrected text to find words Whisper keeps mishearing, made find-and-fix rules, and tested every rule against the full history. With no fine-tuning, dictionary words went from 99/240 to 183/240 on Wispr clips and 19/45 to 43/45 on sentences he read aloud. It now archives the data nightly and looks for new fixes weekly.

  • Level Advanced
  • Setup1–3 hrs*
  • Evidence Strong evidence
Hermes AgentSource-linked
CodingReddit · 2026-10

1 Minute to 1 Second: Claude Code Built a Faster Plex App for a Samsung TV

On a 2022 Samsung TV the official Plex app took about a minute to open and search lagged about 10 seconds. A Redditor used Claude Code to build a free, open-source web-app client that opens in about a second, searches as you type and plays 98.7% of his library directly in hardware.

  • Level Advanced
  • Setup1–3 hrs*
  • Evidence Strong evidence
Claude CodeSource-linked