<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Saygin Celen</title>
    <description>The latest articles on DEV Community by Saygin Celen (@saygincelen).</description>
    <link>https://dev.to/saygincelen</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4182430%2F43844b39-a43e-46e6-bd91-f05b7ebc16a6.png</url>
      <title>DEV Community: Saygin Celen</title>
      <link>https://dev.to/saygincelen</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/saygincelen"/>
    <language>en</language>
    <item>
      <title>Guardrails for AI-written code: what 1,156 merged PRs taught a non-developer</title>
      <dc:creator>Saygin Celen</dc:creator>
      <pubDate>Tue, 13 Oct 2026 14:48:59 +0000</pubDate>
      <link>https://dev.to/saygincelen/guardrails-for-ai-written-code-what-1156-merged-prs-taught-a-non-developer-216n</link>
      <guid>https://dev.to/saygincelen/guardrails-for-ai-written-code-what-1156-merged-prs-taught-a-non-developer-216n</guid>
      <description>&lt;p&gt;I don't write code. Between February and October 2026, Claude Code wrote the code for my product, SiteNeuro, and I reviewed it: 3,215 commits and 1,156 merged pull requests over 175 working days. The platform has been live for two months and has built more than 1,000 websites.&lt;/p&gt;

&lt;p&gt;Developers reviewing AI output have an advantage I didn't have: you can read the diff. But the failure modes I hit are the same ones you'll hit on any AI-assisted project that outgrows a single chat. Here are the guardrails that fixed them, with the templates.&lt;/p&gt;

&lt;h2&gt;
  
  
  The failure mode
&lt;/h2&gt;

&lt;p&gt;Pure chat-driven building ("vibe coding") breaks in a predictable way once a project gets big:&lt;/p&gt;

&lt;p&gt;Decisions live in the chat, and the chat forgets.&lt;/p&gt;

&lt;p&gt;Fixes collide, because nothing states the rules a fix must respect.&lt;/p&gt;

&lt;p&gt;Every session starts with re-explaining context.&lt;/p&gt;

&lt;p&gt;The answer isn't a better model. It's moving the memory out of the chat and into the repo.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. A constitution in the repo
&lt;/h3&gt;

&lt;p&gt;A short file of non-negotiables that the agent reads at the start of every session (Claude Code loads a project memory file automatically). &lt;/p&gt;

&lt;p&gt;Mine is grouped by concern. A shortened version:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;QUALITY
Every screen is designed for a phone first.
Every page loads in under 2 seconds on a mobile connection.

SAFETY AND PRIVACY
We never store card numbers.
Users can delete their account and data in one step.

MONEY
AI spending is limited per day, per month and per customer.
Anything that costs real money needs the founder's written OK first.

HOW WE WORK
No feature is built without a spec. When something changes, the spec changes first.
"Done" means checked on the live product.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The rule that matters most is the last section. It makes documents, not chats, the source of truth.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. A one-page spec per feature
&lt;/h3&gt;

&lt;p&gt;Before any code: a spec written from the user's side. The skeleton:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Summary          · what it is and why it matters
Who it's for     · the person and their situation
User stories     · As a [person], I want [x], so that [benefit]
Acceptance       · When [this happens], then [that happens]
Edge cases       · no internet / bad input / empty state / limit reached → behaviour
Out of scope     · what it deliberately doesn't do
Open questions   · NEEDS DECISION: anything not decided yet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The agent proposes the plan from this. "Out of scope" and "Open questions" do the most work: they stop the agent from inventing requirements, and they force decisions to be made by a person.&lt;/p&gt;

&lt;p&gt;If you want tooling for this, GitHub's open-source &lt;a href="https://github.com/github/spec-kit" rel="noopener noreferrer"&gt;Spec Kit&lt;/a&gt; gives you the constitution → specify → plan → tasks → implement flow as commands inside your AI tool.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. One small PR per task
&lt;/h3&gt;

&lt;p&gt;Plans get cut into tasks small enough to verify in minutes, and each meaningful change ships as a pull request with CI. As a non-developer, my review checklist was:&lt;/p&gt;

&lt;p&gt;Does the change match the spec?&lt;/p&gt;

&lt;p&gt;Do the checks pass?&lt;/p&gt;

&lt;p&gt;Does it work when I use it like a customer?&lt;/p&gt;

&lt;p&gt;Small PRs are what made that review possible. They also make every change reversible.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Every bug becomes a rule, then a test
&lt;/h3&gt;

&lt;p&gt;This is the compounding part. When something broke, the workflow was:&lt;/p&gt;

&lt;p&gt;Ask for causes before fixes.&lt;/p&gt;

&lt;p&gt;Write the lesson down as a rule next to the feature's spec, where the agent reads it on every build.&lt;/p&gt;

&lt;p&gt;For rules that must never break, add a test, so CI stops the build instead of relying on the agent remembering.&lt;/p&gt;

&lt;p&gt;A rule in English protects you when the agent reads it. A rule as a test protects you even when it doesn't.&lt;/p&gt;

&lt;p&gt;Example, as a pattern: a small bug looped and burned a day's AI budget. The lasting fix wasn't the loop. It was a spending limit on every AI call, plus a test that fails if anyone breaks it.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Four prompts
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Plan before you build&lt;/strong&gt; (every task, idea or bug):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Describe the task.] What is your understanding, concisely, in bullets?
What is your implementation plan? After proposing the plan, stop and ask
for my approval.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Hand off a heavy session&lt;/strong&gt; (long sessions degrade; fresh ones with a good handoff don't):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;This session is getting context-heavy. Provide me the self-contained
prompt for a new session to implement [task] seamlessly: the goal, the
files to read, the decisions already made, what's done, what's next,
and the branch and pull request.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Fix the cause, not the symptom:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;What I did: … What I expected: … What happened: … Where: … Every time?
Find the cause before changing anything: give me three possible causes
and how to test each one.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Turn other models' reviews into a plan.&lt;/strong&gt; Ask two or three other assistants to review a plan honestly, then give Claude all of it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Here's feedback from [other assistants]. For each suggestion, agree or
disagree and why, against our spec and constitution. Then turn what
survives into a prioritized action plan: now, next and later. Stop and
ask for my approval.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What changed
&lt;/h2&gt;

&lt;p&gt;The early months were full of repeat bugs. Once the memory lived in the repo (constitution, specs, rules, tests), the later months weren't. The codebase got easier to change each week instead of harder.&lt;/p&gt;

&lt;p&gt;I wrote the full method up for people who don't code, with the complete templates, three builds and a 30-day challenge: &lt;br&gt;
&lt;a href="https://siteneuro.com/book?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=guardrails" rel="noopener noreferrer"&gt;Build Your AI Platform&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Chapter 1 is free on the page. There's also a shorter, beginner-friendly guide on the blog: &lt;a href="https://siteneuro.com/blog/how-to-build-an-ai-app-without-coding" rel="noopener noreferrer"&gt;How to Build an AI App Without Coding&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;What guardrails have you added to your own AI-assisted projects? I'd like to learn what I'm missing.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>productivity</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
