<?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: Francesco Marchesini</title>
    <description>The latest articles on DEV Community by Francesco Marchesini (@gadz82).</description>
    <link>https://dev.to/gadz82</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%2F2866881%2F0d45b75c-84a7-4928-96b5-357b5a4445cb.jpeg</url>
      <title>DEV Community: Francesco Marchesini</title>
      <link>https://dev.to/gadz82</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gadz82"/>
    <language>en</language>
    <item>
      <title>Agent contexts - A tool for AI coding agents context management</title>
      <dc:creator>Francesco Marchesini</dc:creator>
      <pubDate>Wed, 17 Jun 2026 09:08:32 +0000</pubDate>
      <link>https://dev.to/gadz82/agent-contexts-a-tool-to-feed-you-coding-agents-5flm</link>
      <guid>https://dev.to/gadz82/agent-contexts-a-tool-to-feed-you-coding-agents-5flm</guid>
      <description>&lt;p&gt;In the AI era, something funny is happening: side projects that have been collecting dust in &lt;code&gt;~/code/wishful-thinking/&lt;/code&gt; are getting dusted off. Suddenly that "someday I'll write this" repo on GitHub has a real README, a working CI, and three open issues you actually want to close.&lt;/p&gt;

&lt;p&gt;Why? Because the AI doesn't complain. Doesn't get bored. Doesn't ask "but why do we need this when we have X?" at 11pm when all you want is to feel better with yourself, when your children are on the bed and you think "now is the moment i should use to realize some of my personal projects."&lt;br&gt;
So while the discourse is busy replacing you with LLMs, you're quietly using LLMs to replace the procrastination that used to replace you.&lt;/p&gt;

&lt;p&gt;This post is about one of those moments, one of those ideas born in the night, that probably, in pre-AI era, would have been forgotten behind "it's too late to open my laptop": a small CLI called&lt;br&gt;
&lt;a href="https://github.com/gadz82/contexts" rel="noopener noreferrer"&gt;&lt;strong&gt;agent-contexts&lt;/strong&gt;&lt;/a&gt; I wrote because I was sick of having 40 &lt;code&gt;AGENTS.md&lt;/code&gt; tabs open across 40 different repos.&lt;/p&gt;
&lt;h2&gt;
  
  
  What Even Is "Context" and Why Should You Care?
&lt;/h2&gt;

&lt;p&gt;When you sit down with Claude Code, Cursor, Gemini CLI, or any of the other agentic tools, they don't read your mind. They need to be told things. Some of those things you tell them in chat. But the important stuff — the project conventions, the "don't do this here" rules, the "we use tabs not spaces, fight me" — should live &lt;strong&gt;in the repo itself&lt;/strong&gt;, so every agent (and every teammate) picks them up automatically.&lt;/p&gt;

&lt;p&gt;Different agents have different conventions for where to look:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Claude Code&lt;/strong&gt; looks for &lt;code&gt;CLAUDE.md&lt;/code&gt; (and also &lt;code&gt;AGENTS.md&lt;/code&gt;, because Anthropic isn't petty).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gemini CLI&lt;/strong&gt; looks for &lt;code&gt;GEMINI.md&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Copilot, OpenAI Codex, Cursor, and friends&lt;/strong&gt; use &lt;code&gt;AGENTS.md&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;A bunch of tools also support &lt;code&gt;.cursorrules&lt;/code&gt; and similar.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So if you're running a polyglot agent setup (and who isn't these days)you're maintaining multiple files per project. That's annoying before you've written a line of code.&lt;/p&gt;
&lt;h2&gt;
  
  
  Context Is a Diet, Not a Buffet
&lt;/h2&gt;

&lt;p&gt;The thing i learned the hard way: &lt;strong&gt;bigger context does not equal better context&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;When you feed your agent a 4,000-line &lt;code&gt;AGENTS.md&lt;/code&gt; covering every&lt;br&gt;
architectural decision from 2019 to today, two things happen:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The model gets slower and more expensive.&lt;/li&gt;
&lt;li&gt;The model gets worse. Conflicting instructions, ancient context that's no longer relevant, edge cases from a code path that got deleted last year — all of it pollutes the "what to do right now" buffer.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The same project rarely wants the same context for every task:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Building a new feature?&lt;/strong&gt; You want the architecture overview, the existing patterns, the conventions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Refactoring existing code?&lt;/strong&gt; You want the constraints, the dependencies, the "this is load-bearing, don't touch" notes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hunting a bug?&lt;/strong&gt; You want the diagnostics playbook, the logging
conventions, the test scaffolding.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Onboarding a new dev (human or AI)?&lt;/strong&gt; You want the orientation guide: how to run things, where to look first, what's safe to change.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Same repo. Four different &lt;code&gt;AGENTS.md&lt;/code&gt; files. (Plus nested ones for&lt;br&gt;
subfolders, because your &lt;code&gt;src/payments/&lt;/code&gt; deserves its own context, thank you very much.)&lt;/p&gt;

&lt;p&gt;The "obvious" solution at the beginning was one big monolithic &lt;code&gt;AGENTS.md&lt;/code&gt; at the root... but soon you understand the unefficency of that approach. The other "obvious" solution currently is a hand-maintained tree of nested &lt;code&gt;AGENTS.md&lt;/code&gt; files in every folder, it wins on quality but loses on maintenance. The day someone updates the root convention, they have to remember to propagate it. And nobody remembers.&lt;/p&gt;
&lt;h2&gt;
  
  
  Enter: Vercel's Skills
&lt;/h2&gt;

&lt;p&gt;The Vercel team had a similar itch a while back, and they scratched it with &lt;a href="https://github.com/vercel-labs/skills" rel="noopener noreferrer"&gt;agent skills&lt;/a&gt;. They treated the bundle of "things an agent needs to do a job" (instructions, scripts, references) as a package. So they made it installable. You can &lt;code&gt;npx skills add &amp;lt;source&amp;gt;&lt;/code&gt;, the tool fetches the right files, drops them in the right places, and tracks what's installed in a lockfile. Deterministic, versioned, no fuss.&lt;/p&gt;

&lt;p&gt;But skills are about &lt;em&gt;capabilities&lt;/em&gt;: "here's how to run my CI", "here's how to deploy", "here's a script to seed the DB". They don't really cover the &lt;code&gt;AGENTS.md&lt;/code&gt; use case, where you want to distribute context, not behavior.&lt;/p&gt;

&lt;p&gt;So I built something in the same vein, but scoped to context files.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;code&gt;agent-contexts&lt;/code&gt;: npm, but for &lt;code&gt;AGENTS.md&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/gadz82/contexts" rel="noopener noreferrer"&gt;&lt;strong&gt;agent-contexts&lt;/strong&gt;&lt;/a&gt; is a CLI. The way to think about it:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Curate agent context once in a central git repo. Install it into every&lt;br&gt;
consumer project. Versioned, deterministic, reproducible.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;
  
  
  How it works
&lt;/h3&gt;

&lt;p&gt;You write a &lt;code&gt;contexts.yml&lt;/code&gt; at the root of your contexts repo:&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="na"&gt;version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;1"&lt;/span&gt;
&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;engineering-contexts&lt;/span&gt;

&lt;span class="na"&gt;mappings&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;."&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;context_source&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;./agents/root/AGENTS.md&lt;/span&gt;
    &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Repo-wide conventions&lt;/span&gt;
  &lt;span class="na"&gt;src/products&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;context_source&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;./agents/products/AGENTS.md&lt;/span&gt;
    &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Products module&lt;/span&gt;
  &lt;span class="na"&gt;src/common/database&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;context_source&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;./agents/database/AGENTS.md&lt;/span&gt;
    &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Sequelize + MySQL integration&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each mapping points a folder in the consumer project at a profile file in the contexts repo. &lt;code&gt;agent-contexts add&lt;/code&gt; then:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Materializes the contexts repo into a git-ignored cache:
&lt;code&gt;.contexts/cache/&amp;lt;slug&amp;gt;/&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Drops &lt;strong&gt;relative&lt;/strong&gt; symlinks at every target path. (Yes, relative - so the project still works after you move it.)&lt;/li&gt;
&lt;li&gt;Writes a &lt;code&gt;contexts.lock&lt;/code&gt; pinning each source to a commit SHA and each file to a SHA-256 hash.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;agent-contexts install&lt;/code&gt; is the &lt;code&gt;npm ci&lt;/code&gt; of context. It only reads&lt;br&gt;
&lt;code&gt;contexts.lock&lt;/code&gt;, never the manifest, so CI doesn't have to fetch the manifest or guess about upstream availability. Same lock, same files, every time.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;agent-contexts status&lt;/code&gt; recomputes truth from disk and exits non-zero if anything is broken, missing, or hand-edited. Easy CI gate.&lt;/p&gt;
&lt;h3&gt;
  
  
  Tags: different context, same folder
&lt;/h3&gt;

&lt;p&gt;Sometimes you need a different context for the same folder, depending on what you're doing.&lt;/p&gt;

&lt;p&gt;Say your repo has a default tone — calm, professional, focused on the production codebase. But today you're refactoring and you want a more pedagogical tone with extra "before you change this, consider…" notes. Or you're onboarding a junior dev and you want a glossary of project-specific terms front and center.&lt;/p&gt;

&lt;p&gt;You author those as a &lt;strong&gt;tag&lt;/strong&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="na"&gt;mappings&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;."&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;context_source&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;./agents/root/AGENTS.md&lt;/span&gt;
  &lt;span class="na"&gt;src/products&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;context_source&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;./agents/products/AGENTS.md&lt;/span&gt;

&lt;span class="na"&gt;tags&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;onboarding&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;mappings&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;."&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;context_source&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;./agents/root/onboarding/AGENTS.md&lt;/span&gt;
      &lt;span class="na"&gt;src/products&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;context_source&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;./agents/products/onboarding/AGENTS.md&lt;/span&gt;
  &lt;span class="na"&gt;refactor&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;mappings&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;src/products&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;context_source&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;./agents/products/refactor/AGENTS.md&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Switch with a flag:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx agent-contexts add your-org/your-contexts &lt;span class="nt"&gt;--tag&lt;/span&gt; onboarding
&lt;span class="c"&gt;# or&lt;/span&gt;
npx agent-contexts update &lt;span class="nt"&gt;--tag&lt;/span&gt; refactor
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Effective set is &lt;code&gt;root ∪ tag&lt;/code&gt; (tag wins on conflicts), so you only write the differences. The lock records which tag each entry is on, so &lt;code&gt;install&lt;/code&gt; reproduces it and &lt;code&gt;update&lt;/code&gt; keeps you there.&lt;/p&gt;

&lt;h3&gt;
  
  
  A tiny end-to-end example
&lt;/h3&gt;

&lt;p&gt;NestJS microservice. You want a Star-Wars-toned &lt;code&gt;AGENTS.md&lt;/code&gt; for&lt;br&gt;
&lt;code&gt;src/products&lt;/code&gt; — because why not.&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="c"&gt;# contexts repo&lt;/span&gt;
&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; agents/star-wars

&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; agents/products/AGENTS.md &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;'
# Products Module

Follow the Repository pattern for data access.
Split Read and Write services (CQS-lite).
Use `class-validator` DTOs for every input.
&lt;/span&gt;&lt;span class="no"&gt;EOF

&lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; agents/star-wars/products.md &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;'
# Products Module — The Armory of the Bounty Hunters

The domain heart, this is. Where artifacts of the holonet catalog,
manage you do.

- The Repository pattern, follow — data access through one gate
- Read and Write services, split — CQS-lite, the path of clarity
- DTOs with `class-validator`, use — `@nestjs/swagger` for the holomap
&lt;/span&gt;&lt;span class="no"&gt;EOF

&lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; contexts.yml &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;'
version: "1"
mappings:
  src/products:
    context_source: ./agents/products/AGENTS.md
    description: Products module
tags:
  star-wars:
    mappings:
      src/products:
        context_source: ./agents/star-wars/products.md
        description: Products module — Yoda edition
&lt;/span&gt;&lt;span class="no"&gt;EOF
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the consumer project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx agent-contexts add ../your-contexts &lt;span class="nt"&gt;--tag&lt;/span&gt; star-wars &lt;span class="nt"&gt;--force&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt;
&lt;span class="c"&gt;# src/products/AGENTS.md is now a relative symlink into the cached file&lt;/span&gt;
&lt;span class="c"&gt;# contexts.lock records tag=star-wars + the SHA of the file&lt;/span&gt;

npx agent-contexts status
&lt;span class="c"&gt;# ✓ src/products/AGENTS.md  ok&lt;/span&gt;

&lt;span class="c"&gt;# Later, switch back to the default tone&lt;/span&gt;
npx agent-contexts update                       &lt;span class="c"&gt;# keeps the recorded tag&lt;/span&gt;
npx agent-contexts add ../your-contexts &lt;span class="nt"&gt;-y&lt;/span&gt;     &lt;span class="c"&gt;# back to root mappings&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's the whole loop. Symlink in, versioned, switchable, reproducible.&lt;/p&gt;

&lt;h3&gt;
  
  
  A real (and less jokey) combo: code review in CI
&lt;/h3&gt;

&lt;p&gt;Tags turn out to be the right tool for one specific scenario that I keep running into: a CI job that boots a code-review agent on every PR. You don't want that agent reading the same &lt;code&gt;AGENTS.md&lt;/code&gt; files as your dev-time sessions, you want it focused, skeptical, and pointing at your review checklist, not your "how to add a new endpoint" doc.&lt;/p&gt;

&lt;p&gt;So you ship a &lt;code&gt;ci-code-review&lt;/code&gt; tag alongside the default one:&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="na"&gt;mappings&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;."&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;context_source&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;./agents/root/AGENTS.md&lt;/span&gt;
  &lt;span class="na"&gt;src/products&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;context_source&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;./agents/products/AGENTS.md&lt;/span&gt;

&lt;span class="na"&gt;tags&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;ci-code-review&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;mappings&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;."&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;context_source&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;./agents/root/ci-review.md&lt;/span&gt;
        &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Code-review checklist + tone for CI agents&lt;/span&gt;
      &lt;span class="na"&gt;src/products&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;context_source&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;./agents/products/ci-review.md&lt;/span&gt;
        &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Review-time conventions for the products module&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then the CI job does the swap before invoking the agent:&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="c"&gt;# restore the lock so the cache is hot&lt;/span&gt;
npx agent-contexts &lt;span class="nb"&gt;install&lt;/span&gt;

&lt;span class="c"&gt;# swap every entry to the CR-specific tone&lt;/span&gt;
npx agent-contexts update &lt;span class="nt"&gt;--tag&lt;/span&gt; ci-code-review

&lt;span class="c"&gt;# boot the reviewer — it picks up AGENTS.md / CLAUDE.md / GEMINI.md&lt;/span&gt;
&lt;span class="c"&gt;# that all point at the ci-code-review content&lt;/span&gt;
npx your-cr-agent
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same project, same lock, completely different &lt;code&gt;AGENTS.md&lt;/code&gt; content at every target. The dev never sees the CI variant; the CI never sees the dev variant. Both live in the same repo, both are versioned, and a PR against either one is just a normal git workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Commands cheat sheet
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;agent-contexts add &amp;lt;source&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Fetch, select mappings, link, write lock.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;agent-contexts install&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Headless restore from &lt;code&gt;contexts.lock&lt;/code&gt;. The &lt;code&gt;npm ci&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;agent-contexts update&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Pull upstream, diff, re-pin.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;agent-contexts status&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Per-entry truth from disk. Exit 5 on problems.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;agent-contexts list&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Pretty table straight from the lock.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;agent-contexts reset&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Undo: remove links, restore &lt;code&gt;.bak&lt;/code&gt; backups, delete lock + cache.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;All commands take &lt;code&gt;--json&lt;/code&gt;, &lt;code&gt;-y&lt;/code&gt;, &lt;code&gt;--dry-run&lt;/code&gt;, and &lt;code&gt;--verbose&lt;/code&gt;. None of them need a TTY, so they slot into CI without fuss.&lt;/p&gt;

&lt;p&gt;The full docs and source live at&lt;br&gt;
&lt;a href="https://github.com/gadz82/contexts" rel="noopener noreferrer"&gt;&lt;strong&gt;github.com/gadz82/contexts&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pros, cons, and an honest disclaimer
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic.&lt;/strong&gt; Same &lt;code&gt;contexts.lock&lt;/code&gt;, same files, anywhere — laptop,
CI, your colleague's machine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Versioned.&lt;/strong&gt; Pin to a SHA. Roll back by changing one line in the lock.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Composable.&lt;/strong&gt; Tags mean you ship one context repo per project, not N
forks of it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Familiar.&lt;/strong&gt; Anyone who's used &lt;code&gt;npm&lt;/code&gt;, &lt;code&gt;cargo&lt;/code&gt;, or &lt;code&gt;pip&lt;/code&gt; already gets
it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Portable.&lt;/strong&gt; Symlinks are relative — the project keeps working after
you move or re-clone it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-tool.&lt;/strong&gt; &lt;code&gt;AGENTS.md&lt;/code&gt;, &lt;code&gt;CLAUDE.md&lt;/code&gt;, &lt;code&gt;GEMINI.md&lt;/code&gt;, whatever your
agent of the week wants.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scriptable.&lt;/strong&gt; &lt;code&gt;--json&lt;/code&gt; everywhere, deterministic exit codes, no TTY
needed, for example you can wire it into a CI job that swaps to a &lt;code&gt;ci-cr&lt;/code&gt; tag
before booting the reviewer agent, then walk away.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt; &lt;em&gt;(fair's fair)&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Local-path sources store an absolute path&lt;/strong&gt; in the lock. Commit that
lock and ship it to another machine and &lt;code&gt;install&lt;/code&gt; won't find anything
to fetch from. The reason is in the docs (TL;DR: only a git URL is the
same string everywhere). Use git for shared/CI; locals are for solo
experiments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Windows without Developer Mode&lt;/strong&gt; falls back to file copies. It still
works, but updates need a re-run.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The schema is opinionated&lt;/strong&gt; — POSIX paths, no &lt;code&gt;..&lt;/code&gt; escapes, lowercase
hex hashes, that sort of thing. Read the spec once and you'll stop
fighting it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;This is v0.x.&lt;/strong&gt; I'm not promising the lockfile format won't change
in a breaking way. Pin your &lt;code&gt;agent-contexts&lt;/code&gt; version.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Wrapping up
&lt;/h2&gt;

&lt;p&gt;If you've ever felt the pain of maintaining &lt;code&gt;AGENTS.md&lt;/code&gt; files across a fleet of repos — or worse, watching them drift out of sync — give &lt;a href="https://github.com/gadz82/contexts" rel="noopener noreferrer"&gt;&lt;strong&gt;agent-contexts&lt;/strong&gt;&lt;/a&gt; a try. The README is short, the install is one command, and the worst case is that you &lt;code&gt;rm&lt;/code&gt; a &lt;code&gt;.contexts/&lt;/code&gt; folder and a &lt;code&gt;contexts.lock&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Found a bug? Open an issue. Got a feature idea? Open a PR. Want to yell at me about the name (it should be &lt;code&gt;agent-context&lt;/code&gt; and the binary should be &lt;code&gt;contexts&lt;/code&gt;, I know, I know)? There's an issue tracker for that too.&lt;/p&gt;

&lt;p&gt;And a proper thank-you to the &lt;a href="https://github.com/vercel-labs/skills" rel="noopener noreferrer"&gt;&lt;strong&gt;Vercel Skills&lt;/strong&gt;&lt;/a&gt; folks. The shape of&lt;br&gt;
this whole thing is theirs; the AGENTS-shaped twist is mine.&lt;/p&gt;

&lt;p&gt;That's all. Go ship something.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>coding</category>
      <category>npm</category>
    </item>
  </channel>
</rss>
