<?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: Light</title>
    <description>The latest articles on DEV Community by Light (@comerade2134).</description>
    <link>https://dev.to/comerade2134</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%2F4089843%2F7e3fec0d-d9bd-4c24-b9d0-8f6179ed8a57.png</url>
      <title>DEV Community: Light</title>
      <link>https://dev.to/comerade2134</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/comerade2134"/>
    <language>en</language>
    <item>
      <title>[Boost]</title>
      <dc:creator>Light</dc:creator>
      <pubDate>Sat, 22 Aug 2026 15:25:33 +0000</pubDate>
      <link>https://dev.to/comerade2134/-bd6</link>
      <guid>https://dev.to/comerade2134/-bd6</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/comerade2134/i-got-tired-of-ai-code-assistants-breaking-our-project-architecture-so-i-built-archsentry-f9h" class="crayons-story__hidden-navigation-link"&gt;I got tired of AI code assistants breaking our project architecture, so I built ArchSentry&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/comerade2134" class="crayons-avatar  crayons-avatar--l  "&gt;
            &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4089843%2F7e3fec0d-d9bd-4c24-b9d0-8f6179ed8a57.png" alt="comerade2134 profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/comerade2134" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Light
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Light
                
                
              
              &lt;div id="story-author-preview-content-4462639" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/comerade2134" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&gt;
                        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4089843%2F7e3fec0d-d9bd-4c24-b9d0-8f6179ed8a57.png" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Light&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/comerade2134/i-got-tired-of-ai-code-assistants-breaking-our-project-architecture-so-i-built-archsentry-f9h" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Aug 22&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/comerade2134/i-got-tired-of-ai-code-assistants-breaking-our-project-architecture-so-i-built-archsentry-f9h" id="article-link-4462639"&gt;
          I got tired of AI code assistants breaking our project architecture, so I built ArchSentry
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/javascript"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;javascript&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/ai"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;ai&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/opensource"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;opensource&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/devops"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;devops&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/comerade2134/i-got-tired-of-ai-code-assistants-breaking-our-project-architecture-so-i-built-archsentry-f9h" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;1&lt;span class="hidden s:inline"&gt;&amp;nbsp;reaction&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/comerade2134/i-got-tired-of-ai-code-assistants-breaking-our-project-architecture-so-i-built-archsentry-f9h#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              

              1&lt;span class="hidden s:inline"&gt;&amp;nbsp;comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            2 min read
          &lt;/small&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
    </item>
    <item>
      <title>I got tired of AI code assistants breaking our project architecture, so I built ArchSentry</title>
      <dc:creator>Light</dc:creator>
      <pubDate>Sat, 22 Aug 2026 15:24:43 +0000</pubDate>
      <link>https://dev.to/comerade2134/i-got-tired-of-ai-code-assistants-breaking-our-project-architecture-so-i-built-archsentry-f9h</link>
      <guid>https://dev.to/comerade2134/i-got-tired-of-ai-code-assistants-breaking-our-project-architecture-so-i-built-archsentry-f9h</guid>
      <description>&lt;p&gt;Hey everyone,&lt;/p&gt;

&lt;p&gt;Lately my team has been using Cursor and Copilot a lot. While it writes code super fast, I kept noticing that it quietly breaks architectural boundaries in our PRs. For example, it would start writing raw database queries straight inside API route handlers instead of using our repository layer, or importing internal modules across domain boundaries.&lt;/p&gt;

&lt;p&gt;ESLint and standard linters didn't really catch this without writing tedious custom AST plugins, and paying for AI review bots just to check simple rules got expensive and slow on CI.&lt;/p&gt;

&lt;p&gt;So over the past few weeks, I built &lt;strong&gt;ArchSentry&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;It’s an open-source CLI and CI gate where you define your team's architectural invariants in a simple YAML contract (&lt;code&gt;archsentry.yml&lt;/code&gt;). For example: &lt;em&gt;"files inside &lt;code&gt;/controllers&lt;/code&gt; can never contain &lt;code&gt;db.query&lt;/code&gt; or SQL strings"&lt;/em&gt;.&lt;/p&gt;




&lt;p&gt;How it Works:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;           ┌──────────────────────────────┐
           │    Pull Request Git Diff     │
           └──────────────┬───────────────┘
                          │
                (Deterministic Gate)
                          ▼
           ┌──────────────────────────────┐
           │ ArchSentry Engine Registry   │
           │  - Sub-ms Pattern Matcher    │
           │  - AST Semgrep Interpreter   │
           └──────────────┬───────────────┘
                          │
                [0 Violations: Exit 0]
                [Violations Found: Exit 1]
                          │
                          ▼
           ┌──────────────────────────────┐
           │   Contextual Remediation     │
           │  (OpenRouter Free / Ollama)  │
           └──────────────┬───────────────┘
                          │
                          ▼
           ┌──────────────────────────────┐
           │ PR Comment / Terminal Output │
           └──────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Deterministic Scan ($0 Cost, &amp;lt;100ms): Matches code and PR diffs against your rules using regex and AST/Semgrep patterns. Zero LLM tokens spent finding violations.&lt;/li&gt;
&lt;li&gt;Contextual Remediation (Optional): When a violation is flagged, you can optionally pass --explain to let an LLM (or local Ollama / OpenRouter free models) generate a concise 2-sentence fix hint on how to maintain the proper abstraction layer.&lt;/li&gt;
&lt;li&gt;Diff-Aware Line Filtering: Instead of failing on legacy technical debt, you can pipe a git diff to scan only the lines changed in that specific PR.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;30-Second Quickstart (Zero Install via npx)&lt;br&gt;
You can run it in any repo without installing anything:&lt;/p&gt;
&lt;h1&gt;
  
  
  Scan a directory against your contract
&lt;/h1&gt;

&lt;p&gt;npx archsentry scan --config archsentry.yml --path .&lt;/p&gt;
&lt;h1&gt;
  
  
  Or pipe git diff directly
&lt;/h1&gt;

&lt;p&gt;git diff main...HEAD | npx archsentry scan --config archsentry.yml --diff -&lt;/p&gt;

&lt;p&gt;GitHub Actions Integration&lt;br&gt;
Add .github/workflows/archsentry.yml:&lt;br&gt;
name: Architectural Gate&lt;/p&gt;

&lt;p&gt;on:&lt;br&gt;
  pull_request:&lt;br&gt;
    branches: [main]&lt;/p&gt;

&lt;p&gt;jobs:&lt;br&gt;
  archsentry-scan:&lt;br&gt;
    name: Architectural Integrity Gate&lt;br&gt;
    runs-on: ubuntu-latest&lt;br&gt;
    steps:&lt;br&gt;
      - uses: actions/checkout@v4&lt;br&gt;
      - uses: actions/setup-node@v4&lt;br&gt;
        with:&lt;br&gt;
          node-version: 20&lt;br&gt;
      - run: npx --yes archsentry scan --config archsentry.yml --path .&lt;/p&gt;

&lt;p&gt;Open Source &amp;amp; Repo&lt;br&gt;
I just published &lt;a href="mailto:archsentry@0.3.0"&gt;archsentry@0.3.0&lt;/a&gt; under the MIT license:&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/comerade2134" rel="noopener noreferrer"&gt;
        comerade2134
      &lt;/a&gt; / &lt;a href="https://github.com/comerade2134/ArchSentry" rel="noopener noreferrer"&gt;
        ArchSentry
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Enforce your team's architecture rules on every PR. Deterministic, config-first, free to scan.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;🛡️ ArchSentry&lt;/h1&gt;
&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Enforce your team's architectural contracts on every pull request — deterministically, at zero scan token cost, with instant AI remediation.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://www.npmjs.com/package/archsentry" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/ae52845c5a21989cd8b30d1b7d8475cfe09d2f0eafc9b3b727b25a49059ed709/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f6172636873656e7472792e7376673f7374796c653d666c61742d73717561726526636f6c6f723d434233383337" alt="npm version"&gt;&lt;/a&gt;
&lt;a href="https://github.com/comerade2134/archsentry/actions" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/87427b3bea662e9b91076ae84590ea39df623061c5df8ba1b05271ef74fe82e6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f636f6d6572616465323133342f6172636873656e7472792f63692e796d6c3f6272616e63683d6d61696e267374796c653d666c61742d737175617265266c6162656c3d4349" alt="CI Status"&gt;&lt;/a&gt;
&lt;a href="https://opensource.org/licenses/MIT" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/a7e65aee57b11d28e4caff8b945729a66be0bb663f7f93bd24c5aa65699f148e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265" alt="License: MIT"&gt;&lt;/a&gt;
&lt;a href="https://nodejs.org" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/24e1d32251fb956d2ea78e7a2164582c9819ef95d45d3adefe78a750fe35f2bb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6e6f64652d25334525334431382d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265" alt="Node Version"&gt;&lt;/a&gt;
&lt;a href="https://github.com/comerade2134/archsentry" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/eff49735873e4b30d19881c113e70918aaa438aeb55e78ae57ab14c2df138f67/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5363616e253230436f73742d2532343025323044657465726d696e69737469632d737563636573732e7376673f7374796c653d666c61742d737175617265" alt="Zero Config Token Cost"&gt;&lt;/a&gt;
&lt;a href="https://semgrep.dev" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/118583ae0db9b0baab4f1c9d32d1f7cdc26fa127c3cce6638e667e1b73b98b11/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f456e67696e652d5061747465726e25323025374325323053656d677265702532304153542d6f72616e67652e7376673f7374796c653d666c61742d737175617265" alt="Semgrep Engine Compatible"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;⚡ Terminal Demo&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;$ npx archsentry scan --config archsentry.yml --path src --explain

❌ ArchSentry found 1 violation(s) (1 error, 0 warnings):

  • [error] no-direct-sql  src/controllers/user.controller.ts:7
    All database writes must go through the repository layer.
    &lt;span class="pl-k"&gt;&amp;gt;&lt;/span&gt; await db.query(&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;INSERT INTO users (email, name) VALUES (&lt;span class="pl-smi"&gt;$1&lt;/span&gt;, &lt;span class="pl-smi"&gt;$2&lt;/span&gt;)&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;, [payload.email, payload.name])&lt;span class="pl-k"&gt;;&lt;/span&gt;
    💡 Remediation: All database writes must go through the repository layer. Move this call
       behind the appropriate service or repository layer so the access path is centralized
       and reviewable, rather than issued directly from &lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;`&lt;/span&gt;src/controllers/user.controller.ts&lt;span class="pl-pds"&gt;`&lt;/span&gt;&lt;/span&gt;.

$ &lt;span class="pl-c1"&gt;echo&lt;/span&gt; &lt;span class="pl-smi"&gt;$?&lt;/span&gt;
1&lt;/pre&gt;

&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;💡 Why ArchSentry?&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;AI coding assistants (Cursor, Copilot, Claude Code) generate thousands of lines of code per day. While standard linters catch syntax errors and SAST tools detect known CVE vulnerabilities, &lt;strong&gt;neither&lt;/strong&gt;…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/comerade2134/ArchSentry" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;I'd really love feedback from fellow engineers on the rule schema, or what kind of architectural guardrails you find yourself having to manually police in PRs!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>ai</category>
      <category>opensource</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
