DEV Community

Cover image for How My Coworker Who Didn't Know 'cd' Shipped to Production

How My Coworker Who Didn't Know 'cd' Shipped to Production

Matty Stratton on April 23, 2026

This morning, our Design Lead asked me how to get her terminal into the right folder. Tanya [6:57 AM] my ghost isnt in tiger den anymore! GAH do...
Collapse
 
mickyarun profile image
arun rajkumar

The framing "the agent isn't the hard part, the scaffolding around it is" is exactly what most AI-in-DevOps writeups miss. We let a non-engineer audit env configs across our payments services last quarter — the agent was useless without the guardrails: a typed schema it had to output against, a diff preview a human approved, and a rollback mutex it literally could not skip. Scaffolding took a week; the agent prompts took an afternoon. The teams that quietly outship in 2026 will be the ones who got this order right, not the ones chasing raw model capability.

Collapse
 
xwero profile image
david duymelinck

While I like the git and CI setup, I'm wondering where AI helps?

The Don't do git push in Claude.md is stopped by the hook. So why keep it in Claude.md?

/pr could be a make command or whatever script runner you prefer. You can integrate an LLM call in the command to generate the message.

From what I read between the lines is that you are pushing/leading people to the command line/terminal. If people want to use Claude why not let them use the desktop app?
With the desktop app one of the session setup parts is the directory. So no need for cd.
And then the Don't do git push line makes sense, otherwise the Claude app is burning tokens getting the same git hook message every time.
Give visual people a GUI. We are used to seeing text all the time, but it is because we are weird (in a good way).

Collapse
 
mattstratton profile image
Matty Stratton

The Don't do git push in Claude.md is stopped by the hook. So why keep it in Claude.md?

Yeah I think I didn’t write that part of the post very clearly; that’s exactly correct and it shouldn’t be there. It started there for me/us and then it became apparent that didn’t work.

And the CLAUDE.md doesn’t say “don’t push to main” it says “don’t push to origin directly/try to make up your own way of doing PRs, use the skill”. And guess what, it still sometimes doesn’t use the skill. But it’s not the end of the world if it doesn’t use the skill; it just isn’t as good. Many of the things the skill does (from a safety perspective) will be done by the CI as well; but having the agent do them before the push saves having the CI then fail it, and wasting the time.

The critical safety thing that cannot be done differently is the pushing to the wrong branch, that's why that one is a hook and I think what I was trying to illustrate by the golden rules was almost a little bit of irony that it's called a golden rule and that's almost the most direct way to refer to them in something like a Claude.md. Even then they can get bypassed so that's why things are layered.

Collapse
 
mattstratton profile image
Matty Stratton

I think there's something in between the lines getting lost here, I'm not saying that the AI being there is helping the code that Tanya writes herself be checked, this is to make sure that the process that the AI uses that she (and myself, and others) is asking it to build with is following the rules.

I would never sit there and say you should layer an AI on to make sure that code that you are writing yourself is deployed correctly. We were doing that before there was AI. This is how we have the agents themselves follow rules. Yes many of those rules don't require something built into the agent but the PR flow is actually not as simple as something an make command could do. It may be becoming a little oversimplified in my ability to write this into a blog post but it includes loops. It includes certain decision trees. It's not just simply a bash script... nothing wrong with bash scripts by the way.

Also there's a little bit of a joke in here about the terminal but I am not the one that would ever tell anybody you should just do everything at the command line. This works exactly the same way if you're using Claude code on the desktop. Also even if you're using Claude code on the desktop there's at least one part where you have to use the terminal, which is to get the repo on your machine. There is no way in Claude code on the desktop, as an example, to say go get this from this GitHub repo on the web. Although if you are using Claude code in the web UI, it does have that, which has a nice advantage but that's a different story.

Anyway yes I know how to build all of those things without using AI and this was not about saying how to use AI to do the things we've already been doing with these other tools. This is saying if you are using AI as your coding agent, here's how you can embed some of these things.

Collapse
 
mattstratton profile image
Matty Stratton

Also if it wasn't clear in my comment that I first posted, I appreciate you taking the time to read this and comment on it and help me see things that I wasn't framing clearly in my post! I appreciate it

Collapse
 
xwero profile image
david duymelinck • Edited

I think the emphasis on Claude.md and skills feels to me like you are downplaying your work.
It takes up a large part of the post, while it is only one of the situations that benefit from the great setup.

When you are opening with "person that doesn't know cd" and mentioning Claude code and Claude.md a few times, I'm thinking terminal, so that can be chalked up to my perceptive.

not as simple as something an make command could do

Make can run anything, it is not only bash scripts.
The thing I wanted to make clear was that the PR procedure doesn't need to burn tokens. Use AI where it makes the process easier.

I'm commenting because your post has valuable information. It just felt a bit off for me, and I wanted to address that.

Thread Thread
 
mattstratton profile image
Matty Stratton

I love it! Also after I read your comment it made me go back through our PR skill and look for ways to make it more token efficient so thanks for that! You are saving my usage rates !

Like everything else in this business of ours, there is no one panacea for everything and it isn't all solved with one tool but you know that as well as I do :)

Collapse
 
peacebinflow profile image
PEACEBINFLOW

The thing that lands for me here isn't the three-layer model itself—rules, skills, hooks is a clean taxonomy but not a surprising one. What's more interesting is the recognition that the scaffolding is the product, not the agent.

I've been circling a similar thought lately: we spend a lot of energy evaluating coding agents by what they can produce, but almost none evaluating the quality of the guardrails around them. A junior developer with a great CI pipeline and a clear code review process will out-ship a genius working alone with no safety net. The same seems true for agents, but the industry conversation is still mostly "which model scores highest on SWE-bench" rather than "which team has the best pre-push hook setup."

The part I keep coming back to is the SessionStart hook checking that the database is development and not production before the agent even gets to think. That's the kind of thing that sounds paranoid until you've been woken up at 2 AM once, and then it sounds obvious. How many of those checks did you add before something bad happened versus after? I'm trying to get better at writing the "before" ones, but most of mine still come from scars.

Collapse
 
mattstratton profile image
Matty Stratton

“ How many of those checks did you add before something bad happened versus after?”

That’s a great point! I’d say it’s a mix. Although most of mine come from scars too, but they are decades of scars.

There’s something helpful about having a pessimistic and paranoid sysadmin building / contributing to this stuff that helps :)

Collapse
 
mattstratton profile image
Matty Stratton

the industry conversation is still mostly "which model scores highest on SWE-bench" rather than "which team has the best pre-push hook setup."

This is really a great insight and it’s spot on…and sadly unsurprisingly true

Collapse
 
gentleaffair274 profile image
Northbeam Studio

This is one of the best framings of the "AI + non-engineers" conversation I've seen. The key insight — "make the system paranoid instead of making the person paranoid" — applies way beyond just coding agents. I've been exploring a similar pattern with AI-powered productivity tools: instead of relying on the user to prompt perfectly, you build the quality checks into the pipeline itself. The same principle works for AI-assisted outreach and automation — the guardrails matter more than the prompts.

Collapse
 
laura_ashaley_be356544300 profile image
Laura Ashaley

Love this proof that curiosity, persistence, and practical problem-solving can matter more than perfect command-line knowledge.

Collapse
 
itskondrat profile image
Mykola Kondratiuk

the best part is she shipped something. most people who know cd backward and forward are still waiting for perfect conditions.