<?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: Gabriele Mariotti</title>
    <description>The latest articles on DEV Community by Gabriele Mariotti (@gabriele_mariotti_0596f87).</description>
    <link>https://dev.to/gabriele_mariotti_0596f87</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%2F3874108%2F2f8f27f6-a2d3-4510-9b42-a12134680c2d.jpg</url>
      <title>DEV Community: Gabriele Mariotti</title>
      <link>https://dev.to/gabriele_mariotti_0596f87</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gabriele_mariotti_0596f87"/>
    <language>en</language>
    <item>
      <title>One repo, multiple AI agents: a tool-agnostic pattern for shared AI guidelines</title>
      <dc:creator>Gabriele Mariotti</dc:creator>
      <pubDate>Sat, 11 Apr 2026 21:02:11 +0000</pubDate>
      <link>https://dev.to/gabriele_mariotti_0596f87/one-repo-multiple-ai-agents-a-tool-agnostic-pattern-for-shared-ai-guidelines-4k82</link>
      <guid>https://dev.to/gabriele_mariotti_0596f87/one-repo-multiple-ai-agents-a-tool-agnostic-pattern-for-shared-ai-guidelines-4k82</guid>
      <description>&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;Every AI coding tool has its own way to receive project context:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Kiro&lt;/strong&gt; → &lt;code&gt;.kiro/steering/*.md&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Claude Code&lt;/strong&gt; → &lt;code&gt;CLAUDE.md&lt;/code&gt; + &lt;code&gt;.claude/rules/*.md&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cursor&lt;/strong&gt; → &lt;code&gt;.cursor/rules/*.md&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your team uses different tools — or if you want to switch without rewriting everything — you have a problem. You either:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Duplicate&lt;/strong&gt; the same rules in every format → they diverge within days&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pick one tool&lt;/strong&gt; and lock everyone in → someone is always excluded&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Put rules in README&lt;/strong&gt; and hope agents read it → they don't, reliably&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;None of these scale.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pattern
&lt;/h2&gt;

&lt;p&gt;Apply &lt;strong&gt;separation of concerns&lt;/strong&gt; to AI agent configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;my-project/
├── ai/                          ← Knowledge (tool-agnostic, in git)
│   ├── README.md
│   └── terraform.md
├── .kiro/steering/              ← Kiro adapter (in git)
│   ├── ai-guidelines.md
│   └── use-terraform.md
├── .kiro/steering/local/        ← Kiro personal overrides (gitignored)
│   └── status.md
├── .claude/rules/               ← Claude adapter (in git)
│   └── tech-use-terraform.md
├── CLAUDE.md                    ← Claude shared instructions (in git)
└── CLAUDE.local.md              ← Claude personal overrides (gitignored)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three layers:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;th&gt;In git?&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;ai/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;What to do (knowledge)&lt;/td&gt;
&lt;td&gt;✅ Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;.kiro/steering/&lt;/code&gt;, &lt;code&gt;.claude/rules/&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;How to load it (adapters)&lt;/td&gt;
&lt;td&gt;✅ Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;local/&lt;/code&gt;, &lt;code&gt;CLAUDE.local.md&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Personal context (overrides)&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  The knowledge layer: &lt;code&gt;ai/&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;This is the single source of truth. Files here are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tool-agnostic&lt;/strong&gt; — no references to Kiro, Claude, or any specific agent&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Human-readable&lt;/strong&gt; — standard markdown, useful even without an AI tool&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Domain-focused&lt;/strong&gt; — one file per topic (Terraform, security, API design, etc.)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example — &lt;code&gt;ai/terraform.md&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# Terraform — Steering rules&lt;/span&gt;

&lt;span class="gu"&gt;## Folder structure&lt;/span&gt;
Each folder is an independent Terraform root module...

&lt;span class="gu"&gt;## Standard files per module&lt;/span&gt;
Every module must contain: main.tf, variables.tf, outputs.tf, versions.tf, README.md...

&lt;span class="gu"&gt;## Security rules&lt;/span&gt;
&lt;span class="gu"&gt;### IAM — least privilege&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Scope resource ARNs to the specific project/environment — never "&lt;span class="err"&gt;*&lt;/span&gt;" unless the API requires it...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No tool-specific syntax. No frontmatter. Just knowledge.&lt;/p&gt;

&lt;h2&gt;
  
  
  The adapter layer
&lt;/h2&gt;

&lt;p&gt;Adapters are minimal files — 3-5 lines — that tell each tool &lt;em&gt;when&lt;/em&gt; and &lt;em&gt;where&lt;/em&gt; to load the knowledge.&lt;/p&gt;

&lt;h3&gt;
  
  
  Kiro adapter (&lt;code&gt;.kiro/steering/use-terraform.md&lt;/code&gt;)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;inclusion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;fileMatch&lt;/span&gt;
&lt;span class="na"&gt;fileMatchPattern&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;**/*.tf"&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;**/*.tfvars"&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

&lt;span class="c1"&gt;# Terraform rules&lt;/span&gt;

&lt;span class="s"&gt;Read and apply the rules in `ai/terraform.md` for all Terraform-related work.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Kiro loads this only when you're working on &lt;code&gt;.tf&lt;/code&gt; files. The actual rules live in &lt;code&gt;ai/terraform.md&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Claude adapter (&lt;code&gt;.claude/rules/tech-use-terraform.md&lt;/code&gt;)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;globs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;**/*.tf"&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;**/*.tfvars"&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

&lt;span class="c1"&gt;# Terraform Rules&lt;/span&gt;

&lt;span class="s"&gt;Read and follow the guidelines in `ai/terraform.md` before doing any Terraform work.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same concept, different syntax. Both point to the same source.&lt;/p&gt;

&lt;h3&gt;
  
  
  Meta-adapter: teaching agents the pattern
&lt;/h3&gt;

&lt;p&gt;One file tells each agent how the system works:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Kiro&lt;/strong&gt; (&lt;code&gt;.kiro/steering/ai-guidelines.md&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;inclusion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;always&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

&lt;span class="c1"&gt;# AI Guidelines Convention&lt;/span&gt;

&lt;span class="s"&gt;Technical guidelines are in `ai/` — tool-agnostic, single source of truth.&lt;/span&gt;

&lt;span class="c1"&gt;## Structure&lt;/span&gt;
&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="err"&gt;`&lt;/span&gt;&lt;span class="s"&gt;ai/&amp;lt;topic&amp;gt;.md` ← domain knowledge&lt;/span&gt;
&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="err"&gt;`&lt;/span&gt;&lt;span class="s"&gt;.kiro/steering/` ← Kiro adapters (in git)&lt;/span&gt;
&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="err"&gt;`&lt;/span&gt;&lt;span class="s"&gt;.kiro/steering/local/` ← personal overrides (gitignored)&lt;/span&gt;

&lt;span class="s"&gt;When updating a guideline, modify only `ai/&amp;lt;topic&amp;gt;.md`.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Claude&lt;/strong&gt; (&lt;code&gt;CLAUDE.md&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# My Project&lt;/span&gt;

&lt;span class="gu"&gt;## AI Guidelines Convention&lt;/span&gt;
Technical guidelines are in &lt;span class="sb"&gt;`ai/`&lt;/span&gt; — tool-agnostic, single source of truth.
Adapters in &lt;span class="sb"&gt;`.kiro/steering/`&lt;/span&gt; (Kiro) and &lt;span class="sb"&gt;`.claude/rules/`&lt;/span&gt; (Claude Code).
Personal overrides: &lt;span class="sb"&gt;`.kiro/steering/local/`&lt;/span&gt; and &lt;span class="sb"&gt;`CLAUDE.local.md`&lt;/span&gt; — not in git.

When updating a guideline, modify only &lt;span class="sb"&gt;`ai/&amp;lt;topic&amp;gt;.md`&lt;/span&gt;.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The personal layer
&lt;/h2&gt;

&lt;p&gt;Some context is personal or sensitive:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Project status and TODOs&lt;/li&gt;
&lt;li&gt;Credentials and environment config&lt;/li&gt;
&lt;li&gt;Personal preferences and workflow notes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This goes in tool-specific locations that are gitignored:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Personal location&lt;/th&gt;
&lt;th&gt;Gitignore rule&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Kiro&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.kiro/steering/local/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.kiro/steering/local/&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude&lt;/td&gt;
&lt;td&gt;&lt;code&gt;CLAUDE.local.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;CLAUDE.local.md&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  The &lt;code&gt;.gitignore&lt;/code&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Kiro
.kiro/*
!.kiro/steering/
.kiro/steering/local/

# Claude
CLAUDE.local.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This tracks &lt;code&gt;.kiro/steering/&lt;/code&gt; (adapters) but ignores &lt;code&gt;.kiro/steering/local/&lt;/code&gt; (personal).&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this works
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Single source of truth
&lt;/h3&gt;

&lt;p&gt;Change &lt;code&gt;ai/terraform.md&lt;/code&gt; once → every agent picks it up. No drift, no sync issues.&lt;/p&gt;

&lt;h3&gt;
  
  
  No vendor lock-in
&lt;/h3&gt;

&lt;p&gt;Switch from Kiro to Claude? The knowledge stays. Add Cursor tomorrow? Write a 3-line adapter.&lt;/p&gt;

&lt;h3&gt;
  
  
  Team-friendly
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Everyone sees the same rules&lt;/li&gt;
&lt;li&gt;New team member clones the repo → gets all the knowledge immediately&lt;/li&gt;
&lt;li&gt;Personal overrides don't pollute the shared config&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Progressive adoption
&lt;/h3&gt;

&lt;p&gt;Start with one file in &lt;code&gt;ai/&lt;/code&gt;. Add adapters as needed. The pattern scales from 1 file to 50.&lt;/p&gt;

&lt;h3&gt;
  
  
  Human-readable
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;ai/&lt;/code&gt; is just markdown. No frontmatter, no tool syntax. A developer without any AI tool can read it and follow the same conventions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding a new domain
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Create &lt;code&gt;ai/new-topic.md&lt;/code&gt; with the rules&lt;/li&gt;
&lt;li&gt;Create adapter for each tool:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;.kiro/steering/use-new-topic.md&lt;/code&gt; (with appropriate &lt;code&gt;inclusion&lt;/code&gt; mode)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.claude/rules/tech-use-new-topic.md&lt;/code&gt; (with appropriate &lt;code&gt;globs&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Commit all three files&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Time: 2 minutes. The knowledge is written once, loaded everywhere.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The insight is simple: &lt;strong&gt;knowledge and configuration are different concerns&lt;/strong&gt;. Knowledge is what your project needs. Configuration is how a specific tool loads it.&lt;/p&gt;

&lt;p&gt;Separate them, and you get:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One place to maintain rules&lt;/li&gt;
&lt;li&gt;Freedom to use any AI tool&lt;/li&gt;
&lt;li&gt;Clean git history (knowledge changes are meaningful, adapter changes are rare)&lt;/li&gt;
&lt;li&gt;Team alignment without tool alignment&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;code&gt;ai/&lt;/code&gt; folder is your project's brain. The adapters are just plugs.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>devtools</category>
      <category>claude</category>
      <category>kiro</category>
    </item>
  </channel>
</rss>
