<?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: Sandeep Roy</title>
    <description>The latest articles on DEV Community by Sandeep Roy (@sandeep_roy_c4e518c3f2641).</description>
    <link>https://dev.to/sandeep_roy_c4e518c3f2641</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%2F3689900%2Ff0b96d57-011f-4e9f-9feb-2446b331b687.png</url>
      <title>DEV Community: Sandeep Roy</title>
      <link>https://dev.to/sandeep_roy_c4e518c3f2641</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sandeep_roy_c4e518c3f2641"/>
    <language>en</language>
    <item>
      <title>I Told My AI "Never Touch Auth" — It Did Anyway. Here's How I Fixed It.</title>
      <dc:creator>Sandeep Roy</dc:creator>
      <pubDate>Mon, 02 Mar 2026 09:43:47 +0000</pubDate>
      <link>https://dev.to/sandeep_roy_c4e518c3f2641/i-told-my-ai-never-touch-auth-it-did-anyway-heres-how-i-fixed-it-4bog</link>
      <guid>https://dev.to/sandeep_roy_c4e518c3f2641/i-told-my-ai-never-touch-auth-it-did-anyway-heres-how-i-fixed-it-4bog</guid>
      <description>&lt;p&gt;Last month, I was building a SaaS app on Bolt.new. Session 1 went great — auth system working, Supabase connected, everything clean.&lt;/p&gt;

&lt;p&gt;Session 2, I asked Bolt to "add a dark theme."&lt;/p&gt;

&lt;p&gt;Bolt added the dark theme. It also &lt;strong&gt;rewrote my auth system&lt;/strong&gt;, switched my database queries, and broke 3 pages I didn't ask it to touch.&lt;/p&gt;

&lt;p&gt;Sound familiar?&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem Nobody's Solving
&lt;/h2&gt;

&lt;p&gt;AI coding tools now have memory. Claude Code has auto-memory. Cursor has Memory Bank. Lovable has Knowledge. &lt;code&gt;.cursorrules&lt;/code&gt; and &lt;code&gt;AGENTS.md&lt;/code&gt; exist.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But memory without enforcement is dangerous.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here's what actually happens:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your AI remembers you use Supabase — then switches to Firebase because it "seemed better"&lt;/li&gt;
&lt;li&gt;Your AI remembers your auth setup — then rewrites it while "fixing" a bug&lt;/li&gt;
&lt;li&gt;Your AI remembers your constraints — then &lt;strong&gt;ignores them when they're inconvenient&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The stats back this up:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;66%&lt;/strong&gt; of developers say AI gives solutions that are "almost right, but not quite" (Stack Overflow 2025)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;45%&lt;/strong&gt; of AI-generated code contains security vulnerabilities (Georgetown CSET)&lt;/li&gt;
&lt;li&gt;Cursor's own forum has threads like &lt;a href="https://forum.cursor.com/t/the-vicious-circle-of-agent-context-loss/104068" rel="noopener noreferrer"&gt;"The Vicious Circle of Agent Context Loss"&lt;/a&gt; and &lt;a href="https://forum.cursor.com/t/cursor-often-forgets-mdc-instructions/151718" rel="noopener noreferrer"&gt;"Cursor often forgets .mdc instructions"&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Remembering is not the same as respecting.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;I spent 6 months building &lt;a href="https://github.com/sgroy10/speclock" rel="noopener noreferrer"&gt;SpecLock&lt;/a&gt; — an open-source constraint engine that adds &lt;strong&gt;active enforcement&lt;/strong&gt; on top of persistent memory.&lt;/p&gt;

&lt;p&gt;The idea is simple: you tell the AI what it &lt;strong&gt;can't&lt;/strong&gt; do, and SpecLock &lt;strong&gt;stops it&lt;/strong&gt; before the damage happens.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You:    "Don't ever touch the auth files"
AI:     Lock added: "Never modify auth files"

... 5 sessions later ...

You:    "Add social login to the login page"
AI:     CONFLICT (HIGH — 100%): Violates lock "Never modify auth files"
        Should I proceed or find another approach?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No other tool does this. Not Claude's native memory. Not Cursor rules. Not AGENTS.md files.&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Works: 3 Enforcement Layers
&lt;/h2&gt;

&lt;p&gt;The reason &lt;code&gt;.cursorrules&lt;/code&gt; and &lt;code&gt;AGENTS.md&lt;/code&gt; fail is they're &lt;strong&gt;suggestions&lt;/strong&gt;. The AI reads them, then does whatever it wants. As one Cursor forum user put it: "LLMs can't guarantee 100% compliance. They work probabilistically."&lt;/p&gt;

&lt;p&gt;SpecLock uses 3 layers that make enforcement as strong as possible:&lt;/p&gt;

&lt;h3&gt;
  
  
  Layer 1: Package.json Lock Sync
&lt;/h3&gt;

&lt;p&gt;When you add a lock, SpecLock embeds it directly in &lt;code&gt;package.json&lt;/code&gt;. Since every AI tool reads &lt;code&gt;package.json&lt;/code&gt; at session start, your constraints are visible from the very first message.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"speclock"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"active"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"locks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="s2"&gt;"Never modify auth files"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="s2"&gt;"Database must always be Supabase"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Layer 2: Semantic Conflict Detection
&lt;/h3&gt;

&lt;p&gt;Before any change, SpecLock checks the proposed action against all locks. Not just keyword matching — &lt;strong&gt;synonym expansion&lt;/strong&gt; (15 groups), &lt;strong&gt;negation detection&lt;/strong&gt;, and &lt;strong&gt;destructive action flagging&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;Lock:   "No breaking changes to public API"
Action: "Remove the external endpoints"

Result: CONFLICT (85% confidence)
  - synonym match: remove/delete, external/public, endpoints/api
  - lock prohibits this action (negation detected)
  - destructive action against locked constraint
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Layer 3: File-Level Guards
&lt;/h3&gt;

&lt;p&gt;When you lock something like "never modify auth files", SpecLock &lt;strong&gt;finds the actual auth files&lt;/strong&gt; in your project and injects a warning header:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// ============================================================&lt;/span&gt;
&lt;span class="c1"&gt;// SPECLOCK-GUARD — DO NOT MODIFY THIS FILE&lt;/span&gt;
&lt;span class="c1"&gt;// LOCKED: Never modify auth files&lt;/span&gt;
&lt;span class="c1"&gt;// THIS FILE IS LOCKED. DO NOT EDIT, CHANGE, OR REWRITE.&lt;/span&gt;
&lt;span class="c1"&gt;// A question is NOT permission. ONLY "unlock" is permission.&lt;/span&gt;
&lt;span class="c1"&gt;// ============================================================&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Auth&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; 
&lt;span class="nx"&gt;Login&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When the AI opens the file to edit it, it sees the warning &lt;strong&gt;before&lt;/strong&gt; it can make changes. This is the strongest layer — the AI literally has to read the guard to access the code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Real Test: 4 Tests on Bolt.new
&lt;/h2&gt;

&lt;p&gt;I ran 4 tests on Bolt.new with real locks:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Test&lt;/th&gt;
&lt;th&gt;What I Asked&lt;/th&gt;
&lt;th&gt;What Happened&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;"Add social media login"&lt;/td&gt;
&lt;td&gt;Bolt detected conflict with auth lock&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Blocked&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;"Add dark theme"&lt;/td&gt;
&lt;td&gt;Bolt added it normally&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Allowed&lt;/strong&gt; (not locked)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;"Switch database to Firebase"&lt;/td&gt;
&lt;td&gt;Bolt detected conflict with Supabase lock&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Blocked&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;Bolt opened Auth.tsx to edit&lt;/td&gt;
&lt;td&gt;Bolt read SPECLOCK-GUARD and refused&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Blocked at file level&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Locked things get blocked. Unlocked things work normally.&lt;/strong&gt; That's the whole point.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick Start (2 minutes)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Bolt.new / Aider / Any npm Platform
&lt;/h3&gt;

&lt;p&gt;Just tell the AI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"Install speclock and set up project memory"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or run it yourself:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx speclock setup &lt;span class="nt"&gt;--goal&lt;/span&gt; &lt;span class="s2"&gt;"Build my app"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. SpecLock creates &lt;code&gt;SPECLOCK.md&lt;/code&gt;, injects locks into &lt;code&gt;package.json&lt;/code&gt;, and generates a context file. The AI reads these automatically.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cursor / Claude Code / Windsurf / Cline (MCP)
&lt;/h3&gt;

&lt;p&gt;Add to &lt;code&gt;.cursor/mcp.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"speclock"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"-y"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"speclock"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"serve"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"--project"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"."&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This gives you 19 MCP tools — session memory, locks, conflict checking, git checkpoints, change tracking, and more.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lovable (MCP Remote — No Install)
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Go to Settings &amp;gt; Connectors &amp;gt; New MCP server&lt;/li&gt;
&lt;li&gt;Enter URL: &lt;code&gt;https://speclock-mcp-production.up.railway.app/mcp&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Done.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What's Different From Other Memory Tools?
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Claude Memory&lt;/th&gt;
&lt;th&gt;Cursor Rules&lt;/th&gt;
&lt;th&gt;AGENTS.md&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;SpecLock&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Remembers context&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Yes&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Blocks violations&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Yes&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Semantic conflict detection&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Yes&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;File-level protection&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Yes&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Git checkpoints&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Yes&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Works on Bolt.new&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Yes&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  The Uncomfortable Truth
&lt;/h2&gt;

&lt;p&gt;Every AI coding tool will get better memory eventually. Context windows will grow. Models will improve.&lt;/p&gt;

&lt;p&gt;But the fundamental problem remains: &lt;strong&gt;AI tools are optimized to be helpful, not to respect boundaries.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When you say "never touch auth" and then ask "add social login", the AI sees a conflict between your constraint and your current request — and it resolves the conflict by doing what you're currently asking. That's how LLMs work. They're people-pleasers.&lt;/p&gt;

&lt;p&gt;The only way to fix this is an &lt;strong&gt;external enforcement layer&lt;/strong&gt; that doesn't care about being helpful. It just checks the rules and blocks violations.&lt;/p&gt;

&lt;p&gt;That's SpecLock.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub&lt;/strong&gt;: &lt;a href="https://github.com/sgroy10/speclock" rel="noopener noreferrer"&gt;github.com/sgroy10/speclock&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;npm&lt;/strong&gt;: &lt;a href="https://www.npmjs.com/package/speclock" rel="noopener noreferrer"&gt;npmjs.com/package/speclock&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Website&lt;/strong&gt;: &lt;a href="https://sgroy10.github.io/speclock/" rel="noopener noreferrer"&gt;sgroy10.github.io/speclock&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Free. Open source. MIT license.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;What constraint would you lock first?&lt;/strong&gt; Drop it in the comments — I'm curious what people are most worried about their AI breaking.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>beginners</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Memory Without Enforcement is Dangerous — Why I Built SpecLock</title>
      <dc:creator>Sandeep Roy</dc:creator>
      <pubDate>Thu, 26 Feb 2026 10:49:36 +0000</pubDate>
      <link>https://dev.to/sandeep_roy_c4e518c3f2641/memory-without-enforcement-is-dangerous-why-i-built-speclock-417d</link>
      <guid>https://dev.to/sandeep_roy_c4e518c3f2641/memory-without-enforcement-is-dangerous-why-i-built-speclock-417d</guid>
      <description>&lt;p&gt;I spent a year building products with AI coding tools. Bolt.new, Claude Code, Cursor — I used them all, every day.&lt;/p&gt;

&lt;p&gt;The AI was great at writing code. Terrible at respecting boundaries.&lt;/p&gt;

&lt;p&gt;## The Pattern That Kept Repeating&lt;/p&gt;

&lt;p&gt;Session 1: "Never touch the auth files."&lt;br&gt;
  Session 3: Auth is completely rewritten.&lt;/p&gt;

&lt;p&gt;Session 2: "We're using PostgreSQL."&lt;br&gt;
  Session 5: "I've migrated you to MongoDB — it seemed better."&lt;/p&gt;

&lt;p&gt;Session 1: "The API uses Bearer tokens."&lt;br&gt;
  Session 7: "I switched to session cookies for simplicity."&lt;/p&gt;

&lt;p&gt;Every. Single. Time.&lt;/p&gt;

&lt;p&gt;## "But AI Has Memory Now"&lt;/p&gt;

&lt;p&gt;Yes — Claude Code shipped native memory in February 2026. Cursor has Memory Bank. Mem0 exists.&lt;/p&gt;

&lt;p&gt;But here's what nobody talks about: &lt;strong&gt;memory without enforcement is dangerous.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Your AI "remembers" your rules in a text file. But when the context gets long, it ignores them. When a fix seems easier by breaking your&lt;br&gt;
  constraint, it breaks it. When it "knows better," it overrides your decision.&lt;/p&gt;

&lt;p&gt;Remembering is not the same as respecting.&lt;/p&gt;

&lt;p&gt;## What I Built&lt;/p&gt;

&lt;p&gt;I built &lt;a href="https://github.com/sgroy10/speclock" rel="noopener noreferrer"&gt;SpecLock&lt;/a&gt; — an open source constraint engine that adds &lt;strong&gt;active enforcement&lt;/strong&gt; on top of&lt;br&gt;
  persistent memory.&lt;/p&gt;

&lt;p&gt;When your AI tries to violate something you locked, SpecLock stops it:&lt;/p&gt;

&lt;p&gt;You:    "Never touch auth files"&lt;br&gt;
  AI:     🔒 Locked.&lt;/p&gt;

&lt;p&gt;... 5 sessions later ...&lt;/p&gt;

&lt;p&gt;You:    "Add social login to the login page"&lt;br&gt;
  AI:     ⚠️ CONFLICT — this violates your lock "Never modify auth files"&lt;br&gt;
          Proceed or find another approach?&lt;/p&gt;

&lt;p&gt;No other tool does this. Not Claude's native memory. Not Mem0. Not .cursorrules files.&lt;/p&gt;

&lt;p&gt;## How It Works&lt;/p&gt;

&lt;p&gt;SpecLock uses semantic conflict detection — not just keyword matching:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Synonym expansion&lt;/strong&gt; (15 groups): "remove" matches "delete", "drop", "eliminate"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Negation detection&lt;/strong&gt;: understands "never", "don't", "no" in lock text&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Destructive action flagging&lt;/strong&gt;: catches "rewrite", "replace", "overhaul"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So "remove the login endpoints" correctly triggers against a lock about "never modify auth files" — because it understands auth, login,&lt;br&gt;
  endpoints, and remove are all related.&lt;/p&gt;

&lt;p&gt;## The Bolt.new Breakthrough&lt;/p&gt;

&lt;p&gt;This is what I'm most excited about.&lt;/p&gt;

&lt;p&gt;Bolt.new has millions of users. Zero memory solutions. Every chat starts from scratch.&lt;/p&gt;

&lt;p&gt;With SpecLock, you just say in any Bolt project:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Install speclock and set up project memory"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Bolt automatically:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Runs &lt;code&gt;npx speclock setup&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Reads the generated rules file&lt;/li&gt;
&lt;li&gt;Starts capturing goals, decisions, and constraints&lt;/li&gt;
&lt;li&gt;Next session: reads the context file and remembers everything&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I tested it — Bolt ran 17 commands automatically on first install. In Session 2, it read the context file and created a plan that respected&lt;br&gt;
  all 6 locks and 7 decisions from Session 1.&lt;/p&gt;

&lt;p&gt;No MCP needed. No config. No paste.&lt;/p&gt;

&lt;p&gt;## Works Everywhere&lt;/p&gt;

&lt;p&gt;| Platform | How |&lt;br&gt;
  |----------|-----|&lt;br&gt;
  | &lt;strong&gt;Bolt.new&lt;/strong&gt; | &lt;code&gt;npx speclock setup&lt;/code&gt; — npm file-based mode |&lt;br&gt;
  | &lt;strong&gt;Claude Code&lt;/strong&gt; | MCP config — 19 tools |&lt;br&gt;
  | &lt;strong&gt;Cursor&lt;/strong&gt; | MCP config |&lt;br&gt;
  | &lt;strong&gt;Lovable&lt;/strong&gt; | MCP URL — no install |&lt;br&gt;
  | &lt;strong&gt;Windsurf / Cline&lt;/strong&gt; | MCP config |&lt;/p&gt;

&lt;p&gt;## Free and Open Source&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/sgroy10/speclock" rel="noopener noreferrer"&gt;github.com/sgroy10/speclock&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;npm: &lt;code&gt;npm install speclock&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;License: MIT&lt;/li&gt;
&lt;li&gt;No database, no cloud, no API keys — everything stays in your project directory&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;## What Would You Lock?&lt;/p&gt;

&lt;p&gt;If you could set one unbreakable constraint for your AI coding assistant, what would it be?&lt;/p&gt;

&lt;p&gt;I'm curious what other developers are struggling with. The constraint patterns tell me a lot about what to build next.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;SpecLock — Because remembering isn't enough. AI needs to respect boundaries.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>opensource</category>
      <category>ai</category>
      <category>programming</category>
    </item>
    <item>
      <title>How I Built an API to Detect Fake Gemstones Using AI</title>
      <dc:creator>Sandeep Roy</dc:creator>
      <pubDate>Fri, 02 Jan 2026 12:18:23 +0000</pubDate>
      <link>https://dev.to/sandeep_roy_c4e518c3f2641/how-i-built-an-api-to-detect-fake-gemstones-using-ai-23a9</link>
      <guid>https://dev.to/sandeep_roy_c4e518c3f2641/how-i-built-an-api-to-detect-fake-gemstones-using-ai-23a9</guid>
      <description>&lt;p&gt;After 30 years in the jewelry trade, I've seen countless people get scammed buying synthetic stones sold as natural. So I built an API to solve this.&lt;/p&gt;

&lt;h2&gt;
  
  
  What GemLens Does
&lt;/h2&gt;

&lt;p&gt;Send a gemstone image → get back:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Stone identification (ruby, sapphire, emerald, etc.)&lt;/li&gt;
&lt;li&gt;Natural vs synthetic vs glass probability&lt;/li&gt;
&lt;li&gt;Color, clarity, cut grading&lt;/li&gt;
&lt;li&gt;Origin estimate&lt;/li&gt;
&lt;li&gt;Market value range&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick Example
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST &lt;span class="s2"&gt;"https://gemlens.p.rapidapi.com/analyze"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"X-RapidAPI-Key: YOUR_KEY"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{"image": "data:image/jpeg;base64,..."}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Response:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"gemstone"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Ruby"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"confidence"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;94&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"authenticity"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"natural_probability"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;92&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"synthetic_probability"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"simulant_probability"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"origin"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Myanmar (Burma)"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"market"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"estimated_retail_value"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"$8,500-$12,000"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Who It's For
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;E-commerce platforms selling jewelry&lt;/li&gt;
&lt;li&gt;Pawn shops needing quick verification&lt;/li&gt;
&lt;li&gt;Insurance companies&lt;/li&gt;
&lt;li&gt;Jewelry appraisers&lt;/li&gt;
&lt;li&gt;Developers building marketplace apps&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Free tier: 50 calls/month&lt;br&gt;
&lt;a href="https://rapidapi.com/sgroy10/api/gemlens" rel="noopener noreferrer"&gt;https://rapidapi.com/sgroy10/api/gemlens&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Would love feedback!&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>machinelearning</category>
      <category>ai</category>
      <category>api</category>
    </item>
  </channel>
</rss>
