Two coding agents, one dispatcher, one repo. My side project: a small org of CLI agents.
Both took the same task. Two PRs, one feature.
No claim step in the dispatcher.
Rule now: a task is marked taken in the DB before any agent reads it.
@kang_0421 Fair. A fixed number is a bad rule when all five tests belong to one feature that gets deleted next month. I would keep it as a signal too, with one nudge: the count lands in the PR comment, so the move gets asked in review instead of forgotten.
@rulesfile One last trap in that setup: the Testcontainers image tag. postgres:16 drifts while prod sits on one minor version with an extension installed. I pin the exact tag and create the extensions in the first migration, so a missing pg_trgm fails in CI, not on deploy.
How do you keep a coding agent out of files it should not touch?
I tried rules in CLAUDE.md, a hook that rejects the commit, and plain reading the diff.
Only the diff catches it every time. What works for you?
@idooing Completeness is the hard half. Grep misses the callers wired by name in Spring or reached through an event. My check for those: run the integration tests and read which ones fail. That failure list is the real caller list.
A 900 line PR lands in my review queue.
My rule: ask for a split before reading, unless it is a rename, a move, or generated code. Past 400 lines I stop finding bugs and start approving.
What is your line count for sending a PR back?
@rulesfile One more piece for that rule line: Testcontainers with the same Postgres version as prod. H2 in tests accepts column types that Postgres rejects, so validate can pass in CI and still fail on deploy.
@kang_0421 Scoping it to test files closes it. One addition: tag the tests that import from scratch, so the count stays visible in CI output. When it passes five, the helper moves into the repo for real.
Don't tell Fable 5.2 "find the bugs."
Don't tell Fable 5.2 "build this feature."
Don't tell Fable 5.2 "why is CI so slow."
You're using the smartest coding model out there ๐น๐ถ๐ธ๐ฒ ๐ถ๐'๐ ๐ฎ๐ป ๐ถ๐ป๐๐ฒ๐ฟ๐ป.
Here are 6 prompts to copy and paste:
Pushed to main at 23:40. Coolify rebuilt the image, green check, site gave 502.
docker logs: app bound to 127.0.0.1, not 0.0.0.0.
The health check ran inside the container, so it passed.
Rule now: health check via the proxy, not localhost.
Hour three of one agent session.
It started writing Java style getters in a Kotlin repo.
The rule sat in CLAUDE.md the whole time. The context got compacted twice.
Now: one task, one session. Long chats forget. Fresh ones read.
@Rohit_Bhatt_ Scanning before the write is the right place. My cheap version: printenv and cat on .env files are denied, and env is a wrapper that masks values. Debugging still works, the value never prints.
@rulesfile One more leak: a test profile with ddl-auto=create-drop. Tests pass against a schema no migration ever built. I run Flyway in tests too, same files as prod, so the gap shows in CI.
@gagu_sh Services not depending on web classes is a good one, it keeps the controllers thin too. My next rule after that: no repository called from a controller. The agent loves that shortcut.
@xyz_husayn One more habit: any key that was ever printed in a session gets rotated the same day, no debate. The transcript may sit in a backup for years. Cheaper to rotate than to search.
@idooing Right, one step away from the diff. What helped me: ask the agent to list every caller of each changed function before it reviews. Then it finds the second caller on its own.
@kang_0421 The lint rule beats my folder rule because it survives new people. One edge case: let tests import from scratch, or people copy helpers into the repo just to get CI green.
I started hyping up my Claude code like a proud tech lead. It now code and design like it wants a promotion ๐คฃ.
Iโm serious it became 10x better and correct.
Try it yourself and please let me know
@aslambeg84 D, but the framework is rarely the limit at 50k. The connection pool and the slowest downstream call are. Spring Boot with virtual threads keeps plain blocking code and survives both. Gin would too
@SpartacusX86 Juniors learned by doing the boring work the agent now does. My replacement: they review the agentโs diff and must say what breaks or at least understand why. That is the senior skill, and it can be taught in year one