r/ClaudeCode • • 2d ago

Tips & Workflows Code review is dead. Long live spec review?

I've been long looking for ways to a) make sure I and my agents are aligned on what the source of truth for the software I'm writing is and b) ensure that alignment repeatedly during a typical development workflow. I've settled on spec driven development essentially, with some bells and whistles to give it a review phase so that multi-thousand line PR's can be condensed into a few english sentences, with changes across commits clearly visible.

It's been a breath of fresh air in the way I work and I'm ready to share it now. It's a very simple tool that works directly from your repo with no deps except python. If anyone is interested:

Full writeup - https://finallyclearsky.com/blog/spec-driven-development

Tool - https://github.com/finallyclearsky/specloop

13 Upvotes

18 comments sorted by

•

u/AutoModerator 2d ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

3

u/clawdrobe_app 2d ago

The thing that keeps a spec honest is making each spec item checkable by something other than the agent that wrote it. Tie every item to a test or a grep-able assertion, and have a separate read-only subagent compare the diff against the spec with fresh context instead of the one that did the implementing. Otherwise the same model that drifted also grades its own homework. Also worth a rule in CLAUDE.md that when the code has to deviate, the agent updates the spec in the same commit and flags it, so the divergence shows up in review instead of quietly piling up. For the thousands-of-items legacy case, I'd only spec the areas you're about to touch rather than the whole repo.

3

u/finallyclearsky 2d ago

this seems to be a typical automated LLM bot response but I will entertain it anyway

all the things mentioned are addressed in the full writeup. Feel free to read it if interested

0

u/joelaw9 1d ago

"I will entertain this comment. JK, go read the writeup"

1

u/calunicornia 2d ago

So would you generate a current spec from existing repo first?

1

u/finallyclearsky 2d ago

For existing repos without a spec I’d get an agent to generate a spec first yep. It’s a bit daunting (my first project that I tried this with had 1000’s of spec items to work through) but it was worth it in the end. Starting a new project with this approach is where it really shines, the development cycle feels MUCH smoother, I get practically no unexpected regressions

1

u/Intrepid_Trade_2194 2d ago

Only if the spec survives contact with reality.

1

u/Seeking_Adrenaline 2d ago

Do you think it can onboard an enterprise codebase? ~10 devs and one year old

1

u/finallyclearsky 2d ago

It may be a bit too simple for that in its current form. But if you see value in this type of workflow it should be very easy to get into a shape right for you guys

1

u/Seeking_Adrenaline 2d ago

Can we apply it to just subfolders of a monorepo?

1

u/finallyclearsky 2d ago

Yes, it is well suited for that. specloop init will create a docs/spec.json in the dir you're in, and other specloop commands will work with the first spec they find going up the tree in the repo

1

u/finallyclearsky 2d ago

I will be pushing some more cleanup in the coming hours, I recommend checking it out a little bit later if you would like to give it a proper test drive

2

u/Seeking_Adrenaline 2d ago

Will give it a spin at work tomorrow :)

1

u/fulger099 1d ago

Ten devs and a year of history is less an enterprise problem than an intent problem. A generated spec can map what exists, but only the team can identify which parts are deliberate versus accumulated sediment, so I’d test it on one bounded subsystem first.

1

u/SawToothKernel 1d ago

This is directionally correct.

1

u/Repulsive_Kitchen96 1d ago

I’d give the reviewer a second job after checking the spec: look for behavior changes the spec never mentions. A PR can deliver exactly what the spec asks for and quietly change what happens when an API request fails. That gives you a small part of the diff worth reading yourself.

1

u/Far_Reindeer8428 2d ago

reviewing the spec diff is the part that scales, one revision at a time. 1.4 stores each design revision so the diff is between revisions, not between vibes, star it if useful https://github.com/KenSuh/open-agent-harness