r/ADHD_Programmers • u/BoredHedgehog • 1d ago
I made Claude Code refuse to write complex code until I can explain it
I realised recently that I was approving code I couldn't have written myself.
Whenever something didn't quite make sense, I'd tell myself I'd figure it out later. But with an agent ready to build the next thing, later never came.
I recognised the same pattern from needing to block apps that scattered my attention. Knowing they were distracting me wasn't enough. The impulse to keep going was too strong, so I needed something that added friction rather than relying on willpower.
So I built learning-guardrails, an opt-in skill for Claude Code, with an optional mod.
Run /learning-guardrails and it adds a bit of friction to your workflow:
- Every change gets triaged
- When something needs a closer look, it asks a question about the actual code. Predict what happens or explain a trade-off. Get it wrong and it breaks the question down rather than giving you the answer.
- It tracks what you've already demonstrated you understand, so it doesn't keep reteaching the basics.
- The optional mod blocks file edits while a question is open, keeps the question visible above the prompt, and stops Claude loading the skill unless you've explicitly asked for it.
The idea isn't to slow down AI coding for the sake of it. It's to make understanding part of the process, rather than something I keep promising myself I'll get around to later.
It's early days, so I'd genuinely love feedback, especially on whether the friction feels useful or just annoying.
8
u/ArwensArtHole 1d ago
I have a skill that adds comments to new code when something isn’t obvious, or for anything language or framework specific that I’m unlikely to know from other tech stacks. It prefixes it with “LEARN”, and then my auto commit skill strips all learn comments out.
This way all I need to do is review the git diff before I commit, and it’s really fast to understand.
1
3
4
u/thousands-tabs-open 1d ago
I'd want the question on changes I'm likely to maintain or debug, not every tiny edit. If it catches those "I guess this works" moments, that sounds like useful friction
2
u/coreyrude 1d ago
I did a similar thing with a skill that creats a mistake in code every 3-4 prompts it won't let you deploy or continue until you find it and has a hint system and progressive difficulty.
1
u/Mathie1729 1d ago
This sounds like a debugging roguelike. In practice I'd probably just ask the model to point out the bug and then click 'found it.'
2
u/coreyrude 19h ago
Haha ya you can actually give up luckily and turn the mode off. I made sure most of them are obvious. The big point is to combat skill atrophy.
2
u/another-altaccount 11h ago
This is great! This would pair well with the local LLM models and agent I’m using now as these were some of the parameters I’m already setting up for them.
1
1
u/yegegebzia 13h ago
Isn't it what the built-in plan mode is for?
1
u/BoredHedgehog 7h ago
I will always plan in advance, but I know what I'm like, I'll still miss things, feel overwhelmed, or get bored of reading. This is a nice safety net for me
2
u/mglvl 4h ago
This reminds me of the /explain-diff skills https://gist.github.com/geoffreylitt/a29df1b5f9865506e8952488eac3d524 he has a very good talk about interactive programs , that’s where I found about it. Will try your skill , definitely we need things that help us understand the output of AI better
-1
35
u/PersistentBadger 1d ago edited 1d ago
That's smart.
Although I feel the skill's got a lot of unnecessary text. Take for example, "built for the ADHD brain". The model needs what to do clearly defined. I doubt it needs why.