<?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: David Jr O.</title>
    <description>The latest articles on DEV Community by David Jr O. (@divcozy).</description>
    <link>https://dev.to/divcozy</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3855407%2F877b3b86-2ea3-4a76-b322-5711dc1f20ce.png</url>
      <title>DEV Community: David Jr O.</title>
      <link>https://dev.to/divcozy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/divcozy"/>
    <language>en</language>
    <item>
      <title>Your project has .gitignore — where's your .rules/?</title>
      <dc:creator>David Jr O.</dc:creator>
      <pubDate>Wed, 01 Apr 2026 11:34:00 +0000</pubDate>
      <link>https://dev.to/divcozy/your-project-has-gitignore-wheres-your-rules-4fmn</link>
      <guid>https://dev.to/divcozy/your-project-has-gitignore-wheres-your-rules-4fmn</guid>
      <description>&lt;p&gt;Every developer in 2026 is using AI to write code.&lt;/p&gt;

&lt;p&gt;Almost none of them have a system for governing the output.&lt;/p&gt;

&lt;p&gt;I built one.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem Nobody Talks About
&lt;/h2&gt;

&lt;p&gt;AI writes code. But it also &lt;em&gt;breaks&lt;/em&gt; code. It removes imports you need. It truncates files to save tokens. It changes function signatures that three other modules depend on. It ignores your naming conventions, your architecture decisions, your project's entire history — because it doesn't know any of it.&lt;/p&gt;

&lt;p&gt;Every new AI session starts from zero. No memory of the time it broke your auth middleware. No memory that you use &lt;code&gt;camelCase&lt;/code&gt; for services and &lt;code&gt;PascalCase&lt;/code&gt; for components. No memory that you spent four hours last Tuesday fixing the code it "improved."&lt;/p&gt;

&lt;p&gt;We solved this problem for everything else years ago. Linting has &lt;code&gt;.eslintrc&lt;/code&gt;. Formatting has &lt;code&gt;.prettierrc&lt;/code&gt;. Editor behavior has &lt;code&gt;.editorconfig&lt;/code&gt;. Git has &lt;code&gt;.gitignore&lt;/code&gt;. But AI behavior? Nothing. No standard. No convention. No file that says "here's how AI should behave in this codebase."&lt;/p&gt;

&lt;p&gt;The result is predictable. Inconsistent output across sessions. Broken existing code that worked fine before AI touched it. Hours spent reviewing and fixing AI-generated code instead of shipping features. The tool that was supposed to make you faster is now the thing slowing you down.&lt;/p&gt;

&lt;p&gt;You're not bad at prompting. The problem is structural. There's no governance layer between your AI and your codebase.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution: RuleStack
&lt;/h2&gt;

&lt;p&gt;One command. That's it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx rulestack init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates a &lt;code&gt;.rules/&lt;/code&gt; directory in your project root with 25 governance files organized across 4 categories:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.rules/
  core/
    01-code-preservation.md
    02-file-integrity.md
    03-naming-conventions.md
    04-error-handling.md
    05-dependency-management.md
    06-security-baseline.md
  roles/
    frontend.md
    backend.md
    database.md
    devops.md
    security.md
    qa.md
  prompts/
    feature-request.md
    bug-fix.md
    refactor.md
    code-review.md
    migration.md
  quality/
    pre-commit-checklist.md
    review-checklist.md
    audit-template.md
    incident-response.md
    performance-baseline.md
    accessibility-checklist.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Core&lt;/strong&gt; — non-negotiable rules. Every AI session reads these. Code preservation, file integrity, naming conventions. The stuff that breaks when AI goes unsupervised.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Roles&lt;/strong&gt; — context-specific governance. When AI is working on your frontend, it gets frontend rules. When it's touching your database layer, it gets database rules. Right context, right constraints.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prompts&lt;/strong&gt; — structured templates for common tasks. Feature requests, bug fixes, refactors. No more freeform prompting that produces inconsistent results.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quality&lt;/strong&gt; — enforcement checklists. Pre-commit checks, review criteria, audit templates. The stuff that catches what AI missed before it hits production.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 12 Preservation Laws
&lt;/h2&gt;

&lt;p&gt;This is the core of RuleStack. Twelve rules that prevent AI from destroying your existing code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Never remove existing imports&lt;/strong&gt; — unless explicitly told to clean up unused imports&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never truncate files&lt;/strong&gt; — no "rest of file remains the same" shortcuts&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never change function signatures&lt;/strong&gt; — parameters, return types, and names are sacred&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never delete existing tests&lt;/strong&gt; — you can add tests, never remove them&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never modify unrelated code&lt;/strong&gt; — if the task is in &lt;code&gt;auth.js&lt;/code&gt;, don't touch &lt;code&gt;utils.js&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never remove error handling&lt;/strong&gt; — existing try/catch blocks exist for a reason&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never change environment variable names&lt;/strong&gt; — downstream systems depend on them&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never remove comments that explain "why"&lt;/strong&gt; — "what" comments are fair game&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never downgrade dependencies&lt;/strong&gt; — unless explicitly addressing a vulnerability&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never remove logging&lt;/strong&gt; — existing log statements are there for debugging production&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never change database column names&lt;/strong&gt; — migrations exist for a reason&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never remove feature flags&lt;/strong&gt; — they control rollout logic you don't see&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Every one of these comes from real production incidents. Every one of them has cost someone hours of debugging. Print this list. Pin it above your monitor. Share it with your team.&lt;/p&gt;

&lt;h2&gt;
  
  
  The COSCO Formula
&lt;/h2&gt;

&lt;p&gt;RuleStack prompt templates use the COSCO structure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;C&lt;/strong&gt;ontext — what does the AI need to know about the project?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;O&lt;/strong&gt;bjective — what is the specific task?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;S&lt;/strong&gt;cope — what files and boundaries apply?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;C&lt;/strong&gt;onstraints — what must NOT change?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;O&lt;/strong&gt;utput — what format should the result take?
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Context&lt;/span&gt;
[Project type, tech stack, relevant architecture]

&lt;span class="gu"&gt;## Objective&lt;/span&gt;
[Single, specific task statement]

&lt;span class="gu"&gt;## Scope&lt;/span&gt;
[Files to modify, boundaries to respect]

&lt;span class="gu"&gt;## Constraints&lt;/span&gt;
[What must not change, performance requirements, security rules]

&lt;span class="gu"&gt;## Output&lt;/span&gt;
[Expected format: code diff, full file, explanation, etc.]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Structured prompts produce structured output. Every time.&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Works
&lt;/h2&gt;

&lt;p&gt;Install and initialize in your project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;npx rulestack init

  RuleStack v1.0.0
  Installing governance rules...

  core/     6 rules installed
  roles/    6 roles installed
  prompts/  5 templates installed
  quality/  6 checklists installed

  25 rules installed to .rules/
  Run &lt;span class="sb"&gt;`&lt;/span&gt;rulestack list&lt;span class="sb"&gt;`&lt;/span&gt; to see all rules.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;View your rules by category:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;rulestack list

  CORE &lt;span class="o"&gt;(&lt;/span&gt;6&lt;span class="o"&gt;)&lt;/span&gt;
    01-code-preservation    Code preservation laws
    02-file-integrity       File integrity standards
    03-naming-conventions   Project naming rules
    ...

  ROLES &lt;span class="o"&gt;(&lt;/span&gt;6&lt;span class="o"&gt;)&lt;/span&gt;
    frontend    Frontend development context
    backend     Backend development context
    ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Audit your codebase against a specific role:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;rulestack audit &lt;span class="nt"&gt;--role&lt;/span&gt; security

  Security Audit Checklist
  &lt;span class="o"&gt;[&lt;/span&gt;x] Authentication middleware present
  &lt;span class="o"&gt;[&lt;/span&gt;x] Input validation on all endpoints
  &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt; Rate limiting configured
  &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt; CORS policy defined
  &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt; SQL injection protection verified

  3/5 checks passing. 2 items need attention.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What Makes This Different
&lt;/h2&gt;

&lt;p&gt;RuleStack is not a linter. It doesn't check your syntax.&lt;/p&gt;

&lt;p&gt;It's not a formatter. It doesn't style your code.&lt;/p&gt;

&lt;p&gt;It's not AI-specific. It works with Claude, GPT, Copilot, Cursor, or any AI that reads context files from your project.&lt;/p&gt;

&lt;p&gt;It's a &lt;strong&gt;standard&lt;/strong&gt;. Like &lt;code&gt;.editorconfig&lt;/code&gt; tells every editor how to behave in your project, &lt;code&gt;.rules/&lt;/code&gt; tells every AI how to behave in your project. The files are markdown. They're human-readable. They're version-controlled. They travel with your repo.&lt;/p&gt;

&lt;p&gt;Zero npm dependencies. Pure Node.js CLI. Nothing to audit, nothing to break, nothing to bloat your &lt;code&gt;node_modules&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Growth Loop
&lt;/h2&gt;

&lt;p&gt;Here's the thing about &lt;code&gt;.rules/&lt;/code&gt; — it markets itself.&lt;/p&gt;

&lt;p&gt;You commit it to your repo. A teammate clones the project, sees the &lt;code&gt;.rules/&lt;/code&gt; directory, and asks "what's this?" They read the files. They install RuleStack on their next project. Their teammates see it. The loop continues.&lt;/p&gt;

&lt;p&gt;Every public repo with &lt;code&gt;.rules/&lt;/code&gt; is a live demo. Every team that adopts it becomes a distribution channel. The standard spreads the same way &lt;code&gt;.gitignore&lt;/code&gt; spread — by being useful and visible.&lt;/p&gt;

&lt;h2&gt;
  
  
  Also from CozyDevKit: mdforge
&lt;/h2&gt;

&lt;p&gt;I also built &lt;a href="https://github.com/cozydevkit/mdforge" rel="noopener noreferrer"&gt;mdforge&lt;/a&gt; — it turns markdown files into beautiful, self-contained HTML documentation. Single file output, no build pipeline, no static site generator. Perfect for converting your &lt;code&gt;.rules/&lt;/code&gt; governance files into shareable docs your team can actually read.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx @cozydevkit/mdforge build README.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One command. One HTML file. Done.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try It
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx rulestack init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's the whole pitch. One command, 25 rules, zero dependencies.&lt;/p&gt;

&lt;p&gt;Star it on GitHub: &lt;a href="https://github.com/cozydevkit/rulestack" rel="noopener noreferrer"&gt;github.com/cozydevkit/rulestack&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Built by &lt;a href="https://cozydevkit.com" rel="noopener noreferrer"&gt;CozyDevKit&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;What governance rules does &lt;em&gt;your&lt;/em&gt; project need? Drop your &lt;code&gt;.rules/&lt;/code&gt; structure in the comments. I want to see what you're building.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>webdev</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
